Skip to content

Commit

Permalink
Add datetimepicker, url, email, number block elements (#1076)
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Nov 4, 2022
1 parent 3a0f5a4 commit 4176b91
Show file tree
Hide file tree
Showing 29 changed files with 1,834 additions and 3 deletions.
20 changes: 20 additions & 0 deletions bolt-socket-mode/src/test/java/samples/SimpleApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ public static void main(String[] args) throws Exception {
.element(plainTextInput(pti -> pti.actionId("agenda-action").multiline(true)))
.label(plainText(pt -> pt.text("Detailed Agenda").emoji(true)))
),
input(input -> input
.blockId("email-block")
.element(emailTextInput(pti -> pti.actionId("email-action")))
.label(plainText(pt -> pt.text("Email Address").emoji(true)))
),
input(input -> input
.blockId("url-block")
.element(urlTextInput(pti -> pti.actionId("url-action")))
.label(plainText(pt -> pt.text("URL").emoji(true)))
),
input(input -> input
.blockId("number-block")
.element(numberInput(pti -> pti.actionId("number-action")))
.label(plainText(pt -> pt.text("Budget").emoji(true)))
),
input(input -> input
.blockId("date-block")
.element(datePicker(pti -> pti.actionId("date-action")))
Expand All @@ -79,6 +94,11 @@ public static void main(String[] args) throws Exception {
.blockId("time-block")
.element(timePicker(pti -> pti.actionId("time-action").timezone("America/Los_Angeles")))
.label(plainText(pt -> pt.text("Time").emoji(true)))
),
input(input -> input
.blockId("date-time-block")
.element(datetimePicker(pti -> pti.actionId("date-time-action")))
.label(plainText(pt -> pt.text("Date Time").emoji(true)))
)
))
)));
Expand Down
74 changes: 74 additions & 0 deletions json-logs/samples/api/views.open.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,51 @@
},
"optional": false
},
{
"type": "input",
"block_id": "",
"label": {
"type": "plain_text",
"text": "",
"emoji": false
},
"element": {
"type": "datetimepicker",
"action_id": "",
"initial_date_time": 123,
"confirm": {
"title": {
"type": "plain_text",
"text": "",
"emoji": false
},
"text": {
"type": "plain_text",
"text": "",
"emoji": false
},
"confirm": {
"type": "plain_text",
"text": "",
"emoji": false
},
"deny": {
"type": "plain_text",
"text": "",
"emoji": false
},
"style": ""
},
"focus_on_load": false
},
"dispatch_action": false,
"hint": {
"type": "plain_text",
"text": "",
"emoji": false
},
"optional": false
},
{
"type": "input",
"block_id": "",
Expand Down Expand Up @@ -1092,6 +1137,35 @@
},
"focus_on_load": false
},
{
"type": "datetimepicker",
"action_id": "",
"initial_date_time": 123,
"confirm": {
"title": {
"type": "plain_text",
"text": "",
"emoji": false
},
"text": {
"type": "plain_text",
"text": "",
"emoji": false
},
"confirm": {
"type": "plain_text",
"text": "",
"emoji": false
},
"deny": {
"type": "plain_text",
"text": "",
"emoji": false
},
"style": ""
},
"focus_on_load": false
},
{
"type": "external_select",
"placeholder": {
Expand Down
74 changes: 74 additions & 0 deletions json-logs/samples/api/views.publish.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,51 @@
},
"optional": false
},
{
"type": "input",
"block_id": "",
"label": {
"type": "plain_text",
"text": "",
"emoji": false
},
"element": {
"type": "datetimepicker",
"action_id": "",
"initial_date_time": 123,
"confirm": {
"title": {
"type": "plain_text",
"text": "",
"emoji": false
},
"text": {
"type": "plain_text",
"text": "",
"emoji": false
},
"confirm": {
"type": "plain_text",
"text": "",
"emoji": false
},
"deny": {
"type": "plain_text",
"text": "",
"emoji": false
},
"style": ""
},
"focus_on_load": false
},
"dispatch_action": false,
"hint": {
"type": "plain_text",
"text": "",
"emoji": false
},
"optional": false
},
{
"type": "input",
"block_id": "",
Expand Down Expand Up @@ -1092,6 +1137,35 @@
},
"focus_on_load": false
},
{
"type": "datetimepicker",
"action_id": "",
"initial_date_time": 123,
"confirm": {
"title": {
"type": "plain_text",
"text": "",
"emoji": false
},
"text": {
"type": "plain_text",
"text": "",
"emoji": false
},
"confirm": {
"type": "plain_text",
"text": "",
"emoji": false
},
"deny": {
"type": "plain_text",
"text": "",
"emoji": false
},
"style": ""
},
"focus_on_load": false
},
{
"type": "external_select",
"placeholder": {
Expand Down
74 changes: 74 additions & 0 deletions json-logs/samples/api/views.push.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,51 @@
},
"optional": false
},
{
"type": "input",
"block_id": "",
"label": {
"type": "plain_text",
"text": "",
"emoji": false
},
"element": {
"type": "datetimepicker",
"action_id": "",
"initial_date_time": 123,
"confirm": {
"title": {
"type": "plain_text",
"text": "",
"emoji": false
},
"text": {
"type": "plain_text",
"text": "",
"emoji": false
},
"confirm": {
"type": "plain_text",
"text": "",
"emoji": false
},
"deny": {
"type": "plain_text",
"text": "",
"emoji": false
},
"style": ""
},
"focus_on_load": false
},
"dispatch_action": false,
"hint": {
"type": "plain_text",
"text": "",
"emoji": false
},
"optional": false
},
{
"type": "input",
"block_id": "",
Expand Down Expand Up @@ -1092,6 +1137,35 @@
},
"focus_on_load": false
},
{
"type": "datetimepicker",
"action_id": "",
"initial_date_time": 123,
"confirm": {
"title": {
"type": "plain_text",
"text": "",
"emoji": false
},
"text": {
"type": "plain_text",
"text": "",
"emoji": false
},
"confirm": {
"type": "plain_text",
"text": "",
"emoji": false
},
"deny": {
"type": "plain_text",
"text": "",
"emoji": false
},
"style": ""
},
"focus_on_load": false
},
{
"type": "external_select",
"placeholder": {
Expand Down
74 changes: 74 additions & 0 deletions json-logs/samples/api/views.update.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,51 @@
},
"optional": false
},
{
"type": "input",
"block_id": "",
"label": {
"type": "plain_text",
"text": "",
"emoji": false
},
"element": {
"type": "datetimepicker",
"action_id": "",
"initial_date_time": 123,
"confirm": {
"title": {
"type": "plain_text",
"text": "",
"emoji": false
},
"text": {
"type": "plain_text",
"text": "",
"emoji": false
},
"confirm": {
"type": "plain_text",
"text": "",
"emoji": false
},
"deny": {
"type": "plain_text",
"text": "",
"emoji": false
},
"style": ""
},
"focus_on_load": false
},
"dispatch_action": false,
"hint": {
"type": "plain_text",
"text": "",
"emoji": false
},
"optional": false
},
{
"type": "input",
"block_id": "",
Expand Down Expand Up @@ -1092,6 +1137,35 @@
},
"focus_on_load": false
},
{
"type": "datetimepicker",
"action_id": "",
"initial_date_time": 123,
"confirm": {
"title": {
"type": "plain_text",
"text": "",
"emoji": false
},
"text": {
"type": "plain_text",
"text": "",
"emoji": false
},
"confirm": {
"type": "plain_text",
"text": "",
"emoji": false
},
"deny": {
"type": "plain_text",
"text": "",
"emoji": false
},
"style": ""
},
"focus_on_load": false
},
{
"type": "external_select",
"placeholder": {
Expand Down

0 comments on commit 4176b91

Please sign in to comment.