@astrato-io/visualizations 0.10.1 → 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 (133) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/README.md +19 -1
  3. package/THIRD_PARTY_NOTICES.md +494 -0
  4. package/VISUALIZATION_DEFINITIONS.md +6 -145
  5. package/chunks/{Button-Dn3rJrYf.js → Button-CPG4WX8X.js} +3 -3
  6. package/chunks/{CircularProgress-BFeu06Yb.js → CircularProgress-PSLW8HmD.js} +12 -12
  7. package/chunks/FieldTypeIcon-5k2bkqd0.js +22 -0
  8. package/chunks/{LinearProgress-ClO6GUjN.js → LinearProgress-KQ2EQlGL.js} +16 -16
  9. package/chunks/{MenuOption-Czc34u4q.js → MenuOption-B-6K7kks.js} +151 -151
  10. package/chunks/{Title-BgYnaVTR.js → Title-BmvwZYkh.js} +32 -32
  11. package/chunks/{_createAggregator-BMu9uRax.js → _createAggregator-CFmH6gUN.js} +16 -16
  12. package/chunks/{app-filter-bar.compiler-CVir0wkl.js → app-filter-bar.compiler-BY5-T16I.js} +8 -8
  13. package/chunks/{bar-layout-C_UgRlVl.js → bar-layout-BNou0dZF.js} +2 -2
  14. package/chunks/{bar.compiler-DYuFdi9J.js → bar.compiler-BkhO7sDd.js} +58 -56
  15. package/chunks/{builder-C-TKA-My.js → builder-CNjuqD2z.js} +107 -56
  16. package/chunks/category-axis-D1OVyMrr.js +20 -0
  17. package/chunks/{coloring-BtnPiQ_o.js → coloring-BOiP0rmn.js} +51 -51
  18. package/chunks/{createSimplePaletteValueFilter--zrZxRV9.js → createSimplePaletteValueFilter-BkgQ7MFE.js} +166 -166
  19. package/chunks/defaults-B5_8S-J-.js +3 -0
  20. package/chunks/{definitions-CT304NDn.js → definitions-AS9GcavE.js} +228 -233
  21. package/chunks/{escobar-CvEV2ES1.js → escobar-cQ1eQ64G.js} +4183 -4183
  22. package/chunks/{extend-preset-D9-JP92b.js → extend-preset-BlCbcXKR.js} +427 -427
  23. package/chunks/{filter.compiler-CXeZznks.js → filter.compiler-CI7dDNM1.js} +10 -10
  24. package/chunks/{filtering-8_bFv-jb.js → filtering-Dwi7hDPZ.js} +308 -308
  25. package/chunks/{handlers-C6CZ0XJA.js → handlers-C63NVo7i.js} +4593 -4559
  26. package/chunks/{icon-picker-styles-BXiJ1SZS.js → icon-picker-styles-CBlxEu3s.js} +8 -8
  27. package/chunks/{isEqual-D8Ay63xR.js → isEqual-BdHo6wqq.js} +1 -1
  28. package/chunks/{isFocusVisible-Bu8gGZu5.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-DdZpR7xZ.js → logger-Bc-DqDM_.js} +64 -64
  32. package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
  33. package/chunks/{map.compiler-Q_Y1Pvat.js → map.compiler-CRO6XpdI.js} +43 -43
  34. package/chunks/measure-format-default-B6ghxih7.js +22 -0
  35. package/chunks/{metadata-BQm_TXI1.js → metadata-CtkvZEhS.js} +1 -1
  36. package/chunks/number.compiler-kV4lobCZ.js +57 -0
  37. package/chunks/{operations-DKQWuLL7.js → operations-COl9wgqi.js} +8524 -8480
  38. package/chunks/{range-BdhzvYQ_.js → range-CMJ5yc5Z.js} +2 -2
  39. package/chunks/{react-dom-BGP4tbXV.js → react-dom-BjsCbYHq.js} +76 -76
  40. package/chunks/{render-wrappers-BZpyDnJy.js → render-wrappers-DFHi3Wkr.js} +1 -1
  41. package/chunks/{requirements-e8Fe96ag.js → requirements-C5YLmHKe.js} +250 -226
  42. package/chunks/{shared-C_2F90xq.js → shared-DyqxOie0.js} +504 -498
  43. package/chunks/standalone-06i1wmIX.js +6 -0
  44. package/chunks/{standalone-BDrXVxlP.js → standalone-9jrQ3zJT.js} +10 -10
  45. package/chunks/standalone-B6zUvxNQ.js +357 -0
  46. package/chunks/{standalone-BkbiH-o8.js → standalone-BYK2U0Vd.js} +418 -679
  47. package/chunks/standalone-Be5APcVv.js +762 -0
  48. package/chunks/{standalone-Cl0TSfqC.js → standalone-Bp4G3MDx.js} +123 -123
  49. package/chunks/{standalone-DNh9NcMa.js → standalone-BrjtMIdd.js} +145 -145
  50. package/chunks/{standalone-BTY3w_JA.js → standalone-Bsfz5vnJ.js} +53 -53
  51. package/chunks/standalone-BuXpKMnc.js +2 -0
  52. package/chunks/standalone-CIjNYyya.js +8378 -0
  53. package/chunks/{standalone-CsoMmE9T.js → standalone-CS5VGoja.js} +347 -347
  54. package/chunks/standalone-CUGt2FUF.js +2 -0
  55. package/chunks/{standalone-CaTxAydz.js → standalone-ChfEHb28.js} +2296 -1069
  56. package/chunks/standalone-CnF2OYLQ.js +355 -0
  57. package/chunks/standalone-CznEEiq3.js +422 -0
  58. package/chunks/{standalone-DflyWtuR.js → standalone-D9k5SCd8.js} +169 -169
  59. package/chunks/{standalone-Cc98Pdr6.js → standalone-DYVYccmY.js} +829 -829
  60. package/chunks/{standalone-CY_kjarf.js → standalone-DaNxWIKn.js} +22 -22
  61. package/chunks/{standalone-wOWRCpdn.js → standalone-Db_HNuWx.js} +48 -48
  62. package/chunks/standalone-DcuE8KBa.js +287 -0
  63. package/chunks/{standalone-BE_ONgiG.js → standalone-I5kRIsp8.js} +76 -76
  64. package/chunks/{standalone-B8ZSqauS.js → standalone-K2OvRAQM.js} +113 -113
  65. package/chunks/{standalone-z0o52o5t.js → standalone-c4CPN6ug.js} +1719 -1718
  66. package/chunks/{standalone-DHRalbVO.js → standalone-iOnJhCvA.js} +312 -312
  67. package/chunks/{standalone-CXY4FpF7.js → standalone-pCrzBiTy.js} +222 -222
  68. package/chunks/standalone-qrZaimgC.js +689 -0
  69. package/chunks/standalone-yqDJ8h3K.js +1012 -0
  70. package/chunks/{table.compiler-COaHE9VD.js → table.compiler-CMH_dtYs.js} +35 -35
  71. package/chunks/{useFieldName-CdnCWzhd.js → useFieldName-BfxBzhhH.js} +1 -1
  72. package/chunks/{utils-DganVptf.js → utils-BdJrEeIQ.js} +3924 -3910
  73. package/chunks/{view-Bzlros43.js → view-Q-_XIrWE.js} +1680 -1680
  74. package/chunks/{visualization-filters-D7i6oh1Z.js → visualization-filters-BwS0xUqs.js} +1705 -1686
  75. package/chunks/{with-html-element-CiIhFEa5.js → with-html-element-D_ooGNWI.js} +3962 -3950
  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 +30 -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 +524 -500
  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 -7
  111. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +3 -48
  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/visualization-catalog.d.ts +3 -0
  119. package/styles.css +1 -1
  120. package/chunks/FieldTypeIcon-DrMoGpHJ.js +0 -22
  121. package/chunks/defaults-Dtk7fg3C.js +0 -3
  122. package/chunks/line.compiler-DmHpmQCC.js +0 -198
  123. package/chunks/number.compiler-DQdg6zTy.js +0 -53
  124. package/chunks/standalone-4MsKiqs0.js +0 -355
  125. package/chunks/standalone-B794g9pE.js +0 -1012
  126. package/chunks/standalone-BA2YXyJS.js +0 -422
  127. package/chunks/standalone-BgumbdaJ2.js +0 -357
  128. package/chunks/standalone-Blh4qejk.js +0 -689
  129. package/chunks/standalone-DH0xTEes.js +0 -2
  130. package/chunks/standalone-DcnHjNnC.js +0 -2
  131. package/chunks/standalone-DrHdGkY7.js +0 -762
  132. package/chunks/standalone-c_rROMtx.js +0 -287
  133. package/chunks/standalone-drcFLeN6.js +0 -6
