@nyaruka/temba-components 0.129.7 → 0.129.9

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 (269) hide show
  1. package/.devcontainer/Dockerfile +11 -4
  2. package/.devcontainer/devcontainer.json +3 -2
  3. package/.github/workflows/build.yml +4 -14
  4. package/CHANGELOG.md +29 -0
  5. package/demo/components/flow/example.html +1 -1
  6. package/demo/components/message-editor/example.html +125 -0
  7. package/demo/components/textinput/completion.html +1 -0
  8. package/demo/data/flows/food-order.json +12 -21
  9. package/demo/data/flows/sample-flow.json +210 -104
  10. package/dist/temba-components.js +715 -364
  11. package/dist/temba-components.js.map +1 -1
  12. package/out-tsc/src/display/Thumbnail.js +2 -1
  13. package/out-tsc/src/display/Thumbnail.js.map +1 -1
  14. package/out-tsc/src/events.js.map +1 -1
  15. package/out-tsc/src/excellent/helpers.js +2 -2
  16. package/out-tsc/src/excellent/helpers.js.map +1 -1
  17. package/out-tsc/src/flow/CanvasNode.js +25 -7
  18. package/out-tsc/src/flow/CanvasNode.js.map +1 -1
  19. package/out-tsc/src/flow/Editor.js +11 -1
  20. package/out-tsc/src/flow/Editor.js.map +1 -1
  21. package/out-tsc/src/flow/NodeEditor.js +342 -276
  22. package/out-tsc/src/flow/NodeEditor.js.map +1 -1
  23. package/out-tsc/src/flow/actions/add_input_labels.js +40 -0
  24. package/out-tsc/src/flow/actions/add_input_labels.js.map +1 -1
  25. package/out-tsc/src/flow/actions/call_llm.js +56 -3
  26. package/out-tsc/src/flow/actions/call_llm.js.map +1 -1
  27. package/out-tsc/src/flow/actions/call_webhook.js +26 -17
  28. package/out-tsc/src/flow/actions/call_webhook.js.map +1 -1
  29. package/out-tsc/src/flow/actions/open_ticket.js +65 -3
  30. package/out-tsc/src/flow/actions/open_ticket.js.map +1 -1
  31. package/out-tsc/src/flow/actions/send_msg.js +147 -6
  32. package/out-tsc/src/flow/actions/send_msg.js.map +1 -1
  33. package/out-tsc/src/flow/actions/set_run_result.js +75 -0
  34. package/out-tsc/src/flow/actions/set_run_result.js.map +1 -1
  35. package/out-tsc/src/flow/config.js +4 -0
  36. package/out-tsc/src/flow/config.js.map +1 -1
  37. package/out-tsc/src/flow/nodes/split_by_llm_categorize.js +227 -0
  38. package/out-tsc/src/flow/nodes/split_by_llm_categorize.js.map +1 -0
  39. package/out-tsc/src/flow/nodes/split_by_ticket.js +18 -0
  40. package/out-tsc/src/flow/nodes/split_by_ticket.js.map +1 -0
  41. package/out-tsc/src/flow/nodes/wait_for_response.js +27 -1
  42. package/out-tsc/src/flow/nodes/wait_for_response.js.map +1 -1
  43. package/out-tsc/src/flow/types.js +0 -65
  44. package/out-tsc/src/flow/types.js.map +1 -1
  45. package/out-tsc/src/form/ArrayEditor.js +87 -57
  46. package/out-tsc/src/form/ArrayEditor.js.map +1 -1
  47. package/out-tsc/src/form/BaseListEditor.js +19 -4
  48. package/out-tsc/src/form/BaseListEditor.js.map +1 -1
  49. package/out-tsc/src/form/FieldRenderer.js +305 -0
  50. package/out-tsc/src/form/FieldRenderer.js.map +1 -0
  51. package/out-tsc/src/form/FormField.js +4 -4
  52. package/out-tsc/src/form/FormField.js.map +1 -1
  53. package/out-tsc/src/form/KeyValueEditor.js +1 -1
  54. package/out-tsc/src/form/KeyValueEditor.js.map +1 -1
  55. package/out-tsc/src/form/MediaPicker.js +13 -1
  56. package/out-tsc/src/form/MediaPicker.js.map +1 -1
  57. package/out-tsc/src/form/MessageEditor.js +422 -0
  58. package/out-tsc/src/form/MessageEditor.js.map +1 -0
  59. package/out-tsc/src/form/TextInput.js +13 -6
  60. package/out-tsc/src/form/TextInput.js.map +1 -1
  61. package/out-tsc/src/form/select/Select.js +52 -24
  62. package/out-tsc/src/form/select/Select.js.map +1 -1
  63. package/out-tsc/src/live/ContactChat.js +66 -15
  64. package/out-tsc/src/live/ContactChat.js.map +1 -1
  65. package/out-tsc/src/markdown.js +13 -11
  66. package/out-tsc/src/markdown.js.map +1 -1
  67. package/out-tsc/temba-modules.js +2 -0
  68. package/out-tsc/temba-modules.js.map +1 -1
  69. package/out-tsc/test/ActionHelper.js +2 -0
  70. package/out-tsc/test/ActionHelper.js.map +1 -1
  71. package/out-tsc/test/NodeHelper.js +148 -0
  72. package/out-tsc/test/NodeHelper.js.map +1 -0
  73. package/out-tsc/test/actions/call_llm.test.js +103 -0
  74. package/out-tsc/test/actions/call_llm.test.js.map +1 -0
  75. package/out-tsc/test/nodes/split_by_llm_categorize.test.js +532 -0
  76. package/out-tsc/test/nodes/split_by_llm_categorize.test.js.map +1 -0
  77. package/out-tsc/test/nodes/split_by_random.test.js +150 -0
  78. package/out-tsc/test/nodes/split_by_random.test.js.map +1 -0
  79. package/out-tsc/test/nodes/wait_for_digits.test.js +150 -0
  80. package/out-tsc/test/nodes/wait_for_digits.test.js.map +1 -0
  81. package/out-tsc/test/nodes/wait_for_response.test.js +171 -0
  82. package/out-tsc/test/nodes/wait_for_response.test.js.map +1 -0
  83. package/out-tsc/test/temba-add-input-labels.test.js +70 -0
  84. package/out-tsc/test/temba-add-input-labels.test.js.map +1 -0
  85. package/out-tsc/test/temba-field-config.test.js +4 -2
  86. package/out-tsc/test/temba-field-config.test.js.map +1 -1
  87. package/out-tsc/test/temba-field-renderer.test.js +296 -0
  88. package/out-tsc/test/temba-field-renderer.test.js.map +1 -0
  89. package/out-tsc/test/temba-markdown.test.js +1 -1
  90. package/out-tsc/test/temba-markdown.test.js.map +1 -1
  91. package/out-tsc/test/temba-message-editor.test.js +194 -0
  92. package/out-tsc/test/temba-message-editor.test.js.map +1 -0
  93. package/out-tsc/test/temba-node-editor.test.js +471 -0
  94. package/out-tsc/test/temba-node-editor.test.js.map +1 -1
  95. package/out-tsc/test/temba-select.test.js +7 -4
  96. package/out-tsc/test/temba-select.test.js.map +1 -1
  97. package/out-tsc/test/temba-textinput.test.js +16 -0
  98. package/out-tsc/test/temba-textinput.test.js.map +1 -1
  99. package/out-tsc/test/temba-webchat.test.js +5 -1
  100. package/out-tsc/test/temba-webchat.test.js.map +1 -1
  101. package/out-tsc/test/utils.test.js +2 -8
  102. package/out-tsc/test/utils.test.js.map +1 -1
  103. package/package.json +7 -4
  104. package/screenshots/truth/actions/add_contact_groups/editor/descriptive-group-names.png +0 -0
  105. package/screenshots/truth/actions/add_contact_groups/editor/long-group-names.png +0 -0
  106. package/screenshots/truth/actions/add_contact_groups/editor/many-groups.png +0 -0
  107. package/screenshots/truth/actions/add_contact_groups/editor/multiple-groups.png +0 -0
  108. package/screenshots/truth/actions/add_contact_groups/editor/single-group.png +0 -0
  109. package/screenshots/truth/actions/call_llm/editor/information-extraction.png +0 -0
  110. package/screenshots/truth/actions/call_llm/editor/sentiment-analysis.png +0 -0
  111. package/screenshots/truth/actions/call_llm/editor/summarization.png +0 -0
  112. package/screenshots/truth/actions/call_llm/editor/translation-task.png +0 -0
  113. package/screenshots/truth/actions/call_llm/render/information-extraction.png +0 -0
  114. package/screenshots/truth/actions/call_llm/render/sentiment-analysis.png +0 -0
  115. package/screenshots/truth/actions/call_llm/render/summarization.png +0 -0
  116. package/screenshots/truth/actions/call_llm/render/translation-task.png +0 -0
  117. package/screenshots/truth/actions/remove_contact_groups/editor/cleanup-groups.png +0 -0
  118. package/screenshots/truth/actions/remove_contact_groups/editor/long-descriptive-group-names.png +0 -0
  119. package/screenshots/truth/actions/remove_contact_groups/editor/many-groups.png +0 -0
  120. package/screenshots/truth/actions/remove_contact_groups/editor/multiple-groups.png +0 -0
  121. package/screenshots/truth/actions/remove_contact_groups/editor/remove-from-all-groups.png +0 -0
  122. package/screenshots/truth/actions/remove_contact_groups/editor/single-group.png +0 -0
  123. package/screenshots/truth/actions/send_email/editor/complex-business-email.png +0 -0
  124. package/screenshots/truth/actions/send_email/editor/empty-body.png +0 -0
  125. package/screenshots/truth/actions/send_email/editor/empty-subject.png +0 -0
  126. package/screenshots/truth/actions/send_email/editor/long-subject.png +0 -0
  127. package/screenshots/truth/actions/send_email/editor/multiline-body.png +0 -0
  128. package/screenshots/truth/actions/send_email/editor/multiple-recipients.png +0 -0
  129. package/screenshots/truth/actions/send_email/editor/simple-email.png +0 -0
  130. package/screenshots/truth/actions/send_email/editor/with-expressions.png +0 -0
  131. package/screenshots/truth/actions/send_msg/editor/long-quick-replies.png +0 -0
  132. package/screenshots/truth/actions/send_msg/editor/multiline-text-with-replies.png +0 -0
  133. package/screenshots/truth/actions/send_msg/editor/simple-text.png +0 -0
  134. package/screenshots/truth/actions/send_msg/editor/text-with-linebreaks.png +0 -0
  135. package/screenshots/truth/actions/send_msg/editor/text-with-many-quick-replies.png +0 -0
  136. package/screenshots/truth/actions/send_msg/editor/text-with-quick-replies.png +0 -0
  137. package/screenshots/truth/actions/send_msg/editor/text-without-quick-replies.png +0 -0
  138. package/screenshots/truth/editor/router.png +0 -0
  139. package/screenshots/truth/editor/send_msg.png +0 -0
  140. package/screenshots/truth/editor/set_contact_language.png +0 -0
  141. package/screenshots/truth/editor/set_contact_name.png +0 -0
  142. package/screenshots/truth/editor/set_run_result.png +0 -0
  143. package/screenshots/truth/editor/wait.png +0 -0
  144. package/screenshots/truth/field-renderer/checkbox-checked.png +0 -0
  145. package/screenshots/truth/field-renderer/checkbox-unchecked.png +0 -0
  146. package/screenshots/truth/field-renderer/checkbox-with-errors.png +0 -0
  147. package/screenshots/truth/field-renderer/context-comparison.png +0 -0
  148. package/screenshots/truth/field-renderer/key-value-with-label.png +0 -0
  149. package/screenshots/truth/field-renderer/message-editor-with-label.png +0 -0
  150. package/screenshots/truth/field-renderer/select-multi.png +0 -0
  151. package/screenshots/truth/field-renderer/select-no-label.png +0 -0
  152. package/screenshots/truth/field-renderer/select-with-label.png +0 -0
  153. package/screenshots/truth/field-renderer/text-evaluated.png +0 -0
  154. package/screenshots/truth/field-renderer/text-no-label.png +0 -0
  155. package/screenshots/truth/field-renderer/text-with-errors.png +0 -0
  156. package/screenshots/truth/field-renderer/text-with-label.png +0 -0
  157. package/screenshots/truth/field-renderer/textarea-evaluated.png +0 -0
  158. package/screenshots/truth/field-renderer/textarea-with-label.png +0 -0
  159. package/screenshots/truth/formfield/markdown-errors.png +0 -0
  160. package/screenshots/truth/formfield/no-errors.png +0 -0
  161. package/screenshots/truth/formfield/plain-text-errors.png +0 -0
  162. package/screenshots/truth/message-editor/autogrow-initial-content.png +0 -0
  163. package/screenshots/truth/message-editor/default.png +0 -0
  164. package/screenshots/truth/message-editor/drag-highlight.png +0 -0
  165. package/screenshots/truth/message-editor/filtered-attachments.png +0 -0
  166. package/screenshots/truth/message-editor/with-completion.png +0 -0
  167. package/screenshots/truth/message-editor/with-properties.png +0 -0
  168. package/screenshots/truth/nodes/split_by_llm_categorize/editor/basic-categorization.png +0 -0
  169. package/screenshots/truth/nodes/split_by_llm_categorize/editor/custom-input-and-result-name.png +0 -0
  170. package/screenshots/truth/nodes/split_by_llm_categorize/editor/feedback-categorization.png +0 -0
  171. package/screenshots/truth/nodes/split_by_llm_categorize/editor/many-categories.png +0 -0
  172. package/screenshots/truth/nodes/split_by_llm_categorize/editor/minimal-categories.png +0 -0
  173. package/screenshots/truth/nodes/split_by_llm_categorize/render/basic-categorization.png +0 -0
  174. package/screenshots/truth/nodes/split_by_llm_categorize/render/custom-input-and-result-name.png +0 -0
  175. package/screenshots/truth/nodes/split_by_llm_categorize/render/feedback-categorization.png +0 -0
  176. package/screenshots/truth/nodes/split_by_llm_categorize/render/many-categories.png +0 -0
  177. package/screenshots/truth/nodes/split_by_llm_categorize/render/minimal-categories.png +0 -0
  178. package/screenshots/truth/nodes/split_by_random/editor/ab-test-multiple-variants.png +0 -0
  179. package/screenshots/truth/nodes/split_by_random/editor/sampling-split.png +0 -0
  180. package/screenshots/truth/nodes/split_by_random/editor/three-way-split.png +0 -0
  181. package/screenshots/truth/nodes/split_by_random/editor/two-bucket-split.png +0 -0
  182. package/screenshots/truth/nodes/split_by_random/render/ab-test-multiple-variants.png +0 -0
  183. package/screenshots/truth/nodes/split_by_random/render/sampling-split.png +0 -0
  184. package/screenshots/truth/nodes/split_by_random/render/three-way-split.png +0 -0
  185. package/screenshots/truth/nodes/split_by_random/render/two-bucket-split.png +0 -0
  186. package/screenshots/truth/nodes/wait_for_digits/editor/basic-digits-wait.png +0 -0
  187. package/screenshots/truth/nodes/wait_for_digits/editor/phone-number-collection.png +0 -0
  188. package/screenshots/truth/nodes/wait_for_digits/editor/single-digit-with-timeout.png +0 -0
  189. package/screenshots/truth/nodes/wait_for_digits/editor/verification-code.png +0 -0
  190. package/screenshots/truth/nodes/wait_for_digits/render/basic-digits-wait.png +0 -0
  191. package/screenshots/truth/nodes/wait_for_digits/render/phone-number-collection.png +0 -0
  192. package/screenshots/truth/nodes/wait_for_digits/render/single-digit-with-timeout.png +0 -0
  193. package/screenshots/truth/nodes/wait_for_digits/render/verification-code.png +0 -0
  194. package/screenshots/truth/nodes/wait_for_response/editor/basic-wait.png +0 -0
  195. package/screenshots/truth/nodes/wait_for_response/editor/custom-result-name.png +0 -0
  196. package/screenshots/truth/nodes/wait_for_response/editor/no-timeout.png +0 -0
  197. package/screenshots/truth/nodes/wait_for_response/editor/short-timeout.png +0 -0
  198. package/screenshots/truth/nodes/wait_for_response/render/basic-wait.png +0 -0
  199. package/screenshots/truth/nodes/wait_for_response/render/custom-result-name.png +0 -0
  200. package/screenshots/truth/nodes/wait_for_response/render/no-timeout.png +0 -0
  201. package/screenshots/truth/nodes/wait_for_response/render/short-timeout.png +0 -0
  202. package/screenshots/truth/omnibox/selected.png +0 -0
  203. package/screenshots/truth/select/functions.png +0 -0
  204. package/screenshots/truth/select/multi-with-endpoint.png +0 -0
  205. package/screenshots/truth/select/search-enabled.png +0 -0
  206. package/screenshots/truth/textinput/autogrow-initial.png +0 -0
  207. package/screenshots/truth/textinput/input-form.png +0 -0
  208. package/src/display/Thumbnail.ts +2 -1
  209. package/src/events.ts +13 -1
  210. package/src/excellent/helpers.ts +2 -2
  211. package/src/flow/CanvasNode.ts +22 -1
  212. package/src/flow/Editor.ts +12 -1
  213. package/src/flow/NodeEditor.ts +412 -354
  214. package/src/flow/actions/add_input_labels.ts +45 -0
  215. package/src/flow/actions/call_llm.ts +57 -3
  216. package/src/flow/actions/call_webhook.ts +28 -18
  217. package/src/flow/actions/open_ticket.ts +74 -3
  218. package/src/flow/actions/send_msg.ts +170 -6
  219. package/src/flow/actions/set_run_result.ts +83 -0
  220. package/src/flow/config.ts +4 -0
  221. package/src/flow/nodes/split_by_llm_categorize.ts +277 -0
  222. package/src/flow/nodes/split_by_ticket.ts +19 -0
  223. package/src/flow/nodes/wait_for_response.ts +28 -1
  224. package/src/flow/types.ts +46 -128
  225. package/src/form/ArrayEditor.ts +96 -66
  226. package/src/form/BaseListEditor.ts +22 -6
  227. package/src/form/FieldRenderer.ts +465 -0
  228. package/src/form/FormField.ts +4 -4
  229. package/src/form/KeyValueEditor.ts +1 -1
  230. package/src/form/MediaPicker.ts +13 -1
  231. package/src/form/MessageEditor.ts +449 -0
  232. package/src/form/TextInput.ts +16 -8
  233. package/src/form/select/Select.ts +55 -24
  234. package/src/live/ContactChat.ts +69 -19
  235. package/src/markdown.ts +19 -11
  236. package/src/store/flow-definition.d.ts +5 -2
  237. package/static/api/labels.json +31 -0
  238. package/static/api/topics.json +24 -9
  239. package/static/api/users.json +35 -16
  240. package/static/css/temba-components.css +5 -3
  241. package/static/mr/docs/en-us/editor.json +2588 -0
  242. package/stress-test.js +143 -0
  243. package/temba-modules.ts +2 -0
  244. package/test/ActionHelper.ts +2 -0
  245. package/test/NodeHelper.ts +184 -0
  246. package/test/actions/call_llm.test.ts +137 -0
  247. package/test/nodes/README.md +78 -0
  248. package/test/nodes/split_by_llm_categorize.test.ts +698 -0
  249. package/test/nodes/split_by_random.test.ts +177 -0
  250. package/test/nodes/wait_for_digits.test.ts +176 -0
  251. package/test/nodes/wait_for_response.test.ts +206 -0
  252. package/test/temba-add-input-labels.test.ts +87 -0
  253. package/test/temba-field-config.test.ts +4 -2
  254. package/test/temba-field-renderer.test.ts +482 -0
  255. package/test/temba-markdown.test.ts +1 -1
  256. package/test/temba-message-editor.test.ts +300 -0
  257. package/test/temba-node-editor.test.ts +590 -0
  258. package/test/temba-select.test.ts +7 -7
  259. package/test/temba-textinput.test.ts +26 -0
  260. package/test/temba-webchat.test.ts +6 -1
  261. package/test/utils.test.ts +2 -13
  262. package/test-assets/contacts/history.json +19 -0
  263. package/test-assets/select/llms.json +18 -0
  264. package/test-assets/style.css +2 -0
  265. package/web-dev-mock.mjs +523 -0
  266. package/web-dev-server.config.mjs +74 -6
  267. package/web-test-runner.config.mjs +9 -4
  268. package/test/temba-flow-editor.test.ts.backup +0 -563
  269. package/test/temba-utils-index.test.ts.backup +0 -1737
