@almadar/std 13.0.5 → 13.0.6
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/core/atoms/std-browse.orb +57 -6
- package/behaviors/registry/core/atoms/std-filter.orb +52 -29
- package/behaviors/registry/core/atoms/std-pagination.orb +41 -18
- package/behaviors/registry/core/atoms/std-search.orb +54 -37
- package/behaviors/registry/core/molecules/std-filtered-list.orb +48 -22
- package/dist/behaviors/registry/core/atoms/std-browse.orb +57 -6
- package/dist/behaviors/registry/core/atoms/std-filter.orb +52 -29
- package/dist/behaviors/registry/core/atoms/std-pagination.orb +41 -18
- package/dist/behaviors/registry/core/atoms/std-search.orb +54 -37
- package/dist/behaviors/registry/core/molecules/std-filtered-list.orb +48 -22
- package/package.json +1 -1
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"config": {
|
|
71
71
|
"filters": [
|
|
72
72
|
{
|
|
73
|
+
"filterType": "select",
|
|
73
74
|
"options": [
|
|
74
75
|
"active",
|
|
75
76
|
"inactive",
|
|
76
77
|
"pending"
|
|
77
78
|
],
|
|
78
79
|
"field": "status",
|
|
79
|
-
"filterType": "select",
|
|
80
80
|
"label": "Status"
|
|
81
81
|
}
|
|
82
82
|
],
|
|
@@ -91,12 +91,12 @@
|
|
|
91
91
|
"fields": [
|
|
92
92
|
{
|
|
93
93
|
"label": "Name",
|
|
94
|
-
"
|
|
95
|
-
"
|
|
94
|
+
"name": "name",
|
|
95
|
+
"variant": "h4"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
|
-
"label": "Description",
|
|
99
98
|
"variant": "caption",
|
|
99
|
+
"label": "Description",
|
|
100
100
|
"name": "description"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
@@ -105,7 +105,33 @@
|
|
|
105
105
|
"variant": "badge"
|
|
106
106
|
}
|
|
107
107
|
]
|
|
108
|
-
}
|
|
108
|
+
},
|
|
109
|
+
"listens": [
|
|
110
|
+
{
|
|
111
|
+
"event": "SEARCH",
|
|
112
|
+
"triggers": "REFETCH",
|
|
113
|
+
"source": {
|
|
114
|
+
"kind": "trait",
|
|
115
|
+
"trait": "FilteredItemSearch"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"event": "FILTER",
|
|
120
|
+
"triggers": "REFETCH",
|
|
121
|
+
"source": {
|
|
122
|
+
"kind": "trait",
|
|
123
|
+
"trait": "FilteredItemFilter"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"event": "PAGE",
|
|
128
|
+
"triggers": "REFETCH",
|
|
129
|
+
"source": {
|
|
130
|
+
"kind": "trait",
|
|
131
|
+
"trait": "FilteredItemPagination"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
109
135
|
},
|
|
110
136
|
{
|
|
111
137
|
"ref": "Pagination.traits.PagedItemPagination",
|
|
@@ -194,8 +220,8 @@
|
|
|
194
220
|
"FilteredListItem",
|
|
195
221
|
{
|
|
196
222
|
"emit": {
|
|
197
|
-
"
|
|
198
|
-
"
|
|
223
|
+
"failure": "FilteredListItemLoadFailed",
|
|
224
|
+
"success": "FilteredListItemLoaded"
|
|
199
225
|
}
|
|
200
226
|
}
|
|
201
227
|
],
|
|
@@ -203,43 +229,43 @@
|
|
|
203
229
|
"render-ui",
|
|
204
230
|
"main",
|
|
205
231
|
{
|
|
206
|
-
"
|
|
207
|
-
"direction": "vertical",
|
|
232
|
+
"gap": "md",
|
|
208
233
|
"children": [
|
|
209
234
|
{
|
|
235
|
+
"type": "stack",
|
|
236
|
+
"align": "center",
|
|
237
|
+
"gap": "sm",
|
|
238
|
+
"direction": "horizontal",
|
|
210
239
|
"children": [
|
|
211
240
|
{
|
|
212
|
-
"
|
|
213
|
-
"
|
|
241
|
+
"name": "list",
|
|
242
|
+
"type": "icon"
|
|
214
243
|
},
|
|
215
244
|
{
|
|
216
|
-
"
|
|
245
|
+
"type": "typography",
|
|
217
246
|
"content": "Filtered List",
|
|
218
|
-
"
|
|
247
|
+
"variant": "h2"
|
|
219
248
|
}
|
|
220
|
-
]
|
|
221
|
-
"gap": "sm",
|
|
222
|
-
"direction": "horizontal",
|
|
223
|
-
"type": "stack",
|
|
224
|
-
"align": "center"
|
|
249
|
+
]
|
|
225
250
|
},
|
|
226
251
|
{
|
|
227
252
|
"type": "divider"
|
|
228
253
|
},
|
|
229
254
|
{
|
|
230
|
-
"type": "stack",
|
|
231
|
-
"gap": "sm",
|
|
232
255
|
"children": [
|
|
233
256
|
"@trait.FilteredItemSearch",
|
|
234
257
|
"@trait.FilteredItemFilter"
|
|
235
258
|
],
|
|
236
|
-
"direction": "horizontal"
|
|
259
|
+
"direction": "horizontal",
|
|
260
|
+
"gap": "sm",
|
|
261
|
+
"type": "stack"
|
|
237
262
|
},
|
|
238
263
|
"@trait.FilteredItemBrowse",
|
|
239
264
|
"@trait.FilteredItemPagination"
|
|
240
265
|
],
|
|
266
|
+
"direction": "vertical",
|
|
241
267
|
"className": "max-w-5xl mx-auto w-full",
|
|
242
|
-
"
|
|
268
|
+
"type": "stack"
|
|
243
269
|
}
|
|
244
270
|
]
|
|
245
271
|
]
|
|
@@ -113,6 +113,32 @@
|
|
|
113
113
|
"type": "string"
|
|
114
114
|
}
|
|
115
115
|
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"key": "REFETCH",
|
|
119
|
+
"name": "Refetch",
|
|
120
|
+
"payloadSchema": [
|
|
121
|
+
{
|
|
122
|
+
"name": "query",
|
|
123
|
+
"type": "string"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "field",
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "value",
|
|
131
|
+
"type": "string"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "page",
|
|
135
|
+
"type": "number"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"name": "pageSize",
|
|
139
|
+
"type": "number"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
116
142
|
}
|
|
117
143
|
],
|
|
118
144
|
"transitions": [
|
|
@@ -152,10 +178,10 @@
|
|
|
152
178
|
{
|
|
153
179
|
"children": [
|
|
154
180
|
{
|
|
181
|
+
"entity": "@payload.data",
|
|
155
182
|
"fields": "@config.fields",
|
|
156
183
|
"type": "data-grid",
|
|
157
|
-
"pageSize": "@config.pageSize"
|
|
158
|
-
"entity": "@payload.data"
|
|
184
|
+
"pageSize": "@config.pageSize"
|
|
159
185
|
}
|
|
160
186
|
],
|
|
161
187
|
"type": "stack",
|
|
@@ -174,9 +200,9 @@
|
|
|
174
200
|
"main",
|
|
175
201
|
{
|
|
176
202
|
"variant": "caption",
|
|
177
|
-
"color": "error",
|
|
178
203
|
"content": "@payload.error",
|
|
179
|
-
"type": "typography"
|
|
204
|
+
"type": "typography",
|
|
205
|
+
"color": "error"
|
|
180
206
|
}
|
|
181
207
|
]
|
|
182
208
|
]
|
|
@@ -185,6 +211,31 @@
|
|
|
185
211
|
"from": "browsing",
|
|
186
212
|
"to": "loading",
|
|
187
213
|
"event": "INIT",
|
|
214
|
+
"effects": [
|
|
215
|
+
[
|
|
216
|
+
"fetch",
|
|
217
|
+
"BrowseItem",
|
|
218
|
+
{
|
|
219
|
+
"emit": {
|
|
220
|
+
"failure": "BrowseItemLoadFailed",
|
|
221
|
+
"success": "BrowseItemLoaded"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
[
|
|
226
|
+
"render-ui",
|
|
227
|
+
"main",
|
|
228
|
+
{
|
|
229
|
+
"type": "spinner",
|
|
230
|
+
"size": "sm"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"from": "browsing",
|
|
237
|
+
"to": "loading",
|
|
238
|
+
"event": "REFETCH",
|
|
188
239
|
"effects": [
|
|
189
240
|
[
|
|
190
241
|
"fetch",
|
|
@@ -216,8 +267,8 @@
|
|
|
216
267
|
"BrowseItem",
|
|
217
268
|
{
|
|
218
269
|
"emit": {
|
|
219
|
-
"
|
|
220
|
-
"
|
|
270
|
+
"success": "BrowseItemLoaded",
|
|
271
|
+
"failure": "BrowseItemLoadFailed"
|
|
221
272
|
}
|
|
222
273
|
}
|
|
223
274
|
],
|
|
@@ -45,6 +45,21 @@
|
|
|
45
45
|
"category": "interaction",
|
|
46
46
|
"linkedEntity": "FilterTarget",
|
|
47
47
|
"emits": [
|
|
48
|
+
{
|
|
49
|
+
"event": "FILTER",
|
|
50
|
+
"payloadSchema": [
|
|
51
|
+
{
|
|
52
|
+
"name": "field",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"required": true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "value",
|
|
58
|
+
"type": "string",
|
|
59
|
+
"required": true
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
48
63
|
{
|
|
49
64
|
"event": "FilterTargetLoaded",
|
|
50
65
|
"description": "Fired when FilterTarget finishes loading; payload.data holds the filtered list",
|
|
@@ -155,8 +170,8 @@
|
|
|
155
170
|
"render-ui",
|
|
156
171
|
"main",
|
|
157
172
|
{
|
|
158
|
-
"
|
|
159
|
-
"
|
|
173
|
+
"size": "sm",
|
|
174
|
+
"type": "spinner"
|
|
160
175
|
}
|
|
161
176
|
]
|
|
162
177
|
]
|
|
@@ -170,8 +185,8 @@
|
|
|
170
185
|
"render-ui",
|
|
171
186
|
"main",
|
|
172
187
|
{
|
|
173
|
-
"entity": "FilterTarget",
|
|
174
188
|
"type": "filter-group",
|
|
189
|
+
"entity": "FilterTarget",
|
|
175
190
|
"filters": "@config.filters"
|
|
176
191
|
}
|
|
177
192
|
]
|
|
@@ -187,21 +202,21 @@
|
|
|
187
202
|
"main",
|
|
188
203
|
{
|
|
189
204
|
"type": "stack",
|
|
205
|
+
"direction": "vertical",
|
|
190
206
|
"children": [
|
|
191
207
|
{
|
|
208
|
+
"filters": "@config.filters",
|
|
192
209
|
"type": "filter-group",
|
|
193
|
-
"entity": "FilterTarget"
|
|
194
|
-
"filters": "@config.filters"
|
|
210
|
+
"entity": "FilterTarget"
|
|
195
211
|
},
|
|
196
212
|
{
|
|
197
213
|
"content": "@payload.error",
|
|
198
|
-
"color": "error",
|
|
199
214
|
"type": "typography",
|
|
215
|
+
"color": "error",
|
|
200
216
|
"variant": "caption"
|
|
201
217
|
}
|
|
202
218
|
],
|
|
203
|
-
"gap": "xs"
|
|
204
|
-
"direction": "vertical"
|
|
219
|
+
"gap": "xs"
|
|
205
220
|
}
|
|
206
221
|
]
|
|
207
222
|
]
|
|
@@ -211,10 +226,22 @@
|
|
|
211
226
|
"to": "loading",
|
|
212
227
|
"event": "FILTER",
|
|
213
228
|
"effects": [
|
|
229
|
+
[
|
|
230
|
+
"emit",
|
|
231
|
+
"FILTER",
|
|
232
|
+
{
|
|
233
|
+
"value": "@payload.value",
|
|
234
|
+
"field": "@payload.field"
|
|
235
|
+
}
|
|
236
|
+
],
|
|
214
237
|
[
|
|
215
238
|
"fetch",
|
|
216
239
|
"FilterTarget",
|
|
217
240
|
{
|
|
241
|
+
"emit": {
|
|
242
|
+
"failure": "FilterTargetLoadFailed",
|
|
243
|
+
"success": "FilterTargetLoaded"
|
|
244
|
+
},
|
|
218
245
|
"filter": [
|
|
219
246
|
"=",
|
|
220
247
|
[
|
|
@@ -223,30 +250,26 @@
|
|
|
223
250
|
"@payload.field"
|
|
224
251
|
],
|
|
225
252
|
"@payload.value"
|
|
226
|
-
]
|
|
227
|
-
"emit": {
|
|
228
|
-
"failure": "FilterTargetLoadFailed",
|
|
229
|
-
"success": "FilterTargetLoaded"
|
|
230
|
-
}
|
|
253
|
+
]
|
|
231
254
|
}
|
|
232
255
|
],
|
|
233
256
|
[
|
|
234
257
|
"render-ui",
|
|
235
258
|
"main",
|
|
236
259
|
{
|
|
237
|
-
"direction": "horizontal",
|
|
238
260
|
"type": "stack",
|
|
239
|
-
"
|
|
261
|
+
"direction": "horizontal",
|
|
240
262
|
"gap": "sm",
|
|
263
|
+
"align": "center",
|
|
241
264
|
"children": [
|
|
242
265
|
{
|
|
266
|
+
"type": "filter-group",
|
|
243
267
|
"filters": "@config.filters",
|
|
244
|
-
"entity": "FilterTarget"
|
|
245
|
-
"type": "filter-group"
|
|
268
|
+
"entity": "FilterTarget"
|
|
246
269
|
},
|
|
247
270
|
{
|
|
248
|
-
"
|
|
249
|
-
"
|
|
271
|
+
"type": "spinner",
|
|
272
|
+
"size": "sm"
|
|
250
273
|
}
|
|
251
274
|
]
|
|
252
275
|
}
|
|
@@ -263,8 +286,8 @@
|
|
|
263
286
|
"FilterTarget",
|
|
264
287
|
{
|
|
265
288
|
"emit": {
|
|
266
|
-
"
|
|
267
|
-
"
|
|
289
|
+
"failure": "FilterTargetLoadFailed",
|
|
290
|
+
"success": "FilterTargetLoaded"
|
|
268
291
|
}
|
|
269
292
|
}
|
|
270
293
|
],
|
|
@@ -272,8 +295,6 @@
|
|
|
272
295
|
"render-ui",
|
|
273
296
|
"main",
|
|
274
297
|
{
|
|
275
|
-
"type": "stack",
|
|
276
|
-
"gap": "sm",
|
|
277
298
|
"children": [
|
|
278
299
|
{
|
|
279
300
|
"filters": "@config.filters",
|
|
@@ -285,8 +306,10 @@
|
|
|
285
306
|
"type": "spinner"
|
|
286
307
|
}
|
|
287
308
|
],
|
|
288
|
-
"
|
|
289
|
-
"
|
|
309
|
+
"gap": "sm",
|
|
310
|
+
"type": "stack",
|
|
311
|
+
"direction": "horizontal",
|
|
312
|
+
"align": "center"
|
|
290
313
|
}
|
|
291
314
|
]
|
|
292
315
|
]
|
|
@@ -301,8 +324,8 @@
|
|
|
301
324
|
"FilterTarget",
|
|
302
325
|
{
|
|
303
326
|
"emit": {
|
|
304
|
-
"
|
|
305
|
-
"
|
|
327
|
+
"success": "FilterTargetLoaded",
|
|
328
|
+
"failure": "FilterTargetLoadFailed"
|
|
306
329
|
}
|
|
307
330
|
}
|
|
308
331
|
],
|
|
@@ -310,8 +333,8 @@
|
|
|
310
333
|
"render-ui",
|
|
311
334
|
"main",
|
|
312
335
|
{
|
|
313
|
-
"
|
|
314
|
-
"
|
|
336
|
+
"type": "spinner",
|
|
337
|
+
"size": "sm"
|
|
315
338
|
}
|
|
316
339
|
]
|
|
317
340
|
]
|
|
@@ -45,6 +45,21 @@
|
|
|
45
45
|
"category": "interaction",
|
|
46
46
|
"linkedEntity": "PagedItem",
|
|
47
47
|
"emits": [
|
|
48
|
+
{
|
|
49
|
+
"event": "PAGE",
|
|
50
|
+
"payloadSchema": [
|
|
51
|
+
{
|
|
52
|
+
"name": "page",
|
|
53
|
+
"type": "number",
|
|
54
|
+
"required": true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "pageSize",
|
|
58
|
+
"type": "number",
|
|
59
|
+
"required": true
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
48
63
|
{
|
|
49
64
|
"event": "PagedItemLoaded",
|
|
50
65
|
"description": "Fired when PagedItem finishes loading; payload.data holds the page",
|
|
@@ -142,8 +157,8 @@
|
|
|
142
157
|
"PagedItem",
|
|
143
158
|
{
|
|
144
159
|
"emit": {
|
|
145
|
-
"
|
|
146
|
-
"
|
|
160
|
+
"success": "PagedItemLoaded",
|
|
161
|
+
"failure": "PagedItemLoadFailed"
|
|
147
162
|
}
|
|
148
163
|
}
|
|
149
164
|
],
|
|
@@ -167,10 +182,10 @@
|
|
|
167
182
|
"main",
|
|
168
183
|
{
|
|
169
184
|
"onPageChange": "@config.event",
|
|
170
|
-
"
|
|
185
|
+
"currentPage": 1.0,
|
|
171
186
|
"type": "pagination",
|
|
172
|
-
"
|
|
173
|
-
"
|
|
187
|
+
"totalPages": "@config.totalPages",
|
|
188
|
+
"showPageSize": false
|
|
174
189
|
}
|
|
175
190
|
]
|
|
176
191
|
]
|
|
@@ -186,22 +201,22 @@
|
|
|
186
201
|
{
|
|
187
202
|
"children": [
|
|
188
203
|
{
|
|
189
|
-
"showPageSize": false,
|
|
190
|
-
"currentPage": 1.0,
|
|
191
204
|
"type": "pagination",
|
|
205
|
+
"currentPage": 1.0,
|
|
192
206
|
"onPageChange": "@config.event",
|
|
193
|
-
"totalPages": "@config.totalPages"
|
|
207
|
+
"totalPages": "@config.totalPages",
|
|
208
|
+
"showPageSize": false
|
|
194
209
|
},
|
|
195
210
|
{
|
|
196
|
-
"type": "typography",
|
|
197
211
|
"content": "@payload.error",
|
|
198
|
-
"
|
|
199
|
-
"color": "error"
|
|
212
|
+
"type": "typography",
|
|
213
|
+
"color": "error",
|
|
214
|
+
"variant": "caption"
|
|
200
215
|
}
|
|
201
216
|
],
|
|
202
217
|
"type": "stack",
|
|
203
|
-
"
|
|
204
|
-
"
|
|
218
|
+
"gap": "xs",
|
|
219
|
+
"direction": "vertical"
|
|
205
220
|
}
|
|
206
221
|
]
|
|
207
222
|
]
|
|
@@ -211,6 +226,14 @@
|
|
|
211
226
|
"to": "loading",
|
|
212
227
|
"event": "PAGE",
|
|
213
228
|
"effects": [
|
|
229
|
+
[
|
|
230
|
+
"emit",
|
|
231
|
+
"PAGE",
|
|
232
|
+
{
|
|
233
|
+
"pageSize": "@payload.pageSize",
|
|
234
|
+
"page": "@payload.page"
|
|
235
|
+
}
|
|
236
|
+
],
|
|
214
237
|
[
|
|
215
238
|
"fetch",
|
|
216
239
|
"PagedItem",
|
|
@@ -225,17 +248,17 @@
|
|
|
225
248
|
"render-ui",
|
|
226
249
|
"main",
|
|
227
250
|
{
|
|
251
|
+
"align": "center",
|
|
228
252
|
"type": "stack",
|
|
229
253
|
"direction": "horizontal",
|
|
230
254
|
"gap": "sm",
|
|
231
|
-
"align": "center",
|
|
232
255
|
"children": [
|
|
233
256
|
{
|
|
234
|
-
"currentPage": 1.0,
|
|
235
|
-
"onPageChange": "@config.event",
|
|
236
|
-
"totalPages": "@config.totalPages",
|
|
237
257
|
"type": "pagination",
|
|
238
|
-
"
|
|
258
|
+
"onPageChange": "@config.event",
|
|
259
|
+
"showPageSize": false,
|
|
260
|
+
"currentPage": 1.0,
|
|
261
|
+
"totalPages": "@config.totalPages"
|
|
239
262
|
},
|
|
240
263
|
{
|
|
241
264
|
"size": "sm",
|