@nyaruka/temba-components 0.126.0 → 0.128.0
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 +23 -0
- package/demo/chart/example.html +18 -1
- package/demo/data/flows/sample-flow.json +127 -100
- package/demo/data/server/opened-tickets-long.json +53 -0
- package/demo/sticky-note-demo.html +152 -0
- package/dist/locales/es.js +5 -5
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.js +5 -5
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/locale-codes.js +11 -2
- package/dist/locales/locale-codes.js.map +1 -1
- package/dist/locales/pt.js +5 -5
- package/dist/locales/pt.js.map +1 -1
- package/dist/temba-components.js +346 -86
- package/dist/temba-components.js.map +1 -1
- package/out-tsc/src/chart/TembaChart.js +44 -5
- package/out-tsc/src/chart/TembaChart.js.map +1 -1
- package/out-tsc/src/flow/Editor.js +210 -1
- package/out-tsc/src/flow/Editor.js.map +1 -1
- package/out-tsc/src/flow/EditorNode.js +98 -142
- package/out-tsc/src/flow/EditorNode.js.map +1 -1
- package/out-tsc/src/flow/StickyNote.js +272 -0
- package/out-tsc/src/flow/StickyNote.js.map +1 -0
- package/out-tsc/src/list/RunList.js +2 -1
- package/out-tsc/src/list/RunList.js.map +1 -1
- package/out-tsc/src/list/SortableList.js +9 -0
- package/out-tsc/src/list/SortableList.js.map +1 -1
- package/out-tsc/src/locales/es.js +5 -5
- package/out-tsc/src/locales/es.js.map +1 -1
- package/out-tsc/src/locales/fr.js +5 -5
- package/out-tsc/src/locales/fr.js.map +1 -1
- package/out-tsc/src/locales/locale-codes.js +11 -2
- package/out-tsc/src/locales/locale-codes.js.map +1 -1
- package/out-tsc/src/locales/pt.js +5 -5
- package/out-tsc/src/locales/pt.js.map +1 -1
- package/out-tsc/src/store/AppState.js +33 -0
- package/out-tsc/src/store/AppState.js.map +1 -1
- package/out-tsc/src/vectoricon/index.js +2 -1
- package/out-tsc/src/vectoricon/index.js.map +1 -1
- package/out-tsc/temba-modules.js +2 -0
- package/out-tsc/temba-modules.js.map +1 -1
- package/out-tsc/test/temba-flow-editor-node.test.js +249 -5
- package/out-tsc/test/temba-flow-editor-node.test.js.map +1 -1
- package/out-tsc/test/temba-select.test.js +9 -14
- package/out-tsc/test/temba-select.test.js.map +1 -1
- package/out-tsc/test/utils.test.js +62 -0
- package/out-tsc/test/utils.test.js.map +1 -1
- package/package.json +1 -1
- package/screenshots/truth/sticky-note/blue.png +0 -0
- package/screenshots/truth/sticky-note/gray.png +0 -0
- package/screenshots/truth/sticky-note/green.png +0 -0
- package/screenshots/truth/sticky-note/pink.png +0 -0
- package/screenshots/truth/sticky-note/yellow.png +0 -0
- package/src/chart/TembaChart.ts +47 -5
- package/src/flow/Editor.ts +252 -2
- package/src/flow/EditorNode.ts +98 -160
- package/src/flow/StickyNote.ts +284 -0
- package/src/list/RunList.ts +2 -1
- package/src/list/SortableList.ts +11 -0
- package/src/locales/es.ts +18 -13
- package/src/locales/fr.ts +18 -13
- package/src/locales/locale-codes.ts +11 -2
- package/src/locales/pt.ts +18 -13
- package/src/store/AppState.ts +51 -1
- package/src/store/flow-definition.d.ts +8 -0
- package/src/vectoricon/index.ts +2 -1
- package/static/svg/index.pdf +137 -0
- package/temba-modules.ts +2 -0
- package/test/temba-flow-editor-node.test.ts +322 -6
- package/test/temba-select.test.ts +10 -17
- package/test/utils.test.ts +98 -0
- package/web-dev-server.config.mjs +30 -22
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,31 @@ 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.128.0](https://github.com/nyaruka/temba-components/compare/v0.127.0...v0.128.0)
|
|
8
|
+
|
|
9
|
+
- Clamp chart height [`#585`](https://github.com/nyaruka/temba-components/pull/585)
|
|
10
|
+
- Add vertical drag and drop sorting for actions in EditorNode [`#584`](https://github.com/nyaruka/temba-components/pull/584)
|
|
11
|
+
- Cleanup styles [`#582`](https://github.com/nyaruka/temba-components/pull/582)
|
|
12
|
+
- Add StickyNote component with drag/drop functionality to Flow Editor [`#578`](https://github.com/nyaruka/temba-components/pull/578)
|
|
13
|
+
- Fix intermittent build failures by improving async test handling and re-enabling disabled tests [`#581`](https://github.com/nyaruka/temba-components/pull/581)
|
|
14
|
+
- Add move handles for sticky notes [`c7bcc70`](https://github.com/nyaruka/temba-components/commit/c7bcc707323692eeb6e149a792813fe2a2ad1182)
|
|
15
|
+
- Make actions sortable [`f2a0c9a`](https://github.com/nyaruka/temba-components/commit/f2a0c9af32d34c2d1a26b58c32326eb43933f6b5)
|
|
16
|
+
- Remove drag mixin [`7724b30`](https://github.com/nyaruka/temba-components/commit/7724b30f77463d16fb0c738e6b3a00dcd0308738)
|
|
17
|
+
|
|
18
|
+
#### [v0.127.0](https://github.com/nyaruka/temba-components/compare/v0.126.0...v0.127.0)
|
|
19
|
+
|
|
20
|
+
> 19 June 2025
|
|
21
|
+
|
|
22
|
+
- Configure max ticks, add auto date format option [`#579`](https://github.com/nyaruka/temba-components/pull/579)
|
|
23
|
+
- Only snap on drop [`#576`](https://github.com/nyaruka/temba-components/pull/576)
|
|
24
|
+
- Configure max x ticks, some formatting [`af6ffe4`](https://github.com/nyaruka/temba-components/commit/af6ffe463cc3ef1c6b09e18eb5e515ccb8b66d95)
|
|
25
|
+
- Remove problematic test [`b42421a`](https://github.com/nyaruka/temba-components/commit/b42421ab4b04fd62b71efc772594079f4e55271b)
|
|
26
|
+
- Disable flaky test [`b86ac02`](https://github.com/nyaruka/temba-components/commit/b86ac02202c22c931952a57310639943f0f23431)
|
|
27
|
+
|
|
7
28
|
#### [v0.126.0](https://github.com/nyaruka/temba-components/compare/v0.125.0...v0.126.0)
|
|
8
29
|
|
|
30
|
+
> 19 June 2025
|
|
31
|
+
|
|
9
32
|
- Add xtype and xformat to TembaChart [`#575`](https://github.com/nyaruka/temba-components/pull/575)
|
|
10
33
|
- Add snap to grid for node movement [`#574`](https://github.com/nyaruka/temba-components/pull/574)
|
|
11
34
|
- Add flow saving for dev server [`#573`](https://github.com/nyaruka/temba-components/pull/573)
|
package/demo/chart/example.html
CHANGED
|
@@ -50,7 +50,19 @@
|
|
|
50
50
|
<div class="example">
|
|
51
51
|
<h3>Summation Chart</h3>
|
|
52
52
|
<p>A basic chart, summing all datasets</p>
|
|
53
|
-
<temba-chart
|
|
53
|
+
<temba-chart
|
|
54
|
+
url="../data/server/opened-tickets.json"
|
|
55
|
+
xtype="time"
|
|
56
|
+
></temba-chart>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="example">
|
|
60
|
+
<h3>Summation Chart</h3>
|
|
61
|
+
<p>Auto date format, spanning year</p>
|
|
62
|
+
<temba-chart
|
|
63
|
+
url="../data/server/opened-tickets-long.json"
|
|
64
|
+
xtype="time"
|
|
65
|
+
></temba-chart>
|
|
54
66
|
</div>
|
|
55
67
|
|
|
56
68
|
<div class="example">
|
|
@@ -61,6 +73,7 @@
|
|
|
61
73
|
dataname="Tickets"
|
|
62
74
|
config
|
|
63
75
|
legend
|
|
76
|
+
xtype="time"
|
|
64
77
|
></temba-chart>
|
|
65
78
|
</div>
|
|
66
79
|
|
|
@@ -73,6 +86,7 @@
|
|
|
73
86
|
splits="Tracking,Orders"
|
|
74
87
|
hideother
|
|
75
88
|
legend
|
|
89
|
+
xtype="time"
|
|
76
90
|
></temba-chart>
|
|
77
91
|
</div>
|
|
78
92
|
<div class="example">
|
|
@@ -83,6 +97,7 @@
|
|
|
83
97
|
dataname="Tickets"
|
|
84
98
|
showall
|
|
85
99
|
legend
|
|
100
|
+
xtype="time"
|
|
86
101
|
></temba-chart>
|
|
87
102
|
</div>
|
|
88
103
|
|
|
@@ -97,6 +112,7 @@
|
|
|
97
112
|
dataname="Average Response"
|
|
98
113
|
formatDuration
|
|
99
114
|
header="Response Time"
|
|
115
|
+
xtype="time"
|
|
100
116
|
url="../data/server/response-time.json"
|
|
101
117
|
></temba-chart>
|
|
102
118
|
<p>Here is the same duration chart, but as a line chart</p>
|
|
@@ -106,6 +122,7 @@
|
|
|
106
122
|
single
|
|
107
123
|
dataName="Average Response"
|
|
108
124
|
formatDuration
|
|
125
|
+
xtype="time"
|
|
109
126
|
url="../data/server/response-time.json"
|
|
110
127
|
></temba-chart>
|
|
111
128
|
</div>
|
|
@@ -180,28 +180,11 @@
|
|
|
180
180
|
"uuid": "4efc49e0-ebfe-454d-a1a0-900a911dd5ef",
|
|
181
181
|
"actions": [
|
|
182
182
|
{
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"uuid": "
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"type": "add_input_labels",
|
|
191
|
-
"labels": [
|
|
192
|
-
{
|
|
193
|
-
"uuid": "61cae99b-56e1-4f3e-a2b9-07fb5cf2be9e",
|
|
194
|
-
"name": "Spam",
|
|
195
|
-
"count": 0
|
|
196
|
-
}
|
|
197
|
-
],
|
|
198
|
-
"uuid": "d0d1571c-bf9e-4156-ac7c-984789c71472"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"type": "add_contact_urn",
|
|
202
|
-
"uuid": "9ddb2da4-03da-40a9-9cec-06c9d05b6e72",
|
|
203
|
-
"scheme": "tel",
|
|
204
|
-
"path": "12065551212"
|
|
183
|
+
"type": "set_run_result",
|
|
184
|
+
"name": "Color",
|
|
185
|
+
"value": "Black",
|
|
186
|
+
"category": "",
|
|
187
|
+
"uuid": "b32fe165-e0cc-475c-a7c4-7f484fcce2f4"
|
|
205
188
|
},
|
|
206
189
|
{
|
|
207
190
|
"uuid": "28c288f3-fb46-4c32-8a47-563132a2e8db",
|
|
@@ -212,40 +195,20 @@
|
|
|
212
195
|
}
|
|
213
196
|
},
|
|
214
197
|
{
|
|
215
|
-
"
|
|
216
|
-
"
|
|
217
|
-
"
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
"uuid": "a0b17ce5-f0f2-4c07-b399-facecbb403ae",
|
|
221
|
-
"type": "set_contact_field",
|
|
222
|
-
"field": {
|
|
223
|
-
"name": "Color",
|
|
224
|
-
"key": "color"
|
|
225
|
-
},
|
|
226
|
-
"value": "@results.color.category"
|
|
198
|
+
"attachments": [],
|
|
199
|
+
"text": "Excellent choice!",
|
|
200
|
+
"type": "send_msg",
|
|
201
|
+
"quick_replies": [],
|
|
202
|
+
"uuid": "9963160a-a007-4c7b-8c9e-7325e1b69ed8"
|
|
227
203
|
},
|
|
228
204
|
{
|
|
229
|
-
"
|
|
230
|
-
|
|
231
|
-
{
|
|
232
|
-
"uuid": "269e8abf-e81b-404c-82ce-45ff42d13769",
|
|
233
|
-
"name": "Empty",
|
|
234
|
-
"query": null,
|
|
235
|
-
"status": "ready",
|
|
236
|
-
"system": false,
|
|
237
|
-
"count": 0
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"uuid": "58a6a3cd-20c0-4791-82da-ce9f319ab91b",
|
|
241
|
-
"name": "Farmers",
|
|
242
|
-
"query": null,
|
|
243
|
-
"status": "ready",
|
|
244
|
-
"system": false,
|
|
245
|
-
"count": 2414
|
|
246
|
-
}
|
|
205
|
+
"addresses": [
|
|
206
|
+
"name@domain.com"
|
|
247
207
|
],
|
|
248
|
-
"
|
|
208
|
+
"subject": "Did you get this?",
|
|
209
|
+
"body": "I hope it arrived!",
|
|
210
|
+
"type": "send_email",
|
|
211
|
+
"uuid": "a0f3f1f2-1869-4ad6-9fb0-e610a3e00ae7"
|
|
249
212
|
},
|
|
250
213
|
{
|
|
251
214
|
"type": "remove_contact_groups",
|
|
@@ -283,20 +246,57 @@
|
|
|
283
246
|
"uuid": "6ec87721-6ec2-43fa-b7d2-930bf1f0574d"
|
|
284
247
|
},
|
|
285
248
|
{
|
|
286
|
-
"
|
|
287
|
-
|
|
249
|
+
"uuid": "730ae625-6535-467b-98af-ea83e9d27884",
|
|
250
|
+
"type": "set_contact_language",
|
|
251
|
+
"language": "eng"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"type": "add_contact_groups",
|
|
255
|
+
"groups": [
|
|
256
|
+
{
|
|
257
|
+
"uuid": "269e8abf-e81b-404c-82ce-45ff42d13769",
|
|
258
|
+
"name": "Empty",
|
|
259
|
+
"query": null,
|
|
260
|
+
"status": "ready",
|
|
261
|
+
"system": false,
|
|
262
|
+
"count": 0
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"uuid": "58a6a3cd-20c0-4791-82da-ce9f319ab91b",
|
|
266
|
+
"name": "Farmers",
|
|
267
|
+
"query": null,
|
|
268
|
+
"status": "ready",
|
|
269
|
+
"system": false,
|
|
270
|
+
"count": 2414
|
|
271
|
+
}
|
|
288
272
|
],
|
|
289
|
-
"
|
|
290
|
-
"body": "I hope it arrived!",
|
|
291
|
-
"type": "send_email",
|
|
292
|
-
"uuid": "a0f3f1f2-1869-4ad6-9fb0-e610a3e00ae7"
|
|
273
|
+
"uuid": "d1ca86da-f321-4e09-8bb2-981de03f5a90"
|
|
293
274
|
},
|
|
294
275
|
{
|
|
295
|
-
"type": "
|
|
296
|
-
"
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
276
|
+
"type": "add_input_labels",
|
|
277
|
+
"labels": [
|
|
278
|
+
{
|
|
279
|
+
"uuid": "61cae99b-56e1-4f3e-a2b9-07fb5cf2be9e",
|
|
280
|
+
"name": "Spam",
|
|
281
|
+
"count": 0
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
"uuid": "d0d1571c-bf9e-4156-ac7c-984789c71472"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"type": "add_contact_urn",
|
|
288
|
+
"uuid": "9ddb2da4-03da-40a9-9cec-06c9d05b6e72",
|
|
289
|
+
"scheme": "tel",
|
|
290
|
+
"path": "12065551212"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"uuid": "a0b17ce5-f0f2-4c07-b399-facecbb403ae",
|
|
294
|
+
"type": "set_contact_field",
|
|
295
|
+
"field": {
|
|
296
|
+
"name": "Color",
|
|
297
|
+
"key": "color"
|
|
298
|
+
},
|
|
299
|
+
"value": "@results.color.category"
|
|
300
300
|
}
|
|
301
301
|
],
|
|
302
302
|
"exits": [
|
|
@@ -768,16 +768,16 @@
|
|
|
768
768
|
"nodes": {
|
|
769
769
|
"a229fa3c-16bb-440b-9ae8-b7ee7a723f44": {
|
|
770
770
|
"position": {
|
|
771
|
-
"left":
|
|
772
|
-
"top":
|
|
771
|
+
"left": 980,
|
|
772
|
+
"top": 20
|
|
773
773
|
},
|
|
774
774
|
"type": "execute_actions"
|
|
775
775
|
},
|
|
776
776
|
"ef1a5b06-1331-4c0d-9f46-58b1e5baf671": {
|
|
777
777
|
"type": "wait_for_response",
|
|
778
778
|
"position": {
|
|
779
|
-
"left":
|
|
780
|
-
"top":
|
|
779
|
+
"left": 780,
|
|
780
|
+
"top": 180
|
|
781
781
|
},
|
|
782
782
|
"config": {
|
|
783
783
|
"cases": {}
|
|
@@ -786,31 +786,31 @@
|
|
|
786
786
|
"e1f22e97-a170-44b4-a79b-98ab916f4c34": {
|
|
787
787
|
"type": "split_by_webhook",
|
|
788
788
|
"position": {
|
|
789
|
-
"left":
|
|
790
|
-
"top":
|
|
789
|
+
"left": 760,
|
|
790
|
+
"top": 440
|
|
791
791
|
},
|
|
792
792
|
"config": {}
|
|
793
793
|
},
|
|
794
794
|
"4efc49e0-ebfe-454d-a1a0-900a911dd5ef": {
|
|
795
795
|
"position": {
|
|
796
|
-
"left":
|
|
797
|
-
"top":
|
|
796
|
+
"left": 240,
|
|
797
|
+
"top": 0
|
|
798
798
|
},
|
|
799
799
|
"type": "execute_actions"
|
|
800
800
|
},
|
|
801
801
|
"2c60c381-487d-42cd-80be-a31f44c36fd9": {
|
|
802
802
|
"type": "split_by_subflow",
|
|
803
803
|
"position": {
|
|
804
|
-
"left":
|
|
805
|
-
"top":
|
|
804
|
+
"left": 840,
|
|
805
|
+
"top": 600
|
|
806
806
|
},
|
|
807
807
|
"config": {}
|
|
808
808
|
},
|
|
809
809
|
"f115fdb0-d92d-47a2-96f3-e03e36767b14": {
|
|
810
810
|
"type": "split_by_contact_field",
|
|
811
811
|
"position": {
|
|
812
|
-
"left":
|
|
813
|
-
"top":
|
|
812
|
+
"left": 480,
|
|
813
|
+
"top": 40
|
|
814
814
|
},
|
|
815
815
|
"config": {
|
|
816
816
|
"operand": {
|
|
@@ -824,8 +824,8 @@
|
|
|
824
824
|
"b85000c4-1990-4d86-807a-1318ea512708": {
|
|
825
825
|
"type": "split_by_expression",
|
|
826
826
|
"position": {
|
|
827
|
-
"left":
|
|
828
|
-
"top":
|
|
827
|
+
"left": 480,
|
|
828
|
+
"top": 440
|
|
829
829
|
},
|
|
830
830
|
"config": {
|
|
831
831
|
"cases": {}
|
|
@@ -834,16 +834,16 @@
|
|
|
834
834
|
"8ecec688-f154-4b80-a0b3-3cbff0fac892": {
|
|
835
835
|
"type": "split_by_random",
|
|
836
836
|
"position": {
|
|
837
|
-
"left":
|
|
838
|
-
"top":
|
|
837
|
+
"left": 780,
|
|
838
|
+
"top": 300
|
|
839
839
|
},
|
|
840
840
|
"config": null
|
|
841
841
|
},
|
|
842
842
|
"66171418-2368-44b9-95db-fdf7cd5cf4fe": {
|
|
843
843
|
"type": "split_by_run_result",
|
|
844
844
|
"position": {
|
|
845
|
-
"left":
|
|
846
|
-
"top":
|
|
845
|
+
"left": 480,
|
|
846
|
+
"top": 140
|
|
847
847
|
},
|
|
848
848
|
"config": {
|
|
849
849
|
"operand": {
|
|
@@ -857,8 +857,8 @@
|
|
|
857
857
|
"5f1394c1-4b8c-4357-8863-db24817b2aa3": {
|
|
858
858
|
"type": "split_by_groups",
|
|
859
859
|
"position": {
|
|
860
|
-
"left":
|
|
861
|
-
"top":
|
|
860
|
+
"left": 480,
|
|
861
|
+
"top": 240
|
|
862
862
|
},
|
|
863
863
|
"config": {
|
|
864
864
|
"cases": {}
|
|
@@ -867,8 +867,8 @@
|
|
|
867
867
|
"e780a7ef-9dad-45a3-abda-11200a9afbf4": {
|
|
868
868
|
"type": "split_by_scheme",
|
|
869
869
|
"position": {
|
|
870
|
-
"left":
|
|
871
|
-
"top":
|
|
870
|
+
"left": 480,
|
|
871
|
+
"top": 340
|
|
872
872
|
},
|
|
873
873
|
"config": {
|
|
874
874
|
"cases": {}
|
|
@@ -877,23 +877,23 @@
|
|
|
877
877
|
"3dfe9cf2-72d1-496f-8d20-d5743af0f9c8": {
|
|
878
878
|
"type": "split_by_llm",
|
|
879
879
|
"position": {
|
|
880
|
-
"left":
|
|
881
|
-
"top":
|
|
880
|
+
"left": 480,
|
|
881
|
+
"top": 560
|
|
882
882
|
},
|
|
883
883
|
"config": {}
|
|
884
884
|
},
|
|
885
885
|
"425c4757-bead-440f-92aa-a1cc3fcd7d35": {
|
|
886
886
|
"position": {
|
|
887
|
-
"left":
|
|
888
|
-
"top":
|
|
887
|
+
"left": 480,
|
|
888
|
+
"top": 760
|
|
889
889
|
},
|
|
890
890
|
"type": "execute_actions"
|
|
891
891
|
},
|
|
892
892
|
"21ff86c2-5276-4448-afb6-54d1f832ba0c": {
|
|
893
893
|
"type": "split_by_ticket",
|
|
894
894
|
"position": {
|
|
895
|
-
"left":
|
|
896
|
-
"top":
|
|
895
|
+
"left": 500,
|
|
896
|
+
"top": 1000
|
|
897
897
|
},
|
|
898
898
|
"config": {}
|
|
899
899
|
}
|
|
@@ -901,21 +901,48 @@
|
|
|
901
901
|
"stickies": {
|
|
902
902
|
"1a32aff1-36b9-48e3-a51e-382efdcb9a83": {
|
|
903
903
|
"position": {
|
|
904
|
-
"left":
|
|
905
|
-
"top":
|
|
904
|
+
"left": 0,
|
|
905
|
+
"top": 0
|
|
906
906
|
},
|
|
907
|
-
"title": "
|
|
908
|
-
"body": "This flow makes no sense. That's because it's just for general testing.",
|
|
907
|
+
"title": "Yellow Note",
|
|
908
|
+
"body": "This flow makes no sense. That's because it's just for general testing. We can keep typing in this div though and it is interesting how it just keeps expanding even if it isn't a textarea.",
|
|
909
909
|
"color": "yellow"
|
|
910
910
|
},
|
|
911
911
|
"598a87e4-f20b-48ba-aac5-bb365d8f1509": {
|
|
912
912
|
"position": {
|
|
913
|
-
"left":
|
|
914
|
-
"top":
|
|
913
|
+
"left": 0,
|
|
914
|
+
"top": 340
|
|
915
915
|
},
|
|
916
|
-
"title": "
|
|
917
|
-
"body": "Did you know stickies can have different colors?",
|
|
916
|
+
"title": "Blue Note",
|
|
917
|
+
"body": "Did you know stickies can have different colors? I just realized that and I'm pretty happy to report that this expands really nicely. It seems to be working okay I think. This.",
|
|
918
918
|
"color": "blue"
|
|
919
|
+
},
|
|
920
|
+
"598a87e4-f20b-48ba-aac5-bb365d8f1501": {
|
|
921
|
+
"position": {
|
|
922
|
+
"left": 0,
|
|
923
|
+
"top": 200
|
|
924
|
+
},
|
|
925
|
+
"title": "Green Note",
|
|
926
|
+
"body": "They also come in green, do I like them better? Maybe I do. There is a standard height, they will have to get used to it.",
|
|
927
|
+
"color": "green"
|
|
928
|
+
},
|
|
929
|
+
"598a87e4-f20b-48ba-aac5-bb365d8f1502": {
|
|
930
|
+
"position": {
|
|
931
|
+
"left": 0,
|
|
932
|
+
"top": 520
|
|
933
|
+
},
|
|
934
|
+
"title": "Pinky Note",
|
|
935
|
+
"body": "This is a test. How much do I like writing in pink? Seems pretty nice honestly! I think Imma go with it",
|
|
936
|
+
"color": "pink"
|
|
937
|
+
},
|
|
938
|
+
"598a87e4-f20b-48ba-aac5-bb365d8f1503": {
|
|
939
|
+
"position": {
|
|
940
|
+
"left": 0,
|
|
941
|
+
"top": 660
|
|
942
|
+
},
|
|
943
|
+
"title": "Gray Day",
|
|
944
|
+
"body": "Or grey even, toots!",
|
|
945
|
+
"color": "gray"
|
|
919
946
|
}
|
|
920
947
|
}
|
|
921
948
|
},
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"period": ["2023-12-31", "2025-06-07"],
|
|
3
|
+
"data": {
|
|
4
|
+
"labels": [
|
|
5
|
+
"2023-12-31",
|
|
6
|
+
"2025-05-27",
|
|
7
|
+
"2025-05-28",
|
|
8
|
+
"2025-05-29",
|
|
9
|
+
"2025-05-30",
|
|
10
|
+
"2025-05-31",
|
|
11
|
+
"2025-06-01",
|
|
12
|
+
"2025-06-02",
|
|
13
|
+
"2025-06-03",
|
|
14
|
+
"2025-06-04",
|
|
15
|
+
"2025-06-05",
|
|
16
|
+
"2025-06-06"
|
|
17
|
+
],
|
|
18
|
+
"datasets": [
|
|
19
|
+
{
|
|
20
|
+
"label": "General",
|
|
21
|
+
"data": [31, 141, 60, 20, 49, 92, 109, 140, 214, 60, 70]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"label": "VIPs",
|
|
25
|
+
"data": [9, 97, 95, 55, 32, 61, 78, 115, 20, 91, 83]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"label": "Orders",
|
|
29
|
+
"data": [51, 84, 71, 78, 44, 45, 106, 114, 138, 125, 83]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"label": "Survey",
|
|
33
|
+
"data": [57, 31, 42, 63, 32, 11, 52, 35, 14, 160, 15]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"label": "Tracking",
|
|
37
|
+
"data": [10, 26, 28, 43, 16, 10, 36, 24, 18, 26, 9]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"label": "Birds",
|
|
41
|
+
"data": [31, 141, 60, 20, 49, 92, 109, 140, 214, 60, 70]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"label": "Dogs",
|
|
45
|
+
"data": [9, 97, 95, 55, 32, 61, 78, 115, 20, 91, 83]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"label": "Cats",
|
|
49
|
+
"data": [51, 84, 71, 78, 44, 45, 106, 114, 138, 125, 83]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>StickyNote Drag vs Edit Demo</title>
|
|
6
|
+
<link
|
|
7
|
+
href="/static/css/temba-components.css"
|
|
8
|
+
rel="stylesheet"
|
|
9
|
+
type="text/css"
|
|
10
|
+
/>
|
|
11
|
+
<style>
|
|
12
|
+
body {
|
|
13
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
14
|
+
sans-serif;
|
|
15
|
+
padding: 20px;
|
|
16
|
+
max-width: 1200px;
|
|
17
|
+
margin: 0 auto;
|
|
18
|
+
background-color: #f5f5f5;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.instructions {
|
|
22
|
+
background: #e3f2fd;
|
|
23
|
+
padding: 20px;
|
|
24
|
+
border-radius: 8px;
|
|
25
|
+
margin-bottom: 20px;
|
|
26
|
+
border-left: 4px solid #1976d2;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.instructions h2 {
|
|
30
|
+
margin-top: 0;
|
|
31
|
+
color: #1976d2;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.instructions ul {
|
|
35
|
+
margin-bottom: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.instructions li {
|
|
39
|
+
margin-bottom: 8px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.demo-container {
|
|
43
|
+
position: relative;
|
|
44
|
+
background-color: #f9f9f9;
|
|
45
|
+
height: 600px;
|
|
46
|
+
border: 1px solid #ddd;
|
|
47
|
+
margin: 20px 0;
|
|
48
|
+
border-radius: 8px;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
}
|
|
51
|
+
.demo-title {
|
|
52
|
+
font-size: 18px;
|
|
53
|
+
font-weight: bold;
|
|
54
|
+
margin-bottom: 10px;
|
|
55
|
+
}
|
|
56
|
+
.instructions {
|
|
57
|
+
background-color: #e6f3ff;
|
|
58
|
+
padding: 15px;
|
|
59
|
+
border-radius: 8px;
|
|
60
|
+
margin-bottom: 20px;
|
|
61
|
+
}
|
|
62
|
+
.instructions ul {
|
|
63
|
+
margin: 10px 0;
|
|
64
|
+
padding-left: 20px;
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
67
|
+
</head>
|
|
68
|
+
<body>
|
|
69
|
+
<h1>StickyNote Component Demo</h1>
|
|
70
|
+
|
|
71
|
+
<div class="instructions">
|
|
72
|
+
<strong>How to use StickyNotes:</strong>
|
|
73
|
+
<ul>
|
|
74
|
+
<li>Click and drag the sticky notes to move them around</li>
|
|
75
|
+
<li>Click on the title or body text to edit it inline</li>
|
|
76
|
+
<li>Press Enter or Escape to finish editing</li>
|
|
77
|
+
<li>Notes snap to a 20px grid when you finish dragging</li>
|
|
78
|
+
<li>Each color has its own visual theme</li>
|
|
79
|
+
</ul>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="demo-title">Interactive StickyNotes:</div>
|
|
83
|
+
<div class="demo-container">
|
|
84
|
+
<!-- Yellow sticky note -->
|
|
85
|
+
<temba-sticky-note id="yellow-note"></temba-sticky-note>
|
|
86
|
+
|
|
87
|
+
<!-- Blue sticky note -->
|
|
88
|
+
<temba-sticky-note id="blue-note"></temba-sticky-note>
|
|
89
|
+
|
|
90
|
+
<!-- Pink sticky note -->
|
|
91
|
+
<temba-sticky-note id="pink-note"></temba-sticky-note>
|
|
92
|
+
|
|
93
|
+
<!-- Green sticky note -->
|
|
94
|
+
<temba-sticky-note id="green-note"></temba-sticky-note>
|
|
95
|
+
|
|
96
|
+
<!-- Gray sticky note -->
|
|
97
|
+
<temba-sticky-note id="gray-note"></temba-sticky-note>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<script type="module">
|
|
101
|
+
import '/out-tsc/temba-modules.js';
|
|
102
|
+
|
|
103
|
+
// Configure the sticky notes with sample data
|
|
104
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
105
|
+
const yellowNote = document.getElementById('yellow-note');
|
|
106
|
+
yellowNote.uuid = 'yellow-uuid';
|
|
107
|
+
yellowNote.data = {
|
|
108
|
+
position: { left: 50, top: 50 },
|
|
109
|
+
title: 'Yellow Note',
|
|
110
|
+
body: 'This is a yellow sticky note! Click to edit me.',
|
|
111
|
+
color: 'yellow'
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const blueNote = document.getElementById('blue-note');
|
|
115
|
+
blueNote.uuid = 'blue-uuid';
|
|
116
|
+
blueNote.data = {
|
|
117
|
+
position: { left: 300, top: 120 },
|
|
118
|
+
title: 'Blue Note',
|
|
119
|
+
body: 'Blue notes are cool and calm. Drag me around!',
|
|
120
|
+
color: 'blue'
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const pinkNote = document.getElementById('pink-note');
|
|
124
|
+
pinkNote.uuid = 'pink-uuid';
|
|
125
|
+
pinkNote.data = {
|
|
126
|
+
position: { left: 550, top: 80 },
|
|
127
|
+
title: 'Pink Note',
|
|
128
|
+
body: 'Pink is vibrant and fun. Try editing my text!',
|
|
129
|
+
color: 'pink'
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const greenNote = document.getElementById('green-note');
|
|
133
|
+
greenNote.uuid = 'green-uuid';
|
|
134
|
+
greenNote.data = {
|
|
135
|
+
position: { left: 100, top: 250 },
|
|
136
|
+
title: 'Green Note',
|
|
137
|
+
body: 'Green represents nature and growth. I can grow in height as you type more content in my body!',
|
|
138
|
+
color: 'green'
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const grayNote = document.getElementById('gray-note');
|
|
142
|
+
grayNote.uuid = 'gray-uuid';
|
|
143
|
+
grayNote.data = {
|
|
144
|
+
position: { left: 400, top: 300 },
|
|
145
|
+
title: 'Gray Note',
|
|
146
|
+
body: 'Gray is neutral and professional.',
|
|
147
|
+
color: 'gray'
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
</script>
|
|
151
|
+
</body>
|
|
152
|
+
</html>
|
package/dist/locales/es.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
/* eslint-disable no-irregular-whitespace */
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
5
|
export const templates = {
|
|
6
|
-
scf1453991c986b25: `Tab para completar, enter para seleccionar`,
|
|
7
|
-
s73b4d70c02f4b4e0: `No options`,
|
|
8
|
-
s8f02e3a18ffc083a: `Are not currently in a flow`,
|
|
9
|
-
s638236250662c6b3: `Have sent a message in the last`,
|
|
10
|
-
s4788ee206c4570c7: `Have not started this flow in the last 90 days
|
|
6
|
+
'scf1453991c986b25': `Tab para completar, enter para seleccionar`,
|
|
7
|
+
's73b4d70c02f4b4e0': `No options`,
|
|
8
|
+
's8f02e3a18ffc083a': `Are not currently in a flow`,
|
|
9
|
+
's638236250662c6b3': `Have sent a message in the last`,
|
|
10
|
+
's4788ee206c4570c7': `Have not started this flow in the last 90 days`,
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=es.js.map
|
package/dist/locales/es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.js","sourceRoot":"","sources":["../../../src/locales/es.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"es.js","sourceRoot":"","sources":["../../../src/locales/es.ts"],"names":[],"mappings":"AACI,mCAAmC;AACnC,gDAAgD;AAKhD,4CAA4C;AAC5C,uDAAuD;AAEvD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,mBAAmB,EAAE,4CAA4C;IACvE,mBAAmB,EAAE,YAAY;IACjC,mBAAmB,EAAE,6BAA6B;IAClD,mBAAmB,EAAE,iCAAiC;IACtD,mBAAmB,EAAE,gDAAgD;CAChE,CAAC","sourcesContent":["\n // Do not modify this file by hand!\n // Re-generate this file by running lit-localize\n\n \n \n\n /* eslint-disable no-irregular-whitespace */\n /* eslint-disable @typescript-eslint/no-explicit-any */\n\n export const templates = {\n 'scf1453991c986b25': `Tab para completar, enter para seleccionar`,\n's73b4d70c02f4b4e0': `No options`,\n's8f02e3a18ffc083a': `Are not currently in a flow`,\n's638236250662c6b3': `Have sent a message in the last`,\n's4788ee206c4570c7': `Have not started this flow in the last 90 days`,\n };\n "]}
|