@nyaruka/temba-components 0.129.3 → 0.129.4

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.
Files changed (304) hide show
  1. package/.eslintrc.js +1 -0
  2. package/.github/workflows/build.yml +135 -3
  3. package/CHANGELOG.md +18 -0
  4. package/demo/data/flows/sample-flow.json +110 -87
  5. package/demo/field-config-demo.html +135 -0
  6. package/dist/temba-components.js +1257 -675
  7. package/dist/temba-components.js.map +1 -1
  8. package/docs/ActionEditor-Migration.md +118 -0
  9. package/out-tsc/src/events.js.map +1 -1
  10. package/out-tsc/src/flow/{EditorNode.js → CanvasNode.js} +345 -42
  11. package/out-tsc/src/flow/CanvasNode.js.map +1 -0
  12. package/out-tsc/src/flow/Editor.js +107 -3
  13. package/out-tsc/src/flow/Editor.js.map +1 -1
  14. package/out-tsc/src/flow/NodeEditor.js +1200 -0
  15. package/out-tsc/src/flow/NodeEditor.js.map +1 -0
  16. package/out-tsc/src/flow/Plumber.js +0 -6
  17. package/out-tsc/src/flow/Plumber.js.map +1 -1
  18. package/out-tsc/src/flow/actions/add_contact_groups.js +40 -0
  19. package/out-tsc/src/flow/actions/add_contact_groups.js.map +1 -0
  20. package/out-tsc/src/flow/actions/add_contact_urn.js +16 -0
  21. package/out-tsc/src/flow/actions/add_contact_urn.js.map +1 -0
  22. package/out-tsc/src/flow/actions/add_input_labels.js +11 -0
  23. package/out-tsc/src/flow/actions/add_input_labels.js.map +1 -0
  24. package/out-tsc/src/flow/actions/call_classifier.js +11 -0
  25. package/out-tsc/src/flow/actions/call_classifier.js.map +1 -0
  26. package/out-tsc/src/flow/actions/call_llm.js +11 -0
  27. package/out-tsc/src/flow/actions/call_llm.js.map +1 -0
  28. package/out-tsc/src/flow/actions/call_resthook.js +11 -0
  29. package/out-tsc/src/flow/actions/call_resthook.js.map +1 -0
  30. package/out-tsc/src/flow/actions/call_webhook.js +122 -0
  31. package/out-tsc/src/flow/actions/call_webhook.js.map +1 -0
  32. package/out-tsc/src/flow/actions/enter_flow.js +14 -0
  33. package/out-tsc/src/flow/actions/enter_flow.js.map +1 -0
  34. package/out-tsc/src/flow/actions/open_ticket.js +11 -0
  35. package/out-tsc/src/flow/actions/open_ticket.js.map +1 -0
  36. package/out-tsc/src/flow/actions/play_audio.js +11 -0
  37. package/out-tsc/src/flow/actions/play_audio.js.map +1 -0
  38. package/out-tsc/src/flow/actions/remove_contact_groups.js +62 -0
  39. package/out-tsc/src/flow/actions/remove_contact_groups.js.map +1 -0
  40. package/out-tsc/src/flow/actions/request_optin.js +11 -0
  41. package/out-tsc/src/flow/actions/request_optin.js.map +1 -0
  42. package/out-tsc/src/flow/actions/say_msg.js +11 -0
  43. package/out-tsc/src/flow/actions/say_msg.js.map +1 -0
  44. package/out-tsc/src/flow/actions/send_broadcast.js +33 -0
  45. package/out-tsc/src/flow/actions/send_broadcast.js.map +1 -0
  46. package/out-tsc/src/flow/actions/send_email.js +56 -0
  47. package/out-tsc/src/flow/actions/send_email.js.map +1 -0
  48. package/out-tsc/src/flow/actions/send_msg.js +55 -0
  49. package/out-tsc/src/flow/actions/send_msg.js.map +1 -0
  50. package/out-tsc/src/flow/actions/set_contact_channel.js +12 -0
  51. package/out-tsc/src/flow/actions/set_contact_channel.js.map +1 -0
  52. package/out-tsc/src/flow/actions/set_contact_field.js +12 -0
  53. package/out-tsc/src/flow/actions/set_contact_field.js.map +1 -0
  54. package/out-tsc/src/flow/actions/set_contact_language.js +10 -0
  55. package/out-tsc/src/flow/actions/set_contact_language.js.map +1 -0
  56. package/out-tsc/src/flow/actions/set_contact_name.js +10 -0
  57. package/out-tsc/src/flow/actions/set_contact_name.js.map +1 -0
  58. package/out-tsc/src/flow/actions/set_contact_status.js +10 -0
  59. package/out-tsc/src/flow/actions/set_contact_status.js.map +1 -0
  60. package/out-tsc/src/flow/actions/set_run_result.js +10 -0
  61. package/out-tsc/src/flow/actions/set_run_result.js.map +1 -0
  62. package/out-tsc/src/flow/actions/split_by_expression_example.js +77 -0
  63. package/out-tsc/src/flow/actions/split_by_expression_example.js.map +1 -0
  64. package/out-tsc/src/flow/actions/start_session.js +11 -0
  65. package/out-tsc/src/flow/actions/start_session.js.map +1 -0
  66. package/out-tsc/src/flow/actions/transfer_airtime.js +11 -0
  67. package/out-tsc/src/flow/actions/transfer_airtime.js.map +1 -0
  68. package/out-tsc/src/flow/config.js +88 -193
  69. package/out-tsc/src/flow/config.js.map +1 -1
  70. package/out-tsc/src/flow/nodes/execute_actions.js +4 -0
  71. package/out-tsc/src/flow/nodes/execute_actions.js.map +1 -0
  72. package/out-tsc/src/flow/nodes/split_by_airtime.js +9 -0
  73. package/out-tsc/src/flow/nodes/split_by_airtime.js.map +1 -0
  74. package/out-tsc/src/flow/nodes/split_by_contact_field.js +7 -0
  75. package/out-tsc/src/flow/nodes/split_by_contact_field.js.map +1 -0
  76. package/out-tsc/src/flow/nodes/split_by_expression.js +7 -0
  77. package/out-tsc/src/flow/nodes/split_by_expression.js.map +1 -0
  78. package/out-tsc/src/flow/nodes/split_by_groups.js +7 -0
  79. package/out-tsc/src/flow/nodes/split_by_groups.js.map +1 -0
  80. package/out-tsc/src/flow/nodes/split_by_random.js +10 -0
  81. package/out-tsc/src/flow/nodes/split_by_random.js.map +1 -0
  82. package/out-tsc/src/flow/nodes/split_by_run_result.js +7 -0
  83. package/out-tsc/src/flow/nodes/split_by_run_result.js.map +1 -0
  84. package/out-tsc/src/flow/nodes/split_by_scheme.js +7 -0
  85. package/out-tsc/src/flow/nodes/split_by_scheme.js.map +1 -0
  86. package/out-tsc/src/flow/nodes/split_by_subflow.js +9 -0
  87. package/out-tsc/src/flow/nodes/split_by_subflow.js.map +1 -0
  88. package/out-tsc/src/flow/nodes/split_by_webhook.js +18 -0
  89. package/out-tsc/src/flow/nodes/split_by_webhook.js.map +1 -0
  90. package/out-tsc/src/flow/nodes/wait_for_audio.js +7 -0
  91. package/out-tsc/src/flow/nodes/wait_for_audio.js.map +1 -0
  92. package/out-tsc/src/flow/nodes/wait_for_digits.js +7 -0
  93. package/out-tsc/src/flow/nodes/wait_for_digits.js.map +1 -0
  94. package/out-tsc/src/flow/nodes/wait_for_image.js +7 -0
  95. package/out-tsc/src/flow/nodes/wait_for_image.js.map +1 -0
  96. package/out-tsc/src/flow/nodes/wait_for_location.js +7 -0
  97. package/out-tsc/src/flow/nodes/wait_for_location.js.map +1 -0
  98. package/out-tsc/src/flow/nodes/wait_for_menu.js +7 -0
  99. package/out-tsc/src/flow/nodes/wait_for_menu.js.map +1 -0
  100. package/out-tsc/src/flow/nodes/wait_for_response.js +7 -0
  101. package/out-tsc/src/flow/nodes/wait_for_response.js.map +1 -0
  102. package/out-tsc/src/flow/nodes/wait_for_video.js +7 -0
  103. package/out-tsc/src/flow/nodes/wait_for_video.js.map +1 -0
  104. package/out-tsc/src/flow/types.js +79 -0
  105. package/out-tsc/src/flow/types.js.map +1 -0
  106. package/out-tsc/src/flow/utils.js +65 -0
  107. package/out-tsc/src/flow/utils.js.map +1 -0
  108. package/out-tsc/src/form/ArrayEditor.js +199 -0
  109. package/out-tsc/src/form/ArrayEditor.js.map +1 -0
  110. package/out-tsc/src/form/BaseListEditor.js +128 -0
  111. package/out-tsc/src/form/BaseListEditor.js.map +1 -0
  112. package/out-tsc/src/form/Checkbox.js +17 -2
  113. package/out-tsc/src/form/Checkbox.js.map +1 -1
  114. package/out-tsc/src/form/Completion.js +6 -0
  115. package/out-tsc/src/form/Completion.js.map +1 -1
  116. package/out-tsc/src/form/FormField.js +110 -11
  117. package/out-tsc/src/form/FormField.js.map +1 -1
  118. package/out-tsc/src/form/KeyValueEditor.js +223 -0
  119. package/out-tsc/src/form/KeyValueEditor.js.map +1 -0
  120. package/out-tsc/src/form/select/Select.js +77 -32
  121. package/out-tsc/src/form/select/Select.js.map +1 -1
  122. package/out-tsc/src/interfaces.js +6 -0
  123. package/out-tsc/src/interfaces.js.map +1 -1
  124. package/out-tsc/src/live/ContactChat.js +2 -76
  125. package/out-tsc/src/live/ContactChat.js.map +1 -1
  126. package/out-tsc/temba-modules.js +9 -2
  127. package/out-tsc/temba-modules.js.map +1 -1
  128. package/out-tsc/test/ActionHelper.js +116 -0
  129. package/out-tsc/test/ActionHelper.js.map +1 -0
  130. package/out-tsc/test/actions/add_contact_groups.test.js +66 -0
  131. package/out-tsc/test/actions/add_contact_groups.test.js.map +1 -0
  132. package/out-tsc/test/actions/remove_contact_groups.test.js +226 -0
  133. package/out-tsc/test/actions/remove_contact_groups.test.js.map +1 -0
  134. package/out-tsc/test/actions/send_email.test.js +160 -0
  135. package/out-tsc/test/actions/send_email.test.js.map +1 -0
  136. package/out-tsc/test/actions/send_msg.test.js +95 -0
  137. package/out-tsc/test/actions/send_msg.test.js.map +1 -0
  138. package/out-tsc/test/temba-action-editing-integration.test.js +183 -0
  139. package/out-tsc/test/temba-action-editing-integration.test.js.map +1 -0
  140. package/out-tsc/test/temba-checkbox.test.js +1 -1
  141. package/out-tsc/test/temba-checkbox.test.js.map +1 -1
  142. package/out-tsc/test/temba-field-config.test.js +133 -0
  143. package/out-tsc/test/temba-field-config.test.js.map +1 -0
  144. package/out-tsc/test/temba-flow-editor-node.test.js +14 -14
  145. package/out-tsc/test/temba-flow-editor-node.test.js.map +1 -1
  146. package/out-tsc/test/temba-node-editor.test.js +283 -0
  147. package/out-tsc/test/temba-node-editor.test.js.map +1 -0
  148. package/out-tsc/test/temba-select.test.js +85 -0
  149. package/out-tsc/test/temba-select.test.js.map +1 -1
  150. package/package.json +1 -1
  151. package/screenshots/truth/actions/add_contact_groups/editor/descriptive-group-names.png +0 -0
  152. package/screenshots/truth/actions/add_contact_groups/editor/long-group-names.png +0 -0
  153. package/screenshots/truth/actions/add_contact_groups/editor/many-groups.png +0 -0
  154. package/screenshots/truth/actions/add_contact_groups/editor/multiple-groups.png +0 -0
  155. package/screenshots/truth/actions/add_contact_groups/editor/single-group.png +0 -0
  156. package/screenshots/truth/actions/add_contact_groups/render/descriptive-group-names.png +0 -0
  157. package/screenshots/truth/actions/add_contact_groups/render/long-group-names.png +0 -0
  158. package/screenshots/truth/actions/add_contact_groups/render/many-groups.png +0 -0
  159. package/screenshots/truth/actions/add_contact_groups/render/multiple-groups.png +0 -0
  160. package/screenshots/truth/actions/add_contact_groups/render/single-group.png +0 -0
  161. package/screenshots/truth/actions/remove_contact_groups/editor/cleanup-groups.png +0 -0
  162. package/screenshots/truth/actions/remove_contact_groups/editor/long-descriptive-group-names.png +0 -0
  163. package/screenshots/truth/actions/remove_contact_groups/editor/many-groups.png +0 -0
  164. package/screenshots/truth/actions/remove_contact_groups/editor/multiple-groups.png +0 -0
  165. package/screenshots/truth/actions/remove_contact_groups/editor/remove-from-all-groups.png +0 -0
  166. package/screenshots/truth/actions/remove_contact_groups/editor/single-group.png +0 -0
  167. package/screenshots/truth/actions/remove_contact_groups/render/cleanup-groups.png +0 -0
  168. package/screenshots/truth/actions/remove_contact_groups/render/long-descriptive-group-names.png +0 -0
  169. package/screenshots/truth/actions/remove_contact_groups/render/many-groups.png +0 -0
  170. package/screenshots/truth/actions/remove_contact_groups/render/multiple-groups.png +0 -0
  171. package/screenshots/truth/actions/remove_contact_groups/render/remove-from-all-groups.png +0 -0
  172. package/screenshots/truth/actions/remove_contact_groups/render/single-group.png +0 -0
  173. package/screenshots/truth/actions/send_email/editor/complex-business-email.png +0 -0
  174. package/screenshots/truth/actions/send_email/editor/empty-body.png +0 -0
  175. package/screenshots/truth/actions/send_email/editor/empty-subject.png +0 -0
  176. package/screenshots/truth/actions/send_email/editor/long-subject.png +0 -0
  177. package/screenshots/truth/actions/send_email/editor/multiline-body.png +0 -0
  178. package/screenshots/truth/actions/send_email/editor/multiple-recipients.png +0 -0
  179. package/screenshots/truth/actions/send_email/editor/simple-email.png +0 -0
  180. package/screenshots/truth/actions/send_email/editor/with-expressions.png +0 -0
  181. package/screenshots/truth/actions/send_email/render/complex-business-email.png +0 -0
  182. package/screenshots/truth/actions/send_email/render/empty-body.png +0 -0
  183. package/screenshots/truth/actions/send_email/render/empty-subject.png +0 -0
  184. package/screenshots/truth/actions/send_email/render/long-subject.png +0 -0
  185. package/screenshots/truth/actions/send_email/render/multiline-body.png +0 -0
  186. package/screenshots/truth/actions/send_email/render/multiple-recipients.png +0 -0
  187. package/screenshots/truth/actions/send_email/render/simple-email.png +0 -0
  188. package/screenshots/truth/actions/send_email/render/with-expressions.png +0 -0
  189. package/screenshots/truth/actions/send_msg/editor/long-quick-replies.png +0 -0
  190. package/screenshots/truth/actions/send_msg/editor/multiline-text-with-replies.png +0 -0
  191. package/screenshots/truth/actions/send_msg/editor/simple-text.png +0 -0
  192. package/screenshots/truth/actions/send_msg/editor/text-with-linebreaks.png +0 -0
  193. package/screenshots/truth/actions/send_msg/editor/text-with-many-quick-replies.png +0 -0
  194. package/screenshots/truth/actions/send_msg/editor/text-with-quick-replies.png +0 -0
  195. package/screenshots/truth/actions/send_msg/editor/text-without-quick-replies.png +0 -0
  196. package/screenshots/truth/actions/send_msg/render/long-quick-replies.png +0 -0
  197. package/screenshots/truth/actions/send_msg/render/multiline-text-with-replies.png +0 -0
  198. package/screenshots/truth/actions/send_msg/render/simple-text.png +0 -0
  199. package/screenshots/truth/actions/send_msg/render/text-with-linebreaks.png +0 -0
  200. package/screenshots/truth/actions/send_msg/render/text-with-many-quick-replies.png +0 -0
  201. package/screenshots/truth/actions/send_msg/render/text-with-quick-replies.png +0 -0
  202. package/screenshots/truth/actions/send_msg/render/text-without-quick-replies.png +0 -0
  203. package/screenshots/truth/editor/router.png +0 -0
  204. package/screenshots/truth/editor/send_msg.png +0 -0
  205. package/screenshots/truth/editor/set_contact_language.png +0 -0
  206. package/screenshots/truth/editor/set_contact_name.png +0 -0
  207. package/screenshots/truth/editor/set_run_result.png +0 -0
  208. package/screenshots/truth/editor/wait.png +0 -0
  209. package/screenshots/truth/formfield/markdown-errors.png +0 -0
  210. package/screenshots/truth/formfield/plain-text-errors.png +0 -0
  211. package/screenshots/truth/formfield/widget-only-markdown-errors.png +0 -0
  212. package/screenshots/truth/integration/checkbox-markdown-errors.png +0 -0
  213. package/src/events.ts +1 -40
  214. package/src/flow/{EditorNode.ts → CanvasNode.ts} +424 -48
  215. package/src/flow/Editor.ts +140 -4
  216. package/src/flow/NodeEditor.ts +1443 -0
  217. package/src/flow/Plumber.ts +0 -9
  218. package/src/flow/actions/add_contact_groups.ts +42 -0
  219. package/src/flow/actions/add_contact_urn.ts +17 -0
  220. package/src/flow/actions/add_input_labels.ts +12 -0
  221. package/src/flow/actions/call_classifier.ts +12 -0
  222. package/src/flow/actions/call_llm.ts +12 -0
  223. package/src/flow/actions/call_resthook.ts +12 -0
  224. package/src/flow/actions/call_webhook.ts +133 -0
  225. package/src/flow/actions/enter_flow.ts +15 -0
  226. package/src/flow/actions/open_ticket.ts +12 -0
  227. package/src/flow/actions/play_audio.ts +12 -0
  228. package/src/flow/actions/remove_contact_groups.ts +66 -0
  229. package/src/flow/actions/request_optin.ts +12 -0
  230. package/src/flow/actions/say_msg.ts +12 -0
  231. package/src/flow/actions/send_broadcast.ts +35 -0
  232. package/src/flow/actions/send_email.ts +60 -0
  233. package/src/flow/actions/send_msg.ts +58 -0
  234. package/src/flow/actions/set_contact_channel.ts +13 -0
  235. package/src/flow/actions/set_contact_field.ts +13 -0
  236. package/src/flow/actions/set_contact_language.ts +11 -0
  237. package/src/flow/actions/set_contact_name.ts +11 -0
  238. package/src/flow/actions/set_contact_status.ts +11 -0
  239. package/src/flow/actions/set_run_result.ts +11 -0
  240. package/src/flow/actions/split_by_expression_example.ts +88 -0
  241. package/src/flow/actions/start_session.ts +12 -0
  242. package/src/flow/actions/transfer_airtime.ts +12 -0
  243. package/src/flow/config.ts +93 -232
  244. package/src/flow/nodes/execute_actions.ts +5 -0
  245. package/src/flow/nodes/split_by_airtime.ts +9 -0
  246. package/src/flow/nodes/split_by_contact_field.ts +7 -0
  247. package/src/flow/nodes/split_by_expression.ts +7 -0
  248. package/src/flow/nodes/split_by_groups.ts +7 -0
  249. package/src/flow/nodes/split_by_random.ts +10 -0
  250. package/src/flow/nodes/split_by_run_result.ts +7 -0
  251. package/src/flow/nodes/split_by_scheme.ts +7 -0
  252. package/src/flow/nodes/split_by_subflow.ts +9 -0
  253. package/src/flow/nodes/split_by_webhook.ts +19 -0
  254. package/src/flow/nodes/wait_for_audio.ts +7 -0
  255. package/src/flow/nodes/wait_for_digits.ts +7 -0
  256. package/src/flow/nodes/wait_for_image.ts +7 -0
  257. package/src/flow/nodes/wait_for_location.ts +7 -0
  258. package/src/flow/nodes/wait_for_menu.ts +7 -0
  259. package/src/flow/nodes/wait_for_response.ts +7 -0
  260. package/src/flow/nodes/wait_for_video.ts +7 -0
  261. package/src/flow/types.ts +352 -0
  262. package/src/flow/utils.ts +76 -0
  263. package/src/form/ArrayEditor.ts +240 -0
  264. package/src/form/BaseListEditor.ts +177 -0
  265. package/src/form/Checkbox.ts +22 -3
  266. package/src/form/Completion.ts +6 -0
  267. package/src/form/FormField.ts +115 -11
  268. package/src/form/KeyValueEditor.ts +251 -0
  269. package/src/form/select/Select.ts +89 -32
  270. package/src/interfaces.ts +7 -2
  271. package/src/live/ContactChat.ts +3 -97
  272. package/src/store/flow-definition.d.ts +6 -1
  273. package/static/api/contacts.json +30 -0
  274. package/static/api/groups.json +4 -426
  275. package/static/api/locations.json +24 -0
  276. package/static/api/media.json +5 -0
  277. package/static/api/optins.json +16 -0
  278. package/static/api/orgs.json +13 -0
  279. package/static/api/topics.json +21 -0
  280. package/static/api/users.json +26 -0
  281. package/static/css/temba-components.css +3 -6
  282. package/temba-modules.ts +9 -2
  283. package/test/ActionHelper.ts +142 -0
  284. package/test/actions/add_contact_groups.test.ts +89 -0
  285. package/test/actions/remove_contact_groups.test.ts +265 -0
  286. package/test/actions/send_email.test.ts +214 -0
  287. package/test/actions/send_msg.test.ts +130 -0
  288. package/test/temba-action-editing-integration.test.ts +240 -0
  289. package/test/temba-checkbox.test.ts +1 -1
  290. package/test/temba-field-config.test.ts +152 -0
  291. package/test/temba-flow-editor-node.test.ts +18 -18
  292. package/test/temba-node-editor.test.ts +353 -0
  293. package/test/temba-select.test.ts +127 -0
  294. package/test-assets/contacts/history.json +11 -33
  295. package/web-dev-server.config.mjs +34 -0
  296. package/.github/workflows/coverage.yml +0 -80
  297. package/demo/sticky-note-demo.html +0 -155
  298. package/out-tsc/src/flow/EditorNode.js.map +0 -1
  299. package/out-tsc/src/flow/render.js +0 -358
  300. package/out-tsc/src/flow/render.js.map +0 -1
  301. package/out-tsc/test/temba-flow-render.test.js +0 -794
  302. package/out-tsc/test/temba-flow-render.test.js.map +0 -1
  303. package/src/flow/render.ts +0 -443
  304. package/test/temba-flow-render.test.ts +0 -1003
