@astrato-io/visualizations 0.10.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 +3 -3
- package/VISUALIZATION_DEFINITIONS.md +65 -12
- package/chunks/{Button-CCF851ea.js → Button-Dn3rJrYf.js} +2 -2
- package/chunks/{CircularProgress-yupH6YWs.js → CircularProgress-BFeu06Yb.js} +4 -4
- package/chunks/{FieldTypeIcon-D_MzsdfY.js → FieldTypeIcon-DrMoGpHJ.js} +2 -2
- package/chunks/{LinearProgress-CyFjN4px.js → LinearProgress-ClO6GUjN.js} +2 -2
- package/chunks/{MenuOption-CQpT79AP.js → MenuOption-Czc34u4q.js} +7 -7
- package/chunks/{Title-C-p4ZarD.js → Title-BgYnaVTR.js} +3 -3
- package/chunks/{_createAggregator-BF4qG9XK.js → _createAggregator-BMu9uRax.js} +8 -8
- package/chunks/{app-filter-bar.compiler-8fxCo2q7.js → app-filter-bar.compiler-CVir0wkl.js} +3 -3
- package/chunks/{bar-layout-DStC-GNV.js → bar-layout-C_UgRlVl.js} +2 -2
- package/chunks/{bar.compiler-CQAu8KL8.js → bar.compiler-DYuFdi9J.js} +8 -8
- package/chunks/{builder-CScg1TOS.js → builder-C-TKA-My.js} +11 -11
- package/chunks/{coloring-9jU3s_-p.js → coloring-BtnPiQ_o.js} +16 -16
- package/chunks/{createSimplePaletteValueFilter-C4hZpCdn.js → createSimplePaletteValueFilter--zrZxRV9.js} +1 -1
- package/chunks/defaults-Dtk7fg3C.js +3 -0
- package/chunks/{definitions-C4grxhye.js → definitions-CT304NDn.js} +77 -51
- package/chunks/{escobar-CjirINHP.js → escobar-CvEV2ES1.js} +6126 -6059
- package/chunks/{extend-preset-D-l9u_we.js → extend-preset-D9-JP92b.js} +396 -396
- package/chunks/{filter.compiler-lji2Acgn.js → filter.compiler-CXeZznks.js} +7 -7
- package/chunks/{filtering-C1zakrrX.js → filtering-8_bFv-jb.js} +84 -84
- package/chunks/{handlers-ZviIUC-j.js → handlers-C6CZ0XJA.js} +5620 -5608
- package/chunks/{icon-picker-styles-Bj80ZUBK.js → icon-picker-styles-BXiJ1SZS.js} +2 -2
- package/chunks/{isEqual-Ch9OEye3.js → isEqual-D8Ay63xR.js} +1 -1
- package/chunks/{isFocusVisible-CgMP0qkR.js → isFocusVisible-Bu8gGZu5.js} +1 -1
- package/chunks/{line.compiler-De5fiKuR.js → line.compiler-DmHpmQCC.js} +4 -4
- package/chunks/{logger-CKRjhSHQ.js → logger-DdZpR7xZ.js} +65 -65
- package/chunks/{map.compiler-CKzorLgK.js → map.compiler-Q_Y1Pvat.js} +12 -14
- package/chunks/{metadata-Bb9pTXrq.js → metadata-BQm_TXI1.js} +1 -1
- package/chunks/{number.compiler-CaTmJkmi.js → number.compiler-DQdg6zTy.js} +4 -4
- package/chunks/{operations-DZoY50VX.js → operations-DKQWuLL7.js} +9469 -9451
- package/chunks/{range-D1BTmFMp.js → range-BdhzvYQ_.js} +2 -2
- package/chunks/{react-dom-Dgv2azN2.js → react-dom-BGP4tbXV.js} +1 -1
- package/chunks/{render-wrappers-_P3xwu5A.js → render-wrappers-BZpyDnJy.js} +1 -1
- package/chunks/{requirements-NHNrR8Ie.js → requirements-e8Fe96ag.js} +29 -29
- package/chunks/{shared-UitWpq1J.js → shared-C_2F90xq.js} +478 -472
- package/chunks/{standalone-wgFAVnnm.js → standalone-4MsKiqs0.js} +130 -130
- package/chunks/standalone-B794g9pE.js +1012 -0
- package/chunks/{standalone-BBu90BhK.js → standalone-B8ZSqauS.js} +59 -59
- package/chunks/standalone-BA2YXyJS.js +422 -0
- package/chunks/{standalone-DtBk_iUz.js → standalone-BDrXVxlP.js} +4 -4
- package/chunks/{standalone-U0WJwFlG.js → standalone-BE_ONgiG.js} +64 -64
- package/chunks/{standalone-BOzHA_d4.js → standalone-BTY3w_JA.js} +24 -24
- package/chunks/{standalone-BEekPuA12.js → standalone-BgumbdaJ2.js} +101 -101
- package/chunks/{standalone-Bnnr87pc.js → standalone-BkbiH-o8.js} +174 -174
- package/chunks/{standalone-xGV0dqPV.js → standalone-Blh4qejk.js} +197 -197
- package/chunks/{standalone-DxBAyqAu.js → standalone-CXY4FpF7.js} +278 -277
- package/chunks/{standalone-CVknVdUC.js → standalone-CY_kjarf.js} +18 -18
- package/chunks/{standalone-BapqaniK.js → standalone-CaTxAydz.js} +54 -54
- package/chunks/{standalone-CRdDZYeM.js → standalone-Cc98Pdr6.js} +829 -829
- package/chunks/standalone-Cl0TSfqC.js +396 -0
- package/chunks/{standalone-B0U6c3su.js → standalone-CsoMmE9T.js} +80 -80
- package/chunks/standalone-DH0xTEes.js +2 -0
- package/chunks/{standalone-ByKKqT5L.js → standalone-DHRalbVO.js} +268 -268
- package/chunks/{standalone-CbPk8bKn.js → standalone-DNh9NcMa.js} +109 -109
- package/chunks/standalone-DcnHjNnC.js +2 -0
- package/chunks/{standalone-Ck63MZzj.js → standalone-DflyWtuR.js} +107 -107
- package/chunks/standalone-DrHdGkY7.js +762 -0
- package/chunks/standalone-c_rROMtx.js +287 -0
- package/chunks/{standalone-DibjA73M.js → standalone-drcFLeN6.js} +2 -2
- package/chunks/{standalone-swGs70tD.js → standalone-wOWRCpdn.js} +26 -26
- package/chunks/{standalone-DCFY1MAV.js → standalone-z0o52o5t.js} +4191 -4191
- package/chunks/{table.compiler-OWSx5MOq.js → table.compiler-COaHE9VD.js} +18 -18
- package/chunks/{useFieldName-B8iCYyw1.js → useFieldName-CdnCWzhd.js} +1 -1
- package/chunks/{utils-3Igg6xmO.js → utils-DganVptf.js} +491 -483
- package/chunks/{view-DdMLZySj.js → view-Bzlros43.js} +158 -158
- package/chunks/{visualization-filters-CzvFHE6M.js → visualization-filters-D7i6oh1Z.js} +23 -12
- package/chunks/{with-html-element-DOfkR3C1.js → with-html-element-CiIhFEa5.js} +2497 -2497
- 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 +19 -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 +1 -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 +54 -54
- package/metadata.js +2 -2
- package/operations.js +5 -5
- package/package.json +67 -67
- package/src/definitions/index.d.ts +7 -1
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +31 -5
- package/src/definitions/model/definitions/types/compilation.types.d.ts +4 -1
- package/src/types.d.ts +28 -28
- package/chunks/defaults-cyNhn37t.js +0 -3
- package/chunks/standalone-BR2JuRIC.js +0 -422
- package/chunks/standalone-BwJqDj2Z.js +0 -396
- package/chunks/standalone-CRfDOO1x.js +0 -287
- package/chunks/standalone-DZDGX3aa.js +0 -518
- package/chunks/standalone-DhfgeJIk.js +0 -1012
- package/chunks/standalone-KMQPsNsq.js +0 -2
- package/chunks/standalone-MBLSvsrY.js +0 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { o as e, t } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import { F as b, N as x, ci as S, jt as C, s as w, zr as T } from "./utils-
|
|
4
|
-
import {
|
|
5
|
-
import "./logger-
|
|
6
|
-
import {
|
|
7
|
-
import { _ as F } from "./MenuOption-
|
|
8
|
-
import { t as he } from "./coloring-
|
|
2
|
+
import { Ea as n, Fc as r, Io as i, Oa as a, Qr as o, gc as s, in as c, ll as l, mc as u, no as d, rr as f, sa as p, ws as m, x as h, xa as g, y as _, ya as v, yc as y } from "./visualization-filters-D7i6oh1Z.js";
|
|
3
|
+
import { F as b, N as x, ci as S, jt as C, s as w, zr as T } from "./utils-DganVptf.js";
|
|
4
|
+
import { e_ as E, t_ as D } from "./handlers-C6CZ0XJA.js";
|
|
5
|
+
import "./logger-DdZpR7xZ.js";
|
|
6
|
+
import { L as ee, R as te, V as ne, Yt as re, _ as ie, _n as ae, bn as O, dn as k, fn as A, i as oe, in as se, jt as ce, kt as le, n as ue, on as j, pn as M, rn as de, ut as fe, v as pe, vn as N, wt as me, yn as P } from "./escobar-CvEV2ES1.js";
|
|
7
|
+
import { _ as F } from "./MenuOption-Czc34u4q.js";
|
|
8
|
+
import { t as he } from "./coloring-BtnPiQ_o.js";
|
|
9
9
|
import { t as ge } from "./set-coloring-datafield-B3uIS1Pe.js";
|
|
10
10
|
import { a as _e, n as ve } from "./accessors-DemrDevR.js";
|
|
11
11
|
function I() {
|
|
@@ -96,8 +96,8 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
96
96
|
}, B = { MeasureFormatter: "total" }, V = {
|
|
97
97
|
Leaf: "leaf",
|
|
98
98
|
Header: "header"
|
|
99
|
-
}, De = (e, t, n,
|
|
100
|
-
let l = e.measures.filter(o), u = (e.supportingMeasures ?? []).filter((e) => o(e)), d =
|
|
99
|
+
}, De = (e, t, n, i, a, s, c) => {
|
|
100
|
+
let l = e.measures.filter(o), u = (e.supportingMeasures ?? []).filter((e) => o(e)), d = r(l[0].dataItem), f = pe(u), p = e.dimensions.filter(o).map((e) => r(e.dataItem)), m = p[p.length - 1], h = p.slice(0, p.length - 1), g = {};
|
|
101
101
|
h.forEach((e, t) => {
|
|
102
102
|
g[`dim${t}`] = { field: e };
|
|
103
103
|
});
|
|
@@ -126,15 +126,15 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
126
126
|
format: ""
|
|
127
127
|
} }
|
|
128
128
|
};
|
|
129
|
-
}, H = "treemap-alternates-switcher", U = "treemap-alternates-switcher", Oe = new F(
|
|
130
|
-
let
|
|
129
|
+
}, H = "treemap-alternates-switcher", U = "treemap-alternates-switcher", Oe = new F(k.fontLight), ke = new F(k.fontDark), Ae = (e) => c(e) || e.label || e.dataItem?.name || "Field", je = (e, t, n, i) => {
|
|
130
|
+
let a = n ? r(n.dataItem) : void 0;
|
|
131
131
|
return {
|
|
132
132
|
type: "native",
|
|
133
133
|
key: `${U}-interaction`,
|
|
134
|
-
events: { click(
|
|
134
|
+
events: { click(r) {
|
|
135
135
|
let o = this.element.getBoundingClientRect(), s = {
|
|
136
|
-
x:
|
|
137
|
-
y:
|
|
136
|
+
x: r.clientX - o.left,
|
|
137
|
+
y: r.clientY - o.top
|
|
138
138
|
}, c = this.chart.shapesAt(s, {
|
|
139
139
|
components: [{
|
|
140
140
|
key: U,
|
|
@@ -142,25 +142,25 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
142
142
|
}],
|
|
143
143
|
propagation: "stop"
|
|
144
144
|
}).find((e) => e.data?.target === "measure" || e.data?.target === "dimension");
|
|
145
|
-
if (c?.data?.target === "measure" && n &&
|
|
146
|
-
|
|
145
|
+
if (c?.data?.target === "measure" && n && a) {
|
|
146
|
+
i(O.Text, "click", `text-${a}`, r, c, {
|
|
147
147
|
dataItemType: l.Measure,
|
|
148
148
|
dataItemRole: n.role
|
|
149
149
|
});
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
c?.data?.target === "dimension" && e &&
|
|
152
|
+
c?.data?.target === "dimension" && e && i(O.Text, "click", `text-${e}`, r, c, {
|
|
153
153
|
dataItemType: l.Dimension,
|
|
154
154
|
dataItemRole: t
|
|
155
155
|
});
|
|
156
156
|
} }
|
|
157
157
|
};
|
|
158
|
-
}, Me = (e, t, n,
|
|
159
|
-
let
|
|
158
|
+
}, Me = (e, t, n, a, s, c = {}, u, d) => {
|
|
159
|
+
let p = e.dimensions.filter(o), m = e.measures.filter(o), h = p[0], g = m[0], _ = h ? r(h.dataItem) : void 0;
|
|
160
160
|
if (!h && !g) return n;
|
|
161
|
-
let v =
|
|
161
|
+
let v = f(e.dimensions, e.enableAlternate, c.isPrintMode), y = f(e.measures, e.enableAlternate, c.isPrintMode);
|
|
162
162
|
if (!v && !y) return n;
|
|
163
|
-
let b = c?.isPrintMode ?? !1, x = v ?
|
|
163
|
+
let b = c?.isPrintMode ?? !1, x = v ? p.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 = {
|
|
164
164
|
type: H,
|
|
165
165
|
key: U,
|
|
166
166
|
dimensionDataItemType: _ ? l.Dimension : void 0,
|
|
@@ -172,11 +172,11 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
172
172
|
displayOrder: 0
|
|
173
173
|
},
|
|
174
174
|
settings: {
|
|
175
|
-
dimensionLabel: x ?
|
|
176
|
-
measureLabel: S ?
|
|
175
|
+
dimensionLabel: x ? re(x) : void 0,
|
|
176
|
+
measureLabel: S ? re(S) : void 0,
|
|
177
177
|
backgroundColor: C,
|
|
178
178
|
fontFamily: t.fonts.general.fontFamily ?? void 0,
|
|
179
|
-
fontSize: `${
|
|
179
|
+
fontSize: `${k.fieldTitle.fontSize}px`,
|
|
180
180
|
color: w,
|
|
181
181
|
paddingLeft: 5,
|
|
182
182
|
paddingRight: 5,
|
|
@@ -190,58 +190,58 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
190
190
|
interactions: n.interactions ? [...n.interactions, ...E] : [...E]
|
|
191
191
|
};
|
|
192
192
|
}, Ne = /* @__PURE__ */ t(((e, t) => {
|
|
193
|
-
var n =
|
|
193
|
+
var n = h(), r = g();
|
|
194
194
|
function i(e, t, a, o, s, c) {
|
|
195
195
|
return r(e) && r(t) && (c.set(t, e), n(e, t, void 0, i, c), c.delete(t)), e;
|
|
196
196
|
}
|
|
197
197
|
t.exports = i;
|
|
198
198
|
})), W = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
199
|
-
var
|
|
200
|
-
t.exports =
|
|
201
|
-
return e.push(void 0,
|
|
199
|
+
var r = n(), i = v(), a = Ne(), o = _();
|
|
200
|
+
t.exports = i(function(e) {
|
|
201
|
+
return e.push(void 0, a), r(o, void 0, e);
|
|
202
202
|
});
|
|
203
203
|
})))()), Pe = () => ({
|
|
204
204
|
trigger: [{
|
|
205
|
-
on:
|
|
206
|
-
action:
|
|
205
|
+
on: N.Tap,
|
|
206
|
+
action: ae.Toggle,
|
|
207
207
|
globalPropagation: "stop",
|
|
208
208
|
propagation: "stop",
|
|
209
|
-
contexts: [
|
|
209
|
+
contexts: [M.Selection]
|
|
210
210
|
}, {
|
|
211
|
-
on:
|
|
212
|
-
action:
|
|
211
|
+
on: N.Over,
|
|
212
|
+
action: ae.Set,
|
|
213
213
|
globalPropagation: "stop",
|
|
214
214
|
propagation: "stop",
|
|
215
|
-
contexts: [
|
|
215
|
+
contexts: [M.Highlight]
|
|
216
216
|
}],
|
|
217
217
|
consume: [{
|
|
218
|
-
context:
|
|
218
|
+
context: M.Selection,
|
|
219
219
|
data: [""],
|
|
220
|
-
mode:
|
|
220
|
+
mode: P.Or,
|
|
221
221
|
style: { inactive: { fill: (e) => {
|
|
222
222
|
let { fill: t } = e;
|
|
223
|
-
return !t || t === "none" || t === "transparent" ? t ?? "none" :
|
|
223
|
+
return !t || t === "none" || t === "transparent" ? t ?? "none" : de(se(t), .25);
|
|
224
224
|
} } }
|
|
225
225
|
}]
|
|
226
|
-
}), Fe = (e, t,
|
|
227
|
-
let
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
}), Fe = (e, t, n, i, a, s = {}) => {
|
|
227
|
+
let c = e.dimensions.filter(o), l = e.measures.filter(o).map((e) => r(e.dataItem)), u = new he(e, t, a?.[0]?.itemsNotAffectedByFiltering), d = [u.MAIN_FIELD];
|
|
228
|
+
c.slice(0, c.length - 1).forEach((e, t) => {
|
|
229
|
+
d.push(`dim${t}`);
|
|
230
230
|
});
|
|
231
|
-
let { labeling:
|
|
231
|
+
let { labeling: f } = e.treemapSettings, p = (0, W.default)({}, f?.header, D.labeling.header), h = (0, W.default)({}, f?.leaf, D.labeling.leaf), g = {
|
|
232
232
|
key: R.cells,
|
|
233
|
-
type:
|
|
233
|
+
type: O.Treemap,
|
|
234
234
|
data: { collection: "coll" },
|
|
235
235
|
settings: {
|
|
236
|
-
numDimensions:
|
|
236
|
+
numDimensions: c.length || 0,
|
|
237
237
|
cellPadding: e.treemapSettings.cellPadding,
|
|
238
|
-
...
|
|
239
|
-
...
|
|
240
|
-
...
|
|
238
|
+
...m({ cellRadius: e.treemapSettings.cellRadius }),
|
|
239
|
+
...m({ cellOrder: e.treemapSettings.cellOrder }),
|
|
240
|
+
...m({ branchColor: e.treemapSettings.branchColor ?? void 0 }),
|
|
241
241
|
headerLabels: {
|
|
242
|
-
show:
|
|
243
|
-
numLevels:
|
|
244
|
-
fontSize: j(
|
|
242
|
+
show: p.show,
|
|
243
|
+
numLevels: p.numLevels,
|
|
244
|
+
fontSize: j(p.fontSize, void 0, E.labelFontSizeMin, E.labelFontSizeMax)
|
|
245
245
|
},
|
|
246
246
|
leafLabels: {
|
|
247
247
|
show: h.show,
|
|
@@ -250,23 +250,23 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
250
250
|
showMeasure: h.showMeasureValue,
|
|
251
251
|
dynamicFontSizeEnabled: h.dynamicFontSizeEnabled
|
|
252
252
|
},
|
|
253
|
-
leaf: { fill:
|
|
253
|
+
leaf: { fill: u.getColorDefinition({
|
|
254
254
|
ref: z.Color,
|
|
255
|
-
dataItemId: e.coloring?.type ===
|
|
256
|
-
overwriteSources:
|
|
255
|
+
dataItemId: e.coloring?.type === y.Single ? l[0] : void 0,
|
|
256
|
+
overwriteSources: d
|
|
257
257
|
}) }
|
|
258
258
|
},
|
|
259
|
-
brush:
|
|
259
|
+
brush: s.disable?.brushing === !0 ? void 0 : Pe(),
|
|
260
260
|
animations: {
|
|
261
261
|
presetId: "simple-opacity",
|
|
262
262
|
enabled: !0
|
|
263
263
|
}
|
|
264
264
|
};
|
|
265
265
|
return {
|
|
266
|
-
...
|
|
267
|
-
components: [...
|
|
266
|
+
...n,
|
|
267
|
+
components: [...n.components, g]
|
|
268
268
|
};
|
|
269
|
-
}, G = new F(
|
|
269
|
+
}, G = new F(k.fontLight), K = new F(k.fontDark), q = (e) => e.desc, Ie = (e, t, n) => {
|
|
270
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);
|
|
271
271
|
return {
|
|
272
272
|
component: R.cells,
|
|
@@ -340,13 +340,13 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
340
340
|
};
|
|
341
341
|
}, Re = (e, t, n, r, i, a = {}) => {
|
|
342
342
|
let o = (0, W.default)({}, e.treemapSettings?.labeling, D.labeling), s = {
|
|
343
|
-
type:
|
|
343
|
+
type: O.Labels,
|
|
344
344
|
key: R.labels,
|
|
345
345
|
layout: { displayOrder: 2 },
|
|
346
346
|
settings: { sources: [Ie(`.${V.Leaf}`, o, t), Le(`.${V.Header}`, o, t)] },
|
|
347
347
|
style: { label: "$label" },
|
|
348
348
|
brush: a.disable?.brushing === !0 ? void 0 : { consume: [{
|
|
349
|
-
context:
|
|
349
|
+
context: M.Selection,
|
|
350
350
|
data: [""],
|
|
351
351
|
style: { inactive: { opacity: .3 } }
|
|
352
352
|
}] },
|
|
@@ -360,24 +360,24 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
360
360
|
components: [...n.components, s]
|
|
361
361
|
};
|
|
362
362
|
}, ze = () => ({ consume: [{
|
|
363
|
-
context:
|
|
363
|
+
context: M.Selection,
|
|
364
364
|
data: [""],
|
|
365
|
-
mode:
|
|
365
|
+
mode: P.Or,
|
|
366
366
|
style: {
|
|
367
367
|
active: {
|
|
368
368
|
strokeWidth: 2,
|
|
369
|
-
stroke:
|
|
369
|
+
stroke: a.mainDarkNavy
|
|
370
370
|
},
|
|
371
371
|
inactive: { strokeWidth: 0 }
|
|
372
372
|
}
|
|
373
373
|
}] }), Be = (e, t, n, r, i, a = {}) => {
|
|
374
374
|
let o = {
|
|
375
375
|
key: R.selection,
|
|
376
|
-
type:
|
|
376
|
+
type: O.Deferred,
|
|
377
377
|
layout: { displayOrder: 10 },
|
|
378
378
|
settings: { sources: [{
|
|
379
379
|
component: R.cells,
|
|
380
|
-
selector:
|
|
380
|
+
selector: A.Rect
|
|
381
381
|
}] },
|
|
382
382
|
brush: a.disable?.brushing === !0 ? void 0 : ze(),
|
|
383
383
|
animations: {
|
|
@@ -394,7 +394,7 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
394
394
|
let c = n.collections?.[0]?.data.extract[0]?.props?.[z.Color], l;
|
|
395
395
|
c?.field && (l = c?.field);
|
|
396
396
|
let u = {};
|
|
397
|
-
return u =
|
|
397
|
+
return u = le(ge(e, l ?? null), t, u, n.collections, s), {
|
|
398
398
|
...n,
|
|
399
399
|
scales: u
|
|
400
400
|
};
|
|
@@ -413,7 +413,7 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
413
413
|
},
|
|
414
414
|
$title: {
|
|
415
415
|
"@extend": "$label",
|
|
416
|
-
fontSize: `${
|
|
416
|
+
fontSize: `${k.fieldTitle.fontSize}px`,
|
|
417
417
|
padding: 4
|
|
418
418
|
}
|
|
419
419
|
};
|
|
@@ -425,38 +425,38 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
425
425
|
let o = t;
|
|
426
426
|
if (!r && i) o = n.formatter(i)(t, void 0, a);
|
|
427
427
|
else if (r) {
|
|
428
|
-
let e = typeof i == "string" ? i :
|
|
428
|
+
let e = typeof i == "string" ? i : fe(i);
|
|
429
429
|
o = n.formatter(e)(t, void 0, a);
|
|
430
430
|
}
|
|
431
431
|
return {
|
|
432
432
|
label: e,
|
|
433
433
|
value: o
|
|
434
434
|
};
|
|
435
|
-
}, We = (e, t, n,
|
|
436
|
-
let
|
|
437
|
-
return
|
|
438
|
-
let
|
|
439
|
-
if (!
|
|
440
|
-
let o =
|
|
441
|
-
|
|
442
|
-
}),
|
|
435
|
+
}, We = (e, t, n, i, a, s, l, u) => {
|
|
436
|
+
let d = [], f = e.filter(o), p = ne(n), m = f.filter((e) => !p.has(r(e.dataItem)))[0] ?? f[0], h = (m ? c(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 d.push(Y(g, _, n, u, B.MeasureFormatter, v)), f.filter((e) => p.has(r(e.dataItem))).forEach((e) => {
|
|
438
|
+
let i = r(e.dataItem), a = Object.keys(t.data).find((e) => t.data[e]?.source?.field === i);
|
|
439
|
+
if (!a) return;
|
|
440
|
+
let o = c(e) || e.label || e.dataItem.name || "", s = Number(t.data[a]?.value);
|
|
441
|
+
d.push(Y(o, s, n, u, e.formatter, t.data));
|
|
442
|
+
}), d;
|
|
443
443
|
}, Ge = (e, t, n, r, i) => {
|
|
444
444
|
let a = {
|
|
445
445
|
placement: () => ({
|
|
446
446
|
area: "target",
|
|
447
447
|
type: "pointer"
|
|
448
448
|
}),
|
|
449
|
-
filter: (e) => e.filter((e) => e.type !==
|
|
449
|
+
filter: (e) => e.filter((e) => e.type !== A.Text && e.key === R.cells)
|
|
450
450
|
};
|
|
451
|
-
return a.extract =
|
|
452
|
-
}, Ke = class extends
|
|
451
|
+
return a.extract = te(e, t, We, Ue), ee(e, t, n, a, "tooltip", i);
|
|
452
|
+
}, Ke = class extends ie {
|
|
453
453
|
constructor() {
|
|
454
454
|
super([
|
|
455
455
|
De,
|
|
456
456
|
Ve,
|
|
457
457
|
Fe,
|
|
458
458
|
Be,
|
|
459
|
-
|
|
459
|
+
me,
|
|
460
460
|
Me,
|
|
461
461
|
Re,
|
|
462
462
|
He,
|
|
@@ -466,9 +466,9 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
466
466
|
preCompile(e, t) {
|
|
467
467
|
let n = e.measures.filter(o)[0];
|
|
468
468
|
if (!n) return;
|
|
469
|
-
let
|
|
469
|
+
let i = r(n.dataItem);
|
|
470
470
|
t.forEach((e) => {
|
|
471
|
-
if (e.items?.length && (e.items = e.items.filter((e) => e[
|
|
471
|
+
if (e.items?.length && (e.items = e.items.filter((e) => e[i] > 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.");
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
474
|
}, X = {
|
|
@@ -485,7 +485,7 @@ var Ee = /* @__PURE__ */ e(S()), R = {
|
|
|
485
485
|
fontSize: 11,
|
|
486
486
|
numLevels: 1
|
|
487
487
|
},
|
|
488
|
-
leaf: { fill:
|
|
488
|
+
leaf: { fill: a.mainDarkNavy }
|
|
489
489
|
}, Z = (e = 0) => Array(Math.max(0, e - 1)).fill(0).map((e, t) => `dim${t}`), qe = "__virtual__::__root__", Je = (e, t) => {
|
|
490
490
|
let n = Z(e.numDimensions), r = {
|
|
491
491
|
data: {
|
|
@@ -525,13 +525,13 @@ var Qe = 8, $e = "rgba(250, 250, 250, 0.8)", et = "rgba(60, 60, 60, 0.8)", tt =
|
|
|
525
525
|
leafDynamicFontSize: r
|
|
526
526
|
};
|
|
527
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)),
|
|
528
|
+
let n = [...Z(e.numDimensions), "cell"].map((t, n) => Math.max(0, (e.cellRadius ?? X.cellRadius) - (e.cellPadding ?? X.cellPadding) * n * .25)), r = new F(e.branchColor ?? "rgba(150, 150, 150, 0.3)").isDark() ? et : $e, i = e.headerLabels?.fontSize ?? X.headerLabels.fontSize, o = Ye(i);
|
|
529
529
|
return t.descendants().slice(1).filter((e) => (e.x1 - e.x0) * (e.y1 - e.y0) >= 1).map((t) => {
|
|
530
|
-
let s = (t.children?.length ?? 0) > 0, c = t.y1 - t.y0, { labelTarget: l, leafDynamicFontSize: u } = rt(t, e), d = t.data.fill ||
|
|
530
|
+
let s = (t.children?.length ?? 0) > 0, c = t.y1 - t.y0, { labelTarget: l, leafDynamicFontSize: u } = rt(t, e), d = t.data.fill || a.black, f = n[t.depth - 1];
|
|
531
531
|
return {
|
|
532
532
|
id: t.data.id,
|
|
533
|
-
type:
|
|
534
|
-
tag: l === V.Header ? Xe(t, o,
|
|
533
|
+
type: A.Rect,
|
|
534
|
+
tag: l === V.Header ? Xe(t, o, i) ? l : void 0 : l && c >= nt ? l : void 0,
|
|
535
535
|
x: t.x0,
|
|
536
536
|
y: t.y0,
|
|
537
537
|
rx: f,
|
|
@@ -539,7 +539,7 @@ var Qe = 8, $e = "rgba(250, 250, 250, 0.8)", et = "rgba(60, 60, 60, 0.8)", tt =
|
|
|
539
539
|
width: t.x1 - t.x0,
|
|
540
540
|
height: t.y1 - t.y0,
|
|
541
541
|
fill: d,
|
|
542
|
-
stroke:
|
|
542
|
+
stroke: r,
|
|
543
543
|
strokeWidth: +!s,
|
|
544
544
|
opacity: t.data.opacity ?? 1,
|
|
545
545
|
desc: {
|
|
@@ -552,8 +552,8 @@ var Qe = 8, $e = "rgba(250, 250, 250, 0.8)", et = "rgba(60, 60, 60, 0.8)", tt =
|
|
|
552
552
|
};
|
|
553
553
|
});
|
|
554
554
|
}, at = {
|
|
555
|
-
[
|
|
556
|
-
[
|
|
555
|
+
[d.DESC]: (e, t) => t.height - e.height || (t.value ?? 0) - (e.value ?? 0),
|
|
556
|
+
[d.ASC]: (e, t) => t.height - e.height || (e.value ?? 0) - (t.value ?? 0)
|
|
557
557
|
}, ot = {
|
|
558
558
|
require: [
|
|
559
559
|
"resolver",
|
|
@@ -679,7 +679,7 @@ var Qe = 8, $e = "rgba(250, 250, 250, 0.8)", et = "rgba(60, 60, 60, 0.8)", tt =
|
|
|
679
679
|
}
|
|
680
680
|
};
|
|
681
681
|
function ut(e) {
|
|
682
|
-
e.component(
|
|
682
|
+
e.component(O.Treemap, ot), e.component(H, lt);
|
|
683
683
|
}
|
|
684
684
|
var dt = {
|
|
685
685
|
require: [
|
|
@@ -695,7 +695,7 @@ var dt = {
|
|
|
695
695
|
return e.sources.forEach((e) => {
|
|
696
696
|
t.component(e.component) && t.findShapes(e.selector ?? "").filter((t) => t.key === e.component).forEach((e) => {
|
|
697
697
|
e.attrs && n.push({
|
|
698
|
-
type:
|
|
698
|
+
type: A.Rect,
|
|
699
699
|
height: e.attrs.height,
|
|
700
700
|
width: e.attrs.width,
|
|
701
701
|
x: e.attrs.x,
|
|
@@ -703,7 +703,7 @@ var dt = {
|
|
|
703
703
|
rx: e.attrs.rx,
|
|
704
704
|
ry: e.attrs.ry,
|
|
705
705
|
fill: "transparent",
|
|
706
|
-
stroke:
|
|
706
|
+
stroke: a.mainDarkNavy,
|
|
707
707
|
strokeWidth: 0,
|
|
708
708
|
data: e.data,
|
|
709
709
|
collider: { type: null }
|
|
@@ -713,31 +713,31 @@ var dt = {
|
|
|
713
713
|
}
|
|
714
714
|
};
|
|
715
715
|
function ft(e) {
|
|
716
|
-
e.component(
|
|
716
|
+
e.component(O.Deferred, dt);
|
|
717
717
|
}
|
|
718
|
-
var pt = T(), mt = C(({ vSpec: e, vTheme: t, data: n, elementSize:
|
|
719
|
-
let o = x(), [
|
|
720
|
-
if (!e || !
|
|
721
|
-
let h =
|
|
722
|
-
if (!h &&
|
|
723
|
-
let t = e.dimensions.find((e) => e.dataItem.internalKey ===
|
|
724
|
-
t && (h =
|
|
718
|
+
var pt = T(), mt = C(({ vSpec: e, vTheme: t, data: n, elementSize: i, vizProperties: a }) => {
|
|
719
|
+
let o = x(), [c] = (0, Ee.useState)(() => new Ke()), l = b(), d = t || p, f = w(), m = ue();
|
|
720
|
+
if (!e || !u(e) || !i) return null;
|
|
721
|
+
let h = f.targetDataItemId;
|
|
722
|
+
if (!h && f.targetInternalKey) {
|
|
723
|
+
let t = e.dimensions.find((e) => e.dataItem.internalKey === f.targetInternalKey);
|
|
724
|
+
t && (h = r(t.dataItem));
|
|
725
725
|
}
|
|
726
726
|
let g = {
|
|
727
|
-
...
|
|
728
|
-
valuePickerMode: !!
|
|
727
|
+
...a,
|
|
728
|
+
valuePickerMode: !!f.activeKey,
|
|
729
729
|
valuePickerTargetDataItemId: h ?? void 0
|
|
730
730
|
}, _ = {
|
|
731
|
-
...
|
|
731
|
+
...a,
|
|
732
732
|
disable: {
|
|
733
|
-
...
|
|
733
|
+
...a.disable,
|
|
734
734
|
multiDimSelection: !0
|
|
735
735
|
}
|
|
736
|
-
}, v =
|
|
737
|
-
return v ? /* @__PURE__ */ (0, pt.jsx)(
|
|
736
|
+
}, v = c.compile(e, d, n, i, g, s.Treemap, o, l, m);
|
|
737
|
+
return v ? /* @__PURE__ */ (0, pt.jsx)(oe, {
|
|
738
738
|
config: _,
|
|
739
739
|
definition: v,
|
|
740
|
-
size:
|
|
740
|
+
size: i,
|
|
741
741
|
vSpec: e,
|
|
742
742
|
escobarPlugins: [ut, ft]
|
|
743
743
|
}) : null;
|