@almadar/std 13.4.0 → 13.5.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-stats",
3
3
  "version": "2.0.0",
4
- "description": "std-stats — embeddable analytics-card atom. Drop into a dashboard\nmolecule alongside std-browse / std-search / std-filter; wire its\nITEMS_LOADED listener to the upstream collection's success emit, then\nconfigure `metrics` per call-site to declare WHICH aggregations to\nshow.\n\nAggregation runs in the lolo state machine (no custom React component\nbeyond stat-display): the ITEMS_LOADED transition uses array/map over\n@config.metrics, applies the per-metric `filter` predicate to\n@payload.data, then dispatches the chosen aggregation kind. Cards\ndrop into a data-list whose renderItem maps each card to a\nstat-display pattern. The atom owns an auxiliary entity (StatsItem)\nfor UI state — explicit-binding rule applies: every @entity.X is set\nexplicitly via (set @entity.X ...) on each transition.\n\nEach entry in `metrics` (all but `label` optional):\n- label string! card title\n- aggregation count|sum|avg|min|max default count what to compute\n- field string numeric entity field for sum/avg/min/max\n- filter SExpression row predicate (e.g. [\"=\", \"@item.status\", \"active\"])\n Drops rows that don't match BEFORE aggregation.\n Omitted = all rows.\n- format number|currency|percent default number value formatting\n- variant default|primary|success|warning|error|info color\n- icon string lucide icon name\n- prefix string prepended to displayed value (e.g. \"≈ \")\n- suffix string appended (e.g. \" /mo\", \" ms\")\n- max number optional denominator. >0 renders \"value / max\".\n- target number optional progress target. >0 renders a progress bar.\n- trend number signed delta vs previous period. >0 ↑ green, <0 ↓ red.\n\nFor dynamic max/target/trend (computed against @payload.data),\nschema authors today must precompute and pass literal numbers; an\nSExpression-evaluating slot is a future extension.",
4
+ "description": "std-stats — embeddable analytics-card atom. Drop into a dashboard\nmolecule alongside std-browse / std-search / std-filter; wire its\nITEMS_LOADED listener to the upstream collection's success emit, then\nconfigure `metrics` per call-site to declare WHICH aggregations to\nshow.\n\nAggregation runs in the lolo state machine (no custom React component\nbeyond stat-display): the ITEMS_LOADED transition uses array/map over\n@config.metrics, applies the per-metric `filter` predicate to\n@payload.data, then dispatches the chosen aggregation kind. Cards\ndrop into a data-list whose renderItem maps each card to a\nstat-display pattern. The atom owns an auxiliary entity (StatsItem)\nfor UI state — explicit-binding rule applies: every @entity.X is set\nexplicitly via (set @entity.X ...) on each transition.\n\nEach entry in `metrics` (all but `label` optional):\n- label string! card title\n- aggregation count|sum|avg|min|max default count what to compute\n- field string numeric entity field for sum/avg/min/max\n- filter SExpression row predicate (e.g. fn-form testing @row.status). Drops non-matching\n rows BEFORE aggregation. Omitted = all rows. Compiler statically\n unrolls array/map over @config.metrics so the fn-form is fully\n specialized into pure TS at codegen time.\n- format number|currency|percent default number value formatting\n- variant default|primary|success|warning|error|info color\n- icon string lucide icon name\n- prefix string prepended to displayed value (e.g. \"≈ \")\n- suffix string appended (e.g. \" /mo\", \" ms\")\n- max number optional denominator. >0 renders \"value / max\".\n- target number optional progress target. >0 renders a progress bar.\n- trend number signed delta vs previous period. >0 ↑ green, <0 ↓ red.\n\nFor dynamic max/target/trend (computed against @payload.data),\nschema authors today must precompute and pass literal numbers; an\nSExpression-evaluating slot is a future extension.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "StatsItemOrbital",
@@ -21,17 +21,13 @@
21
21
  "items": {
22
22
  "type": "object",
23
23
  "properties": {
24
- "suffix": {
25
- "name": "suffix",
26
- "type": "string"
27
- },
28
24
  "value": {
29
25
  "name": "value",
30
26
  "type": "number"
31
27
  },
32
- "icon": {
33
- "name": "icon",
34
- "type": "string"
28
+ "max": {
29
+ "name": "max",
30
+ "type": "number"
35
31
  },
36
32
  "format": {
37
33
  "name": "format",
@@ -42,14 +38,14 @@
42
38
  "percent"
43
39
  ]
44
40
  },
45
- "max": {
46
- "name": "max",
47
- "type": "number"
48
- },
49
41
  "target": {
50
42
  "name": "target",
51
43
  "type": "number"
52
44
  },
45
+ "trend": {
46
+ "name": "trend",
47
+ "type": "number"
48
+ },
53
49
  "variant": {
54
50
  "name": "variant",
55
51
  "type": "string",
@@ -66,13 +62,17 @@
66
62
  "name": "prefix",
67
63
  "type": "string"
68
64
  },
69
- "trend": {
70
- "name": "trend",
71
- "type": "number"
65
+ "icon": {
66
+ "name": "icon",
67
+ "type": "string"
72
68
  },
73
69
  "label": {
74
70
  "name": "label",
75
71
  "type": "string"
72
+ },
73
+ "suffix": {
74
+ "name": "suffix",
75
+ "type": "string"
76
76
  }
77
77
  }
78
78
  }
@@ -126,22 +126,22 @@
126
126
  "render-ui",
127
127
  "main",
128
128
  {
129
- "entity": "@entity.cards",
130
- "fields": [],
131
129
  "type": "data-list",
130
+ "entity": "@entity.cards",
132
131
  "renderItem": [
133
132
  "fn",
134
133
  "card",
135
134
  {
135
+ "variant": "@card.variant",
136
+ "icon": "@card.icon",
137
+ "format": "@card.format",
136
138
  "max": "@card.max",
137
- "value": "@card.value",
138
139
  "type": "stat-display",
139
140
  "label": "@card.label",
140
- "variant": "@card.variant",
141
- "format": "@card.format",
142
- "icon": "@card.icon"
141
+ "value": "@card.value"
143
142
  }
144
- ]
143
+ ],
144
+ "fields": []
145
145
  }
