@almadar/std 13.0.4 → 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.
@@ -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
- "failure": "BrowseItemLoadFailed",
220
- "success": "BrowseItemLoaded"
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
- "type": "spinner",
159
- "size": "sm"
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
- "align": "center",
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
- "size": "sm",
249
- "type": "spinner"
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
- "success": "FilterTargetLoaded",
267
- "failure": "FilterTargetLoadFailed"
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
- "align": "center",
289
- "direction": "horizontal"
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
- "failure": "FilterTargetLoadFailed",
305
- "success": "FilterTargetLoaded"
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
- "size": "sm",
314
- "type": "spinner"
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",
@@ -151,8 +166,8 @@
151
166
  "render-ui",
152
167
  "main",
153
168
  {
154
- "type": "spinner",
155
- "size": "sm"
169
+ "size": "sm",
170
+ "type": "spinner"
156
171
  }
157
172
  ]
158
173
  ]
@@ -166,22 +181,11 @@
166
181
  "render-ui",
167
182
  "main",
168
183
  {
169
- "type": "stack",
170
- "gap": "sm",
171
- "children": [
172
- {
173
- "totalPages": "@config.totalPages",
174
- "currentPage": 1.0,
175
- "type": "pagination",
176
- "onPageChange": "@config.event",
177
- "showPageSize": false
178
- },
179
- {
180
- "type": "infinite-scroll-sentinel",
181
- "loadMoreEvent": "@config.event"
182
- }
183
- ],
184
- "direction": "vertical"
184
+ "onPageChange": "@config.event",
185
+ "currentPage": 1.0,
186
+ "type": "pagination",
187
+ "totalPages": "@config.totalPages",
188
+ "showPageSize": false
185
189
  }
186
190
  ]
187
191
  ]
@@ -195,33 +199,22 @@
195
199
  "render-ui",
196
200
  "main",
197
201
  {
198
- "type": "stack",
199
202
  "children": [
200
203
  {
201
- "gap": "sm",
202
- "children": [
203
- {
204
- "type": "pagination",
205
- "onPageChange": "@config.event",
206
- "totalPages": "@config.totalPages",
207
- "currentPage": 1.0,
208
- "showPageSize": false
209
- },
210
- {
211
- "type": "infinite-scroll-sentinel",
212
- "loadMoreEvent": "@config.event"
213
- }
214
- ],
215
- "direction": "vertical",
216
- "type": "stack"
204
+ "type": "pagination",
205
+ "currentPage": 1.0,
206
+ "onPageChange": "@config.event",
207
+ "totalPages": "@config.totalPages",
208
+ "showPageSize": false
217
209
  },
218
210
  {
219
- "variant": "caption",
220
- "color": "error",
221
211
  "content": "@payload.error",
222
- "type": "typography"
212
+ "type": "typography",
213
+ "color": "error",
214
+ "variant": "caption"
223
215
  }
224
216
  ],
217
+ "type": "stack",
225
218
  "gap": "xs",
226
219
  "direction": "vertical"
227
220
  }
@@ -233,13 +226,21 @@
233
226
  "to": "loading",
234
227
  "event": "PAGE",
