@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
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import { $i as t, Ds as n,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { Et as E, F as
|
|
7
|
-
import { t as B } from "./coloring-
|
|
2
|
+
import { $i as t, Ds as n, Gn as r, Ua as i, Us as a, Wa as o, Xa as s, da as c, fa as l, gt as u, is as d, ws as f, zi as p, zr as m } from "./visualization-filters-mVnsnvLP.js";
|
|
3
|
+
import { F as h, Jt as g, L as _, N as v, Ot as y, U as b, ei as x, jr as S, zt as C } from "./utils-DYYD4Zzf.js";
|
|
4
|
+
import { Mm as w, jm as T } from "./handlers-CMbyj5y1.js";
|
|
5
|
+
import "./logger-3lng-wOw.js";
|
|
6
|
+
import { Et as E, F as ee, Gt as D, I as te, It as ne, Lt as re, Mt as O, Pt as k, Vt as A, Wt as j, Yt as ie, _n as M, bt as N, dn as P, et as ae, gn as oe, i as se, in as ce, ln as F, nn as I, rn as le, sn as L, t as R, yt as z } from "./escobar-C4Nm3eJ7.js";
|
|
7
|
+
import { t as B } from "./coloring-B-Wa8D5P.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-Dxo7D7c6.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(
|
|
46
|
+
}, K = /* @__PURE__ */ e(x()), de = o.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 = `${M.Point}-${l}`;
|
|
52
52
|
if ((e?.enableEmitEvents ?? !1) && s) {
|
|
53
53
|
let e = ue(u, s);
|
|
54
54
|
c.push(e);
|
|
@@ -58,19 +58,19 @@ 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(m), i = r.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), a = r.filter((e) => e.role === c.HEAT_MAP_VERTICAL), o = i[0], s = a[0], [l, u] = re([{
|
|
62
62
|
showAxisTooltip: e?.axes?.dimension?.showAxisTooltip,
|
|
63
63
|
formatter: o?.formatter,
|
|
64
|
-
scale:
|
|
65
|
-
key:
|
|
66
|
-
settings: { direction:
|
|
64
|
+
scale: ce(e),
|
|
65
|
+
key: O.Dimension,
|
|
66
|
+
settings: { direction: k(e) }
|
|
67
67
|
}, {
|
|
68
68
|
showAxisTooltip: e?.axes?.secondaryDimension?.showAxisTooltip,
|
|
69
|
-
formatter:
|
|
70
|
-
scale:
|
|
71
|
-
key:
|
|
69
|
+
formatter: s?.formatter,
|
|
70
|
+
scale: L.YAxisScale,
|
|
71
|
+
key: O.DimensionSec,
|
|
72
72
|
settings: {
|
|
73
|
-
direction:
|
|
73
|
+
direction: ne(e),
|
|
74
74
|
isVerticalDimension: !0
|
|
75
75
|
}
|
|
76
76
|
}]);
|
|
@@ -79,47 +79,47 @@ var W = 100, G = (e, t, n) => {
|
|
|
79
79
|
components: [...n.components ?? [], ...l],
|
|
80
80
|
interactions: [...n.interactions ?? [], ...u]
|
|
81
81
|
};
|
|
82
|
-
}, me = (e, n,
|
|
83
|
-
let f = [],
|
|
82
|
+
}, me = (e, n, i, a, o, l, u, d) => {
|
|
83
|
+
let f = [], p = [], h = [];
|
|
84
84
|
if (d) {
|
|
85
|
-
let e =
|
|
85
|
+
let e = A(M.Text, d);
|
|
86
86
|
h.push(e);
|
|
87
87
|
}
|
|
88
|
-
let g = e.dimensions.filter((e) => e.role ===
|
|
88
|
+
let g = e.dimensions.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), _ = g.filter(m), v = e.dimensions.filter((e) => e.role === c.HEAT_MAP_VERTICAL), y = v.filter(m), b = {
|
|
89
89
|
...n.axis.dimension,
|
|
90
90
|
...n.fonts
|
|
91
91
|
}, x = {
|
|
92
92
|
...n.axis.measure,
|
|
93
93
|
...n.fonts
|
|
94
|
-
}, S = _[0], C = y[0], w = e.measures.filter((e) => e.role === t.HEAT_MAP_COLOR), T = w.filter(
|
|
94
|
+
}, S = _[0], C = y[0], w = e.measures.filter((e) => e.role === t.HEAT_MAP_COLOR), T = w.filter(m), E = {};
|
|
95
95
|
if (S) {
|
|
96
|
-
let t = e.axes?.dimension || E, n = t.secondaryAxis ?
|
|
97
|
-
if (f.push(
|
|
98
|
-
let
|
|
99
|
-
|
|
96
|
+
let t = e.axes?.dimension || E, n = t.secondaryAxis ? s.Top : s.Bottom;
|
|
97
|
+
if (f.push(j(L.XAxisScale, t, b, n, S.formatter, l)), t.showAxisName) {
|
|
98
|
+
let i = r(g, e.enableAlternate, l?.isPrintMode);
|
|
99
|
+
p.push(D(_, i, n, b, t.colors?.title, t.axisTitle ? t.axisTitle : I(S, u), 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
|
-
|
|
103
|
+
let t = e.axes?.secondaryDimension || E, n = t.secondaryAxis ? s.Right : s.Left;
|
|
104
|
+
if (f.push(j(L.YAxisScale, t, b, n, C.formatter, l)), t.showAxisName) {
|
|
105
|
+
let i = r(v, e.enableAlternate, l?.isPrintMode);
|
|
106
|
+
p.push(D(y, i, n, b, t.colors?.title, t.axisTitle ? t.axisTitle : I(C, u), t.titleFontSize));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
if (w.length > 1) {
|
|
110
|
-
let t = e.axes?.primaryMeasure || {}, n =
|
|
111
|
-
|
|
110
|
+
let t = e.axes?.primaryMeasure || {}, n = r(w, e.enableAlternate, l?.isPrintMode);
|
|
111
|
+
p.push(D(T, n, s.Right, x, t.colors?.title, t.axisTitle, t.titleFontSize));
|
|
112
112
|
}
|
|
113
113
|
return {
|
|
114
|
-
...
|
|
114
|
+
...i,
|
|
115
115
|
components: [
|
|
116
|
-
...
|
|
116
|
+
...i.components,
|
|
117
117
|
...f,
|
|
118
|
-
...
|
|
118
|
+
...p
|
|
119
119
|
],
|
|
120
|
-
interactions: [...
|
|
120
|
+
interactions: [...i.interactions ?? [], ...h]
|
|
121
121
|
};
|
|
122
|
-
}, he = /* @__PURE__ */ e(
|
|
122
|
+
}, he = /* @__PURE__ */ e(u()), 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,85 +135,85 @@ 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
|
|
138
|
+
let r = n?.sortingOrder ?? [], o = r.findIndex((t) => a(t.dataItem) === a(e));
|
|
139
139
|
if (o < 0) return;
|
|
140
|
-
let s =
|
|
140
|
+
let s = r[o], c = m(s), l = (c ? r.slice(0, o) : r).filter((e) => e.fieldType === "measure" && m(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 &&
|
|
142
|
+
let e, r = [];
|
|
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 && r.push(e));
|
|
144
144
|
let o = {};
|
|
145
|
-
return
|
|
145
|
+
return l.forEach((e, t) => {
|
|
146
146
|
let n = `m${t}`;
|
|
147
|
-
|
|
148
|
-
field:
|
|
147
|
+
r.push(J(n, e.sortDirection === i.Asc ? 1 : -1)), o[n] = {
|
|
148
|
+
field: a(e.dataItem),
|
|
149
149
|
reduce: ye(e.dataItem)
|
|
150
150
|
};
|
|
151
|
-
}),
|
|
151
|
+
}), c && r.push(J("", s.sortDirection === i.Asc ? 1 : -1)), {
|
|
152
152
|
props: o,
|
|
153
|
-
sort: ve(
|
|
153
|
+
sort: ve(r)
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
}, be = (e, r,
|
|
157
|
-
let o = e.dimensions.filter(
|
|
158
|
-
e.coloring?.type === n.Gradient && (y ||=
|
|
156
|
+
}, be = (e, r, i) => {
|
|
157
|
+
let o = e.dimensions.filter(m), s = e.measures.filter(m), l = o.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), u = o.filter((e) => e.role === c.HEAT_MAP_VERTICAL), d = s.filter((e) => e.role === t.HEAT_MAP_COLOR), f = s.filter((e) => e.role === t.HEAT_MAP_SIZE), p = l[0], h = u[0], g = d[0], _ = f[0], { coloring: v } = e || {}, y = v?.fieldId;
|
|
158
|
+
e.coloring?.type === n.Gradient && (y ||= a(g.dataItem)), y && z(i, 0, { color: { field: y } });
|
|
159
159
|
let b = E(H(e, y ?? null), r, {});
|
|
160
|
-
if (
|
|
161
|
-
let t = Y(
|
|
162
|
-
b[
|
|
160
|
+
if (p) {
|
|
161
|
+
let t = Y(p.dataItem, 0, e.querySettings);
|
|
162
|
+
b[L.XAxisScale] = {
|
|
163
163
|
data: {
|
|
164
164
|
extract: {
|
|
165
|
-
field:
|
|
165
|
+
field: a(p.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: P.Band
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
if (h) {
|
|
176
176
|
let t = Y(h.dataItem, 1, e.querySettings);
|
|
177
|
-
b[
|
|
177
|
+
b[L.YAxisScale] = {
|
|
178
178
|
data: {
|
|
179
179
|
extract: {
|
|
180
|
-
field:
|
|
180
|
+
field: a(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: P.Band
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
let x =
|
|
190
|
+
let x = a(g.dataItem);
|
|
191
191
|
if (b[x] = { data: { field: x } }, _) {
|
|
192
|
-
let e =
|
|
192
|
+
let e = a(_.dataItem);
|
|
193
193
|
b[e] = {
|
|
194
|
-
type:
|
|
194
|
+
type: P.Linear,
|
|
195
195
|
data: { extract: { field: e } }
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
return {
|
|
199
|
-
...
|
|
199
|
+
...i,
|
|
200
200
|
scales: b
|
|
201
201
|
};
|
|
202
202
|
}, X = /* @__PURE__ */ function(e) {
|
|
203
203
|
return e.measure = "measure", e.group = "group", e.size = "size", e;
|
|
204
204
|
}({}), xe = (e, n, r) => {
|
|
205
|
-
let
|
|
206
|
-
if (!
|
|
207
|
-
let
|
|
205
|
+
let i = e.dimensions.filter(m), o = e.measures.filter(m), s = te((e.supportingMeasures ?? []).filter(m)), l = i.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), u = i.filter((e) => e.role === c.HEAT_MAP_VERTICAL), d = o.filter((e) => e.role === t.HEAT_MAP_COLOR), f = o.filter((e) => e.role === t.HEAT_MAP_SIZE);
|
|
206
|
+
if (!i.length) return r;
|
|
207
|
+
let p = l[0], h = u[0], g = d[0], _ = f[0], v = a(g?.dataItem), y = a(_?.dataItem), b = a(p?.dataItem), x = a(h?.dataItem), S = {
|
|
208
208
|
measure: { field: v },
|
|
209
209
|
group: { field: x },
|
|
210
210
|
size: _ ? { field: y } : void 0,
|
|
211
211
|
secondColorOverwrite: { field: x },
|
|
212
|
-
...
|
|
212
|
+
...s
|
|
213
213
|
};
|
|
214
214
|
v && (S[v] = { field: v }), y && (S[y] = { field: y });
|
|
215
215
|
let C = [{
|
|
216
|
-
key:
|
|
216
|
+
key: L.Collection,
|
|
217
217
|
data: { extract: [{
|
|
218
218
|
field: b,
|
|
219
219
|
props: S
|
|
@@ -223,17 +223,17 @@ var W = 100, G = (e, t, n) => {
|
|
|
223
223
|
...r,
|
|
224
224
|
collections: C
|
|
225
225
|
};
|
|
226
|
-
}, Se = (e, r,
|
|
227
|
-
let l = e.measures.filter(
|
|
228
|
-
|
|
226
|
+
}, Se = (e, r, i, o, s, c) => {
|
|
227
|
+
let l = e.measures.filter(m), u = l.filter((e) => e.role === t.HEAT_MAP_COLOR), d = l.filter((e) => e.role === t.HEAT_MAP_SIZE), f = u[0], p = d[0], { shape: h, minSize: g, maxSize: _ } = q(e), v = _;
|
|
228
|
+
p && (v = (e) => e.resources.scale(a(p.dataItem))(e.datum.size.value) * (_ - g) + g);
|
|
229
229
|
let y = new B(e, r, s?.[0]?.itemsNotAffectedByFiltering), b = {
|
|
230
|
-
type:
|
|
231
|
-
key: `${
|
|
232
|
-
data: { collection:
|
|
230
|
+
type: M.Point,
|
|
231
|
+
key: `${M.Point}-${h}`,
|
|
232
|
+
data: { collection: L.Collection },
|
|
233
233
|
settings: {
|
|
234
|
-
x: { scale:
|
|
234
|
+
x: { scale: L.XAxisScale },
|
|
235
235
|
y: {
|
|
236
|
-
scale:
|
|
236
|
+
scale: L.YAxisScale,
|
|
237
237
|
ref: X.group
|
|
238
238
|
},
|
|
239
239
|
fill: y.getColorDefinition({
|
|
@@ -243,7 +243,7 @@ var W = 100, G = (e, t, n) => {
|
|
|
243
243
|
"secondColorOverwrite",
|
|
244
244
|
"color"
|
|
245
245
|
],
|
|
246
|
-
dataItemId: e.coloring?.type === n.Single ?
|
|
246
|
+
dataItemId: e.coloring?.type === n.Single ? a(f?.dataItem) : null
|
|
247
247
|
}),
|
|
248
248
|
shape: h,
|
|
249
249
|
size: v
|
|
@@ -252,11 +252,11 @@ var W = 100, G = (e, t, n) => {
|
|
|
252
252
|
enabled: !0,
|
|
253
253
|
presetId: "simple-opacity"
|
|
254
254
|
},
|
|
255
|
-
brush:
|
|
255
|
+
brush: ie(["", X.group], c, void 0, oe.AndSubset)
|
|
256
256
|
};
|
|
257
257
|
return {
|
|
258
|
-
...
|
|
259
|
-
components: [...
|
|
258
|
+
...i,
|
|
259
|
+
components: [...i.components, b]
|
|
260
260
|
};
|
|
261
261
|
}, Z = {
|
|
262
262
|
top: 0,
|
|
@@ -264,46 +264,46 @@ var W = 100, G = (e, t, n) => {
|
|
|
264
264
|
left: 2,
|
|
265
265
|
right: 2
|
|
266
266
|
}, Ce = (e, t, n, r) => {
|
|
267
|
-
let
|
|
268
|
-
return
|
|
267
|
+
let i;
|
|
268
|
+
return a(e.dataItem) === a(n.dataItem) ? i = r?.measure : a(t.dataItem) === a(n.dataItem) && (i = r?.size), i ? i.value === null ? "-" : i.label ?? "" : "";
|
|
269
269
|
}, we = (e, t, n, r) => {
|
|
270
|
-
if (
|
|
271
|
-
if (
|
|
270
|
+
if (a(e.dataItem) === a(n.dataItem)) return r.measure?.value;
|
|
271
|
+
if (a(t.dataItem) === a(n.dataItem)) return r.size?.value;
|
|
272
272
|
}, Te = (e, n, r) => {
|
|
273
|
-
let i,
|
|
273
|
+
let i, a = e.measures.filter(m), s = a.filter((e) => e.role === t.HEAT_MAP_COLOR), c = a.filter((e) => e.role === t.HEAT_MAP_SIZE), u = s[0], d = c[0], { shape: f } = q(e), p;
|
|
274
274
|
switch (f) {
|
|
275
|
-
case
|
|
276
|
-
|
|
275
|
+
case o.Circle:
|
|
276
|
+
p = F.Circle;
|
|
277
277
|
break;
|
|
278
|
-
case
|
|
279
|
-
case
|
|
280
|
-
case
|
|
281
|
-
|
|
278
|
+
case o.Square:
|
|
279
|
+
case o.Rectangle:
|
|
280
|
+
case o.Bar:
|
|
281
|
+
p = F.Rect;
|
|
282
282
|
break;
|
|
283
|
-
default:
|
|
283
|
+
default: p = F.Path;
|
|
284
284
|
}
|
|
285
285
|
if (u?.dataLabels?.show) i = u;
|
|
286
286
|
else if (d?.dataLabels?.show) i = d;
|
|
287
287
|
else return r;
|
|
288
288
|
let h = {
|
|
289
|
-
type:
|
|
289
|
+
type: M.Labels,
|
|
290
290
|
key: "heat-map-label",
|
|
291
291
|
settings: { sources: [{
|
|
292
|
-
component: `${
|
|
293
|
-
selector:
|
|
292
|
+
component: `${M.Point}-${f}`,
|
|
293
|
+
selector: p,
|
|
294
294
|
strategy: {
|
|
295
295
|
type: "bar",
|
|
296
296
|
settings: {
|
|
297
297
|
direction: "right",
|
|
298
298
|
fontFamily: n.fonts.general.fontFamily,
|
|
299
|
-
fontSize:
|
|
299
|
+
fontSize: le(i.dataLabels?.size),
|
|
300
300
|
labels: [{
|
|
301
301
|
label({ data: e, formatter: t }) {
|
|
302
302
|
if (!e) return "";
|
|
303
303
|
let n = Ce(u, d, i, e);
|
|
304
|
-
if (
|
|
304
|
+
if (l(i.formatter)) {
|
|
305
305
|
let t = we(u, d, i, e);
|
|
306
|
-
return t === null ? "-" : t === void 0 ? "" :
|
|
306
|
+
return t === null ? "-" : t === void 0 ? "" : C(i.formatter.format, i.formatter)(t, void 0, e);
|
|
307
307
|
}
|
|
308
308
|
return i.formatter && typeof t == "function" && n && n !== "-" ? t(i.formatter)(n) : n;
|
|
309
309
|
},
|
|
@@ -334,15 +334,15 @@ var W = 100, G = (e, t, n) => {
|
|
|
334
334
|
components: [...r?.components ?? [], h]
|
|
335
335
|
};
|
|
336
336
|
}, Q = (e, t, n) => {
|
|
337
|
-
let { shape: r } = q(e), i = `${
|
|
338
|
-
return
|
|
337
|
+
let { shape: r } = q(e), i = `${M.Point}-${r}`;
|
|
338
|
+
return ae(e, t, n, {
|
|
339
339
|
filter: (e) => e.filter((e) => e.key === i),
|
|
340
340
|
placement: {
|
|
341
341
|
type: "pointer",
|
|
342
342
|
area: "target"
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
|
-
}, Ee = class extends
|
|
345
|
+
}, Ee = class extends ee {
|
|
346
346
|
constructor() {
|
|
347
347
|
super([
|
|
348
348
|
xe,
|
|
@@ -357,8 +357,8 @@ var W = 100, G = (e, t, n) => {
|
|
|
357
357
|
]);
|
|
358
358
|
}
|
|
359
359
|
preCompile(e) {
|
|
360
|
-
let n = e.dimensions.filter(
|
|
361
|
-
if (!
|
|
360
|
+
let n = e.dimensions.filter(m), r = e.measures.filter(m), i = n.filter((e) => e.role === c.HEAT_MAP_HORIZONTAL), a = n.filter((e) => e.role === c.HEAT_MAP_VERTICAL), o = r.filter((e) => e.role === t.HEAT_MAP_COLOR), s = i[0], l = a[0], u = o[0];
|
|
361
|
+
if (!s || !l || !u) throw Error("Charts w/o horizontal or vertical dimension or color measure are not supported ATM.");
|
|
362
362
|
}
|
|
363
363
|
}, De = ({ id: e, clientX: t, clientY: n, vBackendAPI: r, ...i }) => {
|
|
364
364
|
let { top: a, left: o } = r.daedalus.convertCoordinatesToContainerPosition(t, n);
|
|
@@ -368,10 +368,10 @@ var W = 100, G = (e, t, n) => {
|
|
|
368
368
|
left: o,
|
|
369
369
|
...i
|
|
370
370
|
}, { vBackendAPI: r });
|
|
371
|
-
}, $ = (e, t, n, r,
|
|
371
|
+
}, $ = (e, t, n, r, i) => {
|
|
372
372
|
let o, s, [c, l, u, d] = r, f = c.name, p = l.name, m = u.name, h = n.data.value, g = n.data.group.value, _ = n.data.measure.value;
|
|
373
373
|
if (d) {
|
|
374
|
-
let e =
|
|
374
|
+
let e = a(d);
|
|
375
375
|
o = n.data[e].value, s = d.name;
|
|
376
376
|
}
|
|
377
377
|
De({
|
|
@@ -386,15 +386,15 @@ var W = 100, G = (e, t, n) => {
|
|
|
386
386
|
yAxisName: p,
|
|
387
387
|
measureColorName: m,
|
|
388
388
|
measureSizeName: s,
|
|
389
|
-
vBackendAPI:
|
|
389
|
+
vBackendAPI: i
|
|
390
390
|
});
|
|
391
391
|
}, Oe = (e) => U({ id: "onCellLeave" }, { vBackendAPI: e }), ke = () => {
|
|
392
|
-
let e =
|
|
392
|
+
let e = g(), t = _(), n = b();
|
|
393
393
|
return (0, K.useCallback)((r, i, a, o, s) => {
|
|
394
394
|
let c;
|
|
395
395
|
switch (i) {
|
|
396
396
|
case "click":
|
|
397
|
-
r ===
|
|
397
|
+
r === M.Text ? c = R(r, n, o, a) : s?.key && o && $("onCellClick", o, s, t, e);
|
|
398
398
|
break;
|
|
399
399
|
case "mousemove":
|
|
400
400
|
if (!o || !s) break;
|
|
@@ -406,13 +406,13 @@ var W = 100, G = (e, t, n) => {
|
|
|
406
406
|
}
|
|
407
407
|
c && e.emitEvent(c.action, c.payload);
|
|
408
408
|
}, [e, t]);
|
|
409
|
-
}, Ae =
|
|
410
|
-
let a = v(), [o] = (0, K.useState)(() => new Ee()), s =
|
|
411
|
-
if (!e || !
|
|
412
|
-
let
|
|
413
|
-
return
|
|
409
|
+
}, Ae = S(), je = y(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
|
|
410
|
+
let a = v(), [o] = (0, K.useState)(() => new Ee()), s = h(), c = ke();
|
|
411
|
+
if (!e || !d(e) || !r) return null;
|
|
412
|
+
let l = t || p, u = o.compile(e, l, n, r, i, f.HeatMap, a, s, c);
|
|
413
|
+
return u ? /* @__PURE__ */ (0, Ae.jsx)(se, {
|
|
414
414
|
config: i,
|
|
415
|
-
definition:
|
|
415
|
+
definition: u,
|
|
416
416
|
size: r,
|
|
417
417
|
vSpec: e
|
|
418
418
|
}) : null;
|