146
146
  ]
147
147
  ]
@@ -161,30 +161,12 @@
161
161
  "fn",
162
162
  "metric",
163
163
  {
164
- "format": [
165
- "object/get",
166
- "@metric",
167
- "format",
168
- "number"
169
- ],
170
- "max": [
171
- "object/get",
172
- "@metric",
173
- "max",
174
- 0.0
175
- ],
176
164
  "trend": [
177
165
  "object/get",
178
166
  "@metric",
179
167
  "trend",
180
168
  0.0
181
169
  ],
182
- "suffix": [
183
- "object/get",
184
- "@metric",
185
- "suffix",
186
- ""
187
- ],
188
170
  "value": [
189
171
  "if",
190
172
  [
@@ -326,16 +308,34 @@
326
308
  ]
327
309
  ]
328
310
  ],
329
- "label": [
311
+ "max": [
330
312
  "object/get",
331
313
  "@metric",
332
- "label"
314
+ "max",
315
+ 0.0
333
316
  ],
334
- "variant": [
317
+ "target": [
335
318
  "object/get",
336
319
  "@metric",
337
- "variant",
338
- "default"
320
+ "target",
321
+ 0.0
322
+ ],
323
+ "suffix": [
324
+ "object/get",
325
+ "@metric",
326
+ "suffix",
327
+ ""
328
+ ],
329
+ "prefix": [
330
+ "object/get",
331
+ "@metric",
332
+ "prefix",
333
+ ""
334
+ ],
335
+ "label": [
336
+ "object/get",
337
+ "@metric",
338
+ "label"
339
339
  ],
340
340
  "icon": [
341
341
  "object/get",
@@ -343,17 +343,17 @@
343
343
  "icon",
344
344
  ""
345
345
  ],
346
- "target": [
346
+ "variant": [
347
347
  "object/get",
348
348
  "@metric",
349
- "target",
350
- 0.0
349
+ "variant",
350
+ "default"
351
351
  ],
352
- "prefix": [
352
+ "format": [
353
353
  "object/get",
354
354
  "@metric",
355
- "prefix",
356
- ""
355
+ "format",
356
+ "number"
357
357
  ]
358
358
  }
359
359
  ]
@@ -363,26 +363,26 @@
363
363
  "render-ui",
364
364
  "main",
365
365
  {
366
+ "type": "data-list",
366
367
  "renderItem": [
367
368
  "fn",
368
369
  "card",
369
370
  {
371
+ "variant": "@card.variant",
370
372
  "type": "stat-display",
371
- "icon": "@card.icon",
372
- "max": "@card.max",
373
- "suffix": "@card.suffix",
374
373
  "format": "@card.format",
374
+ "prefix": "@card.prefix",
375
+ "trend": "@card.trend",
375
376
  "value": "@card.value",
377
+ "suffix": "@card.suffix",
378
+ "max": "@card.max",
379
+ "icon": "@card.icon",
376
380
  "label": "@card.label",
377
- "variant": "@card.variant",
378
- "prefix": "@card.prefix",
379
- "target": "@card.target",
380
- "trend": "@card.trend"
381
+ "target": "@card.target"
381
382
  }
382
383
  ],
383
- "type": "data-list",
384
- "entity": "@entity.cards",
385
- "fields": []
384
+ "fields": [],
385
+ "entity": "@entity.cards"
386
386
  }
387
387
  ]
388
388
  ]
