@almadar/std 13.0.1 → 13.0.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-browse",
3
3
  "version": "1.0.0",
4
- "description": "std-browse as a Function",
4
+ "description": "std-browse as a Function — single primitive: data-grid",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "BrowseItemOrbital",
@@ -135,22 +135,8 @@
135
135
  "render-ui",
136
136
  "main",
137
137
  {
138
- "direction": "vertical",
139
- "align": "center",
140
- "children": [
141
- {
142
- "type": "spinner"
143
- },
144
- {
145
- "type": "typography",
146
- "content": "Loading BrowseItems…",
147
- "variant": "caption",
148
- "color": "muted"
149
- }
150
- ],
151
- "gap": "lg",
152
- "className": "max-w-5xl mx-auto w-full py-12",
153
- "type": "stack"
138
+ "type": "spinner",
139
+ "size": "sm"
154
140
  }
155
141
  ]
156
142
  ]
@@ -164,82 +150,16 @@
164
150
  "render-ui",
165
151
  "main",
166
152
  {
167
- "className": "max-w-5xl mx-auto w-full",
168
- "gap": "lg",
169
153
  "direction": "vertical",
170
- "type": "stack",
171
154
  "children": [
172
155
  {
173
- "align": "center",
174
- "type": "stack",
175
- "gap": "md",
176
- "justify": "between",
177
- "children": [
178
- {
179
- "type": "stack",
180
- "direction": "horizontal",
181
- "gap": "sm",
182
- "align": "center",
183
- "children": [
184
- {
185
- "type": "icon",
186
- "name": "list"
187
- },
188
- {
189
- "variant": "h2",
190
- "type": "typography",
191
- "content": "BrowseItems"
192
- }
193
- ]
194
- }
195
- ],
196
- "direction": "horizontal"
197
- },
198
- {
199
- "type": "divider"
200
- },
201
- {
202
- "fields": [
203
- {
204
- "label": "Name",
205
- "name": "name",
206
- "icon": "list",
207
- "variant": "h4"
208
- },
209
- {
210
- "label": "Description",
211
- "name": "description",
212
- "variant": "badge",
213
- "colorMap": {
214
- "failed": "destructive",
215
- "disabled": "neutral",
216
- "active": "success",
217
- "done": "success",
218
- "draft": "warning",
219
- "pending": "warning",
220
- "inactive": "neutral",
221
- "scheduled": "warning",
222
- "archived": "neutral",
223
- "error": "destructive",
224
- "completed": "success",
225
- "cancelled": "destructive"
226
- }
227
- },
228
- {
229
- "label": "Status",
230
- "name": "status",
231
- "variant": "caption"
232
- }
233
- ],
234
- "entity": "@payload.data",
235
- "type": "data-grid"
236
- },
237
- {
238
- "type": "floating-action-button",
239
- "action": "INIT",
240
- "icon": "plus"
156
+ "type": "data-grid",
157
+ "pageSize": "@config.pageSize",
158
+ "fields": "@config.fields",
159
+ "entity": "@payload.data"
241
160
  }
242
- ]
161
+ ],
162
+ "type": "stack"
243
163
  }
244
164
  ]
245
165
  ]
@@ -253,36 +173,10 @@
253
173
  "render-ui",
254
174
  "main",
255
175
  {
256
- "direction": "vertical",
257
- "align": "center",
258
- "className": "max-w-5xl mx-auto w-full py-12",
259
- "children": [
260
- {
261
- "name": "alert-triangle",
262
- "color": "destructive",
263
- "type": "icon"
264
- },
265
- {
266
- "content": "Failed to load BrowseItems",
267
- "variant": "h3",
268
- "type": "typography"
269
- },
270
- {
271
- "type": "typography",
272
- "variant": "body",
273
- "color": "muted",
274
- "content": "@payload.error"
275
- },
276
- {
277
- "icon": "rotate-ccw",
278
- "label": "Retry",
279
- "type": "button",
280
- "action": "INIT",
281
- "variant": "primary"
282
- }
283
- ],
284
- "type": "stack",
285
- "gap": "md"
176
+ "variant": "caption",
177
+ "content": "@payload.error",
178
+ "type": "typography",
179
+ "color": "error"
286
180
  }
287
181
  ]
288
182
  ]
@@ -297,8 +191,8 @@
297
191
  "BrowseItem",
298
192
  {
299
193
  "emit": {
300
- "failure": "BrowseItemLoadFailed",
301
- "success": "BrowseItemLoaded"
194
+ "success": "BrowseItemLoaded",
195
+ "failure": "BrowseItemLoadFailed"
302
196
  }
303
197
  }
304
198
  ],
@@ -306,22 +200,8 @@
306
200
  "render-ui",
307
201
  "main",
