@almadar/std 13.1.2 → 13.2.1
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 +75 -25
- package/behaviors/registry/core/atoms/std-pagination.orb +19 -18
- package/behaviors/registry/core/molecules/std-filtered-list.orb +27 -18
- package/dist/behaviors/registry/core/atoms/std-browse.orb +75 -25
- package/dist/behaviors/registry/core/atoms/std-pagination.orb +19 -18
- 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": [
|
|
@@ -153,8 +172,8 @@
|
|
|
153
172
|
"BrowseItem",
|
|
154
173
|
{
|
|
155
174
|
"emit": {
|
|
156
|
-
"
|
|
157
|
-
"
|
|
175
|
+
"failure": "BrowseItemLoadFailed",
|
|
176
|
+
"success": "BrowseItemLoaded"
|
|
158
177
|
}
|
|
159
178
|
}
|
|
160
179
|
],
|
|
@@ -178,15 +197,15 @@
|
|
|
178
197
|
"main",
|
|
179
198
|
{
|
|
180
199
|
"type": "stack",
|
|
200
|
+
"direction": "vertical",
|
|
181
201
|
"children": [
|
|
182
202
|
{
|
|
183
|
-
"pageSize": "@config.pageSize",
|
|
184
203
|
"fields": "@config.fields",
|
|
185
204
|
"type": "data-grid",
|
|
205
|
+
"pageSize": "@config.displayPageSize",
|
|
186
206
|
"entity": "@entity"
|
|
187
207
|
}
|
|
188
|
-
]
|
|
189
|
-
"direction": "vertical"
|
|
208
|
+
]
|
|
190
209
|
}
|
|
191
210
|
]
|
|
192
211
|
]
|
|
@@ -200,9 +219,9 @@
|
|
|
200
219
|
"render-ui",
|
|
201
220
|
"main",
|
|
202
221
|
{
|
|
203
|
-
"type": "typography",
|
|
204
|
-
"content": "@payload.error",
|
|
205
222
|
"variant": "caption",
|
|
223
|
+
"content": "@payload.error",
|
|
224
|
+
"type": "typography",
|
|
206
225
|
"color": "error"
|
|
207
226
|
}
|
|
208
227
|
]
|
|
@@ -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
|
],
|
|
@@ -227,8 +246,8 @@
|
|
|
227
246
|
"render-ui",
|
|
228
247
|
"main",
|
|
229
248
|
{
|
|
230
|
-
"
|
|
231
|
-
"
|
|
249
|
+
"type": "spinner",
|
|
250
|
+
"size": "sm"
|
|
232
251
|
}
|
|
233
252
|
]
|
|
234
253
|
]
|
|
@@ -242,10 +261,6 @@
|
|
|
242
261
|
"fetch",
|
|
243
262
|
"BrowseItem",
|
|
244
263
|
{
|
|
245
|
-
"emit": {
|
|
246
|
-
"success": "BrowseItemLoaded",
|
|
247
|
-
"failure": "BrowseItemLoadFailed"
|
|
248
|
-
},
|
|
249
264
|
"filter": [
|
|
250
265
|
"or",
|
|
251
266
|
[
|
|
@@ -262,7 +277,11 @@
|
|
|
262
277
|
],
|
|
263
278
|
"@payload.searchTerm"
|
|
264
279
|
]
|
|
265
|
-
]
|
|
280
|
+
],
|
|
281
|
+
"emit": {
|
|
282
|
+
"success": "BrowseItemLoaded",
|
|
283
|
+
"failure": "BrowseItemLoadFailed"
|
|
284
|
+
}
|
|
266
285
|
}
|
|
267
286
|
]
|
|
268
287
|
]
|
|
@@ -293,6 +312,33 @@
|
|
|
293
312
|
"@payload.value"
|
|
294
313
|
]
|
|
295
314
|
],
|
|
315
|
+
"emit": {
|
|
316
|
+
"success": "BrowseItemLoaded",
|
|
317
|
+
"failure": "BrowseItemLoadFailed"
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"from": "browsing",
|
|
325
|
+
"to": "browsing",
|
|
326
|
+
"event": "REFETCH_PAGE",
|
|
327
|
+
"effects": [
|
|
328
|
+
[
|
|
329
|
+
"fetch",
|
|
330
|
+
"BrowseItem",
|
|
331
|
+
{
|
|
332
|
+
"offset": [
|
|
333
|
+
"*",
|
|
334
|
+
[
|
|
335
|
+
"-",
|
|
336
|
+
"@payload.page",
|
|
337
|
+
1.0
|
|
338
|
+
],
|
|
339
|
+
"@config.pageSize"
|
|
340
|
+
],
|
|
341
|
+
"limit": "@config.pageSize",
|
|
296
342
|
"emit": {
|
|
297
343
|
"failure": "BrowseItemLoadFailed",
|
|
298
344
|
"success": "BrowseItemLoaded"
|
|
@@ -310,16 +356,16 @@
|
|
|
310
356
|
"render-ui",
|
|
311
357
|
"main",
|
|
312
358
|
{
|
|
359
|
+
"type": "stack",
|
|
360
|
+
"direction": "vertical",
|
|
313
361
|
"children": [
|
|
314
362
|
{
|
|
315
|
-
"
|
|
363
|
+
"pageSize": "@config.displayPageSize",
|
|
316
364
|
"entity": "@entity",
|
|
317
|
-
"
|
|
318
|
-
"
|
|
365
|
+
"type": "data-grid",
|
|
366
|
+
"fields": "@config.fields"
|
|
319
367
|
}
|
|
320
|
-
]
|
|
321
|
-
"direction": "vertical",
|
|
322
|
-
"type": "stack"
|
|
368
|
+
]
|
|
323
369
|
}
|
|
324
370
|
]
|
|
325
371
|
]
|
|
@@ -343,8 +389,8 @@
|
|
|
343
389
|
"render-ui",
|
|
344
390
|
"main",
|
|
345
391
|
{
|
|
346
|
-
"
|
|
347
|
-
"
|
|
392
|
+
"size": "sm",
|
|
393
|
+
"type": "spinner"
|
|
348
394
|
}
|
|
349
395
|
]
|
|
350
396
|
]
|
|
@@ -359,6 +405,10 @@
|
|
|
359
405
|
"fields": {
|
|
360
406
|
"type": "[object]",
|
|
361
407
|
"default": []
|
|
408
|
+
},
|
|
409
|
+
"displayPageSize": {
|
|
410
|
+
"type": "number",
|
|
411
|
+
"default": 0.0
|
|
362
412
|
}
|
|
363
413
|
},
|
|
364
414
|
"scope": "collection"
|
|
@@ -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
|
}
|
|
@@ -87,11 +91,11 @@
|
|
|
87
91
|
"render-ui",
|
|
88
92
|
"main",
|
|
89
93
|
{
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"currentPage": "@entity.currentPage",
|
|
95
|
+
"showPageSize": false,
|
|
92
96
|
"type": "pagination",
|
|
93
|
-
"
|
|
94
|
-
"
|
|
97
|
+
"totalPages": "@entity.totalPages",
|
|
98
|
+
"onPageChange": "@config.event"
|
|
95
99
|
}
|
|
96
100
|
]
|
|
97
101
|
]
|
|
@@ -110,11 +114,11 @@
|
|
|
110
114
|
"render-ui",
|
|
111
115
|
"main",
|
|
112
116
|
{
|
|
117
|
+
"currentPage": "@entity.currentPage",
|
|
118
|
+
"showPageSize": false,
|
|
113
119
|
"totalPages": "@entity.totalPages",
|
|
114
|
-
"onPageChange": "@config.event",
|
|
115
120
|
"type": "pagination",
|
|
116
|
-
"
|
|
117
|
-
"showPageSize": false
|
|
121
|
+
"onPageChange": "@config.event"
|
|
118
122
|
}
|
|
119
123
|
]
|
|
120
124
|
]
|
|
@@ -131,10 +135,7 @@
|
|
|
131
135
|
"math/ceil",
|
|
132
136
|
[
|
|
133
137
|
"/",
|
|
134
|
-
|
|
135
|
-
"array/len",
|
|
136
|
-
"@payload.data"
|
|
137
|
-
],
|
|
138
|
+
"@payload.totalCount",
|
|
138
139
|
"@config.pageSize"
|
|
139
140
|
]
|
|
140
141
|
]
|
|
@@ -143,11 +144,11 @@
|
|
|
143
144
|
"render-ui",
|
|
144
145
|
"main",
|
|
145
146
|
{
|
|
147
|
+
"totalPages": "@entity.totalPages",
|
|
146
148
|
"showPageSize": false,
|
|
147
149
|
"type": "pagination",
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"onPageChange": "@config.event"
|
|
150
|
+
"onPageChange": "@config.event",
|
|
151
|
+
"currentPage": "@entity.currentPage"
|
|
151
152
|
}
|
|
152
153
|
]
|
|
153
154
|
]
|
|
@@ -155,13 +156,13 @@
|
|
|
155
156
|
]
|
|
156
157
|
},
|
|
157
158
|
"config": {
|
|
158
|
-
"event": {
|
|
159
|
-
"type": "string",
|
|
160
|
-
"default": "PAGE"
|
|
161
|
-
},
|
|
162
159
|
"pageSize": {
|
|
163
160
|
"type": "number",
|
|
164
161
|
"default": 10.0
|
|
162
|
+
},
|
|
163
|
+
"event": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"default": "PAGE"
|
|
165
166
|
}
|
|
166
167
|
},
|
|
167
168
|
"scope": "instance"
|
|
@@ -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": [
|
|
@@ -153,8 +172,8 @@
|
|
|
153
172
|
"BrowseItem",
|
|
154
173
|
{
|
|
155
174
|
"emit": {
|
|
156
|
-
"
|
|
157
|
-
"
|
|
175
|
+
"failure": "BrowseItemLoadFailed",
|
|
176
|
+
"success": "BrowseItemLoaded"
|
|
158
177
|
}
|
|
159
178
|
}
|
|
160
179
|
],
|
|
@@ -178,15 +197,15 @@
|
|
|
178
197
|
"main",
|
|
179
198
|
{
|
|
180
199
|
"type": "stack",
|
|
200
|
+
"direction": "vertical",
|
|
181
201
|
"children": [
|
|
182
202
|
{
|
|
183
|
-
"pageSize": "@config.pageSize",
|
|
184
203
|
"fields": "@config.fields",
|
|
185
204
|
"type": "data-grid",
|
|
205
|
+
"pageSize": "@config.displayPageSize",
|
|
186
206
|
"entity": "@entity"
|
|
187
207
|
}
|
|
188
|
-
]
|
|
189
|
-
"direction": "vertical"
|
|
208
|
+
]
|
|
190
209
|
}
|
|
191
210
|
]
|
|
192
211
|
]
|
|
@@ -200,9 +219,9 @@
|
|
|
200
219
|
"render-ui",
|
|
201
220
|
"main",
|
|
202
221
|
{
|
|
203
|
-
"type": "typography",
|
|
204
|
-
"content": "@payload.error",
|
|
205
222
|
"variant": "caption",
|
|
223
|
+
"content": "@payload.error",
|
|
224
|
+
"type": "typography",
|
|
206
225
|
"color": "error"
|
|
207
226
|
}
|
|
208
227
|
]
|
|
@@ -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
|
],
|
|
@@ -227,8 +246,8 @@
|
|
|
227
246
|
"render-ui",
|
|
228
247
|
"main",
|
|
229
248
|
{
|
|
230
|
-
"
|
|
231
|
-
"
|
|
249
|
+
"type": "spinner",
|
|
250
|
+
"size": "sm"
|
|
232
251
|
}
|
|
233
252
|
]
|
|
234
253
|
]
|
|
@@ -242,10 +261,6 @@
|
|
|
242
261
|
"fetch",
|
|
243
262
|
"BrowseItem",
|
|
244
263
|
{
|
|
245
|
-
"emit": {
|
|
246
|
-
"success": "BrowseItemLoaded",
|
|
247
|
-
"failure": "BrowseItemLoadFailed"
|
|
248
|
-
},
|
|
249
264
|
"filter": [
|
|
250
265
|
"or",
|
|
251
266
|
[
|
|
@@ -262,7 +277,11 @@
|
|
|
262
277
|
],
|
|
263
278
|
"@payload.searchTerm"
|
|
264
279
|
]
|
|
265
|
-
]
|
|
280
|
+
],
|
|
281
|
+
"emit": {
|
|
282
|
+
"success": "BrowseItemLoaded",
|
|
283
|
+
"failure": "BrowseItemLoadFailed"
|
|
284
|
+
}
|
|
266
285
|
}
|
|
267
286
|
]
|
|
268
287
|
]
|
|
@@ -293,6 +312,33 @@
|
|
|
293
312
|
"@payload.value"
|
|
294
313
|
]
|
|
295
314
|
],
|
|
315
|
+
"emit": {
|
|
316
|
+
"success": "BrowseItemLoaded",
|
|
317
|
+
"failure": "BrowseItemLoadFailed"
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"from": "browsing",
|
|
325
|
+
"to": "browsing",
|
|
326
|
+
"event": "REFETCH_PAGE",
|
|
327
|
+
"effects": [
|
|
328
|
+
[
|
|
329
|
+
"fetch",
|
|
330
|
+
"BrowseItem",
|
|
331
|
+
{
|
|
332
|
+
"offset": [
|
|
333
|
+
"*",
|
|
334
|
+
[
|
|
335
|
+
"-",
|
|
336
|
+
"@payload.page",
|
|
337
|
+
1.0
|
|
338
|
+
],
|
|
339
|
+
"@config.pageSize"
|
|
340
|
+
],
|
|
341
|
+
"limit": "@config.pageSize",
|
|
296
342
|
"emit": {
|
|
297
343
|
"failure": "BrowseItemLoadFailed",
|
|
298
344
|
"success": "BrowseItemLoaded"
|
|
@@ -310,16 +356,16 @@
|
|
|
310
356
|
"render-ui",
|
|
311
357
|
"main",
|
|
312
358
|
{
|
|
359
|
+
"type": "stack",
|
|
360
|
+
"direction": "vertical",
|
|
313
361
|
"children": [
|
|
314
362
|
{
|
|
315
|
-
"
|
|
363
|
+
"pageSize": "@config.displayPageSize",
|
|
316
364
|
"entity": "@entity",
|
|
317
|
-
"
|
|
318
|
-
"
|
|
365
|
+
"type": "data-grid",
|
|
366
|
+
"fields": "@config.fields"
|
|
319
367
|
}
|
|
320
|
-
]
|
|
321
|
-
"direction": "vertical",
|
|
322
|
-
"type": "stack"
|
|
368
|
+
]
|
|
323
369
|
}
|
|
324
370
|
]
|
|
325
371
|
]
|
|
@@ -343,8 +389,8 @@
|
|
|
343
389
|
"render-ui",
|
|
344
390
|
"main",
|
|
345
391
|
{
|
|
346
|
-
"
|
|
347
|
-
"
|
|
392
|
+
"size": "sm",
|
|
393
|
+
"type": "spinner"
|
|
348
394
|
}
|
|
349
395
|
]
|
|
350
396
|
]
|
|
@@ -359,6 +405,10 @@
|
|
|
359
405
|
"fields": {
|
|
360
406
|
"type": "[object]",
|
|
361
407
|
"default": []
|
|
408
|
+
},
|
|
409
|
+
"displayPageSize": {
|
|
410
|
+
"type": "number",
|
|
411
|
+
"default": 0.0
|
|
362
412
|
}
|
|
363
413
|
},
|
|
364
414
|
"scope": "collection"
|
|
@@ -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
|
}
|
|
@@ -87,11 +91,11 @@
|
|
|
87
91
|
"render-ui",
|
|
88
92
|
"main",
|
|
89
93
|
{
|
|
90
|
-
"
|
|
91
|
-
"
|
|
94
|
+
"currentPage": "@entity.currentPage",
|
|
95
|
+
"showPageSize": false,
|
|
92
96
|
"type": "pagination",
|
|
93
|
-
"
|
|
94
|
-
"
|
|
97
|
+
"totalPages": "@entity.totalPages",
|
|
98
|
+
"onPageChange": "@config.event"
|
|
95
99
|
}
|
|
96
100
|
]
|
|
97
101
|
]
|
|
@@ -110,11 +114,11 @@
|
|
|
110
114
|
"render-ui",
|
|
111
115
|
"main",
|
|
112
116
|
{
|
|
117
|
+
"currentPage": "@entity.currentPage",
|
|
118
|
+
"showPageSize": false,
|
|
113
119
|
"totalPages": "@entity.totalPages",
|
|
114
|
-
"onPageChange": "@config.event",
|
|
115
120
|
"type": "pagination",
|
|
116
|
-
"
|
|
117
|
-
"showPageSize": false
|
|
121
|
+
"onPageChange": "@config.event"
|
|
118
122
|
}
|
|
119
123
|
]
|
|
120
124
|
]
|
|
@@ -131,10 +135,7 @@
|
|
|
131
135
|
"math/ceil",
|
|
132
136
|
[
|
|
133
137
|
"/",
|
|
134
|
-
|
|
135
|
-
"array/len",
|
|
136
|
-
"@payload.data"
|
|
137
|
-
],
|
|
138
|
+
"@payload.totalCount",
|
|
138
139
|
"@config.pageSize"
|
|
139
140
|
]
|
|
140
141
|
]
|
|
@@ -143,11 +144,11 @@
|
|
|
143
144
|
"render-ui",
|
|
144
145
|
"main",
|
|
145
146
|
{
|
|
147
|
+
"totalPages": "@entity.totalPages",
|
|
146
148
|
"showPageSize": false,
|
|
147
149
|
"type": "pagination",
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"onPageChange": "@config.event"
|
|
150
|
+
"onPageChange": "@config.event",
|
|
151
|
+
"currentPage": "@entity.currentPage"
|
|
151
152
|
}
|
|
152
153
|
]
|
|
153
154
|
]
|
|
@@ -155,13 +156,13 @@
|
|
|
155
156
|
]
|
|
156
157
|
},
|
|
157
158
|
"config": {
|
|
158
|
-
"event": {
|
|
159
|
-
"type": "string",
|
|
160
|
-
"default": "PAGE"
|
|
161
|
-
},
|
|
162
159
|
"pageSize": {
|
|
163
160
|
"type": "number",
|
|
164
161
|
"default": 10.0
|
|
162
|
+
},
|
|
163
|
+
"event": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"default": "PAGE"
|
|
165
166
|
}
|
|
166
167
|
},
|
|
167
168
|
"scope": "instance"
|
|
@@ -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
|
]
|