@almadar/std 7.4.1 → 7.4.3

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 (32) hide show
  1. package/behaviors/registry/atoms/std-modal.orb +15 -9
  2. package/behaviors/registry/atoms/std-wizard.orb +306 -293
  3. package/behaviors/registry/molecules/std-detail.orb +513 -292
  4. package/behaviors/registry/molecules/std-geospatial.orb +543 -406
  5. package/behaviors/registry/molecules/std-inventory.orb +489 -445
  6. package/behaviors/registry/molecules/std-list.orb +492 -616
  7. package/behaviors/registry/molecules/std-messaging.orb +511 -327
  8. package/behaviors/registry/molecules/std-wizard-form.orb +2 -101
  9. package/dist/behaviors/behaviors-registry.json +1976 -719
  10. package/dist/behaviors/exports-reader.js +71 -11
  11. package/dist/behaviors/exports-reader.js.map +1 -1
  12. package/dist/behaviors/functions/index.d.ts +11 -3
  13. package/dist/behaviors/functions/index.js +67 -11
  14. package/dist/behaviors/functions/index.js.map +1 -1
  15. package/dist/behaviors/index.d.ts +1 -1
  16. package/dist/behaviors/index.js +72 -12
  17. package/dist/behaviors/index.js.map +1 -1
  18. package/dist/behaviors/query.js +71 -11
  19. package/dist/behaviors/query.js.map +1 -1
  20. package/dist/behaviors/registry/atoms/std-modal.orb +15 -9
  21. package/dist/behaviors/registry/atoms/std-wizard.orb +306 -293
  22. package/dist/behaviors/registry/molecules/std-detail.orb +513 -292
  23. package/dist/behaviors/registry/molecules/std-geospatial.orb +543 -406
  24. package/dist/behaviors/registry/molecules/std-inventory.orb +489 -445
  25. package/dist/behaviors/registry/molecules/std-list.orb +492 -616
  26. package/dist/behaviors/registry/molecules/std-messaging.orb +511 -327
  27. package/dist/behaviors/registry/molecules/std-wizard-form.orb +2 -101
  28. package/dist/behaviors-registry.json +1976 -719
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +72 -12
  31. package/dist/index.js.map +1 -1
  32. package/package.json +1 -1
