You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5547a5a
Browse filesBrowse the repository at this point in the historyBrowse files
merge origin/main: regenerate component.mdx on the merged tree (os-regen step 3 hand-off)
The os-regen driver kept this branch's side of
content/docs/references/ui/component.mdx in the merge commit and dropped
main's object-metric rows from #21622. Step 2 restored main's side; this
commit regenerates the page from the merged source with gen:schema and
gen:docs. Result: main's side plus this branch's one `sortField` row,
and the delta against the branch side is exactly #21622's own delta on
the page.
Claude-Session: https://claude.ai/code/session_01T9u38rswFp5Rw8DswRUReJ
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: content/docs/references/ui/component.mdx
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1106,7 +1106,7 @@ Sort field and direction pair
1106
1106
|**title**|`string \| Record<string, string>`| optional | Drill-down panel title; defaults to the metric label |
1107
1107
|**icon**|`string`| optional | Lucide icon name drawn in the metric tile header, inside the `colorVariant`-tinted square. Read on this component — `ObjectMetricWidget` forwards it to `MetricWidget`, which resolves it with `getLazyIcon` (the `LazyIcon` module: kebab-case or PascalCase, degrading to the `Database` glyph on an unknown name). |
|**aggregate**|`any`| optional | Aggregation config (`{ field, function, groupBy? }`) run against the object|
1109
+
|**aggregate**|`{ field?: string; function: Enum<'count' \| 'sum' \| 'avg' \| 'min' \| 'max' \| 'count_distinct'>; groupBy?: string \| object }`| optional | Aggregation run against the object: `{ field?, function, groupBy? }` — `function` one of count / sum / avg / min / max / count_distinct (`field` needed for all but count), `groupBy` a field name or a `{ field, dateGranularity }` node, absent for one number over every row|
1110
1110
|**filter**|`{ field: string; operator: Enum<'equals' \| 'not_equals' \| 'contains' \| 'not_contains' \| 'icontains' \| …>; value?: string \| number \| boolean \| null \| (string \| number)[] }[]`| optional | Filter the aggregation is scoped by — the ViewFilterRule array form `[{ field, operator, value }, ...]`, the one filter orthography every `filter` door in this map shares. The MongoDB-style record form is refused — see migration `element-data-source-and-object-block-filter-rule-array`|
1111
1111
|**format**|`string`| optional | Number format pattern (e.g. '0,0', '$0,0', '0%') |
|**groupBy**|`string \| { field: string; dateGranularity?: Enum<'day' \| 'week' \| 'month' \| 'quarter' \| 'year'>; alias?: string }`| optional | Field the rows are grouped by, or a `{ field, dateGranularity }` date-bucket node. Omit it for the one number over every row (`_all`) |
|**value**|`string \| number \| boolean \| null \| (string \| number)[]`| optional | Filter value. The accepted SHAPE depends on the operator: `in` / `not_in` take an array (any length, including []), `between` takes exactly [min, max], every other operator takes a scalar. The unary operators (is_empty / is_not_empty / is_null / is_not_null) take their direction from the operator name and ignore this key. One operator bounds the VALUE as well as the shape: `icontains` takes a NON-EMPTY STRING, the comparand the Filter Protocol conformance table declares for it — an empty comparand constrains nothing and a non-string one would answer a query nobody wrote, and both are refused at the query path too. |
1131
1139
1140
+
### Nested Shape: `ObjectMetricProps.trend`
1141
+
1142
+
| Property | Type | Required | Description |
1143
+
| :--- | :--- | :--- | :--- |
1144
+
|**value**|`number`| ✅ | The change shown on the badge, painted as a percentage (`12` reads `12%`) |
1145
+
|**label**|`string \| Record<string, string>`| optional | Badge caption — a string or an inline locale map. The tile-level `description` outranks it in the one caption slot they share |
1146
+
|**direction**|`Enum<'up' \| 'down' \| 'neutral'>`| optional | Arrow beside the value; omit it for no arrow |
0 commit comments