@astrato-io/visualizations 0.9.0 → 0.10.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 +8 -4
- package/THIRD_PARTY_NOTICES.md +163 -14
- package/VISUALIZATION_DEFINITIONS.md +319 -32
- package/chunks/{Button-5CxPEACP.js → Button-CCF851ea.js} +4 -4
- package/chunks/{CircularProgress-DFS-LQb7.js → CircularProgress-yupH6YWs.js} +39 -39
- package/chunks/FieldTypeIcon-D_MzsdfY.js +22 -0
- package/chunks/{LinearProgress-CjIQfkNA.js → LinearProgress-CyFjN4px.js} +9 -9
- package/chunks/{MenuOption-Cb7B7x6z.js → MenuOption-CQpT79AP.js} +143 -142
- package/chunks/{Title-CtFw1bVg.js → Title-C-p4ZarD.js} +22 -22
- package/chunks/_createAggregator-BF4qG9XK.js +50 -0
- package/chunks/{app-filter-bar.compiler-B9775gLJ.js → app-filter-bar.compiler-8fxCo2q7.js} +10 -10
- package/chunks/bar-layout-DStC-GNV.js +9 -0
- package/chunks/{bar.compiler-B7wlH_Ro.js → bar.compiler-CQAu8KL8.js} +102 -84
- package/chunks/{builder-Dxo7D7c6.js → builder-CScg1TOS.js} +71 -38
- package/chunks/color-rules-DYJL4fIW.js +15 -0
- package/chunks/color-settings-DJFoFTip.js +5 -0
- package/chunks/{coloring-B-Wa8D5P.js → coloring-9jU3s_-p.js} +41 -41
- package/chunks/createSimplePaletteValueFilter-C4hZpCdn.js +2005 -0
- package/chunks/defaults-cyNhn37t.js +3 -0
- package/chunks/{definitions-DNpzD9tY.js → definitions-C4grxhye.js} +613 -401
- package/chunks/{escobar-C4Nm3eJ7.js → escobar-CjirINHP.js} +5326 -5079
- package/chunks/{extend-preset-BVKFtoe-.js → extend-preset-D-l9u_we.js} +974 -909
- package/chunks/{filter.compiler-BlS3zoy_.js → filter.compiler-lji2Acgn.js} +10 -10
- package/chunks/{filtering-CGuLpg7u.js → filtering-C1zakrrX.js} +385 -429
- package/chunks/handlers-ZviIUC-j.js +15387 -0
- package/chunks/{icon-picker-styles-DYQgVEKG.js → icon-picker-styles-Bj80ZUBK.js} +11 -11
- package/chunks/isEqual-Ch9OEye3.js +16 -0
- package/chunks/{isFocusVisible-B1_z03UT.js → isFocusVisible-CgMP0qkR.js} +1 -1
- package/chunks/label-format-type-C46pzgx7.js +17 -0
- package/chunks/{line.compiler-Bo9i9qag.js → line.compiler-De5fiKuR.js} +9 -9
- package/chunks/{logger-3lng-wOw.js → logger-CKRjhSHQ.js} +71 -64
- package/chunks/map.compiler-CKzorLgK.js +345 -0
- package/chunks/{metadata-Fmx1swpK.js → metadata-Bb9pTXrq.js} +1 -1
- package/chunks/{number.compiler-CdLd5aGW.js → number.compiler-CaTmJkmi.js} +7 -7
- package/chunks/operations-DZoY50VX.js +31297 -0
- package/chunks/{range-CzO4isKK.js → range-D1BTmFMp.js} +2 -2
- package/chunks/{react-dom-BwZT0N3F.js → react-dom-Dgv2azN2.js} +70 -70
- package/chunks/{render-wrappers-CAuvgMxi.js → render-wrappers-_P3xwu5A.js} +1 -1
- package/chunks/{requirements-CYpVh65U.js → requirements-NHNrR8Ie.js} +59 -57
- package/chunks/shared-UitWpq1J.js +1331 -0
- package/chunks/{standalone-CoQxJ6ov.js → standalone-B0U6c3su.js} +804 -804
- package/chunks/{standalone-C6XDHYAM.js → standalone-BBu90BhK.js} +109 -109
- package/chunks/standalone-BEekPuA12.js +357 -0
- package/chunks/{standalone-CPUiiWNP.js → standalone-BOzHA_d4.js} +41 -41
- package/chunks/standalone-BR2JuRIC.js +422 -0
- package/chunks/{standalone-DuwTOBXH.js → standalone-BapqaniK.js} +592 -592
- package/chunks/{standalone-DWPfdP0A.js → standalone-Bnnr87pc.js} +523 -523
- package/chunks/standalone-BwJqDj2Z.js +396 -0
- package/chunks/{standalone-LFVgLhia.js → standalone-ByKKqT5L.js} +266 -258
- package/chunks/{standalone-BDrQMxLi.js → standalone-CRdDZYeM.js} +1788 -1004
- package/chunks/standalone-CRfDOO1x.js +287 -0
- package/chunks/{standalone-BvWdpUL3.js → standalone-CVknVdUC.js} +21 -18
- package/chunks/standalone-CbPk8bKn.js +580 -0
- package/chunks/{standalone-r4ObFvys.js → standalone-Ck63MZzj.js} +218 -216
- package/chunks/{standalone-Cu73fzSr.js → standalone-DCFY1MAV.js} +6040 -5820
- package/chunks/{standalone-CiaaibTa.js → standalone-DZDGX3aa.js} +174 -174
- package/chunks/standalone-DhfgeJIk.js +1012 -0
- package/chunks/standalone-DibjA73M.js +6 -0
- package/chunks/{standalone-CXniic5x.js → standalone-DtBk_iUz.js} +6 -5
- package/chunks/standalone-DxBAyqAu.js +772 -0
- package/chunks/standalone-KMQPsNsq.js +2 -0
- package/chunks/standalone-MBLSvsrY.js +2 -0
- package/chunks/standalone-U0WJwFlG.js +354 -0
- package/chunks/{standalone-CNkHsynO.js → standalone-swGs70tD.js} +54 -56
- package/chunks/standalone-wgFAVnnm.js +355 -0
- package/chunks/standalone-xGV0dqPV.js +689 -0
- package/chunks/{table.compiler-C1qjqXaT.js → table.compiler-OWSx5MOq.js} +4 -4
- package/chunks/{useFieldName-mWrD_uk_.js → useFieldName-B8iCYyw1.js} +1 -1
- package/chunks/{utils-DYYD4Zzf.js → utils-3Igg6xmO.js} +4740 -4737
- package/chunks/{view-7fH6mGmY.js → view-DdMLZySj.js} +1988 -1632
- package/chunks/{visualization-filters-mVnsnvLP.js → visualization-filters-CzvFHE6M.js} +3158 -2417
- package/chunks/{with-html-element-B0Clt4jY.js → with-html-element-DOfkR3C1.js} +3353 -3160
- 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 +262 -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 +507 -459
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +72 -67
- package/src/definitions/index.d.ts +1 -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 +188 -2
- 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 +7 -2
- 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 +45 -41
- 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-5DnapeHH.js +0 -420
- package/chunks/standalone-B4jrf4KE.js +0 -354
- package/chunks/standalone-B6s_xG2u.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-DBeXQrwH.js +0 -468
- package/chunks/standalone-DMCwtebn.js +0 -396
- 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, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import { F as
|
|
4
|
-
import {
|
|
5
|
-
import "./logger-
|
|
6
|
-
import {
|
|
7
|
-
import { _ as F } from "./MenuOption-
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { a as
|
|
2
|
+
import { Cs as n, Da as r, Fo as i, Pc as a, Qr as o, Ta as s, ba as c, cl as l, hc as u, in as d, oa as f, pc as p, rr as m, to as h, va as g, vc as _, x as v, y } from "./visualization-filters-CzvFHE6M.js";
|
|
3
|
+
import { F as b, N as x, ci as S, jt as C, s as w, zr as T } from "./utils-3Igg6xmO.js";
|
|
4
|
+
import { $g as E, e_ as D } from "./handlers-ZviIUC-j.js";
|
|
5
|
+
import "./logger-CKRjhSHQ.js";
|
|
6
|
+
import { Dt as ee, I as te, L as ne, St as re, _n as O, at as ie, ct as ae, dn as k, gn as oe, hn as A, i as se, in as j, kt as ce, ln as M, n as le, nn as ue, nt as de, qt as fe, tn as pe, tt as me, un as N, vn as P } from "./escobar-CjirINHP.js";
|
|
7
|
+
import { _ as F } from "./MenuOption-CQpT79AP.js";
|
|
8
|
+
import { t as he } from "./coloring-9jU3s_-p.js";
|
|
9
|
+
import { t as ge } from "./set-coloring-datafield-B3uIS1Pe.js";
|
|
10
|
+
import { a as _e, n as ve } from "./accessors-DemrDevR.js";
|
|
11
11
|
function I() {
|
|
12
12
|
return 0;
|
|
13
13
|
}
|
|
@@ -16,17 +16,17 @@ function L(e) {
|
|
|
16
16
|
return e;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function ye(e) {
|
|
20
20
|
e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function be(e, t, n, r, i) {
|
|
23
23
|
for (var a = e.children, o, s = -1, c = a.length, l = e.value && (r - t) / e.value; ++s < c;) o = a[s], o.y0 = n, o.y1 = i, o.x0 = t, o.x1 = t += o.value * l;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function xe(e, t, n, r, i) {
|
|
26
26
|
for (var a = e.children, o, s = -1, c = a.length, l = e.value && (i - n) / e.value; ++s < c;) o = a[s], o.x0 = t, o.x1 = r, o.y0 = n, o.y1 = n += o.value * l;
|
|
27
27
|
}
|
|
28
|
-
var
|
|
29
|
-
function
|
|
28
|
+
var Se = (1 + Math.sqrt(5)) / 2;
|
|
29
|
+
function Ce(e, t, n, r, i, a) {
|
|
30
30
|
for (var o = [], s = t.children, c, l, u = 0, d = 0, f = s.length, p, m, h = t.value, g, _, v, y, b, x, S; u < f;) {
|
|
31
31
|
p = i - n, m = a - r;
|
|
32
32
|
do
|
|
@@ -43,22 +43,22 @@ function Se(e, t, n, r, i, a) {
|
|
|
43
43
|
value: g,
|
|
44
44
|
dice: p < m,
|
|
45
45
|
children: s.slice(u, d)
|
|
46
|
-
}), c.dice ?
|
|
46
|
+
}), c.dice ? be(c, n, r, i, h ? r += m * g / h : a) : xe(c, n, r, h ? n += p * g / h : i, a), h -= g, u = d;
|
|
47
47
|
}
|
|
48
48
|
return o;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
50
|
+
var we = (function e(t) {
|
|
51
51
|
function n(e, n, r, i, a) {
|
|
52
|
-
|
|
52
|
+
Ce(t, e, n, r, i, a);
|
|
53
53
|
}
|
|
54
54
|
return n.ratio = function(t) {
|
|
55
55
|
return e((t = +t) > 1 ? t : 1);
|
|
56
56
|
}, n;
|
|
57
|
-
})(
|
|
58
|
-
function
|
|
59
|
-
var e =
|
|
57
|
+
})(Se);
|
|
58
|
+
function Te() {
|
|
59
|
+
var e = we, t = !1, n = 1, r = 1, i = [0], a = I, o = I, s = I, c = I, l = I;
|
|
60
60
|
function u(e) {
|
|
61
|
-
return e.x0 = e.y0 = 0, e.x1 = n, e.y1 = r, e.eachBefore(d), i = [0], t && e.eachBefore(
|
|
61
|
+
return e.x0 = e.y0 = 0, e.x1 = n, e.y1 = r, e.eachBefore(d), i = [0], t && e.eachBefore(ye), e;
|
|
62
62
|
}
|
|
63
63
|
function d(t) {
|
|
64
64
|
var n = i[t.depth], r = t.x0 + n, u = t.y0 + n, d = t.x1 - n, f = t.y1 - n;
|
|
@@ -69,7 +69,7 @@ function we() {
|
|
|
69
69
|
}, u.size = function(e) {
|
|
70
70
|
return arguments.length ? (n = +e[0], r = +e[1], u) : [n, r];
|
|
71
71
|
}, u.tile = function(t) {
|
|
72
|
-
return arguments.length ? (e =
|
|
72
|
+
return arguments.length ? (e = ve(t), u) : e;
|
|
73
73
|
}, u.padding = function(e) {
|
|
74
74
|
return arguments.length ? u.paddingInner(e).paddingOuter(e) : u.paddingInner();
|
|
75
75
|
}, u.paddingInner = function(e) {
|
|
@@ -86,35 +86,37 @@ function we() {
|
|
|
86
86
|
return arguments.length ? (l = typeof e == "function" ? e : L(+e), u) : l;
|
|
87
87
|
}, u;
|
|
88
88
|
}
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
var Ee = /* @__PURE__ */ e(S()), R = {
|
|
90
|
+
cells: "key-cells",
|
|
91
|
+
labels: "key-labels",
|
|
92
|
+
selection: "key-selection"
|
|
93
|
+
}, z = {
|
|
94
|
+
CellValue: "cellValue",
|
|
95
|
+
Color: "color"
|
|
96
|
+
}, B = { MeasureFormatter: "total" }, V = {
|
|
97
|
+
Leaf: "leaf",
|
|
98
|
+
Header: "header"
|
|
99
|
+
}, De = (e, t, n, r, i, s, c) => {
|
|
100
|
+
let l = e.measures.filter(o), u = (e.supportingMeasures ?? []).filter((e) => o(e)), d = a(l[0].dataItem), f = ne(u), p = e.dimensions.filter(o).map((e) => a(e.dataItem)), m = p[p.length - 1], h = p.slice(0, p.length - 1), g = {};
|
|
101
|
+
h.forEach((e, t) => {
|
|
102
|
+
g[`dim${t}`] = { field: e };
|
|
101
103
|
});
|
|
102
|
-
let
|
|
103
|
-
field:
|
|
104
|
+
let _ = [{
|
|
105
|
+
field: m,
|
|
104
106
|
props: {
|
|
105
|
-
[z.CellValue]: { field:
|
|
106
|
-
...
|
|
107
|
-
[
|
|
108
|
-
...
|
|
107
|
+
[z.CellValue]: { field: d },
|
|
108
|
+
...g,
|
|
109
|
+
[d]: { field: d },
|
|
110
|
+
...f
|
|
109
111
|
}
|
|
110
|
-
}],
|
|
111
|
-
|
|
112
|
-
...
|
|
113
|
-
[z.Color]: { field:
|
|
112
|
+
}], v = e.coloring ? ce(e, c) : null;
|
|
113
|
+
v && (_[0].props = {
|
|
114
|
+
..._[0].props,
|
|
115
|
+
[z.Color]: { field: v }
|
|
114
116
|
});
|
|
115
117
|
let y = [{
|
|
116
118
|
key: "coll",
|
|
117
|
-
data: { extract: [...
|
|
119
|
+
data: { extract: [..._] }
|
|
118
120
|
}];
|
|
119
121
|
return {
|
|
120
122
|
...n,
|
|
@@ -124,8 +126,8 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
124
126
|
format: ""
|
|
125
127
|
} }
|
|
126
128
|
};
|
|
127
|
-
}, H = "treemap-alternates-switcher", U = "treemap-alternates-switcher",
|
|
128
|
-
let i = n ?
|
|
129
|
+
}, H = "treemap-alternates-switcher", U = "treemap-alternates-switcher", Oe = new F(M.fontLight), ke = new F(M.fontDark), Ae = (e) => d(e) || e.label || e.dataItem?.name || "Field", je = (e, t, n, r) => {
|
|
130
|
+
let i = n ? a(n.dataItem) : void 0;
|
|
129
131
|
return {
|
|
130
132
|
type: "native",
|
|
131
133
|
key: `${U}-interaction`,
|
|
@@ -141,131 +143,131 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
141
143
|
propagation: "stop"
|
|
142
144
|
}).find((e) => e.data?.target === "measure" || e.data?.target === "dimension");
|
|
143
145
|
if (c?.data?.target === "measure" && n && i) {
|
|
144
|
-
r(
|
|
145
|
-
dataItemType:
|
|
146
|
+
r(P.Text, "click", `text-${i}`, a, c, {
|
|
147
|
+
dataItemType: l.Measure,
|
|
146
148
|
dataItemRole: n.role
|
|
147
149
|
});
|
|
148
150
|
return;
|
|
149
151
|
}
|
|
150
|
-
c?.data?.target === "dimension" && e && r(
|
|
151
|
-
dataItemType:
|
|
152
|
+
c?.data?.target === "dimension" && e && r(P.Text, "click", `text-${e}`, a, c, {
|
|
153
|
+
dataItemType: l.Dimension,
|
|
152
154
|
dataItemRole: t
|
|
153
155
|
});
|
|
154
156
|
} }
|
|
155
157
|
};
|
|
156
|
-
},
|
|
157
|
-
let f = e.dimensions.filter(
|
|
158
|
-
if (!
|
|
159
|
-
let
|
|
160
|
-
if (!
|
|
161
|
-
let b =
|
|
158
|
+
}, Me = (e, t, n, r, s, c = {}, u, d) => {
|
|
159
|
+
let f = e.dimensions.filter(o), p = e.measures.filter(o), h = f[0], g = p[0], _ = h ? a(h.dataItem) : void 0;
|
|
160
|
+
if (!h && !g) return n;
|
|
161
|
+
let v = m(e.dimensions, e.enableAlternate, c.isPrintMode), y = m(e.measures, e.enableAlternate, c.isPrintMode);
|
|
162
|
+
if (!v && !y) return n;
|
|
163
|
+
let b = c?.isPrintMode ?? !1, x = v ? f.map((e) => Ae(e)).join(", ") : void 0, S = y && g ? Ae(g) : void 0, C = e.treemapSettings.branchColor ?? "rgba(150, 150, 150, 0.3)", w = new F(C).betterContrast(new F(t.fonts.general.color), Oe, ke).rgb(), T = {
|
|
162
164
|
type: H,
|
|
163
165
|
key: U,
|
|
164
|
-
dimensionDataItemType:
|
|
165
|
-
dimensionDataItemRole:
|
|
166
|
-
measureDataItemType:
|
|
167
|
-
measureDataItemRole:
|
|
166
|
+
dimensionDataItemType: _ ? l.Dimension : void 0,
|
|
167
|
+
dimensionDataItemRole: h?.role,
|
|
168
|
+
measureDataItemType: g ? l.Measure : void 0,
|
|
169
|
+
measureDataItemRole: g?.role,
|
|
168
170
|
layout: {
|
|
169
|
-
dock:
|
|
171
|
+
dock: i.Bottom,
|
|
170
172
|
displayOrder: 0
|
|
171
173
|
},
|
|
172
174
|
settings: {
|
|
173
|
-
dimensionLabel: x ?
|
|
174
|
-
measureLabel: S ?
|
|
175
|
+
dimensionLabel: x ? fe(x) : void 0,
|
|
176
|
+
measureLabel: S ? fe(S) : void 0,
|
|
175
177
|
backgroundColor: C,
|
|
176
178
|
fontFamily: t.fonts.general.fontFamily ?? void 0,
|
|
177
|
-
fontSize: `${
|
|
179
|
+
fontSize: `${M.fieldTitle.fontSize}px`,
|
|
178
180
|
color: w,
|
|
179
181
|
paddingLeft: 5,
|
|
180
182
|
paddingRight: 5,
|
|
181
183
|
paddingVertical: 5,
|
|
182
184
|
labelGap: 12
|
|
183
185
|
}
|
|
184
|
-
}, E =
|
|
186
|
+
}, E = d && !b ? [je(_, h?.role, g, d)] : [];
|
|
185
187
|
return {
|
|
186
188
|
...n,
|
|
187
189
|
components: [...n.components, T],
|
|
188
190
|
interactions: n.interactions ? [...n.interactions, ...E] : [...E]
|
|
189
191
|
};
|
|
190
|
-
},
|
|
191
|
-
var n =
|
|
192
|
+
}, Ne = /* @__PURE__ */ t(((e, t) => {
|
|
193
|
+
var n = v(), r = c();
|
|
192
194
|
function i(e, t, a, o, s, c) {
|
|
193
195
|
return r(e) && r(t) && (c.set(t, e), n(e, t, void 0, i, c), c.delete(t)), e;
|
|
194
196
|
}
|
|
195
197
|
t.exports = i;
|
|
196
|
-
})),
|
|
197
|
-
var
|
|
198
|
-
t.exports =
|
|
199
|
-
return e.push(void 0,
|
|
198
|
+
})), W = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
199
|
+
var n = s(), r = g(), i = Ne(), a = y();
|
|
200
|
+
t.exports = r(function(e) {
|
|
201
|
+
return e.push(void 0, i), n(a, void 0, e);
|
|
200
202
|
});
|
|
201
|
-
})))()),
|
|
203
|
+
})))()), Pe = () => ({
|
|
202
204
|
trigger: [{
|
|
203
|
-
on:
|
|
204
|
-
action:
|
|
205
|
+
on: oe.Tap,
|
|
206
|
+
action: A.Toggle,
|
|
205
207
|
globalPropagation: "stop",
|
|
206
208
|
propagation: "stop",
|
|
207
|
-
contexts: [
|
|
209
|
+
contexts: [k.Selection]
|
|
208
210
|
}, {
|
|
209
|
-
on:
|
|
210
|
-
action:
|
|
211
|
+
on: oe.Over,
|
|
212
|
+
action: A.Set,
|
|
211
213
|
globalPropagation: "stop",
|
|
212
214
|
propagation: "stop",
|
|
213
|
-
contexts: [
|
|
215
|
+
contexts: [k.Highlight]
|
|
214
216
|
}],
|
|
215
217
|
consume: [{
|
|
216
|
-
context:
|
|
218
|
+
context: k.Selection,
|
|
217
219
|
data: [""],
|
|
218
|
-
mode:
|
|
220
|
+
mode: O.Or,
|
|
219
221
|
style: { inactive: { fill: (e) => {
|
|
220
222
|
let { fill: t } = e;
|
|
221
|
-
return !t || t === "none" || t === "transparent" ? t ?? "none" :
|
|
223
|
+
return !t || t === "none" || t === "transparent" ? t ?? "none" : pe(ue(t), .25);
|
|
222
224
|
} } }
|
|
223
225
|
}]
|
|
224
|
-
}),
|
|
225
|
-
let
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
}), Fe = (e, t, r, i, s, c = {}) => {
|
|
227
|
+
let l = e.dimensions.filter(o), u = e.measures.filter(o).map((e) => a(e.dataItem)), d = new he(e, t, s?.[0]?.itemsNotAffectedByFiltering), f = [d.MAIN_FIELD];
|
|
228
|
+
l.slice(0, l.length - 1).forEach((e, t) => {
|
|
229
|
+
f.push(`dim${t}`);
|
|
228
230
|
});
|
|
229
|
-
let { labeling:
|
|
231
|
+
let { labeling: p } = e.treemapSettings, m = (0, W.default)({}, p?.header, D.labeling.header), h = (0, W.default)({}, p?.leaf, D.labeling.leaf), g = {
|
|
230
232
|
key: R.cells,
|
|
231
|
-
type:
|
|
233
|
+
type: P.Treemap,
|
|
232
234
|
data: { collection: "coll" },
|
|
233
235
|
settings: {
|
|
234
|
-
numDimensions:
|
|
236
|
+
numDimensions: l.length || 0,
|
|
235
237
|
cellPadding: e.treemapSettings.cellPadding,
|
|
236
|
-
cellRadius: e.treemapSettings.cellRadius,
|
|
237
|
-
cellOrder: e.treemapSettings.cellOrder,
|
|
238
|
-
branchColor: e.treemapSettings.branchColor ?? void 0,
|
|
238
|
+
...n({ cellRadius: e.treemapSettings.cellRadius }),
|
|
239
|
+
...n({ cellOrder: e.treemapSettings.cellOrder }),
|
|
240
|
+
...n({ branchColor: e.treemapSettings.branchColor ?? void 0 }),
|
|
239
241
|
headerLabels: {
|
|
240
|
-
show:
|
|
241
|
-
numLevels:
|
|
242
|
-
fontSize:
|
|
242
|
+
show: m.show,
|
|
243
|
+
numLevels: m.numLevels,
|
|
244
|
+
fontSize: j(m.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax)
|
|
243
245
|
},
|
|
244
246
|
leafLabels: {
|
|
245
|
-
show:
|
|
246
|
-
fontSize:
|
|
247
|
-
showDimension:
|
|
248
|
-
showMeasure:
|
|
249
|
-
dynamicFontSizeEnabled:
|
|
247
|
+
show: h.show,
|
|
248
|
+
fontSize: j(h.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax),
|
|
249
|
+
showDimension: h.showDimensionValue,
|
|
250
|
+
showMeasure: h.showMeasureValue,
|
|
251
|
+
dynamicFontSizeEnabled: h.dynamicFontSizeEnabled
|
|
250
252
|
},
|
|
251
|
-
leaf: { fill:
|
|
253
|
+
leaf: { fill: d.getColorDefinition({
|
|
252
254
|
ref: z.Color,
|
|
253
|
-
dataItemId: e.coloring?.type ===
|
|
254
|
-
overwriteSources:
|
|
255
|
+
dataItemId: e.coloring?.type === _.Single ? u[0] : void 0,
|
|
256
|
+
overwriteSources: f
|
|
255
257
|
}) }
|
|
256
258
|
},
|
|
257
|
-
brush:
|
|
259
|
+
brush: c.disable?.brushing === !0 ? void 0 : Pe(),
|
|
258
260
|
animations: {
|
|
259
261
|
presetId: "simple-opacity",
|
|
260
262
|
enabled: !0
|
|
261
263
|
}
|
|
262
264
|
};
|
|
263
265
|
return {
|
|
264
|
-
...
|
|
265
|
-
components: [...
|
|
266
|
+
...r,
|
|
267
|
+
components: [...r.components, g]
|
|
266
268
|
};
|
|
267
|
-
},
|
|
268
|
-
let r = new F(n.fonts.general.color), { showDimensionValue: i, showMeasureValue: a, fontSize: o, dynamicFontSizeEnabled: s, show: c } = t.leaf, l = s ? ({ node: e }) =>
|
|
269
|
+
}, G = new F(M.fontLight), K = new F(M.fontDark), q = (e) => e.desc, Ie = (e, t, n) => {
|
|
270
|
+
let r = new F(n.fonts.general.color), { showDimensionValue: i, showMeasureValue: a, fontSize: o, dynamicFontSizeEnabled: s, show: c } = t.leaf, l = s ? ({ node: e }) => q(e).dynamicFontSize ?? void 0 : j(o, void 0, E.labelFontSizeMin, E.labelFontSizeMax);
|
|
269
271
|
return {
|
|
270
272
|
component: R.cells,
|
|
271
273
|
selector: e,
|
|
@@ -281,33 +283,33 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
281
283
|
return e.attrs?.id;
|
|
282
284
|
},
|
|
283
285
|
fill({ node: e }) {
|
|
284
|
-
return new F(
|
|
286
|
+
return new F(q(e).background).betterContrast(r, G, K).rgb();
|
|
285
287
|
},
|
|
286
288
|
linkData({ node: e }) {
|
|
287
289
|
return e.data;
|
|
288
290
|
},
|
|
289
291
|
label({ node: e }) {
|
|
290
|
-
return
|
|
292
|
+
return q(e)?.label;
|
|
291
293
|
}
|
|
292
294
|
} : null, a && c !== !1 ? {
|
|
293
295
|
id({ node: e }) {
|
|
294
296
|
return `${e.attrs?.id}::value`;
|
|
295
297
|
},
|
|
296
298
|
fill({ node: e }) {
|
|
297
|
-
return new F(
|
|
299
|
+
return new F(q(e).background).betterContrast(r, G, K).rgb();
|
|
298
300
|
},
|
|
299
301
|
linkData({ node: e }) {
|
|
300
302
|
return e.data;
|
|
301
303
|
},
|
|
302
304
|
label({ node: e, formatter: t }) {
|
|
303
|
-
return t(B.MeasureFormatter)(
|
|
305
|
+
return t(B.MeasureFormatter)(q(e)?.total, void 0, e.data);
|
|
304
306
|
}
|
|
305
307
|
} : null].filter((e) => e !== null)
|
|
306
308
|
}
|
|
307
309
|
}
|
|
308
310
|
};
|
|
309
|
-
},
|
|
310
|
-
let r = new F(n.fonts.general.color), i =
|
|
311
|
+
}, J = 128, Le = (e, t, n) => {
|
|
312
|
+
let r = new F(n.fonts.general.color), i = j(t.header.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax), { showDimensionValue: a, showMeasureValue: o } = t.header;
|
|
311
313
|
return {
|
|
312
314
|
component: R.cells,
|
|
313
315
|
selector: e,
|
|
@@ -323,28 +325,28 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
323
325
|
return e.attrs?.id;
|
|
324
326
|
},
|
|
325
327
|
fill({ node: e }) {
|
|
326
|
-
return new F(
|
|
328
|
+
return new F(q(e).background).betterContrast(r, G, K).rgb();
|
|
327
329
|
},
|
|
328
330
|
linkData({ node: e }) {
|
|
329
331
|
return e.data;
|
|
330
332
|
},
|
|
331
333
|
label({ node: e, formatter: t }) {
|
|
332
|
-
let n =
|
|
333
|
-
return [a ? n?.label?.length >
|
|
334
|
+
let n = q(e), r = o ? t(B.MeasureFormatter)(n?.total) : void 0;
|
|
335
|
+
return [a ? n?.label?.length > J - 1 ? `${n?.label?.substring(0, J - 1).replace(/\s+$/, "")}…` : n?.label : void 0, r].filter(Boolean).join(": ");
|
|
334
336
|
}
|
|
335
337
|
}]
|
|
336
338
|
}
|
|
337
339
|
}
|
|
338
340
|
};
|
|
339
|
-
},
|
|
340
|
-
let o = (0,
|
|
341
|
-
type:
|
|
341
|
+
}, Re = (e, t, n, r, i, a = {}) => {
|
|
342
|
+
let o = (0, W.default)({}, e.treemapSettings?.labeling, D.labeling), s = {
|
|
343
|
+
type: P.Labels,
|
|
342
344
|
key: R.labels,
|
|
343
345
|
layout: { displayOrder: 2 },
|
|
344
|
-
settings: { sources: [
|
|
346
|
+
settings: { sources: [Ie(`.${V.Leaf}`, o, t), Le(`.${V.Header}`, o, t)] },
|
|
345
347
|
style: { label: "$label" },
|
|
346
348
|
brush: a.disable?.brushing === !0 ? void 0 : { consume: [{
|
|
347
|
-
context:
|
|
349
|
+
context: k.Selection,
|
|
348
350
|
data: [""],
|
|
349
351
|
style: { inactive: { opacity: .3 } }
|
|
350
352
|
}] },
|
|
@@ -357,27 +359,27 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
357
359
|
...n,
|
|
358
360
|
components: [...n.components, s]
|
|
359
361
|
};
|
|
360
|
-
},
|
|
361
|
-
context:
|
|
362
|
+
}, ze = () => ({ consume: [{
|
|
363
|
+
context: k.Selection,
|
|
362
364
|
data: [""],
|
|
363
|
-
mode:
|
|
365
|
+
mode: O.Or,
|
|
364
366
|
style: {
|
|
365
367
|
active: {
|
|
366
368
|
strokeWidth: 2,
|
|
367
|
-
stroke:
|
|
369
|
+
stroke: r.mainDarkNavy
|
|
368
370
|
},
|
|
369
371
|
inactive: { strokeWidth: 0 }
|
|
370
372
|
}
|
|
371
|
-
}] }),
|
|
373
|
+
}] }), Be = (e, t, n, r, i, a = {}) => {
|
|
372
374
|
let o = {
|
|
373
375
|
key: R.selection,
|
|
374
|
-
type:
|
|
376
|
+
type: P.Deferred,
|
|
375
377
|
layout: { displayOrder: 10 },
|
|
376
378
|
settings: { sources: [{
|
|
377
379
|
component: R.cells,
|
|
378
|
-
selector:
|
|
380
|
+
selector: N.Rect
|
|
379
381
|
}] },
|
|
380
|
-
brush: a.disable?.brushing === !0 ? void 0 :
|
|
382
|
+
brush: a.disable?.brushing === !0 ? void 0 : ze(),
|
|
381
383
|
animations: {
|
|
382
384
|
presetId: "simple-opacity",
|
|
383
385
|
enabled: !0
|
|
@@ -387,17 +389,17 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
387
389
|
...n,
|
|
388
390
|
components: [...n.components, o]
|
|
389
391
|
};
|
|
390
|
-
},
|
|
391
|
-
if (!e.dimensions.filter(
|
|
392
|
-
let
|
|
393
|
-
|
|
394
|
-
let
|
|
395
|
-
return
|
|
392
|
+
}, Ve = (e, t, n, r, i, a, s) => {
|
|
393
|
+
if (!e.dimensions.filter(o)[0]) return n;
|
|
394
|
+
let c = n.collections?.[0]?.data.extract[0]?.props?.[z.Color], l;
|
|
395
|
+
c?.field && (l = c?.field);
|
|
396
|
+
let u = {};
|
|
397
|
+
return u = ee(ge(e, l ?? null), t, u, n.collections, s), {
|
|
396
398
|
...n,
|
|
397
|
-
scales:
|
|
399
|
+
scales: u
|
|
398
400
|
};
|
|
399
|
-
},
|
|
400
|
-
let r = e.dimensions.filter(
|
|
401
|
+
}, He = (e, t, n) => {
|
|
402
|
+
let r = e.dimensions.filter(o), i = e.measures.filter(o);
|
|
401
403
|
if (!r[0] || !i[0]) return n;
|
|
402
404
|
let a = {
|
|
403
405
|
"$font-family": t.fonts.general.fontFamily,
|
|
@@ -411,7 +413,7 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
411
413
|
},
|
|
412
414
|
$title: {
|
|
413
415
|
"@extend": "$label",
|
|
414
|
-
fontSize: `${
|
|
416
|
+
fontSize: `${M.fieldTitle.fontSize}px`,
|
|
415
417
|
padding: 4
|
|
416
418
|
}
|
|
417
419
|
};
|
|
@@ -419,57 +421,57 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
419
421
|
...n,
|
|
420
422
|
style: a
|
|
421
423
|
};
|
|
422
|
-
},
|
|
424
|
+
}, Ue = (e, t) => t.data.label, Y = (e, t, n, r, i, a) => {
|
|
423
425
|
let o = t;
|
|
424
426
|
if (!r && i) o = n.formatter(i)(t, void 0, a);
|
|
425
427
|
else if (r) {
|
|
426
|
-
let e = typeof i == "string" ? i :
|
|
428
|
+
let e = typeof i == "string" ? i : ae(i);
|
|
427
429
|
o = n.formatter(e)(t, void 0, a);
|
|
428
430
|
}
|
|
429
431
|
return {
|
|
430
432
|
label: e,
|
|
431
433
|
value: o
|
|
432
434
|
};
|
|
433
|
-
},
|
|
434
|
-
let u = [],
|
|
435
|
-
return u.push(
|
|
436
|
-
let r =
|
|
435
|
+
}, We = (e, t, n, r, i, s, c, l) => {
|
|
436
|
+
let u = [], f = e.filter(o), p = ie(n), m = f.filter((e) => !p.has(a(e.dataItem)))[0] ?? f[0], h = (m ? d(m) : "") || m?.label || m?.dataItem.name || "", g = m ? h : "Count", _ = Number(t.desc?.total), v = t.data[z.CellValue]?.source ? t.data : void 0;
|
|
437
|
+
return u.push(Y(g, _, n, l, B.MeasureFormatter, v)), f.filter((e) => p.has(a(e.dataItem))).forEach((e) => {
|
|
438
|
+
let r = a(e.dataItem), i = Object.keys(t.data).find((e) => t.data[e]?.source?.field === r);
|
|
437
439
|
if (!i) return;
|
|
438
|
-
let
|
|
439
|
-
u.push(
|
|
440
|
+
let o = d(e) || e.label || e.dataItem.name || "", s = Number(t.data[i]?.value);
|
|
441
|
+
u.push(Y(o, s, n, l, e.formatter, t.data));
|
|
440
442
|
}), u;
|
|
441
|
-
},
|
|
443
|
+
}, Ge = (e, t, n, r, i) => {
|
|
442
444
|
let a = {
|
|
443
445
|
placement: () => ({
|
|
444
446
|
area: "target",
|
|
445
447
|
type: "pointer"
|
|
446
448
|
}),
|
|
447
|
-
filter: (e) => e.filter((e) => e.type !==
|
|
449
|
+
filter: (e) => e.filter((e) => e.type !== N.Text && e.key === R.cells)
|
|
448
450
|
};
|
|
449
|
-
return a.extract =
|
|
450
|
-
},
|
|
451
|
+
return a.extract = de(e, t, We, Ue), me(e, t, n, a, "tooltip", i);
|
|
452
|
+
}, Ke = class extends te {
|
|
451
453
|
constructor() {
|
|
452
454
|
super([
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
Re,
|
|
457
|
-
pe,
|
|
458
|
-
Ae,
|
|
459
|
-
Ie,
|
|
455
|
+
De,
|
|
456
|
+
Ve,
|
|
457
|
+
Fe,
|
|
460
458
|
Be,
|
|
461
|
-
|
|
459
|
+
re,
|
|
460
|
+
Me,
|
|
461
|
+
Re,
|
|
462
|
+
He,
|
|
463
|
+
Ge
|
|
462
464
|
]);
|
|
463
465
|
}
|
|
464
466
|
preCompile(e, t) {
|
|
465
|
-
let n = e.measures.filter(
|
|
467
|
+
let n = e.measures.filter(o)[0];
|
|
466
468
|
if (!n) return;
|
|
467
|
-
let r =
|
|
469
|
+
let r = a(n.dataItem);
|
|
468
470
|
t.forEach((e) => {
|
|
469
471
|
if (e.items?.length && (e.items = e.items.filter((e) => e[r] > 0), !e.items.length)) throw Error("Current data query resulted in only negative and/or null values which can not be displayed in this chart.");
|
|
470
472
|
});
|
|
471
473
|
}
|
|
472
|
-
},
|
|
474
|
+
}, X = {
|
|
473
475
|
numDimensions: 0,
|
|
474
476
|
cellPadding: 2,
|
|
475
477
|
cellRadius: 0,
|
|
@@ -483,14 +485,14 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
483
485
|
fontSize: 11,
|
|
484
486
|
numLevels: 1
|
|
485
487
|
},
|
|
486
|
-
leaf: { fill:
|
|
487
|
-
},
|
|
488
|
-
let n =
|
|
488
|
+
leaf: { fill: r.mainDarkNavy }
|
|
489
|
+
}, Z = (e = 0) => Array(Math.max(0, e - 1)).fill(0).map((e, t) => `dim${t}`), qe = "__virtual__::__root__", Je = (e, t) => {
|
|
490
|
+
let n = Z(e.numDimensions), r = {
|
|
489
491
|
data: {
|
|
490
492
|
label: "__root__",
|
|
491
493
|
value: null
|
|
492
494
|
},
|
|
493
|
-
id:
|
|
495
|
+
id: qe,
|
|
494
496
|
children: [],
|
|
495
497
|
fill: "",
|
|
496
498
|
opacity: 0
|
|
@@ -509,27 +511,27 @@ var Te = /* @__PURE__ */ e(S()), R = /* @__PURE__ */ function(e) {
|
|
|
509
511
|
fill: e.branchColor ?? "rgba(150, 150, 150, 0.3)"
|
|
510
512
|
})), t]);
|
|
511
513
|
});
|
|
512
|
-
let o =
|
|
514
|
+
let o = _e(r);
|
|
513
515
|
return o.each((e) => delete e.data.children), o;
|
|
514
|
-
},
|
|
515
|
-
function
|
|
516
|
-
let { cellPadding: t, headerLabels: n } = e, { fontSize: r } = n, i =
|
|
517
|
-
|
|
516
|
+
}, Ye = (e) => e + Math.max(12, e * .5), Xe = (e, t, n) => e.y1 - e.y0 >= t + 12 && e.x1 - e.x0 >= n * 2;
|
|
517
|
+
function Ze(e) {
|
|
518
|
+
let { cellPadding: t, headerLabels: n } = e, { fontSize: r } = n, i = Ye(r);
|
|
519
|
+
Te().size([e.rect.width, e.rect.height]).paddingInner((e) => e.height > 1 ? t : 0).paddingOuter((e) => e.depth ? t : 0).paddingTop((n) => n.height && n.depth && e.headerLabels.show && e.headerLabels.numLevels >= n.depth && Xe(n, i, r) ? t + i : n.depth ? t : 0)(e.root);
|
|
518
520
|
}
|
|
519
|
-
var
|
|
521
|
+
var Qe = 8, $e = "rgba(250, 250, 250, 0.8)", et = "rgba(60, 60, 60, 0.8)", tt = .12, nt = 24, rt = (e, t) => {
|
|
520
522
|
let n = null, r = null;
|
|
521
|
-
return !e.height && t.leafLabels?.show ? (r =
|
|
523
|
+
return !e.height && t.leafLabels?.show ? (r = tt * Math.sqrt((e.y1 - e.y0) * (e.x1 - e.x0)), n = t.leafLabels?.dynamicFontSizeEnabled && r < Qe ? null : V.Leaf) : e.height && t.headerLabels?.show && t.headerLabels.numLevels >= e.depth && (n = V.Header), {
|
|
522
524
|
labelTarget: n,
|
|
523
525
|
leafDynamicFontSize: r
|
|
524
526
|
};
|
|
525
|
-
},
|
|
526
|
-
let n = [...
|
|
527
|
+
}, it = (e, t) => {
|
|
528
|
+
let n = [...Z(e.numDimensions), "cell"].map((t, n) => Math.max(0, (e.cellRadius ?? X.cellRadius) - (e.cellPadding ?? X.cellPadding) * n * .25)), i = new F(e.branchColor ?? "rgba(150, 150, 150, 0.3)").isDark() ? et : $e, a = e.headerLabels?.fontSize ?? X.headerLabels.fontSize, o = Ye(a);
|
|
527
529
|
return t.descendants().slice(1).filter((e) => (e.x1 - e.x0) * (e.y1 - e.y0) >= 1).map((t) => {
|
|
528
|
-
let s = (t.children?.length ?? 0) > 0, c = t.y1 - t.y0, { labelTarget: l, leafDynamicFontSize: u } =
|
|
530
|
+
let s = (t.children?.length ?? 0) > 0, c = t.y1 - t.y0, { labelTarget: l, leafDynamicFontSize: u } = rt(t, e), d = t.data.fill || r.black, f = n[t.depth - 1];
|
|
529
531
|
return {
|
|
530
532
|
id: t.data.id,
|
|
531
|
-
type:
|
|
532
|
-
tag: l === V.Header ?
|
|
533
|
+
type: N.Rect,
|
|
534
|
+
tag: l === V.Header ? Xe(t, o, a) ? l : void 0 : l && c >= nt ? l : void 0,
|
|
533
535
|
x: t.x0,
|
|
534
536
|
y: t.y0,
|
|
535
537
|
rx: f,
|
|
@@ -537,7 +539,7 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
|
|
|
537
539
|
width: t.x1 - t.x0,
|
|
538
540
|
height: t.y1 - t.y0,
|
|
539
541
|
fill: d,
|
|
540
|
-
stroke:
|
|
542
|
+
stroke: i,
|
|
541
543
|
strokeWidth: +!s,
|
|
542
544
|
opacity: t.data.opacity ?? 1,
|
|
543
545
|
desc: {
|
|
@@ -549,17 +551,17 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
|
|
|
549
551
|
data: t.data.data
|
|
550
552
|
};
|
|
551
553
|
});
|
|
552
|
-
}, it = {
|
|
553
|
-
[f.DESC]: (e, t) => t.height - e.height || (t.value ?? 0) - (e.value ?? 0),
|
|
554
|
-
[f.ASC]: (e, t) => t.height - e.height || (e.value ?? 0) - (t.value ?? 0)
|
|
555
554
|
}, at = {
|
|
555
|
+
[h.DESC]: (e, t) => t.height - e.height || (t.value ?? 0) - (e.value ?? 0),
|
|
556
|
+
[h.ASC]: (e, t) => t.height - e.height || (e.value ?? 0) - (t.value ?? 0)
|
|
557
|
+
}, ot = {
|
|
556
558
|
require: [
|
|
557
559
|
"resolver",
|
|
558
560
|
"chart",
|
|
559
561
|
"renderer"
|
|
560
562
|
],
|
|
561
563
|
defaultSettings: {
|
|
562
|
-
settings:
|
|
564
|
+
settings: X,
|
|
563
565
|
style: {
|
|
564
566
|
title: "$title",
|
|
565
567
|
label: "$label"
|
|
@@ -570,28 +572,28 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
|
|
|
570
572
|
if (!n) return [];
|
|
571
573
|
let { items: r } = n.resolve({
|
|
572
574
|
data: { items: e.items },
|
|
573
|
-
defaults: { ...
|
|
575
|
+
defaults: { ...X.leaf },
|
|
574
576
|
settings: { ...t.leaf }
|
|
575
|
-
}), i =
|
|
577
|
+
}), i = Je(t, r);
|
|
576
578
|
i.sum((e) => e.children?.length ? 0 : e.data.cellValue?.value || 0);
|
|
577
|
-
let a = t.cellOrder ?
|
|
578
|
-
return a && i.sort(a),
|
|
579
|
+
let a = t.cellOrder ? at[t.cellOrder] : void 0;
|
|
580
|
+
return a && i.sort(a), Ze({
|
|
579
581
|
cellPadding: t.cellPadding,
|
|
580
582
|
rect: this.rect,
|
|
581
583
|
root: i,
|
|
582
584
|
headerLabels: t.headerLabels
|
|
583
|
-
}),
|
|
585
|
+
}), it(t, i);
|
|
584
586
|
}
|
|
585
|
-
},
|
|
587
|
+
}, st = " ▼", Q = "...", $ = (e, t, n, r) => {
|
|
586
588
|
let i = {
|
|
587
589
|
text: t,
|
|
588
590
|
fontFamily: n,
|
|
589
591
|
fontSize: r
|
|
590
592
|
};
|
|
591
593
|
return e.measureText(i).width;
|
|
592
|
-
},
|
|
594
|
+
}, ct = (e, t, n, r, i) => {
|
|
593
595
|
if (t <= 0 || $(n, e, r, i) <= t) return e;
|
|
594
|
-
let a = e.endsWith(
|
|
596
|
+
let a = e.endsWith(st), o = a ? st : "", s = a ? e.slice(0, -2) : e;
|
|
595
597
|
if ($(n, `${Q}${o}`, r, i) > t) return Q;
|
|
596
598
|
let c = 0, l = s.length;
|
|
597
599
|
for (; c < l;) {
|
|
@@ -599,12 +601,12 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
|
|
|
599
601
|
$(n, `${s.slice(0, e)}${Q}${o}`, r, i) <= t ? c = e : l = e - 1;
|
|
600
602
|
}
|
|
601
603
|
return `${s.slice(0, c)}${Q}${o}`;
|
|
602
|
-
},
|
|
604
|
+
}, lt = {
|
|
603
605
|
require: ["renderer"],
|
|
604
606
|
defaultSettings: { settings: {
|
|
605
607
|
dimensionLabel: "",
|
|
606
608
|
measureLabel: "",
|
|
607
|
-
backgroundColor:
|
|
609
|
+
backgroundColor: X.branchColor ?? "rgba(150, 150, 150, 0.3)",
|
|
608
610
|
fontSize: "12px",
|
|
609
611
|
color: "#000",
|
|
610
612
|
paddingLeft: 5,
|
|
@@ -623,7 +625,7 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
|
|
|
623
625
|
render() {
|
|
624
626
|
let { renderer: e } = this;
|
|
625
627
|
if (!e) return [];
|
|
626
|
-
let { dimensionLabel: t, measureLabel: n, backgroundColor: r, fontFamily: i = "Arial", fontSize: a, color: o, paddingLeft: s, paddingRight: c, labelGap: l } = this.settings.settings, u = n ? $(e, n, i, a) : 0, d = this.rect.width - c, f = d - u, p = Math.max(Math.min(n ? f - l - s : this.rect.width - s - c, this.rect.width / 2), 0), m = t ?
|
|
628
|
+
let { dimensionLabel: t, measureLabel: n, backgroundColor: r, fontFamily: i = "Arial", fontSize: a, color: o, paddingLeft: s, paddingRight: c, labelGap: l } = this.settings.settings, u = n ? $(e, n, i, a) : 0, d = this.rect.width - c, f = d - u, p = Math.max(Math.min(n ? f - l - s : this.rect.width - s - c, this.rect.width / 2), 0), m = t ? ct(t, p, e, i, a) : "", h = m ? $(e, m, i, a) : 0, g = [{
|
|
627
629
|
type: "rect",
|
|
628
630
|
x: 0,
|
|
629
631
|
y: 0,
|
|
@@ -676,10 +678,10 @@ var Ze = 8, Qe = "rgba(250, 250, 250, 0.8)", $e = "rgba(60, 60, 60, 0.8)", et =
|
|
|
676
678
|
}), g;
|
|
677
679
|
}
|
|
678
680
|
};
|
|
679
|
-
function
|
|
680
|
-
e.component(
|
|
681
|
+
function ut(e) {
|
|
682
|
+
e.component(P.Treemap, ot), e.component(H, lt);
|
|
681
683
|
}
|
|
682
|
-
var
|
|
684
|
+
var dt = {
|
|
683
685
|
require: [
|
|
684
686
|
"resolver",
|
|
685
687
|
"chart",
|
|
@@ -693,7 +695,7 @@ var ut = {
|
|
|
693
695
|
return e.sources.forEach((e) => {
|
|
694
696
|
t.component(e.component) && t.findShapes(e.selector ?? "").filter((t) => t.key === e.component).forEach((e) => {
|
|
695
697
|
e.attrs && n.push({
|
|
696
|
-
type:
|
|
698
|
+
type: N.Rect,
|
|
697
699
|
height: e.attrs.height,
|
|
698
700
|
width: e.attrs.width,
|
|
699
701
|
x: e.attrs.x,
|
|
@@ -701,7 +703,7 @@ var ut = {
|
|
|
701
703
|
rx: e.attrs.rx,
|
|
702
704
|
ry: e.attrs.ry,
|
|
703
705
|
fill: "transparent",
|
|
704
|
-
stroke:
|
|
706
|
+
stroke: r.mainDarkNavy,
|
|
705
707
|
strokeWidth: 0,
|
|
706
708
|
data: e.data,
|
|
707
709
|
collider: { type: null }
|
|
@@ -710,34 +712,34 @@ var ut = {
|
|
|
710
712
|
}), n;
|
|
711
713
|
}
|
|
712
714
|
};
|
|
713
|
-
function
|
|
714
|
-
e.component(
|
|
715
|
+
function ft(e) {
|
|
716
|
+
e.component(P.Deferred, dt);
|
|
715
717
|
}
|
|
716
|
-
var
|
|
717
|
-
let
|
|
718
|
-
if (!e || !
|
|
719
|
-
let
|
|
720
|
-
if (!
|
|
718
|
+
var pt = T(), mt = C(({ vSpec: e, vTheme: t, data: n, elementSize: r, vizProperties: i }) => {
|
|
719
|
+
let o = x(), [s] = (0, Ee.useState)(() => new Ke()), c = b(), l = t || f, d = w(), m = le();
|
|
720
|
+
if (!e || !p(e) || !r) return null;
|
|
721
|
+
let h = d.targetDataItemId;
|
|
722
|
+
if (!h && d.targetInternalKey) {
|
|
721
723
|
let t = e.dimensions.find((e) => e.dataItem.internalKey === d.targetInternalKey);
|
|
722
|
-
t && (
|
|
724
|
+
t && (h = a(t.dataItem));
|
|
723
725
|
}
|
|
724
|
-
let
|
|
726
|
+
let g = {
|
|
725
727
|
...i,
|
|
726
728
|
valuePickerMode: !!d.activeKey,
|
|
727
|
-
valuePickerTargetDataItemId:
|
|
728
|
-
},
|
|
729
|
+
valuePickerTargetDataItemId: h ?? void 0
|
|
730
|
+
}, _ = {
|
|
729
731
|
...i,
|
|
730
732
|
disable: {
|
|
731
733
|
...i.disable,
|
|
732
734
|
multiDimSelection: !0
|
|
733
735
|
}
|
|
734
|
-
}, v =
|
|
735
|
-
return v ? /* @__PURE__ */ (0,
|
|
736
|
-
config:
|
|
736
|
+
}, v = s.compile(e, l, n, r, g, u.Treemap, o, c, m);
|
|
737
|
+
return v ? /* @__PURE__ */ (0, pt.jsx)(se, {
|
|
738
|
+
config: _,
|
|
737
739
|
definition: v,
|
|
738
740
|
size: r,
|
|
739
741
|
vSpec: e,
|
|
740
|
-
escobarPlugins: [
|
|
742
|
+
escobarPlugins: [ut, ft]
|
|
741
743
|
}) : null;
|
|
742
744
|
});
|
|
743
|
-
export {
|
|
745
|
+
export { mt as Treemap };
|