@astrato-io/visualizations 0.11.0 → 0.12.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 (135) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +129 -4
  3. package/VISUALIZATION_DEFINITIONS.md +3 -1
  4. package/chunks/{Button-CPG4WX8X.js → Button-CQdoKSXX.js} +3 -3
  5. package/chunks/{CircularProgress-PSLW8HmD.js → CircularProgress-DpT1lwWw.js} +18 -18
  6. package/chunks/FieldTypeIcon-Cg4F9Q5D.js +22 -0
  7. package/chunks/{LinearProgress-KQ2EQlGL.js → LinearProgress-B7S0Q26A.js} +8 -8
  8. package/chunks/{MenuOption-B-6K7kks.js → MenuOption-DpKFJxmo.js} +133 -133
  9. package/chunks/{Title-BmvwZYkh.js → Title-m5damhc0.js} +10 -10
  10. package/chunks/{_createAggregator-CFmH6gUN.js → _createAggregator-BA8_iU9q.js} +7 -7
  11. package/chunks/{app-filter-bar.compiler-BY5-T16I.js → app-filter-bar.compiler--T4Qz3Wu.js} +3 -3
  12. package/chunks/{bar-layout-BNou0dZF.js → bar-layout-OFhxn2Go.js} +2 -2
  13. package/chunks/{bar.compiler-BkhO7sDd.js → bar.compiler-hWZBYYvV.js} +62 -62
  14. package/chunks/{builder-CNjuqD2z.js → builder-7w_bgV_h.js} +31 -31
  15. package/chunks/{coloring-BOiP0rmn.js → coloring-Cd6p0GQJ.js} +88 -83
  16. package/chunks/{createSimplePaletteValueFilter-BkgQ7MFE.js → createSimplePaletteValueFilter-CiJT8s1s.js} +55 -55
  17. package/chunks/defaults-CMFqXvaJ.js +3 -0
  18. package/chunks/{definitions-AS9GcavE.js → definitions-DTauTjIX.js} +412 -406
  19. package/chunks/{escobar-cQ1eQ64G.js → escobar-CMvphKSK.js} +4787 -4717
  20. package/chunks/{extend-preset-BlCbcXKR.js → extend-preset-BpXttHFk.js} +371 -372
  21. package/chunks/{filter.compiler-CI7dDNM1.js → filter.compiler-DOGFweJz.js} +4 -4
  22. package/chunks/{filtering-Dwi7hDPZ.js → filtering-NOnDcGbo.js} +183 -183
  23. package/chunks/handlers-CyYFSfhM.js +15393 -0
  24. package/chunks/{icon-picker-styles-CBlxEu3s.js → icon-picker-styles-DuSERhBU.js} +2 -2
  25. package/chunks/{isEqual-BdHo6wqq.js → isEqual-4f8yUUtC.js} +1 -1
  26. package/chunks/{isFocusVisible-C1nlVUwL.js → isFocusVisible-Czm70MGc.js} +1 -1
  27. package/chunks/line.compiler-B-4H55_T.js +203 -0
  28. package/chunks/{logger-Bc-DqDM_.js → logger-Cioob-QV.js} +71 -70
  29. package/chunks/{map.compiler-CRO6XpdI.js → map.compiler-Cv5V6EhF.js} +13 -13
  30. package/chunks/measure-axis-label-format-COy8U_dd.js +27 -0
  31. package/chunks/{measure-format-default-B6ghxih7.js → measure-format-default-B_kuGSzi.js} +7 -3
  32. package/chunks/{metadata-CtkvZEhS.js → metadata-dGSe5UWy.js} +5 -5
  33. package/chunks/{number.compiler-kV4lobCZ.js → number.compiler-D7nMcEMv.js} +8 -8
  34. package/chunks/{operations-COl9wgqi.js → operations-CgfehCad.js} +11462 -11223
  35. package/chunks/{range-CMJ5yc5Z.js → range-Dmwp9kVB.js} +2 -2
  36. package/chunks/{react-dom-BjsCbYHq.js → react-dom-CfuL-m78.js} +24 -24
  37. package/chunks/{render-wrappers-DFHi3Wkr.js → render-wrappers--g-zPFBW.js} +1 -1
  38. package/chunks/{requirements-C5YLmHKe.js → requirements-DHayNJ2C.js} +83 -83
  39. package/chunks/{shared-DyqxOie0.js → shared-DoEN9nNM.js} +282 -277
  40. package/chunks/standalone-B3hRGgYi.js +773 -0
  41. package/chunks/{standalone-BYK2U0Vd.js → standalone-BPNXgFft.js} +380 -380
  42. package/chunks/standalone-BPTT8XEu.js +424 -0
  43. package/chunks/standalone-BgAeHROc.js +2 -0
  44. package/chunks/{standalone-I5kRIsp8.js → standalone-BkQxag7M.js} +81 -81
  45. package/chunks/{standalone-DYVYccmY.js → standalone-Bxa3x6dg.js} +913 -913
  46. package/chunks/standalone-C0If-V6O.js +773 -0
  47. package/chunks/standalone-C1TOyflX.js +287 -0
  48. package/chunks/{standalone-DaNxWIKn.js → standalone-CE5PwJN0.js} +21 -21
  49. package/chunks/{standalone-K2OvRAQM.js → standalone-CG7IFN6n.js} +121 -121
  50. package/chunks/{standalone-Db_HNuWx.js → standalone-CKlgGu80.js} +44 -44
  51. package/chunks/standalone-CNf-oA2U.js +355 -0
  52. package/chunks/{standalone-9jrQ3zJT.js → standalone-CXPdWFlw.js} +10 -10
  53. package/chunks/{standalone-c4CPN6ug.js → standalone-Cf0_5tbu.js} +5783 -5785
  54. package/chunks/{standalone-Bp4G3MDx.js → standalone-DMi4-Vp3.js} +118 -118
  55. package/chunks/{standalone-BrjtMIdd.js → standalone-DTEX67C8.js} +108 -108
  56. package/chunks/{standalone-iOnJhCvA.js → standalone-DU46-kYv.js} +181 -181
  57. package/chunks/standalone-Dbn3jSH6.js +690 -0
  58. package/chunks/{standalone-CS5VGoja.js → standalone-DdcAL_k_.js} +833 -837
  59. package/chunks/standalone-DwCIA0UG.js +1057 -0
  60. package/chunks/standalone-Dz13tl3P.js +357 -0
  61. package/chunks/{standalone-CIjNYyya.js → standalone-H9GFzFk_.js} +937 -938
  62. package/chunks/{standalone-ChfEHb28.js → standalone-MduR0qre.js} +1279 -1279
  63. package/chunks/standalone-ejTz66P3.js +2 -0
  64. package/chunks/{standalone-D9k5SCd8.js → standalone-keB-0wK3.js} +189 -189
  65. package/chunks/{standalone-Bsfz5vnJ.js → standalone-nnkuQd0K.js} +35 -35
  66. package/chunks/standalone-vGGR6Vcn.js +6 -0
  67. package/chunks/{table.compiler-CMH_dtYs.js → table.compiler-mS4UvhLT.js} +12 -12
  68. package/chunks/theme-MYp6Rj1J.js +232 -0
  69. package/chunks/{useFieldName-BfxBzhhH.js → useFieldName-AdSak4Ch.js} +1 -1
  70. package/chunks/{utils-BdJrEeIQ.js → utils-CUKgR7it.js} +3265 -3133
  71. package/chunks/{view-Q-_XIrWE.js → view-BeYwpcVD.js} +478 -478
  72. package/chunks/{visualization-filters-BwS0xUqs.js → visualization-filters-B9qik5_K.js} +2706 -2384
  73. package/chunks/{with-html-element-D_ooGNWI.js → with-html-element-1GSeLT59.js} +3888 -3870
  74. package/definitions.js +2 -2
  75. package/docs/operations/astrato-app-filter-bar.md +1 -1
  76. package/docs/operations/bar.md +115 -32
  77. package/docs/operations/combo.md +50 -17
  78. package/docs/operations/date-picker.md +4 -4
  79. package/docs/operations/distribution-gauge.md +18 -16
  80. package/docs/operations/dot.md +107 -24
  81. package/docs/operations/filter.md +10 -8
  82. package/docs/operations/gauge.md +20 -18
  83. package/docs/operations/heatMap.md +73 -21
  84. package/docs/operations/histogram.md +45 -12
  85. package/docs/operations/iframe.md +1 -1
  86. package/docs/operations/image.md +1 -1
  87. package/docs/operations/index.md +11 -11
  88. package/docs/operations/line.md +57 -24
  89. package/docs/operations/map.md +16 -16
  90. package/docs/operations/number.md +10 -9
  91. package/docs/operations/pie.md +23 -21
  92. package/docs/operations/radar.md +13 -11
  93. package/docs/operations/sankey.md +19 -17
  94. package/docs/operations/scatter.md +111 -28
  95. package/docs/operations/shape.md +5 -5
  96. package/docs/operations/simpleTextObject.md +4 -4
  97. package/docs/operations/slider.md +1 -1
  98. package/docs/operations/table.md +27 -25
  99. package/docs/operations/tree.md +5 -3
  100. package/docs/operations/treemap.md +70 -18
  101. package/docs/operations/waterfall.md +40 -7
  102. package/docs/operations/word-cloud.md +69 -17
  103. package/getters.js +2 -2
  104. package/index.js +474 -525
  105. package/metadata.js +2 -2
  106. package/operations.js +24 -17
  107. package/package.json +71 -72
  108. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1 -1
  109. package/src/definitions/model/definitions/schema-registry.d.ts +13 -12
  110. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +2 -2
  111. package/src/definitions/model/definitions/schemas/common.schema.d.ts +5 -4
  112. package/src/definitions/model/definitions/schemas/line.schema.d.ts +3 -2
  113. package/src/definitions/model/definitions/schemas/number.schema.d.ts +1 -1
  114. package/src/definitions/model/definitions/schemas/table.schema.d.ts +14 -14
  115. package/src/index.d.ts +1 -1
  116. package/src/operations/index.d.ts +11 -1
  117. package/src/types.d.ts +166 -1
  118. package/chunks/FieldTypeIcon-5k2bkqd0.js +0 -22
  119. package/chunks/category-axis-D1OVyMrr.js +0 -20
  120. package/chunks/color-rules-DYJL4fIW.js +0 -15
  121. package/chunks/color-settings-DJFoFTip.js +0 -5
  122. package/chunks/defaults-B5_8S-J-.js +0 -3
  123. package/chunks/handlers-C63NVo7i.js +0 -15433
  124. package/chunks/line.compiler-DCv3h42f.js +0 -198
  125. package/chunks/standalone-06i1wmIX.js +0 -6
  126. package/chunks/standalone-B6zUvxNQ.js +0 -357
  127. package/chunks/standalone-Be5APcVv.js +0 -762
  128. package/chunks/standalone-BuXpKMnc.js +0 -2
  129. package/chunks/standalone-CUGt2FUF.js +0 -2
  130. package/chunks/standalone-CnF2OYLQ.js +0 -355
  131. package/chunks/standalone-CznEEiq3.js +0 -422
  132. package/chunks/standalone-DcuE8KBa.js +0 -287
  133. package/chunks/standalone-pCrzBiTy.js +0 -773
  134. package/chunks/standalone-qrZaimgC.js +0 -689
  135. package/chunks/standalone-yqDJ8h3K.js +0 -1012
