@lightdash/cli 2.364.0 → 2.365.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.
@@ -39,6 +39,7 @@ const {
39
39
  pointMenu,
40
40
  underlyingData,
41
41
  drillDown,
42
+ subtotals,
42
43
  } = context;
43
44
  ```
44
45
 
@@ -73,6 +74,16 @@ const {
73
74
  - `drillDown` — host-mediated drill on a clicked data point; the fallback
74
75
  per-action dialog for hosts that predate `pointMenu`. See "Data-point
75
76
  actions" below.
77
+ - `subtotals` — aggregated rows for the levels of a declared hierarchy. Declare
78
+ `hierarchy: { field: "<input name>" }` in the schema, naming a dimension input with
79
+ `multiple: true` ordered from the top level down. `rows` stays at the most detailed
80
+ level. When `subtotals.enabled`, `subtotals.dimensions` lists the bound field ids and
81
+ `await subtotals.get({ level, parentValues })` returns `{ rows }` for one level:
82
+ `level: 0` with `parentValues: []` is the top level, `level: 1` with the raw value of
83
+ one top-level group returns that group's children. Rows come back unsorted, one per
84
+ group and one per series value when the result is pivoted. Subtotals belong to the
85
+ `rows` they were fetched for: refetch when `rows` change, handle a rejected promise,
86
+ and render from `rows` alone when `subtotals.enabled` is false.
76
87
 
77
88
  Read all of them. Pass the complete `context` to the colour helpers; they preserve model
78
89
  colours and shared dashboard assignments before falling back to `colorPalette`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "2.364.0",
3
+ "version": "2.365.0",
4
4
  "description": "Lightdash CLI tool",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,8 +22,8 @@
22
22
  "@actions/core": "1.11.1",
23
23
  "@aws-sdk/credential-providers": "3.995.0",
24
24
  "@casl/ability": "6.8.0",
25
- "@lightdash/common": "2.364.0",
26
- "@lightdash/warehouses": "2.364.0",
25
+ "@lightdash/common": "2.365.0",
26
+ "@lightdash/warehouses": "2.365.0",
27
27
  "@sidvind/better-ajv-errors": "7.0.0",
28
28
  "@types/columnify": "1.5.1",
29
29
  "ajv": "8.18.0",