@astrato-io/visualizations 0.10.0 → 0.10.1

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 (114) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +3 -3
  3. package/VISUALIZATION_DEFINITIONS.md +65 -12
  4. package/chunks/{Button-CCF851ea.js → Button-Dn3rJrYf.js} +2 -2
  5. package/chunks/{CircularProgress-yupH6YWs.js → CircularProgress-BFeu06Yb.js} +4 -4
  6. package/chunks/{FieldTypeIcon-D_MzsdfY.js → FieldTypeIcon-DrMoGpHJ.js} +2 -2
  7. package/chunks/{LinearProgress-CyFjN4px.js → LinearProgress-ClO6GUjN.js} +2 -2
  8. package/chunks/{MenuOption-CQpT79AP.js → MenuOption-Czc34u4q.js} +7 -7
  9. package/chunks/{Title-C-p4ZarD.js → Title-BgYnaVTR.js} +3 -3
  10. package/chunks/{_createAggregator-BF4qG9XK.js → _createAggregator-BMu9uRax.js} +8 -8
  11. package/chunks/{app-filter-bar.compiler-8fxCo2q7.js → app-filter-bar.compiler-CVir0wkl.js} +3 -3
  12. package/chunks/{bar-layout-DStC-GNV.js → bar-layout-C_UgRlVl.js} +2 -2
  13. package/chunks/{bar.compiler-CQAu8KL8.js → bar.compiler-DYuFdi9J.js} +8 -8
  14. package/chunks/{builder-CScg1TOS.js → builder-C-TKA-My.js} +11 -11
  15. package/chunks/{coloring-9jU3s_-p.js → coloring-BtnPiQ_o.js} +16 -16
  16. package/chunks/{createSimplePaletteValueFilter-C4hZpCdn.js → createSimplePaletteValueFilter--zrZxRV9.js} +1 -1
  17. package/chunks/defaults-Dtk7fg3C.js +3 -0
  18. package/chunks/{definitions-C4grxhye.js → definitions-CT304NDn.js} +77 -51
  19. package/chunks/{escobar-CjirINHP.js → escobar-CvEV2ES1.js} +6126 -6059
  20. package/chunks/{extend-preset-D-l9u_we.js → extend-preset-D9-JP92b.js} +396 -396
  21. package/chunks/{filter.compiler-lji2Acgn.js → filter.compiler-CXeZznks.js} +7 -7
  22. package/chunks/{filtering-C1zakrrX.js → filtering-8_bFv-jb.js} +84 -84
  23. package/chunks/{handlers-ZviIUC-j.js → handlers-C6CZ0XJA.js} +5620 -5608
  24. package/chunks/{icon-picker-styles-Bj80ZUBK.js → icon-picker-styles-BXiJ1SZS.js} +2 -2
  25. package/chunks/{isEqual-Ch9OEye3.js → isEqual-D8Ay63xR.js} +1 -1
  26. package/chunks/{isFocusVisible-CgMP0qkR.js → isFocusVisible-Bu8gGZu5.js} +1 -1
  27. package/chunks/{line.compiler-De5fiKuR.js → line.compiler-DmHpmQCC.js} +4 -4
  28. package/chunks/{logger-CKRjhSHQ.js → logger-DdZpR7xZ.js} +65 -65
  29. package/chunks/{map.compiler-CKzorLgK.js → map.compiler-Q_Y1Pvat.js} +12 -14
  30. package/chunks/{metadata-Bb9pTXrq.js → metadata-BQm_TXI1.js} +1 -1
  31. package/chunks/{number.compiler-CaTmJkmi.js → number.compiler-DQdg6zTy.js} +4 -4
  32. package/chunks/{operations-DZoY50VX.js → operations-DKQWuLL7.js} +9469 -9451
  33. package/chunks/{range-D1BTmFMp.js → range-BdhzvYQ_.js} +2 -2
  34. package/chunks/{react-dom-Dgv2azN2.js → react-dom-BGP4tbXV.js} +1 -1
  35. package/chunks/{render-wrappers-_P3xwu5A.js → render-wrappers-BZpyDnJy.js} +1 -1
  36. package/chunks/{requirements-NHNrR8Ie.js → requirements-e8Fe96ag.js} +29 -29
  37. package/chunks/{shared-UitWpq1J.js → shared-C_2F90xq.js} +478 -472
  38. package/chunks/{standalone-wgFAVnnm.js → standalone-4MsKiqs0.js} +130 -130
  39. package/chunks/standalone-B794g9pE.js +1012 -0
  40. package/chunks/{standalone-BBu90BhK.js → standalone-B8ZSqauS.js} +59 -59
  41. package/chunks/standalone-BA2YXyJS.js +422 -0
  42. package/chunks/{standalone-DtBk_iUz.js → standalone-BDrXVxlP.js} +4 -4
  43. package/chunks/{standalone-U0WJwFlG.js → standalone-BE_ONgiG.js} +64 -64
  44. package/chunks/{standalone-BOzHA_d4.js → standalone-BTY3w_JA.js} +24 -24
  45. package/chunks/{standalone-BEekPuA12.js → standalone-BgumbdaJ2.js} +101 -101
  46. package/chunks/{standalone-Bnnr87pc.js → standalone-BkbiH-o8.js} +174 -174
  47. package/chunks/{standalone-xGV0dqPV.js → standalone-Blh4qejk.js} +197 -197
  48. package/chunks/{standalone-DxBAyqAu.js → standalone-CXY4FpF7.js} +278 -277
  49. package/chunks/{standalone-CVknVdUC.js → standalone-CY_kjarf.js} +18 -18
  50. package/chunks/{standalone-BapqaniK.js → standalone-CaTxAydz.js} +54 -54
  51. package/chunks/{standalone-CRdDZYeM.js → standalone-Cc98Pdr6.js} +829 -829
  52. package/chunks/standalone-Cl0TSfqC.js +396 -0
  53. package/chunks/{standalone-B0U6c3su.js → standalone-CsoMmE9T.js} +80 -80
  54. package/chunks/standalone-DH0xTEes.js +2 -0
  55. package/chunks/{standalone-ByKKqT5L.js → standalone-DHRalbVO.js} +268 -268
  56. package/chunks/{standalone-CbPk8bKn.js → standalone-DNh9NcMa.js} +109 -109
  57. package/chunks/standalone-DcnHjNnC.js +2 -0
  58. package/chunks/{standalone-Ck63MZzj.js → standalone-DflyWtuR.js} +107 -107
  59. package/chunks/standalone-DrHdGkY7.js +762 -0
  60. package/chunks/standalone-c_rROMtx.js +287 -0
  61. package/chunks/{standalone-DibjA73M.js → standalone-drcFLeN6.js} +2 -2
  62. package/chunks/{standalone-swGs70tD.js → standalone-wOWRCpdn.js} +26 -26
  63. package/chunks/{standalone-DCFY1MAV.js → standalone-z0o52o5t.js} +4191 -4191
  64. package/chunks/{table.compiler-OWSx5MOq.js → table.compiler-COaHE9VD.js} +18 -18
  65. package/chunks/{useFieldName-B8iCYyw1.js → useFieldName-CdnCWzhd.js} +1 -1
  66. package/chunks/{utils-3Igg6xmO.js → utils-DganVptf.js} +491 -483
  67. package/chunks/{view-DdMLZySj.js → view-Bzlros43.js} +158 -158
  68. package/chunks/{visualization-filters-CzvFHE6M.js → visualization-filters-D7i6oh1Z.js} +23 -12
  69. package/chunks/{with-html-element-DOfkR3C1.js → with-html-element-CiIhFEa5.js} +2497 -2497
  70. package/definitions.js +2 -2
  71. package/docs/operations/astrato-app-filter-bar.md +1 -1
  72. package/docs/operations/bar.md +1 -1
  73. package/docs/operations/combo.md +1 -1
  74. package/docs/operations/date-picker.md +1 -1
  75. package/docs/operations/distribution-gauge.md +1 -1
  76. package/docs/operations/dot.md +1 -1
  77. package/docs/operations/filter.md +1 -1
  78. package/docs/operations/gauge.md +1 -1
  79. package/docs/operations/heatMap.md +1 -1
  80. package/docs/operations/histogram.md +1 -1
  81. package/docs/operations/iframe.md +1 -1
  82. package/docs/operations/image.md +1 -1
  83. package/docs/operations/index.md +2 -2
  84. package/docs/operations/line.md +19 -1
  85. package/docs/operations/number.md +1 -1
  86. package/docs/operations/pie.md +1 -1
  87. package/docs/operations/radar.md +1 -1
  88. package/docs/operations/sankey.md +1 -1
  89. package/docs/operations/scatter.md +1 -1
  90. package/docs/operations/shape.md +1 -1
  91. package/docs/operations/simpleTextObject.md +1 -1
  92. package/docs/operations/slider.md +1 -1
  93. package/docs/operations/table.md +1 -1
  94. package/docs/operations/tree.md +1 -1
  95. package/docs/operations/treemap.md +1 -1
  96. package/docs/operations/waterfall.md +1 -1
  97. package/docs/operations/word-cloud.md +1 -1
  98. package/getters.js +2 -2
  99. package/index.js +54 -54
  100. package/metadata.js +2 -2
  101. package/operations.js +5 -5
  102. package/package.json +67 -67
  103. package/src/definitions/index.d.ts +7 -1
  104. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +31 -5
  105. package/src/definitions/model/definitions/types/compilation.types.d.ts +4 -1
  106. package/src/types.d.ts +28 -28
  107. package/chunks/defaults-cyNhn37t.js +0 -3
  108. package/chunks/standalone-BR2JuRIC.js +0 -422
  109. package/chunks/standalone-BwJqDj2Z.js +0 -396
  110. package/chunks/standalone-CRfDOO1x.js +0 -287
  111. package/chunks/standalone-DZDGX3aa.js +0 -518
  112. package/chunks/standalone-DhfgeJIk.js +0 -1012
  113. package/chunks/standalone-KMQPsNsq.js +0 -2
  114. package/chunks/standalone-MBLSvsrY.js +0 -2
