@almadar/std 7.4.0 → 7.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/behaviors/registry/atoms/std-confirmation.orb +43 -23
- package/behaviors/registry/atoms/std-modal.orb +15 -9
- package/behaviors/registry/molecules/std-inventory.orb +489 -445
- package/behaviors/registry/molecules/std-list.orb +492 -616
- package/dist/behaviors/behaviors-registry.json +1650 -667
- package/dist/behaviors/exports-reader.js +23 -8
- package/dist/behaviors/exports-reader.js.map +1 -1
- package/dist/behaviors/functions/index.d.ts +5 -3
- package/dist/behaviors/functions/index.js +22 -8
- package/dist/behaviors/functions/index.js.map +1 -1
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +24 -9
- package/dist/behaviors/index.js.map +1 -1
- package/dist/behaviors/query.js +23 -8
- package/dist/behaviors/query.js.map +1 -1
- package/dist/behaviors/registry/atoms/std-confirmation.orb +43 -23
- package/dist/behaviors/registry/atoms/std-modal.orb +15 -9
- package/dist/behaviors/registry/molecules/std-inventory.orb +489 -445
- package/dist/behaviors/registry/molecules/std-list.orb +492 -616
- package/dist/behaviors-registry.json +1650 -667
- package/dist/index.d.ts +1 -1
- package/dist/index.js +24 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,10 +6,6 @@
|
|
|
6
6
|
{
|
|
7
7
|
"name": "ListItemOrbital",
|
|
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"
|
|
@@ -26,11 +22,13 @@
|
|
|
26
22
|
"fields": [
|
|
27
23
|
{
|
|
28
24
|
"name": "id",
|
|
29
|
-
"type": "string"
|
|
25
|
+
"type": "string",
|
|
26
|
+
"required": true
|
|
30
27
|
},
|
|
31
28
|
{
|
|
32
29
|
"name": "name",
|
|
33
|
-
"type": "string"
|
|
30
|
+
"type": "string",
|
|
31
|
+
"required": true
|
|
34
32
|
},
|
|
35
33
|
{
|
|
36
34
|
"name": "description",
|
|
@@ -49,709 +47,587 @@
|
|
|
49
47
|
{
|
|
50
48
|
"name": "createdAt",
|
|
51
49
|
"type": "string"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "pendingId",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"default": ""
|
|
52
55
|
}
|
|
53
56
|
]
|
|
54
57
|
},
|
|
55
58
|
"traits": [
|
|
56
59
|
{
|
|
57
|
-
"ref": "Browse.traits.BrowseItemBrowse",
|
|
58
60
|
"name": "ListItemBrowse",
|
|
61
|
+
"category": "interaction",
|
|
59
62
|
"linkedEntity": "ListItem",
|
|
63
|
+
"emits": [
|
|
64
|
+
{
|
|
65
|
+
"event": "ListItemLoaded",
|
|
66
|
+
"description": "Fired when the ListItem collection finishes loading; payload.data holds the list",
|
|
67
|
+
"scope": "internal",
|
|
68
|
+
"payload": [
|
|
69
|
+
{
|
|
70
|
+
"name": "data",
|
|
71
|
+
"type": "[ListItem]"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"event": "ListItemLoadFailed",
|
|
77
|
+
"description": "Fired when the ListItem collection fails to load",
|
|
78
|
+
"scope": "internal",
|
|
79
|
+
"payload": [
|
|
80
|
+
{
|
|
81
|
+
"name": "error",
|
|
82
|
+
"type": "string"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "code",
|
|
86
|
+
"type": "string"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
],
|
|
60
91
|
"listens": [
|
|
61
92
|
{
|
|
62
|
-
"event": "
|
|
93
|
+
"event": "ITEM_CREATED",
|
|
63
94
|
"triggers": "INIT",
|
|
64
95
|
"source": {
|
|
65
96
|
"kind": "trait",
|
|
66
|
-
"trait": "
|
|
97
|
+
"trait": "ListItemPersistor"
|
|
67
98
|
}
|
|
68
99
|
},
|
|
69
100
|
{
|
|
70
|
-
"event": "
|
|
101
|
+
"event": "ITEM_UPDATED",
|
|
71
102
|
"triggers": "INIT",
|
|
72
103
|
"source": {
|
|
73
104
|
"kind": "trait",
|
|
74
|
-
"trait": "
|
|
105
|
+
"trait": "ListItemPersistor"
|
|
75
106
|
}
|
|
76
107
|
},
|
|
77
108
|
{
|
|
78
|
-
"event": "
|
|
109
|
+
"event": "ITEM_DELETED",
|
|
79
110
|
"triggers": "INIT",
|
|
80
111
|
"source": {
|
|
81
112
|
"kind": "trait",
|
|
82
|
-
"trait": "
|
|
113
|
+
"trait": "ListItemPersistor"
|
|
83
114
|
}
|
|
84
115
|
}
|
|
85
116
|
],
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
117
|
+
"stateMachine": {
|
|
118
|
+
"states": [
|
|
119
|
+
{
|
|
120
|
+
"name": "loading",
|
|
121
|
+
"isInitial": true
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "browsing"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "error"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"events": [
|
|
131
|
+
{
|
|
132
|
+
"key": "INIT",
|
|
133
|
+
"name": "Initialize"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"key": "ListItemLoaded",
|
|
137
|
+
"name": "ListItem loaded",
|
|
138
|
+
"payload": [
|
|
139
|
+
{
|
|
140
|
+
"name": "data",
|
|
141
|
+
"type": "[ListItem]"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"key": "ListItemLoadFailed",
|
|
147
|
+
"name": "ListItem load failed",
|
|
148
|
+
"payload": [
|
|
149
|
+
{
|
|
150
|
+
"name": "error",
|
|
151
|
+
"type": "string",
|
|
152
|
+
"required": true
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "code",
|
|
156
|
+
"type": "string"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"transitions": [
|
|
162
|
+
{
|
|
163
|
+
"from": "loading",
|
|
164
|
+
"to": "loading",
|
|
165
|
+
"event": "INIT",
|
|
166
|
+
"effects": [
|
|
167
|
+
[
|
|
168
|
+
"fetch",
|
|
169
|
+
"ListItem",
|
|
99
170
|
{
|
|
171
|
+
"emit": {
|
|
172
|
+
"success": "ListItemLoaded",
|
|
173
|
+
"failure": "ListItemLoadFailed"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
[
|
|
178
|
+
"render-ui",
|
|
179
|
+
"main",
|
|
180
|
+
{
|
|
181
|
+
"className": "py-12",
|
|
182
|
+
"children": [
|
|
183
|
+
{
|
|
184
|
+
"size": "lg",
|
|
185
|
+
"type": "spinner"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"variant": "caption",
|
|
189
|
+
"color": "muted",
|
|
190
|
+
"content": "Loading list…",
|
|
191
|
+
"type": "typography"
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"direction": "vertical",
|
|
195
|
+
"type": "stack",
|
|
100
196
|
"gap": "md",
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
197
|
+
"align": "center"
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"from": "loading",
|
|
204
|
+
"to": "browsing",
|
|
205
|
+
"event": "ListItemLoaded",
|
|
206
|
+
"effects": [
|
|
207
|
+
[
|
|
208
|
+
"render-ui",
|
|
209
|
+
"main",
|
|
210
|
+
{
|
|
104
211
|
"children": [
|
|
105
212
|
{
|
|
213
|
+
"direction": "horizontal",
|
|
214
|
+
"justify": "between",
|
|
106
215
|
"children": [
|
|
107
216
|
{
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
217
|
+
"direction": "horizontal",
|
|
218
|
+
"gap": "md",
|
|
219
|
+
"type": "stack",
|
|
220
|
+
"children": [
|
|
221
|
+
{
|
|
222
|
+
"size": "lg",
|
|
223
|
+
"name": "list",
|
|
224
|
+
"type": "icon"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"variant": "h2",
|
|
228
|
+
"type": "typography",
|
|
229
|
+
"content": "ListItems"
|
|
230
|
+
}
|
|
231
|
+
]
|
|
111
232
|
},
|
|
112
233
|
{
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
234
|
+
"action": "CREATE",
|
|
235
|
+
"label": "Create",
|
|
236
|
+
"icon": "plus",
|
|
237
|
+
"type": "button",
|
|
238
|
+
"variant": "primary"
|
|
116
239
|
}
|
|
117
240
|
],
|
|
118
|
-
"align": "center",
|
|
119
|
-
"gap": "sm",
|
|
120
241
|
"type": "stack",
|
|
121
|
-
"
|
|
242
|
+
"gap": "md"
|
|
122
243
|
},
|
|
123
244
|
{
|
|
124
|
-
"type": "
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"
|
|
245
|
+
"type": "divider"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"type": "data-grid",
|
|
249
|
+
"fields": [
|
|
128
250
|
{
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
|
|
251
|
+
"variant": "h4",
|
|
252
|
+
"label": "Name",
|
|
253
|
+
"icon": "list",
|
|
254
|
+
"name": "name"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"label": "Description",
|
|
258
|
+
"variant": "caption",
|
|
259
|
+
"name": "description"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"variant": "badge",
|
|
263
|
+
"name": "status",
|
|
264
|
+
"label": "Status"
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"itemActions": [
|
|
268
|
+
{
|
|
269
|
+
"event": "EDIT",
|
|
270
|
+
"variant": "ghost",
|
|
271
|
+
"label": "Edit"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"label": "Delete",
|
|
275
|
+
"event": "DELETE",
|
|
276
|
+
"variant": "danger"
|
|
134
277
|
}
|
|
135
|
-
]
|
|
278
|
+
],
|
|
279
|
+
"entity": "@payload.data"
|
|
136
280
|
}
|
|
137
281
|
],
|
|
138
|
-
"type": "stack"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
}
|
|
282
|
+
"type": "stack",
|
|
283
|
+
"className": "max-w-5xl mx-auto w-full",
|
|
284
|
+
"gap": "lg",
|
|
285
|
+
"direction": "vertical"
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"from": "loading",
|
|
292
|
+
"to": "error",
|
|
293
|
+
"event": "ListItemLoadFailed",
|
|
294
|
+
"effects": [
|
|
295
|
+
[
|
|
296
|
+
"render-ui",
|
|
297
|
+
"main",
|
|
143
298
|
{
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
"emptyDescription": "Create your first listitem to get started.",
|
|
147
|
-
"itemActions": [
|
|
148
|
-
{
|
|
149
|
-
"size": "sm",
|
|
150
|
-
"variant": "ghost",
|
|
151
|
-
"label": "View",
|
|
152
|
-
"event": "VIEW"
|
|
153
|
-
},
|
|
299
|
+
"gap": "md",
|
|
300
|
+
"children": [
|
|
154
301
|
{
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
302
|
+
"size": "xl",
|
|
303
|
+
"name": "alert-triangle",
|
|
304
|
+
"color": "destructive",
|
|
305
|
+
"type": "icon"
|
|
159
306
|
},
|
|
160
307
|
{
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"label": "Delete"
|
|
165
|
-
}
|
|
166
|
-
],
|
|
167
|
-
"columns": [
|
|
168
|
-
{
|
|
169
|
-
"icon": "list",
|
|
170
|
-
"label": "Name",
|
|
171
|
-
"variant": "h4",
|
|
172
|
-
"name": "name"
|
|
308
|
+
"type": "typography",
|
|
309
|
+
"variant": "h3",
|
|
310
|
+
"content": "Failed to load list"
|
|
173
311
|
},
|
|
174
312
|
{
|
|
175
|
-
"
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
"pending": "warning",
|
|
180
|
-
"active": "success",
|
|
181
|
-
"archived": "neutral",
|
|
182
|
-
"error": "destructive",
|
|
183
|
-
"done": "success",
|
|
184
|
-
"draft": "warning",
|
|
185
|
-
"completed": "success",
|
|
186
|
-
"inactive": "neutral",
|
|
187
|
-
"scheduled": "warning",
|
|
188
|
-
"disabled": "neutral",
|
|
189
|
-
"cancelled": "destructive",
|
|
190
|
-
"failed": "destructive"
|
|
191
|
-
}
|
|
313
|
+
"type": "typography",
|
|
314
|
+
"content": "@payload.error",
|
|
315
|
+
"color": "muted",
|
|
316
|
+
"variant": "body"
|
|
192
317
|
},
|
|
193
318
|
{
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"
|
|
319
|
+
"type": "button",
|
|
320
|
+
"icon": "rotate-ccw",
|
|
321
|
+
"action": "INIT",
|
|
322
|
+
"label": "Retry",
|
|
323
|
+
"variant": "primary"
|
|
197
324
|
}
|
|
198
325
|
],
|
|
199
|
-
"type": "
|
|
200
|
-
"
|
|
326
|
+
"type": "stack",
|
|
327
|
+
"align": "center",
|
|
328
|
+
"direction": "vertical",
|
|
329
|
+
"className": "py-12"
|
|
330
|
+
}
|
|
331
|
+
]
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"from": "browsing",
|
|
336
|
+
"to": "loading",
|
|
337
|
+
"event": "INIT",
|
|
338
|
+
"effects": [
|
|
339
|
+
[
|
|
340
|
+
"fetch",
|
|
341
|
+
"ListItem",
|
|
342
|
+
{
|
|
343
|
+
"emit": {
|
|
344
|
+
"failure": "ListItemLoadFailed",
|
|
345
|
+
"success": "ListItemLoaded"
|
|
346
|
+
}
|
|
201
347
|
}
|
|
202
348
|
],
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
349
|
+
[
|
|
350
|
+
"render-ui",
|
|
351
|
+
"main",
|
|
352
|
+
{
|
|
353
|
+
"size": "lg",
|
|
354
|
+
"type": "spinner"
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"from": "error",
|
|
361
|
+
"to": "loading",
|
|
362
|
+
"event": "INIT",
|
|
363
|
+
"effects": [
|
|
364
|
+
[
|
|
365
|
+
"fetch",
|
|
366
|
+
"ListItem",
|
|
367
|
+
{
|
|
368
|
+
"emit": {
|
|
369
|
+
"failure": "ListItemLoadFailed",
|
|
370
|
+
"success": "ListItemLoaded"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
[
|
|
375
|
+
"render-ui",
|
|
376
|
+
"main",
|
|
377
|
+
{
|
|
378
|
+
"type": "spinner",
|
|
379
|
+
"size": "lg"
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
]
|
|
383
|
+
}
|
|
207
384
|
]
|
|
208
|
-
}
|
|
385
|
+
},
|
|
386
|
+
"scope": "collection"
|
|
209
387
|
},
|
|
210
388
|
{
|
|
211
389
|
"ref": "Modal.traits.ModalRecordModal",
|
|
212
390
|
"name": "ListItemCreate",
|
|
213
391
|
"linkedEntity": "ListItem",
|
|
392
|
+
"config": {
|
|
393
|
+
"title": "Create ListItem",
|
|
394
|
+
"fields": [
|
|
395
|
+
"name",
|
|
396
|
+
"description",
|
|
397
|
+
"status"
|
|
398
|
+
],
|
|
399
|
+
"mode": "create",
|
|
400
|
+
"icon": "plus-circle"
|
|
401
|
+
},
|
|
214
402
|
"events": {
|
|
215
403
|
"SAVE": "LIST_ITEM_CREATED",
|
|
216
404
|
"OPEN": "CREATE"
|
|
217
|
-
},
|
|
218
|
-
"effects": {
|
|
219
|
-
"CREATE": [
|
|
220
|
-
[
|
|
221
|
-
"fetch",
|
|
222
|
-
"ListItem"
|
|
223
|
-
],
|
|
224
|
-
[
|
|
225
|
-
"render-ui",
|
|
226
|
-
"modal",
|
|
227
|
-
{
|
|
228
|
-
"children": [
|
|
229
|
-
{
|
|
230
|
-
"type": "stack",
|
|
231
|
-
"children": [
|
|
232
|
-
{
|
|
233
|
-
"type": "icon",
|
|
234
|
-
"size": "md",
|
|
235
|
-
"name": "plus-circle"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"type": "typography",
|
|
239
|
-
"content": "Create ListItem",
|
|
240
|
-
"variant": "h3"
|
|
241
|
-
}
|
|
242
|
-
],
|
|
243
|
-
"direction": "horizontal",
|
|
244
|
-
"gap": "sm"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"type": "divider"
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
"entity": "ListItem",
|
|
251
|
-
"type": "form-section",
|
|
252
|
-
"submitEvent": "SAVE",
|
|
253
|
-
"fields": [
|
|
254
|
-
"name",
|
|
255
|
-
"description",
|
|
256
|
-
"status"
|
|
257
|
-
],
|
|
258
|
-
"cancelEvent": "CLOSE",
|
|
259
|
-
"mode": "create"
|
|
260
|
-
}
|
|
261
|
-
],
|
|
262
|
-
"type": "stack",
|
|
263
|
-
"gap": "md",
|
|
264
|
-
"direction": "vertical"
|
|
265
|
-
}
|
|
266
|
-
]
|
|
267
|
-
],
|
|
268
|
-
"INIT": [
|
|
269
|
-
[
|
|
270
|
-
"ref",
|
|
271
|
-
"ListItem"
|
|
272
|
-
]
|
|
273
|
-
],
|
|
274
|
-
"CLOSE": [
|
|
275
|
-
[
|
|
276
|
-
"render-ui",
|
|
277
|
-
"modal",
|
|
278
|
-
null
|
|
279
|
-
],
|
|
280
|
-
[
|
|
281
|
-
"render-ui",
|
|
282
|
-
"main",
|
|
283
|
-
{
|
|
284
|
-
"type": "box"
|
|
285
|
-
}
|
|
286
|
-
],
|
|
287
|
-
[
|
|
288
|
-
"notify",
|
|
289
|
-
"Cancelled",
|
|
290
|
-
"info"
|
|
291
|
-
]
|
|
292
|
-
],
|
|
293
|
-
"LIST_ITEM_CREATED": [
|
|
294
|
-
[
|
|
295
|
-
"persist",
|
|
296
|
-
"create",
|
|
297
|
-
"ListItem",
|
|
298
|
-
"@payload.data"
|
|
299
|
-
],
|
|
300
|
-
[
|
|
301
|
-
"render-ui",
|
|
302
|
-
"modal",
|
|
303
|
-
null
|
|
304
|
-
],
|
|
305
|
-
[
|
|
306
|
-
"render-ui",
|
|
307
|
-
"main",
|
|
308
|
-
{
|
|
309
|
-
"type": "box"
|
|
310
|
-
}
|
|
311
|
-
]
|
|
312
|
-
]
|
|
313
405
|
}
|
|
314
406
|
},
|
|
315
407
|
{
|
|
316
408
|
"ref": "Modal.traits.ModalRecordModal",
|
|
317
409
|
"name": "ListItemEdit",
|
|
318
410
|
"linkedEntity": "ListItem",
|
|
319
|
-
"
|
|
320
|
-
"
|
|
321
|
-
"
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
"update",
|
|
328
|
-
"ListItem",
|
|
329
|
-
"@payload.data"
|
|
330
|
-
],
|
|
331
|
-
[
|
|
332
|
-
"render-ui",
|
|
333
|
-
"modal",
|
|
334
|
-
null
|
|
335
|
-
],
|
|
336
|
-
[
|
|
337
|
-
"render-ui",
|
|
338
|
-
"main",
|
|
339
|
-
{
|
|
340
|
-
"type": "box"
|
|
341
|
-
}
|
|
342
|
-
]
|
|
343
|
-
],
|
|
344
|
-
"CLOSE": [
|
|
345
|
-
[
|
|
346
|
-
"render-ui",
|
|
347
|
-
"modal",
|
|
348
|
-
null
|
|
349
|
-
],
|
|
350
|
-
[
|
|
351
|
-
"render-ui",
|
|
352
|
-
"main",
|
|
353
|
-
{
|
|
354
|
-
"type": "box"
|
|
355
|
-
}
|
|
356
|
-
],
|
|
357
|
-
[
|
|
358
|
-
"notify",
|
|
359
|
-
"Cancelled",
|
|
360
|
-
"info"
|
|
361
|
-
]
|
|
362
|
-
],
|
|
363
|
-
"INIT": [
|
|
364
|
-
[
|
|
365
|
-
"ref",
|
|
366
|
-
"ListItem"
|
|
367
|
-
]
|
|
368
|
-
],
|
|
369
|
-
"EDIT": [
|
|
370
|
-
[
|
|
371
|
-
"fetch",
|
|
372
|
-
"ListItem",
|
|
373
|
-
{
|
|
374
|
-
"id": "@payload.id"
|
|
375
|
-
}
|
|
376
|
-
],
|
|
377
|
-
[
|
|
378
|
-
"render-ui",
|
|
379
|
-
"modal",
|
|
380
|
-
{
|
|
381
|
-
"type": "stack",
|
|
382
|
-
"children": [
|
|
383
|
-
{
|
|
384
|
-
"gap": "sm",
|
|
385
|
-
"type": "stack",
|
|
386
|
-
"direction": "horizontal",
|
|
387
|
-
"children": [
|
|
388
|
-
{
|
|
389
|
-
"name": "edit",
|
|
390
|
-
"size": "md",
|
|
391
|
-
"type": "icon"
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
"content": "Edit ListItem",
|
|
395
|
-
"type": "typography",
|
|
396
|
-
"variant": "h3"
|
|
397
|
-
}
|
|
398
|
-
]
|
|
399
|
-
},
|
|
400
|
-
{
|
|
401
|
-
"type": "divider"
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
"entity": "ListItem",
|
|
405
|
-
"type": "form-section",
|
|
406
|
-
"submitEvent": "SAVE",
|
|
407
|
-
"fields": [
|
|
408
|
-
"name",
|
|
409
|
-
"description",
|
|
410
|
-
"status"
|
|
411
|
-
],
|
|
412
|
-
"entityId": "@entity.id",
|
|
413
|
-
"mode": "edit",
|
|
414
|
-
"cancelEvent": "CLOSE"
|
|
415
|
-
}
|
|
416
|
-
],
|
|
417
|
-
"direction": "vertical",
|
|
418
|
-
"gap": "md"
|
|
419
|
-
}
|
|
420
|
-
]
|
|
411
|
+
"config": {
|
|
412
|
+
"mode": "edit",
|
|
413
|
+
"title": "Edit ListItem",
|
|
414
|
+
"icon": "edit",
|
|
415
|
+
"fields": [
|
|
416
|
+
"name",
|
|
417
|
+
"description",
|
|
418
|
+
"status"
|
|
421
419
|
]
|
|
422
|
-
}
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
"ref": "Modal.traits.ModalRecordModal",
|
|
426
|
-
"name": "ListItemView",
|
|
427
|
-
"linkedEntity": "ListItem",
|
|
428
|
-
"events": {
|
|
429
|
-
"SAVE": "LIST_ITEM_VIEWED",
|
|
430
|
-
"OPEN": "VIEW"
|
|
431
420
|
},
|
|
432
|
-
"
|
|
433
|
-
"
|
|
434
|
-
|
|
435
|
-
"ref",
|
|
436
|
-
"ListItem"
|
|
437
|
-
]
|
|
438
|
-
],
|
|
439
|
-
"CLOSE": [
|
|
440
|
-
[
|
|
441
|
-
"render-ui",
|
|
442
|
-
"modal",
|
|
443
|
-
null
|
|
444
|
-
],
|
|
445
|
-
[
|
|
446
|
-
"render-ui",
|
|
447
|
-
"main",
|
|
448
|
-
{
|
|
449
|
-
"type": "box"
|
|
450
|
-
}
|
|
451
|
-
],
|
|
452
|
-
[
|
|
453
|
-
"notify",
|
|
454
|
-
"Cancelled",
|
|
455
|
-
"info"
|
|
456
|
-
]
|
|
457
|
-
],
|
|
458
|
-
"LIST_ITEM_VIEWED": [
|
|
459
|
-
[
|
|
460
|
-
"render-ui",
|
|
461
|
-
"modal",
|
|
462
|
-
null
|
|
463
|
-
],
|
|
464
|
-
[
|
|
465
|
-
"render-ui",
|
|
466
|
-
"main",
|
|
467
|
-
{
|
|
468
|
-
"type": "box"
|
|
469
|
-
}
|
|
470
|
-
]
|
|
471
|
-
],
|
|
472
|
-
"VIEW": [
|
|
473
|
-
[
|
|
474
|
-
"fetch",
|
|
475
|
-
"ListItem",
|
|
476
|
-
{
|
|
477
|
-
"id": "@payload.id"
|
|
478
|
-
}
|
|
479
|
-
],
|
|
480
|
-
[
|
|
481
|
-
"render-ui",
|
|
482
|
-
"modal",
|
|
483
|
-
{
|
|
484
|
-
"gap": "md",
|
|
485
|
-
"children": [
|
|
486
|
-
{
|
|
487
|
-
"gap": "sm",
|
|
488
|
-
"type": "stack",
|
|
489
|
-
"children": [
|
|
490
|
-
{
|
|
491
|
-
"size": "md",
|
|
492
|
-
"name": "eye",
|
|
493
|
-
"type": "icon"
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
"content": "@entity.name",
|
|
497
|
-
"type": "typography",
|
|
498
|
-
"variant": "h3"
|
|
499
|
-
}
|
|
500
|
-
],
|
|
501
|
-
"align": "center",
|
|
502
|
-
"direction": "horizontal"
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"type": "divider"
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
"direction": "horizontal",
|
|
509
|
-
"type": "stack",
|
|
510
|
-
"gap": "md",
|
|
511
|
-
"children": [
|
|
512
|
-
{
|
|
513
|
-
"variant": "caption",
|
|
514
|
-
"content": "Name",
|
|
515
|
-
"type": "typography"
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
"content": "@entity.name",
|
|
519
|
-
"type": "typography",
|
|
520
|
-
"variant": "body"
|
|
521
|
-
}
|
|
522
|
-
]
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
"direction": "horizontal",
|
|
526
|
-
"gap": "md",
|
|
527
|
-
"type": "stack",
|
|
528
|
-
"children": [
|
|
529
|
-
{
|
|
530
|
-
"variant": "caption",
|
|
531
|
-
"content": "Description",
|
|
532
|
-
"type": "typography"
|
|
533
|
-
},
|
|
534
|
-
{
|
|
535
|
-
"type": "typography",
|
|
536
|
-
"content": "@entity.description",
|
|
537
|
-
"variant": "body"
|
|
538
|
-
}
|
|
539
|
-
]
|
|
540
|
-
},
|
|
541
|
-
{
|
|
542
|
-
"gap": "md",
|
|
543
|
-
"children": [
|
|
544
|
-
{
|
|
545
|
-
"variant": "caption",
|
|
546
|
-
"type": "typography",
|
|
547
|
-
"content": "Status"
|
|
548
|
-
},
|
|
549
|
-
{
|
|
550
|
-
"content": "@entity.status",
|
|
551
|
-
"variant": "body",
|
|
552
|
-
"type": "typography"
|
|
553
|
-
}
|
|
554
|
-
],
|
|
555
|
-
"direction": "horizontal",
|
|
556
|
-
"type": "stack"
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
"direction": "horizontal",
|
|
560
|
-
"type": "stack",
|
|
561
|
-
"gap": "md",
|
|
562
|
-
"children": [
|
|
563
|
-
{
|
|
564
|
-
"variant": "caption",
|
|
565
|
-
"content": "Created At",
|
|
566
|
-
"type": "typography"
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
"content": "@entity.createdAt",
|
|
570
|
-
"variant": "body",
|
|
571
|
-
"type": "typography"
|
|
572
|
-
}
|
|
573
|
-
]
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
"type": "divider"
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
"direction": "horizontal",
|
|
580
|
-
"children": [
|
|
581
|
-
{
|
|
582
|
-
"event": "EDIT",
|
|
583
|
-
"label": "Edit",
|
|
584
|
-
"icon": "edit",
|
|
585
|
-
"variant": "primary",
|
|
586
|
-
"type": "button"
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
"event": "CLOSE",
|
|
590
|
-
"type": "button",
|
|
591
|
-
"label": "Close",
|
|
592
|
-
"variant": "ghost"
|
|
593
|
-
}
|
|
594
|
-
],
|
|
595
|
-
"justify": "end",
|
|
596
|
-
"type": "stack",
|
|
597
|
-
"gap": "sm"
|
|
598
|
-
}
|
|
599
|
-
],
|
|
600
|
-
"direction": "vertical",
|
|
601
|
-
"type": "stack"
|
|
602
|
-
}
|
|
603
|
-
]
|
|
604
|
-
]
|
|
421
|
+
"events": {
|
|
422
|
+
"OPEN": "EDIT",
|
|
423
|
+
"SAVE": "LIST_ITEM_UPDATED"
|
|
605
424
|
}
|
|
606
425
|
},
|
|
607
426
|
{
|
|
608
427
|
"ref": "Confirmation.traits.ConfirmActionConfirmation",
|
|
609
428
|
"name": "ListItemDelete",
|
|
610
429
|
"linkedEntity": "ListItem",
|
|
430
|
+
"config": {
|
|
431
|
+
"icon": "alert-triangle",
|
|
432
|
+
"confirmLabel": "Delete",
|
|
433
|
+
"title": "Delete ListItem",
|
|
434
|
+
"alertMessage": "This action cannot be undone."
|
|
435
|
+
},
|
|
611
436
|
"events": {
|
|
612
437
|
"REQUEST": "DELETE",
|
|
613
438
|
"CONFIRM": "CONFIRM_DELETE"
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
"modal",
|
|
626
|
-
null
|
|
627
|
-
],
|
|
628
|
-
[
|
|
629
|
-
"render-ui",
|
|
630
|
-
"main",
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"name": "ListItemPersistor",
|
|
443
|
+
"category": "lifecycle",
|
|
444
|
+
"linkedEntity": "ListItem",
|
|
445
|
+
"emits": [
|
|
446
|
+
{
|
|
447
|
+
"event": "ITEM_CREATED",
|
|
448
|
+
"scope": "external",
|
|
449
|
+
"payload": [
|
|
631
450
|
{
|
|
632
|
-
"
|
|
451
|
+
"name": "id",
|
|
452
|
+
"type": "string",
|
|
453
|
+
"required": true
|
|
633
454
|
}
|
|
634
|
-
],
|
|
635
|
-
[
|
|
636
|
-
"ref",
|
|
637
|
-
"ListItem"
|
|
638
455
|
]
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
null
|
|
645
|
-
],
|
|
646
|
-
[
|
|
647
|
-
"render-ui",
|
|
648
|
-
"main",
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"event": "ITEM_UPDATED",
|
|
459
|
+
"scope": "external",
|
|
460
|
+
"payload": [
|
|
649
461
|
{
|
|
650
|
-
"
|
|
462
|
+
"name": "id",
|
|
463
|
+
"type": "string",
|
|
464
|
+
"required": true
|
|
651
465
|
}
|
|
652
|
-
],
|
|
653
|
-
[
|
|
654
|
-
"ref",
|
|
655
|
-
"ListItem"
|
|
656
466
|
]
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
"@payload.id"
|
|
663
|
-
],
|
|
664
|
-
[
|
|
665
|
-
"fetch",
|
|
666
|
-
"ListItem",
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"event": "ITEM_DELETED",
|
|
470
|
+
"scope": "external",
|
|
471
|
+
"payload": [
|
|
667
472
|
{
|
|
668
|
-
"
|
|
473
|
+
"name": "id",
|
|
474
|
+
"type": "string",
|
|
475
|
+
"required": true
|
|
669
476
|
}
|
|
670
|
-
]
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
477
|
+
]
|
|
478
|
+
}
|
|
479
|
+
],
|
|
480
|
+
"listens": [
|
|
481
|
+
{
|
|
482
|
+
"event": "LIST_ITEM_CREATED",
|
|
483
|
+
"triggers": "DO_CREATE",
|
|
484
|
+
"source": {
|
|
485
|
+
"kind": "trait",
|
|
486
|
+
"trait": "ListItemCreate"
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"event": "LIST_ITEM_UPDATED",
|
|
491
|
+
"triggers": "DO_UPDATE",
|
|
492
|
+
"source": {
|
|
493
|
+
"kind": "trait",
|
|
494
|
+
"trait": "ListItemEdit"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"event": "CONFIRM_DELETE",
|
|
499
|
+
"triggers": "DO_DELETE",
|
|
500
|
+
"source": {
|
|
501
|
+
"kind": "trait",
|
|
502
|
+
"trait": "ListItemDelete"
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
],
|
|
506
|
+
"stateMachine": {
|
|
507
|
+
"states": [
|
|
508
|
+
{
|
|
509
|
+
"name": "idle",
|
|
510
|
+
"isInitial": true
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"events": [
|
|
514
|
+
{
|
|
515
|
+
"key": "INIT",
|
|
516
|
+
"name": "Initialize"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"key": "DO_CREATE",
|
|
520
|
+
"name": "Do Create",
|
|
521
|
+
"payload": [
|
|
522
|
+
{
|
|
523
|
+
"name": "data",
|
|
524
|
+
"type": "ListItem"
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"key": "DO_UPDATE",
|
|
530
|
+
"name": "Do Update",
|
|
531
|
+
"payload": [
|
|
532
|
+
{
|
|
533
|
+
"name": "data",
|
|
534
|
+
"type": "ListItem"
|
|
535
|
+
}
|
|
536
|
+
]
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"key": "DO_DELETE",
|
|
540
|
+
"name": "Do Delete",
|
|
541
|
+
"payload": [
|
|
542
|
+
{
|
|
543
|
+
"name": "id",
|
|
544
|
+
"type": "string",
|
|
545
|
+
"required": true
|
|
546
|
+
}
|
|
547
|
+
]
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"key": "ITEM_CREATED",
|
|
551
|
+
"name": "Item Created"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"key": "ITEM_UPDATED",
|
|
555
|
+
"name": "Item Updated"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"key": "ITEM_DELETED",
|
|
559
|
+
"name": "Item Deleted"
|
|
560
|
+
}
|
|
561
|
+
],
|
|
562
|
+
"transitions": [
|
|
563
|
+
{
|
|
564
|
+
"from": "idle",
|
|
565
|
+
"to": "idle",
|
|
566
|
+
"event": "INIT"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"from": "idle",
|
|
570
|
+
"to": "idle",
|
|
571
|
+
"event": "DO_CREATE",
|
|
572
|
+
"effects": [
|
|
573
|
+
[
|
|
574
|
+
"persist",
|
|
575
|
+
"create",
|
|
576
|
+
"ListItem",
|
|
577
|
+
"@payload.data"
|
|
578
|
+
],
|
|
579
|
+
[
|
|
580
|
+
"emit",
|
|
581
|
+
"ITEM_CREATED",
|
|
699
582
|
{
|
|
700
|
-
"
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
583
|
+
"id": "@payload.data.id"
|
|
584
|
+
}
|
|
585
|
+
]
|
|
586
|
+
]
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"from": "idle",
|
|
590
|
+
"to": "idle",
|
|
591
|
+
"event": "DO_UPDATE",
|
|
592
|
+
"effects": [
|
|
593
|
+
[
|
|
594
|
+
"persist",
|
|
595
|
+
"update",
|
|
596
|
+
"ListItem",
|
|
597
|
+
"@payload.data"
|
|
598
|
+
],
|
|
599
|
+
[
|
|
600
|
+
"emit",
|
|
601
|
+
"ITEM_UPDATED",
|
|
704
602
|
{
|
|
705
|
-
"
|
|
706
|
-
"gap": "sm",
|
|
707
|
-
"type": "stack",
|
|
708
|
-
"justify": "end",
|
|
709
|
-
"children": [
|
|
710
|
-
{
|
|
711
|
-
"variant": "ghost",
|
|
712
|
-
"event": "CANCEL",
|
|
713
|
-
"label": "Cancel",
|
|
714
|
-
"type": "button"
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
"type": "button",
|
|
718
|
-
"event": "CONFIRM_DELETE",
|
|
719
|
-
"icon": "check",
|
|
720
|
-
"label": "Delete",
|
|
721
|
-
"variant": "danger"
|
|
722
|
-
}
|
|
723
|
-
]
|
|
603
|
+
"id": "@payload.data.id"
|
|
724
604
|
}
|
|
605
|
+
]
|
|
606
|
+
]
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"from": "idle",
|
|
610
|
+
"to": "idle",
|
|
611
|
+
"event": "DO_DELETE",
|
|
612
|
+
"effects": [
|
|
613
|
+
[
|
|
614
|
+
"persist",
|
|
615
|
+
"delete",
|
|
616
|
+
"ListItem",
|
|
617
|
+
"@payload.id"
|
|
725
618
|
],
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
],
|
|
736
|
-
"CLOSE": [
|
|
737
|
-
[
|
|
738
|
-
"render-ui",
|
|
739
|
-
"modal",
|
|
740
|
-
null
|
|
741
|
-
],
|
|
742
|
-
[
|
|
743
|
-
"render-ui",
|
|
744
|
-
"main",
|
|
745
|
-
{
|
|
746
|
-
"type": "box"
|
|
747
|
-
}
|
|
748
|
-
],
|
|
749
|
-
[
|
|
750
|
-
"ref",
|
|
751
|
-
"ListItem"
|
|
752
|
-
]
|
|
619
|
+
[
|
|
620
|
+
"emit",
|
|
621
|
+
"ITEM_DELETED",
|
|
622
|
+
{
|
|
623
|
+
"id": "@payload.id"
|
|
624
|
+
}
|
|
625
|
+
]
|
|
626
|
+
]
|
|
627
|
+
}
|
|
753
628
|
]
|
|
754
|
-
}
|
|
629
|
+
},
|
|
630
|
+
"scope": "instance"
|
|
755
631
|
}
|
|
756
632
|
],
|
|
757
633
|
"pages": [
|
|
@@ -769,10 +645,10 @@
|
|
|
769
645
|
"ref": "ListItemEdit"
|
|
770
646
|
},
|
|
771
647
|
{
|
|
772
|
-
"ref": "
|
|
648
|
+
"ref": "ListItemDelete"
|
|
773
649
|
},
|
|
774
650
|
{
|
|
775
|
-
"ref": "
|
|
651
|
+
"ref": "ListItemPersistor"
|
|
776
652
|
}
|
|
777
653
|
]
|
|
778
654
|
}
|