@@ -66,14 +66,18 @@
66
66
  "config": {
67
67
  "metrics": [
68
68
  {
69
- "format": "number",
70
- "aggregation": "count",
71
69
  "label": "Total Items",
72
70
  "icon": "list",
73
- "variant": "primary"
71
+ "aggregation": "count",
72
+ "variant": "primary",
73
+ "format": "number"
74
74
  },
75
75
  {
76
76
  "aggregation": "count",
77
+ "label": "Active",
78
+ "icon": "check-circle",
79
+ "variant": "success",
80
+ "format": "number",
77
81
  "filter": [
78
82
  "fn",
79
83
  "row",
@@ -82,29 +86,25 @@
82
86
  "@row.status",
83
87
  "active"
84
88
  ]
85
- ],
86
- "icon": "check-circle",
87
- "variant": "success",
88
- "format": "number",
89
- "label": "Active"
89
+ ]
90
90
  },
91
91
  {
92
- "label": "Total Revenue",
93
92
  "variant": "info",
94
- "aggregation": "sum",
95
- "format": "currency",
96
93
  "field": "amount",
97
94
  "target": 10000.0,
98
- "icon": "dollar-sign"
95
+ "aggregation": "sum",
96
+ "icon": "dollar-sign",
97
+ "label": "Total Revenue",
98
+ "format": "currency"
99
99
  },
100
100
  {
101
- "icon": "trending-up",
101
+ "label": "Avg Units",
102
+ "field": "units",
102
103
  "aggregation": "avg",
103
104
  "variant": "default",
104
- "format": "number",
105
- "field": "units",
106
- "label": "Avg Units",
107
- "suffix": " units"
105
+ "suffix": " units",
106
+ "icon": "trending-up",
107
+ "format": "number"
108
108
  }
109
109
  ],
110
110
  "title": "Summary"
@@ -124,13 +124,13 @@
124
124
  "ref": "Graphs.traits.GraphItemGraph",
125
125
  "name": "DashboardCategoryChart",
126
126
  "config": {
127
- "categoryField": "category",
128
- "aggregation": "count",
129
- "height": 280.0,
130
127
  "showLegend": false,
131
- "subtitle": "Count across categories",
132
128
  "title": "Items by Category",
133
- "chartType": "bar"
129
+ "subtitle": "Count across categories",
130
+ "chartType": "bar",
131
+ "aggregation": "count",
132
+ "height": 280.0,
133
+ "categoryField": "category"
134
134
  },