235
228
  "effects": [
229
+ [
230
+ "emit",
231
+ "PAGE",
232
+ {
233
+ "pageSize": "@payload.pageSize",
234
+ "page": "@payload.page"
235
+ }
236
+ ],
236
237
  [
237
238
  "fetch",
238
239
  "PagedItem",
239
240
  {
240
241
  "emit": {
241
- "success": "PagedItemLoaded",
242
- "failure": "PagedItemLoadFailed"
242
+ "failure": "PagedItemLoadFailed",
243
+ "success": "PagedItemLoaded"
243
244
  }
244
245
  }
245
246
  ],
@@ -247,32 +248,21 @@
247
248
  "render-ui",
248
249
  "main",
249
250
  {
250
- "direction": "horizontal",
251
- "gap": "sm",
252
251
  "align": "center",
253
252
  "type": "stack",
253
+ "direction": "horizontal",
254
+ "gap": "sm",
254
255
  "children": [
255
256
  {
256
- "gap": "sm",
257
- "type": "stack",
258
- "children": [
259
- {
260
- "showPageSize": false,
261
- "type": "pagination",
262
- "totalPages": "@config.totalPages",
263
- "currentPage": 1.0,
264
- "onPageChange": "@config.event"
265
- },
266
- {
267
- "type": "infinite-scroll-sentinel",
268
- "loadMoreEvent": "@config.event"
269
- }
270
- ],
271
- "direction": "vertical"
257
+ "type": "pagination",
258
+ "onPageChange": "@config.event",
259
+ "showPageSize": false,
260
+ "currentPage": 1.0,
261
+ "totalPages": "@config.totalPages"
272
262
  },
273
263
  {
274
- "type": "spinner",
275
- "size": "sm"
264
+ "size": "sm",
265
+ "type": "spinner"
276
266
  }
277
267
  ]
278
268
  }
@@ -298,8 +288,8 @@
298
288
  "render-ui",
299
289
  "main",
300
290
  {
301
- "type": "spinner",
302
- "size": "sm"
291
+ "size": "sm",
292
+ "type": "spinner"
303
293
  }
304
294
  ]
305
295
  ]
@@ -43,6 +43,16 @@
43
43
  "category": "interaction",
44
44
  "linkedEntity": "SearchResult",
45
45
  "emits": [
46
+ {
47
+ "event": "SEARCH",
48
+ "payloadSchema": [
49
+ {
50
+ "name": "query",
51
+ "type": "string",
52
+ "required": true
53
+ }
54
+ ]
55
+ },
46
56
  {
47
57
  "event": "SearchResultLoaded",
48
58
  "description": "Fired when SearchResult collection finishes loading",
@@ -151,9 +161,9 @@
151
161
  "render-ui",
152
162
  "main",
153
163
  {
154
- "event": "@config.event",
155
164
  "placeholder": "@config.placeholder",
156
- "type": "search-input"
165
+ "type": "search-input",
166
+ "event": "@config.event"
157
167
  }
158
168
  ]
159
169
  ]
@@ -163,13 +173,20 @@
163
173
  "to": "loading",
164
174
  "event": "SEARCH",
165
175
  "effects": [
176
+ [
177
+ "emit",
178
+ "SEARCH",
179
+ {
180
+ "query": "@payload.query"
181
+ }
182
+ ],
166
183
  [
167
184
  "fetch",
168
185
  "SearchResult",
169
186
  {
170
187
  "emit": {
171
- "success": "SearchResultLoaded",
172
- "failure": "SearchResultLoadFailed"
188
+ "failure": "SearchResultLoadFailed",
189
+ "success": "SearchResultLoaded"
173
190
  }
174
191
  }
175
192
  ],
@@ -177,21 +194,21 @@
177
194
  "render-ui",
178
195
  "main",
179
196
  {
197
+ "align": "center",
180
198
  "children": [
181
199
  {
200
+ "placeholder": "@config.placeholder",
182
201
  "type": "search-input",
183
- "event": "@config.event",
184
- "placeholder": "@config.placeholder"
202
+ "event": "@config.event"
185
203
  },
186
204
  {
187
- "size": "sm",
188
- "type": "spinner"
205
+ "type": "spinner",
206
+ "size": "sm"
189
207
  }
190
208
  ],
191
- "type": "stack",
192
- "direction": "horizontal",
193
209
  "gap": "sm",
194
- "align": "center"
210
+ "type": "stack",
211
+ "direction": "horizontal"
195
212
  }
196
213
  ]
197
214
  ]
@@ -205,8 +222,8 @@
205
222
  "render-ui",
206
223
  "main",
