@astrato-io/visualizations 0.6.4 → 0.6.5

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 (149) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/THIRD_PARTY_NOTICES.md +94 -4
  3. package/chunks/ClickAwayListener-BbeNMAvj.js +52 -0
  4. package/chunks/{LinearProgress-CUZ0D8_t.js → LinearProgress-B1FeWaen.js} +54 -54
  5. package/chunks/app-filter-bar.compiler-BGJ7HAbr.js +64 -0
  6. package/chunks/bar.compiler-CT0ZbQKc.js +374 -0
  7. package/chunks/{src-Cum_2NLV.js → builder-B6dWSIdD.js} +5779 -5635
  8. package/chunks/{coloring-C16AUZEi.js → coloring-B1XAfg6b.js} +234 -233
  9. package/chunks/{src-BC7cGcJ-.js → definitions-D3OVqmXl.js} +438 -360
  10. package/chunks/{escobar-BGqT1EsE.js → escobar-eDjtGpkC.js} +4645 -4619
  11. package/chunks/filter.compiler-DBsyRBJt.js +70 -0
  12. package/chunks/{filtering-Yq4DEa0t.js → filtering-tqjAyJH5.js} +432 -313
  13. package/chunks/{grouping-type-BX_9Ix5q.js → grouping-type-On4s9Thj.js} +1 -1
  14. package/chunks/handlers-VTBfIZYZ.js +13072 -0
  15. package/chunks/isEqual-BDxAhUo8.js +7514 -0
  16. package/chunks/line.compiler-CzdM5Ld0.js +198 -0
  17. package/chunks/{metadata-CPXdYoln.js → metadata-BGElBy5Z.js} +1 -1
  18. package/chunks/number.compiler-G-R7y16P.js +53 -0
  19. package/chunks/{src-C0LgoUWY.js → operations-CTNUX6Sy.js} +9576 -9432
  20. package/chunks/{range-DrzdfBX4.js → range-CiwTbMig.js} +2 -2
  21. package/chunks/{registry-CExpGJ1N.js → registry-CsQQzukD.js} +153 -153
  22. package/chunks/{requirements-DNhuShLS.js → requirements-DYjZCFyf.js} +1 -1
  23. package/chunks/{shared-CKDL4hx9.js → shared-CBvcC5YV.js} +460 -413
  24. package/chunks/{standalone-D5vnf-9y.js → standalone-0M4HlmDW2.js} +823 -822
  25. package/chunks/standalone-0ashe9w1.js +411 -0
  26. package/chunks/{standalone-C85u7U6I.js → standalone-B7jax8wa.js} +93 -94
  27. package/chunks/standalone-BK0VYU-l.js +463 -0
  28. package/chunks/{standalone-BDCwI6Hn.js → standalone-BMIbT1b2.js} +815 -815
  29. package/chunks/standalone-BZV5vOwA.js +6 -0
  30. package/chunks/standalone-BhDrWj4p.js +1980 -0
  31. package/chunks/{standalone-CNyNHKVx.js → standalone-BtSHCp2U2.js} +97 -98
  32. package/chunks/{standalone-CDQnr6qT.js → standalone-BvaKdky9.js} +95 -96
  33. package/chunks/standalone-BwtM31-f.js +2 -0
  34. package/chunks/{standalone-CY57qwZ-.js → standalone-C3gg736V.js} +153 -153
  35. package/chunks/{standalone-DFPva_ku.js → standalone-CC1VUjO32.js} +60 -60
  36. package/chunks/{standalone-CCNtaJ7s.js → standalone-C_rYnZ0N.js} +41 -41
  37. package/chunks/{standalone-CZynjFG7.js → standalone-CoLrAxRV.js} +3701 -3482
  38. package/chunks/{standalone-jiz0L2Dg.js → standalone-DC-aUgXC.js} +104 -104
  39. package/chunks/standalone-DCtRoTWg.js +675 -0
  40. package/chunks/standalone-DUDFTBqL.js +833 -0
  41. package/chunks/standalone-DhZkX9Td.js +2 -0
  42. package/chunks/{standalone-Dx3MLlrO.js → standalone-DtLElfuM.js} +141 -141
  43. package/chunks/{standalone-BmfMt74U.js → standalone-G9Q4Uczu.js} +192 -192
  44. package/chunks/{standalone-BH5NqDwp.js → standalone-JuLF-OoH.js} +390 -391
  45. package/chunks/standalone-_DeX21JJ.js +383 -0
  46. package/chunks/{standalone-lBm9hQ-q.js → standalone-gFhKZh8m.js} +34 -34
  47. package/chunks/standalone-tDNy-SFH.js +281 -0
  48. package/chunks/{standalone-rJ45Zfl1.js → standalone-v1oxfU20.js} +10 -10
  49. package/chunks/{standalone-BYm1UjLr.js → standalone-vzBY6q0I2.js} +18 -18
  50. package/chunks/table.compiler-tb914oj3.js +222 -0
  51. package/chunks/{ui-D1HQNIBy.js → ui-DQWtv2iM.js} +13485 -3973
  52. package/chunks/{useFieldName-oqQ3bvnO.js → useFieldName-BvdcoJRl.js} +1 -1
  53. package/chunks/{utils-Ba9T0TqC.js → utils-Bg7K-t6K.js} +7306 -6024
  54. package/chunks/{src-DvX5LU9T.js → view-Bn83C8d9.js} +2555 -4831
  55. package/definitions.js +3 -3
  56. package/docs/operations/astrato-app-filter-bar.md +17 -17
  57. package/docs/operations/bar.md +989 -1071
  58. package/docs/operations/combo.md +717 -738
  59. package/docs/operations/date-picker.md +25 -25
  60. package/docs/operations/distribution-gauge.md +471 -607
  61. package/docs/operations/dot.md +787 -879
  62. package/docs/operations/filter.md +139 -163
  63. package/docs/operations/gauge.md +491 -627
  64. package/docs/operations/heatMap.md +834 -916
  65. package/docs/operations/histogram.md +166 -180
  66. package/docs/operations/iframe.md +5 -5
  67. package/docs/operations/image.md +16 -16
  68. package/docs/operations/index.md +12 -12
  69. package/docs/operations/line.md +811 -888
  70. package/docs/operations/number.md +470 -536
  71. package/docs/operations/pie.md +825 -958
  72. package/docs/operations/radar.md +599 -679
  73. package/docs/operations/sankey.md +462 -584
  74. package/docs/operations/scatter.md +823 -929
  75. package/docs/operations/shape.md +34 -34
  76. package/docs/operations/simpleTextObject.md +18 -25
  77. package/docs/operations/slider.md +33 -43
  78. package/docs/operations/table.md +1160 -1150
  79. package/docs/operations/tree.md +354 -361
  80. package/docs/operations/treemap.md +545 -637
  81. package/docs/operations/waterfall.md +369 -379
  82. package/docs/operations/word-cloud.md +512 -583
  83. package/getters.js +3 -3
  84. package/index.js +51 -51
  85. package/metadata.js +3 -3
  86. package/operations.js +7 -7
  87. package/package.json +80 -86
  88. package/src/definitions/index.d.ts +2 -2
  89. package/src/definitions/{shared/lib → model/definitions}/available-fields.d.ts +0 -1
  90. package/src/definitions/{shared/lib/compilers/index.d.ts → model/definitions/compilers/compile.d.ts} +1 -1
  91. package/src/definitions/model/definitions/data-item-resolution.d.ts +19 -0
  92. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +1341 -0
  93. package/src/definitions/model/definitions/descriptors/json-schema.d.ts +2 -0
  94. package/src/definitions/model/definitions/diagnostics.d.ts +5 -0
  95. package/src/definitions/model/definitions/field-suggestions.d.ts +2 -0
  96. package/src/definitions/model/definitions/index.d.ts +23 -0
  97. package/src/definitions/{shared/lib → model/definitions}/registry/compile.d.ts +1 -1
  98. package/src/definitions/model/definitions/registry/descriptor-registry.d.ts +3 -0
  99. package/src/definitions/model/definitions/schema-registry.d.ts +660 -0
  100. package/src/definitions/{shared/lib → model/definitions}/schemas/broad-chart.schema.d.ts +1 -1
  101. package/src/definitions/{shared/lib → model/definitions}/schemas/common.schema.d.ts +0 -1
  102. package/src/definitions/model/definitions/schemas/index.d.ts +9 -0
  103. package/src/definitions/{shared/lib → model/definitions}/schemas/object.schema.d.ts +6 -6
  104. package/src/definitions/{shared/lib → model/definitions}/types/definition.types.d.ts +1 -1
  105. package/src/definitions/model/definitions/types/index.d.ts +3 -0
  106. package/src/definitions/{shared/lib/registry → model/definitions}/validation.d.ts +1 -1
  107. package/chunks/Radio-Ciu-F4CU.js +0 -957
  108. package/chunks/ToggleButton-BCJc3Jlc.js +0 -153
  109. package/chunks/_baseFlatten-DPXPOrea.js +0 -7076
  110. package/chunks/app-filter-bar.compiler-j_CVoWTa.js +0 -55
  111. package/chunks/bar.compiler-oqaPzIut.js +0 -370
  112. package/chunks/data-item-resolution-1lvYB5ln.js +0 -53
  113. package/chunks/event-bus-KiSiCJrC.js +0 -2683
  114. package/chunks/filter.compiler-CuLtc_02.js +0 -60
  115. package/chunks/gauge-target-type-BkKXAqkX.js +0 -4
  116. package/chunks/interfaces-VUY4_yVO.js +0 -8742
  117. package/chunks/line-settings-DfYTUyPz.js +0 -4
  118. package/chunks/line.compiler-BpA_6Tc7.js +0 -188
  119. package/chunks/number.compiler-DbkWcG4S.js +0 -44
  120. package/chunks/pie-uv42Eqal.js +0 -10
  121. package/chunks/src-Dun_jXtz.js +0 -10295
  122. package/chunks/standalone-87YV_m9n.js +0 -687
  123. package/chunks/standalone-BLVAWLNJ.js +0 -385
  124. package/chunks/standalone-BPomtAVs.js +0 -2
  125. package/chunks/standalone-BXyBcUOQ.js +0 -2
  126. package/chunks/standalone-BllF4rDp.js +0 -383
  127. package/chunks/standalone-BqWyrnZI.js +0 -281
  128. package/chunks/standalone-DQxxNwF8.js +0 -675
  129. package/chunks/standalone-DS9T0FZ-.js +0 -830
  130. package/chunks/standalone-DzixzZAL.js +0 -411
  131. package/chunks/standalone-QJ1kKMnO.js +0 -6
  132. package/chunks/table.compiler-BrXkm4Fz.js +0 -213
  133. package/chunks/toInteger-DVZr-D1j.js +0 -11
  134. package/chunks/treemap-x_zmJoG7.js +0 -23
  135. package/chunks/types-dVVCsDWD.js +0 -4
  136. package/chunks/view-CLqWMV7Z.js +0 -156
  137. package/src/definitions/shared/index.d.ts +0 -5
  138. package/src/definitions/shared/lib/registry/descriptor-registry.d.ts +0 -587
  139. package/src/definitions/shared/lib/registry/index.d.ts +0 -3
  140. package/src/definitions/shared/lib/schemas/index.d.ts +0 -9
  141. package/src/definitions/shared/lib/types/index.d.ts +0 -3
  142. package/src/definitions/{shared/lib → model/definitions}/schemas/app-filter-bar.schema.d.ts +0 -0
  143. package/src/definitions/{shared/lib → model/definitions}/schemas/bar.schema.d.ts +0 -0
  144. package/src/definitions/{shared/lib → model/definitions}/schemas/filter.schema.d.ts +0 -0
  145. package/src/definitions/{shared/lib → model/definitions}/schemas/line.schema.d.ts +0 -0
  146. package/src/definitions/{shared/lib → model/definitions}/schemas/number.schema.d.ts +0 -0
  147. package/src/definitions/{shared/lib → model/definitions}/schemas/table.schema.d.ts +4 -4
  148. /package/src/definitions/{shared/lib → model/definitions}/types/compilation.types.d.ts +0 -0
  149. /package/src/definitions/{shared/lib → model/definitions}/types/descriptor.types.d.ts +0 -0
