@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.
- package/CHANGELOG.md +5042 -0
- package/README.md +544 -74
- package/dist/DashboardConfigPanel.d.ts +3 -0
- package/dist/DashboardConfigPanel.d.ts.map +1 -1
- package/dist/DashboardFilterBar.d.ts.map +1 -1
- package/dist/DashboardGridLayout.d.ts +3 -2
- package/dist/DashboardGridLayout.d.ts.map +1 -1
- package/dist/DashboardRenderer.d.ts +32 -2
- package/dist/DashboardRenderer.d.ts.map +1 -1
- package/dist/DashboardWithConfig.d.ts +1 -1
- package/dist/DashboardWithConfig.d.ts.map +1 -1
- package/dist/DatasetWidget.d.ts +43 -119
- package/dist/DatasetWidget.d.ts.map +1 -1
- package/dist/DrillDownDrawer.d.ts +14 -5
- package/dist/DrillDownDrawer.d.ts.map +1 -1
- package/dist/MetricCard.d.ts +1 -1
- package/dist/MetricWidget.d.ts +27 -2
- package/dist/MetricWidget.d.ts.map +1 -1
- package/dist/ObjectDataTable.d.ts +473 -19
- package/dist/ObjectDataTable.d.ts.map +1 -1
- package/dist/ObjectMetricWidget.d.ts +65 -27
- package/dist/ObjectMetricWidget.d.ts.map +1 -1
- package/dist/ObjectPivotTable.d.ts +46 -7
- package/dist/ObjectPivotTable.d.ts.map +1 -1
- package/dist/PivotTable.d.ts +20 -3
- package/dist/PivotTable.d.ts.map +1 -1
- package/dist/RecordDetailDrawer.d.ts +8 -0
- package/dist/RecordDetailDrawer.d.ts.map +1 -1
- package/dist/WidgetConfigPanel.d.ts +29 -1
- package/dist/WidgetConfigPanel.d.ts.map +1 -1
- package/dist/WidgetEmptyState.d.ts +27 -0
- package/dist/WidgetEmptyState.d.ts.map +1 -0
- package/dist/domPassthroughPins.d.ts.map +1 -1
- package/dist/index.d.ts +30 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2306 -1858
- package/dist/index.umd.cjs +2 -2
- package/dist/legacyRetiredWidget.d.ts +5 -3
- package/dist/legacyRetiredWidget.d.ts.map +1 -1
- package/dist/measureRefusal.d.ts +50 -0
- package/dist/measureRefusal.d.ts.map +1 -0
- package/dist/recordFields.d.ts +159 -9
- package/dist/recordFields.d.ts.map +1 -1
- package/dist/retired-node-types.d.ts +29 -0
- package/dist/retired-node-types.d.ts.map +1 -0
- package/dist/useConfigPanelTranslation.d.ts +35 -0
- package/dist/useConfigPanelTranslation.d.ts.map +1 -0
- package/dist/useDashboardAutoRefresh.d.ts +47 -0
- package/dist/useDashboardAutoRefresh.d.ts.map +1 -0
- package/dist/utils.d.ts +36 -7
- package/dist/utils.d.ts.map +1 -1
- package/dist/widgetDispatch.d.ts +144 -18
- package/dist/widgetDispatch.d.ts.map +1 -1
- package/dist/widgetSubCaption.d.ts +40 -0
- package/dist/widgetSubCaption.d.ts.map +1 -0
- 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;
|
|
1
|
+
{"version":3,"file":"DashboardConfigPanel.d.ts","sourceRoot":"","sources":["../src/DashboardConfigPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAC;AA2CrC,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,oBAAoB,GAAG,iBAAiB,CA0F/E;AAMD,MAAM,WAAW,yBAAyB;IACxC,gCAAgC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,oBAAoB;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,iCAAiC;IACjC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC9C,oCAAoC;IACpC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,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,
|
|
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
|
-
*
|
|
24
|
-
*
|
|
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,
|
|
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,EAAE,wBAAwB,EAAuC,MAAM,kBAAkB,CAAC;AA2CtG,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,wBAAwB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAC/C;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC5D,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,iFAAiF;AACjF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,wBAAwB,EAChC,MAAM,EAAE,SAAS,EAAE,GAClB,wBAAwB,CAa1B;AAiBD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAqlBlE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DashboardComponentSchema
|
|
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:
|
|
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,
|
|
1
|
+
{"version":3,"file":"DashboardRenderer.d.ts","sourceRoot":"","sources":["../src/DashboardRenderer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAc,wBAAwB,EAAwD,MAAM,kBAAkB,CAAC;AAGnI,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAanH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AA+K5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;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ist/DatasetWidget.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildDatasetDrillFilter, pivotCellKey
|
|
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
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
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
|
|
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
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* -
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
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
|
|
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":"
|
|
1
|
+
{"version":3,"file":"DatasetWidget.d.ts","sourceRoot":"","sources":["../src/DatasetWidget.tsx"],"names":[],"mappings":"AA2CA,OAAO,EAYL,uBAAuB,EAWvB,YAAY,EAoBb,MAAM,iBAAiB,CAAC;AAuBzB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gCAA0B,CAAC;AAExD;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,UAAU,mDAAgB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAE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AC;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
|
|
28
|
-
* When
|
|
29
|
-
* `
|
|
30
|
-
*
|
|
31
|
-
*
|
|
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,4BA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,EAAE,OAAO,CAAC,CAAC;CAClC;AA+BD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA+G1D,CAAC"}
|
package/dist/MetricCard.d.ts
CHANGED
|
@@ -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
|
package/dist/MetricWidget.d.ts
CHANGED
|
@@ -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":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MetricWidget.d.ts","sourceRoot":"","sources":["../src/MetricWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAiBvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAA8C,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA2CzD;;;;;;;;;;;;;;;;;GAiBG;AACH;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAGxE;AA+GD;;;;;;GAMG;AACH,YAAY,EAAE,kBAAkB,EAAE,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cA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