@object-ui/plugin-dashboard 17.2.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,87 @@
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
+
3
85
  ## 17.2.0
4
86
 
5
87
  ### 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,CAAA;CAAE,+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