@@ -1,18 +1,17 @@
1
1
  import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
- import { La as t, No as n, Ta as r, Ti as i, Wc as a, Xs as o, Yn as s, pc as c, qs as l, ti as u } from "./interfaces-VUY4_yVO.js";
3
- import { Ki as d, P as f, Zt as p, o as m, wi as h } from "./utils-Ba9T0TqC.js";
4
- import { Bn as g, Vn as _ } from "./event-bus-KiSiCJrC.js";
5
- import { n as v } from "./pie-uv42Eqal.js";
6
- import { F as y, Ft as b, Jt as x, M as S, P as C, Q as w, Qt as T, St as E, Vt as D, Wt as O, X as k, Z as A, _t as j, et as M, ht as ee, i as te, it as ne, j as re, n as ie, nn as ae, rt as oe, tt as N, un as P } from "./escobar-BGqT1EsE.js";
7
- import { l as F, vt as I } from "./_baseFlatten-DPXPOrea.js";
8
- import { t as L } from "./coloring-C16AUZEi.js";
2
+ import { Fa as t, Gn as n, Ks as r, Mo as i, Sa as a, Si as o, Uc as s, Ys as c, Zr as l, fc as u } from "./isEqual-BDxAhUo8.js";
3
+ import { $t as d, Ei as f, P as p, Yi as m, o as h } from "./utils-Bg7K-t6K.js";
4
+ import { Lm as g, Rm as _, bm as v } from "./handlers-VTBfIZYZ.js";
5
+ import { Vt as y, mt as b } from "./ui-DQWtv2iM.js";
6
+ import { F as x, Ft as S, Jt as C, M as w, P as T, Q as E, Qt as D, St as ee, Vt as O, Wt as k, X as A, Z as j, _t as M, dn as N, et as te, ht as ne, i as re, it as ie, j as ae, n as oe, rn as P, rt as F, tt as I } from "./escobar-eDjtGpkC.js";
7
+ import { t as L } from "./coloring-B1XAfg6b.js";
9
8
  import { t as R } from "./set-coloring-datafield-B3uIS1Pe.js";