@@ -1,57 +1,57 @@
1
1
  import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
- import { Fo as t, Pc as n, Qr as r, Ra as i, cl as a, hc as o, in as s, oa as c, rc as l, rr as u, vc as d } from "./visualization-filters-CzvFHE6M.js";
3
- import { N as f, ci as p, jt as m, s as h, zr as g } from "./utils-3Igg6xmO.js";
4
- import { t_ as _, v_ as v } from "./handlers-ZviIUC-j.js";
2
+ import { Fc as t, Io as n, Qr as r, gc as i, ic as a, in as o, ll as s, rr as c, sa as l, yc as u, za as d } from "./visualization-filters-D7i6oh1Z.js";
3
+ import { N as f, ci as p, jt as m, s as h, zr as g } from "./utils-DganVptf.js";
4
+ import { n_ as _, y_ as v } from "./handlers-C6CZ0XJA.js";
5
5
  import { t as y } from "./label-format-type-C46pzgx7.js";
6
- import "./logger-CKRjhSHQ.js";
7
- import { B as b, Dt as x, I as S, L as C, St as w, Vt as T, Xt as E, at as ee, bt as te, cn as D, ct as O, i as k, in as A, ln as j, lt as ne, n as re, nt as ie, ot as ae, qt as M, rt as oe, tt as N, un as se, vn as P, z as F } from "./escobar-CjirINHP.js";
8
- import { _ as I } from "./MenuOption-CQpT79AP.js";
9
- import { t as L } from "./coloring-9jU3s_-p.js";
6
+ import "./logger-DdZpR7xZ.js";
7
+ import { H as b, L as x, Qt as S, R as C, St as w, Ut as ee, V as T, Yt as E, _ as D, b as O, bn as k, dn as A, dt as te, fn as ne, i as re, kt as ie, n as ae, on as oe, un as j, ut as se, v as M, wt as N, x as P, z as F } from "./escobar-CvEV2ES1.js";
8
+ import { _ as I } from "./MenuOption-Czc34u4q.js";
9
+ import { t as L } from "./coloring-BtnPiQ_o.js";
10
10
  import { t as R } from "./set-coloring-datafield-B3uIS1Pe.js";
