@astrato-io/visualizations 0.8.0 → 0.9.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 (125) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +307 -378
  3. package/chunks/{Button-BrGKp9Nm.js → Button-5CxPEACP.js} +11 -11
  4. package/chunks/CircularProgress-DFS-LQb7.js +765 -0
  5. package/chunks/FieldTypeIcon-pSVQFemC.js +22 -0
  6. package/chunks/LinearProgress-CjIQfkNA.js +327 -0
  7. package/chunks/{MenuOption-ByRqhRdX.js → MenuOption-Cb7B7x6z.js} +1384 -1002
  8. package/chunks/Title-CtFw1bVg.js +1804 -0
  9. package/chunks/ToggleButton-Br9HCPCv.js +150 -0
  10. package/chunks/{app-filter-bar.compiler-TwVTeoj5.js → app-filter-bar.compiler-B9775gLJ.js} +3 -3
  11. package/chunks/{bar.compiler-DuQg8EUb.js → bar.compiler-B7wlH_Ro.js} +4 -4
  12. package/chunks/{builder-DEDvNq1k.js → builder-Dxo7D7c6.js} +118 -55
  13. package/chunks/{coloring-CncX_JRX.js → coloring-B-Wa8D5P.js} +3 -3
  14. package/chunks/contains-BK-sRXcB.js +21 -0
  15. package/chunks/{definitions-BPJQTx16.js → definitions-DNpzD9tY.js} +26 -26
  16. package/chunks/{escobar-DRhRMYRE.js → escobar-C4Nm3eJ7.js} +4436 -4802
  17. package/chunks/{extend-preset-CUFNpmPe.js → extend-preset-BVKFtoe-.js} +46 -46
  18. package/chunks/{filter.compiler-w27dlv0C.js → filter.compiler-BlS3zoy_.js} +7 -7
  19. package/chunks/{filtering-cc7WqWpg.js → filtering-CGuLpg7u.js} +494 -270
  20. package/chunks/{handlers-TOT-7INo.js → handlers-CMbyj5y1.js} +1513 -1454
  21. package/chunks/{icon-picker-styles-CoJmwTRi.js → icon-picker-styles-DYQgVEKG.js} +8 -8
  22. package/chunks/{isEqual-B8loyPsC.js → isEqual-DBg_b35N.js} +1 -1
  23. package/chunks/isFocusVisible-B1_z03UT.js +144 -0
  24. package/chunks/{line.compiler-Ct1WhN2p.js → line.compiler-Bo9i9qag.js} +7 -7
  25. package/chunks/{logger-DpQtYQnX.js → logger-3lng-wOw.js} +7 -3
  26. package/chunks/{metadata-WABZrt7Y.js → metadata-Fmx1swpK.js} +1 -1
  27. package/chunks/{number.compiler-D8TPly-4.js → number.compiler-CdLd5aGW.js} +7 -7
  28. package/chunks/{operations-Dh4v1Ovt.js → operations-HSqnCRvv.js} +9156 -9112
  29. package/chunks/{range-Bi-7zT0k.js → range-CzO4isKK.js} +2 -2
  30. package/chunks/react-dom-BwZT0N3F.js +368 -0
  31. package/chunks/{render-wrappers-OEmtaM8g.js → render-wrappers-CAuvgMxi.js} +1 -1
  32. package/chunks/{requirements-Dvd8jqYF.js → requirements-CYpVh65U.js} +52 -52
  33. package/chunks/responsive.styles-FItb913l.js +93 -0
  34. package/chunks/{shared-Bn4N5QcZ.js → shared-DFoJxjVN.js} +401 -401
  35. package/chunks/{standalone-D__XCp-h.js → standalone-530a5lvf.js} +306 -306
  36. package/chunks/{standalone-CXNP6-xD.js → standalone-5DnapeHH.js} +112 -112
  37. package/chunks/{standalone-XTgSsTAa.js → standalone-B4jrf4KE.js} +70 -70
  38. package/chunks/{standalone-Bes8srx1.js → standalone-B6s_xG2u.js} +14 -14
  39. package/chunks/{standalone-vBnBS2YC.js → standalone-BDrQMxLi.js} +98 -98
  40. package/chunks/standalone-BMoJXGYe.js +2 -0
  41. package/chunks/{standalone-CLmGb7nn2.js → standalone-BfvGggeM2.js} +76 -76
  42. package/chunks/{standalone-D5Q5ngsD.js → standalone-BvWdpUL3.js} +26 -26
  43. package/chunks/{standalone-we5D5MIn.js → standalone-C6XDHYAM.js} +31 -31
  44. package/chunks/standalone-CMJJIi9v.js +2 -0
  45. package/chunks/{standalone-C8ZAEutO.js → standalone-CNkHsynO.js} +28 -28
  46. package/chunks/{standalone-BMTCb10X.js → standalone-CPUiiWNP.js} +5 -5
  47. package/chunks/{standalone-XuGksArp.js → standalone-CXniic5x.js} +9 -9
  48. package/chunks/standalone-C_Jd4gkj.js +6 -0
  49. package/chunks/{standalone-DW6NT205.js → standalone-CiaaibTa.js} +142 -142
  50. package/chunks/standalone-CoQxJ6ov.js +3638 -0
  51. package/chunks/{standalone-CM5XcAN5.js → standalone-Cu73fzSr.js} +7660 -7534
  52. package/chunks/standalone-DBeXQrwH.js +468 -0
  53. package/chunks/{standalone-DMcI1afI.js → standalone-DMCwtebn.js} +81 -81
  54. package/chunks/{standalone-BlMIwpEe.js → standalone-DWPfdP0A.js} +800 -668
  55. package/chunks/{standalone-DLlyRIE6.js → standalone-DpSRmAWx.js} +59 -59
  56. package/chunks/{standalone-BGkmozIb.js → standalone-DuwTOBXH.js} +256 -256
  57. package/chunks/{standalone-BDhPQtzQ.js → standalone-LFVgLhia.js} +234 -234
  58. package/chunks/{standalone-B55oyW6c.js → standalone-kzAhwH19.js} +149 -149
  59. package/chunks/{standalone-DN4S1MjT.js → standalone-mb7LwEiq.js} +885 -885
  60. package/chunks/{standalone-CJvIXsQE.js → standalone-r4ObFvys.js} +155 -155
  61. package/chunks/{table.compiler-DMeeHxb6.js → table.compiler-C1qjqXaT.js} +7 -7
  62. package/chunks/{typeof-CJDtcySz.js → typeof-DCq3QgvY.js} +6 -1
  63. package/chunks/useFieldName-mWrD_uk_.js +7 -0
  64. package/chunks/{utils-vdmi_2PK.js → utils-DYYD4Zzf.js} +7593 -12707
  65. package/chunks/{view-BuwQugKb.js → view-7fH6mGmY.js} +2034 -2070
  66. package/chunks/{visualization-filters-Cc4KU-l-.js → visualization-filters-mVnsnvLP.js} +3581 -3555
  67. package/chunks/with-html-element-B0Clt4jY.js +15901 -0
  68. package/definitions.js +2 -2
  69. package/docs/operations/astrato-app-filter-bar.md +1 -1
  70. package/docs/operations/bar.md +1 -1
  71. package/docs/operations/combo.md +1 -1
  72. package/docs/operations/date-picker.md +1 -1
  73. package/docs/operations/distribution-gauge.md +1 -1
  74. package/docs/operations/dot.md +1 -1
  75. package/docs/operations/filter.md +1 -1
  76. package/docs/operations/gauge.md +1 -1
  77. package/docs/operations/heatMap.md +1 -1
  78. package/docs/operations/histogram.md +1 -1
  79. package/docs/operations/iframe.md +1 -1
  80. package/docs/operations/image.md +1 -1
  81. package/docs/operations/index.md +2 -2
  82. package/docs/operations/line.md +1 -1
  83. package/docs/operations/number.md +1 -1
  84. package/docs/operations/pie.md +1 -1
  85. package/docs/operations/radar.md +1 -1
  86. package/docs/operations/sankey.md +1 -1
  87. package/docs/operations/scatter.md +1 -1
  88. package/docs/operations/shape.md +1 -1
  89. package/docs/operations/simpleTextObject.md +1 -1
  90. package/docs/operations/slider.md +1 -1
  91. package/docs/operations/table.md +66 -1
  92. package/docs/operations/tree.md +1 -1
  93. package/docs/operations/treemap.md +1 -1
  94. package/docs/operations/waterfall.md +1 -1
  95. package/docs/operations/word-cloud.md +1 -1
  96. package/getters.js +2 -2
  97. package/index.js +74 -68
  98. package/metadata.js +2 -2
  99. package/operations.js +5 -5
  100. package/package.json +67 -66
  101. package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +348 -348
  102. package/src/definitions/model/definitions/schema-registry.d.ts +101 -101
  103. package/src/definitions/model/definitions/schemas/bar.schema.d.ts +8 -8
  104. package/src/definitions/model/definitions/schemas/common.schema.d.ts +29 -29
  105. package/src/definitions/model/definitions/schemas/line.schema.d.ts +10 -10
  106. package/src/definitions/model/definitions/schemas/number.schema.d.ts +4 -4
  107. package/src/definitions/model/definitions/schemas/object.schema.d.ts +38 -38
  108. package/src/definitions/model/definitions/schemas/table.schema.d.ts +61 -61
  109. package/src/visualization-catalog.d.ts +26 -26
  110. package/chunks/DefaultPropsProvider-BsfB7QTn.js +0 -257
  111. package/chunks/FieldTypeIcon-Drs6hSJF.js +0 -22
  112. package/chunks/LinearProgress-VtfFx2vJ.js +0 -253
  113. package/chunks/Title-CO5dP1ma.js +0 -1691
  114. package/chunks/ToggleButton-KOBAimC1.js +0 -112
  115. package/chunks/colorManipulator-D8Pjy1pf.js +0 -45
  116. package/chunks/responsive.styles-DSiOGD7u.js +0 -82
  117. package/chunks/standalone-BXKRE_Se.js +0 -468
  118. package/chunks/standalone-BjZp0QMe.js +0 -2
  119. package/chunks/standalone-C8qAelL4.js +0 -2
  120. package/chunks/standalone-DT0wKji7.js +0 -6
  121. package/chunks/standalone-DYQIQH4c.js +0 -2095
  122. package/chunks/useFieldName-Cjn9KCVp.js +0 -7
  123. package/chunks/useSlotProps-DLbQp4lc.js +0 -166
  124. package/chunks/with-html-element-D0uY2zjI.js +0 -7328
  125. /package/chunks/{src-BOS6SqkZ.js → src-BOS6SqkZ2.js} +0 -0
