@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.
- package/behaviors/registry/atoms/std-modal.orb +15 -9
- package/behaviors/registry/atoms/std-wizard.orb +306 -293
- package/behaviors/registry/molecules/std-detail.orb +513 -292
- package/behaviors/registry/molecules/std-geospatial.orb +543 -406
- package/behaviors/registry/molecules/std-inventory.orb +489 -445
- package/behaviors/registry/molecules/std-list.orb +492 -616
- package/behaviors/registry/molecules/std-messaging.orb +511 -327
- package/behaviors/registry/molecules/std-wizard-form.orb +2 -101
- package/dist/behaviors/behaviors-registry.json +1976 -719
- package/dist/behaviors/exports-reader.js +71 -11
- package/dist/behaviors/exports-reader.js.map +1 -1
- package/dist/behaviors/functions/index.d.ts +11 -3
- package/dist/behaviors/functions/index.js +67 -11
- package/dist/behaviors/functions/index.js.map +1 -1
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +72 -12
- package/dist/behaviors/index.js.map +1 -1
- package/dist/behaviors/query.js +71 -11
- package/dist/behaviors/query.js.map +1 -1
- package/dist/behaviors/registry/atoms/std-modal.orb +15 -9
- package/dist/behaviors/registry/atoms/std-wizard.orb +306 -293
- package/dist/behaviors/registry/molecules/std-detail.orb +513 -292
- package/dist/behaviors/registry/molecules/std-geospatial.orb +543 -406
- package/dist/behaviors/registry/molecules/std-inventory.orb +489 -445
- package/dist/behaviors/registry/molecules/std-list.orb +492 -616
- package/dist/behaviors/registry/molecules/std-messaging.orb +511 -327
- package/dist/behaviors/registry/molecules/std-wizard-form.orb +2 -101
- package/dist/behaviors-registry.json +1976 -719
- package/dist/index.d.ts +1 -1
- package/dist/index.js +72 -12
- package/dist/index.js.map +1 -1
- 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
|
-
"
|
|
59
|
+
"emits": [
|
|
66
60
|
{
|
|
67
|
-
"event": "
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
"
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
"
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"type": "floating-action-button"
|
|
150
|
+
"emit": {
|
|
151
|
+
"failure": "LocationLoadFailed",
|
|
152
|
+
"success": "LocationLoaded"
|
|
153
|
+
}
|
|
180
154
|
}
|
|
181
155
|
],
|
|
182
|
-
|
|
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
|
-
"
|
|
214
|
-
"gap": "sm",
|
|
163
|
+
"gap": "md",
|
|
215
164
|
"children": [
|
|
216
165
|
{
|
|
217
|
-
"type": "
|
|
218
|
-
"size": "
|
|
219
|
-
"name": "map-pin"
|
|
166
|
+
"type": "spinner",
|
|
167
|
+
"size": "lg"
|
|
220
168
|
},
|
|
221
169
|
{
|
|
222
170
|
"type": "typography",
|
|
223
|
-
"
|
|
224
|
-
"
|
|
171
|
+
"content": "Loading locations…",
|
|
172
|
+
"color": "muted",
|
|
173
|
+
"variant": "caption"
|
|
225
174
|
}
|
|
226
175
|
],
|
|
227
|
-
"
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
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
|
-
"
|
|
190
|
+
"direction": "vertical",
|
|
191
|
+
"gap": "lg",
|
|
234
192
|
"children": [
|
|
235
193
|
{
|
|
236
|
-
"
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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": "
|
|
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
|
-
"
|
|
277
|
-
|
|
278
|
-
|
|
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
|
-
"
|
|
289
|
-
"
|
|
290
|
-
"
|
|
268
|
+
"name": "alert-triangle",
|
|
269
|
+
"color": "destructive",
|
|
270
|
+
"size": "xl",
|
|
271
|
+
"type": "icon"
|
|
291
272
|
},
|
|
292
273
|
{
|
|
293
|
-
"content": "
|
|
294
|
-
"variant": "
|
|
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": "
|
|
306
|
-
"
|
|
281
|
+
"variant": "body",
|
|
282
|
+
"color": "muted"
|
|
307
283
|
},
|
|
308
284
|
{
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
319
|
-
|
|
310
|
+
"emit": {
|
|
311
|
+
"success": "LocationLoaded",
|
|
312
|
+
"failure": "LocationLoadFailed"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
[
|
|
317
|
+
"render-ui",
|
|
318
|
+
"main",
|
|
320
319
|
{
|
|
321
|
-
"
|
|
322
|
-
"
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
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
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
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
|
-
"
|
|
390
|
-
"
|
|
356
|
+
"name": "LocationSelect",
|
|
357
|
+
"category": "interaction",
|
|
391
358
|
"linkedEntity": "Location",
|
|
392
|
-
"
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
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
|
-
"
|
|
365
|
+
"name": "id",
|
|
366
|
+
"type": "string",
|
|
367
|
+
"required": true
|
|
414
368
|
}
|
|
415
|
-
]
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
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
|
-
"
|
|
425
|
-
"gap": "sm",
|
|
426
|
-
"direction": "horizontal",
|
|
433
|
+
"gap": "md",
|
|
427
434
|
"type": "stack",
|
|
435
|
+
"direction": "vertical",
|
|
428
436
|
"children": [
|
|
429
437
|
{
|
|
430
|
-
"
|
|
431
|
-
"
|
|
432
|
-
|
|
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
|
-
"
|
|
436
|
-
|
|
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
|
-
"
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
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
|
-
"
|
|
463
|
-
"
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
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
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
"
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
"
|
|
487
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
498
|
-
|
|
499
|
-
"
|
|
500
|
-
"
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
"
|
|
505
|
-
"
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
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
|
-
"
|
|
516
|
-
|
|
517
|
-
"
|
|
518
|
-
"
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
"
|
|
523
|
-
"
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
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
|
}
|