@nyaruka/temba-components 0.131.1 → 0.131.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +4 -1
- package/CHANGELOG.md +75 -1
- package/demo/components/floating-tabs/example.html +400 -0
- package/demo/components/flow/index.html +1 -1
- package/demo/data/flows/food-order.json +2 -2
- package/demo/data/flows/sample-flow.json +113 -125
- package/demo/data/flows/voicemail.json +613 -0
- package/demo/index.html +6 -0
- package/dist/locales/es.js +5 -5
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.js +5 -5
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/locale-codes.js +11 -2
- package/dist/locales/locale-codes.js.map +1 -1
- package/dist/locales/pt.js +5 -5
- package/dist/locales/pt.js.map +1 -1
- package/dist/static/svg/index.svg +1 -1
- package/dist/temba-components.js +1773 -662
- package/dist/temba-components.js.map +1 -1
- package/out-tsc/src/Icons.js +4 -1
- package/out-tsc/src/Icons.js.map +1 -1
- package/out-tsc/src/display/FloatingTab.js +167 -0
- package/out-tsc/src/display/FloatingTab.js.map +1 -0
- package/out-tsc/src/display/ProgressBar.js +22 -2
- package/out-tsc/src/display/ProgressBar.js.map +1 -1
- package/out-tsc/src/events.js.map +1 -1
- package/out-tsc/src/flow/CanvasMenu.js +200 -0
- package/out-tsc/src/flow/CanvasMenu.js.map +1 -0
- package/out-tsc/src/flow/CanvasNode.js +489 -47
- package/out-tsc/src/flow/CanvasNode.js.map +1 -1
- package/out-tsc/src/flow/Editor.js +1417 -67
- package/out-tsc/src/flow/Editor.js.map +1 -1
- package/out-tsc/src/flow/NodeEditor.js +479 -112
- package/out-tsc/src/flow/NodeEditor.js.map +1 -1
- package/out-tsc/src/flow/NodeTypeSelector.js +540 -0
- package/out-tsc/src/flow/NodeTypeSelector.js.map +1 -0
- package/out-tsc/src/flow/StickyNote.js +12 -3
- package/out-tsc/src/flow/StickyNote.js.map +1 -1
- package/out-tsc/src/flow/actions/add_contact_groups.js +4 -3
- package/out-tsc/src/flow/actions/add_contact_groups.js.map +1 -1
- package/out-tsc/src/flow/actions/add_contact_urn.js +63 -4
- package/out-tsc/src/flow/actions/add_contact_urn.js.map +1 -1
- package/out-tsc/src/flow/actions/add_input_labels.js +4 -3
- package/out-tsc/src/flow/actions/add_input_labels.js.map +1 -1
- package/out-tsc/src/flow/actions/play_audio.js +3 -2
- package/out-tsc/src/flow/actions/play_audio.js.map +1 -1
- package/out-tsc/src/flow/actions/remove_contact_groups.js +7 -5
- package/out-tsc/src/flow/actions/remove_contact_groups.js.map +1 -1
- package/out-tsc/src/flow/actions/request_optin.js +3 -2
- package/out-tsc/src/flow/actions/request_optin.js.map +1 -1
- package/out-tsc/src/flow/actions/say_msg.js +3 -2
- package/out-tsc/src/flow/actions/say_msg.js.map +1 -1
- package/out-tsc/src/flow/actions/send_broadcast.js +77 -23
- package/out-tsc/src/flow/actions/send_broadcast.js.map +1 -1
- package/out-tsc/src/flow/actions/send_email.js +5 -5
- package/out-tsc/src/flow/actions/send_email.js.map +1 -1
- package/out-tsc/src/flow/actions/send_msg.js +101 -21
- package/out-tsc/src/flow/actions/send_msg.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_channel.js +6 -9
- package/out-tsc/src/flow/actions/set_contact_channel.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_field.js +20 -20
- package/out-tsc/src/flow/actions/set_contact_field.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_language.js +3 -2
- package/out-tsc/src/flow/actions/set_contact_language.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_name.js +3 -12
- package/out-tsc/src/flow/actions/set_contact_name.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_status.js +3 -2
- package/out-tsc/src/flow/actions/set_contact_status.js.map +1 -1
- package/out-tsc/src/flow/actions/set_run_result.js +4 -3
- package/out-tsc/src/flow/actions/set_run_result.js.map +1 -1
- package/out-tsc/src/flow/actions/start_session.js +181 -6
- package/out-tsc/src/flow/actions/start_session.js.map +1 -1
- package/out-tsc/src/flow/config.js +11 -23
- package/out-tsc/src/flow/config.js.map +1 -1
- package/out-tsc/src/flow/currencies.js +45 -0
- package/out-tsc/src/flow/currencies.js.map +1 -0
- package/out-tsc/src/flow/nodes/shared-rules.js +257 -0
- package/out-tsc/src/flow/nodes/shared-rules.js.map +1 -0
- package/out-tsc/src/flow/nodes/shared.js +71 -0
- package/out-tsc/src/flow/nodes/shared.js.map +1 -0
- package/out-tsc/src/flow/nodes/split_by_airtime.js +211 -5
- package/out-tsc/src/flow/nodes/split_by_airtime.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_contact_field.js +152 -3
- package/out-tsc/src/flow/nodes/split_by_contact_field.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_expression.js +73 -2
- package/out-tsc/src/flow/nodes/split_by_expression.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_groups.js +18 -10
- package/out-tsc/src/flow/nodes/split_by_groups.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_intent.js +8 -0
- package/out-tsc/src/flow/nodes/split_by_intent.js.map +1 -0
- package/out-tsc/src/flow/nodes/split_by_llm.js +11 -3
- package/out-tsc/src/flow/nodes/split_by_llm.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_llm_categorize.js +10 -3
- package/out-tsc/src/flow/nodes/split_by_llm_categorize.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_random.js +10 -4
- package/out-tsc/src/flow/nodes/split_by_random.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_resthook.js +113 -0
- package/out-tsc/src/flow/nodes/split_by_resthook.js.map +1 -0
- package/out-tsc/src/flow/nodes/split_by_run_result.js +211 -3
- package/out-tsc/src/flow/nodes/split_by_run_result.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_scheme.js +158 -2
- package/out-tsc/src/flow/nodes/split_by_scheme.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_subflow.js +13 -5
- package/out-tsc/src/flow/nodes/split_by_subflow.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_ticket.js +10 -3
- package/out-tsc/src/flow/nodes/split_by_ticket.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_webhook.js +10 -3
- package/out-tsc/src/flow/nodes/split_by_webhook.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_digits.js +3 -2
- package/out-tsc/src/flow/nodes/wait_for_digits.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_menu.js +3 -2
- package/out-tsc/src/flow/nodes/wait_for_menu.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_response.js +38 -568
- package/out-tsc/src/flow/nodes/wait_for_response.js.map +1 -1
- package/out-tsc/src/flow/types.js +86 -12
- package/out-tsc/src/flow/types.js.map +1 -1
- package/out-tsc/src/flow/utils.js +101 -14
- package/out-tsc/src/flow/utils.js.map +1 -1
- package/out-tsc/src/form/FieldRenderer.js +2 -4
- package/out-tsc/src/form/FieldRenderer.js.map +1 -1
- package/out-tsc/src/interfaces.js +3 -0
- package/out-tsc/src/interfaces.js.map +1 -1
- package/out-tsc/src/layout/FloatingWindow.js +346 -0
- package/out-tsc/src/layout/FloatingWindow.js.map +1 -0
- package/out-tsc/src/list/SortableList.js +98 -33
- package/out-tsc/src/list/SortableList.js.map +1 -1
- package/out-tsc/src/live/ContactChat.js +6 -25
- package/out-tsc/src/live/ContactChat.js.map +1 -1
- package/out-tsc/src/locales/es.js +5 -5
- package/out-tsc/src/locales/es.js.map +1 -1
- package/out-tsc/src/locales/fr.js +5 -5
- package/out-tsc/src/locales/fr.js.map +1 -1
- package/out-tsc/src/locales/locale-codes.js +11 -2
- package/out-tsc/src/locales/locale-codes.js.map +1 -1
- package/out-tsc/src/locales/pt.js +5 -5
- package/out-tsc/src/locales/pt.js.map +1 -1
- package/out-tsc/src/store/AppState.js +120 -0
- package/out-tsc/src/store/AppState.js.map +1 -1
- package/out-tsc/src/utils.js +254 -13
- package/out-tsc/src/utils.js.map +1 -1
- package/out-tsc/temba-modules.js +8 -0
- package/out-tsc/temba-modules.js.map +1 -1
- package/out-tsc/test/ActionHelper.js +3 -3
- package/out-tsc/test/ActionHelper.js.map +1 -1
- package/out-tsc/test/NodeHelper.js +6 -3
- package/out-tsc/test/NodeHelper.js.map +1 -1
- package/out-tsc/test/actions/add_contact_urn.test.js +202 -0
- package/out-tsc/test/actions/add_contact_urn.test.js.map +1 -0
- package/out-tsc/test/actions/send_broadcast.test.js +148 -0
- package/out-tsc/test/actions/send_broadcast.test.js.map +1 -0
- package/out-tsc/test/actions/send_email.test.js +17 -23
- package/out-tsc/test/actions/send_email.test.js.map +1 -1
- package/out-tsc/test/actions/send_msg.test.js +33 -15
- package/out-tsc/test/actions/send_msg.test.js.map +1 -1
- package/out-tsc/test/actions/start_session.test.js +116 -0
- package/out-tsc/test/actions/start_session.test.js.map +1 -0
- package/out-tsc/test/nodes/split_by_airtime.test.js +604 -0
- package/out-tsc/test/nodes/split_by_airtime.test.js.map +1 -0
- package/out-tsc/test/nodes/split_by_contact_field.test.js +387 -0
- package/out-tsc/test/nodes/split_by_contact_field.test.js.map +1 -0
- package/out-tsc/test/nodes/split_by_expression.test.js +614 -0
- package/out-tsc/test/nodes/split_by_expression.test.js.map +1 -0
- package/out-tsc/test/nodes/split_by_random.test.js +3 -3
- package/out-tsc/test/nodes/split_by_random.test.js.map +1 -1
- package/out-tsc/test/nodes/split_by_resthook.test.js +337 -0
- package/out-tsc/test/nodes/split_by_resthook.test.js.map +1 -0
- package/out-tsc/test/nodes/split_by_run_result.test.js +920 -0
- package/out-tsc/test/nodes/split_by_run_result.test.js.map +1 -0
- package/out-tsc/test/nodes/split_by_scheme.test.js +399 -0
- package/out-tsc/test/nodes/split_by_scheme.test.js.map +1 -0
- package/out-tsc/test/nodes/split_by_subflow.test.js +333 -0
- package/out-tsc/test/nodes/split_by_subflow.test.js.map +1 -0
- package/out-tsc/test/nodes/wait_for_digits.test.js +2 -2
- package/out-tsc/test/nodes/wait_for_digits.test.js.map +1 -1
- package/out-tsc/test/nodes/wait_for_response.test.js +2 -1
- package/out-tsc/test/nodes/wait_for_response.test.js.map +1 -1
- package/out-tsc/test/temba-action-drag-between-nodes.test.js +252 -0
- package/out-tsc/test/temba-action-drag-between-nodes.test.js.map +1 -0
- package/out-tsc/test/temba-canvas-menu.test.js +122 -0
- package/out-tsc/test/temba-canvas-menu.test.js.map +1 -0
- package/out-tsc/test/temba-floating-tab.test.js +91 -0
- package/out-tsc/test/temba-floating-tab.test.js.map +1 -0
- package/out-tsc/test/temba-floating-window.test.js +301 -0
- package/out-tsc/test/temba-floating-window.test.js.map +1 -0
- package/out-tsc/test/temba-flow-editor-node.test.js +202 -2
- package/out-tsc/test/temba-flow-editor-node.test.js.map +1 -1
- package/out-tsc/test/temba-flow-editor.test.js +7 -8
- package/out-tsc/test/temba-flow-editor.test.js.map +1 -1
- package/out-tsc/test/temba-localization.test.js +471 -0
- package/out-tsc/test/temba-localization.test.js.map +1 -0
- package/out-tsc/test/temba-node-editor.test.js +3 -1
- package/out-tsc/test/temba-node-editor.test.js.map +1 -1
- package/out-tsc/test/temba-node-type-selector.test.js +265 -0
- package/out-tsc/test/temba-node-type-selector.test.js.map +1 -0
- package/out-tsc/test/temba-omnibox.test.js +2 -1
- package/out-tsc/test/temba-omnibox.test.js.map +1 -1
- package/out-tsc/test/temba-sortable-list.test.js +51 -0
- package/out-tsc/test/temba-sortable-list.test.js.map +1 -1
- package/out-tsc/test/temba-utils-index.test.js +1 -27
- package/out-tsc/test/temba-utils-index.test.js.map +1 -1
- package/out-tsc/test/utils.test.js +20 -0
- package/out-tsc/test/utils.test.js.map +1 -1
- package/package.json +2 -1
- package/screenshots/truth/actions/add_contact_groups/editor/descriptive-group-names.png +0 -0
- package/screenshots/truth/actions/add_contact_groups/editor/long-group-names.png +0 -0
- package/screenshots/truth/actions/add_contact_groups/editor/many-groups.png +0 -0
- package/screenshots/truth/actions/add_contact_groups/editor/multiple-groups.png +0 -0
- package/screenshots/truth/actions/add_contact_groups/editor/single-group.png +0 -0
- package/screenshots/truth/actions/add_contact_groups/render/descriptive-group-names.png +0 -0
- package/screenshots/truth/actions/add_contact_groups/render/long-group-names.png +0 -0
- package/screenshots/truth/actions/add_contact_groups/render/many-groups.png +0 -0
- package/screenshots/truth/actions/add_contact_groups/render/multiple-groups.png +0 -0
- package/screenshots/truth/actions/add_contact_groups/render/single-group.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/expression-facebook.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/expression-phone.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/facebook-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/instagram-handle.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/line-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/phone-number.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/telegram-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/viber-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/wechat-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/editor/whatsapp.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/expression-facebook.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/expression-phone.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/facebook-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/instagram-handle.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/line-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/phone-number.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/telegram-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/viber-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/wechat-id.png +0 -0
- package/screenshots/truth/actions/add_contact_urn/render/whatsapp.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/editor/cleanup-groups.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/editor/long-descriptive-group-names.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/editor/many-groups.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/editor/multiple-groups.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/editor/remove-from-all-groups.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/editor/single-group.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/render/cleanup-groups.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/render/long-descriptive-group-names.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/render/many-groups.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/render/multiple-groups.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/render/remove-from-all-groups.png +0 -0
- package/screenshots/truth/actions/remove_contact_groups/render/single-group.png +0 -0
- package/screenshots/truth/actions/send_broadcast/editor/contacts-only.png +0 -0
- package/screenshots/truth/actions/send_broadcast/editor/groups-and-contacts.png +0 -0
- package/screenshots/truth/actions/send_broadcast/editor/groups-only.png +0 -0
- package/screenshots/truth/actions/send_broadcast/editor/many-groups.png +0 -0
- package/screenshots/truth/actions/send_broadcast/editor/multiline-text.png +0 -0
- package/screenshots/truth/actions/send_broadcast/editor/with-attachments.png +0 -0
- package/screenshots/truth/actions/send_broadcast/render/contacts-only.png +0 -0
- package/screenshots/truth/actions/send_broadcast/render/groups-and-contacts.png +0 -0
- package/screenshots/truth/actions/send_broadcast/render/groups-only.png +0 -0
- package/screenshots/truth/actions/send_broadcast/render/many-groups.png +0 -0
- package/screenshots/truth/actions/send_broadcast/render/multiline-text.png +0 -0
- package/screenshots/truth/actions/send_broadcast/render/with-attachments.png +0 -0
- package/screenshots/truth/actions/send_email/editor/complex-business-email.png +0 -0
- package/screenshots/truth/actions/send_email/editor/empty-body.png +0 -0
- package/screenshots/truth/actions/send_email/editor/empty-subject.png +0 -0
- package/screenshots/truth/actions/send_email/editor/long-subject.png +0 -0
- package/screenshots/truth/actions/send_email/editor/multiline-body.png +0 -0
- package/screenshots/truth/actions/send_email/editor/multiple-recipients.png +0 -0
- package/screenshots/truth/actions/send_email/editor/simple-email.png +0 -0
- package/screenshots/truth/actions/send_email/editor/with-expressions.png +0 -0
- package/screenshots/truth/actions/send_email/render/complex-business-email.png +0 -0
- package/screenshots/truth/actions/send_email/render/empty-body.png +0 -0
- package/screenshots/truth/actions/send_email/render/empty-subject.png +0 -0
- package/screenshots/truth/actions/send_email/render/long-subject.png +0 -0
- package/screenshots/truth/actions/send_email/render/multiline-body.png +0 -0
- package/screenshots/truth/actions/send_email/render/multiple-recipients.png +0 -0
- package/screenshots/truth/actions/send_email/render/simple-email.png +0 -0
- package/screenshots/truth/actions/send_email/render/with-expressions.png +0 -0
- package/screenshots/truth/actions/send_msg/editor/long-quick-replies.png +0 -0
- package/screenshots/truth/actions/send_msg/editor/multiline-text-with-replies.png +0 -0
- package/screenshots/truth/actions/send_msg/editor/simple-text.png +0 -0
- package/screenshots/truth/actions/send_msg/editor/text-with-linebreaks.png +0 -0
- package/screenshots/truth/actions/send_msg/editor/text-with-many-quick-replies.png +0 -0
- package/screenshots/truth/actions/send_msg/editor/text-with-quick-replies.png +0 -0
- package/screenshots/truth/actions/send_msg/editor/text-without-quick-replies.png +0 -0
- package/screenshots/truth/actions/send_msg/render/long-quick-replies.png +0 -0
- package/screenshots/truth/actions/send_msg/render/multiline-text-with-replies.png +0 -0
- package/screenshots/truth/actions/send_msg/render/simple-text.png +0 -0
- package/screenshots/truth/actions/send_msg/render/text-with-linebreaks.png +0 -0
- package/screenshots/truth/actions/send_msg/render/text-with-many-quick-replies.png +0 -0
- package/screenshots/truth/actions/send_msg/render/text-with-quick-replies.png +0 -0
- package/screenshots/truth/actions/send_msg/render/text-without-quick-replies.png +0 -0
- package/screenshots/truth/actions/start_session/editor/contact-query.png +0 -0
- package/screenshots/truth/actions/start_session/editor/contacts-only.png +0 -0
- package/screenshots/truth/actions/start_session/editor/create-contact.png +0 -0
- package/screenshots/truth/actions/start_session/editor/groups-and-contacts.png +0 -0
- package/screenshots/truth/actions/start_session/editor/groups-only.png +0 -0
- package/screenshots/truth/actions/start_session/editor/many-recipients.png +0 -0
- package/screenshots/truth/actions/start_session/render/contact-query.png +0 -0
- package/screenshots/truth/actions/start_session/render/contacts-only.png +0 -0
- package/screenshots/truth/actions/start_session/render/create-contact.png +0 -0
- package/screenshots/truth/actions/start_session/render/groups-and-contacts.png +0 -0
- package/screenshots/truth/actions/start_session/render/groups-only.png +0 -0
- package/screenshots/truth/actions/start_session/render/many-recipients.png +0 -0
- package/screenshots/truth/canvas-menu/open.png +0 -0
- package/screenshots/truth/editor/router.png +0 -0
- package/screenshots/truth/editor/wait.png +0 -0
- package/screenshots/truth/floating-tab/default.png +0 -0
- package/screenshots/truth/floating-tab/gray.png +0 -0
- package/screenshots/truth/floating-tab/green.png +0 -0
- package/screenshots/truth/floating-tab/hidden.png +0 -0
- package/screenshots/truth/floating-tab/hover.png +0 -0
- package/screenshots/truth/floating-tab/purple.png +0 -0
- package/screenshots/truth/floating-window/chromeless.png +0 -0
- package/screenshots/truth/floating-window/custom-size.png +0 -0
- package/screenshots/truth/floating-window/default.png +0 -0
- package/screenshots/truth/floating-window/with-header.png +0 -0
- package/screenshots/truth/list/fields-dragging.png +0 -0
- package/screenshots/truth/list/sortable-dragging.png +0 -0
- package/screenshots/truth/node-type-selector/action-mode.png +0 -0
- package/screenshots/truth/node-type-selector/split-mode.png +0 -0
- package/screenshots/truth/nodes/split_by_llm/editor/information-extraction.png +0 -0
- package/screenshots/truth/nodes/split_by_llm/editor/sentiment-analysis.png +0 -0
- package/screenshots/truth/nodes/split_by_llm/editor/summarization.png +0 -0
- package/screenshots/truth/nodes/split_by_llm/editor/translation-task.png +0 -0
- package/screenshots/truth/nodes/split_by_llm/render/information-extraction.png +0 -0
- package/screenshots/truth/nodes/split_by_llm/render/sentiment-analysis.png +0 -0
- package/screenshots/truth/nodes/split_by_llm/render/summarization.png +0 -0
- package/screenshots/truth/nodes/split_by_llm/render/translation-task.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/editor/basic-categorization.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/editor/custom-input-and-result-name.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/editor/feedback-categorization.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/editor/many-categories.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/editor/minimal-categories.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/render/basic-categorization.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/render/custom-input-and-result-name.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/render/feedback-categorization.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/render/many-categories.png +0 -0
- package/screenshots/truth/nodes/split_by_llm_categorize/render/minimal-categories.png +0 -0
- package/screenshots/truth/nodes/split_by_random/editor/ab-test-multiple-variants.png +0 -0
- package/screenshots/truth/nodes/split_by_random/editor/sampling-split.png +0 -0
- package/screenshots/truth/nodes/split_by_random/editor/three-way-split.png +0 -0
- package/screenshots/truth/nodes/split_by_random/editor/two-bucket-split.png +0 -0
- package/screenshots/truth/nodes/split_by_random/render/ab-test-multiple-variants.png +0 -0
- package/screenshots/truth/nodes/split_by_random/render/sampling-split.png +0 -0
- package/screenshots/truth/nodes/split_by_random/render/three-way-split.png +0 -0
- package/screenshots/truth/nodes/split_by_random/render/two-bucket-split.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/editor/basic-digits-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/editor/phone-number-collection.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/editor/single-digit-with-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/editor/verification-code.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/render/basic-digits-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/render/phone-number-collection.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/render/single-digit-with-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_digits/render/verification-code.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/editor/basic-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/editor/custom-result-name.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/editor/no-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/editor/short-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/render/basic-wait.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/render/custom-result-name.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/render/no-timeout.png +0 -0
- package/screenshots/truth/nodes/wait_for_response/render/short-timeout.png +0 -0
- package/src/Icons.ts +4 -1
- package/src/display/FloatingTab.ts +174 -0
- package/src/display/ProgressBar.ts +22 -2
- package/src/events.ts +2 -8
- package/src/flow/CanvasMenu.ts +217 -0
- package/src/flow/CanvasNode.ts +596 -40
- package/src/flow/Editor.ts +1721 -45
- package/src/flow/NodeEditor.ts +621 -144
- package/src/flow/NodeTypeSelector.ts +636 -0
- package/src/flow/StickyNote.ts +12 -3
- package/src/flow/actions/add_contact_groups.ts +5 -4
- package/src/flow/actions/add_contact_urn.ts +78 -4
- package/src/flow/actions/add_input_labels.ts +5 -4
- package/src/flow/actions/play_audio.ts +3 -2
- package/src/flow/actions/remove_contact_groups.ts +16 -6
- package/src/flow/actions/request_optin.ts +3 -2
- package/src/flow/actions/say_msg.ts +3 -2
- package/src/flow/actions/send_broadcast.ts +86 -23
- package/src/flow/actions/send_email.ts +12 -6
- package/src/flow/actions/send_msg.ts +155 -34
- package/src/flow/actions/set_contact_channel.ts +6 -11
- package/src/flow/actions/set_contact_field.ts +21 -25
- package/src/flow/actions/set_contact_language.ts +11 -4
- package/src/flow/actions/set_contact_name.ts +4 -15
- package/src/flow/actions/set_contact_status.ts +4 -3
- package/src/flow/actions/set_run_result.ts +5 -4
- package/src/flow/actions/start_session.ts +210 -6
- package/src/flow/config.ts +11 -23
- package/src/flow/currencies.ts +51 -0
- package/src/flow/nodes/shared-rules.ts +301 -0
- package/src/flow/nodes/shared.ts +87 -0
- package/src/flow/nodes/split_by_airtime.ts +255 -5
- package/src/flow/nodes/split_by_contact_field.ts +195 -3
- package/src/flow/nodes/split_by_expression.ts +104 -2
- package/src/flow/nodes/split_by_groups.ts +26 -11
- package/src/flow/nodes/split_by_intent.ts +8 -0
- package/src/flow/nodes/split_by_llm.ts +22 -4
- package/src/flow/nodes/split_by_llm_categorize.ts +22 -5
- package/src/flow/nodes/split_by_random.ts +16 -6
- package/src/flow/nodes/split_by_resthook.ts +140 -0
- package/src/flow/nodes/split_by_run_result.ts +259 -3
- package/src/flow/nodes/split_by_scheme.ts +202 -2
- package/src/flow/nodes/split_by_subflow.ts +17 -5
- package/src/flow/nodes/split_by_ticket.ts +15 -4
- package/src/flow/nodes/split_by_webhook.ts +17 -6
- package/src/flow/nodes/wait_for_digits.ts +3 -2
- package/src/flow/nodes/wait_for_menu.ts +3 -2
- package/src/flow/nodes/wait_for_response.ts +59 -680
- package/src/flow/types.ts +156 -23
- package/src/flow/utils.ts +108 -14
- package/src/form/FieldRenderer.ts +2 -4
- package/src/interfaces.ts +3 -0
- package/src/layout/FloatingWindow.ts +386 -0
- package/src/list/SortableList.ts +109 -34
- package/src/live/ContactChat.ts +7 -25
- package/src/locales/es.ts +18 -13
- package/src/locales/fr.ts +18 -13
- package/src/locales/locale-codes.ts +11 -2
- package/src/locales/pt.ts +18 -13
- package/src/store/AppState.ts +173 -0
- package/src/store/flow-definition.d.ts +2 -5
- package/src/utils.ts +332 -12
- package/static/api/channels.json +46 -0
- package/static/api/llms.json +18 -0
- package/static/api/resthooks.json +31 -0
- package/static/svg/index.svg +1 -1
- package/static/svg/work/traced/lightning-02.svg +1 -0
- package/static/svg/work/used/lightning-02.svg +3 -0
- package/temba-modules.ts +8 -0
- package/test/ActionHelper.ts +3 -3
- package/test/NodeHelper.ts +6 -3
- package/test/actions/add_contact_urn.test.ts +287 -0
- package/test/actions/send_broadcast.test.ts +190 -0
- package/test/actions/send_email.test.ts +17 -23
- package/test/actions/send_msg.test.ts +39 -15
- package/test/actions/start_session.test.ts +151 -0
- package/test/nodes/split_by_airtime.test.ts +673 -0
- package/test/nodes/split_by_contact_field.test.ts +451 -0
- package/test/nodes/split_by_expression.test.ts +751 -0
- package/test/nodes/split_by_random.test.ts +3 -3
- package/test/nodes/split_by_resthook.test.ts +398 -0
- package/test/nodes/split_by_run_result.test.ts +1109 -0
- package/test/nodes/split_by_scheme.test.ts +486 -0
- package/test/nodes/split_by_subflow.test.ts +381 -0
- package/test/nodes/wait_for_digits.test.ts +2 -2
- package/test/nodes/wait_for_response.test.ts +2 -1
- package/test/temba-action-drag-between-nodes.test.ts +301 -0
- package/test/temba-canvas-menu.test.ts +156 -0
- package/test/temba-floating-tab.test.ts +110 -0
- package/test/temba-floating-window.test.ts +477 -0
- package/test/temba-flow-editor-node.test.ts +246 -2
- package/test/temba-flow-editor.test.ts +7 -8
- package/test/temba-localization.test.ts +611 -0
- package/test/temba-node-editor.test.ts +3 -1
- package/test/temba-node-type-selector.test.ts +355 -0
- package/test/temba-omnibox.test.ts +2 -1
- package/test/temba-sortable-list.test.ts +69 -0
- package/test/temba-utils-index.test.ts +0 -35
- package/test/utils.test.ts +22 -0
- package/test-assets/contacts/history.json +14 -21
- package/test-assets/select/llms.json +2 -2
- package/web-dev-server.config.mjs +49 -1
- package/web-test-runner.config.mjs +0 -1
- package/out-tsc/src/flow/actions/call_classifier.js +0 -11
- package/out-tsc/src/flow/actions/call_classifier.js.map +0 -1
- package/out-tsc/src/flow/actions/call_resthook.js +0 -11
- package/out-tsc/src/flow/actions/call_resthook.js.map +0 -1
- package/out-tsc/src/flow/actions/split_by_expression_example.js +0 -77
- package/out-tsc/src/flow/actions/split_by_expression_example.js.map +0 -1
- package/out-tsc/src/flow/actions/transfer_airtime.js +0 -11
- package/out-tsc/src/flow/actions/transfer_airtime.js.map +0 -1
- package/out-tsc/src/flow/nodes/wait_for_audio.js +0 -7
- package/out-tsc/src/flow/nodes/wait_for_audio.js.map +0 -1
- package/out-tsc/src/flow/nodes/wait_for_image.js +0 -7
- package/out-tsc/src/flow/nodes/wait_for_image.js.map +0 -1
- package/out-tsc/src/flow/nodes/wait_for_location.js +0 -7
- package/out-tsc/src/flow/nodes/wait_for_location.js.map +0 -1
- package/out-tsc/src/flow/nodes/wait_for_video.js +0 -7
- package/out-tsc/src/flow/nodes/wait_for_video.js.map +0 -1
- package/src/flow/actions/call_classifier.ts +0 -12
- package/src/flow/actions/call_resthook.ts +0 -12
- package/src/flow/actions/split_by_expression_example.ts +0 -88
- package/src/flow/actions/transfer_airtime.ts +0 -12
- package/src/flow/nodes/wait_for_audio.ts +0 -7
- package/src/flow/nodes/wait_for_image.ts +0 -7
- package/src/flow/nodes/wait_for_location.ts +0 -7
- package/src/flow/nodes/wait_for_video.ts +0 -7
package/src/flow/types.ts
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit-html';
|
|
2
|
-
import { Action, Node } from '../store/flow-definition';
|
|
2
|
+
import { Action, Node, NodeUI } from '../store/flow-definition';
|
|
3
3
|
|
|
4
4
|
export interface ValidationResult {
|
|
5
5
|
valid: boolean;
|
|
6
6
|
errors: { [key: string]: string };
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Flow types - defines the type of flow being edited
|
|
11
|
+
*/
|
|
12
|
+
export const FlowTypes = {
|
|
13
|
+
MESSAGE: 'message',
|
|
14
|
+
VOICE: 'voice',
|
|
15
|
+
BACKGROUND: 'background'
|
|
16
|
+
} as const;
|
|
17
|
+
|
|
18
|
+
export type FlowType = (typeof FlowTypes)[keyof typeof FlowTypes];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Features - defines the features available in the account
|
|
22
|
+
*/
|
|
23
|
+
export const Features = {
|
|
24
|
+
AI: 'ai',
|
|
25
|
+
AIRTIME: 'airtime'
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
28
|
+
export type Feature = (typeof Features)[keyof typeof Features];
|
|
29
|
+
|
|
9
30
|
// Component attribute interfaces - these define what's allowed for each component type
|
|
10
31
|
export interface TextInputAttributes {
|
|
11
32
|
type?: 'text' | 'email' | 'number' | 'url' | 'tel';
|
|
@@ -78,9 +99,12 @@ export interface FormConfig {
|
|
|
78
99
|
export interface NodeConfig extends FormConfig {
|
|
79
100
|
type: string;
|
|
80
101
|
name?: string;
|
|
81
|
-
|
|
102
|
+
group?: ActionGroup | SplitGroup; // Nodes can use either when showAsAction is true
|
|
82
103
|
dialogSize?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
83
104
|
action?: ActionConfig;
|
|
105
|
+
showAsAction?: boolean; // if true, show in action dialog instead of splits (default: false - nodes show in splits)
|
|
106
|
+
flowTypes?: FlowType[]; // which flow types this node is available for (defaults to all if not specified)
|
|
107
|
+
features?: Feature[]; // which features are required for this node (all must be present)
|
|
84
108
|
router?: {
|
|
85
109
|
type: 'switch' | 'random';
|
|
86
110
|
defaultCategory?: string;
|
|
@@ -98,9 +122,22 @@ export interface NodeConfig extends FormConfig {
|
|
|
98
122
|
}[];
|
|
99
123
|
};
|
|
100
124
|
|
|
101
|
-
toFormData?: (node: Node) => FormData;
|
|
125
|
+
toFormData?: (node: Node, nodeUI?: any) => FormData;
|
|
102
126
|
fromFormData?: (formData: FormData, originalNode: Node) => Node;
|
|
103
|
-
|
|
127
|
+
toUIConfig?: (formData: FormData) => Record<string, any>;
|
|
128
|
+
render?: (node: Node, nodeUI?: any) => TemplateResult;
|
|
129
|
+
renderTitle?: (node: Node, nodeUI?: NodeUI) => TemplateResult;
|
|
130
|
+
|
|
131
|
+
// Localization support for router categories
|
|
132
|
+
localizable?: 'categories'; // Only categories are localizable for routers
|
|
133
|
+
toLocalizationFormData?: (
|
|
134
|
+
node: Node,
|
|
135
|
+
localization: Record<string, any>
|
|
136
|
+
) => FormData;
|
|
137
|
+
fromLocalizationFormData?: (
|
|
138
|
+
formData: FormData,
|
|
139
|
+
node: Node
|
|
140
|
+
) => Record<string, any>;
|
|
104
141
|
}
|
|
105
142
|
|
|
106
143
|
// New field configuration system for generic form generation
|
|
@@ -130,6 +167,11 @@ export interface BaseFieldConfig {
|
|
|
130
167
|
visible?: (formData: Record<string, any>) => boolean;
|
|
131
168
|
disabled?: (formData: Record<string, any>) => boolean;
|
|
132
169
|
};
|
|
170
|
+
|
|
171
|
+
// Optional field with reveal link
|
|
172
|
+
// When set, the field is hidden by default and a link with this text is shown
|
|
173
|
+
// Clicking the link reveals the field permanently (can't be hidden again)
|
|
174
|
+
optionalLink?: string;
|
|
133
175
|
}
|
|
134
176
|
|
|
135
177
|
export interface TextFieldConfig extends BaseFieldConfig {
|
|
@@ -231,6 +273,8 @@ export interface RowLayoutConfig {
|
|
|
231
273
|
type: 'row';
|
|
232
274
|
items: LayoutItem[]; // can contain fields, groups, or other rows
|
|
233
275
|
gap?: string; // CSS gap value, defaults to '1rem'
|
|
276
|
+
label?: string; // optional label for the entire row
|
|
277
|
+
helpText?: string; // optional help text for the entire row
|
|
234
278
|
}
|
|
235
279
|
|
|
236
280
|
export interface GroupLayoutConfig {
|
|
@@ -238,9 +282,9 @@ export interface GroupLayoutConfig {
|
|
|
238
282
|
label: string;
|
|
239
283
|
items: LayoutItem[]; // can contain fields, rows, or other groups
|
|
240
284
|
collapsible?: boolean;
|
|
241
|
-
collapsed?: boolean | ((formData:
|
|
285
|
+
collapsed?: boolean | ((formData: FormData) => boolean); // initial state if collapsible - can be a function
|
|
242
286
|
helpText?: string;
|
|
243
|
-
getGroupValueCount?: (formData:
|
|
287
|
+
getGroupValueCount?: (formData: FormData) => number; // optional function to get count for bubble display
|
|
244
288
|
}
|
|
245
289
|
|
|
246
290
|
export type LayoutItem =
|
|
@@ -249,31 +293,120 @@ export type LayoutItem =
|
|
|
249
293
|
| GroupLayoutConfig
|
|
250
294
|
| string; // string is shorthand for field
|
|
251
295
|
|
|
296
|
+
/**
|
|
297
|
+
* Action group constants - single source of truth for action categorization
|
|
298
|
+
* Use as const for compile-time type checking
|
|
299
|
+
*/
|
|
300
|
+
export const ACTION_GROUPS = {
|
|
301
|
+
send: 'send',
|
|
302
|
+
contacts: 'contacts',
|
|
303
|
+
save: 'save',
|
|
304
|
+
services: 'services',
|
|
305
|
+
broadcast: 'broadcast',
|
|
306
|
+
trigger: 'trigger'
|
|
307
|
+
} as const;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Split group constants - single source of truth for split categorization
|
|
311
|
+
* Use as const for compile-time type checking
|
|
312
|
+
*/
|
|
313
|
+
export const SPLIT_GROUPS = {
|
|
314
|
+
wait: 'wait',
|
|
315
|
+
split: 'split'
|
|
316
|
+
} as const;
|
|
317
|
+
|
|
318
|
+
// Extract types from const objects for compile-time checking
|
|
319
|
+
export type ActionGroup = (typeof ACTION_GROUPS)[keyof typeof ACTION_GROUPS];
|
|
320
|
+
export type SplitGroup = (typeof SPLIT_GROUPS)[keyof typeof SPLIT_GROUPS];
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Metadata for group display
|
|
324
|
+
*/
|
|
325
|
+
export interface GroupMetadata {
|
|
326
|
+
color: string;
|
|
327
|
+
title: string;
|
|
328
|
+
description: string;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Action group metadata - defines display properties for each action group
|
|
333
|
+
* Order in this object determines display order in action selector (top to bottom)
|
|
334
|
+
*/
|
|
335
|
+
export const ACTION_GROUP_METADATA: Record<ActionGroup, GroupMetadata> = {
|
|
336
|
+
[ACTION_GROUPS.send]: {
|
|
337
|
+
color: '#3498db',
|
|
338
|
+
title: 'Send',
|
|
339
|
+
description: 'Actions that send messages or content to contacts'
|
|
340
|
+
},
|
|
341
|
+
[ACTION_GROUPS.contacts]: {
|
|
342
|
+
color: '#01c1af',
|
|
343
|
+
title: 'Contact',
|
|
344
|
+
description: 'Actions that update contact information'
|
|
345
|
+
},
|
|
346
|
+
[ACTION_GROUPS.save]: {
|
|
347
|
+
color: '#1a777c',
|
|
348
|
+
title: 'Save',
|
|
349
|
+
description: 'Actions that save or store data'
|
|
350
|
+
},
|
|
351
|
+
[ACTION_GROUPS.services]: {
|
|
352
|
+
color: '#f79035ff',
|
|
353
|
+
title: 'Services',
|
|
354
|
+
description: 'Call external services and APIs'
|
|
355
|
+
},
|
|
356
|
+
[ACTION_GROUPS.broadcast]: {
|
|
357
|
+
color: '#8e5ea7',
|
|
358
|
+
title: 'Other People',
|
|
359
|
+
description: 'Actions that apply to others instead of the contact'
|
|
360
|
+
},
|
|
361
|
+
[ACTION_GROUPS.trigger]: {
|
|
362
|
+
color: '#df419f',
|
|
363
|
+
title: 'Trigger',
|
|
364
|
+
description: 'Actions that trigger other behavior'
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Split group metadata - defines display properties for each split group
|
|
370
|
+
* Order in this object determines display order in split selector (top to bottom)
|
|
371
|
+
*/
|
|
372
|
+
export const SPLIT_GROUP_METADATA: Record<SplitGroup, GroupMetadata> = {
|
|
373
|
+
[SPLIT_GROUPS.wait]: {
|
|
374
|
+
color: '#4d7dad',
|
|
375
|
+
title: 'Wait',
|
|
376
|
+
description: 'Wait for user and split on their response'
|
|
377
|
+
},
|
|
378
|
+
[SPLIT_GROUPS.split]: {
|
|
379
|
+
color: '#aaaaaa',
|
|
380
|
+
title: 'Split',
|
|
381
|
+
description: 'Split the flow based on conditions'
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
|
|
252
385
|
export interface ActionConfig extends FormConfig {
|
|
253
386
|
name: string;
|
|
254
|
-
|
|
387
|
+
group: ActionGroup;
|
|
255
388
|
dialogSize?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
256
389
|
evaluated?: string[];
|
|
390
|
+
hideFromActions?: boolean; // if true, don't show in action dialog (default: false - actions show in actions)
|
|
391
|
+
flowTypes?: FlowType[]; // which flow types this action is available for (defaults to all if not specified)
|
|
392
|
+
features?: Feature[]; // which features are required for this action (all must be present)
|
|
257
393
|
render?: (node: any, action: any) => TemplateResult;
|
|
258
394
|
|
|
259
395
|
form?: Record<string, FieldConfig>;
|
|
260
396
|
layout?: LayoutItem[]; // optional layout configuration - array of layout items
|
|
261
397
|
gutter?: LayoutItem[]; // fields to render in the dialog gutter (left side of buttons)
|
|
262
398
|
|
|
263
|
-
toFormData?: (action: Action) =>
|
|
264
|
-
fromFormData?: (formData:
|
|
265
|
-
}
|
|
399
|
+
toFormData?: (action: Action) => FormData;
|
|
400
|
+
fromFormData?: (formData: FormData) => Action;
|
|
266
401
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
remove: '#e74c3c'
|
|
279
|
-
};
|
|
402
|
+
// Localization support
|
|
403
|
+
localizable?: string[]; // array of field names that can be localized
|
|
404
|
+
toLocalizationFormData?: (
|
|
405
|
+
action: Action,
|
|
406
|
+
localization: Record<string, any>
|
|
407
|
+
) => FormData;
|
|
408
|
+
fromLocalizationFormData?: (
|
|
409
|
+
formData: FormData,
|
|
410
|
+
action: Action
|
|
411
|
+
) => Record<string, any>;
|
|
412
|
+
}
|
package/src/flow/utils.ts
CHANGED
|
@@ -60,17 +60,111 @@ export const renderStringList = (items: string[], icon?: string) => {
|
|
|
60
60
|
return itemElements;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
63
|
+
export interface Scheme {
|
|
64
|
+
scheme: string;
|
|
65
|
+
name: string;
|
|
66
|
+
path: string;
|
|
67
|
+
excludeFromSplit?: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const SCHEMES: Scheme[] = [
|
|
71
|
+
{
|
|
72
|
+
scheme: 'tel',
|
|
73
|
+
name: 'SMS',
|
|
74
|
+
path: 'Phone Number'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
scheme: 'whatsapp',
|
|
78
|
+
name: 'WhatsApp',
|
|
79
|
+
path: 'WhatsApp Number'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
scheme: 'facebook',
|
|
83
|
+
name: 'Facebook',
|
|
84
|
+
path: 'Facebook ID'
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
scheme: 'instagram',
|
|
88
|
+
name: 'Instagram',
|
|
89
|
+
path: 'Instagram ID'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
scheme: 'twitterid',
|
|
93
|
+
name: 'Twitter',
|
|
94
|
+
path: 'Twitter ID',
|
|
95
|
+
excludeFromSplit: true
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
scheme: 'telegram',
|
|
99
|
+
name: 'Telegram',
|
|
100
|
+
path: 'Telegram ID'
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
scheme: 'viber',
|
|
104
|
+
name: 'Viber',
|
|
105
|
+
path: 'Viber ID'
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
scheme: 'line',
|
|
109
|
+
name: 'Line',
|
|
110
|
+
path: 'Line ID'
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
scheme: 'wechat',
|
|
114
|
+
name: 'WeChat',
|
|
115
|
+
path: 'WeChat ID'
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
scheme: 'fcm',
|
|
119
|
+
name: 'Firebase',
|
|
120
|
+
path: 'Firebase ID'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
scheme: 'jiochat',
|
|
124
|
+
name: 'JioChat',
|
|
125
|
+
path: 'JioChat ID'
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
scheme: 'freshchat',
|
|
129
|
+
name: 'Freshchat',
|
|
130
|
+
path: 'Freshchat ID'
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
scheme: 'mailto',
|
|
134
|
+
name: 'Email',
|
|
135
|
+
path: 'Email Address',
|
|
136
|
+
excludeFromSplit: true
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
scheme: 'twitter',
|
|
140
|
+
name: 'Twitter',
|
|
141
|
+
path: 'Twitter Handle',
|
|
142
|
+
excludeFromSplit: true
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
scheme: 'vk',
|
|
146
|
+
name: 'VK',
|
|
147
|
+
path: 'VK ID'
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
scheme: 'discord',
|
|
151
|
+
name: 'Discord',
|
|
152
|
+
path: 'Discord ID'
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
scheme: 'webchat',
|
|
156
|
+
name: 'Webchat',
|
|
157
|
+
path: 'Webchat ID',
|
|
158
|
+
excludeFromSplit: true
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
scheme: 'rocketchat',
|
|
162
|
+
name: 'RocketChat',
|
|
163
|
+
path: 'RocketChat ID'
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
scheme: 'ext',
|
|
167
|
+
name: 'External',
|
|
168
|
+
path: 'External ID'
|
|
169
|
+
}
|
|
170
|
+
];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { html, TemplateResult } from 'lit';
|
|
2
|
+
import { spread } from '@open-wc/lit-helpers';
|
|
2
3
|
import {
|
|
3
4
|
FieldConfig,
|
|
4
5
|
TextFieldConfig,
|
|
@@ -245,10 +246,7 @@ export class FieldRenderer {
|
|
|
245
246
|
value="${option}"
|
|
246
247
|
></temba-option>`;
|
|
247
248
|
} else {
|
|
248
|
-
return html`<temba-option
|
|
249
|
-
name="${option.label || option.name}"
|
|
250
|
-
value="${option.value}"
|
|
251
|
-
></temba-option>`;
|
|
249
|
+
return html`<temba-option ${spread(option)}></temba-option>`;
|
|
252
250
|
}
|
|
253
251
|
})}
|
|
254
252
|
</temba-select>`;
|
package/src/interfaces.ts
CHANGED
|
@@ -278,6 +278,8 @@ export enum CustomEventType {
|
|
|
278
278
|
OrderChanged = 'temba-order-changed',
|
|
279
279
|
DragStart = 'temba-drag-start',
|
|
280
280
|
DragStop = 'temba-drag-stop',
|
|
281
|
+
DragExternal = 'temba-drag-external',
|
|
282
|
+
DragInternal = 'temba-drag-internal',
|
|
281
283
|
Resized = 'temba-resized',
|
|
282
284
|
DetailsChanged = 'temba-details-changed',
|
|
283
285
|
Error = 'temba-error',
|
|
@@ -288,6 +290,7 @@ export enum CustomEventType {
|
|
|
288
290
|
DateRangeChanged = 'temba-date-range-changed',
|
|
289
291
|
NodeDeleted = 'temba-node-deleted',
|
|
290
292
|
ActionEditRequested = 'temba-action-edit-requested',
|
|
293
|
+
AddActionRequested = 'temba-add-action-requested',
|
|
291
294
|
ActionSaved = 'temba-action-saved',
|
|
292
295
|
ActionEditCanceled = 'temba-action-edit-canceled',
|
|
293
296
|
NodeEditRequested = 'temba-node-edit-requested',
|