@nyaruka/temba-components 0.131.0 → 0.131.2
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 +67 -1
- package/demo/data/flows/food-order.json +2 -2
- package/demo/data/flows/sample-flow.json +74 -125
- package/dist/static/svg/index.svg +1 -1
- package/dist/temba-components.js +1156 -619
- 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/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 +327 -19
- package/out-tsc/src/flow/CanvasNode.js.map +1 -1
- package/out-tsc/src/flow/Editor.js +562 -66
- package/out-tsc/src/flow/Editor.js.map +1 -1
- package/out-tsc/src/flow/NodeEditor.js +240 -93
- package/out-tsc/src/flow/NodeEditor.js.map +1 -1
- package/out-tsc/src/flow/NodeTypeSelector.js +499 -0
- package/out-tsc/src/flow/NodeTypeSelector.js.map +1 -0
- package/out-tsc/src/flow/actions/add_contact_groups.js +3 -3
- package/out-tsc/src/flow/actions/add_contact_groups.js.map +1 -1
- package/out-tsc/src/flow/actions/add_contact_urn.js +62 -4
- package/out-tsc/src/flow/actions/add_contact_urn.js.map +1 -1
- package/out-tsc/src/flow/actions/add_input_labels.js +3 -3
- package/out-tsc/src/flow/actions/add_input_labels.js.map +1 -1
- package/out-tsc/src/flow/actions/play_audio.js +2 -2
- package/out-tsc/src/flow/actions/play_audio.js.map +1 -1
- package/out-tsc/src/flow/actions/remove_contact_groups.js +6 -5
- package/out-tsc/src/flow/actions/remove_contact_groups.js.map +1 -1
- package/out-tsc/src/flow/actions/request_optin.js +2 -2
- package/out-tsc/src/flow/actions/request_optin.js.map +1 -1
- package/out-tsc/src/flow/actions/say_msg.js +2 -2
- package/out-tsc/src/flow/actions/say_msg.js.map +1 -1
- package/out-tsc/src/flow/actions/send_broadcast.js +76 -23
- package/out-tsc/src/flow/actions/send_broadcast.js.map +1 -1
- package/out-tsc/src/flow/actions/send_email.js +4 -5
- package/out-tsc/src/flow/actions/send_email.js.map +1 -1
- package/out-tsc/src/flow/actions/send_msg.js +9 -19
- package/out-tsc/src/flow/actions/send_msg.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_channel.js +5 -9
- package/out-tsc/src/flow/actions/set_contact_channel.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_field.js +19 -20
- package/out-tsc/src/flow/actions/set_contact_field.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_language.js +2 -2
- package/out-tsc/src/flow/actions/set_contact_language.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_name.js +2 -12
- package/out-tsc/src/flow/actions/set_contact_name.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_status.js +2 -2
- package/out-tsc/src/flow/actions/set_contact_status.js.map +1 -1
- package/out-tsc/src/flow/actions/set_run_result.js +3 -3
- package/out-tsc/src/flow/actions/set_run_result.js.map +1 -1
- package/out-tsc/src/flow/actions/start_session.js +180 -6
- package/out-tsc/src/flow/actions/start_session.js.map +1 -1
- package/out-tsc/src/flow/config.js +11 -15
- 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 +17 -0
- package/out-tsc/src/flow/nodes/shared.js.map +1 -0
- package/out-tsc/src/flow/nodes/split_by_airtime.js +205 -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 +147 -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 +68 -2
- package/out-tsc/src/flow/nodes/split_by_expression.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_groups.js +12 -9
- package/out-tsc/src/flow/nodes/split_by_groups.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_intent.js +7 -0
- package/out-tsc/src/flow/nodes/split_by_intent.js.map +1 -0
- package/out-tsc/src/flow/nodes/split_by_llm.js +3 -2
- package/out-tsc/src/flow/nodes/split_by_llm.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_llm_categorize.js +2 -2
- package/out-tsc/src/flow/nodes/split_by_llm_categorize.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_random.js +3 -3
- package/out-tsc/src/flow/nodes/split_by_random.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_resthook.js +108 -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 +206 -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 +153 -2
- package/out-tsc/src/flow/nodes/split_by_scheme.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_subflow.js +6 -4
- package/out-tsc/src/flow/nodes/split_by_subflow.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_ticket.js +3 -2
- package/out-tsc/src/flow/nodes/split_by_ticket.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_webhook.js +3 -2
- package/out-tsc/src/flow/nodes/split_by_webhook.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_audio.js +2 -2
- package/out-tsc/src/flow/nodes/wait_for_audio.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_digits.js +2 -2
- package/out-tsc/src/flow/nodes/wait_for_digits.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_image.js +2 -2
- package/out-tsc/src/flow/nodes/wait_for_image.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_location.js +2 -2
- package/out-tsc/src/flow/nodes/wait_for_location.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_menu.js +2 -2
- package/out-tsc/src/flow/nodes/wait_for_menu.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_response.js +32 -567
- package/out-tsc/src/flow/nodes/wait_for_response.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_video.js +2 -2
- package/out-tsc/src/flow/nodes/wait_for_video.js.map +1 -1
- package/out-tsc/src/flow/types.js +71 -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/ContactSearch.js +1 -1
- package/out-tsc/src/form/ContactSearch.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/list/SortableList.js +98 -33
- package/out-tsc/src/list/SortableList.js.map +1 -1
- package/out-tsc/src/live/ContactChat.js +15 -18
- package/out-tsc/src/live/ContactChat.js.map +1 -1
- package/out-tsc/src/store/AppState.js +53 -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 +4 -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-flow-editor-node.test.js +85 -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-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 +115 -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 +2 -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/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/events.ts +2 -6
- package/src/flow/CanvasMenu.ts +217 -0
- package/src/flow/CanvasNode.ts +408 -10
- package/src/flow/Editor.ts +683 -44
- package/src/flow/NodeEditor.ts +304 -125
- package/src/flow/NodeTypeSelector.ts +592 -0
- package/src/flow/actions/add_contact_groups.ts +4 -4
- package/src/flow/actions/add_contact_urn.ts +76 -4
- package/src/flow/actions/add_input_labels.ts +4 -4
- package/src/flow/actions/play_audio.ts +2 -2
- package/src/flow/actions/remove_contact_groups.ts +14 -6
- package/src/flow/actions/request_optin.ts +2 -2
- package/src/flow/actions/say_msg.ts +2 -2
- package/src/flow/actions/send_broadcast.ts +85 -23
- package/src/flow/actions/send_email.ts +10 -6
- package/src/flow/actions/send_msg.ts +22 -32
- package/src/flow/actions/set_contact_channel.ts +5 -11
- package/src/flow/actions/set_contact_field.ts +20 -25
- package/src/flow/actions/set_contact_language.ts +9 -4
- package/src/flow/actions/set_contact_name.ts +3 -15
- package/src/flow/actions/set_contact_status.ts +3 -3
- package/src/flow/actions/set_run_result.ts +4 -4
- package/src/flow/actions/start_session.ts +208 -6
- package/src/flow/config.ts +13 -15
- package/src/flow/currencies.ts +51 -0
- package/src/flow/nodes/shared-rules.ts +301 -0
- package/src/flow/nodes/shared.ts +18 -0
- package/src/flow/nodes/split_by_airtime.ts +238 -5
- package/src/flow/nodes/split_by_contact_field.ts +185 -3
- package/src/flow/nodes/split_by_expression.ts +94 -2
- package/src/flow/nodes/split_by_groups.ts +15 -10
- package/src/flow/nodes/split_by_intent.ts +7 -0
- package/src/flow/nodes/split_by_llm.ts +4 -3
- package/src/flow/nodes/split_by_llm_categorize.ts +4 -4
- package/src/flow/nodes/split_by_random.ts +5 -5
- package/src/flow/nodes/split_by_resthook.ts +130 -0
- package/src/flow/nodes/split_by_run_result.ts +249 -3
- package/src/flow/nodes/split_by_scheme.ts +192 -2
- package/src/flow/nodes/split_by_subflow.ts +6 -4
- package/src/flow/nodes/split_by_ticket.ts +4 -3
- package/src/flow/nodes/split_by_webhook.ts +6 -5
- package/src/flow/nodes/wait_for_audio.ts +2 -2
- package/src/flow/nodes/wait_for_digits.ts +2 -2
- package/src/flow/nodes/wait_for_image.ts +2 -2
- package/src/flow/nodes/wait_for_location.ts +2 -2
- package/src/flow/nodes/wait_for_menu.ts +2 -2
- package/src/flow/nodes/wait_for_response.ts +48 -679
- package/src/flow/nodes/wait_for_video.ts +2 -2
- package/src/flow/types.ts +109 -23
- package/src/flow/utils.ts +108 -14
- package/src/form/ContactSearch.ts +1 -1
- package/src/form/FieldRenderer.ts +2 -4
- package/src/interfaces.ts +3 -0
- package/src/list/SortableList.ts +109 -34
- package/src/live/ContactChat.ts +15 -18
- package/src/store/AppState.ts +69 -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/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 +4 -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-flow-editor-node.test.ts +102 -2
- package/test/temba-flow-editor.test.ts +7 -8
- package/test/temba-node-editor.test.ts +3 -1
- package/test/temba-node-type-selector.test.ts +152 -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 +2 -0
- package/test-assets/contacts/history.json +14 -20
- package/web-dev-server.config.mjs +3 -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/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
|
@@ -55,10 +55,8 @@
|
|
|
55
55
|
"name": "SMS Channel"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"status": "
|
|
59
|
-
"
|
|
60
|
-
"failed_reason_display": "No suitable channel found",
|
|
61
|
-
"logs_url": null
|
|
58
|
+
"_status": {"status": "failed", "reason": "error_limit"},
|
|
59
|
+
"_logs_url": null
|
|
62
60
|
},
|
|
63
61
|
{
|
|
64
62
|
"uuid": "01997d74-bf67-7305-b5f7-017c6eb04cf7",
|
|
@@ -92,8 +90,8 @@
|
|
|
92
90
|
"name": "SMS Channel"
|
|
93
91
|
}
|
|
94
92
|
},
|
|
95
|
-
"
|
|
96
|
-
"
|
|
93
|
+
"_status": "W",
|
|
94
|
+
"_logs_url": "/channels/channellog/read/1478/"
|
|
97
95
|
},
|
|
98
96
|
{
|
|
99
97
|
"uuid": "01997d74-bf67-74a1-97db-faaf45bbff53",
|
|
@@ -107,8 +105,7 @@
|
|
|
107
105
|
"name": "SMS Channel"
|
|
108
106
|
}
|
|
109
107
|
},
|
|
110
|
-
"
|
|
111
|
-
"logs_url": "/channels/channellog/read/1477/"
|
|
108
|
+
"_logs_url": "/channels/channellog/read/1477/"
|
|
112
109
|
},
|
|
113
110
|
{
|
|
114
111
|
"uuid": "01997d74-bf67-70c2-bfae-14c661955736",
|
|
@@ -122,8 +119,8 @@
|
|
|
122
119
|
"name": "SMS Channel"
|
|
123
120
|
}
|
|
124
121
|
},
|
|
125
|
-
"
|
|
126
|
-
"
|
|
122
|
+
"_status": "W",
|
|
123
|
+
"_logs_url": "/channels/channellog/read/1476/"
|
|
127
124
|
},
|
|
128
125
|
{
|
|
129
126
|
"uuid": "01997d74-bf67-7199-8e8a-200e41a90d71",
|
|
@@ -137,8 +134,7 @@
|
|
|
137
134
|
"name": "SMS Channel"
|
|
138
135
|
}
|
|
139
136
|
},
|
|
140
|
-
"
|
|
141
|
-
"logs_url": "/channels/channellog/read/1475/"
|
|
137
|
+
"_logs_url": "/channels/channellog/read/1475/"
|
|
142
138
|
},
|
|
143
139
|
{
|
|
144
140
|
"uuid": "01997d74-bf67-7768-9b3e-1a2dd9b90aa4",
|
|
@@ -152,8 +148,8 @@
|
|
|
152
148
|
"name": "SMS Channel"
|
|
153
149
|
}
|
|
154
150
|
},
|
|
155
|
-
"
|
|
156
|
-
"
|
|
151
|
+
"_status": "W",
|
|
152
|
+
"_logs_url": "/channels/channellog/read/1474/"
|
|
157
153
|
},
|
|
158
154
|
{
|
|
159
155
|
"uuid": "01997d74-bf67-74c6-86d6-a9398ee1f5f4",
|
|
@@ -167,8 +163,7 @@
|
|
|
167
163
|
"name": "SMS Channel"
|
|
168
164
|
}
|
|
169
165
|
},
|
|
170
|
-
"
|
|
171
|
-
"logs_url": "/channels/channellog/read/1473/"
|
|
166
|
+
"_logs_url": "/channels/channellog/read/1473/"
|
|
172
167
|
},
|
|
173
168
|
{
|
|
174
169
|
"uuid": "01997d74-bf67-75c9-bd59-36a465fc0c88",
|
|
@@ -204,8 +199,8 @@
|
|
|
204
199
|
"name": "SMS Channel"
|
|
205
200
|
}
|
|
206
201
|
},
|
|
207
|
-
"
|
|
208
|
-
"
|
|
202
|
+
"_status": "W",
|
|
203
|
+
"_logs_url": "/channels/channellog/read/1472/"
|
|
209
204
|
},
|
|
210
205
|
{
|
|
211
206
|
"uuid": "01997d74-bf67-70a9-a0fc-6543b4d0b3d1",
|
|
@@ -234,8 +229,7 @@
|
|
|
234
229
|
"name": "SMS Channel"
|
|
235
230
|
}
|
|
236
231
|
},
|
|
237
|
-
"
|
|
238
|
-
"logs_url": "/channels/channellog/read/1471/"
|
|
232
|
+
"_logs_url": "/channels/channellog/read/1471/"
|
|
239
233
|
}
|
|
240
234
|
]
|
|
241
235
|
}
|
|
@@ -242,6 +242,7 @@ export default {
|
|
|
242
242
|
'/api/v2/labels.json': 'labels.json',
|
|
243
243
|
'/api/v2/fields.json': 'fields.json',
|
|
244
244
|
'/api/v2/globals.json': 'globals.json',
|
|
245
|
+
'/api/v2/resthooks.json': 'resthooks.json',
|
|
245
246
|
'/api/v2/completion.json': '../mr/docs/en-us/editor.json', // Special case
|
|
246
247
|
'/api/v2/functions.json': 'functions.json',
|
|
247
248
|
'/api/internal/templates.json': 'templates.json',
|
|
@@ -253,7 +254,8 @@ export default {
|
|
|
253
254
|
'/api/v2/languages.json': 'languages.json',
|
|
254
255
|
'/api/v2/workspace.json': 'workspace.json',
|
|
255
256
|
'/api/internal/locations.json': 'locations.json',
|
|
256
|
-
'/api/internal/orgs.json': 'orgs.json'
|
|
257
|
+
'/api/internal/orgs.json': 'orgs.json',
|
|
258
|
+
'/api/v2/channels.json': 'channels.json'
|
|
257
259
|
};
|
|
258
260
|
|
|
259
261
|
// Handle base path without query parameters
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { COLORS } from '../types';
|
|
3
|
-
export const call_classifier = {
|
|
4
|
-
name: 'Call Classifier',
|
|
5
|
-
color: COLORS.call,
|
|
6
|
-
render: (_node, _action) => {
|
|
7
|
-
// This will need to be implemented based on the actual render logic
|
|
8
|
-
return html `<div>Call Classifier</div>`;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=call_classifier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"call_classifier.js","sourceRoot":"","sources":["../../../../src/flow/actions/call_classifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAW,EAAE,OAAuB,EAAE,EAAE;QAC/C,oEAAoE;QACpE,OAAO,IAAI,CAAA,4BAA4B,CAAC;IAC1C,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, CallClassifier } from '../../store/flow-definition';\n\nexport const call_classifier: ActionConfig = {\n name: 'Call Classifier',\n color: COLORS.call,\n render: (_node: Node, _action: CallClassifier) => {\n // This will need to be implemented based on the actual render logic\n return html`<div>Call Classifier</div>`;\n }\n};\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { COLORS } from '../types';
|
|
3
|
-
export const call_resthook = {
|
|
4
|
-
name: 'Call Resthook',
|
|
5
|
-
color: COLORS.call,
|
|
6
|
-
render: (_node, _action) => {
|
|
7
|
-
// This will need to be implemented based on the actual render logic
|
|
8
|
-
return html `<div>Call Resthook</div>`;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=call_resthook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"call_resthook.js","sourceRoot":"","sources":["../../../../src/flow/actions/call_resthook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAW,EAAE,OAAqB,EAAE,EAAE;QAC7C,oEAAoE;QACpE,OAAO,IAAI,CAAA,0BAA0B,CAAC;IACxC,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, CallResthook } from '../../store/flow-definition';\n\nexport const call_resthook: ActionConfig = {\n name: 'Call Resthook',\n color: COLORS.call,\n render: (_node: Node, _action: CallResthook) => {\n // This will need to be implemented based on the actual render logic\n return html`<div>Call Resthook</div>`;\n }\n};\n"]}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { COLORS } from '../types';
|
|
3
|
-
// utility function to generate category from operand
|
|
4
|
-
const generateCategoryFromOperand = (operand) => {
|
|
5
|
-
if (!operand)
|
|
6
|
-
return '';
|
|
7
|
-
// clean up the operand to make a reasonable category name
|
|
8
|
-
return operand
|
|
9
|
-
.toLowerCase()
|
|
10
|
-
.replace(/[^a-z0-9\s]/g, '') // remove special chars
|
|
11
|
-
.replace(/\s+/g, '_') // replace spaces with underscores
|
|
12
|
-
.slice(0, 20); // limit length
|
|
13
|
-
};
|
|
14
|
-
export const split_by_expression = {
|
|
15
|
-
name: 'Split by Expression',
|
|
16
|
-
color: COLORS.split,
|
|
17
|
-
form: {
|
|
18
|
-
operand: {
|
|
19
|
-
type: 'text',
|
|
20
|
-
label: 'Split by',
|
|
21
|
-
required: true,
|
|
22
|
-
evaluated: true,
|
|
23
|
-
placeholder: 'Enter expression to evaluate'
|
|
24
|
-
},
|
|
25
|
-
rules: {
|
|
26
|
-
type: 'array',
|
|
27
|
-
label: 'Rules',
|
|
28
|
-
sortable: true,
|
|
29
|
-
minItems: 1,
|
|
30
|
-
itemLabel: 'Rule',
|
|
31
|
-
itemConfig: {
|
|
32
|
-
operator: {
|
|
33
|
-
type: 'select',
|
|
34
|
-
label: 'Operator',
|
|
35
|
-
required: true,
|
|
36
|
-
options: [
|
|
37
|
-
{ value: 'contains', name: 'contains' },
|
|
38
|
-
{ value: 'equals', name: 'equals' },
|
|
39
|
-
{ value: 'starts_with', name: 'starts with' },
|
|
40
|
-
{ value: 'regex', name: 'regex' }
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
operand: {
|
|
44
|
-
type: 'text',
|
|
45
|
-
label: 'Value',
|
|
46
|
-
required: true,
|
|
47
|
-
evaluated: true,
|
|
48
|
-
placeholder: 'Value to compare against'
|
|
49
|
-
},
|
|
50
|
-
category: {
|
|
51
|
-
type: 'text',
|
|
52
|
-
label: 'Category',
|
|
53
|
-
required: true,
|
|
54
|
-
placeholder: 'Category name for this rule'
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
// handle changes at the item level
|
|
58
|
-
onItemChange: (itemIndex, field, value, allItems) => {
|
|
59
|
-
const updatedItems = [...allItems];
|
|
60
|
-
const item = { ...updatedItems[itemIndex] };
|
|
61
|
-
// update the changed field
|
|
62
|
-
item[field] = value;
|
|
63
|
-
// if operand changed and category is empty, auto-generate category
|
|
64
|
-
if (field === 'operand' &&
|
|
65
|
-
(!item.category || item.category.trim() === '')) {
|
|
66
|
-
item.category = generateCategoryFromOperand(value);
|
|
67
|
-
}
|
|
68
|
-
updatedItems[itemIndex] = item;
|
|
69
|
-
return updatedItems;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
render: (_node, action) => {
|
|
74
|
-
return html `<div>${action.operand || 'Split by expression'}</div>`;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=split_by_expression_example.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"split_by_expression_example.js","sourceRoot":"","sources":["../../../../src/flow/actions/split_by_expression_example.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAEhD,qDAAqD;AACrD,MAAM,2BAA2B,GAAG,CAAC,OAAe,EAAU,EAAE;IAC9D,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAExB,0DAA0D;IAC1D,OAAO,OAAO;SACX,WAAW,EAAE;SACb,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,uBAAuB;SACnD,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,kCAAkC;SACvD,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe;AAClC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAiB;IAC/C,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;IACnB,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,8BAA8B;SAC5C;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO;YACd,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,MAAM;YACjB,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,UAAU;oBACjB,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE;wBACP,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE;wBACvC,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACnC,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,aAAa,EAAE;wBAC7C,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE;qBAClC;iBACF;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,OAAO;oBACd,QAAQ,EAAE,IAAI;oBACd,SAAS,EAAE,IAAI;oBACf,WAAW,EAAE,0BAA0B;iBACxC;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,UAAU;oBACjB,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,6BAA6B;iBAC3C;aACF;YACD,mCAAmC;YACnC,YAAY,EAAE,CACZ,SAAiB,EACjB,KAAa,EACb,KAAU,EACV,QAAe,EACf,EAAE;gBACF,MAAM,YAAY,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;gBACnC,MAAM,IAAI,GAAG,EAAE,GAAG,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;gBAE5C,2BAA2B;gBAC3B,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;gBAEpB,mEAAmE;gBACnE,IACE,KAAK,KAAK,SAAS;oBACnB,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAC/C,CAAC;oBACD,IAAI,CAAC,QAAQ,GAAG,2BAA2B,CAAC,KAAK,CAAC,CAAC;gBACrD,CAAC;gBAED,YAAY,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;gBAC/B,OAAO,YAAY,CAAC;YACtB,CAAC;SACF;KACF;IACD,MAAM,EAAE,CAAC,KAAU,EAAE,MAAW,EAAE,EAAE;QAClC,OAAO,IAAI,CAAA,QAAQ,MAAM,CAAC,OAAO,IAAI,qBAAqB,QAAQ,CAAC;IACrE,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\n\n// utility function to generate category from operand\nconst generateCategoryFromOperand = (operand: string): string => {\n if (!operand) return '';\n\n // clean up the operand to make a reasonable category name\n return operand\n .toLowerCase()\n .replace(/[^a-z0-9\\s]/g, '') // remove special chars\n .replace(/\\s+/g, '_') // replace spaces with underscores\n .slice(0, 20); // limit length\n};\n\nexport const split_by_expression: ActionConfig = {\n name: 'Split by Expression',\n color: COLORS.split,\n form: {\n operand: {\n type: 'text',\n label: 'Split by',\n required: true,\n evaluated: true,\n placeholder: 'Enter expression to evaluate'\n },\n rules: {\n type: 'array',\n label: 'Rules',\n sortable: true,\n minItems: 1,\n itemLabel: 'Rule',\n itemConfig: {\n operator: {\n type: 'select',\n label: 'Operator',\n required: true,\n options: [\n { value: 'contains', name: 'contains' },\n { value: 'equals', name: 'equals' },\n { value: 'starts_with', name: 'starts with' },\n { value: 'regex', name: 'regex' }\n ]\n },\n operand: {\n type: 'text',\n label: 'Value',\n required: true,\n evaluated: true,\n placeholder: 'Value to compare against'\n },\n category: {\n type: 'text',\n label: 'Category',\n required: true,\n placeholder: 'Category name for this rule'\n }\n },\n // handle changes at the item level\n onItemChange: (\n itemIndex: number,\n field: string,\n value: any,\n allItems: any[]\n ) => {\n const updatedItems = [...allItems];\n const item = { ...updatedItems[itemIndex] };\n\n // update the changed field\n item[field] = value;\n\n // if operand changed and category is empty, auto-generate category\n if (\n field === 'operand' &&\n (!item.category || item.category.trim() === '')\n ) {\n item.category = generateCategoryFromOperand(value);\n }\n\n updatedItems[itemIndex] = item;\n return updatedItems;\n }\n }\n },\n render: (_node: any, action: any) => {\n return html`<div>${action.operand || 'Split by expression'}</div>`;\n }\n};\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { COLORS } from '../types';
|
|
3
|
-
export const transfer_airtime = {
|
|
4
|
-
name: 'Transfer Airtime',
|
|
5
|
-
color: COLORS.send,
|
|
6
|
-
render: (_node, _action) => {
|
|
7
|
-
// This will need to be implemented based on the actual render logic
|
|
8
|
-
return html `<div>Transfer Airtime</div>`;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=transfer_airtime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transfer_airtime.js","sourceRoot":"","sources":["../../../../src/flow/actions/transfer_airtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC5C,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAW,EAAE,OAAwB,EAAE,EAAE;QAChD,oEAAoE;QACpE,OAAO,IAAI,CAAA,6BAA6B,CAAC;IAC3C,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, TransferAirtime } from '../../store/flow-definition';\n\nexport const transfer_airtime: ActionConfig = {\n name: 'Transfer Airtime',\n color: COLORS.send,\n render: (_node: Node, _action: TransferAirtime) => {\n // This will need to be implemented based on the actual render logic\n return html`<div>Transfer Airtime</div>`;\n }\n};\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { ActionConfig, COLORS } from '../types';
|
|
3
|
-
import { Node, CallClassifier } from '../../store/flow-definition';
|
|
4
|
-
|
|
5
|
-
export const call_classifier: ActionConfig = {
|
|
6
|
-
name: 'Call Classifier',
|
|
7
|
-
color: COLORS.call,
|
|
8
|
-
render: (_node: Node, _action: CallClassifier) => {
|
|
9
|
-
// This will need to be implemented based on the actual render logic
|
|
10
|
-
return html`<div>Call Classifier</div>`;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { ActionConfig, COLORS } from '../types';
|
|
3
|
-
import { Node, CallResthook } from '../../store/flow-definition';
|
|
4
|
-
|
|
5
|
-
export const call_resthook: ActionConfig = {
|
|
6
|
-
name: 'Call Resthook',
|
|
7
|
-
color: COLORS.call,
|
|
8
|
-
render: (_node: Node, _action: CallResthook) => {
|
|
9
|
-
// This will need to be implemented based on the actual render logic
|
|
10
|
-
return html`<div>Call Resthook</div>`;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { ActionConfig, COLORS } from '../types';
|
|
3
|
-
|
|
4
|
-
// utility function to generate category from operand
|
|
5
|
-
const generateCategoryFromOperand = (operand: string): string => {
|
|
6
|
-
if (!operand) return '';
|
|
7
|
-
|
|
8
|
-
// clean up the operand to make a reasonable category name
|
|
9
|
-
return operand
|
|
10
|
-
.toLowerCase()
|
|
11
|
-
.replace(/[^a-z0-9\s]/g, '') // remove special chars
|
|
12
|
-
.replace(/\s+/g, '_') // replace spaces with underscores
|
|
13
|
-
.slice(0, 20); // limit length
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const split_by_expression: ActionConfig = {
|
|
17
|
-
name: 'Split by Expression',
|
|
18
|
-
color: COLORS.split,
|
|
19
|
-
form: {
|
|
20
|
-
operand: {
|
|
21
|
-
type: 'text',
|
|
22
|
-
label: 'Split by',
|
|
23
|
-
required: true,
|
|
24
|
-
evaluated: true,
|
|
25
|
-
placeholder: 'Enter expression to evaluate'
|
|
26
|
-
},
|
|
27
|
-
rules: {
|
|
28
|
-
type: 'array',
|
|
29
|
-
label: 'Rules',
|
|
30
|
-
sortable: true,
|
|
31
|
-
minItems: 1,
|
|
32
|
-
itemLabel: 'Rule',
|
|
33
|
-
itemConfig: {
|
|
34
|
-
operator: {
|
|
35
|
-
type: 'select',
|
|
36
|
-
label: 'Operator',
|
|
37
|
-
required: true,
|
|
38
|
-
options: [
|
|
39
|
-
{ value: 'contains', name: 'contains' },
|
|
40
|
-
{ value: 'equals', name: 'equals' },
|
|
41
|
-
{ value: 'starts_with', name: 'starts with' },
|
|
42
|
-
{ value: 'regex', name: 'regex' }
|
|
43
|
-
]
|
|
44
|
-
},
|
|
45
|
-
operand: {
|
|
46
|
-
type: 'text',
|
|
47
|
-
label: 'Value',
|
|
48
|
-
required: true,
|
|
49
|
-
evaluated: true,
|
|
50
|
-
placeholder: 'Value to compare against'
|
|
51
|
-
},
|
|
52
|
-
category: {
|
|
53
|
-
type: 'text',
|
|
54
|
-
label: 'Category',
|
|
55
|
-
required: true,
|
|
56
|
-
placeholder: 'Category name for this rule'
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
// handle changes at the item level
|
|
60
|
-
onItemChange: (
|
|
61
|
-
itemIndex: number,
|
|
62
|
-
field: string,
|
|
63
|
-
value: any,
|
|
64
|
-
allItems: any[]
|
|
65
|
-
) => {
|
|
66
|
-
const updatedItems = [...allItems];
|
|
67
|
-
const item = { ...updatedItems[itemIndex] };
|
|
68
|
-
|
|
69
|
-
// update the changed field
|
|
70
|
-
item[field] = value;
|
|
71
|
-
|
|
72
|
-
// if operand changed and category is empty, auto-generate category
|
|
73
|
-
if (
|
|
74
|
-
field === 'operand' &&
|
|
75
|
-
(!item.category || item.category.trim() === '')
|
|
76
|
-
) {
|
|
77
|
-
item.category = generateCategoryFromOperand(value);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
updatedItems[itemIndex] = item;
|
|
81
|
-
return updatedItems;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
render: (_node: any, action: any) => {
|
|
86
|
-
return html`<div>${action.operand || 'Split by expression'}</div>`;
|
|
87
|
-
}
|
|
88
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { ActionConfig, COLORS } from '../types';
|
|
3
|
-
import { Node, TransferAirtime } from '../../store/flow-definition';
|
|
4
|
-
|
|
5
|
-
export const transfer_airtime: ActionConfig = {
|
|
6
|
-
name: 'Transfer Airtime',
|
|
7
|
-
color: COLORS.send,
|
|
8
|
-
render: (_node: Node, _action: TransferAirtime) => {
|
|
9
|
-
// This will need to be implemented based on the actual render logic
|
|
10
|
-
return html`<div>Transfer Airtime</div>`;
|
|
11
|
-
}
|
|
12
|
-
};
|