@nyaruka/temba-components 0.130.1 → 0.130.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/CHANGELOG.md +28 -4
- package/DEV_DATA.md +89 -0
- package/demo/data/flows/food-order.json +4 -4
- package/demo/data/flows/sample-flow.json +132 -147
- package/dist/temba-components.js +764 -628
- package/dist/temba-components.js.map +1 -1
- package/out-tsc/src/display/Chat.js +5 -3
- package/out-tsc/src/display/Chat.js.map +1 -1
- package/out-tsc/src/events.js.map +1 -1
- package/out-tsc/src/flow/CanvasNode.js +83 -78
- package/out-tsc/src/flow/CanvasNode.js.map +1 -1
- package/out-tsc/src/flow/Editor.js +1 -0
- package/out-tsc/src/flow/Editor.js.map +1 -1
- package/out-tsc/src/flow/NodeEditor.js +47 -3
- package/out-tsc/src/flow/NodeEditor.js.map +1 -1
- package/out-tsc/src/flow/actions/add_contact_urn.js +1 -1
- package/out-tsc/src/flow/actions/add_contact_urn.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_channel.js +1 -1
- package/out-tsc/src/flow/actions/set_contact_channel.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_field.js +2 -1
- package/out-tsc/src/flow/actions/set_contact_field.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_language.js +3 -1
- package/out-tsc/src/flow/actions/set_contact_language.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_name.js +1 -1
- package/out-tsc/src/flow/actions/set_contact_name.js.map +1 -1
- package/out-tsc/src/flow/actions/set_contact_status.js +17 -14
- package/out-tsc/src/flow/actions/set_contact_status.js.map +1 -1
- package/out-tsc/src/flow/actions/set_run_result.js +1 -1
- package/out-tsc/src/flow/actions/set_run_result.js.map +1 -1
- package/out-tsc/src/flow/nodes/split_by_llm.js +12 -12
- package/out-tsc/src/flow/nodes/split_by_llm.js.map +1 -1
- package/out-tsc/src/flow/nodes/wait_for_response.js +609 -6
- package/out-tsc/src/flow/nodes/wait_for_response.js.map +1 -1
- package/out-tsc/src/flow/operators.js +194 -0
- package/out-tsc/src/flow/operators.js.map +1 -0
- package/out-tsc/src/flow/types.js.map +1 -1
- package/out-tsc/src/form/ArrayEditor.js +84 -19
- package/out-tsc/src/form/ArrayEditor.js.map +1 -1
- package/out-tsc/src/form/Checkbox.js +12 -0
- package/out-tsc/src/form/Checkbox.js.map +1 -1
- package/out-tsc/src/form/FieldRenderer.js +13 -3
- package/out-tsc/src/form/FieldRenderer.js.map +1 -1
- package/out-tsc/src/form/TextInput.js +20 -1
- package/out-tsc/src/form/TextInput.js.map +1 -1
- package/out-tsc/src/form/select/Select.js +7 -0
- package/out-tsc/src/form/select/Select.js.map +1 -1
- package/out-tsc/src/interfaces.js.map +1 -1
- package/out-tsc/src/layout/Dialog.js +3 -4
- package/out-tsc/src/layout/Dialog.js.map +1 -1
- package/out-tsc/src/list/RunList.js +2 -2
- package/out-tsc/src/list/RunList.js.map +1 -1
- package/out-tsc/src/live/ContactChat.js +114 -34
- package/out-tsc/src/live/ContactChat.js.map +1 -1
- package/out-tsc/src/live/ContactDetails.js +7 -0
- package/out-tsc/src/live/ContactDetails.js.map +1 -1
- package/out-tsc/src/live/ContactNameFetch.js +1 -1
- package/out-tsc/src/live/ContactNameFetch.js.map +1 -1
- package/out-tsc/test/NodeHelper.js +25 -27
- package/out-tsc/test/NodeHelper.js.map +1 -1
- package/out-tsc/test/nodes/split_by_llm.test.js +12 -4
- package/out-tsc/test/nodes/split_by_llm.test.js.map +1 -1
- package/out-tsc/test/nodes/split_by_llm_categorize.test.js +101 -91
- package/out-tsc/test/nodes/split_by_llm_categorize.test.js.map +1 -1
- package/out-tsc/test/nodes/split_by_random.test.js +120 -112
- package/out-tsc/test/nodes/split_by_random.test.js.map +1 -1
- package/out-tsc/test/nodes/wait_for_digits.test.js +131 -111
- package/out-tsc/test/nodes/wait_for_digits.test.js.map +1 -1
- package/out-tsc/test/nodes/wait_for_response.test.js +549 -85
- package/out-tsc/test/nodes/wait_for_response.test.js.map +1 -1
- package/out-tsc/test/temba-checkbox.test.js +32 -32
- package/out-tsc/test/temba-checkbox.test.js.map +1 -1
- package/out-tsc/test/temba-contact-chat.test.js +2 -1
- package/out-tsc/test/temba-contact-chat.test.js.map +1 -1
- package/out-tsc/test/temba-dropdown.test.js +0 -4
- package/out-tsc/test/temba-dropdown.test.js.map +1 -1
- package/out-tsc/test/temba-flow-editor-node.test.js +9 -4
- package/out-tsc/test/temba-flow-editor-node.test.js.map +1 -1
- package/out-tsc/test/temba-integration-markdown.test.js +13 -15
- package/out-tsc/test/temba-integration-markdown.test.js.map +1 -1
- package/out-tsc/test/temba-node-editor.test.js +5 -38
- package/out-tsc/test/temba-node-editor.test.js.map +1 -1
- package/out-tsc/test/temba-run-list.test.js +2 -2
- package/out-tsc/test/temba-run-list.test.js.map +1 -1
- package/out-tsc/test/utils.test.js +2 -1
- package/out-tsc/test/utils.test.js.map +1 -1
- package/package.json +6 -2
- 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/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_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/checkbox/checkbox-label-background-hover.png +0 -0
- package/screenshots/truth/checkbox/checkbox-whitespace-label-no-background-hover.png +0 -0
- package/screenshots/truth/checkbox/checkbox-with-help-text.png +0 -0
- package/screenshots/truth/checkbox/checked.png +0 -0
- package/screenshots/truth/checkbox/default.png +0 -0
- package/screenshots/truth/editor/wait.png +0 -0
- package/screenshots/truth/integration/textinput-markdown-errors.png +0 -0
- package/screenshots/truth/lightbox/img-zoomed.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/screenshots/truth/run-list/basic.png +0 -0
- package/screenshots/truth/templates/default.png +0 -0
- package/screenshots/truth/wait-for-response/rules-editor.png +0 -0
- package/screenshots/truth/wait-for-response/timeout-editor-unchecked.png +0 -0
- package/screenshots/truth/wait-for-response/timeout-editor.png +0 -0
- package/scripts/dev-data-sync.mjs +182 -0
- package/src/display/Chat.ts +6 -4
- package/src/events.ts +6 -5
- package/src/flow/CanvasNode.ts +89 -79
- package/src/flow/Editor.ts +1 -0
- package/src/flow/NodeEditor.ts +55 -3
- package/src/flow/actions/add_contact_urn.ts +1 -1
- package/src/flow/actions/set_contact_channel.ts +1 -1
- package/src/flow/actions/set_contact_field.ts +2 -1
- package/src/flow/actions/set_contact_language.ts +3 -1
- package/src/flow/actions/set_contact_name.ts +1 -1
- package/src/flow/actions/set_contact_status.ts +18 -18
- package/src/flow/actions/set_run_result.ts +1 -1
- package/src/flow/nodes/split_by_llm.ts +14 -13
- package/src/flow/nodes/wait_for_response.ts +717 -5
- package/src/flow/operators.ts +215 -0
- package/src/flow/types.ts +10 -2
- package/src/form/ArrayEditor.ts +117 -37
- package/src/form/Checkbox.ts +12 -0
- package/src/form/FieldRenderer.ts +24 -3
- package/src/form/TextInput.ts +19 -1
- package/src/form/select/Select.ts +7 -0
- package/src/interfaces.ts +1 -1
- package/src/layout/Dialog.ts +4 -4
- package/src/list/RunList.ts +2 -2
- package/src/live/ContactChat.ts +144 -58
- package/src/live/ContactDetails.ts +7 -0
- package/src/live/ContactNameFetch.ts +1 -1
- package/static/api/labels.json +6 -1
- package/test/NodeHelper.ts +38 -40
- package/test/nodes/split_by_llm.test.ts +43 -32
- package/test/nodes/split_by_llm_categorize.test.ts +130 -120
- package/test/nodes/split_by_random.test.ts +136 -128
- package/test/nodes/wait_for_digits.test.ts +147 -127
- package/test/nodes/wait_for_response.test.ts +657 -104
- package/test/temba-checkbox.test.ts +36 -32
- package/test/temba-contact-chat.test.ts +2 -1
- package/test/temba-dropdown.test.ts +0 -12
- package/test/temba-flow-editor-node.test.ts +11 -4
- package/test/temba-integration-markdown.test.ts +16 -17
- package/test/temba-node-editor.test.ts +5 -43
- package/test/temba-run-list.test.ts +2 -2
- package/test/utils.test.ts +2 -1
- package/test-assets/list/runs.json +8 -8
- package/web-dev-mock.mjs +86 -30
- package/web-dev-server.config.mjs +272 -31
- package/screenshots/truth/dropdown/bottom-edge-collision.png +0 -0
- package/screenshots/truth/dropdown/right-edge-collision.png +0 -0
- package/screenshots/truth/editor/send_msg.png +0 -0
- package/screenshots/truth/editor/set_contact_language.png +0 -0
- package/screenshots/truth/editor/set_contact_name.png +0 -0
- package/screenshots/truth/editor/set_run_result.png +0 -0
- package/screenshots/truth/integration/checkbox-markdown-errors.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,25 +4,49 @@ 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.130.2](https://github.com/nyaruka/temba-components/compare/v0.130.1...v0.130.2)
|
|
8
|
+
|
|
9
|
+
- Add support for ticket events from the engine [`#693`](https://github.com/nyaruka/temba-components/pull/693)
|
|
10
|
+
- First draft for rules editor [`#691`](https://github.com/nyaruka/temba-components/pull/691)
|
|
11
|
+
- Show contact ref on details tab since it might be hidden by name if set [`#690`](https://github.com/nyaruka/temba-components/pull/690)
|
|
12
|
+
- Fix font weights for actions [`#689`](https://github.com/nyaruka/temba-components/pull/689)
|
|
13
|
+
- Restructure titles [`#688`](https://github.com/nyaruka/temba-components/pull/688)
|
|
14
|
+
- Add dev-data tools to work outside of project [`#687`](https://github.com/nyaruka/temba-components/pull/687)
|
|
15
|
+
- Use `contact.ref` instead of `anon_display` [`#685`](https://github.com/nyaruka/temba-components/pull/685)
|
|
16
|
+
- Create entities in dev environment [`#686`](https://github.com/nyaruka/temba-components/pull/686)
|
|
17
|
+
- Tweak screenshot logic [`d7d8831`](https://github.com/nyaruka/temba-components/commit/d7d88314954e962725eb6ba039e024811cc97a7c)
|
|
18
|
+
- Basic rule editing [`58026c7`](https://github.com/nyaruka/temba-components/commit/58026c718fb19e0856d7e2ab3a2a6854f6625776)
|
|
19
|
+
- Add dev-data commands to work outside of project [`b922442`](https://github.com/nyaruka/temba-components/commit/b92244246bd5e85f4039bda297b50f2d5d340a4b)
|
|
20
|
+
|
|
7
21
|
#### [v0.130.1](https://github.com/nyaruka/temba-components/compare/v0.130.0...v0.130.1)
|
|
8
22
|
|
|
23
|
+
> 4 September 2025
|
|
24
|
+
|
|
9
25
|
- Better fallback logic for createArbitraryOption [`18f9c21`](https://github.com/nyaruka/temba-components/commit/18f9c2153403b4c358519984208fa196d26f7d37)
|
|
10
26
|
|
|
11
|
-
#### [v0.130.0](https://github.com/nyaruka/temba-components/compare/v0.129.
|
|
27
|
+
#### [v0.130.0](https://github.com/nyaruka/temba-components/compare/v0.129.11...v0.130.0)
|
|
12
28
|
|
|
13
29
|
> 4 September 2025
|
|
14
30
|
|
|
15
31
|
- Fix allowCreate for Select [`#684`](https://github.com/nyaruka/temba-components/pull/684)
|
|
16
32
|
- Implement split by random [`#683`](https://github.com/nyaruka/temba-components/pull/683)
|
|
17
33
|
- Implement Individual Form Configurations for Contact Update Actions [`#680`](https://github.com/nyaruka/temba-components/pull/680)
|
|
34
|
+
- Rework how values in NodeEditor selects work [`056d20b`](https://github.com/nyaruka/temba-components/commit/056d20b4e79b7cd5adb6750b5816b6fb66d15dfb)
|
|
35
|
+
- Refactor contact actions to use individual form configurations instead of unified approach [`cc1ae10`](https://github.com/nyaruka/temba-components/commit/cc1ae10902bbd560ee3f0ec7ee5bedb0ad6e4398)
|
|
36
|
+
- Implement unified contact form configuration and adapter with comprehensive tests [`acf28ef`](https://github.com/nyaruka/temba-components/commit/acf28efe64572406a699dcf6e02e324fefc8c526)
|
|
37
|
+
|
|
38
|
+
#### [v0.129.11](https://github.com/nyaruka/temba-components/compare/v0.129.10...v0.129.11)
|
|
39
|
+
|
|
40
|
+
> 28 August 2025
|
|
41
|
+
|
|
18
42
|
- Add support for rendering `contact_status_changed` events [`#682`](https://github.com/nyaruka/temba-components/pull/682)
|
|
19
43
|
- Cleanup code for no longer used channel event types [`#681`](https://github.com/nyaruka/temba-components/pull/681)
|
|
20
44
|
- Split by subflow [`#678`](https://github.com/nyaruka/temba-components/pull/678)
|
|
21
45
|
- Fixes for node-based actions [`#677`](https://github.com/nyaruka/temba-components/pull/677)
|
|
22
46
|
- Make tests and demos more consistent [`#676`](https://github.com/nyaruka/temba-components/pull/676)
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
47
|
+
- Move call_llm into split_by_llm [`0f829f9`](https://github.com/nyaruka/temba-components/commit/0f829f9415df607fc5cba3eac87d6c5be06b4817)
|
|
48
|
+
- Some shared functionality for router categories [`918a97a`](https://github.com/nyaruka/temba-components/commit/918a97a4da47b72e9681862e6897a08e8be51380)
|
|
49
|
+
- Add editor for subflow [`8d335a1`](https://github.com/nyaruka/temba-components/commit/8d335a1667e42270ec90b7f505c91b6867137985)
|
|
26
50
|
|
|
27
51
|
#### [v0.129.10](https://github.com/nyaruka/temba-components/compare/v0.129.9...v0.129.10)
|
|
28
52
|
|
package/DEV_DATA.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Development Data Management
|
|
2
|
+
|
|
3
|
+
When working with the Temba Components development server, demo flows and API data files are stored outside the project directory to allow for easier iteration without affecting the committed defaults.
|
|
4
|
+
|
|
5
|
+
## How It Works
|
|
6
|
+
|
|
7
|
+
- **External Directory**: Development data is stored in `/tmp/temba-dev-data/`
|
|
8
|
+
- **Automatic Setup**: When you start the dev server, it automatically copies default files to the external directory if they don't exist
|
|
9
|
+
- **Fallback Logic**: The server will use external files when available, but fall back to project defaults if not found
|
|
10
|
+
- **Persistence**: Changes persist during development sessions but won't survive container rebuilds
|
|
11
|
+
|
|
12
|
+
## Directory Structure
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/tmp/temba-dev-data/
|
|
16
|
+
├── flows/ # Modified flow files
|
|
17
|
+
│ ├── food-order.json
|
|
18
|
+
│ └── sample-flow.json
|
|
19
|
+
└── api/ # Modified API response files
|
|
20
|
+
├── groups.json
|
|
21
|
+
├── labels.json
|
|
22
|
+
├── fields.json
|
|
23
|
+
└── ... (15 total API files)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Available Commands
|
|
27
|
+
|
|
28
|
+
### `yarn dev-data:status`
|
|
29
|
+
|
|
30
|
+
Shows the current state of development data:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
yarn dev-data:status
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### `yarn dev-data:copy` / `yarn dev-data:sync`
|
|
37
|
+
|
|
38
|
+
Copies changes from development directory back to the project:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
yarn dev-data:copy
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This is useful when you want to commit your development changes.
|
|
45
|
+
|
|
46
|
+
### `yarn dev-data:reset` / `yarn dev-data:wipe`
|
|
47
|
+
|
|
48
|
+
Wipes development data and restores from project defaults:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
yarn dev-data:reset
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This is useful when you want to start fresh or undo experimental changes.
|
|
55
|
+
|
|
56
|
+
## Typical Workflow
|
|
57
|
+
|
|
58
|
+
1. **Start Development**: `yarn start`
|
|
59
|
+
|
|
60
|
+
- Server automatically sets up external data directory with defaults
|
|
61
|
+
|
|
62
|
+
2. **Make Changes**: Edit flows or modify API responses through the application
|
|
63
|
+
|
|
64
|
+
- Changes are saved to `/tmp/temba-dev-data/`
|
|
65
|
+
|
|
66
|
+
3. **Check Status**: `yarn dev-data:status`
|
|
67
|
+
|
|
68
|
+
- See what files are in development vs project directories
|
|
69
|
+
|
|
70
|
+
4. **Commit Changes** (if desired): `yarn dev-data:copy`
|
|
71
|
+
|
|
72
|
+
- Copies your changes back to the project for committing
|
|
73
|
+
|
|
74
|
+
5. **Reset When Needed**: `yarn dev-data:reset`
|
|
75
|
+
- Start fresh with default data
|
|
76
|
+
|
|
77
|
+
## File Locations
|
|
78
|
+
|
|
79
|
+
- **Project Flows**: `demo/data/flows/`
|
|
80
|
+
- **Project API**: `static/api/`
|
|
81
|
+
- **Development Flows**: `/tmp/temba-dev-data/flows/`
|
|
82
|
+
- **Development API**: `/tmp/temba-dev-data/api/`
|
|
83
|
+
|
|
84
|
+
## Notes
|
|
85
|
+
|
|
86
|
+
- Development data doesn't survive container rebuilds
|
|
87
|
+
- Always use `yarn dev-data:copy` before committing if you want to keep changes
|
|
88
|
+
- The server prioritizes development files over project defaults when both exist
|
|
89
|
+
- You can manually edit files in `/tmp/temba-dev-data/` if needed
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"3b28a90f-27be-4753-b0c0-3e98b83f0627": {
|
|
13
13
|
"type": "wait_for_response",
|
|
14
14
|
"position": {
|
|
15
|
-
"left":
|
|
16
|
-
"top":
|
|
15
|
+
"left": 60,
|
|
16
|
+
"top": 180
|
|
17
17
|
},
|
|
18
18
|
"config": {
|
|
19
19
|
"cases": {}
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"stickies": {
|
|
24
24
|
"b1cb8cfa-8432-444c-bd48-3fd2cb3a014f": {
|
|
25
25
|
"position": {
|
|
26
|
-
"left":
|
|
27
|
-
"top":
|
|
26
|
+
"left": 60,
|
|
27
|
+
"top": 340
|
|
28
28
|
},
|
|
29
29
|
"title": "Long awaited note",
|
|
30
30
|
"body": "This is the body of a note that I have been waiting to write for a very long time. Now I am able to add it to my flow and that makes me very happy.",
|