@@ -1,13 +1,13 @@
1
1
  import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
- import { $s as t, Oa as n, Pa as r } from "./visualization-filters-D7i6oh1Z.js";
3
- import { W as i, Zt as a, ci as o, f as s, jt as c, o as l, or as u, si as d, sn as f, zr as p } from "./utils-DganVptf.js";
4
- import { l as m } from "./logger-DdZpR7xZ.js";
2
+ import { Na as t, oc as n, za as r } from "./visualization-filters-BwS0xUqs.js";
3
+ import { Br as i, G as a, Mt as o, Qt as s, ci as c, cn as l, f as u, li as d, o as f, sr as p } from "./utils-BdJrEeIQ.js";
4
+ import { l as m } from "./logger-Bc-DqDM_.js";
5
5
  var h = {
6
6
  OpenMediaPicker: "OPEN_MEDIA_PICKER",
7
7
  OpenMediaPickerResult: "OPEN_MEDIA_PICKER_RESULT",
8
8
  OPEN_TOP_BAR: "OPEN_TOP_BAR",
9
9
  OPEN_CREATE_BOOKMARK_WINDOW: "OPEN_CREATE_BOOKMARK_WINDOW"
10
- }, g = /* @__PURE__ */ e(o());
10
+ }, g = /* @__PURE__ */ e(d());
11
11
  g.forwardRef(function(e, t) {
12
12
  return g.createElement("img", {
13
13
  ...e,
@@ -22,7 +22,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
22
22
  saturation: t?.imageSettings.saturation ?? 1,
23
23
  blur: t?.imageSettings.blur ?? 0,
24
24
  shadow: t?.imageSettings.shadow ?? !1
25
- }), b = i({
25
+ }), b = a({
26
26
  singleImageContainer: {
27
27
  display: "flex",
28
28
  height: "100%",
@@ -40,19 +40,19 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
40
40
  }
41
41
  },
42
42
  addGalleryButton: {
43
- ...d.normal14,
43
+ ...c.normal14,
44
44
  padding: "10px 20px",
45
- background: n.white,
45
+ background: t.white,
46
46
  borderRadius: 4,
47
- border: `1px solid ${n.grey3}`,
48
- color: n.secondaryPurple,
47
+ border: `1px solid ${t.grey3}`,
48
+ color: t.secondaryPurple,
49
49
  cursor: "pointer",
50
50
  display: "flex",
51
51
  justifyContent: "center",
52
52
  alignItems: "center"
53
53
  },
54
54
  buttonIcon: { marginRight: 5 }
55
- }), x = i({
55
+ }), x = a({
56
56
  mainContainer: {
57
57
  display: "flex",
58
58
  flexDirection: "column",
@@ -80,7 +80,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
80
80
  "&.fill": { objectFit: "fill" },
81
81
  "&.none": { objectFit: "none" }
82
82
  }
83
- }), S = p(), C = (e) => f({
83
+ }), S = i(), C = (e) => l({
84
84
  contain: e === r.Contain,
85
85
  cover: e === r.Cover,
86
86
  fill: e === r.Fill,
@@ -92,7 +92,7 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
92
92
  children: /* @__PURE__ */ (0, S.jsx)("div", {
93
93
  className: s.imageContainer,
94
94
  children: /* @__PURE__ */ (0, S.jsx)("img", {
95
- className: f({
95
+ className: l({
96
96
  [s.image]: !0,
97
97
  [C(t)]: !0
98
98
  }),
@@ -108,15 +108,15 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
108
108
  })
109
109
  })
110
110
  });
111
- }, T = c(({ vSpec: e }) => {
112
- let r = a(), i = b(), { variablesDict: o } = l(), c = e && t(e) ? y(r, e, o) : null, d = s();
111
+ }, T = o(({ vSpec: e }) => {
112
+ let r = s(), i = b(), { variablesDict: a } = f(), o = e && n(e) ? y(r, e, a) : null, c = u();
113
113
  return (0, g.useEffect)(() => {
114
- !c?.imageSrc && r.daedalus.objectCapabilities.editable && d();
115
- }, [e, c?.imageSrc]), c?.imageSrc ? /* @__PURE__ */ (0, S.jsx)("div", {
114
+ !o?.imageSrc && r.daedalus.objectCapabilities.editable && c();
115
+ }, [e, o?.imageSrc]), o?.imageSrc ? /* @__PURE__ */ (0, S.jsx)("div", {
116
116
  className: i.singleImageContainer,
117
117
  children: /* @__PURE__ */ (0, S.jsx)(w, {
118
- ...c,
119
- onLoadCallback: d
118
+ ...o,
119
+ onLoadCallback: c
120
120
  })
121
121
  }) : r.daedalus.objectCapabilities.editable ? /* @__PURE__ */ (0, S.jsx)("div", {
122
122
  className: i.previewImageContainer,
@@ -126,8 +126,8 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
126
126
  onClick: () => {
127
127
  r.emitEvent(m.SET_PROPERTY_PANEL_OBJECT_TAB, "ITEM"), r.emitEvent(h.OpenMediaPicker);
128
128
  },
129
- children: [/* @__PURE__ */ (0, S.jsx)(u, {
130
- fill: n.mainDarkNavy,
129
+ children: [/* @__PURE__ */ (0, S.jsx)(p, {
130
+ fill: t.mainDarkNavy,
131
131
  size: 16,
132
132
  className: i.buttonIcon
133
133
  }), "Add from the Gallery"]
@@ -137,8 +137,8 @@ var _ = "data:image/svg+xml,%3Csvg%20width%3D%22177%22%20height%3D%22177%22%20vi
137
137
  children: /* @__PURE__ */ (0, S.jsx)("img", {
138
138
  src: _,
139
139
  alt: "no image",
140
- onLoad: d,
141
- onError: d
140
+ onLoad: c,
141
+ onError: c
142
142
  })
143
143
  });
144
144
  });
@@ -1,9 +1,9 @@
1
1
  import { a as e, o as t, t as n } from "./rolldown-runtime-DleVn1XH.js";
2
- import { $a as r, Fc as i, Qa as a, Qr as o, eo as s, gc as c, in as l, sa as u, to as d, yc as f } from "./visualization-filters-D7i6oh1Z.js";
3
- import { N as p, ci as m, f as h, jt as g, s as _, tn as v, zr as y } from "./utils-DganVptf.js";
4
- import "./logger-DdZpR7xZ.js";
5
- import { L as b, Qt as x, R as S, _ as C, bn as w, fn as T, i as E, kt as D, ut as O, v as k, z as A } from "./escobar-CvEV2ES1.js";
6
- import { t as j } from "./coloring-BtnPiQ_o.js";
2
+ import { Cc as r, Ec as i, Hc as a, ao as o, fa as s, io as c, ln as l, oo as u, ri as d, ro as f } from "./visualization-filters-BwS0xUqs.js";
3
+ import { Br as p, Mt as m, P as h, f as g, li as _, nn as v, s as y } from "./utils-BdJrEeIQ.js";
4
+ import "./logger-Bc-DqDM_.js";
5
+ import { Cn as b, L as x, R as S, _ as C, bt as w, i as T, jn as E, ln as D, v as O, z as k, zt as A } from "./escobar-cQ1eQ64G.js";
6
+ import { t as j } from "./coloring-BOiP0rmn.js";
7
7
  import { n as M, t as N } from "./src-BOS6SqkZ.js";
8
8
  var P = /* @__PURE__ */ n(((e, t) => {
9
9
  (function(e, t, n) {
@@ -285,21 +285,21 @@ var P = /* @__PURE__ */ n(((e, t) => {
285
285
  })), z = /* @__PURE__ */ n(((e, t) => {
286
286
  var n = P(), r = ee(), i = te(), a = F(), o = I(), s = ne(), c = R();
287
287
  c.alea = n, c.xor128 = r, c.xorwow = i, c.xorshift7 = a, c.xor4096 = o, c.tychei = s, t.exports = c;
288
- })), B = /* @__PURE__ */ t(m()), V = .7, re = 12 * V, H = { RenderDone: "render-done" }, U = { Minimum: "Minimum" }, W = {
288
+ })), B = /* @__PURE__ */ t(_()), V = .7, re = 12 * V, H = { RenderDone: "render-done" }, U = { Minimum: "Minimum" }, W = {
289
289
  collectionKey: "coll",
290
290
  measureValue: "size"
291
291
  }, G = (e, t, n) => {
292
- let r = e.dimensions.filter((e) => o(e)), a = e.measures.filter((e) => o(e)), s = k((e.supportingMeasures ?? []).filter((e) => o(e)));
293
- if (!r[0] || !a[0]) return n;
294
- let c = i(r[0].dataItem), l = i(a[0].dataItem), u = [{
292
+ let r = e.dimensions.filter((e) => d(e)), i = e.measures.filter((e) => d(e)), o = O((e.supportingMeasures ?? []).filter((e) => d(e)));
293
+ if (!r[0] || !i[0]) return n;
294
+ let s = a(r[0].dataItem), c = a(i[0].dataItem), l = [{
295
295
  key: W.collectionKey,
296
296
  data: {
297
297
  extract: [{
298
- field: c,
298
+ field: s,
299
299
  props: {
300
- [W.measureValue]: { field: l },
301
- [l]: { field: l },
302
- ...s
300
+ [W.measureValue]: { field: c },
301
+ [c]: { field: c },
302
+ ...o
303
303
  }
304
304
  }],
305
305
  filter: (e) => e[W.measureValue].value != null && !isNaN(e[W.measureValue].value)
@@ -307,24 +307,24 @@ var P = /* @__PURE__ */ n(((e, t) => {
307
307
  }];
308
308
  return {
309
309
  ...n,
310
- collections: u
310
+ collections: l
311
311
  };
312
312
  }, K = {
313
313
  size: "size",
314
314
  gradient: "gradient"
315
315
  }, q = (e, t, n) => {
316
- let r = e.dimensions.filter((e) => o(e)), a = e.measures.filter((e) => o(e));
317
- if (!r[0] || !a[0]) return n;
318
- let s = { [K.size]: { data: { field: i(a[0].dataItem) } } };
319
- return s = D(e, t, s), {
316
+ let r = e.dimensions.filter((e) => d(e)), i = e.measures.filter((e) => d(e));
317
+ if (!r[0] || !i[0]) return n;
318
+ let o = { [K.size]: { data: { field: a(i[0].dataItem) } } };
319
+ return o = A(e, t, o), {
320
320
  ...n,
321
- scales: s
321
+ scales: o
322
322
  };
323
- }, J = (e, t, n, r, s, c, u, d) => e.filter(o).map((e, r) => {
324
- let o = Object.keys(t.data).find((n) => t.data[n]?.source?.field === i(e.dataItem)), s = (t.data[String(o)] || t.data[`measure${r}`])?.value, c = l(e) || e.label || e.dataItem.name || "", u = d && !a(e.formatter) ? O(e.formatter) : e.formatter;
323
+ }, J = (e, t, n, r, i, o, s, c) => e.filter(d).map((e, r) => {
324
+ let i = Object.keys(t.data).find((n) => t.data[n]?.source?.field === a(e.dataItem)), o = (t.data[String(i)] || t.data[`measure${r}`])?.value, s = l(e) || e.label || e.dataItem.name || "", u = c && !f(e.formatter) ? w(e.formatter) : e.formatter;
325
325
  return {
326
- label: c,
327
- value: u ? n.formatter(u)(s, void 0, t.data) : s
326
+ label: s,
327
+ value: u ? n.formatter(u)(o, void 0, t.data) : o
328
328
  };
329
329
  }), Y = (e, t, n, r, i) => {
330
330
  let a = {
@@ -334,13 +334,13 @@ var P = /* @__PURE__ */ n(((e, t) => {
334
334
  type: "bounds"
335
335
  }
336
336
  };
337
- return a.extract = S(e, t, J, A), b(e, t, n, a, "tooltip", i);
338
- }, ie = (e, t, n, r, a, s) => {
339
- let c = e.measures.filter((e) => o(e)), l = new j(e, t, a?.[0]?.itemsNotAffectedByFiltering), u = i(c[0].dataItem), d = x([""], s);
340
- d?.trigger.forEach((e) => e.propagation = "stop");
337
+ return a.extract = S(e, t, J, k), x(e, t, n, a, "tooltip", i);
338
+ }, ie = (e, t, n, r, o, s) => {
339
+ let c = e.measures.filter((e) => d(e)), l = new j(e, t, o?.[0]?.itemsNotAffectedByFiltering), u = a(c[0].dataItem), f = D([""], s);
340
+ f?.trigger.forEach((e) => e.propagation = "stop");
341
341
  let p = {
342
342
  key: "word-cloud",
343
- type: w.WordCloud,
343
+ type: E.WordCloud,
344
344
  data: { collection: W.collectionKey },
345
345
  on: { [H.RenderDone]() {
346
346
  s?.onRenderDone?.();
@@ -359,13 +359,13 @@ var P = /* @__PURE__ */ n(((e, t) => {
359
359
  ref: W.measureValue
360
360
  },
361
361
  fill: l.getColorDefinition({
362
- ref: e.coloring?.type === f.Gradient ? W.measureValue : l.MAIN_FIELD,
363
- dataItemId: e.coloring?.type === f.Single ? u : void 0,
362
+ ref: e.coloring?.type === i.Gradient ? W.measureValue : l.MAIN_FIELD,
363
+ dataItemId: e.coloring?.type === i.Single ? u : void 0,
364
364
  overwriteSources: [l.MAIN_FIELD]
365
365
  })
366
366
  }
367
367
  },
368
- brush: d || void 0
368
+ brush: f || void 0
369
369
  };
370
370
  return {
371
371
  ...n,
@@ -386,7 +386,7 @@ var P = /* @__PURE__ */ n(((e, t) => {
386
386
  };
387
387
  }
388
388
  preCompile(e) {
389
- let t = e.dimensions.filter((e) => o(e)), n = e.measures.filter((e) => o(e)), r = t[0], i = n[0];
389
+ let t = e.dimensions.filter((e) => d(e)), n = e.measures.filter((e) => d(e)), r = t[0], i = n[0];
390
390
  if (!r || !i) throw Error("Word cloud w/o a dimension or measure is not supported.");
391
391
  }
392
392
  postCompile(e) {
@@ -637,7 +637,7 @@ function pe(e, t, n) {
637
637
  }
638
638
  function me(e) {
639
639
  return e.map((e) => ({
640
- type: T.Text,
640
+ type: b.Text,
641
641
  text: e.text,
642
642
  x: e.x,
643
643
  y: e.y,
@@ -658,9 +658,9 @@ function me(e) {
658
658
  }
659
659
  var Q = {
660
660
  fontFamily: "Arial",
661
- fontScaling: r.linear,
662
- fontStyle: s.normal,
663
- fontWeight: d.normal,
661
+ fontScaling: c.linear,
662
+ fontStyle: o.normal,
663
+ fontWeight: u.normal,
664
664
  seed: 1,
665
665
  maxNumChars: 32,
666
666
  word: {
@@ -716,22 +716,22 @@ var Q = {
716
716
  }
717
717
  };
718
718
  function ge(e) {
719
- e.component(w.WordCloud, he);
719
+ e.component(E.WordCloud, he);
720
720
  }
721
- var $ = y(), _e = () => {}, ve = g(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
722
- let a = p(), o = h(), [s] = (0, B.useState)(() => new ae(o)), { activeKey: l } = _(), d = {
723
- ...i,
724
- valuePickerMode: !!l
725
- }, f = t || u, m = s.compile(e, f, n, r, {
721
+ var $ = p(), _e = () => {}, ve = m(({ vSpec: e, vTheme: t, data: n, elementSize: i, vizProperties: a }) => {
722
+ let o = h(), c = g(), [l] = (0, B.useState)(() => new ae(c)), { activeKey: u } = y(), d = {
723
+ ...a,
724
+ valuePickerMode: !!u
725
+ }, f = t || s, p = l.compile(e, f, n, i, {
726
726
  ...d,
727
- onRenderDone: o
728
- }, c.WordCloud, a);
729
- return m ? /* @__PURE__ */ (0, $.jsx)(v.Provider, {
727
+ onRenderDone: c
728
+ }, r.WordCloud, o);
729
+ return p ? /* @__PURE__ */ (0, $.jsx)(v.Provider, {
730
730
  value: _e,
731
- children: /* @__PURE__ */ (0, $.jsx)(E, {
731
+ children: /* @__PURE__ */ (0, $.jsx)(T, {
732
732
  config: d,
733
- definition: m,
734
- size: r,
733
+ definition: p,
734
+ size: i,
735
735
  vSpec: e,
736
736
  escobarPlugins: [ge]
737
737
  })
@@ -0,0 +1,287 @@
1
+ import { o as e } from "./rolldown-runtime-DleVn1XH.js";
2
+ import { $t as t, Ao as n, Cc as r, Ec as i, Hc as a, Na as o, Vt as s, Wc as c, Wo as l, fa as u, js as d, ko as f, qt as p, ri as m } from "./visualization-filters-BwS0xUqs.js";
3
+ import { Br as h, I as g, Mt as _, P as v, li as y } from "./utils-BdJrEeIQ.js";
4
+ import { v_ as b } from "./handlers-C63NVo7i.js";
5
+ import { r as x } from "./label-format-type-C46pzgx7.js";
6
+ import { t as S } from "./stroke-dash-UgMEcCS4.js";
7
+ import "./logger-Bc-DqDM_.js";
8
+ import { $t as C, C as w, Cn as T, D as E, Dn as D, Dt as O, Ft as k, I as A, Kt as j, M, Mt as N, Nt as P, Ot as F, Qt as I, St as L, Ut as R, _ as z, _n as B, bn as V, i as H, jn as U, jt as W, kt as G, ln as K, n as q, rn as J, v as Y, vn as X, w as Z, wt as ee, y as Q, yn as $, zt as te } from "./escobar-cQ1eQ64G.js";
9
+ import { s as ne, t as re } from "./coloring-BOiP0rmn.js";
10
+ import { t as ie } from "./set-coloring-datafield-B3uIS1Pe.js";
11
+ var ae = /* @__PURE__ */ e(y()), oe = (e, n, o) => {
12
+ let l = e.dimensions.filter((e) => m(e)), u = e.measures.filter((e) => m(e)), d = l[0], f = u[0], p = !1, h = {}, { coloring: g } = e || {}, _ = g?.fieldId ?? null;
13
+ if (g?.type === i.Categorical && (_ ||= d ? a(d.dataItem) : null), g?.type === i.Gradient && (_ ||= f ? a(f.dataItem) : null), _ && N(o, 0, { color: { field: _ } }), d && e?.axes?.dimension?.continuousAxis) {
14
+ let e = c(d.dataItem), n = !!d.datePart, r = s(e) || t(e);
15
+ p = !n && r;
16
+ }
17
+ if (h = te(ie(e, _), n, h), h = M(e, h, o.collections, p, !0), u.filter((e) => e.graphType === r.Bar).length > 1 && !e.barSettings?.grouped) {
18
+ let t = $(e, u.find((e) => e.graphType === r.Bar));
19
+ h[t].data = { collection: R.ComboChartCollection };
20
+ }
21
+ return {
22
+ ...o,
23
+ scales: h
24
+ };
25
+ }, se = (e, t, n) => {
26
+ let i = e.measures.filter((e) => m(e)), o = e.dimensions.filter((e) => m(e)), s = (e.supportingMeasures ?? []).filter((e) => m(e)), c = i.reduce((e, t) => {
27
+ let n = a(t.dataItem);
28
+ return e[n] = { field: n }, e;
29
+ }, {}), l = Y(s), u = o.reduce((e, t) => {
30
+ let n = a(t.dataItem);
31
+ return e[n] = { field: n }, e;
32
+ }, {}), d = o[0];
33
+ if (!d) return n;
34
+ let f = a(d.dataItem), p = {
35
+ key: R.ComboChartCollection,
36
+ data: { extract: [] }
37
+ };
38
+ if (p.data.extract = i.map((e, t) => {
39
+ let n = a(e.dataItem);
40
+ return {
41
+ field: f,
42
+ props: {
43
+ end: { field: n },
44
+ ...c,
45
+ ...l,
46
+ ...u,
47
+ start: 0,
48
+ graphType: e.graphType,
49
+ measureIndex: t,
50
+ fieldId: n
51
+ }
52
+ };
53
+ }), i.filter((e) => e.graphType === r.Bar).length > 1) {
54
+ let t = !!i.find((e) => e.graphType === r.Bar)?.secondaryAxis, n = new Map(i.map((e) => [a(e.dataItem), !!e.secondaryAxis]));
55
+ e.barSettings?.grouped || (p.data.stack = {
56
+ stackKey: (e) => e.graphType.value === r.Bar ? `${e.value}` : `${e.value}-${e.graphType.value}-${e.measureIndex.value}`,
57
+ value: (e) => {
58
+ let r = e.fieldId?.value;
59
+ if (typeof r != "string" || n.get(r) !== t) return 0;
60
+ let i = e.end.value;
61
+ return typeof i == "number" || typeof i == "string" ? i : 0;
62
+ },
63
+ offset: x.Diverging
64
+ });
65
+ }
66
+ return {
67
+ ...n,
68
+ collections: [...n.collections ?? [], p]
69
+ };
70
+ }, ce = (e, t, n, i, o, s) => {
71
+ let c = [];
72
+ return e.measures.filter((e) => m(e)).forEach((i) => {
73
+ let l = a(i.dataItem), u = (e) => e.fieldId.value === l;
74
+ switch (i.graphType || e.type) {
75
+ case r.Bar:
76
+ c.push(ue(e, t, o ?? [], n, i, s, u));
77
+ break;
78
+ case r.Point:
79
+ c.push(G(e, t, n, i, !1, R.ComboChartCollection, u));
80
+ break;
81
+ default: c.push(le(e, t, n, i, u)), c.push(G(e, t, n, i, !i.showDataPoints, R.ComboChartCollection, u));
82
+ }
83
+ }), c.sort((e) => e.type === U.Box ? -1 : 0), {
84
+ ...n,
85
+ components: [...n.components, ...c]
86
+ };
87
+ };
88
+ function le(e, t, n, i, o) {
89
+ let s = e.dimensions.filter((e) => m(e));
90
+ if (!s[0]) throw Error("Combo chart without dimension is not supported.");
91
+ if (s.length > 1) throw Error("Combo chart currently support only one dimension.");
92
+ let c = S(i.strokeDash), u = a(i.dataItem), f = ne(e, n, t, i, u);
93
+ return {
94
+ type: U.Line,
95
+ layout: { displayOrder: C.VisualizationElement },
96
+ key: W(e, i, r.Line),
97
+ data: d({
98
+ collection: R.ComboChartCollection,
99
+ filter: o
100
+ }),
101
+ settings: {
102
+ orientation: e.orientation === l.Horizontal ? l.Vertical : l.Horizontal,
103
+ coordinates: {
104
+ major: { scale: X(e) },
105
+ minor: {
106
+ scale: $(e, i),
107
+ ref: u
108
+ }
109
+ },
110
+ layers: {
111
+ curve: e.lineSettings?.lineCurve,
112
+ skipCollisions: !0,
113
+ line: {
114
+ stroke: f,
115
+ strokeWidth: i.strokeWidth,
116
+ strokeDasharray: c
117
+ }
118
+ }
119
+ },
120
+ animations: {
121
+ enabled: !0,
122
+ presetId: "simple-opacity"
123
+ }
124
+ };
125
+ }
126
+ function ue(e, t, n, i, o, s, c) {
127
+ let u = e.dimensions.filter((e) => m(e)), f = e.measures.filter((e) => m(e) && e.graphType === r.Bar);
128
+ if (!u[0]) throw Error("Combo chart without dimension is not supported.");
129
+ let h = { scale: X(e) }, g = {
130
+ scale: $(e, o),
131
+ end: { ref: "end" }
132
+ }, _ = {
133
+ minWidthPx: 2,
134
+ rx: p(e?.barSettings.barRadius, 0),
135
+ roundAllEdges: e?.barSettings?.roundAllEdges,
136
+ useCustomBoxRounding: !0,
137
+ boxPadding: e?.barSettings?.barPadding ?? D.scale.padding
138
+ };
139
+ _.fill = new re(e, t, n?.[0]?.itemsNotAffectedByFiltering).getColorDefinition({ ref: "fieldId" });
140
+ let v = {
141
+ enabled: !0,
142
+ presetId: "bar-chart"
143
+ }, y = o?.graphType !== r.Bar;
144
+ if (f.length > 1 && e.barSettings?.grouped) {
145
+ let t = 1 * (1 / f.length), n = (1 - (e.barSettings?.barPadding ?? 0)) * t, r = .5 / f.length, i = (1 + 0 * (f.length - 1)) * r, s = f.findIndex((e) => a(e.dataItem) === a(o.dataItem));
146
+ h.fn = (n) => {
147
+ let r = n.resources.scale(X(e));
148
+ return r(n.datum.value) + i * r.bandwidth?.() + s * r.bandwidth?.() * t;
149
+ }, _.width = n;
150
+ }
151
+ return {
152
+ type: U.Box,
153
+ layout: { displayOrder: C.VisualizationElement },
154
+ key: W(e, o, r.Bar),
155
+ data: d({
156
+ collection: R.ComboChartCollection,
157
+ filter: c
158
+ }),
159
+ settings: {
160
+ orientation: e.orientation ?? l.Vertical,
161
+ major: h,
162
+ minor: g,
163
+ box: _
164
+ },
165
+ animations: v,
166
+ brush: y ? null : K([""], s)
167
+ };
168
+ }
169
+ var de = (e, t) => {
170
+ let n = t ? [b.Inside] : [
171
+ b.Inside,
172
+ b.Outside,
173
+ b.Opposite
174
+ ];
175
+ return (e || [
176
+ {
177
+ position: b.Inside,
178
+ justify: 1
179
+ },
180
+ { position: b.Outside },
181
+ { position: b.Opposite }
182
+ ]).map((e) => ({
183
+ ...e,
184
+ possible: n.includes(e.position)
185
+ }));
186
+ }, fe = ({ data: e }) => e ? e.end.value > e.start.value ? "up" : "down" : null, pe = ({ data: e }) => e ? e.end.value > e.start.value ? "right" : "left" : null, me = (e, t, i, s, c, l) => {
187
+ let u = e.measures.filter((e) => m(e)), d = u.filter((e) => e.graphType === r.Bar), p = d.filter((e) => e.dataLabels?.show), h = d.length >= 2 && !("barSettings" in e && e.barSettings?.grouped), g = V(e), _ = p.map((n) => {
188
+ let i = !!n.dataLabels?.barLabelPlacements, a = de(n.dataLabels?.barLabelPlacements, h).filter((e) => e.possible).map((e) => ({
189
+ position: e.position,
190
+ fill: e.position === b.Inside ? o.white : "#242424",
191
+ ...e.justify === void 0 ? {} : { justify: e.justify },
192
+ ...i ? { overflow: [b.Outside, b.Opposite].includes(e.position) } : {}
193
+ }));
194
+ return n.dataLabels?.showBackdrop && !h && (a = a.map((e) => Q(e, t, g))), {
195
+ key: `combo-bar-labels-${n.dataItem.uniqueSignature}`,
196
+ type: U.Labels,
197
+ layout: { displayOrder: C.Labels },
198
+ settings: { sources: [{
199
+ component: W(e, n, r.Bar),
200
+ selector: T.Rect,
201
+ strategy: {
202
+ type: "bar",
203
+ settings: {
204
+ direction: g ? pe : fe,
205
+ fontSize: B(n.dataLabels?.size),
206
+ fontFamily: t.fonts.general.fontFamily,
207
+ labels: [{
208
+ label: w(n),
209
+ placements: a
210
+ }]
211
+ }
212
+ }
213
+ }] },
214
+ animations: {
215
+ enabled: !0,
216
+ presetId: "chart-labels"
217
+ }
218
+ };
219
+ }), v = {}, y = {}, x = u.filter((e) => e.graphType !== r.Bar).map((t) => {
220
+ let i = a(t.dataItem), o = W(e, t, r.Point);
221
+ return y[o] = i, v[o] = {
222
+ enabled: t.dataLabels?.show || !1,
223
+ fontSize: B(t.dataLabels?.size),
224
+ backdropColor: t.dataLabels?.backdropColor,
225
+ textColor: t.dataLabels?.textColor,
226
+ isColored: t.dataLabels?.isColored,
227
+ colorType: t.dataLabels?.showBackdrop ? f.Backdrop : f.Text,
228
+ density: t.dataLabels?.density || n.Medium
229
+ }, o;
230
+ }).filter((e) => v[e].enabled), S = x.length ? [E({
231
+ targetComponentKeys: x,
232
+ targetSelector: `.${F}`,
233
+ label: ({ data: e, node: t }) => e[y[t.key]]?.label,
234
+ skipBrush: !0
235
+ }, v, l, t)] : [];
236
+ if (_.length && S.length) {
237
+ let e = {
238
+ ...S[0],
239
+ settings: {
240
+ ...S[0].settings,
241
+ sources: [..._.flatMap((e) => e.settings?.sources ?? []), ...S[0].settings?.sources ?? []]
242
+ }
243
+ };
244
+ return {
245
+ ...i,
246
+ components: [...i.components, e]
247
+ };
248
+ }
249
+ return {
250
+ ...i,
251
+ components: [
252
+ ...i.components,
253
+ ..._,
254
+ ...S
255
+ ]
256
+ };
257
+ }, he = class extends z {
258
+ constructor() {
259
+ super([
260
+ se,
261
+ oe,
262
+ J,
263
+ k,
264
+ ce,
265
+ ee,
266
+ P,
267
+ me,
268
+ L,
269
+ A,
270
+ j,
271
+ I,
272
+ O,
273
+ Z
274
+ ]);
275
+ }
276
+ }, ge = h(), _e = _(({ vSpec: e, vTheme: t, data: n, elementSize: i, vizProperties: a }) => {
277
+ let o = v(), [s] = (0, ae.useState)(() => new he()), c = g(), l = q();
278
+ if (!e || !i) return null;
279
+ let d = t || u, f = s.compile(e, d, n, i, a, r.Combo, o, c, l);
280
+ return f ? /* @__PURE__ */ (0, ge.jsx)(H, {
281
+ config: a,
282
+ definition: f,
283
+ size: i,
284
+ vSpec: e
285
+ }) : null;
286
+ });
287
+ export { _e as ComboChart };