@astrato-io/visualizations 0.10.0 → 0.11.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 (138) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/README.md +22 -4
  3. package/THIRD_PARTY_NOTICES.md +494 -0
  4. package/VISUALIZATION_DEFINITIONS.md +59 -145
  5. package/chunks/{Button-CCF851ea.js → Button-CPG4WX8X.js} +3 -3
  6. package/chunks/{CircularProgress-yupH6YWs.js → CircularProgress-PSLW8HmD.js} +12 -12
  7. package/chunks/FieldTypeIcon-5k2bkqd0.js +22 -0
  8. package/chunks/{LinearProgress-CyFjN4px.js → LinearProgress-KQ2EQlGL.js} +16 -16
  9. package/chunks/{MenuOption-CQpT79AP.js → MenuOption-B-6K7kks.js} +151 -151
  10. package/chunks/{Title-C-p4ZarD.js → Title-BmvwZYkh.js} +32 -32
  11. package/chunks/{_createAggregator-BF4qG9XK.js → _createAggregator-CFmH6gUN.js} +11 -11
  12. package/chunks/{app-filter-bar.compiler-8fxCo2q7.js → app-filter-bar.compiler-BY5-T16I.js} +8 -8
  13. package/chunks/{bar-layout-DStC-GNV.js → bar-layout-BNou0dZF.js} +2 -2
  14. package/chunks/{bar.compiler-CQAu8KL8.js → bar.compiler-BkhO7sDd.js} +55 -53
  15. package/chunks/{builder-CScg1TOS.js → builder-CNjuqD2z.js} +107 -56
  16. package/chunks/category-axis-D1OVyMrr.js +20 -0
  17. package/chunks/{coloring-9jU3s_-p.js → coloring-BOiP0rmn.js} +54 -54
  18. package/chunks/{createSimplePaletteValueFilter-C4hZpCdn.js → createSimplePaletteValueFilter-BkgQ7MFE.js} +166 -166
  19. package/chunks/defaults-B5_8S-J-.js +3 -0
  20. package/chunks/{definitions-C4grxhye.js → definitions-AS9GcavE.js} +263 -242
  21. package/chunks/{escobar-CjirINHP.js → escobar-cQ1eQ64G.js} +8528 -8461
  22. package/chunks/{extend-preset-D-l9u_we.js → extend-preset-BlCbcXKR.js} +421 -421
  23. package/chunks/{filter.compiler-lji2Acgn.js → filter.compiler-CI7dDNM1.js} +12 -12
  24. package/chunks/{filtering-C1zakrrX.js → filtering-Dwi7hDPZ.js} +263 -263
  25. package/chunks/handlers-C63NVo7i.js +15433 -0
  26. package/chunks/{icon-picker-styles-Bj80ZUBK.js → icon-picker-styles-CBlxEu3s.js} +8 -8
  27. package/chunks/{isEqual-Ch9OEye3.js → isEqual-BdHo6wqq.js} +1 -1
  28. package/chunks/{isFocusVisible-CgMP0qkR.js → isFocusVisible-C1nlVUwL.js} +9 -9
  29. package/chunks/line.compiler-DCv3h42f.js +198 -0
  30. package/chunks/linear-Bq_r9l5S.js +264 -0
  31. package/chunks/{logger-CKRjhSHQ.js → logger-Bc-DqDM_.js} +72 -72
  32. package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
  33. package/chunks/{map.compiler-CKzorLgK.js → map.compiler-CRO6XpdI.js} +43 -45
  34. package/chunks/measure-format-default-B6ghxih7.js +22 -0
  35. package/chunks/{metadata-Bb9pTXrq.js → metadata-CtkvZEhS.js} +1 -1
  36. package/chunks/number.compiler-kV4lobCZ.js +57 -0
  37. package/chunks/{operations-DZoY50VX.js → operations-COl9wgqi.js} +9893 -9831
  38. package/chunks/{range-D1BTmFMp.js → range-CMJ5yc5Z.js} +2 -2
  39. package/chunks/{react-dom-Dgv2azN2.js → react-dom-BjsCbYHq.js} +76 -76
  40. package/chunks/{render-wrappers-_P3xwu5A.js → render-wrappers-DFHi3Wkr.js} +1 -1
  41. package/chunks/{requirements-NHNrR8Ie.js → requirements-C5YLmHKe.js} +251 -227
  42. package/chunks/{shared-UitWpq1J.js → shared-DyqxOie0.js} +290 -278
  43. package/chunks/standalone-06i1wmIX.js +6 -0
  44. package/chunks/{standalone-DtBk_iUz.js → standalone-9jrQ3zJT.js} +10 -10
  45. package/chunks/standalone-B6zUvxNQ.js +357 -0
  46. package/chunks/{standalone-Bnnr87pc.js → standalone-BYK2U0Vd.js} +418 -679
  47. package/chunks/standalone-Be5APcVv.js +762 -0
  48. package/chunks/standalone-Bp4G3MDx.js +396 -0
  49. package/chunks/{standalone-CbPk8bKn.js → standalone-BrjtMIdd.js} +132 -132
  50. package/chunks/{standalone-BOzHA_d4.js → standalone-Bsfz5vnJ.js} +57 -57
  51. package/chunks/standalone-BuXpKMnc.js +2 -0
  52. package/chunks/standalone-CIjNYyya.js +8378 -0
  53. package/chunks/{standalone-B0U6c3su.js → standalone-CS5VGoja.js} +358 -358
  54. package/chunks/standalone-CUGt2FUF.js +2 -0
  55. package/chunks/{standalone-BapqaniK.js → standalone-ChfEHb28.js} +2299 -1072
  56. package/chunks/standalone-CnF2OYLQ.js +355 -0
  57. package/chunks/standalone-CznEEiq3.js +422 -0
  58. package/chunks/{standalone-Ck63MZzj.js → standalone-D9k5SCd8.js} +165 -165
  59. package/chunks/{standalone-CRdDZYeM.js → standalone-DYVYccmY.js} +855 -855
  60. package/chunks/{standalone-CVknVdUC.js → standalone-DaNxWIKn.js} +27 -27
  61. package/chunks/{standalone-swGs70tD.js → standalone-Db_HNuWx.js} +50 -50
  62. package/chunks/standalone-DcuE8KBa.js +287 -0
  63. package/chunks/{standalone-U0WJwFlG.js → standalone-I5kRIsp8.js} +97 -97
  64. package/chunks/{standalone-BBu90BhK.js → standalone-K2OvRAQM.js} +125 -125
  65. package/chunks/{standalone-DCFY1MAV.js → standalone-c4CPN6ug.js} +4634 -4633
  66. package/chunks/{standalone-ByKKqT5L.js → standalone-iOnJhCvA.js} +302 -302
  67. package/chunks/standalone-pCrzBiTy.js +773 -0
  68. package/chunks/standalone-qrZaimgC.js +689 -0
  69. package/chunks/standalone-yqDJ8h3K.js +1012 -0
  70. package/chunks/{table.compiler-OWSx5MOq.js → table.compiler-CMH_dtYs.js} +29 -29
  71. package/chunks/{useFieldName-B8iCYyw1.js → useFieldName-BfxBzhhH.js} +1 -1
  72. package/chunks/{utils-3Igg6xmO.js → utils-BdJrEeIQ.js} +4037 -4015
  73. package/chunks/{view-DdMLZySj.js → view-Q-_XIrWE.js} +1615 -1615
  74. package/chunks/{visualization-filters-CzvFHE6M.js → visualization-filters-BwS0xUqs.js} +1723 -1693
  75. package/chunks/{with-html-element-DOfkR3C1.js → with-html-element-D_ooGNWI.js} +4006 -3994
  76. package/definitions.js +2 -2
  77. package/docs/operations/astrato-app-filter-bar.md +1 -1
  78. package/docs/operations/bar.md +30 -1
  79. package/docs/operations/combo.md +30 -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 +1 -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 +1 -1
  87. package/docs/operations/iframe.md +1 -1
  88. package/docs/operations/image.md +1 -1
  89. package/docs/operations/index.md +5 -4
  90. package/docs/operations/line.md +48 -1
  91. package/docs/operations/map.md +5274 -0
  92. package/docs/operations/number.md +1 -1
  93. package/docs/operations/pie.md +1 -1
  94. package/docs/operations/radar.md +1 -1
  95. package/docs/operations/sankey.md +1 -1
  96. package/docs/operations/scatter.md +1 -1
  97. package/docs/operations/shape.md +1 -1
  98. package/docs/operations/simpleTextObject.md +1 -1
  99. package/docs/operations/slider.md +1 -1
  100. package/docs/operations/table.md +1 -1
  101. package/docs/operations/tree.md +1 -1
  102. package/docs/operations/treemap.md +1 -1
  103. package/docs/operations/waterfall.md +1 -1
  104. package/docs/operations/word-cloud.md +1 -1
  105. package/getters.js +3 -3
  106. package/index.js +528 -504
  107. package/metadata.js +2 -2
  108. package/operations.js +6 -6
  109. package/package.json +73 -68
  110. package/src/definitions/index.d.ts +1 -1
  111. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +34 -53
  112. package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
  113. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +1 -1
  114. package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +2 -2
  115. package/src/definitions/model/definitions/schemas/common.schema.d.ts +14 -2
  116. package/src/definitions/model/definitions/schemas/index.d.ts +1 -1
  117. package/src/definitions/model/definitions/schemas/line.schema.d.ts +1 -1
  118. package/src/definitions/model/definitions/types/compilation.types.d.ts +4 -1
  119. package/src/types.d.ts +28 -28
  120. package/src/visualization-catalog.d.ts +3 -0
  121. package/styles.css +1 -1
  122. package/chunks/FieldTypeIcon-D_MzsdfY.js +0 -22
  123. package/chunks/defaults-cyNhn37t.js +0 -3
  124. package/chunks/handlers-ZviIUC-j.js +0 -15387
  125. package/chunks/line.compiler-De5fiKuR.js +0 -198
  126. package/chunks/number.compiler-CaTmJkmi.js +0 -53
  127. package/chunks/standalone-BEekPuA12.js +0 -357
  128. package/chunks/standalone-BR2JuRIC.js +0 -422
  129. package/chunks/standalone-BwJqDj2Z.js +0 -396
  130. package/chunks/standalone-CRfDOO1x.js +0 -287
  131. package/chunks/standalone-DZDGX3aa.js +0 -518
  132. package/chunks/standalone-DhfgeJIk.js +0 -1012
  133. package/chunks/standalone-DibjA73M.js +0 -6
  134. package/chunks/standalone-DxBAyqAu.js +0 -772
  135. package/chunks/standalone-KMQPsNsq.js +0 -2
  136. package/chunks/standalone-MBLSvsrY.js +0 -2
  137. package/chunks/standalone-wgFAVnnm.js +0 -355
  138. package/chunks/standalone-xGV0dqPV.js +0 -689