@@ -1,12 +1,12 @@
1
1
  import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
- import { Br as t, K as n, Q as r, at as i, et as a, li as o, rt as s } from "./utils-BdJrEeIQ.js";
3
- import { _ as c, c as l, d as u, i as d, l as f, m as p, o as m, r as h, s as g, t as _, u as v, v as y } from "./react-dom-BjsCbYHq.js";
4
- import { a as b, c as x, d as S, l as C, n as w, o as T, r as E, t as D, u as O } from "./isFocusVisible-C1nlVUwL.js";
5
- var k = /* @__PURE__ */ e(o(), 1), A = t(), j = S;
2
+ import { K as t, Q as n, Ur as r, at as i, et as a, fi as o, rt as s } from "./utils-CUKgR7it.js";
3
+ import { _ as c, c as l, d as u, i as d, l as f, m as p, o as m, r as h, s as g, t as _, u as v, v as y } from "./react-dom-CfuL-m78.js";
4
+ import { a as b, c as x, d as S, l as C, n as w, o as T, r as E, t as D, u as O } from "./isFocusVisible-Czm70MGc.js";
5
+ var k = /* @__PURE__ */ e(o(), 1), A = r(), j = S;
6
6
  function M(e, t) {
7
7
  typeof e == "function" ? e(t) : e && (e.current = t);
8
8
  }