@@ -6,17 +6,9 @@
6
6
  {
7
7
  "name": "LocationOrbital",
8
8
  "uses": [
9
- {
10
- "from": "std/behaviors/std-browse",
11
- "as": "Browse"
12
- },
13
9
  {
14
10
  "from": "std/behaviors/std-confirmation",
15
11
  "as": "Confirmation"
16
- },
17
- {
18
- "from": "std/behaviors/std-modal",
19
- "as": "Modal"
20
12
  }
21
13
  ],
22
14
  "entity": {
@@ -26,11 +18,13 @@
26
18
  "fields": [
27
19
  {
28
20
  "name": "id",
29
- "type": "string"
21
+ "type": "string",
22
+ "required": true
30
23
  },
31
24
  {
32
25
  "name": "name",
33
- "type": "string"
26
+ "type": "string",
27
+ "required": true
34
28
  },
35
29
  {
36
30
  "name": "description",
@@ -59,18 +53,38 @@
59
53
  },
60
54
  "traits": [
61
55
  {
62
- "ref": "Browse.traits.BrowseItemBrowse",
63
56
  "name": "LocationBrowse",
57
+ "category": "interaction",
64
58
  "linkedEntity": "Location",
65
- "listens": [
59
+ "emits": [
66
60
  {
67
- "event": "CONFIRM_SELECT",
68
- "triggers": "INIT",
69
- "source": {
70
- "kind": "trait",
71
- "trait": "LocationSelect"
72
- }
61
+ "event": "LocationLoaded",
62
+ "description": "Fired when the Location collection finishes loading",
63
+ "scope": "internal",
64
+ "payload": [
65
+ {
66
+ "name": "data",
67
+ "type": "[Location]"
68
+ }
69
+ ]
73
70
  },
71
+ {
72
+ "event": "LocationLoadFailed",
73
+ "description": "Fired when the Location collection fails to load",
74
+ "scope": "internal",
75
+ "payload": [
76
+ {
77
+ "name": "error",
78
+ "type": "string"
79
+ },
80
+ {
81
+ "name": "code",
82
+ "type": "string"
83
+ }
84
+ ]
85
+ }
86
+ ],
87
+ "listens": [
74
88
  {
75
89
  "event": "CONFIRMED",
76
90
  "triggers": "INIT",
@@ -80,457 +94,577 @@
80
94
  }
81
95
  }
82
96
  ],
83
- "effects": {
84
- "INIT": [
85
- [
86
- "ref",
87
- "Location"
88
- ],
89
- [
90
- "render-ui",
91
- "main",
92
- {
93
- "type": "stack",
94
- "direction": "vertical",
95
- "className": "max-w-5xl mx-auto w-full",
96
- "children": [
97
- {
98
- "justify": "space-between",
99
- "direction": "horizontal",
100
- "type": "stack",
101
- "gap": "md",
102
- "align": "center",
103
- "children": [
104
- {
105
- "children": [
106
- {
107
- "size": "lg",
108
- "type": "icon",
109
- "name": "map-pin"
110
- },
111
- {
112
- "variant": "h2",
113
- "type": "typography",
114
- "content": "Locations Picker"
115
- }
116
- ],
117
- "type": "stack",
118
- "gap": "sm",
119
- "direction": "horizontal",
120
- "align": "center"
121
- }
122
- ]
123
- },
124
- {
125
- "type": "divider"
126
- },
127
- {
128
- "columns": [
129
- {
130
- "label": "Name",
131
- "name": "name",
132
- "variant": "h4",
133
- "icon": "map-pin"
134
- },
135
- {
136
- "name": "description",
137
- "colorMap": {
138
- "error": "destructive",
139
- "archived": "neutral",
140
- "active": "success",
141
- "pending": "warning",
142
- "completed": "success",
143
- "draft": "warning",
144
- "done": "success",
145
- "inactive": "neutral",
146
- "scheduled": "warning",
147
- "disabled": "neutral",
148
- "failed": "destructive",
149
- "cancelled": "destructive"
150
- },
151
- "label": "Description",
152
- "variant": "badge"
153
- },
154
- {
155
- "variant": "caption",
156
- "name": "status",
157
- "label": "Status"
158
- }
159
- ],
160
- "entity": "Location",
161
- "type": "data-grid",
162
- "emptyTitle": "No locations found",
163
- "emptyDescription": "No locations are available to select.",
164
- "emptyIcon": "inbox",
165
- "itemActions": [
166
- {
167
- "label": "Select Location",
168
- "size": "sm",
169
- "variant": "ghost",
170
- "event": "SELECT"
171
- }
172
- ]
173
- },
97
+ "stateMachine": {
98
+ "states": [
99
+ {
100
+ "name": "loading",
101
+ "isInitial": true
102
+ },
103
+ {
104
+ "name": "browsing"
105
+ },
106
+ {
107
+ "name": "error"
108
+ }
109
+ ],
110
+ "events": [
111
+ {
112
+ "key": "INIT",
113
+ "name": "Initialize"
114
+ },
115
+ {
116
+ "key": "LocationLoaded",
117
+ "name": "Location loaded",
118
+ "payload": [
119
+ {
120
+ "name": "data",
121
+ "type": "[Location]"
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ "key": "LocationLoadFailed",
127
+ "name": "Location load failed",
128
+ "payload": [
129
+ {
130
+ "name": "error",
131
+ "type": "string"
132
+ },
133
+ {
134
+ "name": "code",
135
+ "type": "string"
136
+ }
137
+ ]
138
+ }
139
+ ],
140
+ "transitions": [
141
+ {
142
+ "from": "loading",
143
+ "to": "loading",
144
+ "event": "INIT",
145
+ "effects": [
146
+ [
147
+ "fetch",
148
+ "Location",
174
149
  {
175
- "icon": "plus",
176
- "label": "Create",
177
- "tooltip": "Create",
178
- "event": "INIT",
179
- "type": "floating-action-button"
150
+ "emit": {
151
+ "failure": "LocationLoadFailed",
152
+ "success": "LocationLoaded"
153
+ }
180
154
  }
181
155
  ],
182
- "gap": "lg"
183
- }
184
- ]
185
- ]
186
- }
187
- },
188
- {
189
- "ref": "Modal.traits.ModalRecordModal",
190
- "name": "LocationSelect",
191
- "linkedEntity": "Location",
192
- "events": {
193
- "SAVE": "CONFIRM_SELECT",
194
- "OPEN": "SELECT"
195
- },
196
- "effects": {
197
- "SELECT": [
198
- [
199
- "fetch",
200
- "Location",
201
- {
202
- "id": "@payload.id"
203
- }
204
- ],
205
- [
206
- "render-ui",
207
- "modal",
208
- {
209
- "gap": "md",
210
- "children": [
156
+ [
157
+ "render-ui",
158
+ "main",
211
159
  {
160
+ "className": "py-12",
161
+ "direction": "vertical",
212
162
  "type": "stack",
213
- "align": "center",
214
- "gap": "sm",
163
+ "gap": "md",
215
164
  "children": [
216
165
  {
217
- "type": "icon",
218
- "size": "md",
219
- "name": "map-pin"
166
+ "type": "spinner",
167
+ "size": "lg"
220
168
  },
221
169
  {
222
170
  "type": "typography",
223
- "variant": "h3",
224
- "content": "@entity.name"
171
+ "content": "Loading locations…",
172
+ "color": "muted",
173
+ "variant": "caption"
225
174
  }
226
175
  ],
227
- "direction": "horizontal"
228
- },
229
- {
230
- "type": "divider"
231
- },
176
+ "align": "center"
177
+ }
178
+ ]
179
+ ]
180
+ },
181
+ {
182
+ "from": "loading",
183
+ "to": "browsing",
184
+ "event": "LocationLoaded",
185
+ "effects": [
186
+ [
187
+ "render-ui",
188
+ "main",
232
189
  {
233
- "gap": "md",
190
+ "direction": "vertical",
191
+ "gap": "lg",
234
192
  "children": [
235
193
  {
236
- "variant": "caption",
237
- "content": "Name",
238
- "type": "typography"
239
- },
240
- {
241
- "variant": "body",
242
- "content": "@entity.name",
243
- "type": "typography"
244
- }
245
- ],
246
- "type": "stack",
247
- "direction": "horizontal"
248
- },
249
- {
250
- "direction": "horizontal",
251
- "type": "stack",
252
- "gap": "md",
253
- "children": [
254
- {
255
- "type": "typography",
256
- "variant": "caption",
257
- "content": "Description"
194
+ "direction": "horizontal",
195
+ "type": "stack",
196
+ "gap": "md",
197
+ "children": [
198
+ {
199
+ "children": [
200
+ {
201
+ "type": "icon",
202
+ "name": "map-pin",
203
+ "size": "lg"
204
+ },
205
+ {
206
+ "type": "typography",
207
+ "content": "Locations",
208
+ "variant": "h2"
209
+ }
210
+ ],
211
+ "direction": "horizontal",
212
+ "gap": "md",
213
+ "type": "stack"
214
+ }
215
+ ],
216
+ "justify": "between"
258
217
  },
259
218
  {
260
- "type": "typography",
261
- "content": "@entity.description",
262
- "variant": "body"
263
- }
264
- ]
265
- },
266
- {
267
- "direction": "horizontal",
268
- "gap": "md",
269
- "children": [
270
- {
271
- "content": "Status",
272
- "type": "typography",
273
- "variant": "caption"
219
+ "type": "divider"
274
220
  },
275
221
  {
276
- "variant": "body",
277
- "content": "@entity.status",
278
- "type": "typography"
222
+ "fields": [
223
+ {
224
+ "icon": "map-pin",
225
+ "label": "Name",
226
+ "name": "name",
227
+ "variant": "h4"
228
+ },
229
+ {
230
+ "name": "description",
231
+ "label": "Description",
232
+ "variant": "caption"
233
+ },
234
+ {
235
+ "name": "status",
236
+ "label": "Status",
237
+ "variant": "badge"
238
+ }
239
+ ],
240
+ "entity": "@payload.data",
241
+ "type": "data-grid",
242
+ "itemActions": [
243
+ {
244
+ "label": "Select",
245
+ "event": "SELECT",
246
+ "variant": "ghost"
247
+ }
248
+ ]
279
249
  }
280
250
  ],
251
+ "className": "max-w-5xl mx-auto w-full",
281
252
  "type": "stack"
282
- },
253
+ }
254
+ ]
255
+ ]
256
+ },
257
+ {
258
+ "from": "loading",
259
+ "to": "error",
260
+ "event": "LocationLoadFailed",
261
+ "effects": [
262
+ [
263
+ "render-ui",
264
+ "main",
283
265
  {
284
- "direction": "horizontal",
285
- "gap": "md",
286
266
  "children": [
287
267
  {
288
- "content": "Created At",
289
- "variant": "caption",
290
- "type": "typography"
268
+ "name": "alert-triangle",
269
+ "color": "destructive",
270
+ "size": "xl",
271
+ "type": "icon"
291
272
  },
292
273
  {
293
- "content": "@entity.createdAt",
294
- "variant": "body",
274
+ "content": "Failed to load locations",
275
+ "variant": "h3",
295
276
  "type": "typography"
296
- }
297
- ],
298
- "type": "stack"
299
- },
300
- {
301
- "direction": "horizontal",
302
- "children": [
277
+ },
303
278
  {
279
+ "content": "@payload.error",
304
280
  "type": "typography",
305
- "variant": "caption",
306
- "content": "Pending ID"
281
+ "variant": "body",
282
+ "color": "muted"
307
283
  },
308
284
  {
309
- "content": "@entity.pendingId",
310
- "type": "typography",
311
- "variant": "body"
285
+ "variant": "primary",
286
+ "action": "INIT",
287
+ "icon": "rotate-ccw",
288
+ "type": "button",
289
+ "label": "Retry"
312
290
  }
313
291
  ],
314
292
  "gap": "md",
315
- "type": "stack"
316
- },
293
+ "direction": "vertical",
294
+ "type": "stack",
295
+ "align": "center",
296
+ "className": "py-12"
297
+ }
298
+ ]
299
+ ]
300
+ },
301
+ {
302
+ "from": "browsing",
303
+ "to": "loading",
304
+ "event": "INIT",
305
+ "effects": [
306
+ [
307
+ "fetch",
308
+ "Location",
317
309
  {
318
- "type": "divider"
319
- },
310
+ "emit": {
311
+ "success": "LocationLoaded",
312
+ "failure": "LocationLoadFailed"
313
+ }
314
+ }
315
+ ],
316
+ [
317
+ "render-ui",
318
+ "main",
320
319
  {
321
- "direction": "horizontal",
322
- "gap": "sm",
323
- "type": "stack",
324
- "children": [
325
- {
326
- "variant": "ghost",
327
- "label": "Cancel",
328
- "event": "CLOSE",
329
- "type": "button"
330
- },
331
- {
332
- "label": "Confirm Selection",
333
- "icon": "check",
334
- "type": "button",
335
- "event": "CONFIRM_SELECT",
336
- "variant": "primary"
337
- }
338
- ],
339
- "justify": "end"
320
+ "type": "spinner",
321
+ "size": "lg"
322
+ }
323
+ ]
324
+ ]
325
+ },
326
+ {
327
+ "from": "error",
328
+ "to": "loading",
329
+ "event": "INIT",
330
+ "effects": [
331
+ [
332
+ "fetch",
333
+ "Location",
334
+ {
335
+ "emit": {
336
+ "success": "LocationLoaded",
337
+ "failure": "LocationLoadFailed"
338
+ }
340
339
  }
341
340
  ],
342
- "type": "stack",
343
- "direction": "vertical"
344
- }
345
- ]
346
- ],
347
- "INIT": [
348
- [
349
- "ref",
350
- "Location"
351
- ]
352
- ],
353
- "CONFIRM_SELECT": [
354
- [
355
- "render-ui",
356
- "modal",
357
- null
358
- ],
359
- [
360
- "render-ui",
361
- "main",
362
- {
363
- "type": "box"
364
- }
365
- ]
366
- ],
367
- "CLOSE": [
368
- [
369
- "render-ui",
370
- "modal",
371
- null
372
- ],
373
- [
374
- "render-ui",
375
- "main",
376
- {
377
- "type": "box"
378
- }
379
- ],
380
- [
381
- "notify",
382
- "Cancelled",
383
- "info"
384
- ]
341
+ [
342
+ "render-ui",
343
+ "main",
344
+ {
345
+ "size": "lg",
346
+ "type": "spinner"
347
+ }
348
+ ]
349
+ ]
350
+ }
385
351
  ]
386
- }
352
+ },
353
+ "scope": "collection"
387
354
  },
388
355
  {
389
- "ref": "Confirmation.traits.ConfirmActionConfirmation",
390
- "name": "LocationConfirmSelect",
356
+ "name": "LocationSelect",
357
+ "category": "interaction",
391
358
  "linkedEntity": "Location",
392
- "events": {
393
- "CONFIRM": "CONFIRMED",
394
- "REQUEST": "CONFIRM_SELECT"
395
- },
396
- "effects": {
397
- "INIT": [
398
- [
399
- "ref",
400
- "Location"
401
- ]
402
- ],
403
- "CONFIRM_SELECT": [
404
- [
405
- "set",
406
- "@entity.pendingId",
407
- "@payload.id"
408
- ],
409
- [
410
- "fetch",
411
- "Location",
359
+ "emits": [
360
+ {
361
+ "event": "CONFIRM_SELECT",
362
+ "scope": "external",
363
+ "payload": [
412
364
  {
413
- "id": "@payload.id"
365
+ "name": "id",
366
+ "type": "string",
367
+ "required": true
414
368
  }
415
- ],
416
- [
417
- "render-ui",
418
- "modal",
419
- {
420
- "direction": "vertical",
421
- "type": "stack",
422
- "children": [
369
+ ]
370
+ }
371
+ ],
372
+ "stateMachine": {
373
+ "states": [
374
+ {
375
+ "name": "closed",
376
+ "isInitial": true
377
+ },
378
+ {
379
+ "name": "open"
380
+ }
381
+ ],
382
+ "events": [
383
+ {
384
+ "key": "INIT",
385
+ "name": "Initialize"
386
+ },
387
+ {
388
+ "key": "SELECT",
389
+ "name": "Select",
390
+ "payload": [
391
+ {
392
+ "name": "id",
393
+ "type": "string",
394
+ "required": true
395
+ }
396
+ ]
397
+ },
398
+ {
399
+ "key": "CLOSE",
400
+ "name": "Close"
401
+ },
402
+ {
403
+ "key": "CONFIRM_SELECT",
404
+ "name": "Confirm Select"
405
+ }
406
+ ],
407
+ "transitions": [
408
+ {
409
+ "from": "closed",
410
+ "to": "closed",
411
+ "event": "INIT",
412
+ "effects": [
413
+ [
414
+ "fetch",
415
+ "Location"
416
+ ]
417
+ ]
418
+ },
419
+ {
420
+ "from": "closed",
421
+ "to": "open",
422
+ "event": "SELECT",
423
+ "effects": [
424
+ [
425
+ "set",
426
+ "@entity.id",
427
+ "@payload.id"
428
+ ],
429
+ [
430
+ "render-ui",
431
+ "modal",
423
432
  {
424
- "align": "center",
425
- "gap": "sm",
426
- "direction": "horizontal",
433
+ "gap": "md",
427
434
  "type": "stack",
435
+ "direction": "vertical",
428
436
  "children": [
429
437
  {
430
- "type": "icon",
431
- "name": "alert-triangle",
432
- "size": "md"
438
+ "align": "center",
439
+ "children": [
440
+ {
441
+ "type": "icon",
442
+ "name": "map-pin",
443
+ "size": "md"
444
+ },
445
+ {
446
+ "variant": "h3",
447
+ "content": "@entity.name",
448
+ "type": "typography"
449
+ }
450
+ ],
451
+ "direction": "horizontal",
452
+ "gap": "sm",
453
+ "type": "stack"
433
454
  },
434
455
  {
435
- "variant": "h3",
436
- "content": "Confirm Location Selection",
437
- "type": "typography"
438
- }
439
- ]
440
- },
441
- {
442
- "type": "divider"
443
- },
444
- {
445
- "variant": "danger",
446
- "message": "Are you sure you want to select this location?",
447
- "type": "alert"
448
- },
449
- {
450
- "justify": "end",
451
- "gap": "sm",
452
- "type": "stack",
453
- "direction": "horizontal",
454
- "children": [
456
+ "type": "divider"
457
+ },
455
458
  {
456
- "type": "button",
457
- "event": "CANCEL",
458
- "variant": "ghost",
459
- "label": "Cancel"
459
+ "children": [
460
+ {
461
+ "variant": "caption",
462
+ "type": "typography",
463
+ "content": "Name"
464
+ },
465
+ {
466
+ "variant": "body",
467
+ "type": "typography",
468
+ "content": "@entity.name"
469
+ }
470
+ ],
471
+ "gap": "md",
472
+ "direction": "horizontal",
473
+ "type": "stack"
460
474
  },
461
475
  {
462
- "icon": "check",
463
- "label": "Confirm",
464
- "event": "CONFIRMED",
465
- "type": "button",
466
- "variant": "danger"
476
+ "direction": "horizontal",
477
+ "children": [
478
+ {
479
+ "content": "Description",
480
+ "type": "typography",
481
+ "variant": "caption"
482
+ },
483
+ {
484
+ "variant": "body",
485
+ "content": "@entity.description",
486
+ "type": "typography"
487
+ }
488
+ ],
489
+ "type": "stack",
490
+ "gap": "md"
491
+ },
492
+ {
493
+ "direction": "horizontal",
494
+ "children": [
495
+ {
496
+ "type": "typography",
497
+ "variant": "caption",
498
+ "content": "Status"
499
+ },
500
+ {
501
+ "variant": "body",
502
+ "content": "@entity.status",
503
+ "type": "typography"
504
+ }
505
+ ],
506
+ "gap": "md",
507
+ "type": "stack"
508
+ },
509
+ {
510
+ "type": "divider"
511
+ },
512
+ {
513
+ "type": "stack",
514
+ "gap": "sm",
515
+ "justify": "end",
516
+ "direction": "horizontal",
517
+ "children": [
518
+ {
519
+ "label": "Cancel",
520
+ "type": "button",
521
+ "action": "CLOSE",
522
+ "variant": "ghost"
523
+ },
524
+ {
525
+ "label": "Confirm Selection",
526
+ "type": "button",
527
+ "action": "CONFIRM_SELECT",
528
+ "actionPayload": {
529
+ "id": "@entity.id"
530
+ },
531
+ "variant": "primary",
532
+ "icon": "check"
533
+ }
534
+ ]
467
535
  }
468
536
  ]
469
537
  }
470
- ],
471
- "gap": "md"
472
- }
473
- ]
474
- ],
475
- "CONFIRMED": [
476
- [
477
- "fetch",
478
- "Location"
479
- ],
480
- [
481
- "render-ui",
482
- "modal",
483
- null
484
- ],
485
- [
486
- "render-ui",
487
- "main",
538
+ ]
539
+ ]
540
+ },
541
+ {
542
+ "from": "open",
543
+ "to": "closed",
544
+ "event": "CLOSE",
545
+ "effects": [
546
+ [
547
+ "render-ui",
548
+ "modal",
549
+ null
550
+ ]
551
+ ]
552
+ },
553
+ {
554
+ "from": "open",
555
+ "to": "closed",
556
+ "event": "CONFIRM_SELECT",
557
+ "effects": [
558
+ [
559
+ "render-ui",
560
+ "modal",
561
+ null
562
+ ]
563
+ ]
564
+ }
565
+ ]
566
+ },
567
+ "scope": "instance"
568
+ },
569
+ {
570
+ "ref": "Confirmation.traits.ConfirmActionConfirmation",
571
+ "name": "LocationConfirmSelect",
572
+ "linkedEntity": "Location",
573
+ "config": {
574
+ "icon": "alert-triangle",
575
+ "title": "Confirm Location",
576
+ "alertMessage": "Are you sure you want to select this location?",
577
+ "confirmLabel": "Confirm"
578
+ },
579
+ "events": {
580
+ "REQUEST": "CONFIRM_SELECT",
581
+ "CONFIRM": "CONFIRMED"
582
+ }
583
+ },
584
+ {
585
+ "name": "LocationSelectionFlow",
586
+ "category": "lifecycle",
587
+ "linkedEntity": "Location",
588
+ "emits": [
589
+ {
590
+ "event": "LocationSelected",
591
+ "scope": "external",
592
+ "payload": [
488
593
  {
489
- "type": "box"
594
+ "name": "id",
595
+ "type": "string",
596
+ "required": true
490
597
  }
491
- ],
492
- [
493
- "ref",
494
- "Location"
495
598
  ]
599
+ }
600
+ ],
601
+ "listens": [
602
+ {
603
+ "event": "CONFIRMED",
604
+ "triggers": "DO_EMIT_SELECTED",
605
+ "source": {
606
+ "kind": "trait",
607
+ "trait": "LocationConfirmSelect"
608
+ }
609
+ }
610
+ ],
611
+ "stateMachine": {
612
+ "states": [
613
+ {
614
+ "name": "idle",
615
+ "isInitial": true
616
+ }
496
617
  ],
497
- "CLOSE": [
498
- [
499
- "render-ui",
500
- "modal",
501
- null
502
- ],
503
- [
504
- "render-ui",
505
- "main",
506
- {
507
- "type": "box"
508
- }
509
- ],
510
- [
511
- "ref",
512
- "Location"
513
- ]
618
+ "events": [
619
+ {
620
+ "key": "INIT",
621
+ "name": "Initialize"
622
+ },
623
+ {
624
+ "key": "DO_EMIT_SELECTED",
625
+ "name": "Do Emit Selected",
626
+ "payload": [
627
+ {
628
+ "name": "id",
629
+ "type": "string",
630
+ "required": true
631
+ }
632
+ ]
633
+ },
634
+ {
635
+ "key": "LocationSelected",
636
+ "name": "Location selected",
637
+ "payload": [
638
+ {
639
+ "name": "id",
640
+ "type": "string"
641
+ }
642
+ ]
643
+ }
514
644
  ],
515
- "CANCEL": [
516
- [
517
- "render-ui",
518
- "modal",
519
- null
520
- ],
521
- [
522
- "render-ui",
523
- "main",
524
- {
525
- "type": "box"
526
- }
527
- ],
528
- [
529
- "ref",
530
- "Location"
531
- ]
645
+ "transitions": [
646
+ {
647
+ "from": "idle",
648
+ "to": "idle",
649
+ "event": "INIT"
650
+ },
651
+ {
652
+ "from": "idle",
653
+ "to": "idle",
654
+ "event": "DO_EMIT_SELECTED",
655
+ "effects": [
656
+ [
657
+ "emit",
658
+ "LocationSelected",
659
+ {
660
+ "id": "@payload.id"
661
+ }
662
+ ]
663
+ ]
664
+ }
532
665
  ]
533
- }
666
+ },
667
+ "scope": "instance"
534
668
  }
535
669
  ],
536
670
  "pages": [
@@ -546,6 +680,9 @@
546
680
  },
547
681
  {
548
682
  "ref": "LocationConfirmSelect"
683
+ },
684
+ {
685
+ "ref": "LocationSelectionFlow"
549
686
  }
550
687
  ]
551
688
  }