@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.
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES.md +307 -378
- package/chunks/{Button-BrGKp9Nm.js → Button-5CxPEACP.js} +11 -11
- package/chunks/CircularProgress-DFS-LQb7.js +765 -0
- package/chunks/FieldTypeIcon-pSVQFemC.js +22 -0
- package/chunks/LinearProgress-CjIQfkNA.js +327 -0
- package/chunks/{MenuOption-ByRqhRdX.js → MenuOption-Cb7B7x6z.js} +1384 -1002
- package/chunks/Title-CtFw1bVg.js +1804 -0
- package/chunks/ToggleButton-Br9HCPCv.js +150 -0
- package/chunks/{app-filter-bar.compiler-TwVTeoj5.js → app-filter-bar.compiler-B9775gLJ.js} +3 -3
- package/chunks/{bar.compiler-DuQg8EUb.js → bar.compiler-B7wlH_Ro.js} +4 -4
- package/chunks/{builder-DEDvNq1k.js → builder-Dxo7D7c6.js} +118 -55
- package/chunks/{coloring-CncX_JRX.js → coloring-B-Wa8D5P.js} +3 -3
- package/chunks/contains-BK-sRXcB.js +21 -0
- package/chunks/{definitions-BPJQTx16.js → definitions-DNpzD9tY.js} +26 -26
- package/chunks/{escobar-DRhRMYRE.js → escobar-C4Nm3eJ7.js} +4436 -4802
- package/chunks/{extend-preset-CUFNpmPe.js → extend-preset-BVKFtoe-.js} +46 -46
- package/chunks/{filter.compiler-w27dlv0C.js → filter.compiler-BlS3zoy_.js} +7 -7
- package/chunks/{filtering-cc7WqWpg.js → filtering-CGuLpg7u.js} +494 -270
- package/chunks/{handlers-TOT-7INo.js → handlers-CMbyj5y1.js} +1513 -1454
- package/chunks/{icon-picker-styles-CoJmwTRi.js → icon-picker-styles-DYQgVEKG.js} +8 -8
- package/chunks/{isEqual-B8loyPsC.js → isEqual-DBg_b35N.js} +1 -1
- package/chunks/isFocusVisible-B1_z03UT.js +144 -0
- package/chunks/{line.compiler-Ct1WhN2p.js → line.compiler-Bo9i9qag.js} +7 -7
- package/chunks/{logger-DpQtYQnX.js → logger-3lng-wOw.js} +7 -3
- package/chunks/{metadata-WABZrt7Y.js → metadata-Fmx1swpK.js} +1 -1
- package/chunks/{number.compiler-D8TPly-4.js → number.compiler-CdLd5aGW.js} +7 -7
- package/chunks/{operations-Dh4v1Ovt.js → operations-HSqnCRvv.js} +9156 -9112
- package/chunks/{range-Bi-7zT0k.js → range-CzO4isKK.js} +2 -2
- package/chunks/react-dom-BwZT0N3F.js +368 -0
- package/chunks/{render-wrappers-OEmtaM8g.js → render-wrappers-CAuvgMxi.js} +1 -1
- package/chunks/{requirements-Dvd8jqYF.js → requirements-CYpVh65U.js} +52 -52
- package/chunks/responsive.styles-FItb913l.js +93 -0
- package/chunks/{shared-Bn4N5QcZ.js → shared-DFoJxjVN.js} +401 -401
- package/chunks/{standalone-D__XCp-h.js → standalone-530a5lvf.js} +306 -306
- package/chunks/{standalone-CXNP6-xD.js → standalone-5DnapeHH.js} +112 -112
- package/chunks/{standalone-XTgSsTAa.js → standalone-B4jrf4KE.js} +70 -70
- package/chunks/{standalone-Bes8srx1.js → standalone-B6s_xG2u.js} +14 -14
- package/chunks/{standalone-vBnBS2YC.js → standalone-BDrQMxLi.js} +98 -98
- package/chunks/standalone-BMoJXGYe.js +2 -0
- package/chunks/{standalone-CLmGb7nn2.js → standalone-BfvGggeM2.js} +76 -76
- package/chunks/{standalone-D5Q5ngsD.js → standalone-BvWdpUL3.js} +26 -26
- package/chunks/{standalone-we5D5MIn.js → standalone-C6XDHYAM.js} +31 -31
- package/chunks/standalone-CMJJIi9v.js +2 -0
- package/chunks/{standalone-C8ZAEutO.js → standalone-CNkHsynO.js} +28 -28
- package/chunks/{standalone-BMTCb10X.js → standalone-CPUiiWNP.js} +5 -5
- package/chunks/{standalone-XuGksArp.js → standalone-CXniic5x.js} +9 -9
- package/chunks/standalone-C_Jd4gkj.js +6 -0
- package/chunks/{standalone-DW6NT205.js → standalone-CiaaibTa.js} +142 -142
- package/chunks/standalone-CoQxJ6ov.js +3638 -0
- package/chunks/{standalone-CM5XcAN5.js → standalone-Cu73fzSr.js} +7660 -7534
- package/chunks/standalone-DBeXQrwH.js +468 -0
- package/chunks/{standalone-DMcI1afI.js → standalone-DMCwtebn.js} +81 -81
- package/chunks/{standalone-BlMIwpEe.js → standalone-DWPfdP0A.js} +800 -668
- package/chunks/{standalone-DLlyRIE6.js → standalone-DpSRmAWx.js} +59 -59
- package/chunks/{standalone-BGkmozIb.js → standalone-DuwTOBXH.js} +256 -256
- package/chunks/{standalone-BDhPQtzQ.js → standalone-LFVgLhia.js} +234 -234
- package/chunks/{standalone-B55oyW6c.js → standalone-kzAhwH19.js} +149 -149
- package/chunks/{standalone-DN4S1MjT.js → standalone-mb7LwEiq.js} +885 -885
- package/chunks/{standalone-CJvIXsQE.js → standalone-r4ObFvys.js} +155 -155
- package/chunks/{table.compiler-DMeeHxb6.js → table.compiler-C1qjqXaT.js} +7 -7
- package/chunks/{typeof-CJDtcySz.js → typeof-DCq3QgvY.js} +6 -1
- package/chunks/useFieldName-mWrD_uk_.js +7 -0
- package/chunks/{utils-vdmi_2PK.js → utils-DYYD4Zzf.js} +7593 -12707
- package/chunks/{view-BuwQugKb.js → view-7fH6mGmY.js} +2034 -2070
- package/chunks/{visualization-filters-Cc4KU-l-.js → visualization-filters-mVnsnvLP.js} +3581 -3555
- package/chunks/with-html-element-B0Clt4jY.js +15901 -0
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +1 -1
- package/docs/operations/combo.md +1 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +1 -1
- package/docs/operations/filter.md +1 -1
- package/docs/operations/gauge.md +1 -1
- package/docs/operations/heatMap.md +1 -1
- package/docs/operations/histogram.md +1 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +2 -2
- package/docs/operations/line.md +1 -1
- package/docs/operations/number.md +1 -1
- package/docs/operations/pie.md +1 -1
- package/docs/operations/radar.md +1 -1
- package/docs/operations/sankey.md +1 -1
- package/docs/operations/scatter.md +1 -1
- package/docs/operations/shape.md +1 -1
- package/docs/operations/simpleTextObject.md +1 -1
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +66 -1
- package/docs/operations/tree.md +1 -1
- package/docs/operations/treemap.md +1 -1
- package/docs/operations/waterfall.md +1 -1
- package/docs/operations/word-cloud.md +1 -1
- package/getters.js +2 -2
- package/index.js +74 -68
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +67 -66
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +348 -348
- package/src/definitions/model/definitions/schema-registry.d.ts +101 -101
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +8 -8
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +29 -29
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +10 -10
- package/src/definitions/model/definitions/schemas/number.schema.d.ts +4 -4
- package/src/definitions/model/definitions/schemas/object.schema.d.ts +38 -38
- package/src/definitions/model/definitions/schemas/table.schema.d.ts +61 -61
- package/src/visualization-catalog.d.ts +26 -26
- package/chunks/DefaultPropsProvider-BsfB7QTn.js +0 -257
- package/chunks/FieldTypeIcon-Drs6hSJF.js +0 -22
- package/chunks/LinearProgress-VtfFx2vJ.js +0 -253
- package/chunks/Title-CO5dP1ma.js +0 -1691
- package/chunks/ToggleButton-KOBAimC1.js +0 -112
- package/chunks/colorManipulator-D8Pjy1pf.js +0 -45
- package/chunks/responsive.styles-DSiOGD7u.js +0 -82
- package/chunks/standalone-BXKRE_Se.js +0 -468
- package/chunks/standalone-BjZp0QMe.js +0 -2
- package/chunks/standalone-C8qAelL4.js +0 -2
- package/chunks/standalone-DT0wKji7.js +0 -6
- package/chunks/standalone-DYQIQH4c.js +0 -2095
- package/chunks/useFieldName-Cjn9KCVp.js +0 -7
- package/chunks/useSlotProps-DLbQp4lc.js +0 -166
- package/chunks/with-html-element-D0uY2zjI.js +0 -7328
- /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,
|
|
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-
|
|
5
|
-
import { a as f, i as p, n as m, o as h, r as g, t as _ } from "./chunks/requirements-
|
|
6
|
-
import { l as ee, t as v, u as te } from "./chunks/logger-
|
|
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(
|
|
162
|
-
...
|
|
161
|
+
}, pe = se(o.fonts.general.fontFamily ?? ""), me = (e) => ({
|
|
162
|
+
...o,
|
|
163
163
|
fonts: {
|
|
164
|
-
...
|
|
164
|
+
...o.fonts,
|
|
165
165
|
general: {
|
|
166
|
-
...
|
|
166
|
+
...o.fonts.general,
|
|
167
167
|
fontFamily: e
|
|
168
168
|
},
|
|
169
169
|
title: {
|
|
170
|
-
...
|
|
170
|
+
...o.fonts.title,
|
|
171
171
|
fontFamily: e
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
navigation: {
|
|
175
|
-
...
|
|
175
|
+
...o.navigation,
|
|
176
176
|
activeItem: {
|
|
177
|
-
...
|
|
177
|
+
...o.navigation.activeItem,
|
|
178
178
|
font: {
|
|
179
|
-
...
|
|
179
|
+
...o.navigation.activeItem.font,
|
|
180
180
|
fontFamily: e
|
|
181
181
|
}
|
|
182
182
|
},
|
|
183
183
|
item: {
|
|
184
|
-
...
|
|
184
|
+
...o.navigation.item,
|
|
185
185
|
font: {
|
|
186
|
-
...
|
|
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
|
-
...
|
|
274
|
+
...s,
|
|
275
275
|
...e,
|
|
276
276
|
calendar: {
|
|
277
|
-
...
|
|
277
|
+
...s.calendar,
|
|
278
278
|
...z(e.calendar) ? e.calendar : {}
|
|
279
279
|
},
|
|
280
280
|
formats: {
|
|
281
|
-
...
|
|
281
|
+
...s.formats,
|
|
282
282
|
...z(e.formats) ? e.formats : {}
|
|
283
283
|
},
|
|
284
284
|
number: {
|
|
285
|
-
...
|
|
285
|
+
...s.number,
|
|
286
286
|
...z(e.number) ? e.number : {}
|
|
287
287
|
}
|
|
288
|
-
} :
|
|
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
|
-
},
|
|
294
|
+
}, G = (e) => {
|
|
295
295
|
if (z(e) && typeof e.view == "string") return e.view;
|
|
296
|
-
},
|
|
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
|
-
},
|
|
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 =
|
|
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),
|
|
311
|
-
let t =
|
|
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 =
|
|
315
|
+
let e = He(i, t, n, r);
|
|
316
316
|
if (e) return e;
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
},
|
|
320
|
-
let n =
|
|
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 =
|
|
322
|
+
let t = G(e);
|
|
323
323
|
return t ? n.includes(t) : !1;
|
|
324
324
|
}) : e;
|
|
325
|
-
},
|
|
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(),
|
|
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,
|
|
383
|
+
}, Ke = Ge(k?.onActiveSelectionChange, q), qe = Ge(k?.onActiveSelectionChangeApplied, J, () => {
|
|
384
384
|
s.type !== "filter" && B(ke);
|
|
385
|
-
}), Je = Ge(k?.onActiveSelectionChangePending,
|
|
385
|
+
}), Je = Ge(k?.onActiveSelectionChangePending, Y), Ye = [
|
|
386
386
|
Ke,
|
|
387
387
|
qe,
|
|
388
388
|
Je,
|
|
389
389
|
k?.singleSelectFields$?.subscribe((e) => {
|
|
390
|
-
|
|
390
|
+
We.next(Se(e));
|
|
391
391
|
})
|
|
392
392
|
].filter((e) => !!e), X = (e = "all") => {
|
|
393
|
-
let t =
|
|
394
|
-
Ke ||
|
|
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$:
|
|
427
|
+
singleSelectFields$: We.asObservable(),
|
|
428
428
|
selectionChange: te,
|
|
429
429
|
selectionCommitted$: S.asObservable(),
|
|
430
430
|
get onActiveSelectionChange() {
|
|
431
|
-
return W(),
|
|
431
|
+
return W(), q.asObservable();
|
|
432
432
|
},
|
|
433
433
|
get onActiveSelectionChangeApplied() {
|
|
434
|
-
return W(),
|
|
434
|
+
return W(), J.asObservable();
|
|
435
435
|
},
|
|
436
436
|
get onActiveSelectionChangePending() {
|
|
437
|
-
return W(),
|
|
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: () =>
|
|
446
|
-
getActiveSelection: (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:
|
|
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 ?
|
|
561
|
+
return t ? Ue(t, e) : void 0;
|
|
562
562
|
}, at = (e) => {
|
|
563
563
|
let t = A?.validFields ?? A?.fields;
|
|
564
|
-
return t ?
|
|
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 ?
|
|
567
|
+
return t ? Ue(t, e) : void 0;
|
|
568
568
|
}, st = (e) => {
|
|
569
|
-
if (!z(e) ||
|
|
570
|
-
let t =
|
|
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 =
|
|
572
|
+
let r = He(A, n, t);
|
|
573
573
|
return r ? { fieldKey: r } : e;
|
|
574
|
-
}, ct = (e) => Array.isArray(e) ? e.map(st) : e,
|
|
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
|
-
},
|
|
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
|
|
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(
|
|
592
|
-
let
|
|
593
|
-
return
|
|
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) =>
|
|
625
|
+
getDimensionsList: (e) => lt([], () => E?.getDimensionsList?.(e), () => A?.dimensions),
|
|
620
626
|
getGroupedDimensions: fe,
|
|
621
|
-
getMeasuresList: (e) =>
|
|
627
|
+
getMeasuresList: (e) => lt([], () => E?.getMeasuresList?.(e), () => A?.measures),
|
|
622
628
|
getValidFields: (e) => {
|
|
623
629
|
let t = ct(e);
|
|
624
|
-
return
|
|
630
|
+
return lt([], () => E?.getValidFields?.(t), () => at(t));
|
|
625
631
|
},
|
|
626
|
-
getViewsFields: (e) =>
|
|
627
|
-
getFields: (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 () =>
|
|
679
|
+
getEngine: async () => $,
|
|
674
680
|
get engine() {
|
|
675
|
-
return
|
|
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
|
|
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(),
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
|
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 =
|
|
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-
|
|
2
|
-
import { a as r, t as i } from "./chunks/requirements-
|
|
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-
|
|
2
|
-
import { M as t, N as n } from "./chunks/shared-
|
|
3
|
-
import { t as r } from "./chunks/operations-
|
|
4
|
-
import "./chunks/definitions-
|
|
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-
|
|
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.
|
|
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-
|
|
53
|
-
"chunks/
|
|
54
|
-
"chunks/FieldTypeIcon-
|
|
55
|
-
"chunks/LinearProgress-
|
|
56
|
-
"chunks/MenuOption-
|
|
57
|
-
"chunks/Title-
|
|
58
|
-
"chunks/ToggleButton-
|
|
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-
|
|
61
|
-
"chunks/bar.compiler-
|
|
62
|
-
"chunks/builder-
|
|
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/
|
|
66
|
-
"chunks/
|
|
65
|
+
"chunks/coloring-B-Wa8D5P.js",
|
|
66
|
+
"chunks/contains-BK-sRXcB.js",
|
|
67
67
|
"chunks/debounce-fn-CUixuz45.js",
|
|
68
|
-
"chunks/definitions-
|
|
69
|
-
"chunks/escobar-
|
|
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-
|
|
73
|
-
"chunks/filter.compiler-
|
|
74
|
-
"chunks/filtering-
|
|
75
|
-
"chunks/handlers-
|
|
76
|
-
"chunks/icon-picker-styles-
|
|
77
|
-
"chunks/isEqual-
|
|
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-
|
|
80
|
-
"chunks/logger-
|
|
80
|
+
"chunks/line.compiler-Bo9i9qag.js",
|
|
81
|
+
"chunks/logger-3lng-wOw.js",
|
|
81
82
|
"chunks/lookup-BWllin0q.js",
|
|
82
|
-
"chunks/metadata-
|
|
83
|
-
"chunks/number.compiler-
|
|
84
|
-
"chunks/operations-
|
|
85
|
-
"chunks/range-
|
|
86
|
-
"chunks/
|
|
87
|
-
"chunks/
|
|
88
|
-
"chunks/
|
|
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-
|
|
93
|
+
"chunks/shared-DFoJxjVN.js",
|
|
92
94
|
"chunks/src-77e3mC7i.js",
|
|
93
|
-
"chunks/src-
|
|
95
|
+
"chunks/src-BOS6SqkZ2.js",
|
|
94
96
|
"chunks/src-D9XogOrc.js",
|
|
95
|
-
"chunks/standalone-
|
|
96
|
-
"chunks/standalone-
|
|
97
|
-
"chunks/standalone-
|
|
98
|
-
"chunks/standalone-
|
|
99
|
-
"chunks/standalone-
|
|
100
|
-
"chunks/standalone-
|
|
101
|
-
"chunks/standalone-
|
|
102
|
-
"chunks/standalone-
|
|
103
|
-
"chunks/standalone-
|
|
104
|
-
"chunks/standalone-
|
|
105
|
-
"chunks/standalone-
|
|
106
|
-
"chunks/standalone-
|
|
107
|
-
"chunks/standalone-
|
|
108
|
-
"chunks/standalone-
|
|
109
|
-
"chunks/standalone-
|
|
110
|
-
"chunks/standalone-
|
|
111
|
-
"chunks/standalone-
|
|
112
|
-
"chunks/standalone-
|
|
113
|
-
"chunks/standalone-
|
|
114
|
-
"chunks/standalone-
|
|
115
|
-
"chunks/standalone-
|
|
116
|
-
"chunks/standalone-
|
|
117
|
-
"chunks/standalone-
|
|
118
|
-
"chunks/standalone-
|
|
119
|
-
"chunks/standalone-
|
|
120
|
-
"chunks/standalone-
|
|
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-
|
|
123
|
-
"chunks/typeof-
|
|
124
|
+
"chunks/table.compiler-C1qjqXaT.js",
|
|
125
|
+
"chunks/typeof-DCq3QgvY.js",
|
|
124
126
|
"chunks/url-utils-B17gj_mr.js",
|
|
125
|
-
"chunks/useFieldName-
|
|
126
|
-
"chunks/
|
|
127
|
-
"chunks/
|
|
128
|
-
"chunks/
|
|
129
|
-
"chunks/
|
|
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",
|