@@ -0,0 +1,11 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const play_audio = {
4
+ name: 'Play Audio',
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>Play Audio</div>`;
9
+ }
10
+ };
11
+ //# sourceMappingURL=play_audio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"play_audio.js","sourceRoot":"","sources":["../../../../src/flow/actions/play_audio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAW,EAAE,OAAkB,EAAE,EAAE;QAC1C,oEAAoE;QACpE,OAAO,IAAI,CAAA,uBAAuB,CAAC;IACrC,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, PlayAudio } from '../../store/flow-definition';\n\nexport const play_audio: ActionConfig = {\n name: 'Play Audio',\n color: COLORS.send,\n render: (_node: Node, _action: PlayAudio) => {\n // This will need to be implemented based on the actual render logic\n return html`<div>Play Audio</div>`;\n }\n};\n"]}
@@ -0,0 +1,62 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ import { renderNamedObjects } from '../utils';
4
+ export const remove_contact_groups = {
5
+ name: 'Remove from Group',
6
+ color: COLORS.remove,
7
+ render: (_node, action) => {
8
+ if (action.all_groups) {
9
+ return html `<div>Remove from all groups</div>`;
10
+ }
11
+ return html `<div>${renderNamedObjects(action.groups, 'group')}</div>`;
12
+ },
13
+ toFormData: (action) => {
14
+ return {
15
+ uuid: action.uuid,
16
+ all_groups: action.all_groups || false,
17
+ groups: action.groups || []
18
+ };
19
+ },
20
+ form: {
21
+ groups: {
22
+ type: 'select',
23
+ label: 'Groups',
24
+ helpText: 'Select the groups to remove the contact from',
25
+ options: [],
26
+ multi: true,
27
+ searchable: true,
28
+ endpoint: '/api/v2/groups.json',
29
+ valueKey: 'uuid',
30
+ nameKey: 'name',
31
+ placeholder: 'Search for groups...',
32
+ conditions: {
33
+ visible: (formData) => !formData.all_groups
34
+ }
35
+ },
36
+ all_groups: {
37
+ type: 'checkbox',
38
+ label: 'Remove from All Groups',
39
+ helpText: 'Check this to remove the contact from all groups instead of specific ones'
40
+ }
41
+ },
42
+ validate: (action) => {
43
+ const errors = {};
44
+ if (!action.all_groups && (!action.groups || action.groups.length === 0)) {
45
+ errors.groups =
46
+ 'At least one group must be selected or check "Remove from All Groups"';
47
+ }
48
+ return {
49
+ valid: Object.keys(errors).length === 0,
50
+ errors
51
+ };
52
+ },
53
+ fromFormData: (formData) => {
54
+ return {
55
+ uuid: formData.uuid,
56
+ type: 'remove_contact_groups',
57
+ groups: formData.all_groups ? [] : formData.groups || [],
58
+ all_groups: formData.all_groups || false
59
+ };
60
+ }
61
+ };
62
+ //# sourceMappingURL=remove_contact_groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove_contact_groups.js","sourceRoot":"","sources":["../../../../src/flow/actions/remove_contact_groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAoB,MAAM,UAAU,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,CAAC,MAAM,qBAAqB,GAAiB;IACjD,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,MAAM,EAAE,CAAC,KAAW,EAAE,MAAuB,EAAE,EAAE;QAC/C,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YACtB,OAAO,IAAI,CAAA,mCAAmC,CAAC;QACjD,CAAC;QACD,OAAO,IAAI,CAAA,QAAQ,kBAAkB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC;IACxE,CAAC;IACD,UAAU,EAAE,CAAC,MAAuB,EAAE,EAAE;QACtC,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,KAAK;YACtC,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;SAC5B,CAAC;IACJ,CAAC;IACD,IAAI,EAAE;QACJ,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,8CAA8C;YACxD,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,IAAI;YACX,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,qBAAqB;YAC/B,QAAQ,EAAE,MAAM;YAChB,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,sBAAsB;YACnC,UAAU,EAAE;gBACV,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,UAAU;aAC5C;SACF;QACD,UAAU,EAAE;YACV,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,wBAAwB;YAC/B,QAAQ,EACN,2EAA2E;SAC9E;KACF;IACD,QAAQ,EAAE,CAAC,MAAuB,EAAoB,EAAE;QACtD,MAAM,MAAM,GAA8B,EAAE,CAAC;QAE7C,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;YACzE,MAAM,CAAC,MAAM;gBACX,uEAAuE,CAAC;QAC5E,CAAC;QAED,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC;YACvC,MAAM;SACP,CAAC;IACJ,CAAC;IACD,YAAY,EAAE,CAAC,QAAa,EAAmB,EAAE;QAC/C,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,IAAI,EAAE,uBAAuB;YAC7B,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,IAAI,EAAE;YACxD,UAAU,EAAE,QAAQ,CAAC,UAAU,IAAI,KAAK;SACzC,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS, ValidationResult } from '../types';\nimport { Node, RemoveFromGroup } from '../../store/flow-definition';\nimport { renderNamedObjects } from '../utils';\n\nexport const remove_contact_groups: ActionConfig = {\n name: 'Remove from Group',\n color: COLORS.remove,\n render: (_node: Node, action: RemoveFromGroup) => {\n if (action.all_groups) {\n return html`<div>Remove from all groups</div>`;\n }\n return html`<div>${renderNamedObjects(action.groups, 'group')}</div>`;\n },\n toFormData: (action: RemoveFromGroup) => {\n return {\n uuid: action.uuid,\n all_groups: action.all_groups || false,\n groups: action.groups || []\n };\n },\n form: {\n groups: {\n type: 'select',\n label: 'Groups',\n helpText: 'Select the groups to remove the contact from',\n options: [],\n multi: true,\n searchable: true,\n endpoint: '/api/v2/groups.json',\n valueKey: 'uuid',\n nameKey: 'name',\n placeholder: 'Search for groups...',\n conditions: {\n visible: (formData) => !formData.all_groups\n }\n },\n all_groups: {\n type: 'checkbox',\n label: 'Remove from All Groups',\n helpText:\n 'Check this to remove the contact from all groups instead of specific ones'\n }\n },\n validate: (action: RemoveFromGroup): ValidationResult => {\n const errors: { [key: string]: string } = {};\n\n if (!action.all_groups && (!action.groups || action.groups.length === 0)) {\n errors.groups =\n 'At least one group must be selected or check \"Remove from All Groups\"';\n }\n\n return {\n valid: Object.keys(errors).length === 0,\n errors\n };\n },\n fromFormData: (formData: any): RemoveFromGroup => {\n return {\n uuid: formData.uuid,\n type: 'remove_contact_groups',\n groups: formData.all_groups ? [] : formData.groups || [],\n all_groups: formData.all_groups || false\n };\n }\n};\n"]}
@@ -0,0 +1,11 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const request_optin = {
4
+ name: 'Request Opt-in',
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>Request Opt-in</div>`;
9
+ }
10
+ };
11
+ //# sourceMappingURL=request_optin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request_optin.js","sourceRoot":"","sources":["../../../../src/flow/actions/request_optin.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,gBAAgB;IACtB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAW,EAAE,OAAqB,EAAE,EAAE;QAC7C,oEAAoE;QACpE,OAAO,IAAI,CAAA,2BAA2B,CAAC;IACzC,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, RequestOptin } from '../../store/flow-definition';\n\nexport const request_optin: ActionConfig = {\n name: 'Request Opt-in',\n color: COLORS.send,\n render: (_node: Node, _action: RequestOptin) => {\n // This will need to be implemented based on the actual render logic\n return html`<div>Request Opt-in</div>`;\n }\n};\n"]}
@@ -0,0 +1,11 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const say_msg = {
4
+ name: 'Say Message',
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>Say Message</div>`;
9
+ }
10
+ };
11
+ //# sourceMappingURL=say_msg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"say_msg.js","sourceRoot":"","sources":["../../../../src/flow/actions/say_msg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,OAAO,GAAiB;IACnC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAW,EAAE,OAAe,EAAE,EAAE;QACvC,oEAAoE;QACpE,OAAO,IAAI,CAAA,wBAAwB,CAAC;IACtC,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, SayMsg } from '../../store/flow-definition';\n\nexport const say_msg: ActionConfig = {\n name: 'Say Message',\n color: COLORS.send,\n render: (_node: Node, _action: SayMsg) => {\n // This will need to be implemented based on the actual render logic\n return html`<div>Say Message</div>`;\n }\n};\n"]}
@@ -0,0 +1,33 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ import { renderNamedObjects } from '../utils';
4
+ export const send_broadcast = {
5
+ name: 'Send Broadcast',
6
+ color: COLORS.broadcast,
7
+ render: (_node, action) => {
8
+ const hasGroups = action.groups && action.groups.length > 0;
9
+ const hasContacts = action.contacts && action.contacts.length > 0;
10
+ return html `<div>
11
+ <div
12
+ style="word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; margin-bottom: 0.5em"
13
+ >
14
+ ${action.text}
15
+ </div>
16
+ ${hasGroups
17
+ ? html `<div style="margin-bottom: 0.25em">
18
+ <div style="font-weight: bold; margin-bottom: 0.25em">Groups:</div>
19
+ ${renderNamedObjects(action.groups, 'group')}
20
+ </div>`
21
+ : null}
22
+ ${hasContacts
23
+ ? html `<div>
24
+ <div style="font-weight: bold; margin-bottom: 0.25em">
25
+ Contacts:
26
+ </div>
27
+ ${renderNamedObjects(action.contacts, 'contact')}
28
+ </div>`
29
+ : null}
30
+ </div>`;
31
+ }
32
+ };
33
+ //# sourceMappingURL=send_broadcast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send_broadcast.js","sourceRoot":"","sources":["../../../../src/flow/actions/send_broadcast.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,MAAM,CAAC,SAAS;IACvB,MAAM,EAAE,CAAC,KAAW,EAAE,MAAqB,EAAE,EAAE;QAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QAC5D,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QAElE,OAAO,IAAI,CAAA;;;;UAIL,MAAM,CAAC,IAAI;;QAEb,SAAS;YACT,CAAC,CAAC,IAAI,CAAA;;cAEA,kBAAkB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;iBACvC;YACT,CAAC,CAAC,IAAI;QACN,WAAW;YACX,CAAC,CAAC,IAAI,CAAA;;;;cAIA,kBAAkB,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC;iBAC3C;YACT,CAAC,CAAC,IAAI;WACH,CAAC;IACV,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, SendBroadcast } from '../../store/flow-definition';\nimport { renderNamedObjects } from '../utils';\n\nexport const send_broadcast: ActionConfig = {\n name: 'Send Broadcast',\n color: COLORS.broadcast,\n render: (_node: Node, action: SendBroadcast) => {\n const hasGroups = action.groups && action.groups.length > 0;\n const hasContacts = action.contacts && action.contacts.length > 0;\n\n return html`<div>\n <div\n style=\"word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; margin-bottom: 0.5em\"\n >\n ${action.text}\n </div>\n ${hasGroups\n ? html`<div style=\"margin-bottom: 0.25em\">\n <div style=\"font-weight: bold; margin-bottom: 0.25em\">Groups:</div>\n ${renderNamedObjects(action.groups, 'group')}\n </div>`\n : null}\n ${hasContacts\n ? html`<div>\n <div style=\"font-weight: bold; margin-bottom: 0.25em\">\n Contacts:\n </div>\n ${renderNamedObjects(action.contacts, 'contact')}\n </div>`\n : null}\n </div>`;\n }\n};\n"]}
@@ -0,0 +1,56 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ import { renderStringList } from '../utils';
4
+ import { Icon } from '../../Icons';
5
+ export const send_email = {
6
+ name: 'Send Email',
7
+ color: COLORS.send,
8
+ render: (_node, action) => {
9
+ return html `<div>
10
+ <div>${renderStringList(action.addresses, Icon.email)}</div>
11
+ <div style="margin-top: 0.5em">
12
+ <div
13
+ style="word-wrap: break-word; overflow-wrap: break-word; hyphens: auto;"
14
+ >
15
+ ${action.subject}
16
+ </div>
17
+ </div>
18
+ </div>`;
19
+ },
20
+ form: {
21
+ addresses: {
22
+ type: 'select',
23
+ label: 'Recipients',
24
+ options: [],
25
+ multi: true,
26
+ searchable: true,
27
+ placeholder: 'Search for contacts...',
28
+ emails: true
29
+ },
30
+ subject: {
31
+ type: 'text',
32
+ label: 'Subject',
33
+ required: true,
34
+ placeholder: 'Enter email subject',
35
+ maxLength: 255
36
+ },
37
+ body: {
38
+ type: 'textarea',
39
+ required: true,
40
+ evaluated: true,
41
+ rows: 4,
42
+ minHeight: 75
43
+ }
44
+ },
45
+ validate: (action) => {
46
+ const errors = {};
47
+ if (!action.addresses || action.addresses.length === 0) {
48
+ errors.addresses = 'At least one recipient email address is required';
49
+ }
50
+ return {
51
+ valid: Object.keys(errors).length === 0,
52
+ errors
53
+ };
54
+ }
55
+ };
56
+ //# sourceMappingURL=send_email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send_email.js","sourceRoot":"","sources":["../../../../src/flow/actions/send_email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAoB,MAAM,UAAU,CAAC;AAElE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAW,EAAE,MAAiB,EAAE,EAAE;QACzC,OAAO,IAAI,CAAA;aACF,gBAAgB,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC;;;;;YAK/C,MAAM,CAAC,OAAO;;;WAGf,CAAC;IACV,CAAC;IAED,IAAI,EAAE;QACJ,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,IAAI;YACX,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,wBAAwB;YACrC,MAAM,EAAE,IAAI;SACb;QACD,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,qBAAqB;YAClC,SAAS,EAAE,GAAG;SACf;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,IAAI;YACf,IAAI,EAAE,CAAC;YACP,SAAS,EAAE,EAAE;SACd;KACF;IACD,QAAQ,EAAE,CAAC,MAAiB,EAAoB,EAAE;QAChD,MAAM,MAAM,GAA8B,EAAE,CAAC;QAE7C,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvD,MAAM,CAAC,SAAS,GAAG,kDAAkD,CAAC;QACxE,CAAC;QAED,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC;YACvC,MAAM;SACP,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS, ValidationResult } from '../types';\nimport { Node, SendEmail } from '../../store/flow-definition';\nimport { renderStringList } from '../utils';\nimport { Icon } from '../../Icons';\n\nexport const send_email: ActionConfig = {\n name: 'Send Email',\n color: COLORS.send,\n render: (_node: Node, action: SendEmail) => {\n return html`<div>\n <div>${renderStringList(action.addresses, Icon.email)}</div>\n <div style=\"margin-top: 0.5em\">\n <div\n style=\"word-wrap: break-word; overflow-wrap: break-word; hyphens: auto;\"\n >\n ${action.subject}\n </div>\n </div>\n </div>`;\n },\n\n form: {\n addresses: {\n type: 'select',\n label: 'Recipients',\n options: [],\n multi: true,\n searchable: true,\n placeholder: 'Search for contacts...',\n emails: true\n },\n subject: {\n type: 'text',\n label: 'Subject',\n required: true,\n placeholder: 'Enter email subject',\n maxLength: 255\n },\n body: {\n type: 'textarea',\n required: true,\n evaluated: true,\n rows: 4,\n minHeight: 75\n }\n },\n validate: (action: SendEmail): ValidationResult => {\n const errors: { [key: string]: string } = {};\n\n if (!action.addresses || action.addresses.length === 0) {\n errors.addresses = 'At least one recipient email address is required';\n }\n\n return {\n valid: Object.keys(errors).length === 0,\n errors\n };\n }\n};\n"]}
@@ -0,0 +1,55 @@
1
+ import { html } from 'lit-html';
2
+ import { unsafeHTML } from 'lit-html/directives/unsafe-html.js';
3
+ import { COLORS } from '../types';
4
+ export const send_msg = {
5
+ name: 'Send Message',
6
+ color: COLORS.send,
7
+ render: (_node, action) => {
8
+ var _a;
9
+ const text = action.text.replace(/\n/g, '<br>');
10
+ return html `
11
+ ${unsafeHTML(text)}
12
+ ${((_a = action.quick_replies) === null || _a === void 0 ? void 0 : _a.length) > 0
13
+ ? html `<div class="quick-replies">
14
+ ${action.quick_replies.map((reply) => {
15
+ return html `<div class="quick-reply">${reply}</div>`;
16
+ })}
17
+ </div>`
18
+ : null}
19
+ `;
20
+ },
21
+ form: {
22
+ text: {
23
+ type: 'textarea',
24
+ label: 'Message Text',
25
+ helpText: 'Enter the message to send. You can use expressions like @contact.name',
26
+ required: true,
27
+ evaluated: true,
28
+ rows: 5,
29
+ minHeight: 75
30
+ },
31
+ quick_replies: {
32
+ type: 'select',
33
+ label: 'Quick Replies',
34
+ helpText: 'Add quick reply options for this message',
35
+ options: [],
36
+ multi: true,
37
+ tags: true,
38
+ searchable: true,
39
+ placeholder: 'Add quick replies...',
40
+ maxItems: 10,
41
+ evaluated: true
42
+ }
43
+ },
44
+ validate: (action) => {
45
+ const errors = {};
46
+ if (!action.text || action.text.trim() === '') {
47
+ errors.text = 'Message text is required';
48
+ }
49
+ return {
50
+ valid: Object.keys(errors).length === 0,
51
+ errors
52
+ };
53
+ }
54
+ };
55
+ //# sourceMappingURL=send_msg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"send_msg.js","sourceRoot":"","sources":["../../../../src/flow/actions/send_msg.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAgB,MAAM,EAAoB,MAAM,UAAU,CAAC;AAGlE,MAAM,CAAC,MAAM,QAAQ,GAAiB;IACpC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAW,EAAE,MAAe,EAAE,EAAE;;QACvC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAChD,OAAO,IAAI,CAAA;QACP,UAAU,CAAC,IAAI,CAAC;QAChB,CAAA,MAAA,MAAM,CAAC,aAAa,0CAAE,MAAM,IAAG,CAAC;YAChC,CAAC,CAAC,IAAI,CAAA;cACA,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACnC,OAAO,IAAI,CAAA,4BAA4B,KAAK,QAAQ,CAAC;YACvD,CAAC,CAAC;iBACG;YACT,CAAC,CAAC,IAAI;KACT,CAAC;IACJ,CAAC;IACD,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,cAAc;YACrB,QAAQ,EACN,uEAAuE;YACzE,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,IAAI;YACf,IAAI,EAAE,CAAC;YACP,SAAS,EAAE,EAAE;SACd;QACD,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,eAAe;YACtB,QAAQ,EAAE,0CAA0C;YACpD,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,EAAE;YACZ,SAAS,EAAE,IAAI;SAChB;KACF;IACD,QAAQ,EAAE,CAAC,MAAe,EAAoB,EAAE;QAC9C,MAAM,MAAM,GAA8B,EAAE,CAAC;QAE7C,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAC9C,MAAM,CAAC,IAAI,GAAG,0BAA0B,CAAC;QAC3C,CAAC;QAED,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC;YACvC,MAAM;SACP,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport { ActionConfig, COLORS, ValidationResult } from '../types';\nimport { Node, SendMsg } from '../../store/flow-definition';\n\nexport const send_msg: ActionConfig = {\n name: 'Send Message',\n color: COLORS.send,\n render: (_node: Node, action: SendMsg) => {\n const text = action.text.replace(/\\n/g, '<br>');\n return html`\n ${unsafeHTML(text)}\n ${action.quick_replies?.length > 0\n ? html`<div class=\"quick-replies\">\n ${action.quick_replies.map((reply) => {\n return html`<div class=\"quick-reply\">${reply}</div>`;\n })}\n </div>`\n : null}\n `;\n },\n form: {\n text: {\n type: 'textarea',\n label: 'Message Text',\n helpText:\n 'Enter the message to send. You can use expressions like @contact.name',\n required: true,\n evaluated: true,\n rows: 5,\n minHeight: 75\n },\n quick_replies: {\n type: 'select',\n label: 'Quick Replies',\n helpText: 'Add quick reply options for this message',\n options: [],\n multi: true,\n tags: true,\n searchable: true,\n placeholder: 'Add quick replies...',\n maxItems: 10,\n evaluated: true\n }\n },\n validate: (action: SendMsg): ValidationResult => {\n const errors: { [key: string]: string } = {};\n\n if (!action.text || action.text.trim() === '') {\n errors.text = 'Message text is required';\n }\n\n return {\n valid: Object.keys(errors).length === 0,\n errors\n };\n }\n};\n"]}
@@ -0,0 +1,12 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const set_contact_channel = {
4
+ name: 'Update Contact Channel',
5
+ color: COLORS.update,
6
+ render: (_node, action) => {
7
+ return html `<div>
8
+ Set contact channel to <b>${action.channel.name}</b>
9
+ </div>`;
10
+ }
11
+ };
12
+ //# sourceMappingURL=set_contact_channel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set_contact_channel.js","sourceRoot":"","sources":["../../../../src/flow/actions/set_contact_channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,mBAAmB,GAAiB;IAC/C,IAAI,EAAE,wBAAwB;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,MAAM,EAAE,CAAC,KAAW,EAAE,MAAyB,EAAE,EAAE;QACjD,OAAO,IAAI,CAAA;kCACmB,MAAM,CAAC,OAAO,CAAC,IAAI;WAC1C,CAAC;IACV,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, SetContactChannel } from '../../store/flow-definition';\n\nexport const set_contact_channel: ActionConfig = {\n name: 'Update Contact Channel',\n color: COLORS.update,\n render: (_node: Node, action: SetContactChannel) => {\n return html`<div>\n Set contact channel to <b>${action.channel.name}</b>\n </div>`;\n }\n};\n"]}
@@ -0,0 +1,12 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const set_contact_field = {
4
+ name: 'Update Contact Field',
5
+ color: COLORS.update,
6
+ render: (_node, action) => {
7
+ return html `<div>
8
+ Set <b>${action.field.name}</b> to <b>${action.value}</b>
9
+ </div>`;
10
+ }
11
+ };
12
+ //# sourceMappingURL=set_contact_field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set_contact_field.js","sourceRoot":"","sources":["../../../../src/flow/actions/set_contact_field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,iBAAiB,GAAiB;IAC7C,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,MAAM,EAAE,CAAC,KAAW,EAAE,MAAuB,EAAE,EAAE;QAC/C,OAAO,IAAI,CAAA;eACA,MAAM,CAAC,KAAK,CAAC,IAAI,cAAc,MAAM,CAAC,KAAK;WAC/C,CAAC;IACV,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, SetContactField } from '../../store/flow-definition';\n\nexport const set_contact_field: ActionConfig = {\n name: 'Update Contact Field',\n color: COLORS.update,\n render: (_node: Node, action: SetContactField) => {\n return html`<div>\n Set <b>${action.field.name}</b> to <b>${action.value}</b>\n </div>`;\n }\n};\n"]}
@@ -0,0 +1,10 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const set_contact_language = {
4
+ name: 'Update Contact Language',
5
+ color: COLORS.update,
6
+ render: (_node, action) => {
7
+ return html `<div>Set contact language to <b>${action.language}</b></div>`;
8
+ }
9
+ };
10
+ //# sourceMappingURL=set_contact_language.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set_contact_language.js","sourceRoot":"","sources":["../../../../src/flow/actions/set_contact_language.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,oBAAoB,GAAiB;IAChD,IAAI,EAAE,yBAAyB;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,MAAM,EAAE,CAAC,KAAW,EAAE,MAA0B,EAAE,EAAE;QAClD,OAAO,IAAI,CAAA,mCAAmC,MAAM,CAAC,QAAQ,YAAY,CAAC;IAC5E,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, SetContactLanguage } from '../../store/flow-definition';\n\nexport const set_contact_language: ActionConfig = {\n name: 'Update Contact Language',\n color: COLORS.update,\n render: (_node: Node, action: SetContactLanguage) => {\n return html`<div>Set contact language to <b>${action.language}</b></div>`;\n }\n};\n"]}
@@ -0,0 +1,10 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const set_contact_name = {
4
+ name: 'Update Contact',
5
+ color: COLORS.update,
6
+ render: (_node, action) => {
7
+ return html `<div>Set contact name to <b>${action.name}</b></div>`;
8
+ }
9
+ };
10
+ //# sourceMappingURL=set_contact_name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set_contact_name.js","sourceRoot":"","sources":["../../../../src/flow/actions/set_contact_name.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,gBAAgB;IACtB,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,MAAM,EAAE,CAAC,KAAW,EAAE,MAAsB,EAAE,EAAE;QAC9C,OAAO,IAAI,CAAA,+BAA+B,MAAM,CAAC,IAAI,YAAY,CAAC;IACpE,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, SetContactName } from '../../store/flow-definition';\n\nexport const set_contact_name: ActionConfig = {\n name: 'Update Contact',\n color: COLORS.update,\n render: (_node: Node, action: SetContactName) => {\n return html`<div>Set contact name to <b>${action.name}</b></div>`;\n }\n};\n"]}
@@ -0,0 +1,10 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const set_contact_status = {
4
+ name: 'Update Contact Status',
5
+ color: COLORS.update,
6
+ render: (_node, action) => {
7
+ return html `<div>Set contact status to <b>${action.status}</b></div>`;
8
+ }
9
+ };
10
+ //# sourceMappingURL=set_contact_status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set_contact_status.js","sourceRoot":"","sources":["../../../../src/flow/actions/set_contact_status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C,IAAI,EAAE,uBAAuB;IAC7B,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,MAAM,EAAE,CAAC,KAAW,EAAE,MAAwB,EAAE,EAAE;QAChD,OAAO,IAAI,CAAA,iCAAiC,MAAM,CAAC,MAAM,YAAY,CAAC;IACxE,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, SetContactStatus } from '../../store/flow-definition';\n\nexport const set_contact_status: ActionConfig = {\n name: 'Update Contact Status',\n color: COLORS.update,\n render: (_node: Node, action: SetContactStatus) => {\n return html`<div>Set contact status to <b>${action.status}</b></div>`;\n }\n};\n"]}
@@ -0,0 +1,10 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const set_run_result = {
4
+ name: 'Save Flow Result',
5
+ color: COLORS.save,
6
+ render: (_node, action) => {
7
+ return html `<div>Save ${action.value} as <b>${action.name}</b></div>`;
8
+ }
9
+ };
10
+ //# sourceMappingURL=set_run_result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set_run_result.js","sourceRoot":"","sources":["../../../../src/flow/actions/set_run_result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,MAAM,CAAC,IAAI;IAClB,MAAM,EAAE,CAAC,KAAW,EAAE,MAAoB,EAAE,EAAE;QAC5C,OAAO,IAAI,CAAA,aAAa,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAI,YAAY,CAAC;IACxE,CAAC;CACF,CAAC","sourcesContent":["import { html } from 'lit-html';\nimport { ActionConfig, COLORS } from '../types';\nimport { Node, SetRunResult } from '../../store/flow-definition';\n\nexport const set_run_result: ActionConfig = {\n name: 'Save Flow Result',\n color: COLORS.save,\n render: (_node: Node, action: SetRunResult) => {\n return html`<div>Save ${action.value} as <b>${action.name}</b></div>`;\n }\n};\n"]}
@@ -0,0 +1,77 @@
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', label: 'contains' },
38
+ { value: 'equals', label: 'equals' },
39
+ { value: 'starts_with', label: 'starts with' },
40
+ { value: 'regex', label: '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
@@ -0,0 +1 @@
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,KAAK,EAAE,UAAU,EAAE;wBACxC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;wBACpC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;wBAC9C,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;qBACnC;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', label: 'contains' },\n { value: 'equals', label: 'equals' },\n { value: 'starts_with', label: 'starts with' },\n { value: 'regex', label: '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"]}
@@ -0,0 +1,11 @@
1
+ import { html } from 'lit-html';
2
+ import { COLORS } from '../types';
3
+ export const start_session = {
4
+ name: 'Start Session',
5
+ color: COLORS.execute,
6
+ render: (_node, _action) => {
7
+ // This will need to be implemented based on the actual render logic
8
+ return html `<div>Start Session</div>`;
9
+ }
10
+ };
11
+ //# sourceMappingURL=start_session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start_session.js","sourceRoot":"","sources":["../../../../src/flow/actions/start_session.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,OAAO;IACrB,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, StartSession } from '../../store/flow-definition';\n\nexport const start_session: ActionConfig = {\n name: 'Start Session',\n color: COLORS.execute,\n render: (_node: Node, _action: StartSession) => {\n // This will need to be implemented based on the actual render logic\n return html`<div>Start Session</div>`;\n }\n};\n"]}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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"]}