@@ -0,0 +1,396 @@
1
+ import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { Ar as n, Cc as r, Cr as i, Ec as a, Hc as o, Lo as s, Na as c, O as l, Pi as u, Wo as d, ec as f, fa as p, ka as m, ri as h, va as ee, wr as te } from "./visualization-filters-BwS0xUqs.js";
3
+ import { Br as ne, I as g, Mt as _, P as v, li as y, s as b, wn as re } from "./utils-BdJrEeIQ.js";
4
+ import "./logger-Bc-DqDM_.js";
5
+ import { $t as x, A as ie, An as ae, Bt as oe, Cn as se, Ct as ce, Dt as le, En as S, Ft as ue, Gt as C, Ht as w, Jt as T, L as E, Mt as D, Nt as O, R as k, Rt as A, Tn as j, Ut as M, Xt as N, Yt as P, _ as F, bn as I, bt as L, cn as R, i as z, jn as B, k as V, ln as H, n as U, qt as de, rn as fe, v as pe, vn as W, wt as me, xn as he, yn as G, zt as ge } from "./escobar-cQ1eQ64G.js";
6
+ import { a as _e, t as ve } from "./coloring-BOiP0rmn.js";
7
+ import { t as K } from "./set-coloring-datafield-B3uIS1Pe.js";
8
+ import { t as ye } from "./range-CMJ5yc5Z.js";
9
+ var be = /* @__PURE__ */ t(((e, t) => {
10
+ var n = _e();
11
+ function r(e) {
12
+ var t = n(e), r = t % 1;
13
+ return t === t ? r ? t - r : t : 0;
14
+ }
15
+ t.exports = r;
16
+ }));
17
+ y();
18
+ var xe = (e, t, n, r, i, a, s = []) => {
19
+ n.collections ??= [];
20
+ let c = e.dimensions.filter((e) => h(e)), l = e.measures.filter((e) => h(e)), u = Se(e, t, n, s);
21
+ return c[0] && (n.collections.push({
22
+ key: M.DimensionDomain,
23
+ data: { extract: [{ field: o(c[0].dataItem) }] }
24
+ }), u[W(e)] = {
25
+ data: { collection: M.DimensionDomain },
26
+ type: j.Band
27
+ }), l[0] && (u[G(e, l[0])] = {
28
+ data: { field: o(l[0].dataItem) },
29
+ expand: .02,
30
+ invert: ie(!1, e.axes?.primaryMeasure),
31
+ ...V(e.axes?.primaryMeasure?.axisRange, !0)
32
+ }), {
33
+ ...n,
34
+ scales: u
35
+ };
36
+ };
37
+ function Se(e, t, n, r) {
38
+ let i = e.dimensions.filter((e) => h(e)), s = e.measures.filter((e) => h(e));
39
+ switch (e.coloring?.type) {
40
+ case a.Categorical: {
41
+ let a = oe(e, r, i[1]);
42
+ return D(n, 1, { color: { field: a } }), { categorical: A(K(e, a), t, a, {
43
+ customPalette: e.coloring.customPalette ?? u.customPalette,
44
+ palette: e.coloring.palette,
45
+ sortOrder: e.coloring.sortOrder
46
+ }, n.collections) };
47
+ }
48
+ case a.Gradient: {
49
+ let r = w(e);
50
+ return D(n, 1, { color: { field: r } }), ge(K(e, r), t, {});
51
+ }
52
+ case a.Single: {
53
+ let r = o(s[0]?.dataItem);
54
+ r && D(n, 1, { color: { field: r } });
55
+ let i = e?.coloring?.color ?? t.colors.brandColors[0];
56
+ return { [a.Single]: {
57
+ data: [],
58
+ unknown: i,
59
+ type: j.CategoricalColor,
60
+ range: [i]
61
+ } };
62
+ }
63
+ default: return {};
64
+ }
65
+ }
66
+ var Ce = (e, t, n) => {
67
+ let r = e.dimensions.filter((e) => h(e)), i = e.measures.filter((e) => h(e)), a = (e.supportingMeasures ?? []).filter((e) => h(e)), [s, c] = r, l = o(s?.dataItem), u = o(c?.dataItem), d = o(i[0]?.dataItem), f = pe(a), p = {
68
+ key: M.DotBarCollection,
69
+ data: { extract: [{
70
+ field: l,
71
+ trackBy: (e) => e,
72
+ reduce: "first",
73
+ props: {
74
+ start: {
75
+ field: d,
76
+ reduce: "min"
77
+ },
78
+ med: {
79
+ field: d,
80
+ reduce: "avg"
81
+ },
82
+ end: {
83
+ field: d,
84
+ reduce: "max"
85
+ }
86
+ }
87
+ }] }
88
+ }, m = {
89
+ key: M.DotPointsCollection,
90
+ data: { extract: [{
91
+ field: u,
92
+ props: {
93
+ x: { field: d },
94
+ group: { field: l },
95
+ [d]: { field: d },
96
+ ...f
97
+ }
98
+ }] }
99
+ };
100
+ return {
101
+ ...n,
102
+ collections: [p, m]
103
+ };
104
+ }, we = /* @__PURE__ */ t(((e, t) => {
105
+ var n = Math.floor, r = Math.random;
106
+ function i(e, t) {
107
+ return e + n(r() * (t - e + 1));
108
+ }
109
+ t.exports = i;
110
+ })), q = /* @__PURE__ */ t(((e, t) => {
111
+ var n = we();
112
+ function r(e, t) {
113
+ var r = -1, i = e.length, a = i - 1;
114
+ for (t = t === void 0 ? i : t; ++r < t;) {
115
+ var o = n(r, a), s = e[o];
116
+ e[o] = e[r], e[r] = s;
117
+ }
118
+ return e.length = t, e;
119
+ }
120
+ t.exports = r;
121
+ })), Te = /* @__PURE__ */ t(((e, t) => {
122
+ var n = l(), r = q();
123
+ function i(e) {
124
+ return r(n(e));
125
+ }
126
+ t.exports = i;
127
+ })), Ee = /* @__PURE__ */ t(((e, t) => {
128
+ var n = te();
129
+ function r(e, t) {
130
+ return n(t, function(t) {
131
+ return e[t];
132
+ });
133
+ }
134
+ t.exports = r;
135
+ })), De = /* @__PURE__ */ t(((e, t) => {
136
+ var r = Ee(), i = n();
137
+ function a(e) {
138
+ return e == null ? [] : r(e, i(e));
139
+ }
140
+ t.exports = a;
141
+ })), Oe = /* @__PURE__ */ t(((e, t) => {
142
+ var n = q(), r = De();
143
+ function i(e) {
144
+ return n(r(e));
145
+ }
146
+ t.exports = i;
147
+ })), ke = /* @__PURE__ */ t(((e, t) => {
148
+ var n = Te(), r = Oe(), i = ee();
149
+ function a(e) {
150
+ return (i(e) ? n : r)(e);
151
+ }
152
+ t.exports = a;
153
+ })), Ae = /* @__PURE__ */ e(ye()), je = /* @__PURE__ */ e(ke()), J = (e) => 1 - (e.barSettings.barPadding ?? 0);
154
+ function Me(e, t, n) {
155
+ let r = new ve(e, t, n?.[0]?.itemsNotAffectedByFiltering);
156
+ return r.getColorDefinition({
157
+ overwriteSources: [r.MAIN_FIELD],
158
+ ref: "color"
159
+ });
160
+ }
161
+ function Ne(e) {
162
+ let t = H([""], e, { valuePickerMode: e?.valuePickerMode }), n = t?.consume?.[1]?.style?.active?.strokeWidth, r = (t?.consume?.[1])?.style?.active;
163
+ return typeof n == "function" && r && (r.strokeWidth = (e) => e.type === se.Line ? 1 : n(e)), t ?? {};
164
+ }
165
+ function Y(e) {
166
+ return R({
167
+ triggerData: [""],
168
+ consumeData: ["", "group"],
169
+ consumerMode: ae.Or
170
+ }, e ?? {}, { valuePickerMode: e?.valuePickerMode }) ?? {};
171
+ }
172
+ var X = 100, Z = .1, Q = .9, Pe = (0, je.default)((0, Ae.default)(Z, Q, (Q - Z) / X));
173
+ function Fe(e, t) {
174
+ return ({ datum: n, resources: { scale: r } }, i) => {
175
+ let a = r?.(W(t));
176
+ if (!a || typeof a != "function" || typeof a.bandwidth != "function") return 0;
177
+ let o = t.jitterPoints ? Pe[i % X] : .5;
178
+ return a(n.group.value) + .5 * (1 - e) * a.bandwidth() + e * a.bandwidth() * o;
179
+ };
180
+ }
181
+ var Ie = (e, t, n, r, i = [], a) => {
182
+ let o = Le(e, t, a), s = Re(e, Me(e, t, i), a);
183
+ return {
184
+ ...n,
185
+ components: [
186
+ ...n.components,
187
+ o,
188
+ s
189
+ ]
190
+ };
191
+ };
192
+ function Le(e, t, n) {
193
+ let r = {
194
+ orientation: e.orientation,
195
+ major: { scale: W(e) },
196
+ minor: { scale: G(e, e.measures.filter((e) => h(e))[0]) },
197
+ box: {
198
+ width: J(e),
199
+ fill: e.barColor ?? "rgba(100, 100, 100, 0.2)",
200
+ rx: e.barSettings?.barRadius ?? 0,
201
+ roundAllEdges: !0
202
+ },
203
+ median: {
204
+ stroke: c.mainDarkNavy,
205
+ strokeWidth: 2
206
+ }
207
+ };
208
+ return e.barSettings?.strokeEnabled ? (r.box.stroke = e.barSettings?.strokeColor || t.colors.brandColors[0], r.box.strokeWidth = e.barSettings?.strokeWidth) : r.box.stroke = c.transparent, {
209
+ type: B.Box,
210
+ layout: { displayOrder: x.VisualizationElement },
211
+ key: "min-max-box",
212
+ data: { collection: M.DotBarCollection },
213
+ settings: r,
214
+ animations: {
215
+ enabled: !0,
216
+ presetId: "bar-chart"
217
+ },
218
+ brush: Ne(n)
219
+ };
220
+ }
221
+ function Re(e, t, n) {
222
+ let r = Fe(J(e) * .9, e);
223
+ return {
224
+ type: B.Point,
225
+ key: "dot-point",
226
+ layout: { displayOrder: x.VisualizationElement },
227
+ data: { collection: M.DotPointsCollection },
228
+ settings: {
229
+ x: { scale: G(e, e.measures.filter((e) => h(e))[0]) },
230
+ y: {
231
+ scale: W(e),
232
+ fn: r
233
+ },
234
+ shape: s.Circle,
235
+ size: e.pointSize,
236
+ strokeWidth: 2,
237
+ opacity: .8,
238
+ fill: t,
239
+ id: ({ datum: e }) => `${e.group.value}::${e.value}`
240
+ },
241
+ animations: { enabled: !0 },
242
+ brush: Y(n)
243
+ };
244
+ }
245
+ function ze(e, t, n) {
246
+ if (!e.refLines?.x) return n;
247
+ let r = e.refLines.x.map((e) => ce(e, he.XAxisScale, t)), i = {
248
+ type: B.RefLine,
249
+ layout: { displayOrder: x.RefLine },
250
+ lines: { x: r }
251
+ };
252
+ return {
253
+ ...n,
254
+ components: [...n.components, i]
255
+ };
256
+ }
257
+ var Be = /* @__PURE__ */ t(((e, t) => {
258
+ var n = m(), r = be(), a = re(), o = i(), s = n.isFinite, c = Math.min;
259
+ function l(e) {
260
+ var t = Math[e];
261
+ return function(e, n) {
262
+ if (e = a(e), n = n == null ? 0 : c(r(n), 292), n && s(e)) {
263
+ var i = (o(e) + "e").split("e");
264
+ return i = (o(t(i[0] + "e" + (+i[1] + n))) + "e").split("e"), +(i[0] + "e" + (+i[1] - n));
265
+ }
266
+ return t(e);
267
+ };
268
+ }
269
+ t.exports = l;
270
+ })), Ve = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
271
+ t.exports = Be()("round");
272
+ })))());
273
+ function $(e, t, n) {
274
+ let r = e.measures.filter((e) => h(e))[0];
275
+ return E(e, t, n, {
276
+ filter: He,
277
+ placement: {
278
+ type: "bounds",
279
+ area: "target"
280
+ },
281
+ extract: k(e, t, Ue(r?.formatter), We)
282
+ }, "tooltip", void 0, {
283
+ componentKeys: ["dot-point"],
284
+ yieldToComponentKeys: ["min-max-box"]
285
+ });
286
+ }
287
+ function He(e) {
288
+ if (e.length === 0) return [];
289
+ let t = e[0];
290
+ return ["dot-point", "min-max-box"].includes(t.key) ? [t] : [];
291
+ }
292
+ function Ue(e) {
293
+ return (t, n, r, i, a, o, s, c) => {
294
+ if (n.key === "dot-point") {
295
+ let t = n.data.x.value;
296
+ return !c && e ? t = r.formatter(e)(t, void 0, n.data) : c && (t = r.formatter(L(e))(n.data.x.value, void 0, n.data)), [{
297
+ label: n.data.label,
298
+ value: t
299
+ }];
300
+ } else if (n.key === "min-max-box") {
301
+ let t = n.data.start.value, i = (0, Ve.default)(n.data.med.value, 2), a = n.data.end.value;
302
+ return !c && e ? (t = r.formatter(e)(t), i = r.formatter(e)(i), a = r.formatter(e)(a)) : c && (t = r.formatter(L(e))(t), i = r.formatter(L(e))(i), a = r.formatter(L(e))(a)), [
303
+ {
304
+ label: "Min",
305
+ value: t
306
+ },
307
+ {
308
+ label: "Avg",
309
+ value: i
310
+ },
311
+ {
312
+ label: "Max",
313
+ value: a
314
+ }
315
+ ];
316
+ }
317
+ return [];
318
+ };
319
+ }
320
+ function We(e) {
321
+ return e.filter((e) => h(e))[1]?.label ?? "";
322
+ }
323
+ var Ge = (e, t, n) => {
324
+ let r = e.dimensions.filter((e) => h(e)), i = e.measures.filter((e) => h(e)), a = {
325
+ showAxisTooltip: e?.axes?.dimension?.showAxisTooltip,
326
+ formatter: r[0]?.formatter || {
327
+ type: "string",
328
+ format: ""
329
+ },
330
+ scale: W(e),
331
+ key: `${C.Dimension}-${e.orientation ?? d.Vertical}`,
332
+ settings: { direction: de(e) }
333
+ }, o = i[0], [s, c] = N([a, {
334
+ showAxisTooltip: e?.axes?.primaryMeasure?.showAxisTooltip,
335
+ formatter: o?.formatter,
336
+ scale: G(e, o),
337
+ key: `${C.Measure}-${e.orientation ?? d.Vertical}`,
338
+ settings: {
339
+ direction: P(e),
340
+ labelDock: T(I(e), o?.secondaryAxis)
341
+ }
342
+ }]);
343
+ return {
344
+ ...n,
345
+ components: [...n.components ?? [], ...s],
346
+ interactions: [...n.interactions ?? [], ...c]
347
+ };
348
+ };
349
+ function Ke(e, t, n, r, i, o) {
350
+ let { components: s, interactions: c } = O(e, t, n, r, i ?? [], o ?? {});
351
+ if (!e.coloring || e.coloring.type === a.Single) return {
352
+ ...n,
353
+ components: s,
354
+ interactions: c
355
+ };
356
+ let l = e.dimensions?.find((t) => e.coloring?.fieldId === t.dataItem.internalKey), u = s.map((e) => (e.type === S.CategoricalLegend || e.type === S.SequentialLegend) && l ? {
357
+ ...e,
358
+ brush: Y(o)
359
+ } : e);
360
+ return {
361
+ ...n,
362
+ components: u,
363
+ interactions: c
364
+ };
365
+ }
366
+ var qe = class extends F {
367
+ constructor() {
368
+ super([
369
+ Ce,
370
+ xe,
371
+ fe,
372
+ ue,
373
+ Ke,
374
+ me,
375
+ Ie,
376
+ ze,
377
+ $,
378
+ Ge,
379
+ le
380
+ ]);
381
+ }
382
+ }, Je = ne(), Ye = new qe(), Xe = _(({ vSpec: e, vTheme: t, data: n, elementSize: i, vizProperties: a }) => {
383
+ let o = v(), { activeKey: s } = b(), c = g(), l = U();
384
+ if (!e || !f(e) || !i) return null;
385
+ let u = {
386
+ ...a,
387
+ valuePickerMode: !!s
388
+ }, d = t || p, m = Ye.compile(e, d, n, i, u, r.Dot, o, c, l);
389
+ return m ? /* @__PURE__ */ (0, Je.jsx)(z, {
390
+ config: u,
391
+ definition: m,
392
+ size: i,
393
+ vSpec: e
394
+ }) : null;
395
+ });
396
+ export { Xe as DotChart };