@almadar/std 16.192.0 → 16.193.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.
@@ -0,0 +1,1360 @@
1
+ {
2
+ "description": "std-tag-strip — inline tag editing ON the document surface: the record's tags render as removable chips with a type-to-add input (a typed name that matches an existing tag attaches it; an unknown name is created in the shared taxonomy first), plus one-click chips for every existing tag not yet attached. Emits TAGS_CHANGED { id, tagIds } — the host organism routes it into its persistor's update; the document's refetch re-scopes the strip. Binds any record carrying a tagIds relation array; the tag store is the shared `tags` collection (std-tag-taxonomy's).",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01M1780JG2X1QJQSR415FHPQ9N": {
6
+ "bakedName": "StripTag",
7
+ "curName": "StripTag",
8
+ "id": "ent_01M1780JG2X1QJQSR415FHPQ9N",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01M1780JG23PP1ZZCKDT50N36S": {
14
+ "bakedName": "TagStripOptions",
15
+ "curName": "TagStripOptions",
16
+ "id": "evt_01M1780JG23PP1ZZCKDT50N36S",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
20
+ "renames": []
21
+ },
22
+ "evt_01M1780JG24RDSS3D2ZW6TBYSA": {
23
+ "bakedName": "ADD_TAG",
24
+ "curName": "ADD_TAG",
25
+ "id": "evt_01M1780JG24RDSS3D2ZW6TBYSA",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
29
+ "renames": []
30
+ },
31
+ "evt_01M1780JG2FY7B6BJ5DBV4GZB1": {
32
+ "bakedName": "SHOW_TAG_STRIP",
33
+ "curName": "SHOW_TAG_STRIP",
34
+ "id": "evt_01M1780JG2FY7B6BJ5DBV4GZB1",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
38
+ "renames": []
39
+ },
40
+ "evt_01M1780JG2KZR8W8YJ4B4PS55D": {
41
+ "bakedName": "TagStripRemoveOptions",
42
+ "curName": "TagStripRemoveOptions",
43
+ "id": "evt_01M1780JG2KZR8W8YJ4B4PS55D",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
47
+ "renames": []
48
+ },
49
+ "evt_01M1780JG2N02T1ZNKN3JJR7Y5": {
50
+ "bakedName": "TagStripTagCreated",
51
+ "curName": "TagStripTagCreated",
52
+ "id": "evt_01M1780JG2N02T1ZNKN3JJR7Y5",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
56
+ "renames": []
57
+ },
58
+ "evt_01M1780JG2STQCYHYMCS8F43KZ": {
59
+ "bakedName": "TagStripAddOptions",
60
+ "curName": "TagStripAddOptions",
61
+ "id": "evt_01M1780JG2STQCYHYMCS8F43KZ",
62
+ "kind": "event",
63
+ "owner": "workspace",
64
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
65
+ "renames": []
66
+ },
67
+ "evt_01M1780JG2V44SG4PT280FRXM5": {
68
+ "bakedName": "TagStripLoadFailed",
69
+ "curName": "TagStripLoadFailed",
70
+ "id": "evt_01M1780JG2V44SG4PT280FRXM5",
71
+ "kind": "event",
72
+ "owner": "workspace",
73
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
74
+ "renames": []
75
+ },
76
+ "evt_01M1780JG2X7ZKZWS1JDW4VRA9": {
77
+ "bakedName": "REMOVE_TAG",
78
+ "curName": "REMOVE_TAG",
79
+ "id": "evt_01M1780JG2X7ZKZWS1JDW4VRA9",
80
+ "kind": "event",
81
+ "owner": "workspace",
82
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
83
+ "renames": []
84
+ },
85
+ "evt_01M1780JG2Y18SGMQG35H6DZQD": {
86
+ "bakedName": "INIT",
87
+ "curName": "INIT",
88
+ "id": "evt_01M1780JG2Y18SGMQG35H6DZQD",
89
+ "kind": "event",
90
+ "owner": "workspace",
91
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
92
+ "renames": []
93
+ },
94
+ "evt_01M1780JG2YCC9VE2N8D4D2KG1": {
95
+ "bakedName": "TAGS_CHANGED",
96
+ "curName": "TAGS_CHANGED",
97
+ "id": "evt_01M1780JG2YCC9VE2N8D4D2KG1",
98
+ "kind": "event",
99
+ "owner": "workspace",
100
+ "parent": "trt_01M1780JG2V6JMQHA212RS37N8",
101
+ "renames": []
102
+ },
103
+ "orb_01M1780JG2SCR85NW1BWQWKVXN": {
104
+ "bakedName": "TagStripOrbital",
105
+ "curName": "TagStripOrbital",
106
+ "id": "orb_01M1780JG2SCR85NW1BWQWKVXN",
107
+ "kind": "orbital",
108
+ "owner": "workspace",
109
+ "renames": []
110
+ },
111
+ "pag_01M1780JG220EQAZE8KE3DMCYY": {
112
+ "bakedName": "TagStripDemoPage",
113
+ "curName": "TagStripDemoPage",
114
+ "id": "pag_01M1780JG220EQAZE8KE3DMCYY",
115
+ "kind": "page",
116
+ "owner": "workspace",
117
+ "renames": []
118
+ },
119
+ "trt_01M1780JG2V6JMQHA212RS37N8": {
120
+ "bakedName": "TagStrip",
121
+ "curName": "TagStrip",
122
+ "id": "trt_01M1780JG2V6JMQHA212RS37N8",
123
+ "kind": "trait",
124
+ "owner": "workspace",
125
+ "renames": []
126
+ }
127
+ },
128
+ "schemaVersion": 1
129
+ },
130
+ "name": "std-tag-strip",
131
+ "orbitals": [
132
+ {
133
+ "entity": {
134
+ "collection": "tags",
135
+ "fields": [
136
+ {
137
+ "name": "id",
138
+ "required": true,
139
+ "type": "string"
140
+ },
141
+ {
142
+ "description": "The descriptive label for this tag.",
143
+ "name": "name",
144
+ "required": true,
145
+ "synonyms": "label, title",
146
+ "type": "string"
147
+ },
148
+ {
149
+ "description": "Reference to the parent tag in the hierarchy; empty marks a root.",
150
+ "name": "parentId",
151
+ "relation": {
152
+ "cardinality": "one",
153
+ "entity": "StripTag",
154
+ "entityId": "ent_01M1780JG2X1QJQSR415FHPQ9N"
155
+ },
156
+ "synonyms": "parent, ancestor",
157
+ "type": "relation"
158
+ },
159
+ {
160
+ "default": "",
161
+ "name": "createdAt",
162
+ "type": "string"
163
+ },
164
+ {
165
+ "default": "",
166
+ "name": "pendingId",
167
+ "type": "string"
168
+ },
169
+ {
170
+ "default": "",
171
+ "description": "The open record's id, stashed at SHOW_TAG_STRIP so commits know which row to update.",
172
+ "intrinsic": true,
173
+ "name": "docId",
174
+ "synonyms": "record id, scope id",
175
+ "type": "string"
176
+ },
177
+ {
178
+ "description": "The open record's current tag ids, stashed at SHOW_TAG_STRIP for membership tests.",
179
+ "intrinsic": true,
180
+ "items": {
181
+ "type": "string"
182
+ },
183
+ "name": "docTagIds",
184
+ "synonyms": "attached tags, current tags",
185
+ "type": "array"
186
+ },
187
+ {
188
+ "default": "",
189
+ "description": "The tag name typed or clicked on add, held across the resolve fetch.",
190
+ "intrinsic": true,
191
+ "name": "pendingTagName",
192
+ "synonyms": "typed tag, adding tag",
193
+ "type": "string"
194
+ },
195
+ {
196
+ "description": "The chip names remaining after a remove, held across the resolve fetch.",
197
+ "intrinsic": true,
198
+ "items": {
199
+ "type": "string"
200
+ },
201
+ "name": "pendingNames",
202
+ "synonyms": "remaining tags, kept names",
203
+ "type": "array"
204
+ }
205
+ ],
206
+ "id": "ent_01M1780JG2X1QJQSR415FHPQ9N",
207
+ "name": "StripTag",
208
+ "persistence": "persistent"
209
+ },
210
+ "id": "orb_01M1780JG2SCR85NW1BWQWKVXN",
211
+ "name": "TagStripOrbital",
212
+ "pages": [
213
+ {
214
+ "id": "pag_01M1780JG220EQAZE8KE3DMCYY",
215
+ "name": "TagStripDemoPage",
216
+ "path": "/tagstrip/demo",
217
+ "traits": [
218
+ {
219
+ "ref": "TagStrip",
220
+ "refId": "trt_01M1780JG2V6JMQHA212RS37N8"
221
+ }
222
+ ]
223
+ }
224
+ ],
225
+ "traits": [
226
+ {
227
+ "category": "interaction",
228
+ "config": {
229
+ "helperText": {
230
+ "default": "",
231
+ "description": "Optional helper line under the input",
232
+ "label": "Helper text",
233
+ "tier": "presentation",
234
+ "type": "string"
235
+ },
236
+ "placeholder": {
237
+ "default": "Add a tag…",
238
+ "description": "Placeholder in the type-to-add input",
239
+ "label": "Input placeholder",
240
+ "tier": "presentation",
241
+ "type": "string"
242
+ },
243
+ "title": {
244
+ "default": "Tags",
245
+ "description": "Small caption above the chips; empty hides it",
246
+ "label": "Strip caption",
247
+ "tier": "presentation",
248
+ "type": "string"
249
+ }
250
+ },
251
+ "emits": [
252
+ {
253
+ "description": "The record's tag set changed (chip added or removed); the host routes this into its persistor's update so the write and the refetch stay the organism's.",
254
+ "event": "TAGS_CHANGED",
255
+ "eventId": "evt_01M1780JG2YCC9VE2N8D4D2KG1",
256
+ "payloadSchema": [
257
+ {
258
+ "name": "id",
259
+ "type": "string"
260
+ },
261
+ {
262
+ "name": "tagIds",
263
+ "type": "[string]"
264
+ }
265
+ ],
266
+ "scope": "external",
267
+ "synonyms": "tags updated, tag set changed, retagged",
268
+ "tier": "domain"
269
+ },
270
+ {
271
+ "description": "A tag name was typed into the strip or an existing tag's suggestion chip was clicked.",
272
+ "event": "ADD_TAG",
273
+ "eventId": "evt_01M1780JG24RDSS3D2ZW6TBYSA",
274
+ "payloadSchema": [
275
+ {
276
+ "name": "tag",
277
+ "required": true,
278
+ "type": "string"
279
+ }
280
+ ],
281
+ "synonyms": "attach tag, add label",
282
+ "tier": "presentation"
283
+ },
284
+ {
285
+ "description": "A chip's remove affordance was clicked; value carries the names that remain.",
286
+ "event": "REMOVE_TAG",
287
+ "eventId": "evt_01M1780JG2X7ZKZWS1JDW4VRA9",
288
+ "payloadSchema": [
289
+ {
290
+ "name": "tag",
291
+ "type": "string"
292
+ },
293
+ {
294
+ "name": "value",
295
+ "type": "[string]"
296
+ }
297
+ ],
298
+ "synonyms": "detach tag, remove label",
299
+ "tier": "presentation"
300
+ },
301
+ {
302
+ "description": "The shared tag store loaded for the display pass.",
303
+ "event": "TagStripOptions",
304
+ "eventId": "evt_01M1780JG23PP1ZZCKDT50N36S",
305
+ "payloadSchema": [
306
+ {
307
+ "name": "data",
308
+ "type": "[StripTag]"
309
+ }
310
+ ],
311
+ "tier": "internal"
312
+ },
313
+ {
314
+ "description": "The shared tag store loaded to resolve a typed name on add.",
315
+ "event": "TagStripAddOptions",
316
+ "eventId": "evt_01M1780JG2STQCYHYMCS8F43KZ",
317
+ "payloadSchema": [
318
+ {
319
+ "name": "data",
320
+ "type": "[StripTag]"
321
+ }
322
+ ],
323
+ "tier": "internal"
324
+ },
325
+ {
326
+ "description": "The shared tag store loaded to resolve the remaining names on remove.",
327
+ "event": "TagStripRemoveOptions",
328
+ "eventId": "evt_01M1780JG2KZR8W8YJ4B4PS55D",
329
+ "payloadSchema": [
330
+ {
331
+ "name": "data",
332
+ "type": "[StripTag]"
333
+ }
334
+ ],
335
+ "tier": "internal"
336
+ },
337
+ {
338
+ "description": "A typed name had no existing tag; a fresh row was created in the shared taxonomy.",
339
+ "event": "TagStripTagCreated",
340
+ "eventId": "evt_01M1780JG2N02T1ZNKN3JJR7Y5",
341
+ "payloadSchema": [
342
+ {
343
+ "name": "id",
344
+ "type": "string"
345
+ },
346
+ {
347
+ "name": "row",
348
+ "properties": [
349
+ {
350
+ "name": "id",
351
+ "required": true,
352
+ "type": "string"
353
+ },
354
+ {
355
+ "name": "name",
356
+ "required": true,
357
+ "type": "string"
358
+ },
359
+ {
360
+ "name": "parentId",
361
+ "type": "StripTag"
362
+ },
363
+ {
364
+ "name": "createdAt",
365
+ "type": "string"
366
+ },
367
+ {
368
+ "name": "pendingId",
369
+ "type": "string"
370
+ },
371
+ {
372
+ "name": "docId",
373
+ "type": "string"
374
+ },
375
+ {
376
+ "name": "docTagIds",
377
+ "type": "[string]"
378
+ },
379
+ {
380
+ "name": "pendingTagName",
381
+ "type": "string"
382
+ },
383
+ {
384
+ "name": "pendingNames",
385
+ "type": "[string]"
386
+ }
387
+ ],
388
+ "type": "object"
389
+ }
390
+ ],
391
+ "tier": "internal"
392
+ },
393
+ {
394
+ "description": "The tag store fetch or create failed.",
395
+ "event": "TagStripLoadFailed",
396
+ "eventId": "evt_01M1780JG2V44SG4PT280FRXM5",
397
+ "payloadSchema": [
398
+ {
399
+ "name": "error",
400
+ "type": "string"
401
+ },
402
+ {
403
+ "name": "code",
404
+ "type": "string"
405
+ }
406
+ ],
407
+ "tier": "internal"
408
+ }
409
+ ],
410
+ "entityContract": {
411
+ "provides": [
412
+ "docId",
413
+ "docTagIds",
414
+ "pendingNames",
415
+ "pendingTagName"
416
+ ],
417
+ "requires": []
418
+ },
419
+ "entityRebindable": true,
420
+ "entityRefIds": {
421
+ "StripTag": "ent_01M1780JG2X1QJQSR415FHPQ9N"
422
+ },
423
+ "id": "trt_01M1780JG2V6JMQHA212RS37N8",
424
+ "linkedEntity": "StripTag",
425
+ "linkedEntityId": "ent_01M1780JG2X1QJQSR415FHPQ9N",
426
+ "name": "TagStrip",
427
+ "scope": "collection",
428
+ "stateMachine": {
429
+ "events": [
430
+ {
431
+ "id": "evt_01M1780JG2Y18SGMQG35H6DZQD",
432
+ "key": "INIT",
433
+ "name": "Initialize"
434
+ },
435
+ {
436
+ "description": "The shared tag store loaded for the display pass.",
437
+ "id": "evt_01M1780JG23PP1ZZCKDT50N36S",
438
+ "key": "TagStripOptions",
439
+ "name": "Tag strip options",
440
+ "payloadSchema": [
441
+ {
442
+ "name": "data",
443
+ "type": "[StripTag]"
444
+ }
445
+ ],
446
+ "tier": "internal"
447
+ },
448
+ {
449
+ "description": "The tag store fetch or create failed.",
450
+ "id": "evt_01M1780JG2V44SG4PT280FRXM5",
451
+ "key": "TagStripLoadFailed",
452
+ "name": "Tag strip load failed",
453
+ "payloadSchema": [
454
+ {
455
+ "name": "error",
456
+ "type": "string"
457
+ },
458
+ {
459
+ "name": "code",
460
+ "type": "string"
461
+ }
462
+ ],
463
+ "tier": "internal"
464
+ },
465
+ {
466
+ "description": "Scope the strip to the open record — routed from the document's load events; carries the record's id and current tag ids (hydrated tag rows are normalized to their ids at stash time, so include-hydrated fetches route straight through).",
467
+ "id": "evt_01M1780JG2FY7B6BJ5DBV4GZB1",
468
+ "key": "SHOW_TAG_STRIP",
469
+ "name": "Show Tag Strip",
470
+ "payloadSchema": [
471
+ {
472
+ "name": "id",
473
+ "required": true,
474
+ "type": "string"
475
+ },
476
+ {
477
+ "name": "tagIds",
478
+ "type": "[string]"
479
+ }
480
+ ],
481
+ "synonyms": "load tags, scope tag strip, show tags",
482
+ "tier": "domain"
483
+ },
484
+ {
485
+ "description": "A tag name was typed into the strip or an existing tag's suggestion chip was clicked.",
486
+ "id": "evt_01M1780JG24RDSS3D2ZW6TBYSA",
487
+ "key": "ADD_TAG",
488
+ "name": "Add Tag",
489
+ "payloadSchema": [
490
+ {
491
+ "name": "tag",
492
+ "required": true,
493
+ "type": "string"
494
+ }
495
+ ],
496
+ "synonyms": "attach tag, add label",
497
+ "tier": "presentation"
498
+ },
499
+ {
500
+ "description": "A chip's remove affordance was clicked; value carries the names that remain.",
501
+ "id": "evt_01M1780JG2X7ZKZWS1JDW4VRA9",
502
+ "key": "REMOVE_TAG",
503
+ "name": "Remove Tag",
504
+ "payloadSchema": [
505
+ {
506
+ "name": "tag",
507
+ "type": "string"
508
+ },
509
+ {
510
+ "name": "value",
511
+ "type": "[string]"
512
+ }
513
+ ],
514
+ "synonyms": "detach tag, remove label",
515
+ "tier": "presentation"
516
+ },
517
+ {
518
+ "description": "A typed name had no existing tag; a fresh row was created in the shared taxonomy.",
519
+ "id": "evt_01M1780JG2N02T1ZNKN3JJR7Y5",
520
+ "key": "TagStripTagCreated",
521
+ "name": "Tag strip tag created",
522
+ "payloadSchema": [
523
+ {
524
+ "name": "id",
525
+ "type": "string"
526
+ },
527
+ {
528
+ "name": "row",
529
+ "type": "StripTag"
530
+ }
531
+ ],
532
+ "tier": "internal"
533
+ },
534
+ {
535
+ "description": "The shared tag store loaded to resolve a typed name on add.",
536
+ "id": "evt_01M1780JG2STQCYHYMCS8F43KZ",
537
+ "key": "TagStripAddOptions",
538
+ "name": "Tag strip add options",
539
+ "payloadSchema": [
540
+ {
541
+ "name": "data",
542
+ "type": "[StripTag]"
543
+ }
544
+ ],
545
+ "tier": "internal"
546
+ },
547
+ {
548
+ "description": "The shared tag store loaded to resolve the remaining names on remove.",
549
+ "id": "evt_01M1780JG2KZR8W8YJ4B4PS55D",
550
+ "key": "TagStripRemoveOptions",
551
+ "name": "Tag strip remove options",
552
+ "payloadSchema": [
553
+ {
554
+ "name": "data",
555
+ "type": "[StripTag]"
556
+ }
557
+ ],
558
+ "tier": "internal"
559
+ },
560
+ {
561
+ "description": "The record's tag set changed (chip added or removed); the host routes this into its persistor's update so the write and the refetch stay the organism's.",
562
+ "id": "evt_01M1780JG2YCC9VE2N8D4D2KG1",
563
+ "key": "TAGS_CHANGED",
564
+ "name": "Tags Changed",
565
+ "payloadSchema": [
566
+ {
567
+ "name": "id",
568
+ "type": "string"
569
+ },
570
+ {
571
+ "name": "tagIds",
572
+ "type": "[string]"
573
+ }
574
+ ],
575
+ "synonyms": "tags updated, tag set changed, retagged",
576
+ "tier": "domain"
577
+ }
578
+ ],
579
+ "states": [
580
+ {
581
+ "isInitial": true,
582
+ "name": "idle"
583
+ },
584
+ {
585
+ "name": "loading"
586
+ },
587
+ {
588
+ "name": "ready"
589
+ },
590
+ {
591
+ "name": "adding"
592
+ },
593
+ {
594
+ "name": "creating"
595
+ },
596
+ {
597
+ "name": "removing"
598
+ }
599
+ ],
600
+ "transitions": [
601
+ {
602
+ "effects": [
603
+ [
604
+ "fetch",
605
+ "StripTag",
606
+ {
607
+ "emit": {
608
+ "failure": "TagStripLoadFailed",
609
+ "success": "TagStripOptions"
610
+ }
611
+ }
612
+ ]
613
+ ],
614
+ "event": "INIT",
615
+ "eventId": "evt_01M1780JG2Y18SGMQG35H6DZQD",
616
+ "from": "idle",
617
+ "to": "idle"
618
+ },
619
+ {
620
+ "event": "TagStripOptions",
621
+ "eventId": "evt_01M1780JG23PP1ZZCKDT50N36S",
622
+ "from": "idle",
623
+ "to": "idle"
624
+ },
625
+ {
626
+ "event": "TagStripLoadFailed",
627
+ "eventId": "evt_01M1780JG2V44SG4PT280FRXM5",
628
+ "from": "idle",
629
+ "to": "idle"
630
+ },
631
+ {
632
+ "effects": [
633
+ [
634
+ "set",
635
+ "@entity.docId",
636
+ "@payload.id"
637
+ ],
638
+ [
639
+ "set",
640
+ "@entity.docTagIds",
641
+ [
642
+ "array/map",
643
+ "@payload.tagIds",
644
+ [
645
+ "fn",
646
+ "t",
647
+ [
648
+ "str/default",
649
+ [
650
+ "object/get",
651
+ "@t",
652
+ "id"
653
+ ],
654
+ "@t"
655
+ ]
656
+ ]
657
+ ]
658
+ ],
659
+ [
660
+ "fetch",
661
+ "StripTag",
662
+ {
663
+ "emit": {
664
+ "failure": "TagStripLoadFailed",
665
+ "success": "TagStripOptions"
666
+ }
667
+ }
668
+ ]
669
+ ],
670
+ "event": "SHOW_TAG_STRIP",
671
+ "eventId": "evt_01M1780JG2FY7B6BJ5DBV4GZB1",
672
+ "from": "idle",
673
+ "to": "loading"
674
+ },
675
+ {
676
+ "effects": [
677
+ [
678
+ "set",
679
+ "@entity.docId",
680
+ "@payload.id"
681
+ ],
682
+ [
683
+ "set",
684
+ "@entity.docTagIds",
685
+ [
686
+ "array/map",
687
+ "@payload.tagIds",
688
+ [
689
+ "fn",
690
+ "t",
691
+ [
692
+ "str/default",
693
+ [
694
+ "object/get",
695
+ "@t",
696
+ "id"
697
+ ],
698
+ "@t"
699
+ ]
700
+ ]
701
+ ]
702
+ ],
703
+ [
704
+ "fetch",
705
+ "StripTag",
706
+ {
707
+ "emit": {
708
+ "failure": "TagStripLoadFailed",
709
+ "success": "TagStripOptions"
710
+ }
711
+ }
712
+ ]
713
+ ],
714
+ "event": "SHOW_TAG_STRIP",
715
+ "eventId": "evt_01M1780JG2FY7B6BJ5DBV4GZB1",
716
+ "from": "loading",
717
+ "to": "loading"
718
+ },
719
+ {
720
+ "effects": [
721
+ [
722
+ "render-ui",
723
+ "main",
724
+ {
725
+ "children": [
726
+ [
727
+ "if",
728
+ [
729
+ "!=",
730
+ "@config.title",
731
+ ""
732
+ ],
733
+ {
734
+ "color": "muted",
735
+ "content": "@config.title",
736
+ "type": "typography",
737
+ "variant": "caption"
738
+ },
739
+ null
740
+ ],
741
+ {
742
+ "addEvent": "ADD_TAG",
743
+ "helperText": "@config.helperText",
744
+ "placeholder": "@config.placeholder",
745
+ "removeEvent": "REMOVE_TAG",
746
+ "type": "tag-input",
747
+ "value": [
748
+ "array/map",
749
+ [
750
+ "array/filter",
751
+ "@payload.data",
752
+ [
753
+ "fn",
754
+ "t",
755
+ [
756
+ "array/includes",
757
+ "@entity.docTagIds",
758
+ [
759
+ "object/get",
760
+ "@t",
761
+ "id"
762
+ ]
763
+ ]
764
+ ]
765
+ ],
766
+ [
767
+ "fn",
768
+ "t",
769
+ [
770
+ "object/get",
771
+ "@t",
772
+ "name"
773
+ ]
774
+ ]
775
+ ],
776
+ "variant": "secondary"
777
+ },
778
+ [
779
+ "if",
780
+ [
781
+ "=",
782
+ [
783
+ "array/len",
784
+ [
785
+ "array/filter",
786
+ "@payload.data",
787
+ [
788
+ "fn",
789
+ "t",
790
+ [
791
+ "if",
792
+ [
793
+ "array/includes",
794
+ "@entity.docTagIds",
795
+ [
796
+ "object/get",
797
+ "@t",
798
+ "id"
799
+ ]
800
+ ],
801
+ false,
802
+ true
803
+ ]
804
+ ]
805
+ ]
806
+ ],
807
+ 0.0
808
+ ],
809
+ null,
810
+ {
811
+ "children": [
812
+ "array/map",
813
+ [
814
+ "array/filter",
815
+ "@payload.data",
816
+ [
817
+ "fn",
818
+ "t",
819
+ [
820
+ "if",
821
+ [
822
+ "array/includes",
823
+ "@entity.docTagIds",
824
+ [
825
+ "object/get",
826
+ "@t",
827
+ "id"
828
+ ]
829
+ ],
830
+ false,
831
+ true
832
+ ]
833
+ ]
834
+ ],
835
+ [
836
+ "fn",
837
+ "t",
838
+ {
839
+ "action": "ADD_TAG",
840
+ "actionPayload": {
841
+ "tag": "@t.name"
842
+ },
843
+ "icon": "tag",
844
+ "label": "@t.name",
845
+ "size": "sm",
846
+ "type": "button",
847
+ "variant": "ghost"
848
+ }
849
+ ]
850
+ ],
851
+ "className": "flex-wrap",
852
+ "direction": "horizontal",
853
+ "gap": "xs",
854
+ "type": "stack"
855
+ }
856
+ ]
857
+ ],
858
+ "direction": "vertical",
859
+ "gap": "xs",
860
+ "type": "stack"
861
+ }
862
+ ]
863
+ ],
864
+ "event": "TagStripOptions",
865
+ "eventId": "evt_01M1780JG23PP1ZZCKDT50N36S",
866
+ "from": "loading",
867
+ "to": "ready"
868
+ },
869
+ {
870
+ "effects": [
871
+ [
872
+ "render-ui",
873
+ "main",
874
+ {
875
+ "message": "@payload.error",
876
+ "type": "alert",
877
+ "variant": "error"
878
+ }
879
+ ]
880
+ ],
881
+ "event": "TagStripLoadFailed",
882
+ "eventId": "evt_01M1780JG2V44SG4PT280FRXM5",
883
+ "from": "loading",
884
+ "to": "idle"
885
+ },
886
+ {
887
+ "effects": [
888
+ [
889
+ "set",
890
+ "@entity.docId",
891
+ "@payload.id"
892
+ ],
893
+ [
894
+ "set",
895
+ "@entity.docTagIds",
896
+ [
897
+ "array/map",
898
+ "@payload.tagIds",
899
+ [
900
+ "fn",
901
+ "t",
902
+ [
903
+ "str/default",
904
+ [
905
+ "object/get",
906
+ "@t",
907
+ "id"
908
+ ],
909
+ "@t"
910
+ ]
911
+ ]
912
+ ]
913
+ ],
914
+ [
915
+ "fetch",
916
+ "StripTag",
917
+ {
918
+ "emit": {
919
+ "failure": "TagStripLoadFailed",
920
+ "success": "TagStripOptions"
921
+ }
922
+ }
923
+ ]
924
+ ],
925
+ "event": "SHOW_TAG_STRIP",
926
+ "eventId": "evt_01M1780JG2FY7B6BJ5DBV4GZB1",
927
+ "from": "ready",
928
+ "to": "loading"
929
+ },
930
+ {
931
+ "effects": [
932
+ [
933
+ "set",
934
+ "@entity.pendingTagName",
935
+ "@payload.tag"
936
+ ],
937
+ [
938
+ "fetch",
939
+ "StripTag",
940
+ {
941
+ "emit": {
942
+ "failure": "TagStripLoadFailed",
943
+ "success": "TagStripAddOptions"
944
+ }
945
+ }
946
+ ],
947
+ [
948
+ "render-ui",
949
+ "main",
950
+ {
951
+ "align": "center",
952
+ "children": [
953
+ {
954
+ "size": "sm",
955
+ "type": "spinner"
956
+ }
957
+ ],
958
+ "direction": "horizontal",
959
+ "gap": "xs",
960
+ "type": "stack"
961
+ }
962
+ ]
963
+ ],
964
+ "event": "ADD_TAG",
965
+ "eventId": "evt_01M1780JG24RDSS3D2ZW6TBYSA",
966
+ "from": "ready",
967
+ "to": "adding"
968
+ },
969
+ {
970
+ "effects": [
971
+ [
972
+ "set",
973
+ "@entity.pendingNames",
974
+ "@payload.value"
975
+ ],
976
+ [
977
+ "fetch",
978
+ "StripTag",
979
+ {
980
+ "emit": {
981
+ "failure": "TagStripLoadFailed",
982
+ "success": "TagStripRemoveOptions"
983
+ }
984
+ }
985
+ ],
986
+ [
987
+ "render-ui",
988
+ "main",
989
+ {
990
+ "align": "center",
991
+ "children": [
992
+ {
993
+ "size": "sm",
994
+ "type": "spinner"
995
+ }
996
+ ],
997
+ "direction": "horizontal",
998
+ "gap": "xs",
999
+ "type": "stack"
1000
+ }
1001
+ ]
1002
+ ],
1003
+ "event": "REMOVE_TAG",
1004
+ "eventId": "evt_01M1780JG2X7ZKZWS1JDW4VRA9",
1005
+ "from": "ready",
1006
+ "to": "removing"
1007
+ },
1008
+ {
1009
+ "event": "TagStripTagCreated",
1010
+ "eventId": "evt_01M1780JG2N02T1ZNKN3JJR7Y5",
1011
+ "from": "ready",
1012
+ "to": "ready"
1013
+ },
1014
+ {
1015
+ "effects": [
1016
+ [
1017
+ "set",
1018
+ "@entity.docId",
1019
+ "@payload.id"
1020
+ ],
1021
+ [
1022
+ "set",
1023
+ "@entity.docTagIds",
1024
+ [
1025
+ "array/map",
1026
+ "@payload.tagIds",
1027
+ [
1028
+ "fn",
1029
+ "t",
1030
+ [
1031
+ "str/default",
1032
+ [
1033
+ "object/get",
1034
+ "@t",
1035
+ "id"
1036
+ ],
1037
+ "@t"
1038
+ ]
1039
+ ]
1040
+ ]
1041
+ ],
1042
+ [
1043
+ "fetch",
1044
+ "StripTag",
1045
+ {
1046
+ "emit": {
1047
+ "failure": "TagStripLoadFailed",
1048
+ "success": "TagStripOptions"
1049
+ }
1050
+ }
1051
+ ]
1052
+ ],
1053
+ "event": "SHOW_TAG_STRIP",
1054
+ "eventId": "evt_01M1780JG2FY7B6BJ5DBV4GZB1",
1055
+ "from": "adding",
1056
+ "to": "loading"
1057
+ },
1058
+ {
1059
+ "effects": [
1060
+ [
1061
+ "emit",
1062
+ "TAGS_CHANGED",
1063
+ {
1064
+ "id": "@entity.docId",
1065
+ "tagIds": [
1066
+ "array/append",
1067
+ "@entity.docTagIds",
1068
+ [
1069
+ "object/get",
1070
+ [
1071
+ "array/first",
1072
+ [
1073
+ "array/filter",
1074
+ "@payload.data",
1075
+ [
1076
+ "fn",
1077
+ "t",
1078
+ [
1079
+ "=",
1080
+ [
1081
+ "object/get",
1082
+ "@t",
1083
+ "name"
1084
+ ],
1085
+ "@entity.pendingTagName"
1086
+ ]
1087
+ ]
1088
+ ]
1089
+ ],
1090
+ "id"
1091
+ ]
1092
+ ]
1093
+ }
1094
+ ]
1095
+ ],
1096
+ "event": "TagStripAddOptions",
1097
+ "eventId": "evt_01M1780JG2STQCYHYMCS8F43KZ",
1098
+ "from": "adding",
1099
+ "guard": [
1100
+ "array/includes",
1101
+ [
1102
+ "array/map",
1103
+ "@payload.data",
1104
+ [
1105
+ "fn",
1106
+ "t",
1107
+ [
1108
+ "object/get",
1109
+ "@t",
1110
+ "name"
1111
+ ]
1112
+ ]
1113
+ ],
1114
+ "@entity.pendingTagName"
1115
+ ],
1116
+ "to": "ready"
1117
+ },
1118
+ {
1119
+ "effects": [
1120
+ [
1121
+ "persist",
1122
+ "create",
1123
+ "StripTag",
1124
+ {
1125
+ "name": "@entity.pendingTagName"
1126
+ },
1127
+ {
1128
+ "emit": {
1129
+ "failure": "TagStripLoadFailed",
1130
+ "success": "TagStripTagCreated"
1131
+ }
1132
+ }
1133
+ ]
1134
+ ],
1135
+ "event": "TagStripAddOptions",
1136
+ "eventId": "evt_01M1780JG2STQCYHYMCS8F43KZ",
1137
+ "from": "adding",
1138
+ "to": "creating"
1139
+ },
1140
+ {
1141
+ "effects": [
1142
+ [
1143
+ "render-ui",
1144
+ "main",
1145
+ {
1146
+ "message": "@payload.error",
1147
+ "type": "alert",
1148
+ "variant": "error"
1149
+ }
1150
+ ]
1151
+ ],
1152
+ "event": "TagStripLoadFailed",
1153
+ "eventId": "evt_01M1780JG2V44SG4PT280FRXM5",
1154
+ "from": "adding",
1155
+ "to": "idle"
1156
+ },
1157
+ {
1158
+ "effects": [
1159
+ [
1160
+ "set",
1161
+ "@entity.docId",
1162
+ "@payload.id"
1163
+ ],
1164
+ [
1165
+ "set",
1166
+ "@entity.docTagIds",
1167
+ [
1168
+ "array/map",
1169
+ "@payload.tagIds",
1170
+ [
1171
+ "fn",
1172
+ "t",
1173
+ [
1174
+ "str/default",
1175
+ [
1176
+ "object/get",
1177
+ "@t",
1178
+ "id"
1179
+ ],
1180
+ "@t"
1181
+ ]
1182
+ ]
1183
+ ]
1184
+ ],
1185
+ [
1186
+ "fetch",
1187
+ "StripTag",
1188
+ {
1189
+ "emit": {
1190
+ "failure": "TagStripLoadFailed",
1191
+ "success": "TagStripOptions"
1192
+ }
1193
+ }
1194
+ ]
1195
+ ],
1196
+ "event": "SHOW_TAG_STRIP",
1197
+ "eventId": "evt_01M1780JG2FY7B6BJ5DBV4GZB1",
1198
+ "from": "creating",
1199
+ "to": "loading"
1200
+ },
1201
+ {
1202
+ "effects": [
1203
+ [
1204
+ "emit",
1205
+ "TAGS_CHANGED",
1206
+ {
1207
+ "id": "@entity.docId",
1208
+ "tagIds": [
1209
+ "array/append",
1210
+ "@entity.docTagIds",
1211
+ "@payload.id"
1212
+ ]
1213
+ }
1214
+ ]
1215
+ ],
1216
+ "event": "TagStripTagCreated",
1217
+ "eventId": "evt_01M1780JG2N02T1ZNKN3JJR7Y5",
1218
+ "from": "creating",
1219
+ "guard": [
1220
+ "!=",
1221
+ [
1222
+ "str/default",
1223
+ "@payload.id",
1224
+ ""
1225
+ ],
1226
+ ""
1227
+ ],
1228
+ "to": "ready"
1229
+ },
1230
+ {
1231
+ "effects": [
1232
+ [
1233
+ "render-ui",
1234
+ "main",
1235
+ {
1236
+ "message": "@payload.error",
1237
+ "type": "alert",
1238
+ "variant": "error"
1239
+ }
1240
+ ]
1241
+ ],
1242
+ "event": "TagStripLoadFailed",
1243
+ "eventId": "evt_01M1780JG2V44SG4PT280FRXM5",
1244
+ "from": "creating",
1245
+ "to": "idle"
1246
+ },
1247
+ {
1248
+ "effects": [
1249
+ [
1250
+ "set",
1251
+ "@entity.docId",
1252
+ "@payload.id"
1253
+ ],
1254
+ [
1255
+ "set",
1256
+ "@entity.docTagIds",
1257
+ [
1258
+ "array/map",
1259
+ "@payload.tagIds",
1260
+ [
1261
+ "fn",
1262
+ "t",
1263
+ [
1264
+ "str/default",
1265
+ [
1266
+ "object/get",
1267
+ "@t",
1268
+ "id"
1269
+ ],
1270
+ "@t"
1271
+ ]
1272
+ ]
1273
+ ]
1274
+ ],
1275
+ [
1276
+ "fetch",
1277
+ "StripTag",
1278
+ {
1279
+ "emit": {
1280
+ "failure": "TagStripLoadFailed",
1281
+ "success": "TagStripOptions"
1282
+ }
1283
+ }
1284
+ ]
1285
+ ],
1286
+ "event": "SHOW_TAG_STRIP",
1287
+ "eventId": "evt_01M1780JG2FY7B6BJ5DBV4GZB1",
1288
+ "from": "removing",
1289
+ "to": "loading"
1290
+ },
1291
+ {
1292
+ "effects": [
1293
+ [
1294
+ "emit",
1295
+ "TAGS_CHANGED",
1296
+ {
1297
+ "id": "@entity.docId",
1298
+ "tagIds": [
1299
+ "array/map",
1300
+ [
1301
+ "array/filter",
1302
+ "@payload.data",
1303
+ [
1304
+ "fn",
1305
+ "t",
1306
+ [
1307
+ "array/includes",
1308
+ "@entity.pendingNames",
1309
+ [
1310
+ "object/get",
1311
+ "@t",
1312
+ "name"
1313
+ ]
1314
+ ]
1315
+ ]
1316
+ ],
1317
+ [
1318
+ "fn",
1319
+ "t",
1320
+ [
1321
+ "object/get",
1322
+ "@t",
1323
+ "id"
1324
+ ]
1325
+ ]
1326
+ ]
1327
+ }
1328
+ ]
1329
+ ],
1330
+ "event": "TagStripRemoveOptions",
1331
+ "eventId": "evt_01M1780JG2KZR8W8YJ4B4PS55D",
1332
+ "from": "removing",
1333
+ "to": "ready"
1334
+ },
1335
+ {
1336
+ "effects": [
1337
+ [
1338
+ "render-ui",
1339
+ "main",
1340
+ {
1341
+ "message": "@payload.error",
1342
+ "type": "alert",
1343
+ "variant": "error"
1344
+ }
1345
+ ]
1346
+ ],
1347
+ "event": "TagStripLoadFailed",
1348
+ "eventId": "evt_01M1780JG2V44SG4PT280FRXM5",
1349
+ "from": "removing",
1350
+ "to": "idle"
1351
+ }
1352
+ ]
1353
+ }
1354
+ }
1355
+ ]
1356
+ }
1357
+ ],
1358
+ "schemaVersion": 1,
1359
+ "version": "1.0.0"
1360
+ }