@object-ui/plugin-dashboard 17.5.0 → 17.7.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +5042 -0
  2. package/README.md +544 -74
  3. package/dist/DashboardConfigPanel.d.ts +3 -0
  4. package/dist/DashboardConfigPanel.d.ts.map +1 -1
  5. package/dist/DashboardFilterBar.d.ts.map +1 -1
  6. package/dist/DashboardGridLayout.d.ts +3 -2
  7. package/dist/DashboardGridLayout.d.ts.map +1 -1
  8. package/dist/DashboardRenderer.d.ts +32 -2
  9. package/dist/DashboardRenderer.d.ts.map +1 -1
  10. package/dist/DashboardWithConfig.d.ts +1 -1
  11. package/dist/DashboardWithConfig.d.ts.map +1 -1
  12. package/dist/DatasetWidget.d.ts +43 -119
  13. package/dist/DatasetWidget.d.ts.map +1 -1
  14. package/dist/DrillDownDrawer.d.ts +14 -5
  15. package/dist/DrillDownDrawer.d.ts.map +1 -1
  16. package/dist/MetricCard.d.ts +1 -1
  17. package/dist/MetricWidget.d.ts +27 -2
  18. package/dist/MetricWidget.d.ts.map +1 -1
  19. package/dist/ObjectDataTable.d.ts +473 -19
  20. package/dist/ObjectDataTable.d.ts.map +1 -1
  21. package/dist/ObjectMetricWidget.d.ts +65 -27
  22. package/dist/ObjectMetricWidget.d.ts.map +1 -1
  23. package/dist/ObjectPivotTable.d.ts +46 -7
  24. package/dist/ObjectPivotTable.d.ts.map +1 -1
  25. package/dist/PivotTable.d.ts +20 -3
  26. package/dist/PivotTable.d.ts.map +1 -1
  27. package/dist/RecordDetailDrawer.d.ts +8 -0
  28. package/dist/RecordDetailDrawer.d.ts.map +1 -1
  29. package/dist/WidgetConfigPanel.d.ts +29 -1
  30. package/dist/WidgetConfigPanel.d.ts.map +1 -1
  31. package/dist/WidgetEmptyState.d.ts +27 -0
  32. package/dist/WidgetEmptyState.d.ts.map +1 -0
  33. package/dist/domPassthroughPins.d.ts.map +1 -1
  34. package/dist/index.d.ts +30 -25
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +2306 -1858
  37. package/dist/index.umd.cjs +2 -2
  38. package/dist/legacyRetiredWidget.d.ts +5 -3
  39. package/dist/legacyRetiredWidget.d.ts.map +1 -1
  40. package/dist/measureRefusal.d.ts +50 -0
  41. package/dist/measureRefusal.d.ts.map +1 -0
  42. package/dist/recordFields.d.ts +159 -9
  43. package/dist/recordFields.d.ts.map +1 -1
  44. package/dist/retired-node-types.d.ts +29 -0
  45. package/dist/retired-node-types.d.ts.map +1 -0
  46. package/dist/useConfigPanelTranslation.d.ts +35 -0
  47. package/dist/useConfigPanelTranslation.d.ts.map +1 -0
  48. package/dist/useDashboardAutoRefresh.d.ts +47 -0
  49. package/dist/useDashboardAutoRefresh.d.ts.map +1 -0
  50. package/dist/utils.d.ts +36 -7
  51. package/dist/utils.d.ts.map +1 -1
  52. package/dist/widgetDispatch.d.ts +144 -18
  53. package/dist/widgetDispatch.d.ts.map +1 -1
  54. package/dist/widgetSubCaption.d.ts +40 -0
  55. package/dist/widgetSubCaption.d.ts.map +1 -0
  56. package/package.json +15 -15
@@ -1,3 +1,5 @@
1
+ import { ConfigPanelSchema } from '@object-ui/components';
2
+ import { ConfigPanelTranslate } from './useConfigPanelTranslation.js';
1
3
  /**
2
4
  * ObjectUI
3
5
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -6,6 +8,7 @@
6
8
  * LICENSE file in the root directory of this source tree.
7
9
  */
