@object-ui/plugin-dashboard 17.1.0 → 17.3.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 CHANGED
@@ -1,5 +1,206 @@
1
1
  # @object-ui/plugin-dashboard
2
2
 
3
+ ## 17.3.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 509104a: Fix matrix report cells showing another bucket's numbers when dimension values run together.
8
+
9
+ The cross-tab in `DatasetReportRenderer` built its bucket ids by joining dimension values with the EMPTY string, so adjacent values had no boundary at all: `"x"` + `"yz"` and `"xy"` + `"z"` were the same bucket on both axes, and the later row silently overwrote the earlier one. Its cell key then joined the two bucket ids with a plain space, while dimension values contain spaces constantly ("New York", "In Progress"), so `"New"` × `"York Q1"` and `"New York"` × `"Q1"` also met in one key. A merged bucket showed a different row's measure, the overwritten row's value was unreachable, the per-row and per-column subtotals matched the wrong header, and drill-through followed the same wrong index into another record's list — none of it with an error.
10
+
11
+ Bucket ids and cell keys are now encoded with `JSON.stringify`, which carries the boundary in its own quoting rather than in a character the data is assumed never to contain. All four lookups in the renderer (row headers, column headers, row subtotals, column subtotals) share the one encoder, so they agree by construction.
12
+
13
+ The encoders moved to `@object-ui/core` as `pivotBucketId` / `pivotCellKey` and are now shared with the dashboard `DatasetWidget`, which carried the same defect and fixed it separately: two packages each hand-rolling the same key is why one fix left the other broken. The dashboard keeps its existing exports and behaviour.
14
+
15
+ - ce7cbe5: Fix dataset pivot cells showing another row's numbers when a dimension value contains a space.
16
+
17
+ The cross-tab cell key joined the row bucket id and the column bucket id with a plain space, so two rows whose ids met at a different point of the same string produced ONE key — `"New"` × `"York Q1"` and `"New York"` × `"Q1"` both spelled `New York Q1`. The later row silently overwrote the earlier one: the cell showed a different row's measure, the overwritten row's value was unreachable, and drill-through followed the same wrong index into the wrong records. Row and cell ids are now encoded with `JSON.stringify`, which needs no assumption about characters the data will not contain.
18
+
19
+ The row-subtotal lookup builds the same row bucket id and now shares that single encoder. It previously rolled its own join, which agreed with the row headers only when a pivot had exactly one row dimension, so the Total column rendered blank for any pivot with three or more dimensions.
20
+
21
+ - Updated dependencies [18cd432]
22
+ - Updated dependencies [b7165ce]
23
+ - Updated dependencies [532cf8b]
24
+ - Updated dependencies [680080a]
25
+ - Updated dependencies [a7651e6]
26
+ - Updated dependencies [d915c47]
27
+ - Updated dependencies [b71fc92]
28
+ - Updated dependencies [65516ba]
29
+ - Updated dependencies [94c5b7c]
30
+ - Updated dependencies [ca0fa8f]
31
+ - Updated dependencies [34595eb]
32
+ - Updated dependencies [3889ffb]
33
+ - Updated dependencies [5781fb1]
34
+ - Updated dependencies [7e2406a]
35
+ - Updated dependencies [9e9e9a9]
36
+ - Updated dependencies [19b8c9b]
37
+ - Updated dependencies [56409c2]
38
+ - Updated dependencies [042e09d]
39
+ - Updated dependencies [7d08c3f]
40
+ - Updated dependencies [9cbcbf4]
41
+ - Updated dependencies [85c4c9c]
42
+ - Updated dependencies [fd54c3e]
43
+ - Updated dependencies [4eeb932]
44
+ - Updated dependencies [6fe485b]
45
+ - Updated dependencies [5c856ec]
46
+ - Updated dependencies [23018cc]
47
+ - Updated dependencies [53811d1]
48
+ - Updated dependencies [68b6a28]
49
+ - Updated dependencies [0554e88]
50
+ - Updated dependencies [d915c47]
51
+ - Updated dependencies [f44d872]
52
+ - Updated dependencies [28b2e65]
53
+ - Updated dependencies [509104a]
54
+ - Updated dependencies [825bbe3]
55
+ - Updated dependencies [6195841]
56
+ - Updated dependencies [5dd0127]
57
+ - Updated dependencies [06632e9]
58
+ - Updated dependencies [a415684]
59
+ - Updated dependencies [a4cff5b]
60
+ - Updated dependencies [175bd79]
61
+ - Updated dependencies [5af2852]
62
+ - Updated dependencies [34d9169]
63
+ - Updated dependencies [5881a2c]
64
+ - Updated dependencies [9bc3709]
65
+ - Updated dependencies [f833d3a]
66
+ - Updated dependencies [30ae33a]
67
+ - Updated dependencies [a6ec93d]
68
+ - Updated dependencies [2a9513d]
69
+ - Updated dependencies [49f7449]
70
+ - Updated dependencies [71be406]
71
+ - Updated dependencies [d22ae31]
72
+ - Updated dependencies [c7ed4c3]
73
+ - Updated dependencies [2409e1d]
74
+ - Updated dependencies [789fe3e]
75
+ - Updated dependencies [f789c3b]
76
+ - Updated dependencies [a321fa4]
77
+ - Updated dependencies [8d8094a]
78
+ - @object-ui/core@17.3.0
79
+ - @object-ui/fields@17.3.0
80
+ - @object-ui/components@17.3.0
81
+ - @object-ui/types@17.3.0
82
+ - @object-ui/i18n@17.3.0
83
+ - @object-ui/react@17.3.0
84
+
85
+ ## 17.2.0
86
+
87
+ ### Patch Changes
88
+
89
+ - d9668a7: Honor the server's declared percent scale, so a ratio of exactly 1 renders as 100.0% (#3136)
90
+
91
+ A dataset measure declared `format: '0.0%'` rendered every ratio below 1
92
+ correctly and got the single most consequential one wrong: a rate of exactly
93
+ `1` printed as **`1.0%`**. On an SLA / pass-rate dashboard that turns
94
+ "everything met the SLA" into "1% met the SLA", on both surfaces the issue
95
+ names — the KPI card and the dataset-bound table (they share `formatMeasure`).
96
+
97
+ The cause was never a bad multiplier; it was a missing fact. `formatMeasure`
98
+ scaled by magnitude — `percentDisplayValue` multiplies by 100 only strictly
99
+ inside `(-1, 1)` — because the column arrived with a `%` format string and
100
+ nothing saying what scale its numbers were on. That guess is undecidable at
101
+ exactly 1, which is both a full-compliance ratio ("100%") and one percentage
102
+ point ("1%"), and it resolved to the reading almost nobody means.
103
+
104
+ The server now answers the question instead (framework: `percentScaleOf` +
105
+ `AnalyticsResult.fields[].percentScale`, the sibling of the ADR-0053 currency
106
+ chain): a `derived: { op: 'ratio' }` measure is a `fraction` by definition, and
107
+ a measure over a `percent` field inherits that field's scale. `formatMeasure`
108
+ takes the declared scale as a fourth argument and, when present, scales by it —
109
+ `fraction` ×100, `whole` verbatim — instead of inspecting the value. Every
110
+ dataset-bound call site passes the column's `percentScale`: the dashboard
111
+ metric/table/pivot cells, the report renderer's cells, totals and KPI, and the
112
+ dataset preview.
113
+
114
+ `percentDisplayValue` is untouched and still the fallback for a column that
115
+ arrives without the annotation (an older server, or a non-dataset percent cell
116
+ in a list view), so nothing that renders correctly today changes.
117
+
118
+ - 022e4c3: Upgrade to `@objectstack/spec@17.0.0-rc.1`, stop offering the retired `wait` timeout fields (#3101), and route the newly-adopted `combo` chart type.
119
+
120
+ **Breaking for authoring, and the reason to do it now**: the `wait` panel no longer offers
121
+ `waitEventConfig.timeoutMs` or `.onTimeout`. Both are `retiredKey()` tombstones as of spec
122
+ 17.0.0-rc.1 (framework#4158), which means a value written there is **rejected at load** —
123
+ so until this lands, Studio can produce flow metadata the author's own runtime refuses.
124
+ That hazard opened the moment rc.1 published, independent of when this repo bumps.
125
+
126
+ `wait` never had a timeout: `onTimeout` had zero readers, so neither `'fail'` nor
127
+ `'continue'` ever happened, and `timeoutMs`'s only reader used it as the timer **duration**
128
+ when `timerDuration` was absent. Use **Duration** — it accepts a bare number as
129
+ milliseconds, making the old `timeoutMs: 60000` and `timerDuration: '60000'` the same wait.
130
+ Stored flows are converted by framework's D2 conversion; the designer simply stops offering
131
+ the entry. The two `zh` label overrides go with the fields.
132
+
133
+ #3101 asked for this to ride along with the bump rather than land alone, and that is
134
+ load-bearing: the sibling-block assertion is **bidirectional**, so deleting the fields
135
+ against a spec that still declares them fails in the other direction.
136
+
137
+ **`combo` is now a spec chart type** — the sole addition to `ChartTypeSchema` in rc.1 (19
138
+ members → 20). It had been a renderer-local family the chart renderer derived from the
139
+ series, so nothing classified it on the two surfaces that route a _spec_ chart type: a
140
+ spec-valid `combo` fell through to the red "Unknown component type" panel on a dashboard
141
+ and to the out-of-spec notice on a report. Both now route it
142
+ (`widgetDispatch.SERIES_CHART_TYPES`, `planReportChart`). The renderer-local derivation
143
+ stays — it is what makes an authored `type: 'combo'` render rather than merely validate.
144
+
145
+ **Retired spec exports this repo bound to**, all removed upstream in spec 17.0.0:
146
+
147
+ - `JoinStrategy` / `WindowFunction` (framework#4286 tombstoned `query.joins` and
148
+ `query.windowFunctions`: no engine or driver ever read either on the query path). They
149
+ were derived off the spec enums under objectstack#4115's "come off the spec enum, not a
150
+ restatement" rule; with no enum left, `data-protocol.ts` now restates the members locally
151
+ — verbatim from the last spec that published them — as the objectui query-AST vocabulary
152
+ they have become. The AST itself is unchanged.
153
+ - `PerformanceConfig`, retired with `dashboard.performance` (framework#3896). Nothing bound
154
+ to it — `@object-ui/react`'s `usePerformance` declares its own interface and is untouched.
155
+ The dashboard form is derived from the spec's own `dashboardForm`, so the field
156
+ disappears from the inspector for free; its test now pins the absence.
157
+
158
+ **Three inverted pins fired, and are recorded rather than resolved.** objectstack#4171's
159
+ tripwires asserted that `NavigationItem`, `FormField` and `ConditionalValidation`'s branches
160
+ still erased to `any`/`unknown` upstream — the premise that justified objectui keeping local
161
+ declarations. rc.1 types them properly, so the assertions are inverted to state the new
162
+ fact. The burn-down each one asks for — deriving those types from the spec — touches
163
+ widely-used public types and is deliberately **not** bundled into a version bump; it is
164
+ tracked in #3177. `JoinNode`'s pin is gone outright: the symbol no longer exists.
165
+
166
+ **What the bump arms.** The reconciliation ledger's `subflow` and `decision` panels
167
+ feature-detect their spec exports and had never actually run — rc.0 predates the exports
168
+ (framework#4278). They now execute and pass. The `script` panel's full bidirectional check
169
+ stays deliberately skipped: rc.1 predates framework#4343, so the retired dispatch branches
170
+ are still contract keys there, and only the "offers nothing the executor ignores" direction
171
+ is meaningful. It arms itself on the next rc.
172
+
173
+ - Updated dependencies [4ae0ac4]
174
+ - Updated dependencies [696e3c1]
175
+ - Updated dependencies [bca45cc]
176
+ - Updated dependencies [a889e31]
177
+ - Updated dependencies [09d30a4]
178
+ - Updated dependencies [4bf612c]
179
+ - Updated dependencies [335041c]
180
+ - Updated dependencies [b414983]
181
+ - Updated dependencies [256f8cc]
182
+ - Updated dependencies [d9668a7]
183
+ - Updated dependencies [4b470b9]
184
+ - Updated dependencies [785b8a5]
185
+ - Updated dependencies [cb82705]
186
+ - Updated dependencies [f572849]
187
+ - Updated dependencies [4a51e77]
188
+ - Updated dependencies [f6e8d78]
189
+ - Updated dependencies [ea96284]
190
+ - Updated dependencies [d3584c6]
191
+ - Updated dependencies [a8ad6c0]
192
+ - Updated dependencies [444457c]
193
+ - Updated dependencies [850033c]
194
+ - Updated dependencies [022e4c3]
195
+ - Updated dependencies [009e25d]
196
+ - Updated dependencies [726b89c]
197
+ - @object-ui/types@17.2.0
198
+ - @object-ui/components@17.2.0
199
+ - @object-ui/core@17.2.0
200
+ - @object-ui/react@17.2.0
201
+ - @object-ui/i18n@17.2.0
202
+ - @object-ui/fields@17.2.0
203
+
3
204
  ## 17.1.0
4
205
 
5
206
  ### Patch Changes
@@ -1,17 +1,29 @@
1
- import { buildDatasetDrillFilter } from '@object-ui/core';
1
+ import { buildDatasetDrillFilter, pivotBucketId as pivotRowId, 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`)
5
5
  * so the dashboard and the report renderer drill identically.
6
6
  */
7
7
  export declare const buildDrillFilter: typeof buildDatasetDrillFilter;
8
+ /**
9
+ * The pivot key encoders, re-exported for back-compat; the implementations now
10
+ * live in `@object-ui/core` (`pivotBucketId` / `pivotCellKey`) so this widget
11
+ * and the report renderer's cross-tab key their buckets identically. See that
12
+ * module for why both are `JSON.stringify` rather than a delimiter character,
13
+ * and for the null-placeholder residual tracked in objectstack#5666.
14
+ *
15
+ * Every consumer of a row id — the cell index below AND the row-total lookup in
16
+ * the cross-tab renderer — must build its key with these; a second, hand-rolled
17
+ * encoding of the same id is what made the old bug invisible.
18
+ */
19
+ export { pivotRowId, pivotCellKey };
8
20
  /**
9
21
  * Pivot flat dataset rows into a cross-tab: `rowDims` go DOWN, `colDim` spreads
10
22
  * ACROSS. Returns ordered row/column headers (display labels from the rows) and
11
- * a map from a `${rowId} ${colId}` cell key to the FLAT row index holding
12
- * that combination's measure values. No re-aggregation — the dataset already
13
- * grouped by every dimension, so each cell maps to exactly one row (the index
14
- * is also what drill-through uses to read `drillRawRows`).
23
+ * a map from a `pivotCellKey(rowId, colId)` cell key to the FLAT row index
24
+ * holding that combination's measure values. No re-aggregation — the dataset
25
+ * already grouped by every dimension, so each cell maps to exactly one row (the
26
+ * index is also what drill-through uses to read `drillRawRows`).
15
27
  */
16
28
  export declare function buildPivot(rows: Array<Record<string, unknown>>, rowDims: string[], colDim: string): {
17
29
  rowHeaders: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"DatasetWidget.d.ts","sourceRoot":"","sources":["../src/DatasetWidget.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAUL,uBAAuB,EAGxB,MAAM,iBAAiB,CAAC;AAezB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gCAA0B,CAAC;AAExD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACpC,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,EAAE,MAAM,GACb;IACD,UAAU,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,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,CAcA;AASD,8DAA8D;AAC9D,wBAAgB,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,GAAG,MAAM,CAEpF;AAmDD,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;IAAE,MAAM,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,OAAO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