135
135
  "listens": [
136
136
  {
@@ -147,12 +147,12 @@
147
147
  "ref": "Graphs.traits.GraphItemGraph",
148
148
  "name": "DashboardStatusChart",
149
149
  "config": {
150
- "height": 280.0,
151
- "categoryField": "status",
152
150
  "title": "Status Mix",
153
- "showLegend": true,
154
151
  "chartType": "donut",
155
- "aggregation": "count"
152
+ "aggregation": "count",
153
+ "showLegend": true,
154
+ "categoryField": "status",
155
+ "height": 280.0
156
156
  },
157
157
  "listens": [
158
158
  {
@@ -171,7 +171,6 @@
171
171
  "linkedEntity": "DashboardItem",
172
172
  "config": {
173
173
  "displayPageSize": 5.0,
174
- "pageSize": 100.0,
175
174
  "fields": [
176
175
  {
177
176
  "name": "name",
@@ -184,16 +183,17 @@
184
183
  "variant": "caption"
185
184
  },
186
185
  {
187
- "variant": "badge",
188
186
  "name": "status",
187
+ "variant": "badge",
189
188
  "label": "Status"
190
189
  },
191
190
  {
192
- "variant": "caption",
193
191
  "label": "Amount",
194
- "name": "amount"
192
+ "name": "amount",
193
+ "variant": "caption"
195
194
  }
196
- ]
195
+ ],
196
+ "pageSize": 100.0
197
197
  }
198
198
  },
199
199
  {
@@ -274,8 +274,8 @@
274
274
  "DashboardItem",
275
275
  {
276
276
  "emit": {
277
- "failure": "DashboardItemLoadFailed",
278
- "success": "DashboardItemLoaded"
277
+ "success": "DashboardItemLoaded",
278
+ "failure": "DashboardItemLoadFailed"
279
279
  }
280
280
  }
281
281
  ],
@@ -283,50 +283,50 @@
283
283
  "render-ui",
284
284
  "main",
285
285
  {
286
- "type": "stack",
287
- "className": "max-w-6xl mx-auto w-full p-4",
288
286
  "children": [
289
287
  {
288
+ "align": "center",
289
+ "type": "stack",
290
+ "direction": "horizontal",
291
+ "gap": "sm",
290
292
  "children": [
291
293
  {
292
294
  "name": "bar-chart-2",
293
295
  "type": "icon"
294
296
  },
295
297
  {
296
- "type": "typography",
297
298
  "variant": "h2",
299
+ "type": "typography",
298
300
  "content": "Dashboard"
299
301
  }
300
- ],
301
- "direction": "horizontal",
302
- "type": "stack",
303
- "gap": "sm",
304
- "align": "center"
302
+ ]
305
303
  },
306
304
  {
307
305
  "type": "divider"
308
306
  },
309
307
  "@trait.DashboardSummary",
310
308
  {
311
- "type": "simple-grid",
309
+ "cols": 2.0,
310
+ "gap": "md",
312
311
  "children": [
313
312
  "@trait.DashboardCategoryChart",
314
313
  "@trait.DashboardStatusChart"
315
314
  ],
316
- "cols": 2.0,
317
- "gap": "md"
315
+ "type": "simple-grid"
318
316
  },
319
317
  {
320
318
  "type": "divider"
321
319
  },
322
320
  {
323
- "variant": "h3",
324
321
  "type": "typography",
322
+ "variant": "h3",
325
323
  "content": "Recent Items"
326
324
  },
327
325
  "@trait.DashboardItemBrowse"
328
326
  ],
329
327
  "gap": "lg",
328
+ "className": "max-w-6xl mx-auto w-full p-4",
329
+ "type": "stack",
330
330
  "direction": "vertical"
331
331
  }
332
332
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-stats",
3
3
  "version": "2.0.0",
4
- "description": "std-stats — embeddable analytics-card atom. Drop into a dashboard\nmolecule alongside std-browse / std-search / std-filter; wire its\nITEMS_LOADED listener to the upstream collection's success emit, then\nconfigure `metrics` per call-site to declare WHICH aggregations to\nshow.\n\nAggregation runs in the lolo state machine (no custom React component\nbeyond stat-display): the ITEMS_LOADED transition uses array/map over\n@config.metrics, applies the per-metric `filter` predicate to\n@payload.data, then dispatches the chosen aggregation kind. Cards\ndrop into a data-list whose renderItem maps each card to a\nstat-display pattern. The atom owns an auxiliary entity (StatsItem)\nfor UI state — explicit-binding rule applies: every @entity.X is set\nexplicitly via (set @entity.X ...) on each transition.\n\nEach entry in `metrics` (all but `label` optional):\n- label string! card title\n- aggregation count|sum|avg|min|max default count what to compute\n- field string numeric entity field for sum/avg/min/max\n- filter SExpression row predicate (e.g. [\"=\", \"@item.status\", \"active\"])\n Drops rows that don't match BEFORE aggregation.\n Omitted = all rows.\n- format number|currency|percent default number value formatting\n- variant default|primary|success|warning|error|info color\n- icon string lucide icon name\n- prefix string prepended to displayed value (e.g. \"≈ \")\n- suffix string appended (e.g. \" /mo\", \" ms\")\n- max number optional denominator. >0 renders \"value / max\".\n- target number optional progress target. >0 renders a progress bar.\n- trend number signed delta vs previous period. >0 ↑ green, <0 ↓ red.\n\nFor dynamic max/target/trend (computed against @payload.data),\nschema authors today must precompute and pass literal numbers; an\nSExpression-evaluating slot is a future extension.",
4
+ "description": "std-stats — embeddable analytics-card atom. Drop into a dashboard\nmolecule alongside std-browse / std-search / std-filter; wire its\nITEMS_LOADED listener to the upstream collection's success emit, then\nconfigure `metrics` per call-site to declare WHICH aggregations to\nshow.\n\nAggregation runs in the lolo state machine (no custom React component\nbeyond stat-display): the ITEMS_LOADED transition uses array/map over\n@config.metrics, applies the per-metric `filter` predicate to\n@payload.data, then dispatches the chosen aggregation kind. Cards\ndrop into a data-list whose renderItem maps each card to a\nstat-display pattern. The atom owns an auxiliary entity (StatsItem)\nfor UI state — explicit-binding rule applies: every @entity.X is set\nexplicitly via (set @entity.X ...) on each transition.\n\nEach entry in `metrics` (all but `label` optional):\n- label string! card title\n- aggregation count|sum|avg|min|max default count what to compute\n- field string numeric entity field for sum/avg/min/max\n- filter SExpression row predicate (e.g. fn-form testing @row.status). Drops non-matching\n rows BEFORE aggregation. Omitted = all rows. Compiler statically\n unrolls array/map over @config.metrics so the fn-form is fully\n specialized into pure TS at codegen time.\n- format number|currency|percent default number value formatting\n- variant default|primary|success|warning|error|info color\n- icon string lucide icon name\n- prefix string prepended to displayed value (e.g. \"≈ \")\n- suffix string appended (e.g. \" /mo\", \" ms\")\n- max number optional denominator. >0 renders \"value / max\".\n- target number optional progress target. >0 renders a progress bar.\n- trend number signed delta vs previous period. >0 ↑ green, <0 ↓ red.\n\nFor dynamic max/target/trend (computed against @payload.data),\nschema authors today must precompute and pass literal numbers; an\nSExpression-evaluating slot is a future extension.",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "StatsItemOrbital",
@@ -21,17 +21,13 @@
21
21
  "items": {
22
22
  "type": "object",
23
23
  "properties": {
24
- "suffix": {
25
- "name": "suffix",
26
- "type": "string"
27
- },
28
24
  "value": {
29
25
  "name": "value",
30
26
  "type": "number"
31
27
  },
32
- "icon": {
33
- "name": "icon",
34
- "type": "string"
28
+ "max": {
29
+ "name": "max",
30
+ "type": "number"
35
31
  },
36
32
  "format": {
37
33
  "name": "format",
@@ -42,14 +38,14 @@
42
38
  "percent"
43
39
  ]
44
40
  },
45
- "max": {
46
- "name": "max",
47
- "type": "number"
48
- },
49
41
  "target": {
50
42
  "name": "target",
51
43
  "type": "number"
52
44
  },
45
+ "trend": {
46
+ "name": "trend",
47
+ "type": "number"
48
+ },
53
49
  "variant": {
54
50
  "name": "variant",
55
51
  "type": "string",
@@ -66,13 +62,17 @@
66
62
  "name": "prefix",
67
63
  "type": "string"
68
64
  },
69
- "trend": {
70
- "name": "trend",
71
- "type": "number"
65
+ "icon": {
66
+ "name": "icon",
67
+ "type": "string"
72
68
  },
73
69
  "label": {
74
70
  "name": "label",
75
71
  "type": "string"
72
+ },
73
+ "suffix": {
74
+ "name": "suffix",
75
+ "type": "string"
76
76
  }
77
77
  }
78
78
  }
@@ -126,22 +126,22 @@
126
126
  "render-ui",
127
127
  "main",
128
128
  {
129
- "entity": "@entity.cards",
130
- "fields": [],
131
129
  "type": "data-list",
130
+ "entity": "@entity.cards",
132
131
  "renderItem": [
133
132
  "fn",
134
133
  "card",
135
134
  {
135
+ "variant": "@card.variant",
136
+ "icon": "@card.icon",
137
+ "format": "@card.format",
136
138
  "max": "@card.max",
137
- "value": "@card.value",
138
139
  "type": "stat-display",
139
140
  "label": "@card.label",
140
- "variant": "@card.variant",
141
- "format": "@card.format",
142
- "icon": "@card.icon"
141
+ "value": "@card.value"
143
142
  }
144
- ]
143
+ ],
144
+ "fields": []
145
145
  }
146
146
  ]