9
- var N = r, P = x, F = O, I = {};
9
+ var N = n, P = x, F = O, I = {};
10
10
  function L(e, t) {
11
11
  let n = k.useRef(I);
12
12
  return n.current === I && (n.current = e(t)), n;
@@ -1333,8 +1333,8 @@ var _n = {
1333
1333
  opacity: 0,
1334
1334
  transform: gn(.75),
1335
1335
  visibility: "hidden"
1336
- }, yn = /*#__PURE__*/ k.forwardRef(function(e, t) {
1337
- let { addEndListener: r, appear: i = !0, children: a, disablePrefersReducedMotion: o = !1, easing: s, in: c, onEnter: l, onEntered: u, onEntering: f, onExit: p, onExited: _, onExiting: v, style: y, timeout: b = "auto", ...x } = e, S = k.useRef(null), C = n(), w = U(C.motion.reducedMotion, o), T = k.useRef(null), E = j(T, nn(a), t), D = m(T, f), O = m(T, (e, t) => {
1336
+ }, yn = /*#__PURE__*/ k.forwardRef(function(e, n) {
1337
+ let { addEndListener: r, appear: i = !0, children: a, disablePrefersReducedMotion: o = !1, easing: s, in: c, onEnter: l, onEntered: u, onEntering: f, onExit: p, onExited: _, onExiting: v, style: y, timeout: b = "auto", ...x } = e, S = k.useRef(null), C = t(), w = U(C.motion.reducedMotion, o), T = k.useRef(null), E = j(T, nn(a), n), D = m(T, f), O = m(T, (e, t) => {
1338
1338
  w.shouldReduceMotion || g(e);
1339
1339
  let { duration: n, delay: r, easing: i } = d({
1340
1340
  style: y,
@@ -1582,11 +1582,11 @@ function kn(e, t) {
1582
1582
  t && t(n, ...r), e(n, ...r);
1583
1583
  };
1584
1584
  }
1585
- var An = /*#__PURE__*/ k.forwardRef(function(e, t) {
1585
+ var An = /*#__PURE__*/ k.forwardRef(function(e, n) {
1586
1586
  let r = f({
1587
1587
  props: e,
1588
1588
  name: "MuiTooltip"
1589
- }), { arrow: a = !1, children: o, classes: s, describeChild: c = !1, disableFocusListener: l = !1, disableHoverListener: u = !1, disableInteractive: d = !1, disableTouchListener: p = !1, enterDelay: m = 100, enterNextDelay: h = 0, enterTouchDelay: g = 700, followCursor: _ = !1, id: v, leaveDelay: y = 0, leaveTouchDelay: b = 1500, onClose: x, onOpen: S, open: C, placement: T = "bottom", slotProps: E = {}, slots: O = {}, title: M, ...I } = r, L = /*#__PURE__*/ k.isValidElement(o) ? o : /*#__PURE__*/ (0, A.jsx)("span", { children: o }), ee = n(), [R, te] = k.useState(), [ne, re] = k.useState(null), z = k.useRef(!1), B = k.useRef(!1), ie = d || _, ae = me(), oe = me(), se = me(), ce = me(), [le, ue] = P({
1589
+ }), { arrow: a = !1, children: o, classes: s, describeChild: c = !1, disableFocusListener: l = !1, disableHoverListener: u = !1, disableInteractive: d = !1, disableTouchListener: p = !1, enterDelay: m = 100, enterNextDelay: h = 0, enterTouchDelay: g = 700, followCursor: _ = !1, id: v, leaveDelay: y = 0, leaveTouchDelay: b = 1500, onClose: x, onOpen: S, open: C, placement: T = "bottom", slotProps: E = {}, slots: O = {}, title: M, ...I } = r, L = /*#__PURE__*/ k.isValidElement(o) ? o : /*#__PURE__*/ (0, A.jsx)("span", { children: o }), ee = t(), [R, te] = k.useState(), [ne, re] = k.useState(null), z = k.useRef(!1), B = k.useRef(!1), ie = d || _, ae = me(), oe = me(), se = me(), ce = me(), [le, ue] = P({
1590
1590
  controlled: C,
1591
1591
  default: !1,
1592
1592
  name: "Tooltip",
@@ -1655,7 +1655,7 @@ var An = /*#__PURE__*/ k.forwardRef(function(e, t) {
1655
1655
  document.removeEventListener("keydown", e);
1656
1656
  };
1657
1657
  }, [W, V]);
1658
- let Se = j(nn(L), te, t);
1658
+ let Se = j(nn(L), te, n);
1659
1659
  !M && M !== 0 && (V = !1);
1660
1660
  let Ce = k.useRef(), we = (e) => {
1661
1661
  let t = L.props;
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "./rolldown-runtime-DleVn1XH.js";
2
- import { Ar as t, Ca as n, M as r, _r as i, va as a } from "./visualization-filters-BwS0xUqs.js";
2
+ import { B as t, Na as n, Oa as r, Rr as i, Tr as a } from "./visualization-filters-B9qik5_K.js";
3
3
  var o = /* @__PURE__ */ e(((e, n) => {
4
- var i = r(), a = t();
4
+ var r = t(), a = i();
5
5
  function o(e, t) {
6
- return e && i(e, t, a);
6
+ return e && r(e, t, a);
7
7
  }
8
8
  n.exports = o;
9
9
  })), s = /* @__PURE__ */ e(((e, t) => {
@@ -38,11 +38,11 @@ var o = /* @__PURE__ */ e(((e, n) => {
38
38
  }
39
39
  t.exports = r;
40
40
  })), d = /* @__PURE__ */ e(((e, t) => {
41
- var n = l(), r = u(), o = i(), s = a();
41
+ var n = l(), i = u(), o = a(), s = r();
42
42
  function c(e, t) {
43
- return function(i, a) {
44
- var c = s(i) ? n : r, l = t ? t() : {};
45
- return c(i, e, o(a, 2), l);
43
+ return function(r, a) {
44
+ var c = s(r) ? n : i, l = t ? t() : {};
45
+ return c(r, e, o(a, 2), l);
46
46
  };
47
47
  }
48
48
  t.exports = c;
@@ -1,6 +1,6 @@
1
- import { T as e, d as t, g as n, h as r, lt as i, u as a, v as o } from "./shared-DyqxOie0.js";
2
- import { Np as s, rh as c } from "./handlers-C63NVo7i.js";
3
- import { m as l } from "./operations-COl9wgqi.js";
1
+ import { T as e, d as t, g as n, h as r, lt as i, u as a, v as o } from "./shared-DoEN9nNM.js";
2
+ import { Fp as s, ch as c } from "./handlers-CyYFSfhM.js";
3
+ import { y as l } from "./operations-CgfehCad.js";
4
4
  var u = async (u) => {
5
5
  let d = s(u);
6
6
  if (d) return {
@@ -1,5 +1,5 @@
1
- import { Ts as e } from "./visualization-filters-BwS0xUqs.js";
2
- import "./shared-DyqxOie0.js";
1
+ import { Qs as e } from "./visualization-filters-B9qik5_K.js";
2
+ import "./shared-DoEN9nNM.js";
3
3
  var t = (e) => e.presentation?.layout !== void 0 && e.data.dimensions.length === 1 && e.data.measures.length === 1, n = (e) => {
4
4
  let { grouped: t, offset: n, pyramid: r, stacked: i } = e.barSettings ?? {};
5
5
  return !!(t || i || r || n?.enabled);
@@ -1,12 +1,12 @@
1
- import { Io as e, r as t } from "./visualization-filters-BwS0xUqs.js";
2
- import { A as n, D as r, O as i, P as a, S as o, T as s, _ as c, b as l, c as u, d, f, h as p, j as m, l as h, m as g, n as _, st as v } from "./shared-DyqxOie0.js";
3
- import { Np as y, Um as b } from "./handlers-C63NVo7i.js";
4
- import { T as x, _ as S, t as C, u as w, x as T, y as E } from "./operations-COl9wgqi.js";
5
- import { t as D } from "./bar-layout-BNou0dZF.js";
6
- import { t as O } from "./category-axis-D1OVyMrr.js";
7
- import { n as k } from "./measure-format-default-B6ghxih7.js";
8
- t();
9
- var A = (e) => {
1
+ import { d as e, ss as t } from "./visualization-filters-B9qik5_K.js";
2
+ import { A as n, D as r, O as i, P as a, S as o, T as s, _ as c, b as l, c as u, d, f, h as p, j as m, l as h, m as g, n as _, st as v } from "./shared-DoEN9nNM.js";
3
+ import { Fp as y, Jm as b } from "./handlers-CyYFSfhM.js";
4
+ import { A as x, E as S, P as C, f as w, p as T, t as E, w as D } from "./operations-CgfehCad.js";
5
+ import { t as O } from "./bar-layout-OFhxn2Go.js";
6
+ import { n as k, t as A } from "./measure-axis-label-format-COy8U_dd.js";
7
+ import { n as j } from "./measure-format-default-B_kuGSzi.js";
8
+ e();
9
+ var M = (e) => {
10
10
  let t = [...e.data.dimensions.map((e, t) => ({
11
11
  item: e,
12
12
  path: [
@@ -39,30 +39,30 @@ var A = (e) => {
39
39
  "topN",
40
40
  "by"
41
41
  ], `Measure reference "${s}" does not exist.`, { allowedValues: e.data.measures.map((e) => e.ref) })), a;
42
- }, j = (e) => {
42
+ }, N = (e) => {
43
43
  if (e.type !== "bar") return d("unsupported_visualization", ["baseVSpec", "type"], `Definition type "bar" cannot compile against base vSpec type "${e.type}".`);
44
44
  let t = e;
45
45
  return t.dimensions.length > 0 || t.measures.length > 0 || (t.supportingMeasures?.length ?? 0) > 0 || Object.keys(t.referencedData).length > 0 ? d("non_fresh_base_vspec", ["baseVSpec"], "Bar visualization definitions can only compile against a fresh base vSpec.") : void 0;
46
- }, M = {
46
+ }, P = {
47
47
  formatString: "setDimensionFormatString",
48
48
  formatType: "setDimensionFormatType"
49
- }, N = {
49
+ }, F = {
50
50
  currency: "setMeasureCurrency",
51
51
  currencyIsPrefix: "setMeasureCurrencyIsPrefix",
52
52
  formatString: "setMeasureFormatString",
53
53
  formatType: "setMeasureFormatType",
54
54
  negativeType: "setMeasureNegativeType"
55
- }, P = {
55
+ }, I = {
56
56
  inside: 1,
57
57
  opposite: 0,
58
58
  outside: 0
59
- }, F = (e) => {
59
+ }, L = (e) => {
60
60
  let t = Object.entries(e).find(([, e]) => e.success === !1);
61
61
  return t ? {
62
62
  id: t[0],
63
63
  result: t[1]
64
64
  } : void 0;
65
- }, I = (e, t) => {
65
+ }, R = (e, t) => {
66
66
  if (!e || typeof e.data != "object" || e.data === null || !("dataItem" in e.data)) return;
67
67
  let n = e.data.dataItem;
68
68
  if (!(typeof n != "object" || !n || !("internalKey" in n) || typeof n.internalKey != "string" || !("uniqueSignature" in n) || typeof n.uniqueSignature != "string")) return {
@@ -70,14 +70,14 @@ var A = (e) => {
70
70
  dataItemUniqueSignature: n.uniqueSignature,
71
71
  kind: t
72
72
  };
73
- }, L = async (e, t) => {
73
+ }, z = async (e, t) => {
74
74
  let n = e;
75
75
  for (let [e, r] of t.data.dimensions.entries()) {
76
- let t = `dimension:${r.ref}`, i = await C(n.vSpec, n.availableFields, [{
76
+ let t = `dimension:${r.ref}`, i = await E(n.vSpec, n.availableFields, [{
77
77
  id: t,
78
78
  name: w.ADD_DIMENSION,
79
79
  payload: { key: r.fieldKey }
80
- }], n.input.variables ?? [], [], n.input.theme), a = F(i.results), o = I(i.results[t], "dimension");
80
+ }], n.input.variables ?? [], [], n.input.theme), a = L(i.results), o = R(i.results[t], "dimension");
81
81
  if (a || !o) return {
82
82
  issue: d("operation_failed", [
83
83
  "data",
@@ -96,11 +96,11 @@ var A = (e) => {
96
96
  };
97
97
  }
98
98
  for (let [a, o] of t.data.measures.entries()) {
99
- let t = i(o, e.input.availableFields), s = `measure:${o.ref}`, c = await C(n.vSpec, n.availableFields, [{
99
+ let t = i(o, e.input.availableFields), s = `measure:${o.ref}`, c = await E(n.vSpec, n.availableFields, [{
100
100
  id: s,
101
101
  name: w.ADD_MEASURE,
102
102
  payload: r(o, e.input.availableFields)
103
- }], n.input.variables ?? [], [], n.input.theme), l = F(c.results), u = I(c.results[s], "measure");
103
+ }], n.input.variables ?? [], [], n.input.theme), l = L(c.results), u = R(c.results[s], "measure");
104
104
  if (l || !u) return {
105
105
  issue: d("operation_failed", [
106
106
  "data",
@@ -126,28 +126,28 @@ var A = (e) => {
126
126
  state: n,
127
127
  success: !0
128
128
  };
129
- }, R = (e) => ({
129
+ }, B = (e) => ({
130
130
  dataItemInternalKey: e.dataItemInternalKey,
131
131
  dataItemUniqueSignature: e.dataItemUniqueSignature
132
- }), z = async (e, t) => {
132
+ }), V = async (e, t) => {
133
133
  let n = [];
134
134
  return t.data.dimensions.forEach((t, r) => {
135
135
  let i = e.resolvedRefs[t.ref];
136
136
  t.showNullValues !== void 0 && n.push({
137
137
  name: w.UPDATE_DIMENSION,
138
138
  payload: {
139
- ...R(i),
139
+ ...B(i),
140
140
  changes: { showNullValues: t.showNullValues }
141
141
  }
142
142
  }), t.temporalGrouping && n.push(g("setDimensionTemporalGrouping", i, t.ref, [
143
143
  "data",
144
144
  "dimensions",
145
145
  r
146
- ], t.temporalGrouping)), t.format?.formatType !== void 0 && n.push(h(M.formatType, i, t.ref, [
146
+ ], t.temporalGrouping)), t.format?.formatType !== void 0 && n.push(h(P.formatType, i, t.ref, [
147
147
  "data",
148
148
  "dimensions",
149
149
  r
150
- ], "formatType", t.format.formatType)), t.format?.formatString !== void 0 && n.push(h(M.formatString, i, t.ref, [
150
+ ], "formatType", t.format.formatType)), t.format?.formatString !== void 0 && n.push(h(P.formatString, i, t.ref, [
151
151
  "data",
152
152
  "dimensions",
153
153
  r
@@ -162,74 +162,74 @@ var A = (e) => {
162
162
  "negativeType"
163
163
  ].forEach((e) => {
164
164
  let a = t.format?.[e];
165
- a !== void 0 && n.push(h(N[e], i, t.ref, [
165
+ a !== void 0 && n.push(h(F[e], i, t.ref, [
166
166
  "data",
167
167
  "measures",
168
168
  r
169
169
  ], e, a));
170
170
  }), t.dataLabels && n.push({
171
- name: x.SET_MEASURE_DATA_LABELS_SHOW,
171
+ name: C.SET_MEASURE_DATA_LABELS_SHOW,
172
172
  payload: {
173
- ...R(i),
173
+ ...B(i),
174
174
  show: t.dataLabels.visible
175
175
  }
176
176
  }), t.dataLabels?.placements && n.push({
177
- name: x.SET_MEASURE_DATA_LABEL_BAR_PLACEMENTS,
177
+ name: C.SET_MEASURE_DATA_LABEL_BAR_PLACEMENTS,
178
178
  payload: {
179
- ...R(i),
179
+ ...B(i),
180
180
  placements: t.dataLabels.placements.map((e) => ({
181
181
  position: e,
182
- justify: P[e]
182
+ justify: I[e]
183
183
  }))
184
184
  }
185
185
  }), t.dataLabels?.textColor && n.push({
186
- name: x.SET_MEASURE_DATA_LABEL_TEXT_COLOR,
186
+ name: C.SET_MEASURE_DATA_LABEL_TEXT_COLOR,
187
187
  payload: {
188
- ...R(i),
188
+ ...B(i),
189
189
  textColor: t.dataLabels.textColor
190
190
  }
191
191
  }), t.axis && n.push({
192
- name: S.CHANGE_MEASURE_AXIS,
192
+ name: D.CHANGE_MEASURE_AXIS,
193
193
  payload: {
194
- ...R(i),
194
+ ...B(i),
195
195
  secondaryAxis: t.axis === "secondary"
196
196
  }
197
197
  });
198
- }), n.push(...k(e, t.data.measures, ["data", "measures"])), p(e, n, ["data"]);
199
- }, B = (e, t) => p(e, t.filterGroup ? [{
198
+ }), n.push(...j(e, t.data.measures, ["data", "measures"])), p(e, n, ["data"]);
199
+ }, H = (e, t) => p(e, t.filterGroup ? [{
200
200
  id: "filterGroup",
201
201
  name: "setStaticFilterGroup",
202
202
  payload: l(t.filterGroup)
203
- }] : [], ["filterGroup"]), V = async (t, n) => {
203
+ }] : [], ["filterGroup"]), U = async (e, n) => {
204
204
  if (!n.sorting?.length) return {
205
- state: t,
205
+ state: e,
206
206
  success: !0
207
207
  };
208
- let r = t.vSpec, i = new Map(n.sorting.map((e) => [e.by, e])), a = new Map(Object.entries(t.resolvedRefs).map(([e, t]) => [`${t.dataItemInternalKey}:${t.dataItemUniqueSignature}`, e])), o = r.querySettings?.sortingOrder ?? [], s = n.sorting.map((e) => t.resolvedRefs[e.by]), c = new Set(s.map((e) => `${e.dataItemInternalKey}:${e.dataItemUniqueSignature}`)), l = [...s, ...o.filter((e) => !c.has(`${e.dataItem.internalKey}:${e.dataItem.uniqueSignature}`)).map((e) => ({
208
+ let r = e.vSpec, i = new Map(n.sorting.map((e) => [e.by, e])), a = new Map(Object.entries(e.resolvedRefs).map(([e, t]) => [`${t.dataItemInternalKey}:${t.dataItemUniqueSignature}`, e])), o = r.querySettings?.sortingOrder ?? [], s = n.sorting.map((t) => e.resolvedRefs[t.by]), c = new Set(s.map((e) => `${e.dataItemInternalKey}:${e.dataItemUniqueSignature}`)), l = [...s, ...o.filter((e) => !c.has(`${e.dataItem.internalKey}:${e.dataItem.uniqueSignature}`)).map((e) => ({
209
209
  dataItemInternalKey: e.dataItem.internalKey,
210
210
  dataItemUniqueSignature: e.dataItem.uniqueSignature,
211
211
  kind: e.fieldType === "dimension" ? "dimension" : "measure"
212
- }))].map((t, n) => {
213
- let r = a.get(`${t.dataItemInternalKey}:${t.dataItemUniqueSignature}`), s = o.find((e) => e.dataItem.internalKey === t.dataItemInternalKey && e.dataItem.uniqueSignature === t.dataItemUniqueSignature);
212
+ }))].map((e, n) => {
213
+ let r = a.get(`${e.dataItemInternalKey}:${e.dataItemUniqueSignature}`), s = o.find((t) => t.dataItem.internalKey === e.dataItemInternalKey && t.dataItem.uniqueSignature === e.dataItemUniqueSignature);
214
214
  return {
215
- ...R(t),
215
+ ...B(e),
216
216
  newIndex: n,
217
- sortDirection: (r ? i.get(r)?.direction : void 0) ?? s?.sortDirection ?? e.Asc
217
+ sortDirection: (r ? i.get(r)?.direction : void 0) ?? s?.sortDirection ?? t.Asc
218
218
  };
219
- }), u = await p(t, [{
219
+ }), u = await p(e, [{
220
220
  name: w.CHANGE_SORT_ORDER_AND_DIRECTION,
221
221
  payload: { changeRequests: l }
222
222
  }], ["sorting"]);
223
223
  if (!u.success) return u;
224
- let d = n.sorting.map((e) => ({
224
+ let d = n.sorting.map((t) => ({
225
225
  name: w.TOGGLE_SORTING_ITEM,
226
226
  payload: {
227
- ...R(t.resolvedRefs[e.by]),
228
- enabled: e.enabled ?? !0
227
+ ...B(e.resolvedRefs[t.by]),
228
+ enabled: t.enabled ?? !0
229
229
  }
230
230
  }));
231
231
  return u = await p(u.state, d, ["sorting"]), u;
232
- }, H = (e, t) => {
232
+ }, W = (e, t) => {
233
233
  let n = [], { limiting: r } = t;
234
234
  if (r?.queryLimit !== void 0 && n.push({
235
235
  name: w.SET_QUERY_LIMIT,
@@ -251,26 +251,26 @@ var A = (e) => {
251
251
  }, {
252
252
  name: w.SET_TOP_N_RANK_MEASURE,
253
253
  payload: {
254
- ...R(t),
254
+ ...B(t),
255
255
  ...e.measureAggregations[r.topN.by] ? { aggregation: e.measureAggregations[r.topN.by] } : {}
256
256
  }
257
257
  });
258
258
  }
259
259
  return p(e, n, ["limiting"]);
260
- }, U = (e, t) => {
260
+ }, G = (e, t) => {
261
261
  let n = [], { presentation: r } = t, i = c(r?.axes);
262
262
  if (i) return Promise.resolve({
263
263
  issue: i,
264
264
  success: !1
265
265
  });
266
- let a = D(t, e.input.baseVSpec);
266
+ let a = O(t, e.input.baseVSpec);
267
267
  a !== void 0 && n.push({
268
268
  name: w.SET_BAR_CHART_LAYOUT,
269
269
  payload: a
270
270
  }), r?.orientation !== void 0 && n.push({
271
271
  name: w.SET_BAR_CHART_ORIENTATION,
272
272
  payload: r.orientation
273
- }), n.push(...O(r));
273
+ }), n.push(...k(r)), n.push(...A(r, e.input.baseVSpec, T.rangeAxes));
274
274
  let o = r?.legend;
275
275
  o && n.push(...f(e.vSpec, o)), Object.entries(r?.axes ?? {}).forEach(([e, t]) => {
276
276
  t && (t.titleVisible !== void 0 && n.push({
@@ -304,7 +304,7 @@ var A = (e) => {
304
304
  showAxisLine: t.lineVisible
305
305
  }
306
306
  }), n.push(...u(e, t)), "scale" in t && t.scale !== void 0 && n.push({
307
- name: E.SET_AXIS_SCALE,
307
+ name: S.SET_AXIS_SCALE,
308
308
  payload: {
309
309
  axisName: e,
310
310
  scale: t.scale
@@ -313,10 +313,10 @@ var A = (e) => {
313
313
  });
314
314
  let s = r?.axes?.primaryMeasure?.bands;
315
315
  return s && n.push({
316
- name: T.SET_MEASURE_AXIS_BANDS,
316
+ name: x.SET_MEASURE_AXIS_BANDS,
317
317
  payload: { bands: s }
318
318
  }), p(e, n, ["presentation"]);
319
- }, W = async (e) => {
319
+ }, K = async (e) => {
320
320
  let t = y(e);
321
321
  if (t) return {
322
322
  issues: [{
@@ -336,7 +336,7 @@ var A = (e) => {
336
336
  issues: [d("invalid_structure", ["baseVSpec"], "Base bar vSpec is invalid.", { details: { issues: i.error.issues } })],
337
337
  success: !1
338
338
  };
339
- let o = i.data, c = j(o);
339
+ let o = i.data, c = N(o);
340
340
  if (c) return {
341
341
  issues: [c],
342
342
  success: !1
@@ -346,7 +346,7 @@ var A = (e) => {
346
346
  "topN",
347
347
  "by"
348
348
  ], "Top N ranking by a predefined measure is not supported by the current query builder. Use a raw field or calculation.")] : [], f = [
349
- ...A(r.data),
349
+ ...M(r.data),
350
350
  ...n(r.data.data.dimensions, e.availableFields, ["data", "dimensions"], "dimension"),
351
351
  ...n(r.data.data.measures, e.availableFields, ["data", "measures"], "measure"),
352
352
  ...m(r.data.filterGroup, e.availableFields),
@@ -356,18 +356,18 @@ var A = (e) => {
356
356
  issues: f,
357
357
  success: !1
358
358
  };
359
- let p = await L({
359
+ let p = await z({
360
360
  availableFields: a(e.availableFields),
361
361
  input: e,
362
362
  measureAggregations: {},
363
363
  resolvedRefs: {},
364
364
  vSpec: o
365
365
  }, r.data), h = [
366
- z,
367
- B,
368
366
  V,
369
367
  H,
370
368
  U,
369
+ W,
370
+ G,
371
371
  (e, t) => _(e, t.presentation?.coloring)
372
372
  ];
373
373
  for (let e of h) {
@@ -391,4 +391,4 @@ var A = (e) => {
391
391
  success: !1
392
392
  };
393
393
  };
394
- export { W as compileBarVisualizationDefinition };
394
+ export { K as compileBarVisualizationDefinition };
@@ -1,15 +1,15 @@
1
1
  import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
2
- import { Cc as n, Js as r, Vr as i, Wo as a, hn as o, rl as s, y as c } from "./visualization-filters-BwS0xUqs.js";
3
- import { Br as l, Qt as u, li as d } from "./utils-BdJrEeIQ.js";
4
- import { in as f } from "./handlers-C63NVo7i.js";
5
- import { t as p } from "./isEqual-BdHo6wqq.js";
6
- import { c as m, s as h } from "./logger-Bc-DqDM_.js";
7
- import { i as g } from "./extend-preset-BlCbcXKR.js";
8
- import { _, c as v } from "./with-html-element-D_ooGNWI.js";
2
+ import { Cn as n, D as r, Xc as i, Yr as a, hs as o, jl as s, xc as c } from "./visualization-filters-B9qik5_K.js";
3
+ import { Ur as l, fi as u, tn as d } from "./utils-CUKgR7it.js";
4
+ import { an as f } from "./handlers-CyYFSfhM.js";
5
+ import { t as p } from "./isEqual-4f8yUUtC.js";
6
+ import { c as m, s as h } from "./logger-Cioob-QV.js";
7
+ import { i as g } from "./extend-preset-BpXttHFk.js";
8
+ import { _, c as v } from "./with-html-element-1GSeLT59.js";
9
9
  import "./event-bus-CrLB-Y8z.js";
10
- import "./useFieldName-BfxBzhhH.js";
10
+ import "./useFieldName-AdSak4Ch.js";
11
11
  import "rxjs";
12
- var y = /* @__PURE__ */ e(d()), b = (e, t) => {
12
+ var y = /* @__PURE__ */ e(u()), b = (e, t) => {
13
13
  let n = { ...t };
14
14
  return e?.querySettings && (n.querySettings = { ...e.querySettings }), n;
15
15
  }, x = (e, t) => {
@@ -28,12 +28,12 @@ var y = /* @__PURE__ */ e(d()), b = (e, t) => {
28
28
  ...e,
29
29
  ...n(t, e)
30
30
  }), n), E = (e, t) => {
31
- let { dimensions: r = [], measures: i = [], supportingMeasures: a = [] } = t, s = {
32
- ...o(n.Table),
31
+ let { dimensions: r = [], measures: a = [], supportingMeasures: o = [] } = t, s = {
32
+ ...n(i.Table),
33
33
  referencedData: e.referencedData,
34
34
  dimensions: r,
35
- measures: i,
36
- supportingMeasures: a
35
+ measures: a,
36
+ supportingMeasures: o
37
37
  };
38
38
  return T([
39
39
  x,
@@ -42,11 +42,11 @@ var y = /* @__PURE__ */ e(d()), b = (e, t) => {
42
42
  C,
43
43
  w
44
44
  ], t, s);
45
- }, D = i("use-source-vspec", "yellow"), O = ({ vSpec: e, source: t }, r) => (0, y.useMemo)(() => {
46
- let r = t && s(t) ? E(e, t) : o(n.Table);
45
+ }, D = a("use-source-vspec", "yellow"), O = ({ vSpec: e, source: t }, r) => (0, y.useMemo)(() => {
46
+ let r = t && s(t) ? E(e, t) : n(i.Table);
47
47
  return D.debug("newVSpec", r), r;
48
- }, r), k = i("use-selections", "green"), A = (e) => {
49
- let t = u(), [n, r] = (0, y.useState)({
48
+ }, r), k = a("use-selections", "green"), A = (e) => {
49
+ let t = d(), [n, r] = (0, y.useState)({
50
50
  applied: [],
51
51
  pending: []
52
52
  });
@@ -292,9 +292,9 @@ var W = h(), G = ({ id: e, ...t }, { vBackendAPI: n, objectId: r }) => {
292
292
  let a = r || n.model.getObject()?.id;
293
293
  n.daedalus.emitEvent(W.AstratoEvents.OBJECT_INTERACTION, i, a);
294
294
  };
295
- c();
295
+ r();
296
296
  var K = /* @__PURE__ */ e(p());
297
- l(), i("with-astrato-frame", "#4fcd55"), i("with-astrato-panel-special", "#4fcd55");
297
+ l(), a("with-astrato-frame", "#4fcd55"), a("with-astrato-panel-special", "#4fcd55");
298
298
  var q = {
299
299
  sortOrders: [],
300
300
  expandedFieldValues: [],
@@ -303,8 +303,8 @@ var q = {
303
303
  topDimLimit: null,
304
304
  expandedDimensions: [],
305
305
  expandAll: !1
306
- }, J = i("use-build-query", "yellow"), Y = ({ vSpec: e, visState: t = q, isVSpecValid: n = g, getQueryLimit: r, customQueryBuilders: i = [] }, a) => {
307
- let o = u();
306
+ }, J = a("use-build-query", "yellow"), Y = ({ vSpec: e, visState: t = q, isVSpecValid: n = g, getQueryLimit: r, customQueryBuilders: i = [] }, a) => {
307
+ let o = d();
308
308
  return (0, y.useMemo)(() => {
309
309
  if (n(e)) {
310
310
  let n = v(o, e, t, r);
@@ -319,18 +319,18 @@ var q = {
319
319
  }, a);
320
320
  }, X = (e, t, n, r) => (...i) => {
321
321
  window.clearTimeout(t ?? void 0), n(window.setTimeout(() => e(...i), r));
322
- }, Z = i("use-query-data", "steelblue"), Q = ({ query: e, vSpec: t, availableFields: n, forceFetch: i = !1, debounceTime: a = 300 }, o) => {
323
- let s = u(), c = (0, y.useRef)(null), [l, d] = (0, y.useState)(null), [f, p] = (0, y.useState)(null), m = (0, y.useRef)(null), h = (0, y.useRef)([]), [g, v] = (0, y.useState)(null);
322
+ }, Z = a("use-query-data", "steelblue"), Q = ({ query: e, vSpec: t, availableFields: n, forceFetch: r = !1, debounceTime: i = 300 }, a) => {
323
+ let o = d(), s = (0, y.useRef)(null), [l, u] = (0, y.useState)(null), [f, p] = (0, y.useState)(null), m = (0, y.useRef)(null), h = (0, y.useRef)([]), [g, v] = (0, y.useState)(null);
324
324
  return (0, y.useEffect)(() => {
325
- let o = s.engine;
326
- !o || !e || n.length > 0 && e && (!(0, K.default)(e, m.current) || i) && (c.current = r(16), X(async (r) => {
327
- let i = await o.getData(e);
328
- if (r === c.current) {
325
+ let a = o.engine;
326
+ !a || !e || n.length > 0 && e && (!(0, K.default)(e, m.current) || r) && (s.current = c(16), X(async (r) => {
327
+ let i = await a.getData(e);
328
+ if (r === s.current) {
329
329
  let r = _(e, i, t, n);
330
- d(i), p(r), Z.debug("new data fetched for query:", e);
330
+ u(i), p(r), Z.debug("new data fetched for query:", e);
331
331
  }
332
- }, g, v, a)(c.current), m.current = e, h.current = n);
333
- }, o), [f, l];
332
+ }, g, v, i)(s.current), m.current = e, h.current = n);
333
+ }, a), [f, l];
334
334
  };
335
335
  y.forwardRef(function(e, t) {
336
336
  return y.createElement("img", {
@@ -344,5 +344,5 @@ y.forwardRef(function(e, t) {
344
344
  ref: t,
345
345
  src: "data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%3Crect%20x%3D%2212%22%20y%3D%221.33325%22%20width%3D%2211.3333%22%20height%3D%223.33333%22%20rx%3D%221%22%20transform%3D%22rotate(90%2012%201.33325)%22%20fill%3D%22%2368686E%22%2F%3E%0A%20%20%3Crect%20x%3D%227.33337%22%20y%3D%225.33325%22%20width%3D%227.33333%22%20height%3D%223.33333%22%20rx%3D%221%22%20transform%3D%22rotate(90%207.33337%205.33325)%22%20fill%3D%22%2368686E%22%2F%3E%0A%20%20%3Cpath%20d%3D%22M13.6667%2013.8931H2.33333C2.24493%2013.8931%202.16014%2013.8404%202.09763%2013.7466C2.03512%2013.6529%202%2013.5257%202%2013.3931C2%2013.2605%202.03512%2013.1333%202.09763%2013.0395C2.16014%2012.9457%202.24493%2012.8931%202.33333%2012.8931H13.6667C13.7551%2012.8931%2013.8399%2012.9457%2013.9024%2013.0395C13.9649%2013.1333%2014%2013.2605%2014%2013.3931C14%2013.5257%2013.9649%2013.6529%2013.9024%2013.7466C13.8399%2013.8404%2013.7551%2013.8931%2013.6667%2013.8931Z%22%20fill%3D%22%2368686E%22%2F%3E%0A%3C%2Fsvg%3E%0A"
346
346
  });
347
- }), a.Vertical, a.Horizontal, W.ImageFileType.JPEG, i("get-view-states", "#d8b4fe"), i("with-astrato-panel", "#388e3c");
347
+ }), o.Vertical, o.Horizontal, W.ImageFileType.JPEG, a("get-view-states", "#d8b4fe"), a("with-astrato-panel", "#388e3c");
348
348
  export { O as a, A as i, Y as n, E as o, G as r, Q as t };