@almadar/std 13.1.1 → 13.2.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.
- package/behaviors/registry/core/atoms/std-browse.orb +69 -23
- package/behaviors/registry/core/atoms/std-filter.orb +17 -9
- package/behaviors/registry/core/atoms/std-pagination.orb +20 -12
- package/behaviors/registry/core/molecules/std-filtered-list.orb +27 -18
- package/dist/behaviors/registry/core/atoms/std-browse.orb +69 -23
- package/dist/behaviors/registry/core/atoms/std-filter.orb +17 -9
- package/dist/behaviors/registry/core/atoms/std-pagination.orb +20 -12
- package/dist/behaviors/registry/core/molecules/std-filtered-list.orb +27 -18
- package/package.json +1 -1
|
@@ -47,12 +47,16 @@
|
|
|
47
47
|
"emits": [
|
|
48
48
|
{
|
|
49
49
|
"event": "BrowseItemLoaded",
|
|
50
|
-
"description": "Fired when the BrowseItem collection finishes loading; payload.data holds the
|
|
50
|
+
"description": "Fired when the BrowseItem collection finishes loading; payload.data holds the (possibly paginated) slice and totalCount holds the unsliced filter total. totalCount is optional so compiled-path emitters that haven't been migrated yet still validate",
|
|
51
51
|
"scope": "internal",
|
|
52
52
|
"payloadSchema": [
|
|
53
53
|
{
|
|
54
54
|
"name": "data",
|
|
55
55
|
"type": "[BrowseItem]"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "totalCount",
|
|
59
|
+
"type": "number"
|
|
56
60
|
}
|
|
57
61
|
]
|
|
58
62
|
},
|
|
@@ -97,6 +101,10 @@
|
|
|
97
101
|
{
|
|
98
102
|
"name": "data",
|
|
99
103
|
"type": "[BrowseItem]"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "totalCount",
|
|
107
|
+
"type": "number"
|
|
100
108
|
}
|
|
101
109
|
]
|
|
102
110
|
},
|
|
@@ -140,6 +148,17 @@
|
|
|
140
148
|
"required": true
|
|
141
149
|
}
|
|
142
150
|
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"key": "REFETCH_PAGE",
|
|
154
|
+
"name": "Refetch Page",
|
|
155
|
+
"payloadSchema": [
|
|
156
|
+
{
|
|
157
|
+
"name": "page",
|
|
158
|
+
"type": "number",
|
|
159
|
+
"required": true
|
|
160
|
+
}
|
|
161
|
+
]
|
|
143
162
|
}
|
|
144
163
|
],
|
|
145
164
|
"transitions": [
|
|
@@ -162,8 +181,8 @@
|
|
|
162
181
|
"render-ui",
|
|
163
182
|
"main",
|
|
164
183
|
{
|
|
165
|
-
"
|
|
166
|
-
"
|
|
184
|
+
"size": "sm",
|
|
185
|
+
"type": "spinner"
|
|
167
186
|
}
|
|
168
187
|
]
|
|
169
188
|
]
|
|
@@ -178,15 +197,15 @@
|
|
|
178
197
|
"main",
|
|
179
198
|
{
|
|
180
199
|
"type": "stack",
|
|
200
|
+
"direction": "vertical",
|
|
181
201
|
"children": [
|
|
182
202
|
{
|
|
203
|
+
"type": "data-grid",
|
|
183
204
|
"pageSize": "@config.pageSize",
|
|
184
205
|
"fields": "@config.fields",
|
|
185
|
-
"type": "data-grid",
|
|
186
206
|
"entity": "@entity"
|
|
187
207
|
}
|
|
188
|
-
]
|
|
189
|
-
"direction": "vertical"
|
|
208
|
+
]
|
|
190
209
|
}
|
|
191
210
|
]
|
|
192
211
|
]
|
|
@@ -201,9 +220,9 @@
|
|
|
201
220
|
"main",
|
|
202
221
|
{
|
|
203
222
|
"type": "typography",
|
|
204
|
-
"content": "@payload.error",
|
|
205
223
|
"variant": "caption",
|
|
206
|
-
"color": "error"
|
|
224
|
+
"color": "error",
|
|
225
|
+
"content": "@payload.error"
|
|
207
226
|
}
|
|
208
227
|
]
|
|
209
228
|
]
|
|
@@ -218,8 +237,8 @@
|
|
|
218
237
|
"BrowseItem",
|
|
219
238
|
{
|
|
220
239
|
"emit": {
|
|
221
|
-
"
|
|
222
|
-
"
|
|
240
|
+
"success": "BrowseItemLoaded",
|
|
241
|
+
"failure": "BrowseItemLoadFailed"
|
|
223
242
|
}
|
|
224
243
|
}
|
|
225
244
|
],
|
|
@@ -276,6 +295,10 @@
|
|
|
276
295
|
"fetch",
|
|
277
296
|
"BrowseItem",
|
|
278
297
|
{
|
|
298
|
+
"emit": {
|
|
299
|
+
"failure": "BrowseItemLoadFailed",
|
|
300
|
+
"success": "BrowseItemLoaded"
|
|
301
|
+
},
|
|
279
302
|
"filter": [
|
|
280
303
|
"or",
|
|
281
304
|
[
|
|
@@ -292,11 +315,34 @@
|
|
|
292
315
|
],
|
|
293
316
|
"@payload.value"
|
|
294
317
|
]
|
|
295
|
-
]
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"from": "browsing",
|
|
325
|
+
"to": "browsing",
|
|
326
|
+
"event": "REFETCH_PAGE",
|
|
327
|
+
"effects": [
|
|
328
|
+
[
|
|
329
|
+
"fetch",
|
|
330
|
+
"BrowseItem",
|
|
331
|
+
{
|
|
296
332
|
"emit": {
|
|
297
|
-
"
|
|
298
|
-
"
|
|
299
|
-
}
|
|
333
|
+
"success": "BrowseItemLoaded",
|
|
334
|
+
"failure": "BrowseItemLoadFailed"
|
|
335
|
+
},
|
|
336
|
+
"offset": [
|
|
337
|
+
"*",
|
|
338
|
+
[
|
|
339
|
+
"-",
|
|
340
|
+
"@payload.page",
|
|
341
|
+
1.0
|
|
342
|
+
],
|
|
343
|
+
"@config.pageSize"
|
|
344
|
+
],
|
|
345
|
+
"limit": "@config.pageSize"
|
|
300
346
|
}
|
|
301
347
|
]
|
|
302
348
|
]
|
|
@@ -312,10 +358,10 @@
|
|
|
312
358
|
{
|
|
313
359
|
"children": [
|
|
314
360
|
{
|
|
315
|
-
"type": "data-grid",
|
|
316
361
|
"entity": "@entity",
|
|
317
|
-
"
|
|
318
|
-
"
|
|
362
|
+
"pageSize": "@config.pageSize",
|
|
363
|
+
"type": "data-grid",
|
|
364
|
+
"fields": "@config.fields"
|
|
319
365
|
}
|
|
320
366
|
],
|
|
321
367
|
"direction": "vertical",
|
|
@@ -334,8 +380,8 @@
|
|
|
334
380
|
"BrowseItem",
|
|
335
381
|
{
|
|
336
382
|
"emit": {
|
|
337
|
-
"
|
|
338
|
-
"
|
|
383
|
+
"failure": "BrowseItemLoadFailed",
|
|
384
|
+
"success": "BrowseItemLoaded"
|
|
339
385
|
}
|
|
340
386
|
}
|
|
341
387
|
],
|
|
@@ -352,13 +398,13 @@
|
|
|
352
398
|
]
|
|
353
399
|
},
|
|
354
400
|
"config": {
|
|
355
|
-
"pageSize": {
|
|
356
|
-
"type": "number",
|
|
357
|
-
"default": 0.0
|
|
358
|
-
},
|
|
359
401
|
"fields": {
|
|
360
402
|
"type": "[object]",
|
|
361
403
|
"default": []
|
|
404
|
+
},
|
|
405
|
+
"pageSize": {
|
|
406
|
+
"type": "number",
|
|
407
|
+
"default": 0.0
|
|
362
408
|
}
|
|
363
409
|
},
|
|
364
410
|
"scope": "collection"
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"render-ui",
|
|
98
98
|
"main",
|
|
99
99
|
{
|
|
100
|
-
"filters": "@config.filters",
|
|
101
100
|
"type": "filter-group",
|
|
101
|
+
"filters": "@config.filters",
|
|
102
102
|
"entity": "FilterTarget"
|
|
103
103
|
}
|
|
104
104
|
]
|
|
@@ -123,9 +123,9 @@
|
|
|
123
123
|
"render-ui",
|
|
124
124
|
"main",
|
|
125
125
|
{
|
|
126
|
+
"entity": "FilterTarget",
|
|
126
127
|
"filters": "@config.filters",
|
|
127
|
-
"type": "filter-group"
|
|
128
|
-
"entity": "FilterTarget"
|
|
128
|
+
"type": "filter-group"
|
|
129
129
|
}
|
|
130
130
|
]
|
|
131
131
|
]
|
|
@@ -145,13 +145,21 @@
|
|
|
145
145
|
"@entity.value",
|
|
146
146
|
""
|
|
147
147
|
],
|
|
148
|
+
[
|
|
149
|
+
"emit",
|
|
150
|
+
"FILTER",
|
|
151
|
+
{
|
|
152
|
+
"value": "",
|
|
153
|
+
"field": ""
|
|
154
|
+
}
|
|
155
|
+
],
|
|
148
156
|
[
|
|
149
157
|
"render-ui",
|
|
150
158
|
"main",
|
|
151
159
|
{
|
|
152
|
-
"
|
|
160
|
+
"filters": "@config.filters",
|
|
153
161
|
"type": "filter-group",
|
|
154
|
-
"
|
|
162
|
+
"entity": "FilterTarget"
|
|
155
163
|
}
|
|
156
164
|
]
|
|
157
165
|
]
|
|
@@ -159,13 +167,13 @@
|
|
|
159
167
|
]
|
|
160
168
|
},
|
|
161
169
|
"config": {
|
|
162
|
-
"event": {
|
|
163
|
-
"type": "string",
|
|
164
|
-
"default": "FILTER"
|
|
165
|
-
},
|
|
166
170
|
"filters": {
|
|
167
171
|
"type": "[object]",
|
|
168
172
|
"default": []
|
|
173
|
+
},
|
|
174
|
+
"event": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"default": "FILTER"
|
|
169
177
|
}
|
|
170
178
|
},
|
|
171
179
|
"scope": "instance"
|
|
@@ -73,6 +73,10 @@
|
|
|
73
73
|
{
|
|
74
74
|
"name": "data",
|
|
75
75
|
"type": "[object]"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "totalCount",
|
|
79
|
+
"type": "number"
|
|
76
80
|
}
|
|
77
81
|
]
|
|
78
82
|
}
|
|
@@ -88,10 +92,10 @@
|
|
|
88
92
|
"main",
|
|
89
93
|
{
|
|
90
94
|
"totalPages": "@entity.totalPages",
|
|
91
|
-
"currentPage": 1.0,
|
|
92
|
-
"type": "pagination",
|
|
93
95
|
"onPageChange": "@config.event",
|
|
94
|
-
"showPageSize": false
|
|
96
|
+
"showPageSize": false,
|
|
97
|
+
"currentPage": "@entity.currentPage",
|
|
98
|
+
"type": "pagination"
|
|
95
99
|
}
|
|
96
100
|
]
|
|
97
101
|
]
|
|
@@ -110,11 +114,11 @@
|
|
|
110
114
|
"render-ui",
|
|
111
115
|
"main",
|
|
112
116
|
{
|
|
117
|
+
"showPageSize": false,
|
|
113
118
|
"totalPages": "@entity.totalPages",
|
|
114
|
-
"
|
|
119
|
+
"currentPage": "@entity.currentPage",
|
|
115
120
|
"type": "pagination",
|
|
116
|
-
"
|
|
117
|
-
"showPageSize": false
|
|
121
|
+
"onPageChange": "@config.event"
|
|
118
122
|
}
|
|
119
123
|
]
|
|
120
124
|
]
|
|
@@ -132,8 +136,12 @@
|
|
|
132
136
|
[
|
|
133
137
|
"/",
|
|
134
138
|
[
|
|
135
|
-
"
|
|
136
|
-
"@payload.
|
|
139
|
+
"or",
|
|
140
|
+
"@payload.totalCount",
|
|
141
|
+
[
|
|
142
|
+
"array/len",
|
|
143
|
+
"@payload.data"
|
|
144
|
+
]
|
|
137
145
|
],
|
|
138
146
|
"@config.pageSize"
|
|
139
147
|
]
|
|
@@ -143,11 +151,11 @@
|
|
|
143
151
|
"render-ui",
|
|
144
152
|
"main",
|
|
145
153
|
{
|
|
146
|
-
"showPageSize": false,
|
|
147
154
|
"type": "pagination",
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
155
|
+
"onPageChange": "@config.event",
|
|
156
|
+
"currentPage": "@entity.currentPage",
|
|
157
|
+
"showPageSize": false,
|
|
158
|
+
"totalPages": "@entity.totalPages"
|
|
151
159
|
}
|
|
152
160
|
]
|
|
153
161
|
]
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
"config": {
|
|
69
69
|
"filters": [
|
|
70
70
|
{
|
|
71
|
-
"filterType": "select",
|
|
72
71
|
"field": "status",
|
|
72
|
+
"label": "Status",
|
|
73
73
|
"options": [
|
|
74
74
|
"active",
|
|
75
75
|
"inactive",
|
|
76
76
|
"pending"
|
|
77
77
|
],
|
|
78
|
-
"
|
|
78
|
+
"filterType": "select"
|
|
79
79
|
}
|
|
80
80
|
],
|
|
81
81
|
"event": "FILTER"
|
|
@@ -86,11 +86,12 @@
|
|
|
86
86
|
"name": "FilteredItemBrowse",
|
|
87
87
|
"linkedEntity": "FilteredListItem",
|
|
88
88
|
"config": {
|
|
89
|
+
"pageSize": 3.0,
|
|
89
90
|
"fields": [
|
|
90
91
|
{
|
|
91
|
-
"name": "name",
|
|
92
92
|
"label": "Name",
|
|
93
|
-
"variant": "h4"
|
|
93
|
+
"variant": "h4",
|
|
94
|
+
"name": "name"
|
|
94
95
|
},
|
|
95
96
|
{
|
|
96
97
|
"name": "description",
|
|
@@ -120,6 +121,14 @@
|
|
|
120
121
|
"kind": "trait",
|
|
121
122
|
"trait": "FilteredItemFilter"
|
|
122
123
|
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"event": "PAGE",
|
|
127
|
+
"triggers": "REFETCH_PAGE",
|
|
128
|
+
"source": {
|
|
129
|
+
"kind": "trait",
|
|
130
|
+
"trait": "FilteredItemPagination"
|
|
131
|
+
}
|
|
123
132
|
}
|
|
124
133
|
]
|
|
125
134
|
},
|
|
@@ -127,8 +136,8 @@
|
|
|
127
136
|
"ref": "Pagination.traits.PagedItemPagination",
|
|
128
137
|
"name": "FilteredItemPagination",
|
|
129
138
|
"config": {
|
|
130
|
-
"
|
|
131
|
-
"
|
|
139
|
+
"pageSize": 3.0,
|
|
140
|
+
"event": "PAGE"
|
|
132
141
|
},
|
|
133
142
|
"listens": [
|
|
134
143
|
{
|
|
@@ -228,43 +237,43 @@
|
|
|
228
237
|
"render-ui",
|
|
229
238
|
"main",
|
|
230
239
|
{
|
|
240
|
+
"direction": "vertical",
|
|
231
241
|
"gap": "md",
|
|
232
|
-
"
|
|
242
|
+
"type": "stack",
|
|
233
243
|
"children": [
|
|
234
244
|
{
|
|
235
|
-
"
|
|
236
|
-
"align": "center",
|
|
245
|
+
"type": "stack",
|
|
237
246
|
"gap": "sm",
|
|
247
|
+
"align": "center",
|
|
238
248
|
"children": [
|
|
239
249
|
{
|
|
240
|
-
"
|
|
241
|
-
"
|
|
250
|
+
"name": "list",
|
|
251
|
+
"type": "icon"
|
|
242
252
|
},
|
|
243
253
|
{
|
|
244
|
-
"type": "typography",
|
|
245
254
|
"content": "Filtered List",
|
|
255
|
+
"type": "typography",
|
|
246
256
|
"variant": "h2"
|
|
247
257
|
}
|
|
248
258
|
],
|
|
249
|
-
"
|
|
259
|
+
"direction": "horizontal"
|
|
250
260
|
},
|
|
251
261
|
{
|
|
252
262
|
"type": "divider"
|
|
253
263
|
},
|
|
254
264
|
{
|
|
255
|
-
"
|
|
265
|
+
"gap": "sm",
|
|
256
266
|
"children": [
|
|
257
267
|
"@trait.FilteredItemSearch",
|
|
258
268
|
"@trait.FilteredItemFilter"
|
|
259
269
|
],
|
|
260
|
-
"
|
|
261
|
-
"
|
|
270
|
+
"type": "stack",
|
|
271
|
+
"direction": "horizontal"
|
|
262
272
|
},
|
|
263
273
|
"@trait.FilteredItemBrowse",
|
|
264
274
|
"@trait.FilteredItemPagination"
|
|
265
275
|
],
|
|
266
|
-
"
|
|
267
|
-
"type": "stack"
|
|
276
|
+
"className": "max-w-5xl mx-auto w-full"
|
|
268
277
|
}
|
|
269
278
|
]
|
|
270
279
|
]
|
|
@@ -47,12 +47,16 @@
|
|
|
47
47
|
"emits": [
|
|
48
48
|
{
|
|
49
49
|
"event": "BrowseItemLoaded",
|
|
50
|
-
"description": "Fired when the BrowseItem collection finishes loading; payload.data holds the
|
|
50
|
+
"description": "Fired when the BrowseItem collection finishes loading; payload.data holds the (possibly paginated) slice and totalCount holds the unsliced filter total. totalCount is optional so compiled-path emitters that haven't been migrated yet still validate",
|
|
51
51
|
"scope": "internal",
|
|
52
52
|
"payloadSchema": [
|
|
53
53
|
{
|
|
54
54
|
"name": "data",
|
|
55
55
|
"type": "[BrowseItem]"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "totalCount",
|
|
59
|
+
"type": "number"
|
|
56
60
|
}
|
|
57
61
|
]
|
|
58
62
|
},
|
|
@@ -97,6 +101,10 @@
|
|
|
97
101
|
{
|
|
98
102
|
"name": "data",
|
|
99
103
|
"type": "[BrowseItem]"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "totalCount",
|
|
107
|
+
"type": "number"
|
|
100
108
|
}
|
|
101
109
|
]
|
|
102
110
|
},
|
|
@@ -140,6 +148,17 @@
|
|
|
140
148
|
"required": true
|
|
141
149
|
}
|
|
142
150
|
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"key": "REFETCH_PAGE",
|
|
154
|
+
"name": "Refetch Page",
|
|
155
|
+
"payloadSchema": [
|
|
156
|
+
{
|
|
157
|
+
"name": "page",
|
|
158
|
+
"type": "number",
|
|
159
|
+
"required": true
|
|
160
|
+
}
|
|
161
|
+
]
|
|
143
162
|
}
|
|
144
163
|
],
|
|
145
164
|
"transitions": [
|
|
@@ -162,8 +181,8 @@
|
|
|
162
181
|
"render-ui",
|
|
163
182
|
"main",
|
|
164
183
|
{
|
|
165
|
-
"
|
|
166
|
-
"
|
|
184
|
+
"size": "sm",
|
|
185
|
+
"type": "spinner"
|
|
167
186
|
}
|
|
168
187
|
]
|
|
169
188
|
]
|
|
@@ -178,15 +197,15 @@
|
|
|
178
197
|
"main",
|
|
179
198
|
{
|
|
180
199
|
"type": "stack",
|
|
200
|
+
"direction": "vertical",
|
|
181
201
|
"children": [
|
|
182
202
|
{
|
|
203
|
+
"type": "data-grid",
|
|
183
204
|
"pageSize": "@config.pageSize",
|
|
184
205
|
"fields": "@config.fields",
|
|
185
|
-
"type": "data-grid",
|
|
186
206
|
"entity": "@entity"
|
|
187
207
|
}
|
|
188
|
-
]
|
|
189
|
-
"direction": "vertical"
|
|
208
|
+
]
|
|
190
209
|
}
|
|
191
210
|
]
|
|
192
211
|
]
|
|
@@ -201,9 +220,9 @@
|
|
|
201
220
|
"main",
|
|
202
221
|
{
|
|
203
222
|
"type": "typography",
|
|
204
|
-
"content": "@payload.error",
|
|
205
223
|
"variant": "caption",
|
|
206
|
-
"color": "error"
|
|
224
|
+
"color": "error",
|
|
225
|
+
"content": "@payload.error"
|
|
207
226
|
}
|
|
208
227
|
]
|
|
209
228
|
]
|
|
@@ -218,8 +237,8 @@
|
|
|
218
237
|
"BrowseItem",
|
|
219
238
|
{
|
|
220
239
|
"emit": {
|
|
221
|
-
"
|
|
222
|
-
"
|
|
240
|
+
"success": "BrowseItemLoaded",
|
|
241
|
+
"failure": "BrowseItemLoadFailed"
|
|
223
242
|
}
|
|
224
243
|
}
|
|
225
244
|
],
|
|
@@ -276,6 +295,10 @@
|
|
|
276
295
|
"fetch",
|
|
277
296
|
"BrowseItem",
|
|
278
297
|
{
|
|
298
|
+
"emit": {
|
|
299
|
+
"failure": "BrowseItemLoadFailed",
|
|
300
|
+
"success": "BrowseItemLoaded"
|
|
301
|
+
},
|
|
279
302
|
"filter": [
|
|
280
303
|
"or",
|
|
281
304
|
[
|
|
@@ -292,11 +315,34 @@
|
|
|
292
315
|
],
|
|
293
316
|
"@payload.value"
|
|
294
317
|
]
|
|
295
|
-
]
|
|
318
|
+
]
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"from": "browsing",
|
|
325
|
+
"to": "browsing",
|
|
326
|
+
"event": "REFETCH_PAGE",
|
|
327
|
+
"effects": [
|
|
328
|
+
[
|
|
329
|
+
"fetch",
|
|
330
|
+
"BrowseItem",
|
|
331
|
+
{
|
|
296
332
|
"emit": {
|
|
297
|
-
"
|
|
298
|
-
"
|
|
299
|
-
}
|
|
333
|
+
"success": "BrowseItemLoaded",
|
|
334
|
+
"failure": "BrowseItemLoadFailed"
|
|
335
|
+
},
|
|
336
|
+
"offset": [
|
|
337
|
+
"*",
|
|
338
|
+
[
|
|
339
|
+
"-",
|
|
340
|
+
"@payload.page",
|
|
341
|
+
1.0
|
|
342
|
+
],
|
|
343
|
+
"@config.pageSize"
|
|
344
|
+
],
|
|
345
|
+
"limit": "@config.pageSize"
|
|
300
346
|
}
|
|
301
347
|
]
|
|
302
348
|
]
|
|
@@ -312,10 +358,10 @@
|
|
|
312
358
|
{
|
|
313
359
|
"children": [
|
|
314
360
|
{
|
|
315
|
-
"type": "data-grid",
|
|
316
361
|
"entity": "@entity",
|
|
317
|
-
"
|
|
318
|
-
"
|
|
362
|
+
"pageSize": "@config.pageSize",
|
|
363
|
+
"type": "data-grid",
|
|
364
|
+
"fields": "@config.fields"
|
|
319
365
|
}
|
|
320
366
|
],
|
|
321
367
|
"direction": "vertical",
|
|
@@ -334,8 +380,8 @@
|
|
|
334
380
|
"BrowseItem",
|
|
335
381
|
{
|
|
336
382
|
"emit": {
|
|
337
|
-
"
|
|
338
|
-
"
|
|
383
|
+
"failure": "BrowseItemLoadFailed",
|
|
384
|
+
"success": "BrowseItemLoaded"
|
|
339
385
|
}
|
|
340
386
|
}
|
|
341
387
|
],
|
|
@@ -352,13 +398,13 @@
|
|
|
352
398
|
]
|
|
353
399
|
},
|
|
354
400
|
"config": {
|
|
355
|
-
"pageSize": {
|
|
356
|
-
"type": "number",
|
|
357
|
-
"default": 0.0
|
|
358
|
-
},
|
|
359
401
|
"fields": {
|
|
360
402
|
"type": "[object]",
|
|
361
403
|
"default": []
|
|
404
|
+
},
|
|
405
|
+
"pageSize": {
|
|
406
|
+
"type": "number",
|
|
407
|
+
"default": 0.0
|
|
362
408
|
}
|
|
363
409
|
},
|
|
364
410
|
"scope": "collection"
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
"render-ui",
|
|
98
98
|
"main",
|
|
99
99
|
{
|
|
100
|
-
"filters": "@config.filters",
|
|
101
100
|
"type": "filter-group",
|
|
101
|
+
"filters": "@config.filters",
|
|
102
102
|
"entity": "FilterTarget"
|
|
103
103
|
}
|
|
104
104
|
]
|
|
@@ -123,9 +123,9 @@
|
|
|
123
123
|
"render-ui",
|
|
124
124
|
"main",
|
|
125
125
|
{
|
|
126
|
+
"entity": "FilterTarget",
|
|
126
127
|
"filters": "@config.filters",
|
|
127
|
-
"type": "filter-group"
|
|
128
|
-
"entity": "FilterTarget"
|
|
128
|
+
"type": "filter-group"
|
|
129
129
|
}
|
|
130
130
|
]
|
|
131
131
|
]
|
|
@@ -145,13 +145,21 @@
|
|
|
145
145
|
"@entity.value",
|
|
146
146
|
""
|
|
147
147
|
],
|
|
148
|
+
[
|
|
149
|
+
"emit",
|
|
150
|
+
"FILTER",
|
|
151
|
+
{
|
|
152
|
+
"value": "",
|
|
153
|
+
"field": ""
|
|
154
|
+
}
|
|
155
|
+
],
|
|
148
156
|
[
|
|
149
157
|
"render-ui",
|
|
150
158
|
"main",
|
|
151
159
|
{
|
|
152
|
-
"
|
|
160
|
+
"filters": "@config.filters",
|
|
153
161
|
"type": "filter-group",
|
|
154
|
-
"
|
|
162
|
+
"entity": "FilterTarget"
|
|
155
163
|
}
|
|
156
164
|
]
|
|
157
165
|
]
|
|
@@ -159,13 +167,13 @@
|
|
|
159
167
|
]
|
|
160
168
|
},
|
|
161
169
|
"config": {
|
|
162
|
-
"event": {
|
|
163
|
-
"type": "string",
|
|
164
|
-
"default": "FILTER"
|
|
165
|
-
},
|
|
166
170
|
"filters": {
|
|
167
171
|
"type": "[object]",
|
|
168
172
|
"default": []
|
|
173
|
+
},
|
|
174
|
+
"event": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"default": "FILTER"
|
|
169
177
|
}
|
|
170
178
|
},
|
|
171
179
|
"scope": "instance"
|
|
@@ -73,6 +73,10 @@
|
|
|
73
73
|
{
|
|
74
74
|
"name": "data",
|
|
75
75
|
"type": "[object]"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "totalCount",
|
|
79
|
+
"type": "number"
|
|
76
80
|
}
|
|
77
81
|
]
|
|
78
82
|
}
|
|
@@ -88,10 +92,10 @@
|
|
|
88
92
|
"main",
|
|
89
93
|
{
|
|
90
94
|
"totalPages": "@entity.totalPages",
|
|
91
|
-
"currentPage": 1.0,
|
|
92
|
-
"type": "pagination",
|
|
93
95
|
"onPageChange": "@config.event",
|
|
94
|
-
"showPageSize": false
|
|
96
|
+
"showPageSize": false,
|
|
97
|
+
"currentPage": "@entity.currentPage",
|
|
98
|
+
"type": "pagination"
|
|
95
99
|
}
|
|
96
100
|
]
|
|
97
101
|
]
|
|
@@ -110,11 +114,11 @@
|
|
|
110
114
|
"render-ui",
|
|
111
115
|
"main",
|
|
112
116
|
{
|
|
117
|
+
"showPageSize": false,
|
|
113
118
|
"totalPages": "@entity.totalPages",
|
|
114
|
-
"
|
|
119
|
+
"currentPage": "@entity.currentPage",
|
|
115
120
|
"type": "pagination",
|
|
116
|
-
"
|
|
117
|
-
"showPageSize": false
|
|
121
|
+
"onPageChange": "@config.event"
|
|
118
122
|
}
|
|
119
123
|
]
|
|
120
124
|
]
|
|
@@ -132,8 +136,12 @@
|
|
|
132
136
|
[
|
|
133
137
|
"/",
|
|
134
138
|
[
|
|
135
|
-
"
|
|
136
|
-
"@payload.
|
|
139
|
+
"or",
|
|
140
|
+
"@payload.totalCount",
|
|
141
|
+
[
|
|
142
|
+
"array/len",
|
|
143
|
+
"@payload.data"
|
|
144
|
+
]
|
|
137
145
|
],
|
|
138
146
|
"@config.pageSize"
|
|
139
147
|
]
|
|
@@ -143,11 +151,11 @@
|
|
|
143
151
|
"render-ui",
|
|
144
152
|
"main",
|
|
145
153
|
{
|
|
146
|
-
"showPageSize": false,
|
|
147
154
|
"type": "pagination",
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
155
|
+
"onPageChange": "@config.event",
|
|
156
|
+
"currentPage": "@entity.currentPage",
|
|
157
|
+
"showPageSize": false,
|
|
158
|
+
"totalPages": "@entity.totalPages"
|
|
151
159
|
}
|
|
152
160
|
]
|
|
153
161
|
]
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
"config": {
|
|
69
69
|
"filters": [
|
|
70
70
|
{
|
|
71
|
-
"filterType": "select",
|
|
72
71
|
"field": "status",
|
|
72
|
+
"label": "Status",
|
|
73
73
|
"options": [
|
|
74
74
|
"active",
|
|
75
75
|
"inactive",
|
|
76
76
|
"pending"
|
|
77
77
|
],
|
|
78
|
-
"
|
|
78
|
+
"filterType": "select"
|
|
79
79
|
}
|
|
80
80
|
],
|
|
81
81
|
"event": "FILTER"
|
|
@@ -86,11 +86,12 @@
|
|
|
86
86
|
"name": "FilteredItemBrowse",
|
|
87
87
|
"linkedEntity": "FilteredListItem",
|
|
88
88
|
"config": {
|
|
89
|
+
"pageSize": 3.0,
|
|
89
90
|
"fields": [
|
|
90
91
|
{
|
|
91
|
-
"name": "name",
|
|
92
92
|
"label": "Name",
|
|
93
|
-
"variant": "h4"
|
|
93
|
+
"variant": "h4",
|
|
94
|
+
"name": "name"
|
|
94
95
|
},
|
|
95
96
|
{
|
|
96
97
|
"name": "description",
|
|
@@ -120,6 +121,14 @@
|
|
|
120
121
|
"kind": "trait",
|
|
121
122
|
"trait": "FilteredItemFilter"
|
|
122
123
|
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"event": "PAGE",
|
|
127
|
+
"triggers": "REFETCH_PAGE",
|
|
128
|
+
"source": {
|
|
129
|
+
"kind": "trait",
|
|
130
|
+
"trait": "FilteredItemPagination"
|
|
131
|
+
}
|
|
123
132
|
}
|
|
124
133
|
]
|
|
125
134
|
},
|
|
@@ -127,8 +136,8 @@
|
|
|
127
136
|
"ref": "Pagination.traits.PagedItemPagination",
|
|
128
137
|
"name": "FilteredItemPagination",
|
|
129
138
|
"config": {
|
|
130
|
-
"
|
|
131
|
-
"
|
|
139
|
+
"pageSize": 3.0,
|
|
140
|
+
"event": "PAGE"
|
|
132
141
|
},
|
|
133
142
|
"listens": [
|
|
134
143
|
{
|
|
@@ -228,43 +237,43 @@
|
|
|
228
237
|
"render-ui",
|
|
229
238
|
"main",
|
|
230
239
|
{
|
|
240
|
+
"direction": "vertical",
|
|
231
241
|
"gap": "md",
|
|
232
|
-
"
|
|
242
|
+
"type": "stack",
|
|
233
243
|
"children": [
|
|
234
244
|
{
|
|
235
|
-
"
|
|
236
|
-
"align": "center",
|
|
245
|
+
"type": "stack",
|
|
237
246
|
"gap": "sm",
|
|
247
|
+
"align": "center",
|
|
238
248
|
"children": [
|
|
239
249
|
{
|
|
240
|
-
"
|
|
241
|
-
"
|
|
250
|
+
"name": "list",
|
|
251
|
+
"type": "icon"
|
|
242
252
|
},
|
|
243
253
|
{
|
|
244
|
-
"type": "typography",
|
|
245
254
|
"content": "Filtered List",
|
|
255
|
+
"type": "typography",
|
|
246
256
|
"variant": "h2"
|
|
247
257
|
}
|
|
248
258
|
],
|
|
249
|
-
"
|
|
259
|
+
"direction": "horizontal"
|
|
250
260
|
},
|
|
251
261
|
{
|
|
252
262
|
"type": "divider"
|
|
253
263
|
},
|
|
254
264
|
{
|
|
255
|
-
"
|
|
265
|
+
"gap": "sm",
|
|
256
266
|
"children": [
|
|
257
267
|
"@trait.FilteredItemSearch",
|
|
258
268
|
"@trait.FilteredItemFilter"
|
|
259
269
|
],
|
|
260
|
-
"
|
|
261
|
-
"
|
|
270
|
+
"type": "stack",
|
|
271
|
+
"direction": "horizontal"
|
|
262
272
|
},
|
|
263
273
|
"@trait.FilteredItemBrowse",
|
|
264
274
|
"@trait.FilteredItemPagination"
|
|
265
275
|
],
|
|
266
|
-
"
|
|
267
|
-
"type": "stack"
|
|
276
|
+
"className": "max-w-5xl mx-auto w-full"
|
|
268
277
|
}
|
|
269
278
|
]
|
|
270
279
|
]
|