@astrato-io/visualizations 0.8.0 → 0.10.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 (161) hide show
  1. package/README.md +9 -5
  2. package/THIRD_PARTY_NOTICES.md +403 -325
  3. package/VISUALIZATION_DEFINITIONS.md +319 -32
  4. package/chunks/{Button-BrGKp9Nm.js → Button-CCF851ea.js} +10 -10
  5. package/chunks/CircularProgress-yupH6YWs.js +765 -0
  6. package/chunks/FieldTypeIcon-D_MzsdfY.js +22 -0
  7. package/chunks/LinearProgress-CyFjN4px.js +327 -0
  8. package/chunks/{MenuOption-ByRqhRdX.js → MenuOption-CQpT79AP.js} +1391 -1008
  9. package/chunks/Title-C-p4ZarD.js +1804 -0
  10. package/chunks/_createAggregator-BF4qG9XK.js +50 -0
  11. package/chunks/{app-filter-bar.compiler-TwVTeoj5.js → app-filter-bar.compiler-8fxCo2q7.js} +10 -10
  12. package/chunks/bar-layout-DStC-GNV.js +9 -0
  13. package/chunks/{bar.compiler-DuQg8EUb.js → bar.compiler-CQAu8KL8.js} +102 -84
  14. package/chunks/{builder-DEDvNq1k.js → builder-CScg1TOS.js} +156 -60
  15. package/chunks/color-rules-DYJL4fIW.js +15 -0
  16. package/chunks/color-settings-DJFoFTip.js +5 -0
  17. package/chunks/{coloring-CncX_JRX.js → coloring-9jU3s_-p.js} +41 -41
  18. package/chunks/contains-BK-sRXcB.js +21 -0
  19. package/chunks/createSimplePaletteValueFilter-C4hZpCdn.js +2005 -0
  20. package/chunks/defaults-cyNhn37t.js +3 -0
  21. package/chunks/{definitions-BPJQTx16.js → definitions-C4grxhye.js} +612 -400
  22. package/chunks/{escobar-DRhRMYRE.js → escobar-CjirINHP.js} +5354 -5473
  23. package/chunks/{extend-preset-CUFNpmPe.js → extend-preset-D-l9u_we.js} +974 -909
  24. package/chunks/{filter.compiler-w27dlv0C.js → filter.compiler-lji2Acgn.js} +7 -7
  25. package/chunks/{filtering-cc7WqWpg.js → filtering-C1zakrrX.js} +570 -390
  26. package/chunks/handlers-ZviIUC-j.js +15387 -0
  27. package/chunks/{icon-picker-styles-CoJmwTRi.js → icon-picker-styles-Bj80ZUBK.js} +11 -11
  28. package/chunks/isEqual-Ch9OEye3.js +16 -0
  29. package/chunks/isFocusVisible-CgMP0qkR.js +144 -0
  30. package/chunks/label-format-type-C46pzgx7.js +17 -0
  31. package/chunks/{line.compiler-Ct1WhN2p.js → line.compiler-De5fiKuR.js} +6 -6
  32. package/chunks/{logger-DpQtYQnX.js → logger-CKRjhSHQ.js} +77 -66
  33. package/chunks/map.compiler-CKzorLgK.js +345 -0
  34. package/chunks/{metadata-WABZrt7Y.js → metadata-Bb9pTXrq.js} +1 -1
  35. package/chunks/{number.compiler-D8TPly-4.js → number.compiler-CaTmJkmi.js} +4 -4
  36. package/chunks/operations-DZoY50VX.js +31297 -0
  37. package/chunks/{range-Bi-7zT0k.js → range-D1BTmFMp.js} +2 -2
  38. package/chunks/react-dom-Dgv2azN2.js +368 -0
  39. package/chunks/{render-wrappers-OEmtaM8g.js → render-wrappers-_P3xwu5A.js} +1 -1
  40. package/chunks/{requirements-Dvd8jqYF.js → requirements-NHNrR8Ie.js} +55 -53
  41. package/chunks/responsive.styles-FItb913l.js +93 -0
  42. package/chunks/shared-UitWpq1J.js +1331 -0
  43. package/chunks/standalone-B0U6c3su.js +3638 -0
  44. package/chunks/{standalone-we5D5MIn.js → standalone-BBu90BhK.js} +113 -113
  45. package/chunks/standalone-BEekPuA12.js +357 -0
  46. package/chunks/{standalone-BMTCb10X.js → standalone-BOzHA_d4.js} +41 -41
  47. package/chunks/standalone-BR2JuRIC.js +422 -0
  48. package/chunks/{standalone-BGkmozIb.js → standalone-BapqaniK.js} +619 -619
  49. package/chunks/standalone-Bnnr87pc.js +2009 -0
  50. package/chunks/standalone-BwJqDj2Z.js +396 -0
  51. package/chunks/{standalone-BDhPQtzQ.js → standalone-ByKKqT5L.js} +308 -300
  52. package/chunks/{standalone-vBnBS2YC.js → standalone-CRdDZYeM.js} +1788 -1004
  53. package/chunks/standalone-CRfDOO1x.js +287 -0
  54. package/chunks/{standalone-D5Q5ngsD.js → standalone-CVknVdUC.js} +30 -27
  55. package/chunks/standalone-CbPk8bKn.js +580 -0
  56. package/chunks/{standalone-CJvIXsQE.js → standalone-Ck63MZzj.js} +234 -232
  57. package/chunks/{standalone-CM5XcAN5.js → standalone-DCFY1MAV.js} +8075 -7729
  58. package/chunks/{standalone-DW6NT205.js → standalone-DZDGX3aa.js} +168 -168
  59. package/chunks/standalone-DhfgeJIk.js +1012 -0
  60. package/chunks/{standalone-DT0wKji7.js → standalone-DibjA73M.js} +2 -2
  61. package/chunks/{standalone-XuGksArp.js → standalone-DtBk_iUz.js} +9 -8
  62. package/chunks/standalone-DxBAyqAu.js +772 -0
  63. package/chunks/standalone-KMQPsNsq.js +2 -0
  64. package/chunks/standalone-MBLSvsrY.js +2 -0
  65. package/chunks/standalone-U0WJwFlG.js +354 -0
  66. package/chunks/{standalone-C8ZAEutO.js → standalone-swGs70tD.js} +49 -51
  67. package/chunks/standalone-wgFAVnnm.js +355 -0
  68. package/chunks/standalone-xGV0dqPV.js +689 -0
  69. package/chunks/{table.compiler-DMeeHxb6.js → table.compiler-OWSx5MOq.js} +7 -7
  70. package/chunks/{typeof-CJDtcySz.js → typeof-DCq3QgvY.js} +6 -1
  71. package/chunks/useFieldName-B8iCYyw1.js +7 -0
  72. package/chunks/{utils-vdmi_2PK.js → utils-3Igg6xmO.js} +7668 -12779
  73. package/chunks/{view-BuwQugKb.js → view-DdMLZySj.js} +2430 -2110
  74. package/chunks/{visualization-filters-Cc4KU-l-.js → visualization-filters-CzvFHE6M.js} +5205 -4438
  75. package/chunks/with-html-element-DOfkR3C1.js +16094 -0
  76. package/definitions.js +2 -2
  77. package/docs/operations/astrato-app-filter-bar.md +1 -1
  78. package/docs/operations/bar.md +303 -2
  79. package/docs/operations/combo.md +262 -1
  80. package/docs/operations/date-picker.md +1 -1
  81. package/docs/operations/distribution-gauge.md +1 -1
  82. package/docs/operations/dot.md +148 -1
  83. package/docs/operations/filter.md +1 -1
  84. package/docs/operations/gauge.md +1 -1
  85. package/docs/operations/heatMap.md +1 -1
  86. package/docs/operations/histogram.md +262 -1
  87. package/docs/operations/iframe.md +1 -1
  88. package/docs/operations/image.md +1 -1
  89. package/docs/operations/index.md +8 -8
  90. package/docs/operations/line.md +262 -1
  91. package/docs/operations/number.md +1 -1
  92. package/docs/operations/pie.md +1 -1
  93. package/docs/operations/radar.md +1 -1
  94. package/docs/operations/sankey.md +1 -1
  95. package/docs/operations/scatter.md +148 -1
  96. package/docs/operations/shape.md +1 -1
  97. package/docs/operations/simpleTextObject.md +1 -1
  98. package/docs/operations/slider.md +1 -1
  99. package/docs/operations/table.md +439 -157
  100. package/docs/operations/tree.md +1 -1
  101. package/docs/operations/treemap.md +1 -1
  102. package/docs/operations/waterfall.md +1 -1
  103. package/docs/operations/word-cloud.md +1 -1
  104. package/getters.js +2 -2
  105. package/index.js +523 -469
  106. package/metadata.js +2 -2
  107. package/operations.js +5 -5
  108. package/package.json +74 -68
  109. package/src/definitions/index.d.ts +1 -1
  110. package/src/definitions/model/definitions/available-fields.d.ts +2 -2
  111. package/src/definitions/model/definitions/compilers/compile.d.ts +1 -0
  112. package/src/definitions/model/definitions/data-item-resolution.d.ts +3 -3
  113. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +535 -349
  114. package/src/definitions/model/definitions/index.d.ts +2 -1
  115. package/src/definitions/model/definitions/schema-registry.d.ts +406 -101
  116. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +10 -8
  117. package/src/definitions/model/definitions/schemas/common.schema.d.ts +33 -32
  118. package/src/definitions/model/definitions/schemas/index.d.ts +1 -0
  119. package/src/definitions/model/definitions/schemas/line.schema.d.ts +10 -10
  120. package/src/definitions/model/definitions/schemas/map.schema.d.ts +590 -0
  121. package/src/definitions/model/definitions/schemas/number.schema.d.ts +4 -4
  122. package/src/definitions/model/definitions/schemas/object.schema.d.ts +38 -38
  123. package/src/definitions/model/definitions/schemas/table.schema.d.ts +61 -61
  124. package/src/definitions/model/definitions/types/compilation.types.d.ts +7 -2
  125. package/src/definitions/model/definitions/types/definition.types.d.ts +2 -2
  126. package/src/definitions/model/definitions/types/index.d.ts +1 -1
  127. package/src/index.d.ts +1 -1
  128. package/src/operations/index.d.ts +1 -1
  129. package/src/types.d.ts +45 -41
  130. package/src/visualization-catalog.d.ts +26 -26
  131. package/chunks/DefaultPropsProvider-BsfB7QTn.js +0 -257
  132. package/chunks/FieldTypeIcon-Drs6hSJF.js +0 -22
  133. package/chunks/LinearProgress-VtfFx2vJ.js +0 -253
  134. package/chunks/Title-CO5dP1ma.js +0 -1691
  135. package/chunks/ToggleButton-KOBAimC1.js +0 -112
  136. package/chunks/color-rules-CN7TcGrC.js +0 -6
  137. package/chunks/color-settings-3VRlf_Vw.js +0 -6
  138. package/chunks/colorManipulator-D8Pjy1pf.js +0 -45
  139. package/chunks/handlers-TOT-7INo.js +0 -12871
  140. package/chunks/isEqual-B8loyPsC.js +0 -12
  141. package/chunks/label-format-type-weq1XfcX.js +0 -8
  142. package/chunks/operations-Dh4v1Ovt.js +0 -26280
  143. package/chunks/responsive.styles-DSiOGD7u.js +0 -82
  144. package/chunks/shared-Bn4N5QcZ.js +0 -1218
  145. package/chunks/standalone-B55oyW6c.js +0 -689
  146. package/chunks/standalone-BXKRE_Se.js +0 -468
  147. package/chunks/standalone-Bes8srx1.js +0 -354
  148. package/chunks/standalone-BjZp0QMe.js +0 -2
  149. package/chunks/standalone-BlMIwpEe.js +0 -1877
  150. package/chunks/standalone-C8qAelL4.js +0 -2
  151. package/chunks/standalone-CLmGb7nn2.js +0 -355
  152. package/chunks/standalone-CXNP6-xD.js +0 -420
  153. package/chunks/standalone-DLlyRIE6.js +0 -287
  154. package/chunks/standalone-DMcI1afI.js +0 -396
  155. package/chunks/standalone-DN4S1MjT.js +0 -3874
  156. package/chunks/standalone-DYQIQH4c.js +0 -2095
  157. package/chunks/standalone-D__XCp-h.js +0 -1003
  158. package/chunks/standalone-XTgSsTAa.js +0 -354
  159. package/chunks/useFieldName-Cjn9KCVp.js +0 -7
  160. package/chunks/useSlotProps-DLbQp4lc.js +0 -166
  161. package/chunks/with-html-element-D0uY2zjI.js +0 -7328