147
147
  ]
@@ -161,30 +161,12 @@
161
161
  "fn",
162
162
  "metric",
163
163
  {
164
- "format": [
165
- "object/get",
166
- "@metric",
167
- "format",
168
- "number"
169
- ],
170
- "max": [
171
- "object/get",
172
- "@metric",
173
- "max",
174
- 0.0
175
- ],
176
164
  "trend": [
177
165
  "object/get",
178
166
  "@metric",
179
167
  "trend",
180
168
  0.0
181
169
  ],
182
- "suffix": [
183
- "object/get",
184
- "@metric",
185
- "suffix",
186
- ""
187
- ],
188
170
  "value": [
189
171
  "if",
190
172
  [
@@ -326,16 +308,34 @@
326
308
  ]
327
309
  ]
328
310
  ],
329
- "label": [
311
+ "max": [
330
312
  "object/get",
331
313
  "@metric",
332
- "label"
314
+ "max",
315
+ 0.0
333
316
  ],
334
- "variant": [
317
+ "target": [
335
318
  "object/get",
336
319
  "@metric",
337
- "variant",
338
- "default"
320
+ "target",
321
+ 0.0
322
+ ],
323
+ "suffix": [
324
+ "object/get",
325
+ "@metric",
326
+ "suffix",
327
+ ""
328
+ ],
329
+ "prefix": [
330
+ "object/get",
331
+ "@metric",
332
+ "prefix",
333
+ ""
334
+ ],
335
+ "label": [
336
+ "object/get",
337
+ "@metric",
338
+ "label"
339
339
  ],
340
340
  "icon": [
341
341
  "object/get",
@@ -343,17 +343,17 @@
343
343
  "icon",
344
344
  ""
345
345
  ],
346
- "target": [
346
+ "variant": [
347
347
  "object/get",
348
348
  "@metric",
349
- "target",
350
- 0.0
349
+ "variant",
350
+ "default"
351
351
  ],
352
- "prefix": [
352
+ "format": [
353
353
  "object/get",
354
354
  "@metric",
355
- "prefix",
356
- ""
355
+ "format",
356
+ "number"
357
357
  ]
358
358
  }
359
359
  ]
@@ -363,26 +363,26 @@
363
363
  "render-ui",
364
364
  "main",
365
365
  {
366
+ "type": "data-list",
366
367
  "renderItem": [
367
368
  "fn",
368
369
  "card",
369
370
  {
371
+ "variant": "@card.variant",
370
372
  "type": "stat-display",
371
- "icon": "@card.icon",
372
- "max": "@card.max",
373
- "suffix": "@card.suffix",
374
373
  "format": "@card.format",
374
+ "prefix": "@card.prefix",
375
+ "trend": "@card.trend",
375
376
  "value": "@card.value",
377
+ "suffix": "@card.suffix",
378
+ "max": "@card.max",
379
+ "icon": "@card.icon",
376
380
  "label": "@card.label",
377
- "variant": "@card.variant",
378
- "prefix": "@card.prefix",
379
- "target": "@card.target",
380
- "trend": "@card.trend"
381
+ "target": "@card.target"
381
382
  }
382
383
  ],
383
- "type": "data-list",
384
- "entity": "@entity.cards",
385
- "fields": []
384
+ "fields": [],
385
+ "entity": "@entity.cards"
386
386
  }
387
387
  ]
388
388
  ]