8
10
  import * as React from 'react';
11
+ export declare function buildDashboardSchema(t: ConfigPanelTranslate): ConfigPanelSchema;
9
12
  export interface DashboardConfigPanelProps {
10
13
  /** Whether the panel is open */
11
14
  open: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardConfigPanel.d.ts","sourceRoot":"","sources":["../src/DashboardConfigPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkH/B,MAAM,WA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E,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACrD;AAMD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,MAAM,EACN,aAAa,GACd,EAAE,yBAAyB,qBAoB3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardFilterBar.d.ts","sourceRoot":"","sources":["../src/DashboardFilterBar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH,OAAO,KAAuC,MAAM,OAAO,CAAC;AAiB5D,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,iBAAiB,CAAC;AAoCzB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkSD,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,uBAAuB,4BAyCrH"}
1
+ {"version":3,"file":"DashboardFilterBar.d.ts","sourceRoot":"","sources":["../src/DashboardFilterBar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH,OAAO,KAA+C,MAAM,OAAO,CAAC;AAkBpE,OAAO,EAGL,KAAK,kBAAkB,EAExB,MAAM,iBAAiB,CAAC;AA6DzB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA2cD,wBAAgB,kBAAkB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,uBAAuB,4BAyCrH"}
@@ -20,8 +20,9 @@ export interface DashboardGridLayoutProps {
20
20
  * surfaces at once.
21
21
  *
22
22
  * Optional, and the omitted case is a SUPPORTED one rather than an oversight:
23
- * `dashboard-grid`'s SDUI registration declares only `title` / `className`
24
- * inputs, so schema-driven hosts render this component with no adapter at all.
23
+ * a host may mount this component with no adapter at all (until objectui#10859
24
+ * batch 8 retired the `dashboard-grid` node key, its SDUI registration declared
25
+ * only `title` / `className` inputs, so schema-driven hosts always did).
25
26
  * A dataset-bound widget arriving that way renders `DatasetWidget`'s own
26
27
  * no-capability diagnostic — a visible state, never a blank tile.
27
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardGridLayout.d.ts","sourceRoot":"","sources":["../src/DashboardGridLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA2C,KAAK,UAAU,IAAI,SAAS,EAAuC,MAAM,mBAAmB,CAAC;AAC/I,OAAO,kCAAkC,CAAC;AAK1C,OAAO,KAAK,EAAc,wBAAwB,EAAyB,MAAM,kBAAkB,CAAC;AA8BpG,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,wBAAwB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;I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a1B;AAiBD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAqlBlE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { DashboardComponentSchema, DashboardWidgetSchema } from '@object-ui/types';
1
+ import { DashboardComponentSchema } from '@object-ui/types';
2
2
  import { ActionDef, ActionResult, ActionContext, ModalHandler, SduiDomPassThroughKey } from '@object-ui/core';
3
3
  import { HTMLAttributes } from 'react';
4
4
  /**
@@ -44,6 +44,10 @@ export interface DashboardRendererProps extends Pick<HTMLAttributes<HTMLDivEleme
44
44
  * is precisely what it resolved to before, so declaring it changes what is
45
45
  * DECLARED without changing what any call site is held to. Narrowing it to a
46
46
  * real adapter type is a separate change with its own consumer sweep.
47
+ *
48
+ * Optional: when it is omitted, the adapter of the enclosing
49
+ * `SchemaRendererProvider` is used, which is how a `dashboard` block held on
50
+ * a page gets one (objectui#10815).
47
51
  */
48
52
  dataSource?: any;
49
53
  /** Callback invoked when dashboard refresh is triggered (manual or auto) */
@@ -67,8 +71,13 @@ export interface DashboardRendererProps extends Pick<HTMLAttributes<HTMLDivEleme
67
71
  * Receives the next widgets array (with positions swapped). The parent
68
72
  * is expected to persist via its data adapter. When omitted, drag-and-
69
73
  * drop affordances are disabled even in design mode.
74
+ *
75
+ * Typed by the slot itself, `DashboardComponentSchema['widgets']`: the array
76
+ * is `schema.widgets` reordered, so each entry is a widget or a component node
77
+ * placed directly in the slot (objectui#11514; it read `DashboardWidgetSchema[]`
78
+ * while the component arm was assignable to the widget arm).
70
79
  */
71
- onWidgetsReorder?: (widgets: DashboardWidgetSchema[]) => void;
80
+ onWidgetsReorder?: (widgets: DashboardComponentSchema['widgets']) => void;
72
81
  /** Optional handler for actionType="modal" header actions. Receives a schema and ActionContext. */
73
82
  modalHandler?: ModalHandler;
74
83
  /** Optional named handlers for actionType="script" header actions, keyed by action name (actionUrl). */
@@ -80,6 +89,27 @@ export interface DashboardRendererProps extends Pick<HTMLAttributes<HTMLDivEleme
80
89
  * title/subtitle so we don't display them twice.
81
90
  */
82
91
  hideHeaderText?: boolean;
92
+ /**
93
+ * The document arrives already translated for the active language: the host
94
+ * read it from the server's `/meta` route, which resolves the packaged
95
+ * catalog per request locale and keeps a published edit over it (an explicit
96
+ * override beats the packaged default — `translateDashboard` in
97
+ * `@objectstack/spec`). The console's dashboard page (`DashboardView`) sets
98
+ * it.
99
+ *
100
+ * When true, the texts the server translated — the dashboard `label` and
101
+ * `description`, and each widget's `title`, `description` and sub-caption
102
+ * (`options.description`) — are drawn as given: an inline per-locale map is
103
+ * still collapsed to the active language, but no client bundle lookup runs
104
+ * over them. A second pass over a served value is what let the packaged
105
+ * catalog win again, client-side, over a published edit (objectui#11295).
106
+ *
107
+ * Leave it unset for a document the server never translated — an inline
108
+ * block, a preview, a design surface: the client bundle is then its one
109
+ * translation pass, exactly as before. Header-action labels keep their bundle
110
+ * lookup either way: the server does not translate them.
111
+ */
112
+ localized?: boolean;
83
113
  }
84
114
  /**
85
115
  * DashboardRenderer — the public dashboard renderer.
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardRenderer.d.ts","sourceRoot":"","sources":["../src/DashboardRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAc,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGpG,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAUnH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAmI5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACnE,MAAM,EAAE,wBAAwB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;OAUG;IACH,UAAU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rB;AAumCD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,mHAiB7B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { DashboardComponentSchema } from '@object-ui/types';
2
- import { WidgetDatasetCatalogEntry } from './dataset-catalog';
2
+ import { WidgetDatasetCatalogEntry } from './dataset-catalog.js';
3
3
  /**
4
4
  * ObjectUI
5
5
  * Copyright (c) 2024-present ObjectStack Inc.
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardWithConfig.d.ts","sourceRoot":"","sources":["../src/DashboardWithConfig.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,wBAAwB,EAAyB,MAAM,kBAAkB,CAAC;AAKxF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAMnE,MAAM,WAAW,wBAAwB;IACvC,qCAAqC;IACrC,MAAM,EAAE,wBAAwB,CAAC;IACjC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,6DAA6D;IAC7D,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IACpD,iEAAiE;IACjE,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IACvE,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACvC,oDAAoD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3B;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,WAAW,EACX,iBAAyB,EACzB,SAAS,EACT,QAAQ,EACR,eAAe,GAChB,EAAE,wBAAwB,qBA6L1B"}
@@ -1,4 +1,4 @@
1
- import { buildDatasetDrillFilter, pivotCellKey, ChartSeriesBinding } from '@object-ui/core';
1
+ import { buildDatasetDrillFilter, pivotCellKey } from '@object-ui/core';
2
2
  /**
3
3
  * Build the record-list filter for a drilled row. Re-exported for back-compat;
4
4
  * the implementation now lives in `@object-ui/core` (`buildDatasetDrillFilter`)
@@ -86,128 +86,52 @@ export declare function extractDateWindows(filter: unknown): {
86
86
  rest: Record<string, unknown> | undefined;
87
87
  };
88
88
  /**
89
- * Lower a dashboard widget's declared `chartConfig` (spec `ChartConfigSchema` —
90
- * the same shape a report block and a react `<ObjectChart>` parse) onto the
91
- * chart schema this widget hands to the renderer.
92
- *
93
- * ## Why this is a whitelist and not a spread
94
- *
95
- * Until #3135 NONE of `chartConfig` reached the renderer: this widget read
96
- * `options` and nothing else, so an author who wrote `showLegend: false` still
97
- * got a legend and one who wrote `true` only got one because "on" is the
98
- * renderer's default. #3135 lowered that single flag and left the rest declared
99
- * and inert. objectstack#7016 lowers the rest of the keys that are actually
100
- * DELIVERED, admitting a key only when both of these hold:
101
- *
102
- * 1. **The chart block draws it end to end on this path.** `{ type: 'chart' }`
103
- * resolves to `ChartRenderer` → `AdvancedChartImpl`, which draws
104
- * `title`/`subtitle` in its ChartFrame, turns `description` into the chart
105
- * container's `role="img"` + `aria-label`, applies `height` as that
106
- * container's inline height, reads `colors` as the positional palette,
107
- * prints `showDataLabels` as a Recharts `LabelList`, draws `annotations` as
108
- * ReferenceLine/ReferenceArea and honours `interaction` as the tooltip
109
- * toggle plus `Brush`. Forwarding a key the renderer ignores would only
110
- * move declared-but-not-delivered one layer down, which is the failure this
111
- * change exists to remove.
112
- * 2. **It does not fight the dataset derivation.** `type` stays out: the
113
- * widget's own `type` already picks the family through `CHART_TYPE_MAP`,
114
- * which is the dataset path's chart-family channel.
115
- *
116
- * ## Where `xAxis` / `yAxis` / `series` go — the ruled split (#4229)
117
- *
118
- * Those three used to be refused here under the same criterion 2, on the
119
- * grounds that they are "DERIVED from the dataset selection". That belief was
120
- * **half right, and the half it got wrong silently dropped authored intent**:
121
- * a widget authoring the spec's own combo shape — `series[].type` plus
122
- * `series[].yAxis: 'left'|'right'` and two `yAxis` entries — rendered as
123
- * grouped bars on one axis, because the per-series mark and the axis binding
124
- * never left this function (#4229, measured in the DOM: 2 bars / 0 lines / 1
125
- * axis where 1 bar + 1 line + 2 axes were authored).
126
- *
127
- * The ruling: **the dataset owns DATA, the author owns PRESENTATION.**
128
- *
129
- * - **Data (derived, never forwarded)** — series MEMBERSHIP (which columns
130
- * become series, which rows, which buckets) and the column each binding
131
- * reads. Concretely: `buildChartSeries`'s `dataKey`s, `xAxisKey`, and the
132
- * spec's two binding keys `series[].name` and `ChartAxis.field`.
133
- * - **Presentation (authored, merged forward)** — everything else on those
134
- * same objects: `series[].type` (the per-series mark), `series[].yAxis`
135
- * (which axis it binds to), `label`/`color`/`stack`/`variant`/`dashArray`/
136
- * `opacity`, and the axis definitions' `title`/`format`/`min`/`max`/
137
- * `stepSize`/`showGridLines`/`position`/`logarithmic`.
138
- *
139
- * This is #2880's S2 rule — dual axes are `yAxis[].position` plus
140
- * `series[].yAxis`, and a combo assigns its axes by EXPLICIT binding first,
141
- * falling back to the per-series-type guess only where the author bound
142
- * nothing — extended from `ObjectChart` (where PR #2883 landed it) to the
143
- * dataset path, which never carried it over. {@link mergeAuthoredPresentation}
144
- * is the ONE place that merge happens; see it for the match rule and for why
145
- * membership is safe.
146
- *
147
- * `aria` is the one declared key with **no reader at all** on this path:
148
- * `AdvancedChartImpl` has no `aria` prop, and `SchemaRenderer`'s ARIA injection
149
- * reads the FLAT `ariaLabel`/`ariaDescribedBy`/`role`, never a nested `aria`
150
- * object. It is therefore left unforwarded on purpose (criterion 1) and
151
- * reported back to objectstack#5175's narrowing half rather than papered over
152
- * with a dashboard-only flattening that would also collide with the accessible
153
- * name `description` already sets.
154
- *
155
- * @param raw the widget's `chartConfig` as authored (anything, incl. absent)
156
- * @param fieldCategoryColors per-category colours resolved from the category
157
- * dimension's own select/lookup option colours, merged UNDER an explicit
158
- * author map (see the `colors` note below)
159
- * @returns only the keys that resolved, so the caller can spread it over the
160
- * derived chart schema and every undeclared key keeps the renderer's default
89
+ * The authored chart CHROME, which now lives in `@object-ui/core`'s
90
+ * `chart-presentation` beside `buildChartSeries` — the derivation it is lowered
91
+ * onto (objectui#4877).
92
+ *
93
+ * It was written here (#3135 → objectstack#7016 → #4229) and moved when the
94
+ * report renderer's embedded chart turned out to need the SAME lowering over
95
+ * the same spec keys, and a second copy of the split beside this one is
96
+ * precisely the duplication objectui#4389 filed as a defect. The doctrine — the
97
+ * two admission criteria, the data/presentation ruling, why `aria` stays
98
+ * unforwarded — travelled with the code; see that module's header and
99
+ * `chartConfigPresentation`'s docblock.
100
+ *
101
+ * Re-exported under its original name. The series/axis presentation merge
102
+ * (`mergeAuthoredPresentation`) was re-exported here too until objectui#11315:
103
+ * a dashboard widget's `chartConfig` no longer carries the `series` / `xAxis` /
104
+ * `yAxis` it read (spec 17.5.0), so this widget stopped calling it, and
105
+ * objectui#11372 then removed it from `@object-ui/core`.
161
106
  */
162
- export declare function chartConfigPresentation(raw: unknown, fieldCategoryColors?: Record<string, string> | null): Record<string, unknown>;
163
- /** Authored spec `ChartSeries` presentation, in the renderer's internal spelling. */
164
- export interface AuthoredSeriesPresentation {
165
- label?: string;
166
- /** Spec `ChartSeries.type`, narrowed — see {@link seriesPresentation}. */
167
- chartType?: 'bar' | 'line' | 'area';
168
- yAxis?: 'left' | 'right';
169
- color?: string;
170
- stack?: string;
171
- variant?: 'primary' | 'comparison';
172
- dashArray?: string;
173
- opacity?: number;
174
- }
175
- /** A derived series binding with the author's presentation merged onto it. */
176
- export type MergedChartSeries = ChartSeriesBinding & AuthoredSeriesPresentation;
107
+ export { chartConfigPresentation } from '@object-ui/core';
177
108
  /**
178
- * Merge the authored `chartConfig`'s PRESENTATION onto the series and axes the
179
- * dataset selection derived — the one place that happens (#4229).
180
- *
181
- * The match rule is **by name/key**: an authored `series[].name` is paired with
182
- * the derived binding whose `dataKey` it equals, and the pairing decides
183
- * nothing but presentation:
184
- *
185
- * - an authored entry naming a measure that is NOT in the dataset selection is
186
- * **ignored** — membership belongs to the dataset, so an author cannot add,
187
- * remove or re-point a series from `chartConfig`;
188
- * - a derived series with no authored entry keeps the family default, so every
189
- * dashboard that never wrote `chartConfig.series` renders byte-for-byte as
190
- * before;
191
- * - where both exist the **explicit binding wins** (#2880 S2), which is the
192
- * whole point: `type: 'line'` + `yAxis: 'right'` is how the spec says "this
193
- * measure is a line on the secondary axis".
194
- *
195
- * Matching on `name` only is deliberate: `name` is the spec's authorable key
196
- * for a series (`dataKey` is a declared ALIAS of it, resolved where the
197
- * metadata is parsed), so reading a second spelling here would fossilize a
198
- * dialect this renderer has no business accepting (AGENTS.md #0.1).
199
- *
200
- * @param derived the bindings `buildChartSeries` produced from the selection
201
- * @param raw the widget's `chartConfig` as authored (anything, incl. absent)
202
- * @returns the merged series, plus the presentation-only axes to spread onto
203
- * the chart schema (absent when the author declared none)
109
+ * The sub-caption a dashboard surface already resolved for this tile
110
+ * (objectui#8889). Three states, and the difference between two of them is
111
+ * load-bearing:
112
+ *
113
+ * - **omitted (`undefined`)** — nobody upstream resolved it. This component is
114
+ * rendering outside a dashboard surface (a standalone host, a preview, a
115
+ * test), so there is no dashboard `name` in existence and therefore no
116
+ * bundle key to look up. The AUTHORED limb is resolved locally, which is
117
+ * exactly what objectui#7293 landed and what keeps rendering.
118
+ * - **a string** — that is the answer; render it.
119
+ * - **`null`** — a surface DID resolve it, to nothing. Render nothing, and in
120
+ * particular do NOT fall back to the authored value: a bundle entry that
121
+ * resolves to empty is the bundle winning, and the inline arms of
122
+ * `getComponentSchema()` render nothing in that same case. Falling back here
123
+ * is how the two surfaces would start to disagree.
124
+ *
125
+ * ⛔ Never widened to "the dashboard name" or "the widget's translation node".
126
+ * Handing this component the INPUTS would put a second copy of the
127
+ * authored-vs-bundle composition inside it, and the field's own invariant — "a
128
+ * bundle entry always wins over an inline map and the two channels can never
129
+ * disagree" — needs a single decision point to be true. That point is
130
+ * `useWidgetSubCaption`; what arrives here is its answer.
204
131
  */
205
- export declare function mergeAuthoredPresentation(derived: ChartSeriesBinding[], raw: unknown): {
206
- series: MergedChartSeries[];
207
- axes: Record<string, unknown>;
208
- };
209
- export declare function DatasetWidget({ widget, dataSource }: {
132
+ export declare function DatasetWidget({ widget, dataSource, subCaption }: {
210
133
  widget: any;
211
134
  dataSource: unknown;
135
+ subCaption?: string | null;
212
136
  }): import("react").JSX.Element;
213
137
  //# sourceMappingURL=DatasetWidget.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DatasetWidget.d.ts","sourceRoot":"","sources":["../src/DatasetWidget.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAYL,uBAAuB,EAUvB,YAAY,EAEZ,KAAK,kBAAkB,EAIxB,MAAM,iBAAiB,CAAC;AAgBzB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gCAA0B,CAAC;AAExD;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,UAAU,mDAAgB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAEpC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACpC,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GACd;IACD,UAAU,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAA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,CAAA;KAAE,CAAC,CAAC;IACpD,UAAU,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC,CAsBA;AASD,8DAA8D;AAC9D,wBAAgB,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,GAAG,MAAM,CAEpF;AA6CD,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B;AAuBD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG;IACnD,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,CA4DA;AAsHD;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE;IAAE,MAAM,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,+BAg7CjI"}
@@ -24,11 +24,20 @@ export interface DrillDownDrawerProps {
24
24
  /** Optional className on the inner container. */
25
25
  className?: string;
26
26
  /**
27
- * M3: drill into an analytical `SpecReport` instead of the raw record list.
28
- * When provided the drawer body renders a `spec-report` schema via
29
- * `SchemaRenderer`. The widget's `filter` is merged in as an `$and` so the
30
- * metric's scope flows into the report. The report itself can drill
31
- * further (into a list / record) via its own row-click protocol.
27
+ * M3: drill into an analytical report instead of the raw record list.
28
+ * When the value is a dataset-bound report (ADR-0021: a `dataset`, or a
29
+ * `joined` report whose blocks bind one; see {@link isDatasetBoundReport})
30
+ * the drawer body renders a `report` node wrapping it
31
+ * (`{ type: 'report', report }`) via `SchemaRenderer` (objectui#11440; the
32
+ * retired `spec-report` alias carried the same wrapper). The widget's
33
+ * `filter` is joined to the report's own `runtimeFilter` with `$and` and
34
+ * written as the report's `runtimeFilter`, the one filter key the dataset
35
+ * renderer applies (objectui#5137, objectui#11506), so the metric's scope
36
+ * flows into the report. The report itself can drill further (into a list /
37
+ * record) via its own row-click protocol. Any other value lists the records,
38
+ * the two retired forms the authoring faces refuse by name among them: a
39
+ * `{ name }` reference (objectui#11517) and the pre-9.0 `objectName` form
40
+ * (objectui#11506).
32
41
  */
33
42
  report?: Record<string, unknown>;
34
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DrillDownDrawer.d.ts","sourceRoot":"","sources":["../src/DrillDownDrawer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC1C,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,8EAA8E;IAC9E,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoG1D,CAAC"}
1
+ {"version":3,"file":"DrillDownDrawer.d.ts","sourceRoot":"","sources":["../src/DrillDownDrawer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC1C,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,8EAA8E;IAC9E,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AA+BD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+G1D,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { I18nLabel } from '@object-ui/types';
3
- import { SchemaHostProps } from './schemaHostProps';
3
+ import { SchemaHostProps } from './schemaHostProps.js';
4
4
  /**
5
5
  * DOM PASS-THROUGH (objectui#4426) — see `MetricWidget.tsx`'s interface header
6
6
  * for the full argument; this is the same widening on the same spread, onto the
@@ -1,7 +1,32 @@
1
1
  import { default as React } from 'react';
2
2
  import { I18nLabel } from '@object-ui/types';
3
- import { MetricColorVariant } from './colorVariants';
4
- import { SchemaHostProps } from './schemaHostProps';
3
+ import { MetricColorVariant } from './colorVariants.js';
4
+ import { SchemaHostProps } from './schemaHostProps.js';
5
+ /**
6
+ * Lightweight numeric formatter for metric widgets.
7
+ *
8
+ * Honors a numeral.js-style `format` pattern:
9
+ * - `'0,0'` / `'0,0.00'` → thousands separators with explicit decimals
10
+ * - leading `$/¥/€/£` or `currency` prop → currency formatting
11
+ * - trailing `%` → percent, handed WHOLE to `formatPercent`
12
+ * (`@object-ui/fields`) at the storage the PATTERN states: numeral's `%`
13
+ * multiplies by 100, so the value is a fraction. `formatPercent` owns the
14
+ * scaling and the locale's percent convention — see the branch's own note
15
+ * (objectui#9165, objectui#11475). A host that holds the field the value was
16
+ * aggregated from renders the percent itself at that field's storage
17
+ * (`ObjectMetricWidget`), the way it renders a currency.
18
+ *
19
+ * When no format is given but the value is a finite number, defaults to
20
+ * thousands separators with no decimals — that's what users expect for
21
+ * KPI cards (`1,930,000` not `1930000`).
22
+ */
23
+ /**
24
+ * The decimal places a numeral.js-style pattern fixes (`'0,0.00'` → 2,
25
+ * `'0.0%'` → 1, `'0,0'` → 0) — the one parse this tile's formatter makes, read
26
+ * by `ObjectMetricWidget` too when it renders a percent aggregate itself, so the
27
+ * two never read one authored pattern at two widths.
28
+ */
29
+ export declare function metricPatternDecimals(format: string | undefined): number;
5
30
  /**
6
31
  * The variant vocabulary and its two class tables now live in
7
32
  * `./colorVariants` — the dataset-bound KPI (`DatasetWidget`, objectui#3359)
@@ -1 +1 @@
1
- {"version":3,"file":"MetricWidget.d.ts","sourceRoot":"","sources":["../src/MetricWidget.tsx"],"names":[],"mappings":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