package/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { o as e } from "./chunks/rolldown-runtime-DleVn1XH.js";
2
- import { Ts as t, cr as n, dc as r, lc as i, mc as a, sc as o, zi as s } from "./chunks/visualization-filters-Cc4KU-l-.js";
2
+ import { Ts as t, dc as n, lc as r, mc as i, sc as a, zi as o, zn as s } from "./chunks/visualization-filters-mVnsnvLP.js";
3
3
  import { n as c } from "./chunks/lookup-BWllin0q.js";
4
- import { i as l, n as u, t as d } from "./chunks/extend-preset-CUFNpmPe.js";
5
- import { a as f, i as p, n as m, o as h, r as g, t as _ } from "./chunks/requirements-Dvd8jqYF.js";
6
- import { l as ee, t as v, u as te } from "./chunks/logger-DpQtYQnX.js";
4
+ import { i as l, n as u, t as d } from "./chunks/extend-preset-BVKFtoe-.js";
5
+ import { a as f, i as p, n as m, o as h, r as g, t as _ } from "./chunks/requirements-CYpVh65U.js";
6
+ import { l as ee, t as v, u as te } from "./chunks/logger-3lng-wOw.js";
7
7
  import { BehaviorSubject as y, Observable as b, Subject as x, filter as ne, of as re } from "rxjs";