@@ -66,14 +66,18 @@
66
66
  "config": {
67
67
  "metrics": [
68
68
  {
69
- "format": "number",
70
- "aggregation": "count",
71
69
  "label": "Total Items",
72
70
  "icon": "list",
73
- "variant": "primary"
71
+ "aggregation": "count",
72
+ "variant": "primary",
73
+ "format": "number"
74
74
  },
75
75
  {
76
76
  "aggregation": "count",
77
+ "label": "Active",
78
+ "icon": "check-circle",
79
+ "variant": "success",
80
+ "format": "number",
77
81
  "filter": [
78
82
  "fn",
79
83
  "row",
@@ -82,29 +86,25 @@
82
86
  "@row.status",
83
87
  "active"
84
88
  ]
85
- ],
86
- "icon": "check-circle",
87
- "variant": "success",
88
- "format": "number",
89
- "label": "Active"
89
+ ]
90
90
  },
91
91
  {
92
- "label": "Total Revenue",
93
92
  "variant": "info",
94
- "aggregation": "sum",
95
- "format": "currency",
96
93
  "field": "amount",
97
94
  "target": 10000.0,
98
- "icon": "dollar-sign"
95
+ "aggregation": "sum",
96
+ "icon": "dollar-sign",
97
+ "label": "Total Revenue",
98
+ "format": "currency"
99
99
  },
