@astrato-io/visualizations 0.6.5 → 0.7.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 (174) hide show
  1. package/README.md +32 -2
  2. package/THIRD_PARTY_NOTICES.md +2 -229
  3. package/VISUALIZATION_DEFINITIONS.md +68 -114
  4. package/chunks/Button-BrGKp9Nm.js +110 -0
  5. package/chunks/DefaultPropsProvider-BsfB7QTn.js +257 -0
  6. package/chunks/FieldTypeIcon-Drs6hSJF.js +22 -0
  7. package/chunks/{LinearProgress-B1FeWaen.js → LinearProgress-VtfFx2vJ.js} +55 -55
  8. package/chunks/MenuOption-ByRqhRdX.js +3934 -0
  9. package/chunks/Title-CO5dP1ma.js +1691 -0
  10. package/chunks/ToggleButton-KOBAimC1.js +112 -0
  11. package/chunks/{app-filter-bar.compiler-BGJ7HAbr.js → app-filter-bar.compiler-TwVTeoj5.js} +10 -10
  12. package/chunks/{bar.compiler-CT0ZbQKc.js → bar.compiler-DuQg8EUb.js} +84 -84
  13. package/chunks/builder-DEDvNq1k.js +201 -0
  14. package/chunks/{color-settings-ZIvgNTq1.js → color-rules-CN7TcGrC.js} +2 -6
  15. package/chunks/color-settings-3VRlf_Vw.js +6 -0
  16. package/chunks/colorManipulator-D8Pjy1pf.js +45 -0
  17. package/chunks/coloring-CncX_JRX.js +278 -0
  18. package/chunks/{definitions-D3OVqmXl.js → definitions-BPJQTx16.js} +490 -382
  19. package/chunks/{escobar-eDjtGpkC.js → escobar-DRhRMYRE.js} +6067 -4742
  20. package/chunks/event-bus-CrLB-Y8z.js +3 -0
  21. package/chunks/extend-preset-CUFNpmPe.js +4398 -0
  22. package/chunks/{filter.compiler-DBsyRBJt.js → filter.compiler-w27dlv0C.js} +12 -12
  23. package/chunks/{filtering-tqjAyJH5.js → filtering-cc7WqWpg.js} +391 -310
  24. package/chunks/{handlers-VTBfIZYZ.js → handlers-TOT-7INo.js} +3241 -3442
  25. package/chunks/icon-picker-styles-CoJmwTRi.js +2246 -0
  26. package/chunks/isEqual-B8loyPsC.js +12 -0
  27. package/chunks/label-format-type-weq1XfcX.js +8 -0
  28. package/chunks/{line.compiler-CzdM5Ld0.js → line.compiler-Ct1WhN2p.js} +27 -27
  29. package/chunks/logger-DpQtYQnX.js +1163 -0
  30. package/chunks/lookup-BWllin0q.js +36 -0
  31. package/chunks/{metadata-BGElBy5Z.js → metadata-WABZrt7Y.js} +1 -1
  32. package/chunks/{number.compiler-G-R7y16P.js → number.compiler-D8TPly-4.js} +13 -13
  33. package/chunks/{operations-CTNUX6Sy.js → operations-Dh4v1Ovt.js} +9314 -9283
  34. package/chunks/{range-CiwTbMig.js → range-Bi-7zT0k.js} +2 -2
  35. package/chunks/registry-KervaxqJ.js +31 -0
  36. package/chunks/render-wrappers-OEmtaM8g.js +2 -0
  37. package/chunks/{registry-CsQQzukD.js → requirements-PAoRaJyb.js} +304 -336
  38. package/chunks/responsive.styles-DSiOGD7u.js +82 -0
  39. package/chunks/{shared-CBvcC5YV.js → shared-Bn4N5QcZ.js} +424 -424
  40. package/chunks/src-77e3mC7i.js +391 -0
  41. package/chunks/standalone-B55oyW6c.js +689 -0
  42. package/chunks/{standalone-C3gg736V.js → standalone-BDhPQtzQ.js} +375 -341
  43. package/chunks/{standalone-BMIbT1b2.js → standalone-BGkmozIb.js} +992 -837
  44. package/chunks/standalone-BMTCb10X.js +179 -0
  45. package/chunks/standalone-BXKRE_Se.js +468 -0
  46. package/chunks/standalone-Bes8srx1.js +354 -0
  47. package/chunks/standalone-BjZp0QMe.js +2 -0
  48. package/chunks/{standalone-JuLF-OoH.js → standalone-BlMIwpEe.js} +634 -519
  49. package/chunks/{standalone-C_rYnZ0N.js → standalone-C8ZAEutO.js} +43 -42
  50. package/chunks/standalone-C8qAelL4.js +2 -0
  51. package/chunks/standalone-CJvIXsQE.js +743 -0
  52. package/chunks/standalone-CLmGb7nn2.js +355 -0
  53. package/chunks/standalone-CM5XcAN5.js +52327 -0
  54. package/chunks/standalone-CXNP6-xD.js +420 -0
  55. package/chunks/{standalone-vzBY6q0I2.js → standalone-D5Q5ngsD.js} +57 -55
  56. package/chunks/standalone-DLlyRIE6.js +287 -0
  57. package/chunks/standalone-DMcI1afI.js +396 -0
  58. package/chunks/{standalone-DC-aUgXC.js → standalone-DN4S1MjT.js} +1111 -1092
  59. package/chunks/standalone-DT0wKji7.js +6 -0
  60. package/chunks/{standalone-0M4HlmDW2.js → standalone-DVTJwsTY.js} +1109 -1035
  61. package/chunks/standalone-DW6NT205.js +518 -0
  62. package/chunks/standalone-DYQIQH4c.js +2095 -0
  63. package/chunks/standalone-D__XCp-h.js +1003 -0
  64. package/chunks/standalone-XTgSsTAa.js +354 -0
  65. package/chunks/{standalone-v1oxfU20.js → standalone-XuGksArp.js} +20 -20
  66. package/chunks/{standalone-BtSHCp2U2.js → standalone-we5D5MIn.js} +173 -168
  67. package/chunks/{table.compiler-tb914oj3.js → table.compiler-DMeeHxb6.js} +29 -29
  68. package/chunks/useFieldName-Cjn9KCVp.js +7 -0
  69. package/chunks/useSlotProps-DLbQp4lc.js +166 -0
  70. package/chunks/{utils-Bg7K-t6K.js → utils-vdmi_2PK.js} +6271 -7804
  71. package/chunks/{view-Bn83C8d9.js → view-BuwQugKb.js} +2717 -3504
  72. package/chunks/{isEqual-BDxAhUo8.js → visualization-filters-Cc4KU-l-.js} +1887 -1946
  73. package/chunks/web-components-DqClFkgO.js +1185 -0
  74. package/chunks/with-html-element-D0uY2zjI.js +7328 -0
  75. package/definitions.js +2 -2
  76. package/docs/operations/astrato-app-filter-bar.md +1 -1
  77. package/docs/operations/bar.md +31 -14
  78. package/docs/operations/combo.md +1 -1
  79. package/docs/operations/date-picker.md +3 -3
  80. package/docs/operations/distribution-gauge.md +13 -13
  81. package/docs/operations/dot.md +13 -13
  82. package/docs/operations/filter.md +1 -1
  83. package/docs/operations/gauge.md +13 -13
  84. package/docs/operations/heatMap.md +13 -13
  85. package/docs/operations/histogram.md +1 -1
  86. package/docs/operations/iframe.md +1 -1
  87. package/docs/operations/image.md +1 -1
  88. package/docs/operations/index.md +3 -3
  89. package/docs/operations/line.md +7 -7
  90. package/docs/operations/number.md +1 -1
  91. package/docs/operations/pie.md +13 -13
  92. package/docs/operations/radar.md +7 -7
  93. package/docs/operations/sankey.md +13 -13
  94. package/docs/operations/scatter.md +13 -13
  95. package/docs/operations/shape.md +1 -1
  96. package/docs/operations/simpleTextObject.md +1 -1
  97. package/docs/operations/slider.md +1 -1
  98. package/docs/operations/table.md +18 -1
  99. package/docs/operations/tree.md +51 -37
  100. package/docs/operations/treemap.md +63 -49
  101. package/docs/operations/waterfall.md +1 -1
  102. package/docs/operations/word-cloud.md +13 -13
  103. package/getters.js +7 -7
  104. package/index.js +3 -1183
  105. package/metadata.js +18 -18
  106. package/operations.js +13 -13
  107. package/package.json +106 -55
  108. package/render.js +10 -0
  109. package/src/charts/bar.d.ts +1 -0
  110. package/src/charts/combo.d.ts +1 -0
  111. package/src/charts/dot.d.ts +1 -0
  112. package/src/charts/gauge-distribution.d.ts +1 -0
  113. package/src/charts/gauge.d.ts +1 -0
  114. package/src/charts/heat-map.d.ts +1 -0
  115. package/src/charts/histogram.d.ts +1 -0
  116. package/src/charts/line.d.ts +1 -0
  117. package/src/charts/pie.d.ts +1 -0
  118. package/src/charts/radar.d.ts +1 -0
  119. package/src/charts/sankey.d.ts +1 -0
  120. package/src/charts/scatter.d.ts +1 -0
  121. package/src/charts/table.d.ts +1 -0
  122. package/src/charts/tree.d.ts +1 -0
  123. package/src/charts/treemap.d.ts +1 -0
  124. package/src/charts/waterfall.d.ts +1 -0
  125. package/src/charts/word-cloud.d.ts +1 -0
  126. package/src/definitions/index.d.ts +1 -1
  127. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +53 -30
  128. package/src/definitions/model/definitions/index.d.ts +1 -1
  129. package/src/definitions/model/definitions/schema-registry.d.ts +2 -2
  130. package/src/definitions/model/definitions/schemas/object.schema.d.ts +2 -2
  131. package/src/definitions/model/definitions/types/compilation.types.d.ts +10 -0
  132. package/src/definitions/model/definitions/types/index.d.ts +1 -1
  133. package/src/getters/index.d.ts +3 -3
  134. package/src/index.d.ts +1 -1
  135. package/src/objects/app-filter-bar.d.ts +1 -0
  136. package/src/objects/date-picker.d.ts +1 -0
  137. package/src/objects/filter.d.ts +1 -0
  138. package/src/objects/iframe.d.ts +1 -0
  139. package/src/objects/image.d.ts +1 -0
  140. package/src/objects/number.d.ts +1 -0
  141. package/src/objects/shape.d.ts +1 -0
  142. package/src/objects/slider.d.ts +1 -0
  143. package/src/objects/text.d.ts +1 -0
  144. package/src/operations/index.d.ts +3 -3
  145. package/src/registry/create-visualization-registry.d.ts +5 -0
  146. package/src/render/index.d.ts +34 -0
  147. package/src/runtime/index.d.ts +2 -2
  148. package/src/types.d.ts +9 -4
  149. package/src/web-components/index.d.ts +3 -3
  150. package/chunks/ClickAwayListener-BbeNMAvj.js +0 -52
  151. package/chunks/builder-B6dWSIdD.js +0 -12289
  152. package/chunks/coloring-B1XAfg6b.js +0 -664
  153. package/chunks/events-WZut5Ow6.js +0 -4
  154. package/chunks/grouping-type-On4s9Thj.js +0 -3
  155. package/chunks/requirements-DYjZCFyf.js +0 -6
  156. package/chunks/standalone-0ashe9w1.js +0 -411
  157. package/chunks/standalone-B7jax8wa.js +0 -339
  158. package/chunks/standalone-BK0VYU-l.js +0 -463
  159. package/chunks/standalone-BZV5vOwA.js +0 -6
  160. package/chunks/standalone-BhDrWj4p.js +0 -1980
  161. package/chunks/standalone-BvaKdky9.js +0 -344
  162. package/chunks/standalone-BwtM31-f.js +0 -2
  163. package/chunks/standalone-CC1VUjO32.js +0 -299
  164. package/chunks/standalone-CoLrAxRV.js +0 -13198
  165. package/chunks/standalone-DCtRoTWg.js +0 -675
  166. package/chunks/standalone-DUDFTBqL.js +0 -833
  167. package/chunks/standalone-DhZkX9Td.js +0 -2
  168. package/chunks/standalone-DtLElfuM.js +0 -512
  169. package/chunks/standalone-G9Q4Uczu.js +0 -726
  170. package/chunks/standalone-_DeX21JJ.js +0 -383
  171. package/chunks/standalone-gFhKZh8m.js +0 -179
  172. package/chunks/standalone-tDNy-SFH.js +0 -281
  173. package/chunks/ui-DQWtv2iM.js +0 -63551
  174. package/chunks/useFieldName-BvdcoJRl.js +0 -7
