@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,18 @@
1
1
  import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
- import { Fa as t, La as n, Na as r, No as i, Oi as a, Pa as o, Pn as s, Ta as c, Ti as l, os as u, pc as d, ss as f } from "./interfaces-VUY4_yVO.js";
3
- import { G as p, Ki as m, Wn as h, Zt as g, d as _, pn as v, wi as y } from "./utils-Ba9T0TqC.js";
4
- import { r as b } from "./ui-D1HQNIBy.js";
5
- import { s as x } from "./coloring-C16AUZEi.js";
6
- var S = /* @__PURE__ */ e(m()), C = (e, n) => {
2
+ import { An as t, Fa as n, Ma as r, Mo as i, Na as a, Sa as o, Si as s, Ti as c, as as l, fc as u, ja as d, os as f } from "./isEqual-BDxAhUo8.js";
3
+ import { $t as p, Ei as m, G as h, Kn as g, Yi as _, d as v, hn as y } from "./utils-Bg7K-t6K.js";
4
+ import { u as b } from "./ui-DQWtv2iM.js";
5
+ import { _ as x } from "./coloring-B1XAfg6b.js";
6
+ var S = /* @__PURE__ */ e(_()), C = (e, t) => {
7
7
  switch (e.thresholdType) {
8
- case t.Range: return T(n, e.rangeThresholds ?? []);
9
- case t.Target: return w(n, e.targetThreshold);
10
- case t.None: return {};
8
+ case a.Range: return T(t, e.rangeThresholds ?? []);
9
+ case a.Target: return w(t, e.targetThreshold);
10
+ case a.None: return {};
11
11
  }
12
- }, w = (e, t) => {
13
- let n = s(t?.target, 0), { belowTargetColorAndIcon: r, targetColorAndIcon: i, aboveTargetColorAndIcon: a } = t || {};
14
- return e < n * (1 - t.targetTolerance) ? r : e > n * (1 + t.targetTolerance) ? a : i;
15
- }, T = (e, t) => [...t].sort((e, t) => s(t.rangeTo, 0) - s(e.rangeTo, 0)).reduce((t, n) => e < s(n.rangeTo, 0) ? n.colorAndIcon : t, {}), E = (e) => {
12
+ }, w = (e, n) => {
13
+ let r = t(n?.target, 0), { belowTargetColorAndIcon: i, targetColorAndIcon: a, aboveTargetColorAndIcon: o } = n || {};
14
+ return e < r * (1 - n.targetTolerance) ? i : e > r * (1 + n.targetTolerance) ? o : a;
15
+ }, T = (e, n) => [...n].sort((e, n) => t(n.rangeTo, 0) - t(e.rangeTo, 0)).reduce((n, r) => e < t(r.rangeTo, 0) ? r.colorAndIcon : n, {}), E = (e) => {
16
16
  let t = ["numberColor"], n = ["comparisonColor"];
17
17
  switch (e) {
18
18
  case "main": return t;
@@ -30,8 +30,8 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
30
30
  comparisonPosition: i.Bottom
31
31
  }, k = {
32
32
  numberValue: 0,
33
- textAlign: u.Center,
34
- horizontalAlign: u.Center,
33
+ textAlign: l.Center,
34
+ horizontalAlign: l.Center,
35
35
  verticalAlign: f.Middle,
36
36
  numberStyle: {
37
37
  fontSize: 12,
@@ -42,21 +42,21 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
42
42
  strikethrough: !1
43
43
  },
44
44
  comparisonStyle: {
45
- relativeFontSizePercentage: a.relativeFontSizePercentage,
45
+ relativeFontSizePercentage: c.relativeFontSizePercentage,
46
46
  fontFamily: "Roboto",
47
47
  bold: !1,
48
48
  italic: !1,
49
49
  underlined: !1,
50
50
  strikethrough: !1
51
51
  },
52
- comparisonGap: r.SmallGap,
52
+ comparisonGap: d.SmallGap,
53
53
  ...O
54
54
  }, A = (e, t, r) => {
55
55
  if (!r?.length || !e) return k;
56
- let i = t || c, a = i.fonts.general.fontFamily, o = F(r, e.measures.find((e) => l(e) && e.role === n.NUMBER_MEASURE), !0), { numberValue: s, numberFormat: u, comparisonNumberValue: d, comparisonFormat: f } = j(e, r);
56
+ let i = t || o, a = i.fonts.general.fontFamily, c = F(r, e.measures.find((e) => s(e) && e.role === n.NUMBER_MEASURE), !0), { numberValue: l, numberFormat: u, comparisonNumberValue: d, comparisonFormat: f } = j(e, r);
57
57
  return {
58
- ...N(e, i, o, d),
59
- numberValue: s,
58
+ ...N(e, i, c, d),
59
+ numberValue: l,
60
60
  numberFormat: u,
61
61
  comparisonNumberValue: d,
62
62
  comparisonFormat: f,
@@ -84,7 +84,7 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
84
84
  comparisonGap: e.numberSettings?.position?.comparisonGap ?? k.comparisonGap
85
85
  };
86
86
  }, j = (e, t) => {
87
- let r, i, a, o, s = e.measures.filter(l), c = s.filter((e) => e.role === n.NUMBER_MEASURE), u = s.filter((e) => e.role === n.NUMBER_COMPARISON), d = c[0], f = u[0];
87
+ let r, i, a, o, c = e.measures.filter(s), l = c.filter((e) => e.role === n.NUMBER_MEASURE), u = c.filter((e) => e.role === n.NUMBER_COMPARISON), d = l[0], f = u[0];
88
88
  return r = F(t, d, !0), a = M(e, t), d?.formatter && typeof d?.formatter?.format != "string" && (i = d.formatter), f?.formatter && typeof f?.formatter?.format != "string" && (o = f.formatter), f && e.numberSettings?.data?.showOnlyComparison && (r = a, i = o, a = void 0, o = void 0), {
89
89
  numberValue: r,
90
90
  numberFormat: i,
@@ -92,15 +92,15 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
92
92
  comparisonFormat: o
93
93
  };
94
94
  }, M = (e, t) => {
95
- let r = e.measures.filter(l), i = r.filter((e) => e.role === n.NUMBER_MEASURE), a = r.filter((e) => e.role === n.NUMBER_COMPARISON), s = i[0], c = a[0];
96
- if (!c) return;
97
- let u = +F(t, s), d = +F(t, c), f = e.numberSettings?.data?.comparisonType, p = Math.abs(d);
98
- return f === o.PercentageToComparison ? u === 0 && d === 0 ? 1 : u / p : f === o.PercentageAboveBelow ? u === 0 && d === 0 ? 0 : (u - d) / p : f === o.Difference ? u - d : d;
99
- }, N = (e, r, i, a) => {
100
- let o = e.measures.filter(l), s = o.filter((e) => e.role === n.NUMBER_MEASURE), c = o.filter((e) => e.role === n.NUMBER_COMPARISON), u = s[0], d = c[0];
101
- return (e.numberSettings?.thresholds ?? []).filter((e) => e.thresholdType !== t.None).reduce((e, t) => {
95
+ let i = e.measures.filter(s), a = i.filter((e) => e.role === n.NUMBER_MEASURE), o = i.filter((e) => e.role === n.NUMBER_COMPARISON), c = a[0], l = o[0];
96
+ if (!l) return;
97
+ let u = +F(t, c), d = +F(t, l), f = e.numberSettings?.data?.comparisonType, p = Math.abs(d);
98
+ return f === r.PercentageToComparison ? u === 0 && d === 0 ? 1 : u / p : f === r.PercentageAboveBelow ? u === 0 && d === 0 ? 0 : (u - d) / p : f === r.Difference ? u - d : d;
99
+ }, N = (e, t, r, i) => {
100
+ let o = e.measures.filter(s), c = o.filter((e) => e.role === n.NUMBER_MEASURE), l = o.filter((e) => e.role === n.NUMBER_COMPARISON), u = c[0], d = l[0];
101
+ return (e.numberSettings?.thresholds ?? []).filter((e) => e.thresholdType !== a.None).reduce((e, t) => {
102
102
  if (t.measureRule === "main" ? u : d) {
103
- let n = C(t, t.measureRule === "main" ? i : a);
103
+ let n = C(t, t.measureRule === "main" ? r : i);
104
104
  return {
105
105
  ...e,
106
106
  ...D(n, "icon", ["icon"]),
@@ -110,7 +110,7 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
110
110
  };
111
111
  }
112
112
  return e;
113
- }, P(e, r));
113
+ }, P(e, t));
114
114
  }, P = (e, t) => {
115
115
  let { icon: n, iconColor: r } = e.numberSettings?.colorAndIcon || {};
116
116
  return {
@@ -121,15 +121,15 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
121
121
  ...I(e, t, e.numberSettings?.comparisonStyle?.fontColor)
122
122
  };
123
123
  }, F = (e, t, n = !1) => {
124
- let r = d(t?.dataItem), i = (e?.[0])?.items?.[0]?.[r], a = +`${i}`, o = n && (!t?.formatter || t?.formatter?.format === "string") ? `${i}` : 0;
124
+ let r = u(t?.dataItem), i = (e?.[0])?.items?.[0]?.[r], a = +`${i}`, o = n && (!t?.formatter || t?.formatter?.format === "string") ? `${i}` : 0;
125
125
  return isNaN(a) ? o : a;
126
- }, I = (e, t, r) => !e.measures.filter(l).filter((e) => e.role === n.NUMBER_COMPARISON)[0] || e.numberSettings.data?.showOnlyComparison ? {
126
+ }, I = (e, t, r) => !e.measures.filter(s).filter((e) => e.role === n.NUMBER_COMPARISON)[0] || e.numberSettings.data?.showOnlyComparison ? {
127
127
  comparisonPosition: void 0,
128
128
  comparisonColor: void 0
129
129
  } : {
130
130
  comparisonColor: x(t, r ?? t.fonts.general.color),
131
131
  comparisonPosition: e.numberSettings?.position?.comparisonPosition ?? i.Left
132
- }, L = p({
132
+ }, L = h({
133
133
  mainContainer: {
134
134
  width: "100%",
135
135
  height: "100%",
@@ -150,9 +150,9 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
150
150
  }), R = (e) => {
151
151
  switch (e) {
152
152
  case f.Top:
153
- case u.Left: return "flex-start";
153
+ case l.Left: return "flex-start";
154
154
  case f.Bottom:
155
- case u.Right: return "flex-end";
155
+ case l.Right: return "flex-end";
156
156
  default: return "center";
157
157
  }
158
158
  }, z = (e) => {
@@ -167,7 +167,7 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
167
167
  r && (d = Number(d.toFixed(o))), n(d), l < 500 ? i = requestAnimationFrame(s) : (n(e), cancelAnimationFrame(i));
168
168
  };
169
169
  return e !== t && (i = requestAnimationFrame(s)), () => cancelAnimationFrame(i);
170
- }, V = .5, H = `${V}em`, U = (e, t) => !(t === i.Left || t === i.Right) || !e || e === r.None ? {} : e === r.SmallGap ? { gap: H } : {
170
+ }, V = .5, H = `${V}em`, U = (e, t) => !(t === i.Left || t === i.Right) || !e || e === d.None ? {} : e === d.SmallGap ? { gap: H } : {
171
171
  width: "100%",
172
172
  justifyContent: e
173
173
  }, W = (e, t) => e ? t === i.Top || t === i.Bottom ? "0.33em" : "0.5em" : t === i.Top || t === i.Bottom ? "0.5em" : "1.0em", G = (e) => {
@@ -177,34 +177,34 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
177
177
  case i.Right: return "row-reverse";
178
178
  default: return "row";
179
179
  }
180
- }, K = (e, t) => !e && !t ? "inherit" : `${e ? "underline" : ""} ${t ? "line-through" : ""}`, q = ({ numberSize: e, comparisonNumberSize: t, numberProps: n, elementSize: a, fontSize: o }) => {
181
- let s = n.comparisonNumberValue != null && !!t && (n.comparisonPosition === i.Left || n.comparisonPosition === i.Right), c = !!n.icon && (n.iconPosition === i.Left || n.iconPosition === i.Right), l = s ? e.width + t.width : Math.max(e.width, t?.width ?? 0);
182
- return s && n.comparisonGap === r.SmallGap && (l += V * o), c && (l += e.height), l <= a.width;
180
+ }, K = (e, t) => !e && !t ? "inherit" : `${e ? "underline" : ""} ${t ? "line-through" : ""}`, q = ({ numberSize: e, comparisonNumberSize: t, numberProps: n, elementSize: r, fontSize: a }) => {
181
+ let o = n.comparisonNumberValue != null && !!t && (n.comparisonPosition === i.Left || n.comparisonPosition === i.Right), s = !!n.icon && (n.iconPosition === i.Left || n.iconPosition === i.Right), c = o ? e.width + t.width : Math.max(e.width, t?.width ?? 0);
182
+ return o && n.comparisonGap === d.SmallGap && (c += V * a), s && (c += e.height), c <= r.width;
183
183
  }, J = ({ numberSize: e, comparisonNumberSize: t, numberProps: n, elementSize: r }) => {
184
184
  let a = n.comparisonNumberValue != null && !!t && (n.comparisonPosition === i.Top || n.comparisonPosition === i.Bottom), o = !!n.icon && (n.iconPosition === i.Top || n.iconPosition === i.Bottom), s = a ? e.height + t.height : Math.max(e.height, t?.height ?? 0);
185
185
  return o && (s += e.height), s <= r.height;
186
186
  }, Y = 1.2, X = ({ number: e, comparisonNumber: t }, n, r) => {
187
- let { numberStyle: i, comparisonStyle: o } = n;
187
+ let { numberStyle: i, comparisonStyle: a } = n;
188
188
  if (r.width === 0) return i.fontSize;
189
- let s = h(), c = (o.relativeFontSizePercentage ?? a.relativeFontSizePercentage) / 100, l = 1;
190
- for (let a = i.fontSize; a >= 1; --a) {
189
+ let o = g(), s = (a.relativeFontSizePercentage ?? c.relativeFontSizePercentage) / 100, l = 1;
190
+ for (let c = i.fontSize; c >= 1; --c) {
191
191
  let u, d;
192
192
  if (e && (u = {
193
- width: s.getTextSize({
194
- size: a,
193
+ width: o.getTextSize({
194
+ size: c,
195
195
  label: e,
196
196
  fontFamily: i.fontFamily,
197
197
  letterSpacing: "0.05em",
198
198
  fontWeight: 400
199
199
  }).width,
200
- height: a * Y
200
+ height: c * Y
201
201
  }), t) {
202
- let e = a * c;
202
+ let e = c * s;
203
203
  d = {
204
- width: s.getTextSize({
204
+ width: o.getTextSize({
205
205
  size: e,
206
206
  label: t,
207
- fontFamily: o.fontFamily,
207
+ fontFamily: a.fontFamily,
208
208
  letterSpacing: "0.05em",
209
209
  fontWeight: 400
210
210
  }).width,
@@ -216,33 +216,33 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
216
216
  comparisonNumberSize: d,
217
217
  numberProps: n,
218
218
  elementSize: r,
219
- fontSize: a
219
+ fontSize: c
220
220
  }) && J({
221
221
  numberSize: u,
222
222
  comparisonNumberSize: d,
223
223
  numberProps: n,
224
224
  elementSize: r,
225
- fontSize: a
225
+ fontSize: c
226
226
  })) {
227
- l = a;
227
+ l = c;
228
228
  break;
229
229
  }
230
230
  }
231
- return s.cleanDOM(), l;
232
- }, Z = y(), Q = g((0, S.memo)(({ vSpec: e, vTheme: t, elementSize: n, data: r, vizProperties: i }) => {
233
- let [o, s] = (0, S.useState)(0), c = L(), l = _(), u = A(e, t, r), { numberValue: d, numberFormat: f, comparisonNumberValue: p, comparisonFormat: m, backgroundColor: h } = u, g = o, y = f ? v(f, o) : o, x = m ? v(m, p) : p, C = y === "" || y == null, w = C ? void 0 : `${y}`, T = x === "" || x == null ? void 0 : `${x}`, E = C ? u.numberStyle.fontSize || 14 : X({
231
+ return o.cleanDOM(), l;
232
+ }, Z = m(), Q = p((0, S.memo)(({ vSpec: e, vTheme: t, elementSize: n, data: r, vizProperties: i }) => {
233
+ let [a, o] = (0, S.useState)(0), s = L(), l = v(), u = A(e, t, r), { numberValue: d, numberFormat: f, comparisonNumberValue: p, comparisonFormat: m, backgroundColor: h } = u, g = a, _ = f ? y(f, a) : a, x = m ? y(m, p) : p, C = _ === "" || _ == null, w = C ? void 0 : `${_}`, T = x === "" || x == null ? void 0 : `${x}`, E = C ? u.numberStyle.fontSize || 14 : X({
234
234
  number: w,
235
235
  comparisonNumber: T
236
236
  }, u, n);
237
237
  return (0, S.useEffect)(() => {
238
238
  let e;
239
- return !i?.disable?.animations && typeof d == "number" ? (typeof g != "number" && (s(0), g = 0), e = B(d, g, s, !f)) : s(d), () => {
239
+ return !i?.disable?.animations && typeof d == "number" ? (typeof g != "number" && (o(0), g = 0), e = B(d, g, o, !f)) : o(d), () => {
240
240
  e && e();
241
241
  };
242
242
  }, [d]), (0, S.useEffect)(() => {
243
243
  e && l();
244
244
  }, [e]), /* @__PURE__ */ (0, Z.jsx)("div", {
245
- className: c.mainContainer,
245
+ className: s.mainContainer,
246
246
  style: {
247
247
  fontSize: `${E}px`,
248
248
  alignItems: R(u.verticalAlign),
@@ -250,14 +250,14 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
250
250
  backgroundColor: h
251
251
  },
252
252
  children: /* @__PURE__ */ (0, Z.jsxs)("div", {
253
- className: c.numbersContainer,
253
+ className: s.numbersContainer,
254
254
  style: {
255
255
  alignItems: z(u),
256
256
  flexDirection: G(u.comparisonPosition ?? u.iconPosition),
257
257
  ...U(u.comparisonGap, u.comparisonPosition)
258
258
  },
259
259
  children: [/* @__PURE__ */ (0, Z.jsxs)("div", {
260
- className: c.comparisonIconContainer,
260
+ className: s.comparisonIconContainer,
261
261
  style: {
262
262
  alignItems: R(u.textAlign),
263
263
  flexDirection: G(u.iconPosition)
@@ -272,7 +272,7 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
272
272
  }), /* @__PURE__ */ (0, Z.jsx)("div", {
273
273
  "data-testid": "number-comparison",
274
274
  style: {
275
- fontSize: `${(u.comparisonStyle.relativeFontSizePercentage ?? a.relativeFontSizePercentage) / 100}em`,
275
+ fontSize: `${(u.comparisonStyle.relativeFontSizePercentage ?? c.relativeFontSizePercentage) / 100}em`,
276
276
  fontFamily: u.comparisonStyle.fontFamily,
277
277
  fontStyle: u.comparisonStyle.italic ? "italic" : "normal",
278
278
  fontWeight: u.comparisonStyle.weight || (u.comparisonStyle.bold ? "bold" : "normal"),
@@ -282,7 +282,7 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
282
282
  children: T
283
283
  })]
284
284
  }), /* @__PURE__ */ (0, Z.jsx)("div", {
285
- className: c.number,
285
+ className: s.number,
286
286
  "data-testid": "number-base",
287
287
  style: {
288
288
  fontFamily: u.numberStyle.fontFamily,
@@ -291,7 +291,7 @@ var S = /* @__PURE__ */ e(m()), C = (e, n) => {
291
291
  textDecoration: K(u.numberStyle.underlined, u.numberStyle.strikethrough),
292
292
  color: u.numberColor
293
293
  },
294
- children: f && typeof o == "number" ? v(f, o) : o
294
+ children: f && typeof a == "number" ? y(f, a) : a
295
295
  })]
296
296
  })
297
297
  });
@@ -1,8 +1,8 @@
1
1
  import { a as e, o as t, t as n } from "./rolldown-runtime-DleVn1XH.js";
2
- import { $a as r, Qa as i, Ta as a, Ti as o, Xa as s, Xs as c, Yn as l, Za as u, pc as d, qs as f } from "./interfaces-VUY4_yVO.js";
3
- import { En as p, Ki as m, P as h, Zt as g, d as _, o as v, wi as y } from "./utils-Ba9T0TqC.js";
4
- import { M as b, Q as x, St as S, Wt as C, X as w, Z as T, i as E, j as D, nn as O, rt as k, un as A } from "./escobar-BGqT1EsE.js";
5
- import { t as j } from "./coloring-C16AUZEi.js";
2
+ import { Gn as r, Ja as i, Ks as a, Sa as o, Si as s, Xa as c, Ya as l, Ys as u, Za as d, fc as f } from "./isEqual-BDxAhUo8.js";
3
+ import { $t as p, Ei as m, On as h, P as g, Yi as _, d as v, o as y } from "./utils-Bg7K-t6K.js";
4
+ import { M as b, Q as x, St as S, Wt as C, X as w, Z as T, dn as E, i as D, j as O, rn as k, rt as A } from "./escobar-eDjtGpkC.js";
5
+ import { t as j } from "./coloring-B1XAfg6b.js";
6
6
  import { n as M, t as N } from "./src-BOS6SqkZ.js";
7
7
  var P = /* @__PURE__ */ n(((e, t) => {
8
8
  (function(e, t, n) {
@@ -284,20 +284,20 @@ var P = /* @__PURE__ */ n(((e, t) => {
284
284
  })), z = /* @__PURE__ */ n(((e, t) => {
285
285
  var n = P(), r = ee(), i = te(), a = F(), o = I(), s = ne(), c = R();
286
286
  c.alea = n, c.xor128 = r, c.xorwow = i, c.xorshift7 = a, c.xor4096 = o, c.tychei = s, t.exports = c;
287
- })), re = /* @__PURE__ */ t(m()), B = .7, V = 12 * B, H = /* @__PURE__ */ function(e) {
287
+ })), re = /* @__PURE__ */ t(_()), B = .7, V = 12 * B, H = /* @__PURE__ */ function(e) {
288
288
  return e.RenderDone = "render-done", e;
289
289
  }({}), U = /* @__PURE__ */ function(e) {
290
290
  return e.Minimum = "Minimum", e;
291
291
  }({}), W = /* @__PURE__ */ function(e) {
292
292
  return e.collectionKey = "coll", e.measureValue = "size", e;
293
293
  }({}), G = (e, t, n) => {
294
- let r = e.dimensions.filter((e) => o(e)), i = e.measures.filter((e) => o(e)), a = b((e.supportingMeasures ?? []).filter((e) => o(e)));
294
+ let r = e.dimensions.filter((e) => s(e)), i = e.measures.filter((e) => s(e)), a = b((e.supportingMeasures ?? []).filter((e) => s(e)));
295
295
  if (!r[0] || !i[0]) return n;
296
- let s = d(r[0].dataItem), c = d(i[0].dataItem), l = [{
296
+ let o = f(r[0].dataItem), c = f(i[0].dataItem), l = [{
297
297
  key: "coll",
298
298
  data: {
299
299
  extract: [{
300
- field: s,
300
+ field: o,
301
301
  props: {
302
302
  size: { field: c },
303
303
  [c]: { field: c },
@@ -314,18 +314,18 @@ var P = /* @__PURE__ */ n(((e, t) => {
314
314
  }, K = /* @__PURE__ */ function(e) {
315
315
  return e.size = "size", e.gradient = "gradient", e;
316
316
  }({}), q = (e, t, n) => {
317
- let r = e.dimensions.filter((e) => o(e)), i = e.measures.filter((e) => o(e));
317
+ let r = e.dimensions.filter((e) => s(e)), i = e.measures.filter((e) => s(e));
318
318
  if (!r[0] || !i[0]) return n;
319
- let a = { size: { data: { field: d(i[0].dataItem) } } };
319
+ let a = { size: { data: { field: f(i[0].dataItem) } } };
320
320
  return a = S(e, t, a), {
321
321
  ...n,
322
322
  scales: a
323
323
  };
324
- }, J = (e, t, n, r, i, a, c, u) => e.filter(o).map((e, r) => {
325
- let i = Object.keys(t.data).find((n) => t.data[n]?.source?.field === d(e.dataItem)), a = (t.data[i] || t.data[`measure${r}`])?.value, o = l(e) || e.label || e.dataItem.name || "", c = u && !s(e.formatter) ? k(e.formatter) : e.formatter;
324
+ }, J = (e, t, n, a, o, c, l, u) => e.filter(s).map((e, a) => {
325
+ let o = Object.keys(t.data).find((n) => t.data[n]?.source?.field === f(e.dataItem)), s = (t.data[String(o)] || t.data[`measure${a}`])?.value, c = r(e) || e.label || e.dataItem.name || "", l = u && !i(e.formatter) ? A(e.formatter) : e.formatter;
326
326
  return {
327
- label: o,
328
- value: c ? n.formatter(c)(a, void 0, t.data) : a
327
+ label: c,
328
+ value: l ? n.formatter(l)(s, void 0, t.data) : s
329
329
  };
330
330
  }), Y = (e, t, n, r, i) => {
331
331
  let a = {
@@ -337,14 +337,14 @@ var P = /* @__PURE__ */ n(((e, t) => {
337
337
  };
338
338
  return a.extract = T(e, t, J, x), w(e, t, n, a, "tooltip", i);
339
339
  }, ie = (e, t, n, r, i, a) => {
340
- let s = e.measures.filter((e) => o(e)), l = new j(e, t, i?.[0]?.itemsNotAffectedByFiltering), u = d(s[0].dataItem), f = C([""], a);
341
- f?.trigger.forEach((e) => e.propagation = "stop");
340
+ let o = e.measures.filter((e) => s(e)), c = new j(e, t, i?.[0]?.itemsNotAffectedByFiltering), l = f(o[0].dataItem), d = C([""], a);
341
+ d?.trigger.forEach((e) => e.propagation = "stop");
342
342
  let p = {
343
343
  key: "word-cloud",
344
- type: A.WordCloud,
344
+ type: E.WordCloud,
345
345
  data: { collection: W.collectionKey },
346
346
  on: { [H.RenderDone]() {
347
- a.onRenderDone?.();
347
+ a?.onRenderDone?.();
348
348
  } },
349
349
  layout: { minimumLayoutMode: U.Minimum },
350
350
  settings: {
@@ -359,20 +359,20 @@ var P = /* @__PURE__ */ n(((e, t) => {
359
359
  scale: K.size,
360
360
  ref: W.measureValue
361
361
  },
362
- fill: l.getColorDefinition({
363
- ref: e.coloring?.type === c.Gradient ? W.measureValue : l.MAIN_FIELD,
364
- dataItemId: e.coloring?.type === c.Single ? u : void 0,
365
- overwriteSources: [l.MAIN_FIELD]
362
+ fill: c.getColorDefinition({
363
+ ref: e.coloring?.type === u.Gradient ? W.measureValue : c.MAIN_FIELD,
364
+ dataItemId: e.coloring?.type === u.Single ? l : void 0,
365
+ overwriteSources: [c.MAIN_FIELD]
366
366
  })
367
367
  }
368
368
  },
369
- brush: f || void 0
369
+ brush: d || void 0
370
370
  };
371
371
  return {
372
372
  ...n,
373
373
  components: [...n.components, p]
374
374
  };
375
- }, ae = class extends D {
375
+ }, ae = class extends O {
376
376
  onRenderDone;
377
377
  onChartUpdated;
378
378
  constructor(e) {
@@ -387,7 +387,7 @@ var P = /* @__PURE__ */ n(((e, t) => {
387
387
  };
388
388
  }
389
389
  preCompile(e) {
390
- let t = e.dimensions.filter((e) => o(e)), n = e.measures.filter((e) => o(e)), r = t[0], i = n[0];
390
+ let t = e.dimensions.filter((e) => s(e)), n = e.measures.filter((e) => s(e)), r = t[0], i = n[0];
391
391
  if (!r || !i) throw Error("Word cloud w/o a dimension or measure is not supported.");
392
392
  }
393
393
  postCompile(e) {
@@ -638,7 +638,7 @@ function pe(e, t, n) {
638
638
  }
639
639
  function me(e) {
640
640
  return e.map((e) => ({
641
- type: O.Text,
641
+ type: k.Text,
642
642
  text: e.text,
643
643
  x: e.x,
644
644
  y: e.y,
@@ -659,9 +659,9 @@ function me(e) {
659
659
  }
660
660
  var Q = {
661
661
  fontFamily: "Arial",
662
- fontScaling: u.linear,
663
- fontStyle: i.normal,
664
- fontWeight: r.normal,
662
+ fontScaling: l.linear,
663
+ fontStyle: c.normal,
664
+ fontWeight: d.normal,
665
665
  seed: 1,
666
666
  maxNumChars: 32,
667
667
  word: {
@@ -717,21 +717,21 @@ var Q = {
717
717
  }
718
718
  };
719
719
  function ge(e) {
720
- e.component(A.WordCloud, he);
720
+ e.component(E.WordCloud, he);
721
721
  }
722
- var $ = y(), _e = () => {}, ve = g(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
723
- let o = h(), s = _(), [c] = (0, re.useState)(() => new ae(s)), { activeKey: l } = v(), u = {
722
+ var $ = m(), _e = () => {}, ve = p(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
723
+ let s = g(), c = v(), [l] = (0, re.useState)(() => new ae(c)), { activeKey: u } = y(), d = {
724
724
  ...i,
725
- valuePickerMode: !!l
726
- }, d = t || a, m = c.compile(e, d, n, r, {
727
- ...u,
728
- onRenderDone: s
729
- }, f.WordCloud, o);
730
- return m ? /* @__PURE__ */ (0, $.jsx)(p.Provider, {
725
+ valuePickerMode: !!u
726
+ }, f = t || o, p = l.compile(e, f, n, r, {
727
+ ...d,
728
+ onRenderDone: c
729
+ }, a.WordCloud, s);
730
+ return p ? /* @__PURE__ */ (0, $.jsx)(h.Provider, {
731
731
  value: _e,
732
- children: /* @__PURE__ */ (0, $.jsx)(E, {
733
- config: u,
734
- definition: m,
732
+ children: /* @__PURE__ */ (0, $.jsx)(D, {
733
+ config: d,
734
+ definition: p,
735
735
  size: r,
736
736
  vSpec: e,
737
737
  escobarPlugins: [ge]