11
- var z = /* @__PURE__ */ e(p()), B = (e, t, a) => {
12
- let { coloring: o } = e || {}, s = o?.fieldId, c = e.dimensions.filter((e) => r(e)), l = e.measures.filter((e) => r(e)), u = l.filter((e) => e.role === i.PIE_CHART_SLICE), f = l.filter((e) => e.role === i.PIE_CHART_LENGTH);
13
- s || (e.coloring?.type === d.Gradient ? s = n(u[0]?.dataItem) : e.coloring?.type === d.Categorical && (s = n(c[0]?.dataItem))), te(a, 0, { color: { field: s } });
14
- let p = x(R(e, s ?? null), t, {});
11
+ var z = /* @__PURE__ */ e(p()), B = (e, n, i) => {
12
+ let { coloring: a } = e || {}, o = a?.fieldId, s = e.dimensions.filter((e) => r(e)), c = e.measures.filter((e) => r(e)), l = c.filter((e) => e.role === d.PIE_CHART_SLICE), f = c.filter((e) => e.role === d.PIE_CHART_LENGTH);
13
+ o || (e.coloring?.type === u.Gradient ? o = t(l[0]?.dataItem) : e.coloring?.type === u.Categorical && (o = t(s[0]?.dataItem))), w(i, 0, { color: { field: o } });
14
+ let p = ie(R(e, o ?? null), n, {});
15
15
  if (f.length > 0) {
16
- let e = n(f[0]?.dataItem);
16
+ let e = t(f[0]?.dataItem);
17
17
  p[e] = { data: { field: e } };
18
18
  }
19
19
  return {
20
- ...a,
20
+ ...i,
21
21
  scales: p
22
22
  };
23
23
  }, V = {
24
24
  num: "num",
25
25
  rad: "rad",
26
26
  group: "group"
27
- }, H = (e, t, a) => {
28
- if (!e.dimensions[0]) return a;
29
- let o = e.measures.filter((e) => r(e)), s = C((e.supportingMeasures ?? []).filter((e) => r(e))), c = e.dimensions.filter((e) => r(e))?.[0], l = o.filter((e) => e.role === i.PIE_CHART_SLICE)?.[0], u = o.filter((e) => e.role === i.PIE_CHART_LENGTH)?.[0], d = n(l?.dataItem), f = n(u?.dataItem), p = n(c?.dataItem), m = {
30
- [V.num]: l?.dataItem?.name ? { field: d } : void 0,
31
- [V.rad]: u?.dataItem?.name ? { field: f } : void 0,
32
- ...s
27
+ }, H = (e, n, i) => {
28
+ if (!e.dimensions[0]) return i;
29
+ let a = e.measures.filter((e) => r(e)), o = M((e.supportingMeasures ?? []).filter((e) => r(e))), s = e.dimensions.filter((e) => r(e))?.[0], c = a.filter((e) => e.role === d.PIE_CHART_SLICE)?.[0], l = a.filter((e) => e.role === d.PIE_CHART_LENGTH)?.[0], u = t(c?.dataItem), f = t(l?.dataItem), p = t(s?.dataItem), m = {
30
+ [V.num]: c?.dataItem?.name ? { field: u } : void 0,
31
+ [V.rad]: l?.dataItem?.name ? { field: f } : void 0,
32
+ ...o
33
33
  };
34
- d && (m[d] = { field: d }), f && (m[f] = { field: f });
34
+ u && (m[u] = { field: u }), f && (m[f] = { field: f });
35
35
  let h = [{
36
- key: D.Collection,
36
+ key: j.Collection,
37
37
  data: { extract: [{
38
38
  field: p,
39
39
  props: m
40
40
  }] }
41
41
  }];
42
42
  return {
43
- ...a,
43
+ ...i,
44
44
  collections: h
45
45
  };
46
- }, U = "pie-alternates-switcher", W = "pie-alternates-switcher", G = (e) => s(e) || e.label || e.dataItem?.name || "Field", K = (e, t, r, i) => {
47
- let o = r ? n(r.dataItem) : void 0;
46
+ }, U = "pie-alternates-switcher", W = "pie-alternates-switcher", G = (e) => o(e) || e.label || e.dataItem?.name || "Field", K = (e, n, r, i) => {
47
+ let a = r ? t(r.dataItem) : void 0;
48
48
  return {
49
49
  type: "native",
50
50
  key: `${W}-interaction`,
51
- events: { click(n) {
52
- let s = this.element.getBoundingClientRect(), c = {
53
- x: n.clientX - s.left,
54
- y: n.clientY - s.top
51
+ events: { click(t) {
52
+ let o = this.element.getBoundingClientRect(), c = {
53
+ x: t.clientX - o.left,
54
+ y: t.clientY - o.top
55
55
  }, l = this.chart.shapesAt(c, {
56
56
  components: [{
57
57
  key: W,
@@ -59,39 +59,39 @@ var z = /* @__PURE__ */ e(p()), B = (e, t, a) => {
59
59
  }],
60
60
  propagation: "stop"
61
61
  }).find((e) => e.data?.target === "measure" || e.data?.target === "dimension");
62
- if (l?.data?.target === "measure" && r && o) {
63
- i(P.Text, "click", `text-${o}`, n, l, {
64
- dataItemType: a.Measure,
62
+ if (l?.data?.target === "measure" && r && a) {
63
+ i(k.Text, "click", `text-${a}`, t, l, {
64
+ dataItemType: s.Measure,
65
65
  dataItemRole: r.role
66
66
  });
67
67
  return;
68
68
  }
69
- l?.data?.target === "dimension" && e && i(P.Text, "click", `text-${e}`, n, l, {
70
- dataItemType: a.Dimension,
71
- dataItemRole: t
69
+ l?.data?.target === "dimension" && e && i(k.Text, "click", `text-${e}`, t, l, {
70
+ dataItemType: s.Dimension,
71
+ dataItemRole: n
72
72
  });
73
73
  } }
74
74
  };
75
- }, ce = (e, o, s, c, l, d, f, p) => {
76
- let m = u(e.dimensions, e.enableAlternate, d?.isPrintMode), h = e.dimensions.filter((e) => r(e)), g = h[0], _ = g ? n(g.dataItem) : void 0, v = e.measures.filter((e) => e.role === i.PIE_CHART_SLICE), y = u(v, e.enableAlternate, d?.isPrintMode), b = v.filter((e) => r(e))[0], x = m && h.length ? h.map((e) => G(e)).join(", ") : void 0, S = y && b ? G(b) : void 0;
77
- if (!x && !S) return s;
75
+ }, ce = (e, i, a, o, l, u, f, p) => {
76
+ let m = c(e.dimensions, e.enableAlternate, u?.isPrintMode), h = e.dimensions.filter((e) => r(e)), g = h[0], _ = g ? t(g.dataItem) : void 0, v = e.measures.filter((e) => e.role === d.PIE_CHART_SLICE), y = c(v, e.enableAlternate, u?.isPrintMode), b = v.filter((e) => r(e))[0], x = m && h.length ? h.map((e) => G(e)).join(", ") : void 0, S = y && b ? G(b) : void 0;
77
+ if (!x && !S) return a;
78
78
  let C = {
79
79
  type: U,
80
80
  key: W,
81
- dimensionDataItemType: _ ? a.Dimension : void 0,
81
+ dimensionDataItemType: _ ? s.Dimension : void 0,
82
82
  dimensionDataItemRole: g?.role,
83
- measureDataItemType: b ? a.Measure : void 0,
83
+ measureDataItemType: b ? s.Measure : void 0,
84
84
  measureDataItemRole: b?.role,
85
85
  layout: {
86
- dock: t.Bottom,
86
+ dock: n.Bottom,
87
87
  displayOrder: 0
88
88
  },
89
89
  settings: {
90
- dimensionLabel: x ? M(x) : void 0,
91
- measureLabel: S ? M(S) : void 0,
92
- fontFamily: o.fonts.general.fontFamily ?? void 0,
93
- fontSize: `${j.fieldTitle.fontSize}px`,
94
- color: o.fonts.general.color,
90
+ dimensionLabel: x ? E(x) : void 0,
91
+ measureLabel: S ? E(S) : void 0,
92
+ fontFamily: i.fonts.general.fontFamily ?? void 0,
93
+ fontSize: `${A.fieldTitle.fontSize}px`,
94
+ color: i.fonts.general.color,
95
95
  paddingLeft: 5,
96
96
  paddingRight: 5,
97
97
  paddingVertical: 5,
@@ -99,9 +99,9 @@ var z = /* @__PURE__ */ e(p()), B = (e, t, a) => {
99
99
  }
100
100
  }, w = p ? [K(_, g?.role, b, p)] : [];
101
101
  return {
102
- ...s,
103
- components: [...s.components, C],
104
- interactions: s.interactions ? [...s.interactions, ...w] : w
102
+ ...a,
103
+ components: [...a.components, C],
104
+ interactions: a.interactions ? [...a.interactions, ...w] : w
105
105
  };
106
106
  }, q = {
107
107
  outerRadius: .8,
@@ -120,16 +120,16 @@ var z = /* @__PURE__ */ e(p()), B = (e, t, a) => {
120
120
  function J(e) {
121
121
  return e.pieSettings?.donut ?? !1;
122
122
  }
123
- var le = (e, t, a, o, s, c) => {
124
- let l = e.measures.filter((e) => r(e)), u = l.filter((e) => e.role === i.PIE_CHART_SLICE), d = l.filter((e) => e.role === i.PIE_CHART_LENGTH), f = u[0], p = d[0], m = new L(e, t, s?.[0]?.itemsNotAffectedByFiltering), h = J(e) ? q.donut.innerRadius : 0, g = f?.dataLabels?.show === !1 ? q.outerRadiusWithoutLabels : q.outerRadius, _ = e.pieSettings?.cornerRadius ?? (J(e) ? q.donut.cornerRadius : q.cornerRadius), v = e.pieSettings?.strokeEnabled ?? q.strokeEnabled, y = e.pieSettings?.strokeWidth ?? q.strokeWidth, b = e.pieSettings?.strokeColor ?? q.strokeColor;
123
+ var le = (e, n, i, a, o, s) => {
124
+ let c = e.measures.filter((e) => r(e)), l = c.filter((e) => e.role === d.PIE_CHART_SLICE), u = c.filter((e) => e.role === d.PIE_CHART_LENGTH), f = l[0], p = u[0], m = new L(e, n, o?.[0]?.itemsNotAffectedByFiltering), h = J(e) ? q.donut.innerRadius : 0, g = f?.dataLabels?.show === !1 ? q.outerRadiusWithoutLabels : q.outerRadius, _ = e.pieSettings?.cornerRadius ?? (J(e) ? q.donut.cornerRadius : q.cornerRadius), v = e.pieSettings?.strokeEnabled ?? q.strokeEnabled, y = e.pieSettings?.strokeWidth ?? q.strokeWidth, b = e.pieSettings?.strokeColor ?? q.strokeColor;
125
125
  if (p) {
126
- let t = g, r = J(e) ? q.donut.multiMeasureMinRadius : q.multiMeasureMinRadius;
127
- g = (e) => e.resources.scale(n(p.dataItem))(e.datum.rad.value) * (t - r) + r;
126
+ let n = g, r = J(e) ? q.donut.multiMeasureMinRadius : q.multiMeasureMinRadius;
127
+ g = (e) => e.resources.scale(t(p.dataItem))(e.datum.rad.value) * (n - r) + r;
128
128
  }
129
129
  let x = {
130
- type: P.Pie,
131
- key: `${P.Pie}`,
132
- data: { collection: D.Collection },
130
+ type: k.Pie,
131
+ key: `${k.Pie}`,
132
+ data: { collection: j.Collection },
133
133
  animations: {
134
134
  enabled: !0,
135
135
  presetId: "pie-chart"
@@ -143,14 +143,14 @@ var le = (e, t, a, o, s, c) => {
143
143
  outerRadius: g,
144
144
  fill: m.getColorDefinition({ ref: "color" })
145
145
  } },
146
- brush: E([""], c, { valuePickerMode: c?.valuePickerMode })
146
+ brush: S([""], s, { valuePickerMode: s?.valuePickerMode })
147
147
  };
148
148
  return {
149
- ...a,
150
- components: [...a.components, x]
149
+ ...i,
150
+ components: [...i.components, x]
151
151
  };
152
152
  }, ue = (e, t, n) => ({ data: i, formatter: a }) => {
153
- let o = e.dimensions.filter((e) => r(e))[0], s = i.value, c = i[V.num].value, l = o.formatter && s && a ? a(o.formatter)(s) : `${s}`, u = t.formatter && c && a ? a(t.formatter)(c, void 0, i) : `${c}`, d = c != null && n && a ? a(ne)(c / n) : null, f = () => t.dataLabels?.measureLabelFormat === v.Percentage ? d === null ? [] : [d] : t.dataLabels?.measureLabelFormat === v.ValueAndPercentage ? d === null ? [u] : [u, d] : [u];
153
+ let o = e.dimensions.filter((e) => r(e))[0], s = i.value, c = i[V.num].value, l = o.formatter && s && a ? a(o.formatter)(s) : `${s}`, u = t.formatter && c && a ? a(t.formatter)(c, void 0, i) : `${c}`, d = c != null && n && a ? a(te)(c / n) : null, f = () => t.dataLabels?.measureLabelFormat === v.Percentage ? d === null ? [] : [d] : t.dataLabels?.measureLabelFormat === v.ValueAndPercentage ? d === null ? [u] : [u, d] : [u];
154
154
  switch (t.dataLabels?.labelFormat) {
155
155
  case y.Measure: {
156
156
  let e = f();
@@ -159,27 +159,27 @@ var le = (e, t, a, o, s, c) => {
159
159
  case y.DimensionAndMeasure: return [l, ...f()];
160
160
  default: return l;
161
161
  }
162
- }, de = (e, t, n, a, o, s) => {
163
- let c = e.dimensions.filter((e) => r(e)), l = e.measures.filter((e) => r(e)), u = c[0], d = l.find((e) => e.role === i.PIE_CHART_SLICE) ?? l[0];
164
- if (!u || !d || !d.dataLabels?.show) return n;
165
- let f = new I(t.fonts.general.color), p = d.dataLabels.showBackdrop ? F(d.dataLabels.backdropColor ? { fill: d.dataLabels.backdropColor } : void 0) : void 0, m = p ? b(f) : d.dataLabels.textColor || "#000", { strokeEnabled: h, strokeWidth: g = q.strokeWidth } = e.pieSettings, _ = h ? g / 2 : 0, v = {
166
- type: P.Labels,
162
+ }, de = (e, t, n, i, a, o) => {
163
+ let s = e.dimensions.filter((e) => r(e)), c = e.measures.filter((e) => r(e)), l = s[0], u = c.find((e) => e.role === d.PIE_CHART_SLICE) ?? c[0];
164
+ if (!l || !u || !u.dataLabels?.show) return n;
165
+ let f = new I(t.fonts.general.color), p = u.dataLabels.showBackdrop ? O(u.dataLabels.backdropColor ? { fill: u.dataLabels.backdropColor } : void 0) : void 0, m = p ? P(f) : u.dataLabels.textColor || "#000", { strokeEnabled: h, strokeWidth: g = q.strokeWidth } = e.pieSettings, _ = h ? g / 2 : 0, v = {
166
+ type: k.Labels,
167
167
  key: "pie-labels",
168
168
  animations: {
169
169
  enabled: !0,
170
170
  presetId: "chart-labels"
171
171
  },
172
- layout: { displayOrder: T.Labels },
172
+ layout: { displayOrder: ee.Labels },
173
173
  settings: { sources: [{
174
- component: `${P.Pie}`,
175
- selector: se.Path,
174
+ component: `${k.Pie}`,
175
+ selector: ne.Path,
176
176
  strategy: {
177
177
  type: "slice",
178
178
  settings: {
179
- fontSize: A(d.dataLabels.size),
179
+ fontSize: oe(u.dataLabels.size),
180
180
  fontFamily: t.fonts.general.fontFamily,
181
181
  labels: [{
182
- label: ue(e, d, o?.[0]?.sum),
182
+ label: ue(e, u, a?.[0]?.sum),
183
183
  placements: [{
184
184
  position: "outside",
185
185
  fill: m,
@@ -191,47 +191,47 @@ var le = (e, t, a, o, s, c) => {
191
191
  }
192
192
  }
193
193
  }] },
194
- brush: E([""], s, { valuePickerMode: s?.valuePickerMode })
194
+ brush: S([""], o, { valuePickerMode: o?.valuePickerMode })
195
195
  };
196
196
  return {
197
197
  ...n,
198
198
  components: [...n.components, v]
199
199
  };
200
200
  }, Y = (e, t, n, r, i) => {
201
- let a = n.data[t]?.value, o = s(e) || e.label || e.dataItem.name || "", c = a;
202
- return !i && e.formatter ? c = r.formatter(e.formatter)(a, void 0, n.data) : i && (c = r.formatter(O(e.formatter))(a, void 0, n.data)), {
203
- label: o,
201
+ let a = n.data[t]?.value, s = o(e) || e.label || e.dataItem.name || "", c = a;
202
+ return !i && e.formatter ? c = r.formatter(e.formatter)(a, void 0, n.data) : i && (c = r.formatter(se(e.formatter))(a, void 0, n.data)), {
203
+ label: s,
204
204
  value: c
205
205
  };
206
- }, fe = (e, t, n, a, o) => {
207
- let s = !!e.measures.filter(r).filter((e) => e.role === i.PIE_CHART_LENGTH)?.[0], c = {
208
- filter: (e) => e.filter((e) => e.key === P.Pie),
206
+ }, fe = (e, t, n, i, a) => {
207
+ let o = !!e.measures.filter(r).filter((e) => e.role === d.PIE_CHART_LENGTH)?.[0], s = {
208
+ filter: (e) => e.filter((e) => e.key === k.Pie),
209
209
  placement: {
210
210
  type: "slice",
211
211
  area: "target"
212
212
  }
213
213
  };
214
- if (s) return N(e, t, n, c, "tooltip", o);
215
- let l = ae(e, o), u = ie(e, t, pe, oe, o?.[0]?.sum, l);
216
- return N(e, t, n, {
217
- ...c,
218
- extract: u
219
- }, "tooltip", o);
220
- }, pe = (e, t, i, a, o, s, c, l) => {
221
- let u = [], d = e.filter(r), f = ee(i), p = d.filter((e) => !f.has(n(e.dataItem)))?.[0] ?? d?.[0], m = Object.keys(t.data).find((e) => t.data[e]?.source?.field === n(p?.dataItem));
214
+ if (o) return x(e, t, n, s, "tooltip", a);
215
+ let c = b(e, a), l = C(e, t, pe, F, a?.[0]?.sum, c);
216
+ return x(e, t, n, {
217
+ ...s,
218
+ extract: l
219
+ }, "tooltip", a);
220
+ }, pe = (e, n, i, a, o, s, c, l) => {
221
+ let u = [], d = e.filter(r), f = T(i), p = d.filter((e) => !f.has(t(e.dataItem)))?.[0] ?? d?.[0], m = Object.keys(n.data).find((e) => n.data[e]?.source?.field === t(p?.dataItem));
222
222
  if (!m || !p ? u.push({
223
223
  label: "",
224
224
  value: ""
225
- }) : u.push(Y(p, m, t, i, l)), d.filter((e) => f.has(n(e.dataItem))).forEach((e) => {
226
- let r = n(e.dataItem), a = Object.keys(t.data).find((e) => t.data[e]?.source?.field === r);
227
- a && u.push(Y(e, a, t, i, l));
225
+ }) : u.push(Y(p, m, n, i, l)), d.filter((e) => f.has(t(e.dataItem))).forEach((e) => {
226
+ let r = t(e.dataItem), a = Object.keys(n.data).find((e) => n.data[e]?.source?.field === r);
227
+ a && u.push(Y(e, a, n, i, l));
228
228
  }), c) return u;
229
229
  let h = Object.values(s ?? {}).reduce((e, t) => e + Number(t), 0);
230
230
  return u.push({
231
231
  label: "Total",
232
232
  value: p?.formatter ? i.formatter(p.formatter)(h) : h
233
233
  }), u;
234
- }, me = class extends S {
234
+ }, me = class extends D {
235
235
  constructor() {
236
236
  super([
237
237
  H,
@@ -239,7 +239,7 @@ var le = (e, t, a, o, s, c) => {
239
239
  le,
240
240
  ce,
241
241
  de,
242
- w,
242
+ N,
243
243
  fe
244
244
  ]);
245
245
  }
@@ -332,21 +332,21 @@ var le = (e, t, a, o, s, c) => {
332
332
  function $(e) {
333
333
  e.component(U, ge);
334
334
  }
335
- var _e = (e, t) => {
336
- let a = e.find((e) => e.role === i.PIE_CHART_SLICE && r(e));
337
- if (!a) return;
338
- let o = n(a.dataItem);
339
- return t.reduce((e, t) => e + t[o], 0);
340
- }, ve = g(), ye = m(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
341
- let a = f(), [s] = (0, z.useState)(() => new me()), { activeKey: u } = h(), d = re();
342
- if (!e || !l(e) || !n || !r) return null;
335
+ var _e = (e, n) => {
336
+ let i = e.find((e) => e.role === d.PIE_CHART_SLICE && r(e));
337
+ if (!i) return;
338
+ let a = t(i.dataItem);
339
+ return n.reduce((e, t) => e + t[a], 0);
340
+ }, ve = g(), ye = m(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: o }) => {
341
+ let s = f(), [c] = (0, z.useState)(() => new me()), { activeKey: u } = h(), d = ae();
342
+ if (!e || !a(e) || !n || !r) return null;
343
343
  let p = {
344
- ...i,
344
+ ...o,
345
345
  valuePickerMode: !!u
346
- }, m = t || c;
346
+ }, m = t || l;
347
347
  n[0] && (n[0].sum = _e(e.measures, n[0].items));
348
- let g = s.compile(e, m, n, r, p, o.Pie, a, void 0, d);
349
- return g ? /* @__PURE__ */ (0, ve.jsx)(k, {
348
+ let g = c.compile(e, m, n, r, p, i.Pie, s, void 0, d);
349
+ return g ? /* @__PURE__ */ (0, ve.jsx)(re, {
350
350
  config: p,
351
351
  definition: g,
352
352
  size: r,