8
8
  var S = (e, t, n) => {
9
9
  let r = e.createElement(t);
@@ -158,32 +158,32 @@ var S = (e, t, n) => {
158
158
  return r.addEventListener("loading", f), r.addEventListener("loadingdone", p), d(!0), f(), () => {
159
159
  a = !1, o = void 0, clearTimeout(s), c.clear(), l.clear(), r.removeEventListener("loading", f), r.removeEventListener("loadingdone", p);
160
160
  };
161
- }, pe = se(s.fonts.general.fontFamily ?? ""), me = (e) => ({
162
- ...s,
161
+ }, pe = se(o.fonts.general.fontFamily ?? ""), me = (e) => ({
162
+ ...o,
163
163
  fonts: {
164
- ...s.fonts,
164
+ ...o.fonts,
165
165
  general: {
166
- ...s.fonts.general,
166
+ ...o.fonts.general,
167
167
  fontFamily: e
168
168
  },
169
169
  title: {
170
- ...s.fonts.title,
170
+ ...o.fonts.title,
171
171
  fontFamily: e
172
172
  }
173
173
  },
174
174
  navigation: {
175
- ...s.navigation,
175
+ ...o.navigation,
176
176
  activeItem: {
177
- ...s.navigation.activeItem,
177
+ ...o.navigation.activeItem,
178
178
  font: {
179
- ...s.navigation.activeItem.font,
179
+ ...o.navigation.activeItem.font,
180
180
  fontFamily: e
181
181
  }
182
182
  },
183
183
  item: {
184
- ...s.navigation.item,
184
+ ...o.navigation.item,
185
185
  font: {
186
- ...s.navigation.item.font,
186
+ ...o.navigation.item.font,
187
187
  fontFamily: e
188
188
  }
189
189
  }
@@ -271,58 +271,58 @@ var S = (e, t, n) => {
271
271
  } });
272
272
  return n.set(e, i), i;
273
273
  }, Me = (e) => e.hostServices ?? e.services, Ne = (e) => !!(e && typeof e == "object" && "then" in e && typeof e.then == "function"), Pe = (e) => z(e) ? {
274
- ...n,
274
+ ...s,
275
275
  ...e,
276
276
  calendar: {
277
- ...n.calendar,
277
+ ...s.calendar,
278
278
  ...z(e.calendar) ? e.calendar : {}
279
279
  },
280
280
  formats: {
281
- ...n.formats,
281
+ ...s.formats,
282
282
  ...z(e.formats) ? e.formats : {}
283
283
  },
284
284
  number: {
285
- ...n.number,
285
+ ...s.number,
286
286
  ...z(e.number) ? e.number : {}
287
287
  }
288
- } : n, Fe = (e) => z(e) && "response" in e ? e.response : e, W = 1e3, Ie = 1e5, Le = (e, t) => {
288
+ } : s, Fe = (e) => z(e) && "response" in e ? e.response : e, W = 1e3, Ie = 1e5, Le = (e, t) => {
289
289
  if (e !== void 0 && (!Number.isInteger(e) || e < 1)) throw RangeError(`limit must be a positive integer, received ${e}.`);
290
290
  return Math.min(e ?? t?.limit ?? W, Ie);
291
291
  }, Re = Symbol("exportQueryChanged"), ze = async (e, t) => {
292
292
  if (!e?.transformQuery) throw Error("Standalone visualization query execution requires engine.getData or engine.transformQuery with data.query.");
293
293
  return e.transformQuery(t);
294
- }, Be = (e) => {
294
+ }, G = (e) => {
295
295
  if (z(e) && typeof e.view == "string") return e.view;
296
- }, Ve = (e) => {
296
+ }, Be = (e) => {
297
297
  if (z(e)) {
298
298
  if (typeof e.fieldKey == "string") return e.fieldKey;
299
299
  if (typeof e.key == "string") return e.key;
300
300
  }
301
- }, He = (e) => z(e) && typeof e.name == "string" ? e.name : void 0, Ue = (e, t, n, r = /* @__PURE__ */ new WeakSet()) => {
301
+ }, Ve = (e) => z(e) && typeof e.name == "string" ? e.name : void 0, He = (e, t, n, r = /* @__PURE__ */ new WeakSet()) => {
302
302
  if (Array.isArray(e)) {
303
303
  for (let i of e) {
304
- let e = Ue(i, t, n, r);
304
+ let e = He(i, t, n, r);
305
305
  if (e) return e;
306
306
  }
307
307
  return;
308
308
  }
309
309
  if (z(e) && !r.has(e)) {
310
- if (r.add(e), He(e) === t && Be(e) === n) {
311
- let t = Ve(e);
310
+ if (r.add(e), Ve(e) === t && G(e) === n) {
311
+ let t = Be(e);
312
312
  if (t) return t;
313
313
  }
314
314
  for (let i of Object.values(e)) {
315
- let e = Ue(i, t, n, r);
315
+ let e = He(i, t, n, r);
316
316
  if (e) return e;
317
317
  }
318
318
  }
319
- }, G = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : z(e) ? Array.isArray(e.views) ? e.views.filter((e) => typeof e == "string") : typeof e.view == "string" ? [e.view] : [] : [], We = (e, t) => {
320
- let n = G(t);
319
+ }, K = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "string") : z(e) ? Array.isArray(e.views) ? e.views.filter((e) => typeof e == "string") : typeof e.view == "string" ? [e.view] : [] : [], Ue = (e, t) => {
320
+ let n = K(t);
321
321
  return n.length ? e.filter((e) => {
322
- let t = Be(e);
322
+ let t = G(e);
323
323
  return t ? n.includes(t) : !1;
324
324
  }) : e;
325
- }, K = ({ client: e, fontFamily: t = pe, hostBrush: n, instance: r, logger: i, onVSpecChange: a, onGroupedDimensionsChange: o }) => {
325
+ }, q = ({ client: e, fontFamily: t = pe, hostBrush: n, instance: r, logger: i, onVSpecChange: a, onGroupedDimensionsChange: o }) => {
326
326
  let s = r, c = r.groupId ?? "default", l = r.id, u = new x(), d = /* @__PURE__ */ new Map(), f = new x(), p = new x(), m = new x(), h = new y(null), g = new y({ vSpec: r.vSpec }), _ = new y(me(t)), v = new y({}), te = new x(), S = new x(), C = new y([]), w = Me(e), T = w?.engine, E = T?.fields, D = w?.data, O = w?.model, k = w?.selections, A = s.dataBinding?.fieldMetadata, j, M, N, ie, P, ae, F = !1, oe = /* @__PURE__ */ new Set(), se = () => {
327
327
  oe.forEach((e) => e());
328
328
  }, ce, le, I, ue, de = (e) => {
@@ -376,22 +376,22 @@ var S = (e, t, n) => {
376
376
  let W = () => {
377
377
  if (!k) throw Error("Standalone visualization selection service is not configured. Provide hostServices.selections.");
378
378
  return k;
379
- }, Ie = (e = "ALL") => k ? k.getActiveSelection ? _e(k.getActiveSelection(e, c)) : be(_e(k.getSelection(c)), e) : he(), G = (e = "ALL") => we(Ie(e)), K = new y(G()), q = new y(G()), J = new y(G()), Y = new y([]), Ge = (e, t, n) => {
379
+ }, Ie = (e = "ALL") => k ? k.getActiveSelection ? _e(k.getActiveSelection(e, c)) : be(_e(k.getSelection(c)), e) : he(), K = (e = "ALL") => we(Ie(e)), q = new y(K()), J = new y(K()), Y = new y(K()), We = new y([]), Ge = (e, t, n) => {
380
380
  if (e) return e(c).subscribe((e) => {
381
381
  t.next(we(_e(e))), n?.();
382
382
  });
383
- }, Ke = Ge(k?.onActiveSelectionChange, K), qe = Ge(k?.onActiveSelectionChangeApplied, q, () => {
383
+ }, Ke = Ge(k?.onActiveSelectionChange, q), qe = Ge(k?.onActiveSelectionChangeApplied, J, () => {
384
384
  s.type !== "filter" && B(ke);
385
- }), Je = Ge(k?.onActiveSelectionChangePending, J), Ye = [
385
+ }), Je = Ge(k?.onActiveSelectionChangePending, Y), Ye = [
386
386
  Ke,
387
387
  qe,
388
388
  Je,
389
389
  k?.singleSelectFields$?.subscribe((e) => {
390
- Y.next(Se(e));
390
+ We.next(Se(e));
391
391
  })
392
392
  ].filter((e) => !!e), X = (e = "all") => {
393
- let t = G("ALL");
394
- Ke || K.next(t), (e === "all" || e === "applied") && !qe && q.next(t), (e === "all" || e === "pending") && !Je && J.next(t);
393
+ let t = K("ALL");
394
+ Ke || q.next(t), (e === "all" || e === "applied") && !qe && J.next(t), (e === "all" || e === "pending") && !Je && Y.next(t);
395
395
  }, Xe = (e, t) => {
396
396
  let n = Ie("ALL");
397
397
  if (t === "ALL") return e;
@@ -424,17 +424,17 @@ var S = (e, t, n) => {
424
424
  get canLock() {
425
425
  return !!(k?.toggleFieldLocked || k?.setFieldLocked);
426
426
  },
427
- singleSelectFields$: Y.asObservable(),
427
+ singleSelectFields$: We.asObservable(),
428
428
  selectionChange: te,
429
429
  selectionCommitted$: S.asObservable(),
430
430
  get onActiveSelectionChange() {
431
- return W(), K.asObservable();
431
+ return W(), q.asObservable();
432
432
  },
433
433
  get onActiveSelectionChangeApplied() {
434
- return W(), q.asObservable();
434
+ return W(), J.asObservable();
435
435
  },
436
436
  get onActiveSelectionChangePending() {
437
- return W(), J.asObservable();
437
+ return W(), Y.asObservable();
438
438
  },
439
439
  get lockedFields() {
440
440
  return C.value;
@@ -442,8 +442,8 @@ var S = (e, t, n) => {
442
442
  get lockedFields$() {
443
443
  return C.asObservable();
444
444
  },
445
- getSingleSelectedFields: () => Y.value,
446
- getActiveSelection: (e) => G(ve(e)),
445
+ getSingleSelectedFields: () => We.value,
446
+ getActiveSelection: (e) => K(ve(e)),
447
447
  getAllSelectedFields: () => [],
448
448
  getNumberOfSelectedValuesForField: () => 0,
449
449
  getFewFirstSelectedValues: () => [],
@@ -495,7 +495,7 @@ var S = (e, t, n) => {
495
495
  }
496
496
  Ze({
497
497
  applied: [],
498
- pending: G("ALL").pending
498
+ pending: K("ALL").pending
499
499
  }), X("applied");
500
500
  },
501
501
  removeSelectionByField: (e) => {
@@ -558,39 +558,45 @@ var S = (e, t, n) => {
558
558
  };
559
559
  }, it = (e) => {
560
560
  let t = A?.fields ?? A?.validFields;
561
- return t ? We(t, e) : void 0;
561
+ return t ? Ue(t, e) : void 0;
562
562
  }, at = (e) => {
563
563
  let t = A?.validFields ?? A?.fields;
564
- return t ? We(t, e) : void 0;
564
+ return t ? Ue(t, e) : void 0;
565
565
  }, ot = (e) => {
566
566
  let t = A?.viewsFields ?? A?.fields ?? A?.validFields;
567
- return t ? We(t, e) : void 0;
567
+ return t ? Ue(t, e) : void 0;
568
568
  }, st = (e) => {
569
- if (!z(e) || Ve(e)) return e;
570
- let t = Be(e), n = He(e);
569
+ if (!z(e) || Be(e)) return e;
570
+ let t = G(e), n = Ve(e);
571
571
  if (!t || !n) return e;
572
- let r = Ue(A, n, t);
572
+ let r = He(A, n, t);
573
573
  return r ? { fieldKey: r } : e;
574
- }, ct = (e) => Array.isArray(e) ? e.map(st) : e, $ = (e, ...t) => {
574
+ }, ct = (e) => Array.isArray(e) ? e.map(st) : e, lt = (e, ...t) => {
575
575
  for (let e of t) {
576
576
  let t = e();
577
577
  if (Ne(t)) throw Error("Standalone visualization field service getters must return synchronously.");
578
578
  if (t !== void 0) return t;
579
579
  }
580
580
  return e;
581
- }, lt = {
581
+ }, $ = {
582
582
  getAssociatedViews: async (e) => {
583
583
  if (T?.getAssociatedViews) return T.getAssociatedViews(e, s.dataBinding);
584
+ let t = T?.areViewsConnected ? $.getFields() : [];
585
+ if (t.length > 0) {
586
+ let n = G(t.find((t) => Be(t) === e));
587
+ if (!n) throw Error(`Associative filtering could not find field "${e}".`);
588
+ return [...new Set(t.map(G).filter((e) => !!e))].filter((e) => $.areViewsConnected([n], [e]));
589
+ }
584
590
  if (!T?.getData && !D?.query) throw Error("Associative filtering requires engine.getAssociatedViews or query view metadata.");
585
- let t = await lt.getData({
591
+ let n = await $.getData({
586
592
  dimensions: [{ fieldKey: e }],
587
593
  measures: [],
588
594
  filters: [],
589
595
  limit: 1
590
596
  });
591
- if (!z(t) || !Array.isArray(t.viewStates)) throw Error("The engine did not return associative view metadata. Provide engine.getAssociatedViews.");
592
- let n = t.viewStates.filter(z), r = n.some((e) => typeof e.alfStatus == "string");
593
- return n.flatMap((e) => (r ? e.alfStatus === "nonVia" : z(e.compatibleTypeFlags) && e.compatibleTypeFlags.associativeListFilter === !0) && typeof e.view == "string" ? [e.view] : []);
597
+ if (!z(n) || !Array.isArray(n.viewStates)) throw Error("The engine did not return associative view metadata. Provide engine.getAssociatedViews.");
598
+ let r = n.viewStates.filter(z), i = r.some((e) => typeof e.alfStatus == "string");
599
+ return r.flatMap((e) => (i ? e.alfStatus === "nonVia" : z(e.compatibleTypeFlags) && e.compatibleTypeFlags.associativeListFilter === !0) && typeof e.view == "string" ? [e.view] : []);
594
600
  },
595
601
  get capabilities() {
596
602
  return {
@@ -616,15 +622,15 @@ var S = (e, t, n) => {
616
622
  } else throw Error("Standalone visualization data service is not configured. Provide engine.getData or data.query.");
617
623
  return Fe(n);
618
624
  },
619
- getDimensionsList: (e) => $([], () => E?.getDimensionsList?.(e), () => A?.dimensions),
625
+ getDimensionsList: (e) => lt([], () => E?.getDimensionsList?.(e), () => A?.dimensions),
620
626
  getGroupedDimensions: fe,
621
- getMeasuresList: (e) => $([], () => E?.getMeasuresList?.(e), () => A?.measures),
627
+ getMeasuresList: (e) => lt([], () => E?.getMeasuresList?.(e), () => A?.measures),
622
628
  getValidFields: (e) => {
623
629
  let t = ct(e);
624
- return $([], () => E?.getValidFields?.(t), () => at(t));
630
+ return lt([], () => E?.getValidFields?.(t), () => at(t));
625
631
  },
626
- getViewsFields: (e) => $([], () => E?.getViewsFields?.(e), () => ot(e)),
627
- getFields: (e) => $([], () => E?.getFields?.(e), () => it(e)),
632
+ getViewsFields: (e) => lt([], () => E?.getViewsFields?.(e), () => ot(e)),
633
+ getFields: (e) => lt([], () => E?.getFields?.(e), () => it(e)),
628
634
  areFieldsConnected: (...e) => {
629
635
  let t = T?.areFieldsConnected?.(...e.map(st));
630
636
  if (Ne(t)) throw Error("Standalone visualization field connectivity service must return synchronously.");
@@ -670,9 +676,9 @@ var S = (e, t, n) => {
670
676
  get exportDataQuery() {
671
677
  return P;
672
678
  },
673
- getEngine: async () => lt,
679
+ getEngine: async () => $,
674
680
  get engine() {
675
- return lt;
681
+ return $;
676
682
  },
677
683
  theme: { current: _ },
678
684
  model: ut,
@@ -783,7 +789,7 @@ var S = (e, t, n) => {
783
789
  let n = {
784
790
  ...t.query,
785
791
  limit: Le(e?.limit, t.config)
786
- }, r = await lt.getData(n);
792
+ }, r = await $.getData(n);
787
793
  return F ? null : {
788
794
  ...t,
789
795
  query: n,
@@ -816,10 +822,10 @@ var S = (e, t, n) => {
816
822
  F || _.next(me(t));
817
823
  },
818
824
  destroy: () => {
819
- F = !0, se(), ie?.(), u.complete(), f.complete(), p.complete(), m.complete(), h.complete(), g.complete(), _.complete(), v.complete(), te.complete(), S.complete(), Ye.forEach((e) => e.unsubscribe()), C.complete(), Y.complete(), K.complete(), q.complete(), J.complete();
825
+ F = !0, se(), ie?.(), u.complete(), f.complete(), p.complete(), m.complete(), h.complete(), g.complete(), _.complete(), v.complete(), te.complete(), S.complete(), Ye.forEach((e) => e.unsubscribe()), C.complete(), We.complete(), q.complete(), J.complete(), Y.complete();
820
826
  }
821
827
  };
822
- }, q = (e, t) => {
828
+ }, J = (e, t) => {
823
829
  let n = l(e.vSpec);
824
830
  return {
825
831
  instanceId: e.id,
@@ -828,7 +834,7 @@ var S = (e, t, n) => {
828
834
  requirements: t.requirements ?? _(e.type),
829
835
  ...n ? {} : { reason: `Visualization ${e.type} vSpec does not currently satisfy the required data items.` }
830
836
  };
831
- }, J = /* @__PURE__ */ e(v(), 1), Y = (e) => (o(e) && (e.columns = []), i(e) && (e.dimensions = []), r(e) && (e.measures = []), a(e) && (e.referencedData = {}), e), Ge = (e, t) => d(Y((0, J.default)({}, t.createDefaultVSpec(), u(void 0, e).vSpec)), t.type), Ke = (e, n) => {
837
+ }, Y = /* @__PURE__ */ e(v(), 1), We = (e) => (a(e) && (e.columns = []), r(e) && (e.dimensions = []), n(e) && (e.measures = []), i(e) && (e.referencedData = {}), e), Ge = (e, t) => d(We((0, Y.default)({}, t.createDefaultVSpec(), u(void 0, e).vSpec)), t.type), Ke = (e, n) => {
832
838
  if (e.vSpec) {
833
839
  if (e.type === "table") {
834
840
  let n = e.vSpec;
@@ -963,7 +969,7 @@ var S = (e, t, n) => {
963
969
  return t;
964
970
  }, T = (t) => {
965
971
  let n = C(t);
966
- return q(n, c(n.type, e.registry));
972
+ return J(n, c(n.type, e.registry));
967
973
  };
968
974
  return {
969
975
  client: e.client,
@@ -1046,7 +1052,7 @@ var S = (e, t, n) => {
1046
1052
  }
1047
1053
  if (!o.element) throw Error(`Standalone visualization module is not renderable: ${p.type}`);
1048
1054
  s.dataset.astratoInstanceId = p.id, s.dataset.astratoVisualizationType = p.type;
1049
- let h = p.groupId ?? qe, y = u.get(h), S = K({
1055
+ let h = p.groupId ?? qe, y = u.get(h), S = q({
1050
1056
  client: e.client,
1051
1057
  fontFamily: O,
1052
1058
  hostBrush: y,
package/metadata.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as e, r as t, t as n } from "./chunks/metadata-WABZrt7Y.js";
2
- import { a as r, t as i } from "./chunks/requirements-Dvd8jqYF.js";
1
+ import { n as e, r as t, t as n } from "./chunks/metadata-Fmx1swpK.js";
2
+ import { a as r, t as i } from "./chunks/requirements-CYpVh65U.js";
3
3
  var a = (r) => ({
4
4
  type: r.type,
5
5
  family: r.family,
package/operations.js CHANGED
@@ -1,9 +1,9 @@
1
- import { Yo as e } from "./chunks/visualization-filters-Cc4KU-l-.js";
2
- import { M as t, N as n } from "./chunks/shared-Bn4N5QcZ.js";
3
- import { t as r } from "./chunks/operations-Dh4v1Ovt.js";
4
- import "./chunks/definitions-BPJQTx16.js";
1
+ import { Yo as e } from "./chunks/visualization-filters-mVnsnvLP.js";
2
+ import { M as t, N as n } from "./chunks/shared-DFoJxjVN.js";
3
+ import { t as r } from "./chunks/operations-HSqnCRvv.js";
4
+ import "./chunks/definitions-DNpzD9tY.js";
5
5
  import { n as i, t as a } from "./chunks/lookup-BWllin0q.js";
6
- import { n as o } from "./chunks/metadata-WABZrt7Y.js";
6
+ import { n as o } from "./chunks/metadata-Fmx1swpK.js";
7
7
  var s = /* @__PURE__ */ new WeakMap(), c = (e, t) => {
8
8
  let n = s.get(e);
9
9
  n || (n = /* @__PURE__ */ new Map(), s.set(e, n));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrato-io/visualizations",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./src/index.d.ts",
@@ -49,85 +49,86 @@
49
49
  "README.md",
50
50
  "THIRD_PARTY_NOTICES.md",
51
51
  "VISUALIZATION_DEFINITIONS.md",
52
- "chunks/Button-BrGKp9Nm.js",
53
- "chunks/DefaultPropsProvider-BsfB7QTn.js",
54
- "chunks/FieldTypeIcon-Drs6hSJF.js",
55
- "chunks/LinearProgress-VtfFx2vJ.js",
56
- "chunks/MenuOption-ByRqhRdX.js",
57
- "chunks/Title-CO5dP1ma.js",
58
- "chunks/ToggleButton-KOBAimC1.js",
52
+ "chunks/Button-5CxPEACP.js",
53
+ "chunks/CircularProgress-DFS-LQb7.js",
54
+ "chunks/FieldTypeIcon-pSVQFemC.js",
55
+ "chunks/LinearProgress-CjIQfkNA.js",
56
+ "chunks/MenuOption-Cb7B7x6z.js",
57
+ "chunks/Title-CtFw1bVg.js",
58
+ "chunks/ToggleButton-Br9HCPCv.js",
59
59
  "chunks/accessors-DemrDevR.js",
60
- "chunks/app-filter-bar.compiler-TwVTeoj5.js",
61
- "chunks/bar.compiler-DuQg8EUb.js",
62
- "chunks/builder-DEDvNq1k.js",
60
+ "chunks/app-filter-bar.compiler-B9775gLJ.js",
61
+ "chunks/bar.compiler-B7wlH_Ro.js",
62
+ "chunks/builder-Dxo7D7c6.js",
63
63
  "chunks/color-rules-CN7TcGrC.js",
64
64
  "chunks/color-settings-3VRlf_Vw.js",
65
- "chunks/colorManipulator-D8Pjy1pf.js",
66
- "chunks/coloring-CncX_JRX.js",
65
+ "chunks/coloring-B-Wa8D5P.js",
66
+ "chunks/contains-BK-sRXcB.js",
67
67
  "chunks/debounce-fn-CUixuz45.js",
68
- "chunks/definitions-BPJQTx16.js",
69
- "chunks/escobar-DRhRMYRE.js",
68
+ "chunks/definitions-DNpzD9tY.js",
69
+ "chunks/escobar-C4Nm3eJ7.js",
70
70
  "chunks/event-bus-CrLB-Y8z.js",
71
71
  "chunks/extend-BKUkc4_i.js",
72
- "chunks/extend-preset-CUFNpmPe.js",
73
- "chunks/filter.compiler-w27dlv0C.js",
74
- "chunks/filtering-cc7WqWpg.js",
75
- "chunks/handlers-TOT-7INo.js",
76
- "chunks/icon-picker-styles-CoJmwTRi.js",
77
- "chunks/isEqual-B8loyPsC.js",
72
+ "chunks/extend-preset-BVKFtoe-.js",
73
+ "chunks/filter.compiler-BlS3zoy_.js",
74
+ "chunks/filtering-CGuLpg7u.js",
75
+ "chunks/handlers-CMbyj5y1.js",
76
+ "chunks/icon-picker-styles-DYQgVEKG.js",
77
+ "chunks/isEqual-DBg_b35N.js",
78
+ "chunks/isFocusVisible-B1_z03UT.js",
78
79
  "chunks/label-format-type-weq1XfcX.js",
79
- "chunks/line.compiler-Ct1WhN2p.js",
80
- "chunks/logger-DpQtYQnX.js",
80
+ "chunks/line.compiler-Bo9i9qag.js",
81
+ "chunks/logger-3lng-wOw.js",
81
82
  "chunks/lookup-BWllin0q.js",
82
- "chunks/metadata-WABZrt7Y.js",
83
- "chunks/number.compiler-D8TPly-4.js",
84
- "chunks/operations-Dh4v1Ovt.js",
85
- "chunks/range-Bi-7zT0k.js",
86
- "chunks/render-wrappers-OEmtaM8g.js",
87
- "chunks/requirements-Dvd8jqYF.js",
88
- "chunks/responsive.styles-DSiOGD7u.js",
83
+ "chunks/metadata-Fmx1swpK.js",
84
+ "chunks/number.compiler-CdLd5aGW.js",
85
+ "chunks/operations-HSqnCRvv.js",
86
+ "chunks/range-CzO4isKK.js",
87
+ "chunks/react-dom-BwZT0N3F.js",
88
+ "chunks/render-wrappers-CAuvgMxi.js",
89
+ "chunks/requirements-CYpVh65U.js",
90
+ "chunks/responsive.styles-FItb913l.js",
89
91
  "chunks/rolldown-runtime-DleVn1XH.js",
90
92
  "chunks/set-coloring-datafield-B3uIS1Pe.js",
91
- "chunks/shared-Bn4N5QcZ.js",
93
+ "chunks/shared-DFoJxjVN.js",
92
94
  "chunks/src-77e3mC7i.js",
93
- "chunks/src-BOS6SqkZ.js",
95
+ "chunks/src-BOS6SqkZ2.js",
94
96
  "chunks/src-D9XogOrc.js",
95
- "chunks/standalone-B55oyW6c.js",
96
- "chunks/standalone-BDhPQtzQ.js",
97
- "chunks/standalone-BGkmozIb.js",
98
- "chunks/standalone-BMTCb10X.js",
99
- "chunks/standalone-BXKRE_Se.js",
100
- "chunks/standalone-Bes8srx1.js",
101
- "chunks/standalone-BjZp0QMe.js",
102
- "chunks/standalone-BlMIwpEe.js",
103
- "chunks/standalone-C8ZAEutO.js",
104
- "chunks/standalone-C8qAelL4.js",
105
- "chunks/standalone-CJvIXsQE.js",
106
- "chunks/standalone-CLmGb7nn2.js",
107
- "chunks/standalone-CM5XcAN5.js",
108
- "chunks/standalone-CXNP6-xD.js",
109
- "chunks/standalone-D5Q5ngsD.js",
110
- "chunks/standalone-DLlyRIE6.js",
111
- "chunks/standalone-DMcI1afI.js",
112
- "chunks/standalone-DN4S1MjT.js",
113
- "chunks/standalone-DT0wKji7.js",
114
- "chunks/standalone-DW6NT205.js",
115
- "chunks/standalone-DYQIQH4c.js",
116
- "chunks/standalone-D__XCp-h.js",
117
- "chunks/standalone-XTgSsTAa.js",
118
- "chunks/standalone-XuGksArp.js",
119
- "chunks/standalone-vBnBS2YC.js",
120
- "chunks/standalone-we5D5MIn.js",
97
+ "chunks/standalone-530a5lvf.js",
98
+ "chunks/standalone-5DnapeHH.js",
99
+ "chunks/standalone-B4jrf4KE.js",
100
+ "chunks/standalone-B6s_xG2u.js",
101
+ "chunks/standalone-BDrQMxLi.js",
102
+ "chunks/standalone-BMoJXGYe.js",
103
+ "chunks/standalone-BfvGggeM2.js",
104
+ "chunks/standalone-BvWdpUL3.js",
105
+ "chunks/standalone-C6XDHYAM.js",
106
+ "chunks/standalone-CMJJIi9v.js",
107
+ "chunks/standalone-CNkHsynO.js",
108
+ "chunks/standalone-CPUiiWNP.js",
109
+ "chunks/standalone-CXniic5x.js",
110
+ "chunks/standalone-C_Jd4gkj.js",
111
+ "chunks/standalone-CiaaibTa.js",
112
+ "chunks/standalone-CoQxJ6ov.js",
113
+ "chunks/standalone-Cu73fzSr.js",
114
+ "chunks/standalone-DBeXQrwH.js",
115
+ "chunks/standalone-DMCwtebn.js",
116
+ "chunks/standalone-DWPfdP0A.js",
117
+ "chunks/standalone-DpSRmAWx.js",
118
+ "chunks/standalone-DuwTOBXH.js",
119
+ "chunks/standalone-LFVgLhia.js",
120
+ "chunks/standalone-kzAhwH19.js",
121
+ "chunks/standalone-mb7LwEiq.js",
122
+ "chunks/standalone-r4ObFvys.js",
121
123
  "chunks/stroke-dash-UgMEcCS4.js",
122
- "chunks/table.compiler-DMeeHxb6.js",
123
- "chunks/typeof-CJDtcySz.js",
124
+ "chunks/table.compiler-C1qjqXaT.js",
125
+ "chunks/typeof-DCq3QgvY.js",
124
126
  "chunks/url-utils-B17gj_mr.js",
125
- "chunks/useFieldName-Cjn9KCVp.js",
126
- "chunks/useSlotProps-DLbQp4lc.js",
127
- "chunks/utils-vdmi_2PK.js",
128
- "chunks/view-BuwQugKb.js",
129
- "chunks/visualization-filters-Cc4KU-l-.js",
130
- "chunks/with-html-element-D0uY2zjI.js",
127
+ "chunks/useFieldName-mWrD_uk_.js",
128
+ "chunks/utils-DYYD4Zzf.js",
129
+ "chunks/view-7fH6mGmY.js",
130
+ "chunks/visualization-filters-mVnsnvLP.js",
131
+ "chunks/with-html-element-B0Clt4jY.js",
131
132
  "definitions.js",
132
133
  "docs/operations/astrato-app-filter-bar.md",
133
134
  "docs/operations/bar.md",