207
224
  {
208
- "event": "@config.event",
209
225
  "placeholder": "@config.placeholder",
226
+ "event": "@config.event",
210
227
  "type": "search-input"
211
228
  }
212
229
  ]
@@ -223,20 +240,20 @@
223
240
  {
224
241
  "gap": "xs",
225
242
  "direction": "vertical",
226
- "type": "stack",
227
243
  "children": [
228
244
  {
229
- "event": "@config.event",
230
245
  "placeholder": "@config.placeholder",
246
+ "event": "@config.event",
231
247
  "type": "search-input"
232
248
  },
233
249
  {
234
- "content": "@payload.error",
235
- "type": "typography",
236
250
  "color": "error",
251
+ "type": "typography",
252
+ "content": "@payload.error",
237
253
  "variant": "caption"
238
254
  }
239
- ]
255
+ ],
256
+ "type": "stack"
240
257
  }
241
258
  ]
242
259
  ]
@@ -251,8 +268,8 @@
251
268
  "SearchResult",
252
269
  {
253
270
  "emit": {
254
- "success": "SearchResultLoaded",
255
- "failure": "SearchResultLoadFailed"
271
+ "failure": "SearchResultLoadFailed",
272
+ "success": "SearchResultLoaded"
256
273
  }
257
274
  }
258
275
  ],
@@ -260,21 +277,21 @@
260
277
  "render-ui",
261
278
  "main",
262
279
  {
280
+ "type": "stack",
281
+ "direction": "horizontal",
282
+ "align": "center",
283
+ "gap": "sm",
263
284
  "children": [
264
285
  {
265
- "placeholder": "@config.placeholder",
266
286
  "type": "search-input",
287
+ "placeholder": "@config.placeholder",
267
288
  "event": "@config.event"
268
289
  },
269
290
  {
270
291
  "type": "spinner",
271
292
  "size": "sm"
272
293
  }
273
- ],
274
- "type": "stack",
275
- "gap": "sm",
276
- "align": "center",
277
- "direction": "horizontal"
294
+ ]
278
295
  }
279
296
  ]
280
297
  ]
@@ -289,8 +306,8 @@
289
306
  "SearchResult",
290
307
  {
291
308
  "emit": {
292
- "success": "SearchResultLoaded",
293
- "failure": "SearchResultLoadFailed"
309
+ "failure": "SearchResultLoadFailed",
310
+ "success": "SearchResultLoaded"
294
311
  }
295
312
  }
296
313
  ],
@@ -310,9 +327,9 @@
310
327
  }
311
328
  ],
312
329
  "direction": "horizontal",
313
- "gap": "sm",
314
330
  "type": "stack",
315
- "align": "center"
331
+ "align": "center",
332
+ "gap": "sm"
316
333
  }
317
334
  ]
318
335
  ]
@@ -343,8 +360,8 @@
343
360
  "SearchResult",
344
361
  {
345
362
  "emit": {
346
- "success": "SearchResultLoaded",
347
- "failure": "SearchResultLoadFailed"
363
+ "failure": "SearchResultLoadFailed",
364
+ "success": "SearchResultLoaded"
348
365
  }
349
366
  }
350
367
  ],
@@ -352,21 +369,21 @@
352
369
  "render-ui",
353
370
  "main",
354
371
  {
372
+ "type": "stack",
373
+ "gap": "sm",
355
374
  "direction": "horizontal",
375
+ "align": "center",
356
376
  "children": [
357
377
  {
358
378
  "placeholder": "@config.placeholder",
359
- "event": "@config.event",
360
- "type": "search-input"
379
+ "type": "search-input",
380
+ "event": "@config.event"
361
381
  },
362
382
  {
363
383
  "type": "spinner",
364
384
  "size": "sm"
365
385
  }
366
- ],
367
- "gap": "sm",
368
- "align": "center",
369
- "type": "stack"
386
+ ]
370
387
  }
371
388
  ]
372
389
  ]