100
100
  {
101
- "icon": "trending-up",
101
+ "label": "Avg Units",
102
+ "field": "units",
102
103
  "aggregation": "avg",
103
104
  "variant": "default",
104
- "format": "number",
105
- "field": "units",
106
- "label": "Avg Units",
107
- "suffix": " units"
105
+ "suffix": " units",
106
+ "icon": "trending-up",
107
+ "format": "number"
108
108
  }
109
109
  ],
110
110
  "title": "Summary"
@@ -124,13 +124,13 @@
124
124
  "ref": "Graphs.traits.GraphItemGraph",
125
125
  "name": "DashboardCategoryChart",
126
126
  "config": {
127
- "categoryField": "category",
128
- "aggregation": "count",
129
- "height": 280.0,
130
127
  "showLegend": false,
131
- "subtitle": "Count across categories",
132
128
  "title": "Items by Category",
133
- "chartType": "bar"
129
+ "subtitle": "Count across categories",
130
+ "chartType": "bar",
131
+ "aggregation": "count",
132
+ "height": 280.0,
133
+ "categoryField": "category"
134
134
  },
135
135
  "listens": [
136
136
  {
@@ -147,12 +147,12 @@
147
147
  "ref": "Graphs.traits.GraphItemGraph",
148
148
  "name": "DashboardStatusChart",
149
149
  "config": {
150
- "height": 280.0,
151
- "categoryField": "status",
152
150
  "title": "Status Mix",
153
- "showLegend": true,
154
151
  "chartType": "donut",
155
- "aggregation": "count"
152
+ "aggregation": "count",
153
+ "showLegend": true,
154
+ "categoryField": "status",
155
+ "height": 280.0
156
156
  },
157
157
  "listens": [
158
158
  {
@@ -171,7 +171,6 @@
171
171
  "linkedEntity": "DashboardItem",
172
172
  "config": {
173
173
  "displayPageSize": 5.0,
174
- "pageSize": 100.0,
175
174
  "fields": [
176
175
  {
177
176
  "name": "name",
@@ -184,16 +183,17 @@
184
183
  "variant": "caption"
185
184
  },
186
185
  {
187
- "variant": "badge",
188
186
  "name": "status",
187
+ "variant": "badge",
189
188
  "label": "Status"
190
189
  },
191
190
  {
192
- "variant": "caption",
193
191
  "label": "Amount",
194
- "name": "amount"
192
+ "name": "amount",
193
+ "variant": "caption"
195
194
  }
196
- ]
195
+ ],
196
+ "pageSize": 100.0
197
197
  }
198
198
  },
199
199
  {
@@ -274,8 +274,8 @@
274
274
  "DashboardItem",
275
275
  {
276
276
  "emit": {
277
- "failure": "DashboardItemLoadFailed",
278
- "success": "DashboardItemLoaded"
277
+ "success": "DashboardItemLoaded",
278
+ "failure": "DashboardItemLoadFailed"
279
279
  }
280
280
  }
281
281
  ],
@@ -283,50 +283,50 @@
283
283
  "render-ui",
284
284
  "main",
285
285
  {
286
- "type": "stack",
287
- "className": "max-w-6xl mx-auto w-full p-4",
288
286
  "children": [
289
287
  {
288
+ "align": "center",
289
+ "type": "stack",
290
+ "direction": "horizontal",
291
+ "gap": "sm",
290
292
  "children": [
291
293
  {
292
294
  "name": "bar-chart-2",
293
295
  "type": "icon"
294
296
  },
295
297
  {
296
- "type": "typography",
297
298
  "variant": "h2",
299
+ "type": "typography",
298
300
  "content": "Dashboard"
299
301
  }
300
- ],
301
- "direction": "horizontal",
302
- "type": "stack",
303
- "gap": "sm",
304
- "align": "center"
302
+ ]
305
303
  },
306
304
  {
307
305
  "type": "divider"
308
306
  },
309
307
  "@trait.DashboardSummary",
310
308
  {
311
- "type": "simple-grid",
309
+ "cols": 2.0,
310
+ "gap": "md",
312
311
  "children": [
313
312
  "@trait.DashboardCategoryChart",
314
313
  "@trait.DashboardStatusChart"
315
314
  ],
316
- "cols": 2.0,
317
- "gap": "md"
315
+ "type": "simple-grid"
318
316
  },
319
317
  {
320
318
  "type": "divider"
321
319
  },
322
320
  {
323
- "variant": "h3",
324
321
  "type": "typography",
322
+ "variant": "h3",
325
323
  "content": "Recent Items"
326
324
  },
327
325
  "@trait.DashboardItemBrowse"
328
326
  ],
329
327
  "gap": "lg",
328
+ "className": "max-w-6xl mx-auto w-full p-4",
329
+ "type": "stack",
330
330
  "direction": "vertical"
331
331
  }
332
332
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/std",
3
- "version": "13.4.0",
3
+ "version": "13.5.0",
4
4
  "description": "Standard library operators for Almadar (math, string, array, etc.)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",