@@ -1,14 +1,21 @@
1
1
  FROM "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye"
2
2
 
3
- RUN apt-get update \
4
- && apt-get install chromium fonts-noto-color-emoji -y --no-install-recommends -qq
5
-
6
- # The rest of our environment
3
+ # The rest of our environment
7
4
  ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
8
5
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
9
6
  ENV CHROME_PATH=/usr/bin/chromium
10
7
  ENV DEBIAN_FRONTEND=noninteractive
11
8
 
9
+ # Add minio configuration
10
+ ENV MINIO_ENDPOINT=http://minio:9000
11
+ ENV MINIO_PUBLIC_ENDPOINT=http://localhost:9000
12
+ ENV MINIO_ACCESS_KEY=root
13
+ ENV MINIO_SECRET_KEY=tembatemba
14
+ ENV MINIO_BUCKET=temba-attachments
15
+
16
+ RUN apt-get update \
17
+ && apt-get install chromium fonts-noto-color-emoji dnsutils curl -y --no-install-recommends -qq
18
+
12
19
  WORKDIR /workspaces/temba-components
13
20
  RUN yarn install
14
21
  USER node
@@ -10,10 +10,11 @@
10
10
  "runArgs": [
11
11
  "--name=dev-components",
12
12
  "--network=textit_default",
13
- "--hostname=temba-components"
13
+ "--hostname=temba-components",
14
+ "--add-host=minio:host-gateway"
14
15
  ],
