@astrato-io/visualizations 0.6.5 → 0.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 (174) hide show
  1. package/README.md +32 -2
  2. package/THIRD_PARTY_NOTICES.md +2 -229
  3. package/VISUALIZATION_DEFINITIONS.md +68 -114
  4. package/chunks/Button-BrGKp9Nm.js +110 -0
  5. package/chunks/DefaultPropsProvider-BsfB7QTn.js +257 -0
  6. package/chunks/FieldTypeIcon-Drs6hSJF.js +22 -0
  7. package/chunks/{LinearProgress-B1FeWaen.js → LinearProgress-VtfFx2vJ.js} +55 -55
  8. package/chunks/MenuOption-ByRqhRdX.js +3934 -0
  9. package/chunks/Title-CO5dP1ma.js +1691 -0
  10. package/chunks/ToggleButton-KOBAimC1.js +112 -0
  11. package/chunks/{app-filter-bar.compiler-BGJ7HAbr.js → app-filter-bar.compiler-TwVTeoj5.js} +10 -10
  12. package/chunks/{bar.compiler-CT0ZbQKc.js → bar.compiler-DuQg8EUb.js} +84 -84
  13. package/chunks/builder-DEDvNq1k.js +201 -0
  14. package/chunks/{color-settings-ZIvgNTq1.js → color-rules-CN7TcGrC.js} +2 -6
  15. package/chunks/color-settings-3VRlf_Vw.js +6 -0
  16. package/chunks/colorManipulator-D8Pjy1pf.js +45 -0
  17. package/chunks/coloring-CncX_JRX.js +278 -0
  18. package/chunks/{definitions-D3OVqmXl.js → definitions-BPJQTx16.js} +490 -382
  19. package/chunks/{escobar-eDjtGpkC.js → escobar-DRhRMYRE.js} +6067 -4742
  20. package/chunks/event-bus-CrLB-Y8z.js +3 -0
  21. package/chunks/extend-preset-CUFNpmPe.js +4398 -0
  22. package/chunks/{filter.compiler-DBsyRBJt.js → filter.compiler-w27dlv0C.js} +12 -12
  23. package/chunks/{filtering-tqjAyJH5.js → filtering-cc7WqWpg.js} +391 -310
  24. package/chunks/{handlers-VTBfIZYZ.js → handlers-TOT-7INo.js} +3241 -3442
  25. package/chunks/icon-picker-styles-CoJmwTRi.js +2246 -0
  26. package/chunks/isEqual-B8loyPsC.js +12 -0
  27. package/chunks/label-format-type-weq1XfcX.js +8 -0
  28. package/chunks/{line.compiler-CzdM5Ld0.js → line.compiler-Ct1WhN2p.js} +27 -27
  29. package/chunks/logger-DpQtYQnX.js +1163 -0
  30. package/chunks/lookup-BWllin0q.js +36 -0
  31. package/chunks/{metadata-BGElBy5Z.js → metadata-WABZrt7Y.js} +1 -1
  32. package/chunks/{number.compiler-G-R7y16P.js → number.compiler-D8TPly-4.js} +13 -13
  33. package/chunks/{operations-CTNUX6Sy.js → operations-Dh4v1Ovt.js} +9314 -9283
  34. package/chunks/{range-CiwTbMig.js → range-Bi-7zT0k.js} +2 -2
  35. package/chunks/registry-KervaxqJ.js +31 -0
  36. package/chunks/render-wrappers-OEmtaM8g.js +2 -0
  37. package/chunks/{registry-CsQQzukD.js → requirements-PAoRaJyb.js} +304 -336
  38. package/chunks/responsive.styles-DSiOGD7u.js +82 -0
  39. package/chunks/{shared-CBvcC5YV.js → shared-Bn4N5QcZ.js} +424 -424
  40. package/chunks/src-77e3mC7i.js +391 -0
  41. package/chunks/standalone-B55oyW6c.js +689 -0
  42. package/chunks/{standalone-C3gg736V.js → standalone-BDhPQtzQ.js} +375 -341
  43. package/chunks/{standalone-BMIbT1b2.js → standalone-BGkmozIb.js} +992 -837
  44. package/chunks/standalone-BMTCb10X.js +179 -0
  45. package/chunks/standalone-BXKRE_Se.js +468 -0
  46. package/chunks/standalone-Bes8srx1.js +354 -0
  47. package/chunks/standalone-BjZp0QMe.js +2 -0
  48. package/chunks/{standalone-JuLF-OoH.js → standalone-BlMIwpEe.js} +634 -519
  49. package/chunks/{standalone-C_rYnZ0N.js → standalone-C8ZAEutO.js} +43 -42
  50. package/chunks/standalone-C8qAelL4.js +2 -0
  51. package/chunks/standalone-CJvIXsQE.js +743 -0
  52. package/chunks/standalone-CLmGb7nn2.js +355 -0
  53. package/chunks/standalone-CM5XcAN5.js +52327 -0
  54. package/chunks/standalone-CXNP6-xD.js +420 -0
  55. package/chunks/{standalone-vzBY6q0I2.js → standalone-D5Q5ngsD.js} +57 -55
  56. package/chunks/standalone-DLlyRIE6.js +287 -0
  57. package/chunks/standalone-DMcI1afI.js +396 -0
  58. package/chunks/{standalone-DC-aUgXC.js → standalone-DN4S1MjT.js} +1111 -1092
  59. package/chunks/standalone-DT0wKji7.js +6 -0
  60. package/chunks/{standalone-0M4HlmDW2.js → standalone-DVTJwsTY.js} +1109 -1035
  61. package/chunks/standalone-DW6NT205.js +518 -0
  62. package/chunks/standalone-DYQIQH4c.js +2095 -0
  63. package/chunks/standalone-D__XCp-h.js +1003 -0
  64. package/chunks/standalone-XTgSsTAa.js +354 -0
  65. package/chunks/{standalone-v1oxfU20.js → standalone-XuGksArp.js} +20 -20
  66. package/chunks/{standalone-BtSHCp2U2.js → standalone-we5D5MIn.js} +173 -168
  67. package/chunks/{table.compiler-tb914oj3.js → table.compiler-DMeeHxb6.js} +29 -29
  68. package/chunks/useFieldName-Cjn9KCVp.js +7 -0
  69. package/chunks/useSlotProps-DLbQp4lc.js +166 -0
  70. package/chunks/{utils-Bg7K-t6K.js → utils-vdmi_2PK.js} +6271 -7804
  71. package/chunks/{view-Bn83C8d9.js → view-BuwQugKb.js} +2717 -3504
  72. package/chunks/{isEqual-BDxAhUo8.js → visualization-filters-Cc4KU-l-.js} +1887 -1946
  73. package/chunks/web-components-DqClFkgO.js +1185 -0
  74. package/chunks/with-html-element-D0uY2zjI.js +7328 -0
  75. package/definitions.js +2 -2
  76. package/docs/operations/astrato-app-filter-bar.md +1 -1
  77. package/docs/operations/bar.md +31 -14
  78. package/docs/operations/combo.md +1 -1
  79. package/docs/operations/date-picker.md +3 -3
  80. package/docs/operations/distribution-gauge.md +13 -13
  81. package/docs/operations/dot.md +13 -13
  82. package/docs/operations/filter.md +1 -1
  83. package/docs/operations/gauge.md +13 -13
  84. package/docs/operations/heatMap.md +13 -13
  85. package/docs/operations/histogram.md +1 -1
  86. package/docs/operations/iframe.md +1 -1
  87. package/docs/operations/image.md +1 -1
  88. package/docs/operations/index.md +3 -3
  89. package/docs/operations/line.md +7 -7
  90. package/docs/operations/number.md +1 -1
  91. package/docs/operations/pie.md +13 -13
  92. package/docs/operations/radar.md +7 -7
  93. package/docs/operations/sankey.md +13 -13
  94. package/docs/operations/scatter.md +13 -13
  95. package/docs/operations/shape.md +1 -1
  96. package/docs/operations/simpleTextObject.md +1 -1
  97. package/docs/operations/slider.md +1 -1
  98. package/docs/operations/table.md +18 -1
  99. package/docs/operations/tree.md +51 -37
  100. package/docs/operations/treemap.md +63 -49
  101. package/docs/operations/waterfall.md +1 -1
  102. package/docs/operations/word-cloud.md +13 -13
  103. package/getters.js +7 -7
  104. package/index.js +3 -1183
  105. package/metadata.js +18 -18
  106. package/operations.js +13 -13
  107. package/package.json +106 -55
  108. package/render.js +10 -0
  109. package/src/charts/bar.d.ts +1 -0
  110. package/src/charts/combo.d.ts +1 -0
  111. package/src/charts/dot.d.ts +1 -0
  112. package/src/charts/gauge-distribution.d.ts +1 -0
  113. package/src/charts/gauge.d.ts +1 -0
  114. package/src/charts/heat-map.d.ts +1 -0
  115. package/src/charts/histogram.d.ts +1 -0
  116. package/src/charts/line.d.ts +1 -0
  117. package/src/charts/pie.d.ts +1 -0
  118. package/src/charts/radar.d.ts +1 -0
  119. package/src/charts/sankey.d.ts +1 -0
  120. package/src/charts/scatter.d.ts +1 -0
  121. package/src/charts/table.d.ts +1 -0
  122. package/src/charts/tree.d.ts +1 -0
  123. package/src/charts/treemap.d.ts +1 -0
  124. package/src/charts/waterfall.d.ts +1 -0
  125. package/src/charts/word-cloud.d.ts +1 -0
  126. package/src/definitions/index.d.ts +1 -1
  127. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +53 -30
  128. package/src/definitions/model/definitions/index.d.ts +1 -1
  129. package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
  130. package/src/definitions/model/definitions/schemas/object.schema.d.ts +2 -2
  131. package/src/definitions/model/definitions/types/compilation.types.d.ts +10 -0
  132. package/src/definitions/model/definitions/types/index.d.ts +1 -1
  133. package/src/getters/index.d.ts +3 -3
  134. package/src/index.d.ts +1 -1
  135. package/src/objects/app-filter-bar.d.ts +1 -0
  136. package/src/objects/date-picker.d.ts +1 -0
  137. package/src/objects/filter.d.ts +1 -0
  138. package/src/objects/iframe.d.ts +1 -0
  139. package/src/objects/image.d.ts +1 -0
  140. package/src/objects/number.d.ts +1 -0
  141. package/src/objects/shape.d.ts +1 -0
  142. package/src/objects/slider.d.ts +1 -0
  143. package/src/objects/text.d.ts +1 -0
  144. package/src/operations/index.d.ts +3 -3
  145. package/src/registry/create-visualization-registry.d.ts +5 -0
  146. package/src/render/index.d.ts +34 -0
  147. package/src/runtime/index.d.ts +2 -2
  148. package/src/types.d.ts +9 -4
  149. package/src/web-components/index.d.ts +3 -3
  150. package/chunks/ClickAwayListener-BbeNMAvj.js +0 -52
  151. package/chunks/builder-B6dWSIdD.js +0 -12289
  152. package/chunks/coloring-B1XAfg6b.js +0 -664
  153. package/chunks/events-WZut5Ow6.js +0 -4
  154. package/chunks/grouping-type-On4s9Thj.js +0 -3
  155. package/chunks/requirements-DYjZCFyf.js +0 -6
  156. package/chunks/standalone-0ashe9w1.js +0 -411
  157. package/chunks/standalone-B7jax8wa.js +0 -339
  158. package/chunks/standalone-BK0VYU-l.js +0 -463
  159. package/chunks/standalone-BZV5vOwA.js +0 -6
  160. package/chunks/standalone-BhDrWj4p.js +0 -1980
  161. package/chunks/standalone-BvaKdky9.js +0 -344
  162. package/chunks/standalone-BwtM31-f.js +0 -2
  163. package/chunks/standalone-CC1VUjO32.js +0 -299
  164. package/chunks/standalone-CoLrAxRV.js +0 -13198
  165. package/chunks/standalone-DCtRoTWg.js +0 -675
  166. package/chunks/standalone-DUDFTBqL.js +0 -833
  167. package/chunks/standalone-DhZkX9Td.js +0 -2
  168. package/chunks/standalone-DtLElfuM.js +0 -512
  169. package/chunks/standalone-G9Q4Uczu.js +0 -726
  170. package/chunks/standalone-_DeX21JJ.js +0 -383
  171. package/chunks/standalone-gFhKZh8m.js +0 -179
  172. package/chunks/standalone-tDNy-SFH.js +0 -281
  173. package/chunks/ui-DQWtv2iM.js +0 -63551
  174. package/chunks/useFieldName-BvdcoJRl.js +0 -7