@@ -1,32 +1,32 @@
1
1
  import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
2
- import { C as n, Ds as r, Et as i, Hi as a, S as o, Ss as s, Us as c, Xa as l, _c as u, ga as d, hn as f, mr as p, w as m, ws as h, y as g, zi as _, zr as v } from "./visualization-filters-Cc4KU-l-.js";
3
- import { Ei as y, F as b, N as x, Xt as S, o as C, ri as w } from "./utils-vdmi_2PK.js";
4
- import { mm as T, pm as E } from "./handlers-TOT-7INo.js";
5
- import "./logger-DpQtYQnX.js";
6
- import { Et as ee, F as te, I as ne, Kt as D, Ot as re, _n as O, dn as k, et as ie, gn as A, hn as j, i as ae, in as M, it as oe, ln as N, n as se, nn as ce, st as le, tn as ue, tt as de, un as P, vn as F, xt as fe } from "./escobar-DRhRMYRE.js";
7
- import { _ as I } from "./MenuOption-ByRqhRdX.js";
8
- import { t as pe } from "./coloring-CncX_JRX.js";
9
- import { t as me } from "./set-coloring-datafield-B3uIS1Pe.js";
10
- import { a as he, n as ge } from "./accessors-DemrDevR.js";
11
- function L() {
2
+ import { Cs as n, Da as r, Fo as i, Pc as a, Qr as o, Ta as s, ba as c, cl as l, hc as u, in as d, oa as f, pc as p, rr as m, to as h, va as g, vc as _, x as v, y } from "./visualization-filters-CzvFHE6M.js";
3
+ import { F as b, N as x, ci as S, jt as C, s as w, zr as T } from "./utils-3Igg6xmO.js";
4
+ import { $g as E, e_ as D } from "./handlers-ZviIUC-j.js";
5
+ import "./logger-CKRjhSHQ.js";
6
+ import { Dt as ee, I as te, L as ne, St as re, _n as O, at as ie, ct as ae, dn as k, gn as oe, hn as A, i as se, in as j, kt as ce, ln as M, n as le, nn as ue, nt as de, qt as fe, tn as pe, tt as me, un as N, vn as P } from "./escobar-CjirINHP.js";
7
+ import { _ as F } from "./MenuOption-CQpT79AP.js";
8
+ import { t as he } from "./coloring-9jU3s_-p.js";
9
+ import { t as ge } from "./set-coloring-datafield-B3uIS1Pe.js";
10
+ import { a as _e, n as ve } from "./accessors-DemrDevR.js";
11
+ function I() {
12
12
  return 0;
13
13
  }
14
- function R(e) {
14
+ function L(e) {
15
15
  return function() {
16
16
  return e;
17
17
  };
18
18
  }
19
- function _e(e) {
19
+ function ye(e) {
20
20
  e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
21
21
  }
22
- function ve(e, t, n, r, i) {
22
+ function be(e, t, n, r, i) {
23
23
  for (var a = e.children, o, s = -1, c = a.length, l = e.value && (r - t) / e.value; ++s < c;) o = a[s], o.y0 = n, o.y1 = i, o.x0 = t, o.x1 = t += o.value * l;
24
24
  }
25
- function ye(e, t, n, r, i) {
25
+ function xe(e, t, n, r, i) {
26
26
  for (var a = e.children, o, s = -1, c = a.length, l = e.value && (i - n) / e.value; ++s < c;) o = a[s], o.x0 = t, o.x1 = r, o.y0 = n, o.y1 = n += o.value * l;
27
27
  }
28
- var be = (1 + Math.sqrt(5)) / 2;
29
- function xe(e, t, n, r, i, a) {
28
+ var Se = (1 + Math.sqrt(5)) / 2;
29
+ function Ce(e, t, n, r, i, a) {
30
30
  for (var o = [], s = t.children, c, l, u = 0, d = 0, f = s.length, p, m, h = t.value, g, _, v, y, b, x, S; u < f;) {
31
31
  p = i - n, m = a - r;
32
32
  do
@@ -43,22 +43,22 @@ function xe(e, t, n, r, i, a) {
43
43
  value: g,
44
44
  dice: p < m,
45
45
  children: s.slice(u, d)
46
- }), c.dice ? ve(c, n, r, i, h ? r += m * g / h : a) : ye(c, n, r, h ? n += p * g / h : i, a), h -= g, u = d;
46
+ }), c.dice ? be(c, n, r, i, h ? r += m * g / h : a) : xe(c, n, r, h ? n += p * g / h : i, a), h -= g, u = d;
47
47
  }
48
48
  return o;
49
49
  }
50
- var Se = (function e(t) {
50
+ var we = (function e(t) {
51
51
  function n(e, n, r, i, a) {
52
- xe(t, e, n, r, i, a);
52
+ Ce(t, e, n, r, i, a);
53
53
  }
54
54
  return n.ratio = function(t) {
55
55
  return e((t = +t) > 1 ? t : 1);
56
56
  }, n;
57
- })(be);
58
- function Ce() {
59
- var e = Se, t = !1, n = 1, r = 1, i = [0], a = L, o = L, s = L, c = L, l = L;
57
+ })(Se);
58
+ function Te() {
59
+ var e = we, t = !1, n = 1, r = 1, i = [0], a = I, o = I, s = I, c = I, l = I;
60
60
  function u(e) {
61
- return e.x0 = e.y0 = 0, e.x1 = n, e.y1 = r, e.eachBefore(d), i = [0], t && e.eachBefore(_e), e;
61
+ return e.x0 = e.y0 = 0, e.x1 = n, e.y1 = r, e.eachBefore(d), i = [0], t && e.eachBefore(ye), e;
62
62
  }
63
63
  function d(t) {
64
64
  var n = i[t.depth], r = t.x0 + n, u = t.y0 + n, d = t.x1 - n, f = t.y1 - n;
@@ -69,145 +69,147 @@ function Ce() {
69
69
  }, u.size = function(e) {
70
70
  return arguments.length ? (n = +e[0], r = +e[1], u) : [n, r];
71
71
  }, u.tile = function(t) {
72
- return arguments.length ? (e = ge(t), u) : e;
72
+ return arguments.length ? (e = ve(t), u) : e;
73
73
  }, u.padding = function(e) {
74
74
  return arguments.length ? u.paddingInner(e).paddingOuter(e) : u.paddingInner();
75
75
  }, u.paddingInner = function(e) {
76
- return arguments.length ? (a = typeof e == "function" ? e : R(+e), u) : a;
76
+ return arguments.length ? (a = typeof e == "function" ? e : L(+e), u) : a;
77
77
  }, u.paddingOuter = function(e) {
78
78
  return arguments.length ? u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e) : u.paddingTop();
79
79
  }, u.paddingTop = function(e) {
80
- return arguments.length ? (o = typeof e == "function" ? e : R(+e), u) : o;
80
+ return arguments.length ? (o = typeof e == "function" ? e : L(+e), u) : o;
81
81
  }, u.paddingRight = function(e) {
82
- return arguments.length ? (s = typeof e == "function" ? e : R(+e), u) : s;
82
+ return arguments.length ? (s = typeof e == "function" ? e : L(+e), u) : s;
83
83
  }, u.paddingBottom = function(e) {
84
- return arguments.length ? (c = typeof e == "function" ? e : R(+e), u) : c;
84
+ return arguments.length ? (c = typeof e == "function" ? e : L(+e), u) : c;
85
85
  }, u.paddingLeft = function(e) {
86
- return arguments.length ? (l = typeof e == "function" ? e : R(+e), u) : l;
86
+ return arguments.length ? (l = typeof e == "function" ? e : L(+e), u) : l;
87
87
  }, u;
88
88
  }
89
- var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
90
- return e.cells = "key-cells", e.labels = "key-labels", e.selection = "key-selection", e;
91
- }({}), B = /* @__PURE__ */ function(e) {
92
- return e.CellValue = "cellValue", e.Color = "color", e;
93
- }({}), V = /* @__PURE__ */ function(e) {
94
- return e.MeasureFormatter = "total", e;
95
- }({}), H = /* @__PURE__ */ function(e) {
96
- return e.Leaf = "leaf", e.Header = "header", e;
97
- }({}), Te = (e, t, n, r, i, a, o) => {
98
- let s = e.measures.filter(v), l = (e.supportingMeasures ?? []).filter((e) => v(e)), u = c(s[0].dataItem), d = ne(l), f = e.dimensions.filter(v).map((e) => c(e.dataItem)), p = f[f.length - 1], m = f.slice(0, f.length - 1), h = {};
99
- m.forEach((e, t) => {
100
- h[`dim${t}`] = { field: e };
89
+ var Ee = /* @__PURE__ */ e(S()), R = {
90
+ cells: "key-cells",
91
+ labels: "key-labels",
92
+ selection: "key-selection"
93
+ }, z = {
94
+ CellValue: "cellValue",
95
+ Color: "color"
96
+ }, B = { MeasureFormatter: "total" }, V = {
97
+ Leaf: "leaf",
98
+ Header: "header"
99
+ }, De = (e, t, n, r, i, s, c) => {
100
+ let l = e.measures.filter(o), u = (e.supportingMeasures ?? []).filter((e) => o(e)), d = a(l[0].dataItem), f = ne(u), p = e.dimensions.filter(o).map((e) => a(e.dataItem)), m = p[p.length - 1], h = p.slice(0, p.length - 1), g = {};
101
+ h.forEach((e, t) => {
102
+ g[`dim${t}`] = { field: e };
101
103
  });
102
- let g = [{
103
- field: p,
104
+ let _ = [{
105
+ field: m,
104
106
  props: {
105
- [B.CellValue]: { field: u },
106
- ...h,
107
- [u]: { field: u },
108
- ...d
107
+ [z.CellValue]: { field: d },
108
+ ...g,
109
+ [d]: { field: d },
110
+ ...f
109
111
  }
110
- }], _ = e.coloring ? re(e, o) : null;
111
- _ && (g[0].props = {
112
- ...g[0].props,
113
- [B.Color]: { field: _ }
112
+ }], v = e.coloring ? ce(e, c) : null;
113
+ v && (_[0].props = {
114
+ ..._[0].props,
115
+ [z.Color]: { field: v }
114
116
  });
115
117
  let y = [{
116
118
  key: "coll",
117
- data: { extract: [...g] }
119
+ data: { extract: [..._] }
118
120
  }];
119
121
  return {
120
122
  ...n,
121
123
  collections: y,
122
- formatters: { [V.MeasureFormatter]: e.measures[0].formatter ?? {
124
+ formatters: { [B.MeasureFormatter]: e.measures[0].formatter ?? {
123
125
  type: "excel-format",
124
126
  format: ""
125
127
  } }
126
128
  };
127
- }, U = "treemap-alternates-switcher", W = "treemap-alternates-switcher", Ee = new I(N.fontLight), De = new I(N.fontDark), G = (e) => f(e) || e.label || e.dataItem?.name || "Field", Oe = (e, t, n, r) => {
128
- let i = n ? c(n.dataItem) : void 0;
129
+ }, H = "treemap-alternates-switcher", U = "treemap-alternates-switcher", Oe = new F(M.fontLight), ke = new F(M.fontDark), Ae = (e) => d(e) || e.label || e.dataItem?.name || "Field", je = (e, t, n, r) => {
130
+ let i = n ? a(n.dataItem) : void 0;
129
131
  return {
130
132
  type: "native",
131
- key: `${W}-interaction`,
133
+ key: `${U}-interaction`,
132
134
  events: { click(a) {
133
135
  let o = this.element.getBoundingClientRect(), s = {
134
136
  x: a.clientX - o.left,
135
137
  y: a.clientY - o.top
136
138
  }, c = this.chart.shapesAt(s, {
137
139
  components: [{
138
- key: W,
140
+ key: U,
139
141
  propagation: "stop"
140
142
  }],
141
143
  propagation: "stop"
142
144
  }).find((e) => e.data?.target === "measure" || e.data?.target === "dimension");
143
145
  if (c?.data?.target === "measure" && n && i) {
144
- r(F.Text, "click", `text-${i}`, a, c, {
145
- dataItemType: u.Measure,
146
+ r(P.Text, "click", `text-${i}`, a, c, {
147
+ dataItemType: l.Measure,
146
148
  dataItemRole: n.role
147
149
  });
148
150
  return;
149
151
  }
150
- c?.data?.target === "dimension" && e && r(F.Text, "click", `text-${e}`, a, c, {
151
- dataItemType: u.Dimension,
152
+ c?.data?.target === "dimension" && e && r(P.Text, "click", `text-${e}`, a, c, {
153
+ dataItemType: l.Dimension,
152
154
  dataItemRole: t
153
155
  });
154
156
  } }
155
157
  };
156
- }, ke = (e, t, n, r, i, a = {}, o, s) => {
157
- let d = e.dimensions.filter(v), f = e.measures.filter(v), m = d[0], h = f[0], g = m ? c(m.dataItem) : void 0;
158
- if (!m && !h) return n;
159
- let _ = p(e.dimensions, e.enableAlternate, a.isPrintMode), y = p(e.measures, e.enableAlternate, a.isPrintMode);
160
- if (!_ && !y) return n;
161
- let b = a?.isPrintMode ?? !1, x = _ ? d.map((e) => G(e)).join(", ") : void 0, S = y && h ? G(h) : void 0, C = e.treemapSettings.branchColor ?? "rgba(150, 150, 150, 0.3)", w = new I(C).betterContrast(new I(t.fonts.general.color), Ee, De).rgb(), T = {
162
- type: U,
163
- key: W,
164
- dimensionDataItemType: g ? u.Dimension : void 0,
165
- dimensionDataItemRole: m?.role,
166
- measureDataItemType: h ? u.Measure : void 0,
167
- measureDataItemRole: h?.role,
158
+ }, Me = (e, t, n, r, s, c = {}, u, d) => {
159
+ let f = e.dimensions.filter(o), p = e.measures.filter(o), h = f[0], g = p[0], _ = h ? a(h.dataItem) : void 0;
160
+ if (!h && !g) return n;
161
+ let v = m(e.dimensions, e.enableAlternate, c.isPrintMode), y = m(e.measures, e.enableAlternate, c.isPrintMode);
162
+ if (!v && !y) return n;
163
+ let b = c?.isPrintMode ?? !1, x = v ? f.map((e) => Ae(e)).join(", ") : void 0, S = y && g ? Ae(g) : void 0, C = e.treemapSettings.branchColor ?? "rgba(150, 150, 150, 0.3)", w = new F(C).betterContrast(new F(t.fonts.general.color), Oe, ke).rgb(), T = {
164
+ type: H,
165
+ key: U,
166
+ dimensionDataItemType: _ ? l.Dimension : void 0,
167
+ dimensionDataItemRole: h?.role,
168
+ measureDataItemType: g ? l.Measure : void 0,
169
+ measureDataItemRole: g?.role,
168
170
  layout: {
169
- dock: l.Bottom,
171
+ dock: i.Bottom,
170
172
  displayOrder: 0
171
173
  },
172
174
  settings: {
173
- dimensionLabel: x ? D(x) : void 0,
174
- measureLabel: S ? D(S) : void 0,
175
+ dimensionLabel: x ? fe(x) : void 0,
176
+ measureLabel: S ? fe(S) : void 0,
175
177
  backgroundColor: C,
176
178
  fontFamily: t.fonts.general.fontFamily ?? void 0,
177
- fontSize: `${N.fieldTitle.fontSize}px`,
179
+ fontSize: `${M.fieldTitle.fontSize}px`,
178
180
  color: w,
179
181
  paddingLeft: 5,
180
182
  paddingRight: 5,
181
183
  paddingVertical: 5,
182
184
  labelGap: 12
183
185
  }
184
- }, E = s && !b ? [Oe(g, m?.role, h, s)] : [];
186
+ }, E = d && !b ? [je(_, h?.role, g, d)] : [];
185
187
  return {
186
188
  ...n,
187
189
  components: [...n.components, T],
188
190
  interactions: n.interactions ? [...n.interactions, ...E] : [...E]
189
191
  };
190
- }, Ae = /* @__PURE__ */ t(((e, t) => {
191
- var n = m(), r = i();
192
- function a(e, t, i, o, s, c) {
193
- return r(e) && r(t) && (c.set(t, e), n(e, t, void 0, a, c), c.delete(t)), e;
192
+ }, Ne = /* @__PURE__ */ t(((e, t) => {
193
+ var n = v(), r = c();
194
+ function i(e, t, a, o, s, c) {
195
+ return r(e) && r(t) && (c.set(t, e), n(e, t, void 0, i, c), c.delete(t)), e;
194
196
  }
195
- t.exports = a;
196
- })), K = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
197
- var r = n(), i = o(), a = Ae(), s = g();
198
- t.exports = i(function(e) {
199
- return e.push(void 0, a), r(s, void 0, e);
197
+ t.exports = i;
198
+ })), W = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
199
+ var n = s(), r = g(), i = Ne(), a = y();
200
+ t.exports = r(function(e) {
201
+ return e.push(void 0, i), n(a, void 0, e);
200
202
  });
201
- })))()), je = () => ({
203
+ })))()), Pe = () => ({
202
204
  trigger: [{
203
- on: A.Tap,
204
- action: j.Toggle,
205
+ on: oe.Tap,
206
+ action: A.Toggle,
205
207
  globalPropagation: "stop",
206
208
  propagation: "stop",
207
209
  contexts: [k.Selection]
208
210
  }, {
209
- on: A.Over,
210
- action: j.Set,
211
+ on: oe.Over,
212
+ action: A.Set,
211
213
  globalPropagation: "stop",
212
214
  propagation: "stop",
213
215
  contexts: [k.Highlight]
@@ -218,56 +220,56 @@ var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
218
220
  mode: O.Or,
219
221
  style: { inactive: { fill: (e) => {
220
222
  let { fill: t } = e;
221
- return !t || t === "none" || t === "transparent" ? t ?? "none" : ue(ce(t), .25);
223
+ return !t || t === "none" || t === "transparent" ? t ?? "none" : pe(ue(t), .25);
222
224
  } } }
223
225
  }]
224
- }), Me = (e, t, n, i, a, o = {}) => {
225
- let s = e.dimensions.filter(v), l = e.measures.filter(v).map((e) => c(e.dataItem)), u = new pe(e, t, a?.[0]?.itemsNotAffectedByFiltering), d = [u.MAIN_FIELD];
226
- s.slice(0, s.length - 1).forEach((e, t) => {
227
- d.push(`dim${t}`);
226
+ }), Fe = (e, t, r, i, s, c = {}) => {
227
+ let l = e.dimensions.filter(o), u = e.measures.filter(o).map((e) => a(e.dataItem)), d = new he(e, t, s?.[0]?.itemsNotAffectedByFiltering), f = [d.MAIN_FIELD];
228
+ l.slice(0, l.length - 1).forEach((e, t) => {
229
+ f.push(`dim${t}`);
228
230
  });
229
- let { labeling: f } = e.treemapSettings, p = (0, K.default)({}, f?.header, T.labeling.header), m = (0, K.default)({}, f?.leaf, T.labeling.leaf), h = {
230
- key: z.cells,
231
- type: F.Treemap,
231
+ let { labeling: p } = e.treemapSettings, m = (0, W.default)({}, p?.header, D.labeling.header), h = (0, W.default)({}, p?.leaf, D.labeling.leaf), g = {
232
+ key: R.cells,
233
+ type: P.Treemap,
232
234
  data: { collection: "coll" },
233
235
  settings: {
234
- numDimensions: s.length || 0,
236
+ numDimensions: l.length || 0,
235
237
  cellPadding: e.treemapSettings.cellPadding,
236
- cellRadius: e.treemapSettings.cellRadius,
237
- cellOrder: e.treemapSettings.cellOrder,
238
- branchColor: e.treemapSettings.branchColor ?? void 0,
238
+ ...n({ cellRadius: e.treemapSettings.cellRadius }),
239
+ ...n({ cellOrder: e.treemapSettings.cellOrder }),
240
+ ...n({ branchColor: e.treemapSettings.branchColor ?? void 0 }),
239
241
  headerLabels: {
240
- show: p.show,
241
- numLevels: p.numLevels,
242
- fontSize: M(p.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax)
242
+ show: m.show,
243
+ numLevels: m.numLevels,
244
+ fontSize: j(m.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax)
243
245
  },
244
246
  leafLabels: {
245
- show: m.show,
246
- fontSize: M(m.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax),
247
- showDimension: m.showDimensionValue,
248
- showMeasure: m.showMeasureValue,
249
- dynamicFontSizeEnabled: m.dynamicFontSizeEnabled
247
+ show: h.show,
248
+ fontSize: j(h.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax),
249
+ showDimension: h.showDimensionValue,
250
+ showMeasure: h.showMeasureValue,
251
+ dynamicFontSizeEnabled: h.dynamicFontSizeEnabled
250
252
  },
251
- leaf: { fill: u.getColorDefinition({
252
- ref: B.Color,
253
- dataItemId: e.coloring?.type === r.Single ? l[0] : void 0,
254
- overwriteSources: d
253
+ leaf: { fill: d.getColorDefinition({
254
+ ref: z.Color,
255
+ dataItemId: e.coloring?.type === _.Single ? u[0] : void 0,
256
+ overwriteSources: f
255
257
  }) }
256
258
  },
257
- brush: o.disable?.brushing === !0 ? void 0 : je(),
259
+ brush: c.disable?.brushing === !0 ? void 0 : Pe(),
258
260
  animations: {
259
261
  presetId: "simple-opacity",
260
262
  enabled: !0
261
263
  }
262
264
  };
263
265
  return {
264
- ...n,
265
- components: [...n.components, h]
266
+ ...r,
267
+ components: [...r.components, g]
266
268
  };
267
- }, q = new I(N.fontLight), J = new I(N.fontDark), Y = (e) => e.desc, Ne = (e, t, n) => {
268
- let r = new I(n.fonts.general.color), { showDimensionValue: i, showMeasureValue: a, fontSize: o, dynamicFontSizeEnabled: s, show: c } = t.leaf, l = s ? ({ node: e }) => Y(e).dynamicFontSize ?? void 0 : M(o, void 0, E.labelFontSizeMin, E.labelFontSizeMax);
269
+ }, G = new F(M.fontLight), K = new F(M.fontDark), q = (e) => e.desc, Ie = (e, t, n) => {
270
+ let r = new F(n.fonts.general.color), { showDimensionValue: i, showMeasureValue: a, fontSize: o, dynamicFontSizeEnabled: s, show: c } = t.leaf, l = s ? ({ node: e }) => q(e).dynamicFontSize ?? void 0 : j(o, void 0, E.labelFontSizeMin, E.labelFontSizeMax);
269
271
  return {
270
- component: z.cells,
272
+ component: R.cells,
271
273
  selector: e,
272
274
  strategy: {
273
275
  type: "rows",
@@ -281,35 +283,35 @@ var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
281
283
  return e.attrs?.id;
282
284
  },
283
285
  fill({ node: e }) {
284
- return new I(Y(e).background).betterContrast(r, q, J).rgb();
286
+ return new F(q(e).background).betterContrast(r, G, K).rgb();
285
287
  },
286
288
  linkData({ node: e }) {
287
289
  return e.data;
288
290
  },
289
291
  label({ node: e }) {
290
- return Y(e)?.label;
292
+ return q(e)?.label;
291
293
  }
292
294
  } : null, a && c !== !1 ? {
293
295
  id({ node: e }) {
294
296
  return `${e.attrs?.id}::value`;
295
297
  },
296
298
  fill({ node: e }) {
297
- return new I(Y(e).background).betterContrast(r, q, J).rgb();
299
+ return new F(q(e).background).betterContrast(r, G, K).rgb();
298
300
  },
299
301
  linkData({ node: e }) {
300
302
  return e.data;
301
303
  },
302
304
  label({ node: e, formatter: t }) {
303
- return t(V.MeasureFormatter)(Y(e)?.total, void 0, e.data);
305
+ return t(B.MeasureFormatter)(q(e)?.total, void 0, e.data);
304
306
  }
305
307
  } : null].filter((e) => e !== null)
306
308
  }
307
309
  }
308
310
  };
309
- }, X = 128, Pe = (e, t, n) => {
310
- let r = new I(n.fonts.general.color), i = M(t.header.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax), { showDimensionValue: a, showMeasureValue: o } = t.header;
311
+ }, J = 128, Le = (e, t, n) => {
312
+ let r = new F(n.fonts.general.color), i = j(t.header.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax), { showDimensionValue: a, showMeasureValue: o } = t.header;
311
313
  return {
312
- component: z.cells,
314
+ component: R.cells,
313
315
  selector: e,
314
316
  strategy: {
315
317
  type: "rows",
@@ -323,25 +325,25 @@ var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
323
325
  return e.attrs?.id;
324
326
  },
325
327
  fill({ node: e }) {
326
- return new I(Y(e).background).betterContrast(r, q, J).rgb();
328
+ return new F(q(e).background).betterContrast(r, G, K).rgb();
327
329
  },
328
330
  linkData({ node: e }) {
329
331
  return e.data;
330
332
  },
331
333
  label({ node: e, formatter: t }) {
332
- let n = Y(e), r = o ? t(V.MeasureFormatter)(n?.total) : void 0;
333
- return [a ? n?.label?.length > X - 1 ? `${n?.label?.substring(0, X - 1).replace(/\s+$/, "")}…` : n?.label : void 0, r].filter(Boolean).join(": ");
334
+ let n = q(e), r = o ? t(B.MeasureFormatter)(n?.total) : void 0;
335
+ return [a ? n?.label?.length > J - 1 ? `${n?.label?.substring(0, J - 1).replace(/\s+$/, "")}…` : n?.label : void 0, r].filter(Boolean).join(": ");
334
336
  }
335
337
  }]
336
338
  }
337
339
  }
338
340
  };
339
- }, Fe = (e, t, n, r, i, a = {}) => {
340
- let o = (0, K.default)({}, e.treemapSettings?.labeling, T.labeling), s = {
341
- type: F.Labels,
342
- key: z.labels,
341
+ }, Re = (e, t, n, r, i, a = {}) => {
342
+ let o = (0, W.default)({}, e.treemapSettings?.labeling, D.labeling), s = {
343
+ type: P.Labels,
344
+ key: R.labels,
343
345
  layout: { displayOrder: 2 },
344
- settings: { sources: [Ne(`.${H.Leaf}`, o, t), Pe(`.${H.Header}`, o, t)] },
346
+ settings: { sources: [Ie(`.${V.Leaf}`, o, t), Le(`.${V.Header}`, o, t)] },
345
347
  style: { label: "$label" },
346
348
  brush: a.disable?.brushing === !0 ? void 0 : { consume: [{
347
349
  context: k.Selection,
@@ -357,27 +359,27 @@ var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
357
359
  ...n,
358
360
  components: [...n.components, s]
359
361
  };
360
- }, Ie = () => ({ consume: [{
362
+ }, ze = () => ({ consume: [{
361
363
  context: k.Selection,
362
364
  data: [""],
363
365
  mode: O.Or,
364
366
  style: {
365
367
  active: {
366
368
  strokeWidth: 2,
367
- stroke: a.mainDarkNavy
369
+ stroke: r.mainDarkNavy
368
370
  },
369
371
  inactive: { strokeWidth: 0 }
370
372
  }
371
- }] }), Le = (e, t, n, r, i, a = {}) => {
373
+ }] }), Be = (e, t, n, r, i, a = {}) => {
372
374
  let o = {
373
- key: z.selection,
374
- type: F.Deferred,
375
+ key: R.selection,
376
+ type: P.Deferred,
375
377
  layout: { displayOrder: 10 },
376
378
  settings: { sources: [{
377
- component: z.cells,
378
- selector: P.Rect
379
+ component: R.cells,
380
+ selector: N.Rect
379
381
  }] },
380
- brush: a.disable?.brushing === !0 ? void 0 : Ie(),
382
+ brush: a.disable?.brushing === !0 ? void 0 : ze(),
381
383
  animations: {
382
384
  presetId: "simple-opacity",
383
385
  enabled: !0
@@ -387,17 +389,17 @@ var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
387
389
  ...n,
388
390
  components: [...n.components, o]
389
391
  };
390
- }, Re = (e, t, n, r, i, a, o) => {
391
- if (!e.dimensions.filter(v)[0]) return n;
392
- let s = n.collections?.[0]?.data.extract[0]?.props?.[B.Color], c;
393
- s?.field && (c = s?.field);
394
- let l = {};
395
- return l = ee(me(e, c ?? null), t, l, n.collections, o), {
392
+ }, Ve = (e, t, n, r, i, a, s) => {
393
+ if (!e.dimensions.filter(o)[0]) return n;
394
+ let c = n.collections?.[0]?.data.extract[0]?.props?.[z.Color], l;
395
+ c?.field && (l = c?.field);
396
+ let u = {};
397
+ return u = ee(ge(e, l ?? null), t, u, n.collections, s), {
396
398
  ...n,
397
- scales: l
399
+ scales: u
398
400
  };
399
- }, ze = (e, t, n) => {
400
- let r = e.dimensions.filter(v), i = e.measures.filter(v);
401
+ }, He = (e, t, n) => {
402
+ let r = e.dimensions.filter(o), i = e.measures.filter(o);
401
403
  if (!r[0] || !i[0]) return n;
402
404
  let a = {
403
405
  "$font-family": t.fonts.general.fontFamily,
@@ -411,7 +413,7 @@ var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
411
413
  },
412
414
  $title: {
413
415
  "@extend": "$label",
414
- fontSize: `${N.fieldTitle.fontSize}px`,
416
+ fontSize: `${M.fieldTitle.fontSize}px`,
415
417
  padding: 4
416
418
  }
417
419
  };
@@ -419,57 +421,57 @@ var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
419
421
  ...n,
420
422
  style: a
421
423
  };
422
- }, Be = (e, t) => t.data.label, Ve = (e, t, n, r, i, a) => {
424
+ }, Ue = (e, t) => t.data.label, Y = (e, t, n, r, i, a) => {
423
425
  let o = t;
424
426
  if (!r && i) o = n.formatter(i)(t, void 0, a);
425
427
  else if (r) {
426
- let e = typeof i == "string" ? i : le(i);
428
+ let e = typeof i == "string" ? i : ae(i);
427
429
  o = n.formatter(e)(t, void 0, a);
428
430
  }
429
431
  return {
430
432
  label: e,
431
433
  value: o
432
434
  };
433
- }, He = (e, t, n, r, i, a, o, s) => {
434
- let l = [], u = e.filter(v), d = oe(n), p = u.filter((e) => !d.has(c(e.dataItem)))[0] ?? u[0], m = (p ? f(p) : "") || p?.label || p?.dataItem.name || "", h = p ? m : "Count", g = Number(t.desc?.total), _ = t.data[B.CellValue]?.source ? t.data : void 0;
435
- return l.push(Ve(h, g, n, s, V.MeasureFormatter, _)), u.filter((e) => d.has(c(e.dataItem))).forEach((e) => {
436
- let r = c(e.dataItem), i = Object.keys(t.data).find((e) => t.data[e]?.source?.field === r);
435
+ }, We = (e, t, n, r, i, s, c, l) => {
436
+ let u = [], f = e.filter(o), p = ie(n), m = f.filter((e) => !p.has(a(e.dataItem)))[0] ?? f[0], h = (m ? d(m) : "") || m?.label || m?.dataItem.name || "", g = m ? h : "Count", _ = Number(t.desc?.total), v = t.data[z.CellValue]?.source ? t.data : void 0;
437
+ return u.push(Y(g, _, n, l, B.MeasureFormatter, v)), f.filter((e) => p.has(a(e.dataItem))).forEach((e) => {
438
+ let r = a(e.dataItem), i = Object.keys(t.data).find((e) => t.data[e]?.source?.field === r);
437
439
  if (!i) return;
438
- let a = f(e) || e.label || e.dataItem.name || "", o = Number(t.data[i]?.value);
439
- l.push(Ve(a, o, n, s, e.formatter, t.data));
440
- }), l;
441
- }, Ue = (e, t, n, r, i) => {
440
+ let o = d(e) || e.label || e.dataItem.name || "", s = Number(t.data[i]?.value);
441
+ u.push(Y(o, s, n, l, e.formatter, t.data));
442
+ }), u;
443
+ }, Ge = (e, t, n, r, i) => {
442
444
  let a = {
443
445
  placement: () => ({
444
446
  area: "target",
445
447
  type: "pointer"
446
448
  }),
447
- filter: (e) => e.filter((e) => e.type !== P.Text && e.key === z.cells)
449
+ filter: (e) => e.filter((e) => e.type !== N.Text && e.key === R.cells)
448
450
  };
449
- return a.extract = de(e, t, He, Be), ie(e, t, n, a, "tooltip", i);
450
- }, We = class extends te {
451
+ return a.extract = de(e, t, We, Ue), me(e, t, n, a, "tooltip", i);
452
+ }, Ke = class extends te {
451
453
  constructor() {
452
454
  super([
453
- Te,
454
- Re,
455
- Me,
456
- Le,
457
- fe,
458
- ke,
455
+ De,
456
+ Ve,
459
457
  Fe,
460
- ze,
461
- Ue
458
+ Be,
459
+ re,
460
+ Me,
461
+ Re,
462
+ He,
463
+ Ge
462
464
  ]);
463
465
  }
464
466
  preCompile(e, t) {
465
- let n = e.measures.filter(v)[0];
467
+ let n = e.measures.filter(o)[0];
466
468
  if (!n) return;
467
- let r = c(n.dataItem);
469
+ let r = a(n.dataItem);
468
470
  t.forEach((e) => {
469
471
  if (e.items?.length && (e.items = e.items.filter((e) => e[r] > 0), !e.items.length)) throw Error("Current data query resulted in only negative and/or null values which can not be displayed in this chart.");
470
472
  });
471
473
  }
472
- }, Z = {
474
+ }, X = {
473
475
  numDimensions: 0,
474
476
  cellPadding: 2,
475
477
  cellRadius: 0,
@@ -483,14 +485,14 @@ var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
483
485
  fontSize: 11,
484
486
  numLevels: 1
485
487
  },
486
- leaf: { fill: a.mainDarkNavy }
487
- }, Ge = (e = 0) => Array(Math.max(0, e - 1)).fill(0).map((e, t) => `dim${t}`), Ke = "__virtual__::__root__", qe = (e, t) => {
488
- let n = Ge(e.numDimensions), r = {
488
+ leaf: { fill: r.mainDarkNavy }
489
+ }, Z = (e = 0) => Array(Math.max(0, e - 1)).fill(0).map((e, t) => `dim${t}`), qe = "__virtual__::__root__", Je = (e, t) => {
490
+ let n = Z(e.numDimensions), r = {
489
491
  data: {
490
492
  label: "__root__",
491
493
  value: null
492
494
  },
493
- id: Ke,
495
+ id: qe,
494
496
  children: [],
495
497
  fill: "",
496
498
  opacity: 0
@@ -509,27 +511,27 @@ var we = /* @__PURE__ */ e(y()), z = /* @__PURE__ */ function(e) {
509
511
  fill: e.branchColor ?? "rgba(150, 150, 150, 0.3)"
510
512
  })), t]);
511
513
  });
512
- let o = he(r);
514
+ let o = _e(r);
513
515
  return o.each((e) => delete e.data.children), o;
514
- }, Je = (e) => e + Math.max(12, e * .5), Ye = (e, t, n) => e.y1 - e.y0 >= t + 12 && e.x1 - e.x0 >= n * 2;
515
- function Xe(e) {
516
- let { cellPadding: t, headerLabels: n } = e, { fontSize: r } = n, i = Je(r);
517
- Ce().size([e.rect.width, e.rect.height]).paddingInner((e) => e.height > 1 ? t : 0).paddingOuter((e) => e.depth ? t : 0).paddingTop((n) => n.height && n.depth && e.headerLabels.show && e.headerLabels.numLevels >= n.depth && Ye(n, i, r) ? t + i : n.depth ? t : 0)(e.root);
516
+ }, Ye = (e) => e + Math.max(12, e * .5), Xe = (e, t, n) => e.y1 - e.y0 >= t + 12 && e.x1 - e.x0 >= n * 2;
517
+ function Ze(e) {
518
+ let { cellPadding: t, headerLabels: n } = e, { fontSize: r } = n, i = Ye(r);
519
+ Te().size([e.rect.width, e.rect.height]).paddingInner((e) => e.height > 1 ? t : 0).paddingOuter((e) => e.depth ? t : 0).paddingTop((n) => n.height && n.depth && e.headerLabels.show && e.headerLabels.numLevels >= n.depth && Xe(n, i, r) ? t + i : n.depth ? t : 0)(e.root);
518
520
  }
519
- var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et = .12, tt = 24, nt = (e, t) => {
521
+ var Qe = 8, $e = "rgba(250, 250, 250, 0.8)", et = "rgba(60, 60, 60, 0.8)", tt = .12, nt = 24, rt = (e, t) => {
520
522
  let n = null, r = null;
521
- return !e.height && t.leafLabels?.show ? (r = et * Math.sqrt((e.y1 - e.y0) * (e.x1 - e.x0)), n = t.leafLabels?.dynamicFontSizeEnabled && r < Ze ? null : H.Leaf) : e.height && t.headerLabels?.show && t.headerLabels.numLevels >= e.depth && (n = H.Header), {
523
+ return !e.height && t.leafLabels?.show ? (r = tt * Math.sqrt((e.y1 - e.y0) * (e.x1 - e.x0)), n = t.leafLabels?.dynamicFontSizeEnabled && r < Qe ? null : V.Leaf) : e.height && t.headerLabels?.show && t.headerLabels.numLevels >= e.depth && (n = V.Header), {
522
524
  labelTarget: n,
523
525
  leafDynamicFontSize: r
524
526
  };
525
- }, rt = (e, t) => {
526
- let n = [...Ge(e.numDimensions), "cell"].map((t, n) => Math.max(0, (e.cellRadius ?? Z.cellRadius) - (e.cellPadding ?? Z.cellPadding) * n * .25)), r = new I(e.branchColor ?? "rgba(150, 150, 150, 0.3)").isDark() ? $e : Qe, i = e.headerLabels?.fontSize ?? Z.headerLabels.fontSize, o = Je(i);
527
+ }, it = (e, t) => {
528
+ let n = [...Z(e.numDimensions), "cell"].map((t, n) => Math.max(0, (e.cellRadius ?? X.cellRadius) - (e.cellPadding ?? X.cellPadding) * n * .25)), i = new F(e.branchColor ?? "rgba(150, 150, 150, 0.3)").isDark() ? et : $e, a = e.headerLabels?.fontSize ?? X.headerLabels.fontSize, o = Ye(a);
527
529
  return t.descendants().slice(1).filter((e) => (e.x1 - e.x0) * (e.y1 - e.y0) >= 1).map((t) => {
528
- let s = (t.children?.length ?? 0) > 0, c = t.y1 - t.y0, { labelTarget: l, leafDynamicFontSize: u } = nt(t, e), d = t.data.fill || a.black, f = n[t.depth - 1];
530
+ let s = (t.children?.length ?? 0) > 0, c = t.y1 - t.y0, { labelTarget: l, leafDynamicFontSize: u } = rt(t, e), d = t.data.fill || r.black, f = n[t.depth - 1];
529
531
  return {
530
532
  id: t.data.id,
531
- type: P.Rect,
532
- tag: l === H.Header ? Ye(t, o, i) ? l : void 0 : l && c >= tt ? l : void 0,
533
+ type: N.Rect,
534
+ tag: l === V.Header ? Xe(t, o, a) ? l : void 0 : l && c >= nt ? l : void 0,
533
535
  x: t.x0,
534
536
  y: t.y0,
535
537
  rx: f,
@@ -537,7 +539,7 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
537
539
  width: t.x1 - t.x0,
538
540
  height: t.y1 - t.y0,
539
541
  fill: d,
540
- stroke: r,
542
+ stroke: i,
541
543
  strokeWidth: +!s,
542
544
  opacity: t.data.opacity ?? 1,
543
545
  desc: {
@@ -549,17 +551,17 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
549
551
  data: t.data.data
550
552
  };
551
553
  });
552
- }, it = {
553
- [d.DESC]: (e, t) => t.height - e.height || (t.value ?? 0) - (e.value ?? 0),
554
- [d.ASC]: (e, t) => t.height - e.height || (e.value ?? 0) - (t.value ?? 0)
555
554
  }, at = {
555
+ [h.DESC]: (e, t) => t.height - e.height || (t.value ?? 0) - (e.value ?? 0),
556
+ [h.ASC]: (e, t) => t.height - e.height || (e.value ?? 0) - (t.value ?? 0)
557
+ }, ot = {
556
558
  require: [
557
559
  "resolver",
558
560
  "chart",
559
561
  "renderer"
560
562
  ],
561
563
  defaultSettings: {
562
- settings: Z,
564
+ settings: X,
563
565
  style: {
564
566
  title: "$title",
565
567
  label: "$label"
@@ -570,28 +572,28 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
570
572
  if (!n) return [];
571
573
  let { items: r } = n.resolve({
572
574
  data: { items: e.items },
573
- defaults: { ...Z.leaf },
575
+ defaults: { ...X.leaf },
574
576
  settings: { ...t.leaf }
575
- }), i = qe(t, r);
577
+ }), i = Je(t, r);
576
578
  i.sum((e) => e.children?.length ? 0 : e.data.cellValue?.value || 0);
577
- let a = t.cellOrder ? it[t.cellOrder] : void 0;
578
- return a && i.sort(a), Xe({
579
+ let a = t.cellOrder ? at[t.cellOrder] : void 0;
580
+ return a && i.sort(a), Ze({
579
581
  cellPadding: t.cellPadding,
580
582
  rect: this.rect,
581
583
  root: i,
582
584
  headerLabels: t.headerLabels
583
- }), rt(t, i);
585
+ }), it(t, i);
584
586
  }
585
- }, ot = " ▼", Q = "...", $ = (e, t, n, r) => {
587
+ }, st = " ▼", Q = "...", $ = (e, t, n, r) => {
586
588
  let i = {
587
589
  text: t,
588
590
  fontFamily: n,
589
591
  fontSize: r
590
592
  };
591
593
  return e.measureText(i).width;
592
- }, st = (e, t, n, r, i) => {
594
+ }, ct = (e, t, n, r, i) => {
593
595
  if (t <= 0 || $(n, e, r, i) <= t) return e;
594
- let a = e.endsWith(ot), o = a ? ot : "", s = a ? e.slice(0, -2) : e;
596
+ let a = e.endsWith(st), o = a ? st : "", s = a ? e.slice(0, -2) : e;
595
597
  if ($(n, `${Q}${o}`, r, i) > t) return Q;
596
598
  let c = 0, l = s.length;
597
599
  for (; c < l;) {
@@ -599,12 +601,12 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
599
601
  $(n, `${s.slice(0, e)}${Q}${o}`, r, i) <= t ? c = e : l = e - 1;
600
602
  }
601
603
  return `${s.slice(0, c)}${Q}${o}`;
602
- }, ct = {
604
+ }, lt = {
603
605
  require: ["renderer"],
604
606
  defaultSettings: { settings: {
605
607
  dimensionLabel: "",
606
608
  measureLabel: "",
607
- backgroundColor: Z.branchColor ?? "rgba(150, 150, 150, 0.3)",
609
+ backgroundColor: X.branchColor ?? "rgba(150, 150, 150, 0.3)",
608
610
  fontSize: "12px",
609
611
  color: "#000",
610
612
  paddingLeft: 5,
@@ -623,7 +625,7 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
623
625
  render() {
624
626
  let { renderer: e } = this;
625
627
  if (!e) return [];
626
- let { dimensionLabel: t, measureLabel: n, backgroundColor: r, fontFamily: i = "Arial", fontSize: a, color: o, paddingLeft: s, paddingRight: c, labelGap: l } = this.settings.settings, u = n ? $(e, n, i, a) : 0, d = this.rect.width - c, f = d - u, p = Math.max(Math.min(n ? f - l - s : this.rect.width - s - c, this.rect.width / 2), 0), m = t ? st(t, p, e, i, a) : "", h = m ? $(e, m, i, a) : 0, g = [{
628
+ let { dimensionLabel: t, measureLabel: n, backgroundColor: r, fontFamily: i = "Arial", fontSize: a, color: o, paddingLeft: s, paddingRight: c, labelGap: l } = this.settings.settings, u = n ? $(e, n, i, a) : 0, d = this.rect.width - c, f = d - u, p = Math.max(Math.min(n ? f - l - s : this.rect.width - s - c, this.rect.width / 2), 0), m = t ? ct(t, p, e, i, a) : "", h = m ? $(e, m, i, a) : 0, g = [{
627
629
  type: "rect",
628
630
  x: 0,
629
631
  y: 0,
@@ -676,10 +678,10 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
676
678
  }), g;
677
679
  }
678
680
  };
679
- function lt(e) {
680
- e.component(F.Treemap, at), e.component(U, ct);
681
+ function ut(e) {
682
+ e.component(P.Treemap, ot), e.component(H, lt);
681
683
  }
682
- var ut = {
684
+ var dt = {
683
685
  require: [
684
686
  "resolver",
685
687
  "chart",
@@ -693,7 +695,7 @@ var ut = {
693
695
  return e.sources.forEach((e) => {
694
696
  t.component(e.component) && t.findShapes(e.selector ?? "").filter((t) => t.key === e.component).forEach((e) => {
695
697
  e.attrs && n.push({
696
- type: P.Rect,
698
+ type: N.Rect,
697
699
  height: e.attrs.height,
698
700
  width: e.attrs.width,
699
701
  x: e.attrs.x,
@@ -701,7 +703,7 @@ var ut = {
701
703
  rx: e.attrs.rx,
702
704
  ry: e.attrs.ry,
703
705
  fill: "transparent",
704
- stroke: a.mainDarkNavy,
706
+ stroke: r.mainDarkNavy,
705
707
  strokeWidth: 0,
706
708
  data: e.data,
707
709
  collider: { type: null }
@@ -710,34 +712,34 @@ var ut = {
710
712
  }), n;
711
713
  }
712
714
  };
713
- function dt(e) {
714
- e.component(F.Deferred, ut);
715
+ function ft(e) {
716
+ e.component(P.Deferred, dt);
715
717
  }
716
- var ft = w(), pt = S(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
717
- let a = x(), [o] = (0, we.useState)(() => new We()), l = b(), u = t || _, d = C(), f = se();
718
- if (!e || !s(e) || !r) return null;
719
- let p = d.targetDataItemId;
720
- if (!p && d.targetInternalKey) {
718
+ var pt = T(), mt = C(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
719
+ let o = x(), [s] = (0, Ee.useState)(() => new Ke()), c = b(), l = t || f, d = w(), m = le();
720
+ if (!e || !p(e) || !r) return null;
721
+ let h = d.targetDataItemId;
722
+ if (!h && d.targetInternalKey) {
721
723
  let t = e.dimensions.find((e) => e.dataItem.internalKey === d.targetInternalKey);
722
- t && (p = c(t.dataItem));
724
+ t && (h = a(t.dataItem));
723
725
  }
724
- let m = {
726
+ let g = {
725
727
  ...i,
726
728
  valuePickerMode: !!d.activeKey,
727
- valuePickerTargetDataItemId: p ?? void 0
728
- }, g = {
729
+ valuePickerTargetDataItemId: h ?? void 0
730
+ }, _ = {
729
731
  ...i,
730
732
  disable: {
731
733
  ...i.disable,
732
734
  multiDimSelection: !0
733
735
  }
734
- }, v = o.compile(e, u, n, r, m, h.Treemap, a, l, f);
735
- return v ? /* @__PURE__ */ (0, ft.jsx)(ae, {
736
- config: g,
736
+ }, v = s.compile(e, l, n, r, g, u.Treemap, o, c, m);
737
+ return v ? /* @__PURE__ */ (0, pt.jsx)(se, {
738
+ config: _,
737
739
  definition: v,
738
740
  size: r,
739
741
  vSpec: e,
740
- escobarPlugins: [lt, dt]
742
+ escobarPlugins: [ut, ft]
741
743
  }) : null;
742
744
  });
743
- export { pt as Treemap };
745
+ export { mt as Treemap };