15
16
  "remoteUser": "node",
16
- "postCreateCommand": "sudo chown -R node /workspaces/temba-components/static/svg && sudo chown node /workspaces/temba-components && sudo chown node /workspaces/temba-components/screenshots && yarn install",
17
+ "postCreateCommand": "sudo chown -R node /workspaces/temba-components/static/svg && sudo chown node /workspaces/temba-components && sudo chown node /workspaces/temba-components/screenshots && yarn install && echo 'Testing minio connection:' && curl -f http://minio:9000/minio/health/live || echo 'Minio connection failed - this is expected if minio is not running'",
17
18
  "customizations": {
18
19
  "vscode": {
19
20
  "extensions": [
@@ -23,7 +23,6 @@ jobs:
23
23
  - name: Build and run dev container task
24
24
  id: validate
25
25
  uses: devcontainers/ci@v0.3
26
- continue-on-error: true
27
26
  with:
28
27
  runCmd: |
29
28
  yarn validate 2>&1 | tee validate_output.log
@@ -33,7 +32,7 @@ jobs:
33
32
  CI=true
34
33
 
35
34
  - name: Extract coverage stats
36
- if: always()
35
+ if: success() || failure()
37
36
  run: |
38
37
  if [ -f validate_output.log ]; then
39
38
  echo "Extracting coverage information from validate output..."
@@ -69,7 +68,7 @@ jobs:
69
68
  fi
70
69
 
71
70
  - name: Comment coverage on PR
72
- if: github.event_name == 'pull_request' && always()
71
+ if: github.event_name == 'pull_request' && (success() || failure())
73
72
  uses: actions/github-script@v7
74
73
  with:
75
74
  script: |
@@ -123,7 +122,7 @@ jobs:
123
122
  }
124
123
 
125
124
  - name: Configure AWS credentials
126
- if: always()
125
+ if: success() || failure()
127
126
  uses: aws-actions/configure-aws-credentials@v4
128
127
  with:
129
128
  aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -131,7 +130,7 @@ jobs:
131
130
  aws-region: us-east-1
132
131
 
133
132
  - name: Upload coverage report to S3
134
- if: always()
133
+ if: success() || failure()
135
134
  run: |
136
135
  # Check if coverage directory exists
137
136
  if [ -d "coverage/lcov-report" ]; then
@@ -151,15 +150,6 @@ jobs:
151
150
  echo "No coverage report found to upload"
152
151
  fi
153
152
 
154
- - name: Check validation result
155
- run: |
156
- if [ "${{ steps.validate.outcome }}" != "success" ]; then
157
- echo "❌ Validation failed"
158
- exit 1
159
- else
160
- echo "✅ Validation passed"
161
- fi
162
-
163
153
  - name: Upload artifacts
164
154
  if: failure()
165
155
  uses: actions/upload-artifact@v4
package/CHANGELOG.md CHANGED
@@ -4,8 +4,37 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v0.129.9](https://github.com/nyaruka/temba-components/compare/v0.129.8...v0.129.9)
8
+
9
+ - Node helper tests [`#672`](https://github.com/nyaruka/temba-components/pull/672)
10
+ - Node refactor to support split_by_llm_categorize [`#671`](https://github.com/nyaruka/temba-components/pull/671)
11
+ - Implement editor for add_input_labels [`#670`](https://github.com/nyaruka/temba-components/pull/670)
12
+ - Support real call and optin events [`#669`](https://github.com/nyaruka/temba-components/pull/669)
13
+ - Add split_by_ticket node editor for ticket opening functionality [`#666`](https://github.com/nyaruka/temba-components/pull/666)
14
+ - Implement Call AI (LLM) action configuration with dynamic model selection [`#664`](https://github.com/nyaruka/temba-components/pull/664)
15
+ - Select placeholder and input tweaks [`#662`](https://github.com/nyaruka/temba-components/pull/662)
16
+ - Add FieldRenderer [`#661`](https://github.com/nyaruka/temba-components/pull/661)
17
+ - Add NodeHelper tests [`a94d342`](https://github.com/nyaruka/temba-components/commit/a94d342f0ab5b3f1338a733b2fc6e0ca051ec0d7)
18
+ - Add field renderer [`f7c410b`](https://github.com/nyaruka/temba-components/commit/f7c410b7979448c498d33597dabbba22e5ea60b9)
19
+ - Put node in charge of rendering if appropriate [`54b302d`](https://github.com/nyaruka/temba-components/commit/54b302d165ba842542462778f272d69180117835)
20
+
21
+ #### [v0.129.8](https://github.com/nyaruka/temba-components/compare/v0.129.7...v0.129.8)
22
+
23
+ > 20 August 2025
24
+
25
+ - Add support for `run_started` and `run_ended` events in chat history [`#660`](https://github.com/nyaruka/temba-components/pull/660)
26
+ - Fix completion in dev environment [`#659`](https://github.com/nyaruka/temba-components/pull/659)
27
+ - Roll our own flow info generator for dev env [`#658`](https://github.com/nyaruka/temba-components/pull/658)
28
+ - Group updates [`#657`](https://github.com/nyaruka/temba-components/pull/657)
29
+ - Integrate MessageEditor component with flow editor for send_msg action [`#654`](https://github.com/nyaruka/temba-components/pull/654)
30
+ - Add minio dev support, finish attachment work [`8b1a930`](https://github.com/nyaruka/temba-components/commit/8b1a930ba6f2c87b46cfe7c79af949fe27fa43c8)
31
+ - Add MessageEditor component with tests [`0994c7f`](https://github.com/nyaruka/temba-components/commit/0994c7fa58d8e77741925049934ccca96c85653a)
32
+ - Catch networkidle failure, add stress-test script [`6d102d3`](https://github.com/nyaruka/temba-components/commit/6d102d3cb6f0144e9176c3c60f3243e0d30fc6ff)
33
+
7
34
  #### [v0.129.7](https://github.com/nyaruka/temba-components/compare/v0.129.6...v0.129.7)
8
35
 
36
+ > 13 August 2025
37
+
9
38
  - Fix rendering of airtime transfer events [`#656`](https://github.com/nyaruka/temba-components/pull/656)
10
39
  - Update some flow def, show wa templates, fix exit clicks [`#652`](https://github.com/nyaruka/temba-components/pull/652)
11
40
  - Flow example list page [`#651`](https://github.com/nyaruka/temba-components/pull/651)
@@ -36,7 +36,7 @@
36
36
  </style>
37
37
  </head>
38
38
  <body>
39
- <temba-store></temba-store>
39
+ <temba-store completion="/api/v2/completion.json"></temba-store>
40
40
  <temba-flow-editor id="flow-editor"></temba-flow-editor>
41
41
 
42
42
  <script type="module">
@@ -0,0 +1,125 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-GB">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>Message Editor Examples</title>
6
+ <link
7
+ href="/static/css/temba-components.css"
8
+ rel="stylesheet"
9
+ type="text/css"
10
+ />
11
+ <link
12
+ href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:300,400,500"
13
+ rel="stylesheet"
14
+ />
15
+ <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
+ </head>
17
+ <body>
18
+ <h1>Message Editor Examples</h1>
19
+
20
+ <p>
21
+ <a href="/demo/index.html">← Back to main demo</a>
22
+ </p>
23
+
24
+ <div class="example">
25
+ <h3>Basic Message Editor</h3>
26
+ <p>A composed component that combines text completion and media picker</p>
27
+ <temba-message-editor
28
+ name="message"
29
+ placeholder="Type your message here..."
30
+ label="Message"
31
+ ></temba-message-editor>
32
+ </div>
33
+
34
+ <div class="example">
35
+ <h3>Message Editor with Value</h3>
36
+ <p>Pre-populated with a message</p>
37
+ <temba-message-editor
38
+ name="message2"
39
+ value="Hello @contact.name, your order is ready!"
40
+ placeholder="Type your message here..."
41
+ label="Message with Completion"
42
+ ></temba-message-editor>
43
+ </div>
44
+
45
+ <div class="example">
46
+ <h3>Message Editor with Attachments</h3>
47
+ <p>Pre-populated with mixed attachment types (static and runtime)</p>
48
+ <temba-message-editor
49
+ name="message3"
50
+ value="Check out this document and image"
51
+ placeholder="Type your message here..."
52
+ label="Message with Attachments"
53
+ attachments='["image/jpeg:http://example.com/photo.jpg", "application/pdf:http://example.com/doc.pdf", "image:@fields.profile_pic", "video:@fields.intro_video"]'
54
+ ></temba-message-editor>
55
+ </div>
56
+
57
+ <div class="example">
58
+ <h3>Message Editor with File Type Restrictions</h3>
59
+ <p>Only accepts image files</p>
60
+ <temba-message-editor
61
+ name="message4"
62
+ placeholder="Type your message and attach images..."
63
+ label="Images Only"
64
+ accept="image/*"
65
+ max-attachments="5"
66
+ ></temba-message-editor>
67
+ </div>
68
+
69
+ <div class="example">
70
+ <h3>Message Editor with Counter</h3>
71
+ <p>With GSM character counter</p>
72
+ <temba-message-editor
73
+ name="message5"
74
+ value="This message has a GSM character counter"
75
+ placeholder="Type your message..."
76
+ label="Message with Counter"
77
+ counter="temba-charcount"
78
+ gsm
79
+ ></temba-message-editor>
80
+ <temba-charcount text="count this text"></temba-charcount>
81
+ </div>
82
+
83
+ <div class="example">
84
+ <h3>Compact Message Editor</h3>
85
+ <p>Smaller minimum height</p>
86
+ <temba-message-editor
87
+ name="message6"
88
+ placeholder="Quick message..."
89
+ label="Compact Editor"
90
+ min-height="40"
91
+ ></temba-message-editor>
92
+ </div>
93
+
94
+ <div class="example">
95
+ <h3>Widget Only (No Label)</h3>
96
+ <p>Just the widget without field wrapper</p>
97
+ <temba-message-editor
98
+ name="message7"
99
+ placeholder="Widget only mode..."
100
+ widget-only
101
+ ></temba-message-editor>
102
+ </div>
103
+
104
+ <script type="module">
105
+ import '/out-tsc/temba-modules.js';
106
+
107
+ // Add some event listeners to show how the component works
108
+ document.addEventListener('DOMContentLoaded', () => {
109
+ const editors = document.querySelectorAll('temba-message-editor');
110
+ editors.forEach(editor => {
111
+ editor.addEventListener('change', (e) => {
112
+ console.log(`Message Editor "${editor.name}" changed:`, {
113
+ value: editor.value,
114
+ attachments: editor.attachments
115
+ });
116
+ });
117
+
118
+ editor.addEventListener('loading', (e) => {
119
+ console.log(`Message Editor "${editor.name}" loading:`, e.detail.loading);
120
+ });
121
+ });
122
+ });
123
+ </script>
124
+ </body>
125
+ </html>
@@ -15,6 +15,7 @@
15
15
  <link href="/demo/static/css/styles.css" rel="stylesheet" type="text/css" />
16
16
  </head>
17
17
  <body>
18
+ <temba-store completion="/api/v2/completion.json"></temba-store>
18
19
  <h1>Completion Examples</h1>
19
20
 
20
21
  <p>
@@ -4,8 +4,8 @@
4
4
  "nodes": {
5
5
  "b01610c8-d6dc-4bdb-9439-5713cdcf9afa": {
6
6
  "position": {
7
- "left": 80,
8
- "top": 80
7
+ "left": 60,
8
+ "top": 20
9
9
  },
10
10
  "type": "execute_actions"
11
11
  },
@@ -13,7 +13,7 @@
13
13
  "type": "wait_for_response",
14
14
  "position": {
15
15
  "left": 80,
16
- "top": 260
16
+ "top": 240
17
17
  },
18
18
  "config": {
19
19
  "cases": {}
@@ -41,27 +41,17 @@
41
41
  "uuid": "b01610c8-d6dc-4bdb-9439-5713cdcf9afa",
42
42
  "actions": [
43
43
  {
44
+ "uuid": "90957b4e-05a4-4d00-8163-47046f81246d",
45
+ "type": "send_msg",
46
+ "text": "Would you like chicken or fish?",
44
47
  "attachments": [
45
- "image/jpeg:http://minio:9000/temba-default/orgs/1/media/495c/495c33e3-237e-4c36-b854-6ca609839e3a/intro-1745448388.jpg",
46
- "image:@fields.profile_pic"
48
+ "image/jpeg:http://localhost:9000/temba-attachments/816f8797-c929-47a8-a1ad-9a33f0123406-IMG_0917.jpeg",
49
+ "image/jpeg:http://localhost:9000/temba-attachments/de0f23fc-2d71-4a93-90d3-729b1ad65cd2-IMG_3208.jpeg"
47
50
  ],
48
- "text": "Chicken or fish?",
49
- "type": "send_msg",
50
51
  "quick_replies": [
51
- "Chicken",
52
- "Fish"
53
- ],
54
- "uuid": "90957b4e-05a4-4d00-8163-47046f81246d",
55
- "template": {
56
- "uuid": "b5e47571-4ee7-4e9e-b48f-1c4efd4d6429",
57
- "name": "Dinner Menu"
58
- },
59
- "template_variables": [
60
- "Food",
61
- "@contact.name",
62
- "Chicken",
63
52
  "Fish",
64
- "Rowan"
53
+ "Chicken",
54
+ "arst"
65
55
  ]
66
56
  }
67
57
  ],
@@ -124,7 +114,8 @@
124
114
  "uuid": "9e84e680-a710-4894-a838-dd22a8dcc341"
125
115
  },
126
116
  {
127
- "uuid": "12043e9e-7aa0-41fd-8f04-e0d42a0c2099"
117
+ "uuid": "12043e9e-7aa0-41fd-8f04-e0d42a0c2099",
118
+ "destination_uuid": null
128
119
  },
129
120
  {
130
121
  "uuid": "79b6a4e6-1a00-44cc-9fd4-2d9ba2a394e0",