@@ -0,0 +1,112 @@
1
+ import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { Bt as t, Ei as n, Vt as r, it as i, ln as a, ri as o, un as s } from "./utils-vdmi_2PK.js";
3
+ import { $t as c } from "./escobar-DRhRMYRE.js";
4
+ import { c as l, d as u, l as d, n as f, r as p, t as m, u as h } from "./DefaultPropsProvider-BsfB7QTn.js";
5
+ import { t as g } from "./colorManipulator-D8Pjy1pf.js";
6
+ var _ = /* @__PURE__ */ e(n());
7
+ s(), r();
8
+ function v(e) {
9
+ return h("MuiToggleButton", e);
10
+ }
11
+ var y = d("MuiToggleButton", [
12
+ "root",
13
+ "disabled",
14
+ "selected",
15
+ "standard",
16
+ "primary",
17
+ "secondary",
18
+ "sizeSmall",
19
+ "sizeMedium",
20
+ "sizeLarge",
21
+ "fullWidth"
22
+ ]), b = /*#__PURE__*/ _.createContext({}), x = /*#__PURE__*/ _.createContext(void 0);
23
+ function S(e, t) {
24
+ return t === void 0 || e === void 0 ? !1 : Array.isArray(t) ? t.indexOf(e) >= 0 : e === t;
25
+ }
26
+ var C = o(), w = ["value"], T = [
27
+ "children",
28
+ "className",
29
+ "color",
30
+ "disabled",
31
+ "disableFocusRipple",
32
+ "fullWidth",
33
+ "onChange",
34
+ "onClick",
35
+ "selected",
36
+ "size",
37
+ "value"
38
+ ], E = (e) => {
39
+ let { classes: t, fullWidth: n, selected: r, disabled: i, size: a, color: o } = e;
40
+ return l({ root: [
41
+ "root",
42
+ r && "selected",
43
+ i && "disabled",
44
+ n && "fullWidth",
45
+ `size${f(a)}`,
46
+ o
47
+ ] }, v, t);
48
+ }, D = p(c, {
49
+ name: "MuiToggleButton",
50
+ slot: "Root",
51
+ overridesResolver: (e, t) => {
52
+ let { ownerState: n } = e;
53
+ return [t.root, t[`size${f(n.size)}`]];
54
+ }
55
+ })(({ theme: e, ownerState: t }) => {
56
+ let n = t.color === "standard" ? e.palette.text.primary : e.palette[t.color].main, r;
57
+ return e.vars && (n = t.color === "standard" ? e.vars.palette.text.primary : e.vars.palette[t.color].main, r = t.color === "standard" ? e.vars.palette.text.primaryChannel : e.vars.palette[t.color].mainChannel), a({}, e.typography.button, {
58
+ borderRadius: (e.vars || e).shape.borderRadius,
59
+ padding: 11,
60
+ border: `1px solid ${(e.vars || e).palette.divider}`,
61
+ color: (e.vars || e).palette.action.active
62
+ }, t.fullWidth && { width: "100%" }, {
63
+ [`&.${y.disabled}`]: {
64
+ color: (e.vars || e).palette.action.disabled,
65
+ border: `1px solid ${(e.vars || e).palette.action.disabledBackground}`
66
+ },
67
+ "&:hover": {
68
+ textDecoration: "none",
69
+ backgroundColor: e.vars ? `rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})` : g(e.palette.text.primary, e.palette.action.hoverOpacity),
70
+ "@media (hover: none)": { backgroundColor: "transparent" }
71
+ },
72
+ [`&.${y.selected}`]: {
73
+ color: n,
74
+ backgroundColor: e.vars ? `rgba(${r} / ${e.vars.palette.action.selectedOpacity})` : g(n, e.palette.action.selectedOpacity),
75
+ "&:hover": {
76
+ backgroundColor: e.vars ? `rgba(${r} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : g(n, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
77
+ "@media (hover: none)": { backgroundColor: e.vars ? `rgba(${r} / ${e.vars.palette.action.selectedOpacity})` : g(n, e.palette.action.selectedOpacity) }
78
+ }
79
+ }
80
+ }, t.size === "small" && {
81
+ padding: 7,
82
+ fontSize: e.typography.pxToRem(13)
83
+ }, t.size === "large" && {
84
+ padding: 15,
85
+ fontSize: e.typography.pxToRem(15)
86
+ });
87
+ }), O = /*#__PURE__*/ _.forwardRef(function(e, n) {
88
+ let r = _.useContext(b), { value: o } = r, s = t(r, w), c = _.useContext(x), l = m({
89
+ props: i(a({}, s, { selected: S(e.value, o) }), e),
90
+ name: "MuiToggleButton"
91
+ }), { children: d, className: f, color: p = "standard", disabled: h = !1, disableFocusRipple: g = !1, fullWidth: v = !1, onChange: y, onClick: O, selected: k, size: A = "medium", value: j } = l, M = t(l, T), N = a({}, l, {
92
+ color: p,
93
+ disabled: h,
94
+ disableFocusRipple: g,
95
+ fullWidth: v,
96
+ size: A
97
+ }), P = E(N), F = (e) => {
98
+ O && (O(e, j), e.defaultPrevented) || y && y(e, j);
99
+ }, I = c || "";
100
+ return /*#__PURE__*/ (0, C.jsx)(D, a({
101
+ className: u(s.className, P.root, f, I),
102
+ disabled: h,
103
+ focusRipple: !g,
104
+ ref: n,
105
+ onClick: F,
106
+ onChange: y,
107
+ value: j,
108
+ ownerState: N,
109
+ "aria-pressed": k
110
+ }, M, { children: d }));
111
+ });
112
+ export { y as i, x as n, b as r, O as t };
@@ -1,6 +1,6 @@
1
- import { d as e, g as t, h as n, ot as r, u as i, v as a, w as o } from "./shared-CBvcC5YV.js";
2
- import { Gf as s, bd as c } from "./handlers-VTBfIZYZ.js";
3
- import { m as l } from "./operations-CTNUX6Sy.js";
1
+ import { T as e, d as t, g as n, h as r, st as i, u as a, v as o } from "./shared-Bn4N5QcZ.js";
2
+ import { Bf as s, gd as c } from "./handlers-TOT-7INo.js";
3
+ import { m as l } from "./operations-Dh4v1Ovt.js";
4
4
  var u = async (u) => {
5
5
  let d = c(u);
6
6
  if (d) return {
@@ -11,19 +11,19 @@ var u = async (u) => {
11
11
  }],
12
12
  success: !1
13
13
  };
14
- let f = r.safeParse(u.definition);
14
+ let f = i.safeParse(u.definition);
15
15
  if (!f.success) return {
16
- issues: o(f.error, u.definition),
16
+ issues: e(f.error, u.definition),
17
17
  success: !1
18
18
  };
19
19
  let p = s.safeParse(u.baseVSpec);
20
20
  if (!p.success) return {
21
- issues: [e("invalid_structure", ["baseVSpec"], "Base app filter bar vSpec is invalid.")],
21
+ issues: [t("invalid_structure", ["baseVSpec"], "Base app filter bar vSpec is invalid.")],
22
22
  success: !1
23
23
  };
24
24
  let m = p.data;
25
- if (!a(m, [])) return {
26
- issues: [e("non_fresh_base_vspec", ["baseVSpec"], "App filter bar definitions require a fresh base vSpec.")],
25
+ if (!o(m, [])) return {
26
+ issues: [t("non_fresh_base_vspec", ["baseVSpec"], "App filter bar definitions require a fresh base vSpec.")],
27
27
  success: !1
28
28
  };
29
29
  let h = f.data.settings ?? {}, g = [
@@ -55,10 +55,10 @@ var u = async (u) => {
55
55
  name: l.SET_SELECTABLE_FIELD_KEYS,
56
56
  payload: h.selectableFieldKeys
57
57
  }]
58
- ], _ = await n(i(u, m), g, ["settings"]);
58
+ ], _ = await r(a(u, m), g, ["settings"]);
59
59
  return "issue" in _ ? {
60
60
  issues: [_.issue],
61
61
  success: !1
62
- } : t(_.state, s);
62
+ } : n(_.state, s);
63
63
  };
64
64
  export { u as compileAppFilterBarVisualizationDefinition };
@@ -1,7 +1,7 @@
1
- import { To as e, a as t } from "./isEqual-BDxAhUo8.js";
2
- import { E as n, M as r, O as i, S as a, T as o, _ as s, b as c, c as l, d as u, f as d, h as f, it as p, k as m, l as h, m as g, n as _, w as v } from "./shared-CBvcC5YV.js";
3
- import { bd as y, jf as b } from "./handlers-VTBfIZYZ.js";
4
- import { _ as x, b as S, t as C, u as w, v as T, w as E } from "./operations-CTNUX6Sy.js";
1
+ import { Ua as e, r as t } from "./visualization-filters-Cc4KU-l-.js";
2
+ import { A as n, D as r, E as i, N as a, S as o, T as s, _ as c, at as l, b as u, c as d, d as f, f as p, h as m, k as h, l as g, m as _, n as v } from "./shared-Bn4N5QcZ.js";
3
+ import { Ef as y, gd as b } from "./handlers-TOT-7INo.js";
4
+ import { _ as x, b as S, t as C, u as w, v as T, w as E } from "./operations-Dh4v1Ovt.js";
5
5
  t();
6
6
  var D = (e) => {
7
7
  let t = [...e.data.dimensions.map((e, t) => ({
@@ -20,26 +20,26 @@ var D = (e) => {
20
20
  t,
21
21
  "ref"
22
22
  ]
23
- }))], n = t.map(({ item: e }) => e.ref), r = new Set(n), i = /* @__PURE__ */ new Set(), o = [];
23
+ }))], n = t.map(({ item: e }) => e.ref), r = new Set(n), i = /* @__PURE__ */ new Set(), a = [];
24
24
  t.forEach(({ item: e, path: t }) => {
25
- i.has(e.ref) && o.push(u("duplicate_alias", t, `Reference "${e.ref}" is duplicated.`)), i.add(e.ref);
25
+ i.has(e.ref) && a.push(f("duplicate_alias", t, `Reference "${e.ref}" is duplicated.`)), i.add(e.ref);
26
26
  }), e.sorting?.forEach((e, t) => {
27
- r.has(e.by) || o.push(u("unknown_alias", [
27
+ r.has(e.by) || a.push(f("unknown_alias", [
28
28
  "sorting",
29
29
  t,
30
30
  "by"
31
31
  ], `Reference "${e.by}" does not exist.`, { allowedValues: n }));
32
- }), o.push(...a(e.presentation?.coloring, e.data.dimensions.map((e) => e.ref), e.data.measures.map((e) => e.ref)));
32
+ }), a.push(...o(e.presentation?.coloring, e.data.dimensions.map((e) => e.ref), e.data.measures.map((e) => e.ref)));
33
33
  let s = e.limiting?.topN?.by;
34
- return s && !e.data.measures.some((e) => e.ref === s) && o.push(u("unknown_alias", [
34
+ return s && !e.data.measures.some((e) => e.ref === s) && a.push(f("unknown_alias", [
35
35
  "limiting",
36
36
  "topN",
37
37
  "by"
38
- ], `Measure reference "${s}" does not exist.`, { allowedValues: e.data.measures.map((e) => e.ref) })), o;
38
+ ], `Measure reference "${s}" does not exist.`, { allowedValues: e.data.measures.map((e) => e.ref) })), a;
39
39
  }, O = (e) => {
40
- if (e.type !== "bar") return u("unsupported_visualization", ["baseVSpec", "type"], `Definition type "bar" cannot compile against base vSpec type "${e.type}".`);
40
+ if (e.type !== "bar") return f("unsupported_visualization", ["baseVSpec", "type"], `Definition type "bar" cannot compile against base vSpec type "${e.type}".`);
41
41
  let t = e;
42
- return t.dimensions.length > 0 || t.measures.length > 0 || (t.supportingMeasures?.length ?? 0) > 0 || Object.keys(t.referencedData).length > 0 ? u("non_fresh_base_vspec", ["baseVSpec"], "Bar visualization definitions can only compile against a fresh base vSpec.") : void 0;
42
+ return t.dimensions.length > 0 || t.measures.length > 0 || (t.supportingMeasures?.length ?? 0) > 0 || Object.keys(t.referencedData).length > 0 ? f("non_fresh_base_vspec", ["baseVSpec"], "Bar visualization definitions can only compile against a fresh base vSpec.") : void 0;
43
43
  }, k = {
44
44
  formatString: "setDimensionFormatString",
45
45
  formatType: "setDimensionFormatType"
@@ -64,59 +64,59 @@ var D = (e) => {
64
64
  kind: t
65
65
  };
66
66
  }, N = async (e, t) => {
67
- let r = e;
68
- for (let [e, n] of t.data.dimensions.entries()) {
69
- let t = `dimension:${n.ref}`, i = await C(r.vSpec, r.availableFields, [{
67
+ let n = e;
68
+ for (let [e, r] of t.data.dimensions.entries()) {
69
+ let t = `dimension:${r.ref}`, i = await C(n.vSpec, n.availableFields, [{
70
70
  id: t,
71
71
  name: w.ADD_DIMENSION,
72
- payload: { key: n.fieldKey }
73
- }], r.input.variables ?? [], [], r.input.theme), a = j(i.results), o = M(i.results[t], "dimension");
72
+ payload: { key: r.fieldKey }
73
+ }], n.input.variables ?? [], [], n.input.theme), a = j(i.results), o = M(i.results[t], "dimension");
74
74
  if (a || !o) return {
75
- issue: u("operation_failed", [
75
+ issue: f("operation_failed", [
76
76
  "data",
77
77
  "dimensions",
78
78
  e
79
79
  ], a?.result.error ?? "Dimension operation did not return the created data-item identity."),
80
80
  success: !1
81
81
  };
82
- r = {
83
- ...r,
82
+ n = {
83
+ ...n,
84
84
  resolvedRefs: {
85
- ...r.resolvedRefs,
86
- [n.ref]: o
85
+ ...n.resolvedRefs,
86
+ [r.ref]: o
87
87
  },
88
88
  vSpec: i.vSpec
89
89
  };
90
90
  }
91
- for (let [i, a] of t.data.measures.entries()) {
92
- let t = n(a, e.input.availableFields), s = `measure:${a.ref}`, c = await C(r.vSpec, r.availableFields, [{
91
+ for (let [a, o] of t.data.measures.entries()) {
92
+ let t = r(o, e.input.availableFields), s = `measure:${o.ref}`, c = await C(n.vSpec, n.availableFields, [{
93
93
  id: s,
94
94
  name: w.ADD_MEASURE,
95
- payload: o(a, e.input.availableFields)
96
- }], r.input.variables ?? [], [], r.input.theme), l = j(c.results), d = M(c.results[s], "measure");
97
- if (l || !d) return {
98
- issue: u("operation_failed", [
95
+ payload: i(o, e.input.availableFields)
96
+ }], n.input.variables ?? [], [], n.input.theme), l = j(c.results), u = M(c.results[s], "measure");
97
+ if (l || !u) return {
98
+ issue: f("operation_failed", [
99
99
  "data",
100
100
  "measures",
101
- i
101
+ a
102
102
  ], l?.result.error ?? "Measure operation did not return the created data-item identity."),
103
103
  success: !1
104
104
  };
105
- r = {
106
- ...r,
105
+ n = {
106
+ ...n,
107
107
  measureAggregations: {
108
- ...r.measureAggregations,
109
- [a.ref]: t
108
+ ...n.measureAggregations,
109
+ [o.ref]: t
110
110
  },
111
111
  resolvedRefs: {
112
- ...r.resolvedRefs,
113
- [a.ref]: d
112
+ ...n.resolvedRefs,
113
+ [o.ref]: u
114
114
  },
115
115
  vSpec: c.vSpec
116
116
  };
117
117
  }
118
118
  return {
119
- state: r,
119
+ state: n,
120
120
  success: !0
121
121
  };
122
122
  }, P = (e) => ({
@@ -132,15 +132,15 @@ var D = (e) => {
132
132
  ...P(i),
133
133
  changes: { showNullValues: t.showNullValues }
134
134
  }
135
- }), t.temporalGrouping && n.push(g("setDimensionTemporalGrouping", i, t.ref, [
135
+ }), t.temporalGrouping && n.push(_("setDimensionTemporalGrouping", i, t.ref, [
136
136
  "data",
137
137
  "dimensions",
138
138
  r
139
- ], t.temporalGrouping)), t.format?.formatType !== void 0 && n.push(h(k.formatType, i, t.ref, [
139
+ ], t.temporalGrouping)), t.format?.formatType !== void 0 && n.push(g(k.formatType, i, t.ref, [
140
140
  "data",
141
141
  "dimensions",
142
142
  r
143
- ], "formatType", t.format.formatType)), t.format?.formatString !== void 0 && n.push(h(k.formatString, i, t.ref, [
143
+ ], "formatType", t.format.formatType)), t.format?.formatString !== void 0 && n.push(g(k.formatString, i, t.ref, [
144
144
  "data",
145
145
  "dimensions",
146
146
  r
@@ -155,7 +155,7 @@ var D = (e) => {
155
155
  "negativeType"
156
156
  ].forEach((e) => {
157
157
  let a = t.format?.[e];
158
- a !== void 0 && n.push(h(A[e], i, t.ref, [
158
+ a !== void 0 && n.push(g(A[e], i, t.ref, [
159
159
  "data",
160
160
  "measures",
161
161
  r
@@ -179,11 +179,11 @@ var D = (e) => {
179
179
  secondaryAxis: t.axis === "secondary"
180
180
  }
181
181
  });
182
- }), f(e, n, ["data"]);
183
- }, I = (e, t) => f(e, t.filterGroup ? [{
182
+ }), m(e, n, ["data"]);
183
+ }, I = (e, t) => m(e, t.filterGroup ? [{
184
184
  id: "filterGroup",
185
185
  name: "setStaticFilterGroup",
186
- payload: c(t.filterGroup)
186
+ payload: u(t.filterGroup)
187
187
  }] : [], ["filterGroup"]), L = async (t, n) => {
188
188
  if (!n.sorting?.length) return {
189
189
  state: t,
@@ -200,7 +200,7 @@ var D = (e) => {
200
200
  newIndex: n,
201
201
  sortDirection: (r ? i.get(r)?.direction : void 0) ?? s?.sortDirection ?? e.Asc
202
202
  };
203
- }), u = await f(t, [{
203
+ }), u = await m(t, [{
204
204
  name: w.CHANGE_SORT_ORDER_AND_DIRECTION,
205
205
  payload: { changeRequests: l }
206
206
  }], ["sorting"]);
@@ -212,7 +212,7 @@ var D = (e) => {
212
212
  enabled: e.enabled ?? !0
213
213
  }
214
214
  }));
215
- return u = await f(u.state, d, ["sorting"]), u;
215
+ return u = await m(u.state, d, ["sorting"]), u;
216
216
  }, R = (e, t) => {
217
217
  let n = [], { limiting: r } = t;
218
218
  if (r?.queryLimit !== void 0 && n.push({
@@ -240,9 +240,9 @@ var D = (e) => {
240
240
  }
241
241
  });
242
242
  }
243
- return f(e, n, ["limiting"]);
243
+ return m(e, n, ["limiting"]);
244
244
  }, z = (e, t) => {
245
- let n = [], { presentation: r } = t, i = s(r?.axes);
245
+ let n = [], { presentation: r } = t, i = c(r?.axes);
246
246
  if (i) return Promise.resolve({
247
247
  issue: i,
248
248
  success: !1
@@ -252,7 +252,7 @@ var D = (e) => {
252
252
  payload: r.orientation
253
253
  });
254
254
  let a = r?.legend;
255
- a && n.push(...d(e.vSpec, a)), Object.entries(r?.axes ?? {}).forEach(([e, t]) => {
255
+ a && n.push(...p(e.vSpec, a)), Object.entries(r?.axes ?? {}).forEach(([e, t]) => {
256
256
  t.titleVisible !== void 0 && n.push({
257
257
  name: w.SET_SHOW_AXIS_TITLE,
258
258
  payload: {
@@ -283,7 +283,7 @@ var D = (e) => {
283
283
  axisName: e,
284
284
  showAxisLine: t.lineVisible
285
285
  }
286
- }), n.push(...l(e, t)), "scale" in t && t.scale !== void 0 && n.push({
286
+ }), n.push(...d(e, t)), "scale" in t && t.scale !== void 0 && n.push({
287
287
  name: T.SET_AXIS_SCALE,
288
288
  payload: {
289
289
  axisName: e,
@@ -295,9 +295,9 @@ var D = (e) => {
295
295
  return o && n.push({
296
296
  name: S.SET_MEASURE_AXIS_BANDS,
297
297
  payload: { bands: o }
298
- }), f(e, n, ["presentation"]);
298
+ }), m(e, n, ["presentation"]);
299
299
  }, B = async (e) => {
300
- let t = y(e);
300
+ let t = b(e);
301
301
  if (t) return {
302
302
  issues: [{
303
303
  code: "invalid_structure",
@@ -306,68 +306,68 @@ var D = (e) => {
306
306
  }],
307
307
  success: !1
308
308
  };
309
- let n = p.safeParse(e.definition);
310
- if (!n.success) return {
311
- issues: v(n.error, e.definition),
309
+ let r = l.safeParse(e.definition);
310
+ if (!r.success) return {
311
+ issues: s(r.error, e.definition),
312
312
  success: !1
313
313
  };
314
- let a = b.safeParse(e.baseVSpec);
315
- if (!a.success) return {
316
- issues: [u("invalid_structure", ["baseVSpec"], "Base bar vSpec is invalid.", { details: { issues: a.error.issues } })],
314
+ let i = y.safeParse(e.baseVSpec);
315
+ if (!i.success) return {
316
+ issues: [f("invalid_structure", ["baseVSpec"], "Base bar vSpec is invalid.", { details: { issues: i.error.issues } })],
317
317
  success: !1
318
318
  };
319
- let o = a.data, s = O(o);
320
- if (s) return {
321
- issues: [s],
319
+ let o = i.data, c = O(o);
320
+ if (c) return {
321
+ issues: [c],
322
322
  success: !1
323
323
  };
324
- let c = n.data.data.measures.find((e) => e.ref === n.data.limiting?.topN?.by), l = (c ? e.availableFields.find((e) => e.fieldKey === c.fieldKey) : void 0)?.kind === "measure" ? [u("unsupported_feature", [
324
+ let u = r.data.data.measures.find((e) => e.ref === r.data.limiting?.topN?.by), d = (u ? e.availableFields.find((e) => e.fieldKey === u.fieldKey) : void 0)?.kind === "measure" ? [f("unsupported_feature", [
325
325
  "limiting",
326
326
  "topN",
327
327
  "by"
328
- ], "Top N ranking by a predefined measure is not supported by the current query builder. Use a raw field or calculation.")] : [], d = [
329
- ...D(n.data),
330
- ...i(n.data.data.dimensions, e.availableFields, ["data", "dimensions"], "dimension"),
331
- ...i(n.data.data.measures, e.availableFields, ["data", "measures"], "measure"),
332
- ...m(n.data.filterGroup, e.availableFields),
333
- ...l
328
+ ], "Top N ranking by a predefined measure is not supported by the current query builder. Use a raw field or calculation.")] : [], p = [
329
+ ...D(r.data),
330
+ ...h(r.data.data.dimensions, e.availableFields, ["data", "dimensions"], "dimension"),
331
+ ...h(r.data.data.measures, e.availableFields, ["data", "measures"], "measure"),
332
+ ...n(r.data.filterGroup, e.availableFields),
333
+ ...d
334
334
  ];
335
- if (d.length > 0) return {
336
- issues: d,
335
+ if (p.length > 0) return {
336
+ issues: p,
337
337
  success: !1
338
338
  };
339
- let f = await N({
340
- availableFields: r(e.availableFields),
339
+ let m = await N({
340
+ availableFields: a(e.availableFields),
341
341
  input: e,
342
342
  measureAggregations: {},
343
343
  resolvedRefs: {},
344
344
  vSpec: o
345
- }, n.data), h = [
345
+ }, r.data), g = [
346
346
  F,
347
347
  I,
348
348
  L,
349
349
  R,
350
350
  z,
351
- (e, t) => _(e, t.presentation?.coloring)
351
+ (e, t) => v(e, t.presentation?.coloring)
352
352
  ];
353
- for (let e of h) {
354
- if ("issue" in f) return {
355
- issues: [f.issue],
353
+ for (let e of g) {
354
+ if ("issue" in m) return {
355
+ issues: [m.issue],
356
356
  success: !1
357
357
  };
358
- f = await e(f.state, n.data);
358
+ m = await e(m.state, r.data);
359
359
  }
360
- if ("issue" in f) return {
361
- issues: [f.issue],
360
+ if ("issue" in m) return {
361
+ issues: [m.issue],
362
362
  success: !1
363
363
  };
364
- let g = b.safeParse(f.state.vSpec);
365
- return g.success ? {
366
- resolvedRefs: f.state.resolvedRefs,
364
+ let _ = y.safeParse(m.state.vSpec);
365
+ return _.success ? {
366
+ resolvedRefs: m.state.resolvedRefs,
367
367
  success: !0,
368
- vSpec: g.data
368
+ vSpec: _.data
369
369
  } : {
370
- issues: [u("invalid_compiled_vspec", [], "Compiled bar vSpec failed final validation.", { details: { issues: g.error.issues } })],
370
+ issues: [f("invalid_compiled_vspec", [], "Compiled bar vSpec failed final validation.", { details: { issues: _.error.issues } })],
371
371
  success: !1
372
372
  };
373
373
  };