@@ -1,8 +1,9 @@
1
1
  import { a as e, o as t, t as n } from "./rolldown-runtime-DleVn1XH.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";
2
+ import { Ds as r, Us as i, fa as a, ha as o, hn as s, ma as c, pa as l, ws as u, zi as d, zr as f } from "./visualization-filters-Cc4KU-l-.js";
3
+ import { Ei as p, N as m, Xt as h, d as g, o as _, ri as v, wn as y } from "./utils-vdmi_2PK.js";
4
+ import "./logger-DpQtYQnX.js";
5
+ import { Et as b, F as x, I as S, Yt as C, et as w, i as T, nt as E, st as D, tt as O, un as k, vn as A } from "./escobar-DRhRMYRE.js";
6
+ import { t as j } from "./coloring-CncX_JRX.js";
6
7
  import { n as M, t as N } from "./src-BOS6SqkZ.js";
7
8
  var P = /* @__PURE__ */ n(((e, t) => {
8
9
  (function(e, t, n) {
@@ -284,24 +285,24 @@ var P = /* @__PURE__ */ n(((e, t) => {
284
285
  })), z = /* @__PURE__ */ n(((e, t) => {
285
286
  var n = P(), r = ee(), i = te(), a = F(), o = I(), s = ne(), c = R();
286
287
  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(_()), B = .7, V = 12 * B, H = /* @__PURE__ */ function(e) {
288
+ })), re = /* @__PURE__ */ t(p()), B = .7, V = 12 * B, H = /* @__PURE__ */ function(e) {
288
289
  return e.RenderDone = "render-done", e;
289
290
  }({}), U = /* @__PURE__ */ function(e) {
290
291
  return e.Minimum = "Minimum", e;
291
292
  }({}), W = /* @__PURE__ */ function(e) {
292
293
  return e.collectionKey = "coll", e.measureValue = "size", e;
293
294
  }({}), G = (e, t, n) => {
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
- if (!r[0] || !i[0]) return n;
296
- let o = f(r[0].dataItem), c = f(i[0].dataItem), l = [{
295
+ let r = e.dimensions.filter((e) => f(e)), a = e.measures.filter((e) => f(e)), o = S((e.supportingMeasures ?? []).filter((e) => f(e)));
296
+ if (!r[0] || !a[0]) return n;
297
+ let s = i(r[0].dataItem), c = i(a[0].dataItem), l = [{
297
298
  key: "coll",
298
299
  data: {
299
300
  extract: [{
300
- field: o,
301
+ field: s,
301
302
  props: {
302
303
  size: { field: c },
303
304
  [c]: { field: c },
304
- ...a
305
+ ...o
305
306
  }
306
307
  }],
307
308
  filter: (e) => e.size.value != null && !isNaN(e.size.value)
@@ -314,18 +315,18 @@ var P = /* @__PURE__ */ n(((e, t) => {
314
315
  }, K = /* @__PURE__ */ function(e) {
315
316
  return e.size = "size", e.gradient = "gradient", e;
316
317
  }({}), q = (e, t, n) => {
317
- let r = e.dimensions.filter((e) => s(e)), i = e.measures.filter((e) => s(e));
318
- if (!r[0] || !i[0]) return n;
319
- let a = { size: { data: { field: f(i[0].dataItem) } } };
320
- return a = S(e, t, a), {
318
+ let r = e.dimensions.filter((e) => f(e)), a = e.measures.filter((e) => f(e));
319
+ if (!r[0] || !a[0]) return n;
320
+ let o = { size: { data: { field: i(a[0].dataItem) } } };
321
+ return o = b(e, t, o), {
321
322
  ...n,
322
- scales: a
323
+ scales: o
323
324
  };
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;
325
+ }, J = (e, t, n, r, o, c, l, u) => e.filter(f).map((e, r) => {
326
+ let o = Object.keys(t.data).find((n) => t.data[n]?.source?.field === i(e.dataItem)), c = (t.data[String(o)] || t.data[`measure${r}`])?.value, l = s(e) || e.label || e.dataItem.name || "", d = u && !a(e.formatter) ? D(e.formatter) : e.formatter;
326
327
  return {
327
- label: c,
328
- value: l ? n.formatter(l)(s, void 0, t.data) : s
328
+ label: l,
329
+ value: d ? n.formatter(d)(c, void 0, t.data) : c
329
330
  };
330
331
  }), Y = (e, t, n, r, i) => {
331
332
  let a = {
@@ -335,16 +336,16 @@ var P = /* @__PURE__ */ n(((e, t) => {
335
336
  type: "bounds"
336
337
  }
337
338
  };
338
- return a.extract = T(e, t, J, x), w(e, t, n, a, "tooltip", i);
339
- }, ie = (e, t, n, r, i, a) => {
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);
339
+ return a.extract = O(e, t, J, E), w(e, t, n, a, "tooltip", i);
340
+ }, ie = (e, t, n, a, o, s) => {
341
+ let c = e.measures.filter((e) => f(e)), l = new j(e, t, o?.[0]?.itemsNotAffectedByFiltering), u = i(c[0].dataItem), d = C([""], s);
341
342
  d?.trigger.forEach((e) => e.propagation = "stop");
342
343
  let p = {
343
344
  key: "word-cloud",
344
- type: E.WordCloud,
345
+ type: A.WordCloud,
345
346
  data: { collection: W.collectionKey },
346
347
  on: { [H.RenderDone]() {
347
- a?.onRenderDone?.();
348
+ s?.onRenderDone?.();
348
349
  } },
349
350
  layout: { minimumLayoutMode: U.Minimum },
350
351
  settings: {
@@ -359,10 +360,10 @@ var P = /* @__PURE__ */ n(((e, t) => {
359
360
  scale: K.size,
360
361
  ref: W.measureValue
361
362
  },
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]
363
+ fill: l.getColorDefinition({
364
+ ref: e.coloring?.type === r.Gradient ? W.measureValue : l.MAIN_FIELD,
365
+ dataItemId: e.coloring?.type === r.Single ? u : void 0,
366
+ overwriteSources: [l.MAIN_FIELD]
366
367
  })
367
368
  }
368
369
  },
@@ -372,7 +373,7 @@ var P = /* @__PURE__ */ n(((e, t) => {
372
373
  ...n,
373
374
  components: [...n.components, p]
374
375
  };
375
- }, ae = class extends O {
376
+ }, ae = class extends x {
376
377
  onRenderDone;
377
378
  onChartUpdated;
378
379
  constructor(e) {
@@ -387,7 +388,7 @@ var P = /* @__PURE__ */ n(((e, t) => {
387
388
  };
388
389
  }
389
390
  preCompile(e) {
390
- let t = e.dimensions.filter((e) => s(e)), n = e.measures.filter((e) => s(e)), r = t[0], i = n[0];
391
+ let t = e.dimensions.filter((e) => f(e)), n = e.measures.filter((e) => f(e)), r = t[0], i = n[0];
391
392
  if (!r || !i) throw Error("Word cloud w/o a dimension or measure is not supported.");
392
393
  }
393
394
  postCompile(e) {
@@ -661,7 +662,7 @@ var Q = {
661
662
  fontFamily: "Arial",
662
663
  fontScaling: l.linear,
663
664
  fontStyle: c.normal,
664
- fontWeight: d.normal,
665
+ fontWeight: o.normal,
665
666
  seed: 1,
666
667
  maxNumChars: 32,
667
668
  word: {
@@ -717,20 +718,20 @@ var Q = {
717
718
  }
718
719
  };
719
720
  function ge(e) {
720
- e.component(E.WordCloud, he);
721
+ e.component(A.WordCloud, he);
721
722
  }
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 = {
723
+ var $ = v(), _e = () => {}, ve = h(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
724
+ let a = m(), o = g(), [s] = (0, re.useState)(() => new ae(o)), { activeKey: c } = _(), l = {
724
725
  ...i,
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, {
726
+ valuePickerMode: !!c
727
+ }, f = t || d, p = s.compile(e, f, n, r, {
728
+ ...l,
729
+ onRenderDone: o
730
+ }, u.WordCloud, a);
731
+ return p ? /* @__PURE__ */ (0, $.jsx)(y.Provider, {
731
732
  value: _e,
732
- children: /* @__PURE__ */ (0, $.jsx)(D, {
733
- config: d,
733
+ children: /* @__PURE__ */ (0, $.jsx)(T, {
734
+ config: l,
734
735
  definition: p,
735
736
  size: r,
736
737
  vSpec: e,
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./view-BuwQugKb.js";
2
+ export { e as DatePicker };