@astrato-io/visualizations 0.9.0 → 0.10.1
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/CHANGELOG.md +10 -0
- package/README.md +7 -3
- package/THIRD_PARTY_NOTICES.md +163 -14
- package/VISUALIZATION_DEFINITIONS.md +376 -36
- package/chunks/{Button-5CxPEACP.js → Button-Dn3rJrYf.js} +4 -4
- package/chunks/{CircularProgress-DFS-LQb7.js → CircularProgress-BFeu06Yb.js} +39 -39
- package/chunks/FieldTypeIcon-DrMoGpHJ.js +22 -0
- package/chunks/{LinearProgress-CjIQfkNA.js → LinearProgress-ClO6GUjN.js} +9 -9
- package/chunks/{MenuOption-Cb7B7x6z.js → MenuOption-Czc34u4q.js} +143 -142
- package/chunks/{Title-CtFw1bVg.js → Title-BgYnaVTR.js} +22 -22
- package/chunks/_createAggregator-BMu9uRax.js +50 -0
- package/chunks/{app-filter-bar.compiler-B9775gLJ.js → app-filter-bar.compiler-CVir0wkl.js} +10 -10
- package/chunks/bar-layout-C_UgRlVl.js +9 -0
- package/chunks/{bar.compiler-B7wlH_Ro.js → bar.compiler-DYuFdi9J.js} +100 -82
- package/chunks/{builder-Dxo7D7c6.js → builder-C-TKA-My.js} +70 -37
- package/chunks/color-rules-DYJL4fIW.js +15 -0
- package/chunks/color-settings-DJFoFTip.js +5 -0
- package/chunks/{coloring-B-Wa8D5P.js → coloring-BtnPiQ_o.js} +37 -37
- package/chunks/createSimplePaletteValueFilter--zrZxRV9.js +2005 -0
- package/chunks/defaults-Dtk7fg3C.js +3 -0
- package/chunks/{definitions-DNpzD9tY.js → definitions-CT304NDn.js} +655 -417
- package/chunks/{escobar-C4Nm3eJ7.js → escobar-CvEV2ES1.js} +7441 -7127
- package/chunks/{extend-preset-BVKFtoe-.js → extend-preset-D9-JP92b.js} +998 -933
- package/chunks/{filter.compiler-BlS3zoy_.js → filter.compiler-CXeZznks.js} +7 -7
- package/chunks/{filtering-CGuLpg7u.js → filtering-8_bFv-jb.js} +333 -377
- package/chunks/handlers-C6CZ0XJA.js +15399 -0
- package/chunks/{icon-picker-styles-DYQgVEKG.js → icon-picker-styles-BXiJ1SZS.js} +11 -11
- package/chunks/isEqual-D8Ay63xR.js +16 -0
- package/chunks/{isFocusVisible-B1_z03UT.js → isFocusVisible-Bu8gGZu5.js} +1 -1
- package/chunks/label-format-type-C46pzgx7.js +17 -0
- package/chunks/{line.compiler-Bo9i9qag.js → line.compiler-DmHpmQCC.js} +9 -9
- package/chunks/{logger-3lng-wOw.js → logger-DdZpR7xZ.js} +79 -72
- package/chunks/map.compiler-Q_Y1Pvat.js +343 -0
- package/chunks/{metadata-Fmx1swpK.js → metadata-BQm_TXI1.js} +1 -1
- package/chunks/{number.compiler-CdLd5aGW.js → number.compiler-DQdg6zTy.js} +7 -7
- package/chunks/operations-DKQWuLL7.js +31315 -0
- package/chunks/{range-CzO4isKK.js → range-BdhzvYQ_.js} +2 -2
- package/chunks/{react-dom-BwZT0N3F.js → react-dom-BGP4tbXV.js} +70 -70
- package/chunks/{render-wrappers-CAuvgMxi.js → render-wrappers-BZpyDnJy.js} +1 -1
- package/chunks/{requirements-CYpVh65U.js → requirements-e8Fe96ag.js} +60 -58
- package/chunks/shared-C_2F90xq.js +1337 -0
- package/chunks/standalone-4MsKiqs0.js +355 -0
- package/chunks/standalone-B794g9pE.js +1012 -0
- package/chunks/{standalone-C6XDHYAM.js → standalone-B8ZSqauS.js} +110 -110
- package/chunks/{standalone-5DnapeHH.js → standalone-BA2YXyJS.js} +126 -124
- package/chunks/{standalone-CXniic5x.js → standalone-BDrXVxlP.js} +6 -5
- package/chunks/{standalone-B6s_xG2u.js → standalone-BE_ONgiG.js} +116 -116
- package/chunks/{standalone-CPUiiWNP.js → standalone-BTY3w_JA.js} +37 -37
- package/chunks/standalone-BgumbdaJ2.js +357 -0
- package/chunks/{standalone-DWPfdP0A.js → standalone-BkbiH-o8.js} +482 -482
- package/chunks/standalone-Blh4qejk.js +689 -0
- package/chunks/standalone-CXY4FpF7.js +773 -0
- package/chunks/{standalone-BvWdpUL3.js → standalone-CY_kjarf.js} +34 -31
- package/chunks/{standalone-DuwTOBXH.js → standalone-CaTxAydz.js} +587 -587
- package/chunks/{standalone-BDrQMxLi.js → standalone-Cc98Pdr6.js} +1799 -1015
- package/chunks/{standalone-DMCwtebn.js → standalone-Cl0TSfqC.js} +125 -125
- package/chunks/{standalone-CoQxJ6ov.js → standalone-CsoMmE9T.js} +778 -778
- package/chunks/standalone-DH0xTEes.js +2 -0
- package/chunks/{standalone-LFVgLhia.js → standalone-DHRalbVO.js} +311 -303
- package/chunks/standalone-DNh9NcMa.js +580 -0
- package/chunks/standalone-DcnHjNnC.js +2 -0
- package/chunks/{standalone-r4ObFvys.js → standalone-DflyWtuR.js} +217 -215
- package/chunks/standalone-DrHdGkY7.js +762 -0
- package/chunks/standalone-c_rROMtx.js +287 -0
- package/chunks/standalone-drcFLeN6.js +6 -0
- package/chunks/{standalone-CNkHsynO.js → standalone-wOWRCpdn.js} +54 -56
- package/chunks/{standalone-Cu73fzSr.js → standalone-z0o52o5t.js} +5128 -4908
- package/chunks/{table.compiler-C1qjqXaT.js → table.compiler-COaHE9VD.js} +18 -18
- package/chunks/{useFieldName-mWrD_uk_.js → useFieldName-CdnCWzhd.js} +1 -1
- package/chunks/{utils-DYYD4Zzf.js → utils-DganVptf.js} +4758 -4747
- package/chunks/{view-7fH6mGmY.js → view-Bzlros43.js} +2021 -1665
- package/chunks/{visualization-filters-mVnsnvLP.js → visualization-filters-D7i6oh1Z.js} +3177 -2425
- package/chunks/{with-html-element-B0Clt4jY.js → with-html-element-CiIhFEa5.js} +3740 -3547
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +303 -2
- package/docs/operations/combo.md +262 -1
- package/docs/operations/date-picker.md +1 -1
- package/docs/operations/distribution-gauge.md +1 -1
- package/docs/operations/dot.md +148 -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 +262 -1
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +7 -7
- package/docs/operations/line.md +280 -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 +148 -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 +374 -157
- 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 +482 -434
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +72 -67
- package/src/definitions/index.d.ts +7 -1
- package/src/definitions/model/definitions/available-fields.d.ts +2 -2
- package/src/definitions/model/definitions/compilers/compile.d.ts +1 -0
- package/src/definitions/model/definitions/data-item-resolution.d.ts +3 -3
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +219 -7
- package/src/definitions/model/definitions/index.d.ts +2 -1
- package/src/definitions/model/definitions/schema-registry.d.ts +305 -0
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +2 -0
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +4 -3
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -0
- package/src/definitions/model/definitions/schemas/map.schema.d.ts +590 -0
- package/src/definitions/model/definitions/types/compilation.types.d.ts +9 -1
- package/src/definitions/model/definitions/types/definition.types.d.ts +2 -2
- package/src/definitions/model/definitions/types/index.d.ts +1 -1
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +1 -1
- package/src/types.d.ts +17 -13
- package/chunks/FieldTypeIcon-pSVQFemC.js +0 -22
- package/chunks/ToggleButton-Br9HCPCv.js +0 -150
- package/chunks/color-rules-CN7TcGrC.js +0 -6
- package/chunks/color-settings-3VRlf_Vw.js +0 -6
- package/chunks/handlers-CMbyj5y1.js +0 -12930
- package/chunks/isEqual-DBg_b35N.js +0 -12
- package/chunks/label-format-type-weq1XfcX.js +0 -8
- package/chunks/operations-HSqnCRvv.js +0 -26324
- package/chunks/shared-DFoJxjVN.js +0 -1218
- package/chunks/standalone-530a5lvf.js +0 -1003
- package/chunks/standalone-B4jrf4KE.js +0 -354
- package/chunks/standalone-BMoJXGYe.js +0 -2
- package/chunks/standalone-BfvGggeM2.js +0 -355
- package/chunks/standalone-CMJJIi9v.js +0 -2
- package/chunks/standalone-C_Jd4gkj.js +0 -6
- package/chunks/standalone-CiaaibTa.js +0 -518
- package/chunks/standalone-DBeXQrwH.js +0 -468
- package/chunks/standalone-DpSRmAWx.js +0 -287
- package/chunks/standalone-kzAhwH19.js +0 -689
- package/chunks/standalone-mb7LwEiq.js +0 -3874
- /package/chunks/{src-BOS6SqkZ2.js → src-BOS6SqkZ.js} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import { F as h,
|
|
4
|
-
import {
|
|
5
|
-
import "./logger-
|
|
6
|
-
import {
|
|
7
|
-
import { t as B } from "./coloring-
|
|
2
|
+
import { Ao as t, Et as n, Fc as r, Io as i, Qa as a, Qr as o, Xs as s, Za as c, gc as l, ko as u, rr as d, sa as f, yc as p, za as m } from "./visualization-filters-D7i6oh1Z.js";
|
|
3
|
+
import { F as h, Ht as g, L as _, N as v, U as y, Zt as b, ci as x, jt as S, zr as C } from "./utils-DganVptf.js";
|
|
4
|
+
import { __ as w, g_ as T } from "./handlers-C6CZ0XJA.js";
|
|
5
|
+
import "./logger-DdZpR7xZ.js";
|
|
6
|
+
import { Bt as E, Ct as D, Ft as O, Jt as k, L as A, Lt as ee, Qt as te, St as ne, Wt as re, _ as j, an as M, bn as N, fn as P, i as ie, kt as ae, mn as F, on as oe, qt as I, sn as se, t as ce, un as L, v as le, yn as R, zt as z } from "./escobar-CvEV2ES1.js";
|
|
7
|
+
import { t as B } from "./coloring-BtnPiQ_o.js";
|
|
8
8
|
import { t as V } from "./debounce-fn-CUixuz45.js";
|
|
9
9
|
import { t as H } from "./set-coloring-datafield-B3uIS1Pe.js";
|
|
10
|
-
import { t as U } from "./builder-
|
|
10
|
+
import { t as U } from "./builder-C-TKA-My.js";
|
|
11
11
|
var W = 100, G = (e, t, n) => {
|
|
12
12
|
let r = e.element.getBoundingClientRect(), i = {
|
|
13
13
|
x: t.clientX - r.left,
|
|
@@ -43,12 +43,12 @@ var W = 100, G = (e, t, n) => {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
}, K = /* @__PURE__ */ e(x()), de =
|
|
46
|
+
}, K = /* @__PURE__ */ e(x()), de = t.Rectangle, q = (e) => ({
|
|
47
47
|
shape: e?.heatMapSettings?.shape ?? de,
|
|
48
48
|
minSize: e?.heatMapSettings?.minSize ?? .1,
|
|
49
49
|
maxSize: e?.heatMapSettings?.maxSize ?? 1
|
|
50
50
|
}), fe = (e, t, n, r, i, a, o, s) => {
|
|
51
|
-
let c = [], { shape: l } = q(e), u = `${
|
|
51
|
+
let c = [], { shape: l } = q(e), u = `${N.Point}-${l}`;
|
|
52
52
|
if ((e?.enableEmitEvents ?? !1) && s) {
|
|
53
53
|
let e = ue(u, s);
|
|
54
54
|
c.push(e);
|
|
@@ -58,68 +58,68 @@ var W = 100, G = (e, t, n) => {
|
|
|
58
58
|
interactions: n.interactions ? [...n.interactions, ...c] : [...c]
|
|
59
59
|
};
|
|
60
60
|
}, pe = (e, t, n) => {
|
|
61
|
-
let r = e.dimensions.filter(
|
|
61
|
+
let r = e.dimensions.filter(o), i = r.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), a = r.filter((e) => e.role === c.HEAT_MAP_VERTICAL), s = i[0], l = a[0], [u, d] = E([{
|
|
62
62
|
showAxisTooltip: e?.axes?.dimension?.showAxisTooltip,
|
|
63
|
-
formatter:
|
|
64
|
-
scale:
|
|
63
|
+
formatter: s?.formatter,
|
|
64
|
+
scale: se(e),
|
|
65
65
|
key: O.Dimension,
|
|
66
|
-
settings: { direction:
|
|
66
|
+
settings: { direction: ee(e) }
|
|
67
67
|
}, {
|
|
68
68
|
showAxisTooltip: e?.axes?.secondaryDimension?.showAxisTooltip,
|
|
69
|
-
formatter:
|
|
69
|
+
formatter: l?.formatter,
|
|
70
70
|
scale: L.YAxisScale,
|
|
71
71
|
key: O.DimensionSec,
|
|
72
72
|
settings: {
|
|
73
|
-
direction:
|
|
73
|
+
direction: z(e),
|
|
74
74
|
isVerticalDimension: !0
|
|
75
75
|
}
|
|
76
76
|
}]);
|
|
77
77
|
return {
|
|
78
78
|
...n,
|
|
79
|
-
components: [...n.components ?? [], ...
|
|
80
|
-
interactions: [...n.interactions ?? [], ...
|
|
79
|
+
components: [...n.components ?? [], ...u],
|
|
80
|
+
interactions: [...n.interactions ?? [], ...d]
|
|
81
81
|
};
|
|
82
|
-
}, me = (e, n,
|
|
82
|
+
}, me = (e, t, n, r, a, s, l, u) => {
|
|
83
83
|
let f = [], p = [], h = [];
|
|
84
|
-
if (
|
|
85
|
-
let e =
|
|
84
|
+
if (u) {
|
|
85
|
+
let e = re(N.Text, u);
|
|
86
86
|
h.push(e);
|
|
87
87
|
}
|
|
88
|
-
let g = e.dimensions.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), _ = g.filter(
|
|
89
|
-
...
|
|
90
|
-
...
|
|
88
|
+
let g = e.dimensions.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), _ = g.filter(o), v = e.dimensions.filter((e) => e.role === c.HEAT_MAP_VERTICAL), y = v.filter(o), b = {
|
|
89
|
+
...t.axis.dimension,
|
|
90
|
+
...t.fonts
|
|
91
91
|
}, x = {
|
|
92
|
-
...
|
|
93
|
-
...
|
|
94
|
-
}, S = _[0], C = y[0], w = e.measures.filter((e) => e.role ===
|
|
92
|
+
...t.axis.measure,
|
|
93
|
+
...t.fonts
|
|
94
|
+
}, S = _[0], C = y[0], w = e.measures.filter((e) => e.role === m.HEAT_MAP_COLOR), T = w.filter(o), E = {};
|
|
95
95
|
if (S) {
|
|
96
|
-
let t = e.axes?.dimension || E, n = t.secondaryAxis ?
|
|
97
|
-
if (f.push(
|
|
98
|
-
let
|
|
99
|
-
p.push(
|
|
96
|
+
let t = e.axes?.dimension || E, n = t.secondaryAxis ? i.Top : i.Bottom;
|
|
97
|
+
if (f.push(I(L.XAxisScale, t, b, n, S.formatter, s)), t.showAxisName) {
|
|
98
|
+
let r = d(g, e.enableAlternate, s?.isPrintMode);
|
|
99
|
+
p.push(k(_, r, n, b, t.colors?.title, t.axisTitle ? t.axisTitle : M(S, l), t.titleFontSize));
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
if (C) {
|
|
103
|
-
let t = e.axes?.secondaryDimension || E, n = t.secondaryAxis ?
|
|
104
|
-
if (f.push(
|
|
105
|
-
let
|
|
106
|
-
p.push(
|
|
103
|
+
let t = e.axes?.secondaryDimension || E, n = t.secondaryAxis ? i.Right : i.Left;
|
|
104
|
+
if (f.push(I(L.YAxisScale, t, b, n, C.formatter, s)), t.showAxisName) {
|
|
105
|
+
let r = d(v, e.enableAlternate, s?.isPrintMode);
|
|
106
|
+
p.push(k(y, r, n, b, t.colors?.title, t.axisTitle ? t.axisTitle : M(C, l), t.titleFontSize));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
if (w.length > 1) {
|
|
110
|
-
let t = e.axes?.primaryMeasure || {}, n =
|
|
111
|
-
p.push(
|
|
110
|
+
let t = e.axes?.primaryMeasure || {}, n = d(w, e.enableAlternate, s?.isPrintMode);
|
|
111
|
+
p.push(k(T, n, i.Right, x, t.colors?.title, t.axisTitle, t.titleFontSize));
|
|
112
112
|
}
|
|
113
113
|
return {
|
|
114
|
-
...
|
|
114
|
+
...n,
|
|
115
115
|
components: [
|
|
116
|
-
...
|
|
116
|
+
...n.components,
|
|
117
117
|
...f,
|
|
118
118
|
...p
|
|
119
119
|
],
|
|
120
|
-
interactions: [...
|
|
120
|
+
interactions: [...n.interactions ?? [], ...h]
|
|
121
121
|
};
|
|
122
|
-
}, he = /* @__PURE__ */ e(
|
|
122
|
+
}, he = /* @__PURE__ */ e(n()), ge = (e) => (t, n) => t.value === e ? -1 : +(n.value === e), _e = (e) => (t, n) => t.value === e ? 1 : n.value === e ? -1 : 0, J = (e, t = 0) => (n, r) => {
|
|
123
123
|
let i = e ? n[e] : n, a = e ? r[e] : r;
|
|
124
124
|
return i.value !== a.value && i.value === null ? -t : i.value !== a.value && a.value === null ? t : i.value === a.value ? 0 : i.value < a.value ? -t : t;
|
|
125
125
|
}, ve = (e) => (t, n) => {
|
|
@@ -135,41 +135,41 @@ var W = 100, G = (e, t, n) => {
|
|
|
135
135
|
"AVG"
|
|
136
136
|
].includes(t) ? t.toLowerCase() : t === "COUNT" ? "sum" : "avg";
|
|
137
137
|
}, Y = (e, t, n) => {
|
|
138
|
-
let
|
|
139
|
-
if (
|
|
140
|
-
let s =
|
|
138
|
+
let i = n?.sortingOrder ?? [], a = i.findIndex((t) => r(t.dataItem) === r(e));
|
|
139
|
+
if (a < 0) return;
|
|
140
|
+
let s = i[a], c = o(s), l = (c ? i.slice(0, a) : i).filter((e) => e.fieldType === "measure" && o(e));
|
|
141
141
|
if (s) {
|
|
142
|
-
let e,
|
|
143
|
-
n?.topN?.enabled && n.topN.showOthers && ((0, he.default)(n.topN.dimensionIdx) || n.topN.dimensionIdx === t) && (e = n.topN.othersPosition === w.First ? ge(n.topN.othersLabel?.stringLabel ?? "Others") : n.topN.othersPosition === w.Last ? _e(n.topN.othersLabel?.stringLabel ?? "Others") : void 0, e &&
|
|
144
|
-
let
|
|
142
|
+
let e, i = [];
|
|
143
|
+
n?.topN?.enabled && n.topN.showOthers && ((0, he.default)(n.topN.dimensionIdx) || n.topN.dimensionIdx === t) && (e = n.topN.othersPosition === w.First ? ge(n.topN.othersLabel?.stringLabel ?? "Others") : n.topN.othersPosition === w.Last ? _e(n.topN.othersLabel?.stringLabel ?? "Others") : void 0, e && i.push(e));
|
|
144
|
+
let a = {};
|
|
145
145
|
return l.forEach((e, t) => {
|
|
146
146
|
let n = `m${t}`;
|
|
147
|
-
|
|
148
|
-
field:
|
|
147
|
+
i.push(J(n, e.sortDirection === u.Asc ? 1 : -1)), a[n] = {
|
|
148
|
+
field: r(e.dataItem),
|
|
149
149
|
reduce: ye(e.dataItem)
|
|
150
150
|
};
|
|
151
|
-
}), c &&
|
|
152
|
-
props:
|
|
153
|
-
sort: ve(
|
|
151
|
+
}), c && i.push(J("", s.sortDirection === u.Asc ? 1 : -1)), {
|
|
152
|
+
props: a,
|
|
153
|
+
sort: ve(i)
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
}, be = (e,
|
|
157
|
-
let
|
|
158
|
-
e.coloring?.type ===
|
|
159
|
-
let b =
|
|
160
|
-
if (
|
|
161
|
-
let t = Y(
|
|
156
|
+
}, be = (e, t, n) => {
|
|
157
|
+
let i = e.dimensions.filter(o), a = e.measures.filter(o), s = i.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), l = i.filter((e) => e.role === c.HEAT_MAP_VERTICAL), u = a.filter((e) => e.role === m.HEAT_MAP_COLOR), d = a.filter((e) => e.role === m.HEAT_MAP_SIZE), f = s[0], h = l[0], g = u[0], _ = d[0], { coloring: v } = e || {}, y = v?.fieldId;
|
|
158
|
+
e.coloring?.type === p.Gradient && (y ||= r(g.dataItem)), y && ne(n, 0, { color: { field: y } });
|
|
159
|
+
let b = ae(H(e, y ?? null), t, {});
|
|
160
|
+
if (f) {
|
|
161
|
+
let t = Y(f.dataItem, 0, e.querySettings);
|
|
162
162
|
b[L.XAxisScale] = {
|
|
163
163
|
data: {
|
|
164
164
|
extract: {
|
|
165
|
-
field:
|
|
165
|
+
field: r(f.dataItem),
|
|
166
166
|
trackBy: (e) => e,
|
|
167
167
|
reduce: "first",
|
|
168
168
|
props: t?.props
|
|
169
169
|
},
|
|
170
170
|
sort: t?.sort
|
|
171
171
|
},
|
|
172
|
-
type:
|
|
172
|
+
type: F.Band
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
if (h) {
|
|
@@ -177,37 +177,39 @@ var W = 100, G = (e, t, n) => {
|
|
|
177
177
|
b[L.YAxisScale] = {
|
|
178
178
|
data: {
|
|
179
179
|
extract: {
|
|
180
|
-
field:
|
|
180
|
+
field: r(h.dataItem),
|
|
181
181
|
trackBy: (e) => e,
|
|
182
182
|
reduce: "first",
|
|
183
183
|
props: t?.props
|
|
184
184
|
},
|
|
185
185
|
sort: t?.sort
|
|
186
186
|
},
|
|
187
|
-
type:
|
|
187
|
+
type: F.Band
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
let x =
|
|
190
|
+
let x = r(g.dataItem);
|
|
191
191
|
if (b[x] = { data: { field: x } }, _) {
|
|
192
|
-
let e =
|
|
192
|
+
let e = r(_.dataItem);
|
|
193
193
|
b[e] = {
|
|
194
|
-
type:
|
|
194
|
+
type: F.Linear,
|
|
195
195
|
data: { extract: { field: e } }
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
return {
|
|
199
|
-
...
|
|
199
|
+
...n,
|
|
200
200
|
scales: b
|
|
201
201
|
};
|
|
202
|
-
}, X =
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
let
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
202
|
+
}, X = {
|
|
203
|
+
measure: "measure",
|
|
204
|
+
group: "group",
|
|
205
|
+
size: "size"
|
|
206
|
+
}, xe = (e, t, n) => {
|
|
207
|
+
let i = e.dimensions.filter(o), a = e.measures.filter(o), s = le((e.supportingMeasures ?? []).filter(o)), l = i.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), u = i.filter((e) => e.role === c.HEAT_MAP_VERTICAL), d = a.filter((e) => e.role === m.HEAT_MAP_COLOR), f = a.filter((e) => e.role === m.HEAT_MAP_SIZE);
|
|
208
|
+
if (!i.length) return n;
|
|
209
|
+
let p = l[0], h = u[0], g = d[0], _ = f[0], v = r(g?.dataItem), y = r(_?.dataItem), b = r(p?.dataItem), x = r(h?.dataItem), S = {
|
|
210
|
+
[X.measure]: { field: v },
|
|
211
|
+
[X.group]: { field: x },
|
|
212
|
+
[X.size]: _ ? { field: y } : void 0,
|
|
211
213
|
secondColorOverwrite: { field: x },
|
|
212
214
|
...s
|
|
213
215
|
};
|
|
@@ -220,15 +222,15 @@ var W = 100, G = (e, t, n) => {
|
|
|
220
222
|
}] }
|
|
221
223
|
}];
|
|
222
224
|
return {
|
|
223
|
-
...
|
|
225
|
+
...n,
|
|
224
226
|
collections: C
|
|
225
227
|
};
|
|
226
|
-
}, Se = (e,
|
|
227
|
-
let
|
|
228
|
-
|
|
229
|
-
let y = new B(e,
|
|
230
|
-
type:
|
|
231
|
-
key: `${
|
|
228
|
+
}, Se = (e, t, n, i, a, s) => {
|
|
229
|
+
let c = e.measures.filter(o), l = c.filter((e) => e.role === m.HEAT_MAP_COLOR), u = c.filter((e) => e.role === m.HEAT_MAP_SIZE), d = l[0], f = u[0], { shape: h, minSize: g, maxSize: _ } = q(e), v = _;
|
|
230
|
+
f && (v = (e) => e.resources.scale(r(f.dataItem))(e.datum.size.value) * (_ - g) + g);
|
|
231
|
+
let y = new B(e, t, a?.[0]?.itemsNotAffectedByFiltering), b = {
|
|
232
|
+
type: N.Point,
|
|
233
|
+
key: `${N.Point}-${h}`,
|
|
232
234
|
data: { collection: L.Collection },
|
|
233
235
|
settings: {
|
|
234
236
|
x: { scale: L.XAxisScale },
|
|
@@ -243,7 +245,7 @@ var W = 100, G = (e, t, n) => {
|
|
|
243
245
|
"secondColorOverwrite",
|
|
244
246
|
"color"
|
|
245
247
|
],
|
|
246
|
-
dataItemId: e.coloring?.type ===
|
|
248
|
+
dataItemId: e.coloring?.type === p.Single ? r(d?.dataItem) : null
|
|
247
249
|
}),
|
|
248
250
|
shape: h,
|
|
249
251
|
size: v
|
|
@@ -252,58 +254,58 @@ var W = 100, G = (e, t, n) => {
|
|
|
252
254
|
enabled: !0,
|
|
253
255
|
presetId: "simple-opacity"
|
|
254
256
|
},
|
|
255
|
-
brush:
|
|
257
|
+
brush: te(["", X.group], s, void 0, R.AndSubset)
|
|
256
258
|
};
|
|
257
259
|
return {
|
|
258
|
-
...
|
|
259
|
-
components: [...
|
|
260
|
+
...n,
|
|
261
|
+
components: [...n.components, b]
|
|
260
262
|
};
|
|
261
263
|
}, Z = {
|
|
262
264
|
top: 0,
|
|
263
265
|
bottom: 0,
|
|
264
266
|
left: 2,
|
|
265
267
|
right: 2
|
|
266
|
-
}, Ce = (e, t, n,
|
|
267
|
-
let
|
|
268
|
-
return
|
|
269
|
-
}, we = (e, t, n,
|
|
270
|
-
if (
|
|
271
|
-
if (
|
|
272
|
-
},
|
|
273
|
-
let i,
|
|
268
|
+
}, Ce = (e, t, n, i) => {
|
|
269
|
+
let a;
|
|
270
|
+
return r(e.dataItem) === r(n.dataItem) ? a = i?.measure : r(t.dataItem) === r(n.dataItem) && (a = i?.size), a ? a.value === null ? "-" : a.label ?? "" : "";
|
|
271
|
+
}, we = (e, t, n, i) => {
|
|
272
|
+
if (r(e.dataItem) === r(n.dataItem)) return i.measure?.value;
|
|
273
|
+
if (r(t.dataItem) === r(n.dataItem)) return i.size?.value;
|
|
274
|
+
}, Q = (e, n, r) => {
|
|
275
|
+
let i, s = e.measures.filter(o), c = s.filter((e) => e.role === m.HEAT_MAP_COLOR), l = s.filter((e) => e.role === m.HEAT_MAP_SIZE), u = c[0], d = l[0], { shape: f } = q(e), p;
|
|
274
276
|
switch (f) {
|
|
275
|
-
case
|
|
276
|
-
p =
|
|
277
|
+
case t.Circle:
|
|
278
|
+
p = P.Circle;
|
|
277
279
|
break;
|
|
278
|
-
case
|
|
279
|
-
case
|
|
280
|
-
case
|
|
281
|
-
p =
|
|
280
|
+
case t.Square:
|
|
281
|
+
case t.Rectangle:
|
|
282
|
+
case t.Bar:
|
|
283
|
+
p = P.Rect;
|
|
282
284
|
break;
|
|
283
|
-
default: p =
|
|
285
|
+
default: p = P.Path;
|
|
284
286
|
}
|
|
285
287
|
if (u?.dataLabels?.show) i = u;
|
|
286
288
|
else if (d?.dataLabels?.show) i = d;
|
|
287
289
|
else return r;
|
|
288
290
|
let h = {
|
|
289
|
-
type:
|
|
291
|
+
type: N.Labels,
|
|
290
292
|
key: "heat-map-label",
|
|
291
293
|
settings: { sources: [{
|
|
292
|
-
component: `${
|
|
294
|
+
component: `${N.Point}-${f}`,
|
|
293
295
|
selector: p,
|
|
294
296
|
strategy: {
|
|
295
297
|
type: "bar",
|
|
296
298
|
settings: {
|
|
297
299
|
direction: "right",
|
|
298
300
|
fontFamily: n.fonts.general.fontFamily,
|
|
299
|
-
fontSize:
|
|
301
|
+
fontSize: oe(i.dataLabels?.size),
|
|
300
302
|
labels: [{
|
|
301
303
|
label({ data: e, formatter: t }) {
|
|
302
304
|
if (!e) return "";
|
|
303
305
|
let n = Ce(u, d, i, e);
|
|
304
|
-
if (
|
|
306
|
+
if (a(i.formatter)) {
|
|
305
307
|
let t = we(u, d, i, e);
|
|
306
|
-
return t === null ? "-" : t === void 0 ? "" :
|
|
308
|
+
return t === null ? "-" : t === void 0 ? "" : g(i.formatter.format, i.formatter)(t, void 0, e);
|
|
307
309
|
}
|
|
308
310
|
return i.formatter && typeof t == "function" && n && n !== "-" ? t(i.formatter)(n) : n;
|
|
309
311
|
},
|
|
@@ -333,31 +335,31 @@ var W = 100, G = (e, t, n) => {
|
|
|
333
335
|
...r,
|
|
334
336
|
components: [...r?.components ?? [], h]
|
|
335
337
|
};
|
|
336
|
-
},
|
|
337
|
-
let { shape: r } = q(e), i = `${
|
|
338
|
-
return
|
|
338
|
+
}, Te = (e, t, n) => {
|
|
339
|
+
let { shape: r } = q(e), i = `${N.Point}-${r}`;
|
|
340
|
+
return A(e, t, n, {
|
|
339
341
|
filter: (e) => e.filter((e) => e.key === i),
|
|
340
342
|
placement: {
|
|
341
343
|
type: "pointer",
|
|
342
344
|
area: "target"
|
|
343
345
|
}
|
|
344
346
|
});
|
|
345
|
-
}, Ee = class extends
|
|
347
|
+
}, Ee = class extends j {
|
|
346
348
|
constructor() {
|
|
347
349
|
super([
|
|
348
350
|
xe,
|
|
349
351
|
be,
|
|
350
352
|
me,
|
|
351
353
|
Se,
|
|
352
|
-
|
|
353
|
-
Q,
|
|
354
|
+
D,
|
|
354
355
|
Te,
|
|
356
|
+
Q,
|
|
355
357
|
pe,
|
|
356
358
|
fe
|
|
357
359
|
]);
|
|
358
360
|
}
|
|
359
361
|
preCompile(e) {
|
|
360
|
-
let
|
|
362
|
+
let t = e.dimensions.filter(o), n = e.measures.filter(o), r = t.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), i = t.filter((e) => e.role === c.HEAT_MAP_VERTICAL), a = n.filter((e) => e.role === m.HEAT_MAP_COLOR), s = r[0], l = i[0], u = a[0];
|
|
361
363
|
if (!s || !l || !u) throw Error("Charts w/o horizontal or vertical dimension or color measure are not supported ATM.");
|
|
362
364
|
}
|
|
363
365
|
}, De = ({ id: e, clientX: t, clientY: n, vBackendAPI: r, ...i }) => {
|
|
@@ -368,10 +370,10 @@ var W = 100, G = (e, t, n) => {
|
|
|
368
370
|
left: o,
|
|
369
371
|
...i
|
|
370
372
|
}, { vBackendAPI: r });
|
|
371
|
-
}, $ = (e, t, n,
|
|
372
|
-
let o, s, [c, l, u, d] =
|
|
373
|
+
}, $ = (e, t, n, i, a) => {
|
|
374
|
+
let o, s, [c, l, u, d] = i, f = c.name, p = l.name, m = u.name, h = n.data.value, g = n.data.group.value, _ = n.data.measure.value;
|
|
373
375
|
if (d) {
|
|
374
|
-
let e =
|
|
376
|
+
let e = r(d);
|
|
375
377
|
o = n.data[e].value, s = d.name;
|
|
376
378
|
}
|
|
377
379
|
De({
|
|
@@ -386,15 +388,15 @@ var W = 100, G = (e, t, n) => {
|
|
|
386
388
|
yAxisName: p,
|
|
387
389
|
measureColorName: m,
|
|
388
390
|
measureSizeName: s,
|
|
389
|
-
vBackendAPI:
|
|
391
|
+
vBackendAPI: a
|
|
390
392
|
});
|
|
391
393
|
}, Oe = (e) => U({ id: "onCellLeave" }, { vBackendAPI: e }), ke = () => {
|
|
392
|
-
let e =
|
|
394
|
+
let e = b(), t = _(), n = y();
|
|
393
395
|
return (0, K.useCallback)((r, i, a, o, s) => {
|
|
394
396
|
let c;
|
|
395
397
|
switch (i) {
|
|
396
398
|
case "click":
|
|
397
|
-
r ===
|
|
399
|
+
r === N.Text ? c = ce(r, n, o, a) : s?.key && o && $("onCellClick", o, s, t, e);
|
|
398
400
|
break;
|
|
399
401
|
case "mousemove":
|
|
400
402
|
if (!o || !s) break;
|
|
@@ -406,13 +408,13 @@ var W = 100, G = (e, t, n) => {
|
|
|
406
408
|
}
|
|
407
409
|
c && e.emitEvent(c.action, c.payload);
|
|
408
410
|
}, [e, t]);
|
|
409
|
-
}, Ae =
|
|
410
|
-
let a = v(), [o] = (0, K.useState)(() => new Ee()),
|
|
411
|
-
if (!e || !
|
|
412
|
-
let
|
|
413
|
-
return
|
|
411
|
+
}, Ae = C(), je = S(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
|
|
412
|
+
let a = v(), [o] = (0, K.useState)(() => new Ee()), c = h(), u = ke();
|
|
413
|
+
if (!e || !s(e) || !r) return null;
|
|
414
|
+
let d = t || f, p = o.compile(e, d, n, r, i, l.HeatMap, a, c, u);
|
|
415
|
+
return p ? /* @__PURE__ */ (0, Ae.jsx)(ie, {
|
|
414
416
|
config: i,
|
|
415
|
-
definition:
|
|
417
|
+
definition: p,
|
|
416
418
|
size: r,
|
|
417
419
|
vSpec: e
|
|
418
420
|
}) : null;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { On as t, Qs as n, Ut as r } from "./visualization-filters-D7i6oh1Z.js";
|
|
3
|
+
import { W as i, Zt as a, ci as o, f as s, zr as c } from "./utils-DganVptf.js";
|
|
4
|
+
import "./defaults-Dtk7fg3C.js";
|
|
5
|
+
var l = /* @__PURE__ */ e(o()), u = i({
|
|
5
6
|
iframeWrapper: {
|
|
6
7
|
width: "100%",
|
|
7
8
|
height: "100%",
|
|
@@ -25,9 +26,9 @@ var l = /* @__PURE__ */ e(o()), u = a({
|
|
|
25
26
|
height: "100%"
|
|
26
27
|
}
|
|
27
28
|
}), d = c(), f = t(), p = ({ vSpec: e }) => {
|
|
28
|
-
let t =
|
|
29
|
+
let t = r((e && n(e) ? e : f).iframeSettings.url, null), i = s(), o = u(), c = a();
|
|
29
30
|
if ((0, l.useEffect)(() => {
|
|
30
|
-
|
|
31
|
+
i();
|
|
31
32
|
}, []), !t) return /* @__PURE__ */ (0, d.jsx)("div", {
|
|
32
33
|
className: o.emptyState,
|
|
33
34
|
"data-testid": "iframe-empty-container"
|