10
- var z = /* @__PURE__ */ e(d()), B = (e, n, r) => {
11
- let { coloring: a } = e || {}, s = a?.fieldId, l = e.dimensions.filter((e) => i(e)), u = e.measures.filter((e) => i(e)), d = u.filter((e) => e.role === t.PIE_CHART_SLICE), f = u.filter((e) => e.role === t.PIE_CHART_LENGTH);
12
- s || (e.coloring?.type === o.Gradient ? s = c(d[0]?.dataItem) : e.coloring?.type === o.Categorical && (s = c(l[0]?.dataItem))), ee(r, 0, { color: { field: s } });
13
- let p = E(R(e, s), n, {});
9
+ var z = /* @__PURE__ */ e(m()), B = (e, n, r) => {
10
+ let { coloring: i } = e || {}, a = i?.fieldId, s = e.dimensions.filter((e) => o(e)), l = e.measures.filter((e) => o(e)), d = l.filter((e) => e.role === t.PIE_CHART_SLICE), f = l.filter((e) => e.role === t.PIE_CHART_LENGTH);
11
+ a || (e.coloring?.type === c.Gradient ? a = u(d[0]?.dataItem) : e.coloring?.type === c.Categorical && (a = u(s[0]?.dataItem))), ne(r, 0, { color: { field: a } });
12
+ let p = ee(R(e, a), n, {});
14
13
  if (f.length > 0) {
15
- let e = c(f[0]?.dataItem);
14
+ let e = u(f[0]?.dataItem);
16
15
  p[e] = { data: { field: e } };
17
16
  }
18
17
  return {
@@ -23,14 +22,14 @@ var z = /* @__PURE__ */ e(d()), B = (e, n, r) => {
23
22
  return e.num = "num", e.rad = "rad", e.group = "group", e;
24
23
  }({}), H = (e, n, r) => {
25
24
  if (!e.dimensions[0]) return r;
26
- let a = e.measures.filter((e) => i(e)), o = S((e.supportingMeasures ?? []).filter((e) => i(e))), s = e.dimensions.filter((e) => i(e))?.[0], l = a.filter((e) => e.role === t.PIE_CHART_SLICE)?.[0], u = a.filter((e) => e.role === t.PIE_CHART_LENGTH)?.[0], d = c(l?.dataItem), f = c(u?.dataItem), p = c(s?.dataItem), m = [{
27
- key: T.Collection,
25
+ let i = e.measures.filter((e) => o(e)), a = w((e.supportingMeasures ?? []).filter((e) => o(e))), s = e.dimensions.filter((e) => o(e))?.[0], c = i.filter((e) => e.role === t.PIE_CHART_SLICE)?.[0], l = i.filter((e) => e.role === t.PIE_CHART_LENGTH)?.[0], d = u(c?.dataItem), f = u(l?.dataItem), p = u(s?.dataItem), m = [{
26
+ key: D.Collection,
28
27
  data: { extract: [{
29
28
  field: p,
30
29
  props: {
31
- num: l?.dataItem?.name ? { field: d } : void 0,
32
- rad: u?.dataItem?.name ? { field: f } : void 0,
33
- ...o
30
+ num: c?.dataItem?.name ? { field: d } : void 0,
31
+ rad: l?.dataItem?.name ? { field: f } : void 0,
32
+ ...a
34
33
  }
35
34
  }] }
36
35
  }];
@@ -38,15 +37,15 @@ var z = /* @__PURE__ */ e(d()), B = (e, n, r) => {
38
37
  ...r,
39
38
  collections: m
40
39
  };
41
- }, U = "pie-alternates-switcher", W = "pie-alternates-switcher", G = (e) => s(e) || e.label || e.dataItem?.name || "Field", K = (e, t, n, r) => {
42
- let i = n ? c(n.dataItem) : void 0;
40
+ }, U = "pie-alternates-switcher", W = "pie-alternates-switcher", G = (e) => n(e) || e.label || e.dataItem?.name || "Field", K = (e, t, n, r) => {
41
+ let i = n ? u(n.dataItem) : void 0;
43
42
  return {
44
43
  type: "native",
45
44
  key: `${W}-interaction`,
46
- events: { click(o) {
47
- let s = this.element.getBoundingClientRect(), c = {
48
- x: o.clientX - s.left,
49
- y: o.clientY - s.top
45
+ events: { click(a) {
46
+ let o = this.element.getBoundingClientRect(), c = {
47
+ x: a.clientX - o.left,
48
+ y: a.clientY - o.top
50
49
  }, l = this.chart.shapesAt(c, {
51
50
  components: [{
52
51
  key: W,
@@ -55,48 +54,48 @@ var z = /* @__PURE__ */ e(d()), B = (e, n, r) => {
55
54
  propagation: "stop"
56
55
  }).find((e) => e.data?.target === "measure" || e.data?.target === "dimension");
57
56
  if (l?.data?.target === "measure" && n && i) {
58
- r(P.Text, "click", `text-${i}`, o, l, {
59
- dataItemType: a.Measure,
57
+ r(N.Text, "click", `text-${i}`, a, l, {
58
+ dataItemType: s.Measure,
60
59
  dataItemRole: n.role
61
60
  });
62
61
  return;
63
62
  }
64
- l?.data?.target === "dimension" && e && r(P.Text, "click", `text-${e}`, o, l, {
65
- dataItemType: a.Dimension,
63
+ l?.data?.target === "dimension" && e && r(N.Text, "click", `text-${e}`, a, l, {
64
+ dataItemType: s.Dimension,
66
65
  dataItemRole: t
67
66
  });
68
67
  } }
69
68
  };
70
- }, se = (e, r, o, s, l, d, f, p) => {
71
- let m = u(e.dimensions, e.enableAlternate, d?.isPrintMode), h = e.dimensions.filter((e) => i(e)), g = h[0], _ = g ? c(g.dataItem) : void 0, v = e.measures.filter((e) => e.role === t.PIE_CHART_SLICE), y = u(v, e.enableAlternate, d?.isPrintMode), b = v.filter((e) => i(e))[0], x = m && h.length ? h.map((e) => G(e)).join(", ") : void 0, S = y && b ? G(b) : void 0;
72
- if (!x && !S) return o;
73
- let C = {
69
+ }, se = (e, n, r, a, c, d, f, p) => {
70
+ let m = l(e.dimensions, e.enableAlternate, d?.isPrintMode), h = e.dimensions.filter((e) => o(e)), g = h[0], _ = g ? u(g.dataItem) : void 0, v = e.measures.filter((e) => e.role === t.PIE_CHART_SLICE), b = l(v, e.enableAlternate, d?.isPrintMode), x = v.filter((e) => o(e))[0], S = m && h.length ? h.map((e) => G(e)).join(", ") : void 0, C = b && x ? G(x) : void 0;
71
+ if (!S && !C) return r;
72
+ let w = {
74
73
  type: U,
75
74
  key: W,
76
- dimensionDataItemType: _ ? a.Dimension : void 0,
75
+ dimensionDataItemType: _ ? s.Dimension : void 0,
77
76
  dimensionDataItemRole: g?.role,
78
- measureDataItemType: b ? a.Measure : void 0,
79
- measureDataItemRole: b?.role,
77
+ measureDataItemType: x ? s.Measure : void 0,
78
+ measureDataItemRole: x?.role,
80
79
  layout: {
81
- dock: n.Bottom,
80
+ dock: i.Bottom,
82
81
  displayOrder: 0
83
82
  },
84
83
  settings: {
85
- dimensionLabel: x ? D(x) : void 0,
86
- measureLabel: S ? D(S) : void 0,
87
- fontFamily: r.fonts.general.fontFamily,
88
- fontSize: `${I.fieldTitle.fontSize}px`,
89
- color: r.fonts.general.color,
84
+ dimensionLabel: S ? O(S) : void 0,
85
+ measureLabel: C ? O(C) : void 0,
86
+ fontFamily: n.fonts.general.fontFamily,
87
+ fontSize: `${y.fieldTitle.fontSize}px`,
88
+ color: n.fonts.general.color,
90
89
  paddingLeft: 5,
91
90
  paddingRight: 5,
92
91
  paddingVertical: 5,
93
92
  labelGap: 12
94
93
  }
95
- }, w = p ? [K(_, g?.role, b, p)] : [];
94
+ }, T = p ? [K(_, g?.role, x, p)] : [];
96
95
  return {
97
- ...o,
98
- components: [...o.components, C],
99
- interactions: o.interactions ? [...o.interactions, ...w] : w
96
+ ...r,
97
+ components: [...r.components, w],
98
+ interactions: r.interactions ? [...r.interactions, ...T] : T
100
99
  };
101
100
  }, q = {
102
101
  outerRadius: .8,
@@ -115,16 +114,16 @@ var z = /* @__PURE__ */ e(d()), B = (e, n, r) => {
115
114
  function J(e) {
116
115
  return e.pieSettings?.donut ?? !1;
117
116
  }
118
- var ce = (e, n, r, a, o, s) => {
119
- let l = e.measures.filter((e) => i(e)), u = l.filter((e) => e.role === t.PIE_CHART_SLICE), d = l.filter((e) => e.role === t.PIE_CHART_LENGTH), f = u[0], p = d[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;
117
+ var ce = (e, n, r, i, a, s) => {
118
+ let c = e.measures.filter((e) => o(e)), l = c.filter((e) => e.role === t.PIE_CHART_SLICE), d = c.filter((e) => e.role === t.PIE_CHART_LENGTH), f = l[0], p = d[0], m = new L(e, n, a?.[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;
120
119
  if (p) {
121
120
  let t = g, n = J(e) ? q.donut.multiMeasureMinRadius : q.multiMeasureMinRadius;
122
- g = (e) => e.resources.scale(c(p.dataItem))(e.datum.rad.value) * (t - n) + n;
121
+ g = (e) => e.resources.scale(u(p.dataItem))(e.datum.rad.value) * (t - n) + n;
123
122
  }
124
123
  let x = {
125
- type: P.Pie,
126
- key: `${P.Pie}`,
127
- data: { collection: T.Collection },
124
+ type: N.Pie,
125
+ key: `${N.Pie}`,
126
+ data: { collection: D.Collection },
128
127
  animations: {
129
128
  enabled: !0,
130
129
  presetId: "pie-chart"
@@ -138,14 +137,14 @@ var ce = (e, n, r, a, o, s) => {
138
137
  outerRadius: g,
139
138
  fill: m.getColorDefinition({ ref: "color" })
140
139
  } },
141
- brush: O([""], s, { valuePickerMode: s?.valuePickerMode })
140
+ brush: k([""], s, { valuePickerMode: s?.valuePickerMode })
142
141
  };
143
142
  return {
144
143
  ...r,
145
144
  components: [...r.components, x]
146
145
  };
147
- }, le = (e, t, n) => ({ data: r, formatter: a }) => {
148
- let o = e.dimensions.filter((e) => i(e))[0], s = r.value, c = r[V.num].value, l = o.formatter && s && a ? a(o.formatter)(s) : `${s}`, u = t.formatter && c && a ? a(t.formatter)(c, void 0, r) : `${c}`, d = c != null && n && a ? a(ne)(c / n) : null, f = () => t.dataLabels?.measureLabelFormat === g.Percentage ? [d] : t.dataLabels?.measureLabelFormat === g.ValueAndPercentage ? [u, d] : [u];
146
+ }, le = (e, t, n) => ({ data: r, formatter: i }) => {
147
+ let a = e.dimensions.filter((e) => o(e))[0], s = r.value, c = r[V.num].value, l = a.formatter && s && i ? i(a.formatter)(s) : `${s}`, u = t.formatter && c && i ? i(t.formatter)(c, void 0, r) : `${c}`, d = c != null && n && i ? i(ie)(c / n) : null, f = () => t.dataLabels?.measureLabelFormat === g.Percentage ? [d] : t.dataLabels?.measureLabelFormat === g.ValueAndPercentage ? [u, d] : [u];
149
148
  switch (t.dataLabels?.labelFormat) {
150
149
  case _.Measure: {
151
150
  let e = f();
@@ -154,27 +153,27 @@ var ce = (e, n, r, a, o, s) => {
154
153
  case _.DimensionAndMeasure: return [l, ...f()];
155
154
  default: return l;
156
155
  }
157
- }, ue = (e, n, r, a, o, s) => {
158
- let c = e.dimensions.filter((e) => i(e)), l = e.measures.filter((e) => i(e)), u = c[0], d = l.find((e) => e.role === t.PIE_CHART_SLICE) ?? l[0];
156
+ }, ue = (e, n, r, i, a, s) => {
157
+ let c = e.dimensions.filter((e) => o(e)), l = e.measures.filter((e) => o(e)), u = c[0], d = l.find((e) => e.role === t.PIE_CHART_SLICE) ?? l[0];
159
158
  if (!u || !d || !d.dataLabels?.show) return r;
160
- let f = new F(n.fonts.general.color), p = d.dataLabels.showBackdrop ? C(d.dataLabels.backdropColor ? { fill: d.dataLabels.backdropColor } : void 0) : void 0, m = p ? y(f) : d.dataLabels.textColor || "#000", { strokeEnabled: h, strokeWidth: g = q.strokeWidth } = e.pieSettings, _ = h ? g / 2 : 0, v = {
161
- type: P.Labels,
159
+ let f = new b(n.fonts.general.color), p = d.dataLabels.showBackdrop ? T(d.dataLabels.backdropColor ? { fill: d.dataLabels.backdropColor } : void 0) : void 0, m = p ? x(f) : d.dataLabels.textColor || "#000", { strokeEnabled: h, strokeWidth: g = q.strokeWidth } = e.pieSettings, _ = h ? g / 2 : 0, v = {
160
+ type: N.Labels,
162
161
  key: "pie-labels",
163
162
  animations: {
164
163
  enabled: !0,
165
164
  presetId: "chart-labels"
166
165
  },
167
- layout: { displayOrder: b.Labels },
166
+ layout: { displayOrder: S.Labels },
168
167
  settings: { sources: [{
169
- component: `${P.Pie}`,
170
- selector: ae.Path,
168
+ component: `${N.Pie}`,
169
+ selector: P.Path,
171
170
  strategy: {
172
171
  type: "slice",
173
172
  settings: {
174
- fontSize: x(d.dataLabels.size),
173
+ fontSize: C(d.dataLabels.size),
175
174
  fontFamily: n.fonts.general.fontFamily,
176
175
  labels: [{
177
- label: le(e, d, o[0].sum),
176
+ label: le(e, d, a[0].sum),
178
177
  placements: [{
179
178
  position: "outside",
180
179
  fill: m,
@@ -186,47 +185,47 @@ var ce = (e, n, r, a, o, s) => {
186
185
  }
187
186
  }
188
187
  }] },
189
- brush: O([""], s, { valuePickerMode: s?.valuePickerMode })
188
+ brush: k([""], s, { valuePickerMode: s?.valuePickerMode })
190
189
  };
191
190
  return {
192
191
  ...r,
193
192
  components: [...r.components, v]
194
193
  };
195
- }, Y = (e, t, n, r, i) => {
196
- let a = n.data[t]?.value, o = s(e) || e.label || e.dataItem.name || "", c = a;
197
- return !i && e.formatter ? c = r.formatter(e.formatter)(a, void 0, n.data) : i && (c = r.formatter(oe(e.formatter))(a, void 0, n.data)), {
198
- label: o,
194
+ }, Y = (e, t, r, i, a) => {
195
+ let o = r.data[t]?.value, s = n(e) || e.label || e.dataItem.name || "", c = o;
196
+ return !a && e.formatter ? c = i.formatter(e.formatter)(o, void 0, r.data) : a && (c = i.formatter(F(e.formatter))(o, void 0, r.data)), {
197
+ label: s,
199
198
  value: c
200
199
  };
201
- }, de = (e, n, r, a, o) => {
202
- let s = !!e.measures.filter(i).filter((e) => e.role === t.PIE_CHART_LENGTH)?.[0], c = {
203
- filter: (e) => e.filter((e) => e.key === P.Pie),
200
+ }, de = (e, n, r, i, a) => {
201
+ let s = !!e.measures.filter(o).filter((e) => e.role === t.PIE_CHART_LENGTH)?.[0], c = {
202
+ filter: (e) => e.filter((e) => e.key === N.Pie),
204
203
  placement: {
205
204
  type: "slice",
206
205
  area: "target"
207
206
  }
208
207
  };
209
- if (s) return k(e, n, r, c, "tooltip", o);
210
- let l = N(e, o), u = A(e, n, fe, w, o?.[0]?.sum, l);
211
- return k(e, n, r, {
208
+ if (s) return A(e, n, r, c, "tooltip", a);
209
+ let l = I(e, a), u = j(e, n, fe, E, a?.[0]?.sum, l);
210
+ return A(e, n, r, {
212
211
  ...c,
213
212
  extract: u
214
- }, "tooltip", o);
215
- }, fe = (e, t, n, r, a, o, s, l) => {
216
- let u = [], d = e.filter(i), f = M(n), p = d.filter((e) => !f.has(c(e.dataItem)))?.[0] ?? d?.[0], m = Object.keys(t.data).find((e) => t.data[e]?.source?.field === c(p?.dataItem));
217
- if (!m || !p ? u.push({
213
+ }, "tooltip", a);
214
+ }, fe = (e, t, n, r, i, a, s, c) => {
215
+ let l = [], d = e.filter(o), f = te(n), p = d.filter((e) => !f.has(u(e.dataItem)))?.[0] ?? d?.[0], m = Object.keys(t.data).find((e) => t.data[e]?.source?.field === u(p?.dataItem));
216
+ if (!m || !p ? l.push({
218
217
  label: "",
219
218
  value: ""
220
- }) : u.push(Y(p, m, t, n, l)), d.filter((e) => f.has(c(e.dataItem))).forEach((e) => {
221
- let r = c(e.dataItem), i = Object.keys(t.data).find((e) => t.data[e]?.source?.field === r);
222
- i && u.push(Y(e, i, t, n, l));
223
- }), s) return u;
224
- let h = Object.values(o ?? {}).reduce((e, t) => e + Number(t), 0);
225
- return u.push({
219
+ }) : l.push(Y(p, m, t, n, c)), d.filter((e) => f.has(u(e.dataItem))).forEach((e) => {
220
+ let r = u(e.dataItem), i = Object.keys(t.data).find((e) => t.data[e]?.source?.field === r);
221
+ i && l.push(Y(e, i, t, n, c));
222
+ }), s) return l;
223
+ let h = Object.values(a ?? {}).reduce((e, t) => e + Number(t), 0);
224
+ return l.push({
226
225
  label: "Total",
227
226
  value: p?.formatter ? n.formatter(p.formatter)(h) : h
228
- }), u;
229
- }, pe = class extends re {
227
+ }), l;
228
+ }, pe = class extends ae {
230
229
  constructor() {
231
230
  super([
232
231
  H,
@@ -234,12 +233,12 @@ var ce = (e, n, r, a, o, s) => {
234
233
  ce,
235
234
  se,
236
235
  ue,
237
- j,
236
+ M,
238
237
  de
239
238
  ]);
240
239
  }
241
240
  preCompile(e) {
242
- let t = e.dimensions.filter((e) => i(e))?.[0], n = e.measures.filter((e) => i(e))?.[0];
241
+ let t = e.dimensions.filter((e) => o(e))?.[0], n = e.measures.filter((e) => o(e))?.[0];
243
242
  if (!t || !n) throw Error("Charts w/o dimensions or measures are not supported ATM.");
244
243
  }
245
244
  }, X = " ▼", Z = "...", Q = (e, t, n, r) => e.measureText({
@@ -324,19 +323,19 @@ var ce = (e, n, r, a, o, s) => {
324
323
  function he(e) {
325
324
  e.component(U, me);
326
325
  }
327
- var ge = h(), _e = p(({ vSpec: e, vTheme: t, data: n, elementSize: i, vizProperties: a }) => {
328
- let o = f(), [s] = (0, z.useState)(() => new pe()), { activeKey: u } = m(), d = {
329
- ...a,
330
- valuePickerMode: !!u
331
- }, p = t || r;
326
+ var ge = f(), _e = d(({ vSpec: e, vTheme: t, data: n, elementSize: i, vizProperties: o }) => {
327
+ let s = p(), [c] = (0, z.useState)(() => new pe()), { activeKey: l } = h(), d = {
328
+ ...o,
329
+ valuePickerMode: !!l
330
+ }, f = t || a;
332
331
  if (n?.[0]?.items && e?.measures?.length) {
333
- let t = n[0].items.reduce((t, n) => t + n[c(e.measures[0].dataItem)], 0);
332
+ let t = n[0].items.reduce((t, n) => t + n[u(e.measures[0].dataItem)], 0);
334
333
  n[0].sum = t;
335
334
  }
336
- let h = s.compile(e, p, n, i, d, l.Pie, o, void 0, ie());
337
- return h ? /* @__PURE__ */ (0, ge.jsx)(te, {
335
+ let m = c.compile(e, f, n, i, d, r.Pie, s, void 0, oe());
336
+ return m ? /* @__PURE__ */ (0, ge.jsx)(re, {
338
337
  config: d,
339
- definition: h,
338
+ definition: m,
340
339
  size: i,
341
340
  vSpec: e,
342
341
  escobarPlugins: [he]
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./view-Bn83C8d9.js";
2
+ export { e as DatePicker };