308
202
  {
309
- "gap": "lg",
310
- "align": "center",
311
- "children": [
312
- {
313
- "type": "spinner"
314
- },
315
- {
316
- "variant": "caption",
317
- "content": "Refreshing…",
318
- "type": "typography",
319
- "color": "muted"
320
- }
321
- ],
322
- "type": "stack",
323
- "className": "max-w-5xl mx-auto w-full py-12",
324
- "direction": "vertical"
203
+ "size": "sm",
204
+ "type": "spinner"
325
205
  }
326
206
  ]
327
207
  ]
@@ -345,28 +225,24 @@
345
225
  "render-ui",
346
226
  "main",
347
227
  {
348
- "align": "center",
349
- "direction": "vertical",
350
- "type": "stack",
351
- "gap": "lg",
352
- "className": "max-w-5xl mx-auto w-full py-12",
353
- "children": [
354
- {
355
- "type": "spinner"
356
- },
357
- {
358
- "variant": "caption",
359
- "type": "typography",
360
- "content": "Retrying…",
361
- "color": "muted"
362
- }
363
- ]
228
+ "size": "sm",
229
+ "type": "spinner"
364
230
  }
365
231
  ]
366
232
  ]
367
233
  }
368
234
  ]
369
235
  },
236
+ "config": {
237
+ "fields": {
238
+ "type": "object",
239
+ "default": []
240
+ },
241
+ "pageSize": {
242
+ "type": "number",
243
+ "default": 0.0
244
+ }
245
+ },
370
246
  "scope": "collection"
371
247
  }
372
248
  ],
@@ -383,4 +259,4 @@
383
259
  ]
384
260
  }
385
261
  ]
386
- }
262
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-filter",
3
3
  "version": "1.0.0",
4
- "description": "std-filter as a Function",
4
+ "description": "std-filter as a Function — single primitive: filter-group",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "FilterTargetOrbital",
@@ -146,8 +146,8 @@
146
146
  "FilterTarget",
147
147
  {
148
148
  "emit": {
149
- "failure": "FilterTargetLoadFailed",
150
- "success": "FilterTargetLoaded"
149
+ "success": "FilterTargetLoaded",
150
+ "failure": "FilterTargetLoadFailed"
151
151
  }
152
152
  }
153
153
  ],
@@ -155,22 +155,8 @@
155
155
  "render-ui",
156
156
  "main",
157
157
  {
158
- "direction": "vertical",
159
- "className": "py-12",
160
- "type": "stack",
161
- "gap": "md",
162
- "children": [
163
- {
164
- "type": "spinner"
165
- },
166
- {
167
- "variant": "caption",
168
- "color": "muted",
169
- "content": "Loading…",
170
- "type": "typography"
171
- }
172
- ],
173
- "align": "center"
158
+ "type": "spinner",
159
+ "size": "sm"
174
160
  }
175
161
  ]
176
162
  ]
@@ -184,90 +170,9 @@
184
170
  "render-ui",
185
171
  "main",
186
172
  {
187
- "gap": "lg",
188
- "type": "stack",
189
- "direction": "vertical",
190
- "children": [
191
- {
192
- "gap": "md",
193
- "type": "stack",
194
- "direction": "horizontal",
195
- "align": "center",
196
- "justify": "between",
197
- "children": [
198
- {
199
- "gap": "md",
200
- "align": "center",
201
- "type": "stack",
202
- "children": [
203
- {
204
- "type": "icon",
205
- "name": "filter"
206
- },
207
- {
208
- "variant": "h2",
209
- "content": "FilterTargets",
210
- "type": "typography"
211
- }
212
- ],
213
- "direction": "horizontal"
214
- },
215
- {
216
- "type": "badge",
217
- "label": "All"
218
- }
219
- ]
220
- },
221
- {
222
- "type": "divider"
223
- },
224
- {
225
- "filters": [
226
- {
227
- "field": "status",
228
- "options": [
229
- "active",
230
- "inactive",
231
- "pending"
232
- ],
233
- "filterType": "select",
234
- "label": "Status"
235
- }
236
- ],
237
- "entity": "FilterTarget",
238
- "type": "filter-group"
239
- },
240
- {
241
- "type": "divider"
242
- },
243
- {
244
- "type": "data-grid",
245
- "fields": [],
246
- "entity": "@payload.data",
247
- "renderItem": [
248
- "fn",
249
- "item",
250
- {
251
- "type": "stack",
252
- "direction": "vertical",
253
- "gap": "sm",
254
- "children": [
255
- {
256
- "variant": "h4",
257
- "content": "@item.name",
258
- "type": "typography"
259
- },
260
- {
261
- "variant": "caption",
262
- "content": "@item.status",
263
- "color": "muted",
264
- "type": "typography"
265
- }
266
- ]
267
- }
268
- ]
269
- }
270
- ]
173
+ "type": "filter-group",
174
+ "filters": "@config.filters",
175
+ "entity": "FilterTarget"
271
176
  }
272
177
  ]
273
178
  ]
@@ -281,34 +186,20 @@
281
186
  "render-ui",
282
187
  "main",
283
188
  {
284
- "direction": "vertical",
285
- "gap": "md",
286
- "className": "py-12",
287
- "align": "center",
288
189
  "type": "stack",
190
+ "gap": "xs",
191
+ "direction": "vertical",
289
192
  "children": [
290
193
  {
291
- "type": "icon",
292
- "name": "alert-triangle",
293
- "color": "destructive"
294
- },
295
- {
296
- "content": "Failed to load",
297
- "variant": "h3",
298
- "type": "typography"
194
+ "entity": "FilterTarget",
195
+ "type": "filter-group",
196
+ "filters": "@config.filters"
299
197
  },
300
198
  {
301
- "variant": "body",
302
- "type": "typography",
199
+ "color": "error",
200
+ "variant": "caption",
303
201
  "content": "@payload.error",
304
- "color": "muted"
305
- },
306
- {
307
- "icon": "rotate-ccw",
308
- "action": "INIT",
309
- "variant": "primary",
310
- "label": "Retry",
311
- "type": "button"
202
+ "type": "typography"
312
203
  }
313
204
  ]
314
205
  }
@@ -324,6 +215,10 @@
324
215
  "fetch",
325
216
  "FilterTarget",
326
217
  {
218
+ "emit": {
219
+ "failure": "FilterTargetLoadFailed",
220
+ "success": "FilterTargetLoaded"
221
+ },
327
222
  "filter": [
328
223
  "=",
329
224
  [
@@ -332,18 +227,28 @@
332
227
  "@payload.field"
333
228
  ],
334
229
  "@payload.value"
335
- ],
336
- "emit": {
337
- "failure": "FilterTargetLoadFailed",
338
- "success": "FilterTargetLoaded"
339
- }
230
+ ]
340
231
  }
341
232
  ],
342
233
  [
343
234
  "render-ui",
344
235
  "main",
345
236
  {
346
- "type": "spinner"
237
+ "align": "center",
238
+ "gap": "sm",
239
+ "type": "stack",
240
+ "direction": "horizontal",
241
+ "children": [
242
+ {
243
+ "entity": "FilterTarget",
244
+ "type": "filter-group",
245
+ "filters": "@config.filters"
246
+ },
247
+ {
248
+ "type": "spinner",
249
+ "size": "sm"
250
+ }
251
+ ]
347
252
  }
348
253
  ]
349
254
  ]
@@ -358,8 +263,8 @@
358
263
  "FilterTarget",
359
264
  {
360
265
  "emit": {
361
- "success": "FilterTargetLoaded",
362
- "failure": "FilterTargetLoadFailed"
266
+ "failure": "FilterTargetLoadFailed",
267
+ "success": "FilterTargetLoaded"
363
268
  }
364
269
  }
365
270
  ],
@@ -367,7 +272,21 @@
367
272
  "render-ui",
368
273
  "main",
369
274
  {
370
- "type": "spinner"
275
+ "align": "center",
276
+ "children": [
277
+ {
278
+ "filters": "@config.filters",
279
+ "type": "filter-group",
280
+ "entity": "FilterTarget"
281
+ },
282
+ {
283
+ "type": "spinner",
284
+ "size": "sm"
285
+ }
286
+ ],
287
+ "direction": "horizontal",
288
+ "gap": "sm",
289
+ "type": "stack"
371
290
  }
372
291
  ]
373
292
  ]
@@ -382,8 +301,8 @@
382
301
  "FilterTarget",
383
302
  {
384
303
  "emit": {
385
- "failure": "FilterTargetLoadFailed",
386
- "success": "FilterTargetLoaded"
304
+ "success": "FilterTargetLoaded",
305
+ "failure": "FilterTargetLoadFailed"
387
306
  }
388
307
  }
389
308
  ],
@@ -391,13 +310,24 @@
391
310
  "render-ui",
392
311
  "main",
393
312
  {
394
- "type": "spinner"
313
+ "type": "spinner",
314
+ "size": "sm"
395
315
  }
396
316
  ]
397
317
  ]
398
318
  }
399
319
  ]
400
320
  },
321
+ "config": {
322
+ "event": {
323
+ "type": "string",
324
+ "default": "FILTER"
325
+ },
326
+ "filters": {
327
+ "type": "object",
328
+ "default": []
329
+ }
330
+ },
401
331
  "scope": "collection"
402
332
  }
403
333
  ],
@@ -414,4 +344,4 @@
414
344
  ]
415
345
  }
416
346
  ]
417
- }
347
+ }