@astrato-io/visualizations 0.7.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 -25
- 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-PAoRaJyb.js → requirements-CYpVh65U.js} +330 -302
- 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-DVTJwsTY.js → standalone-BDrQMxLi.js} +623 -614
- 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 +1191 -3
- package/metadata.js +15 -16
- package/operations.js +5 -5
- package/package.json +67 -102
- 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/getters/index.d.ts +3 -3
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +3 -3
- package/src/runtime/index.d.ts +2 -2
- package/src/types.d.ts +4 -8
- package/src/visualization-catalog.d.ts +26 -26
- package/src/web-components/index.d.ts +3 -3
- 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/registry-KervaxqJ.js +0 -31
- 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/web-components-DqClFkgO.js +0 -1185
- package/chunks/with-html-element-D0uY2zjI.js +0 -7328
- package/render.js +0 -10
- package/src/charts/bar.d.ts +0 -1
- package/src/charts/combo.d.ts +0 -1
- package/src/charts/dot.d.ts +0 -1
- package/src/charts/gauge-distribution.d.ts +0 -1
- package/src/charts/gauge.d.ts +0 -1
- package/src/charts/heat-map.d.ts +0 -1
- package/src/charts/histogram.d.ts +0 -1
- package/src/charts/line.d.ts +0 -1
- package/src/charts/pie.d.ts +0 -1
- package/src/charts/radar.d.ts +0 -1
- package/src/charts/sankey.d.ts +0 -1
- package/src/charts/scatter.d.ts +0 -1
- package/src/charts/table.d.ts +0 -1
- package/src/charts/tree.d.ts +0 -1
- package/src/charts/treemap.d.ts +0 -1
- package/src/charts/waterfall.d.ts +0 -1
- package/src/charts/word-cloud.d.ts +0 -1
- package/src/objects/app-filter-bar.d.ts +0 -1
- package/src/objects/date-picker.d.ts +0 -1
- package/src/objects/filter.d.ts +0 -1
- package/src/objects/iframe.d.ts +0 -1
- package/src/objects/image.d.ts +0 -1
- package/src/objects/number.d.ts +0 -1
- package/src/objects/shape.d.ts +0 -1
- package/src/objects/slider.d.ts +0 -1
- package/src/objects/text.d.ts +0 -1
- package/src/registry/create-visualization-registry.d.ts +0 -5
- package/src/render/index.d.ts +0 -34
- /package/chunks/{src-BOS6SqkZ.js → src-BOS6SqkZ2.js} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import { Cs as e,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { r as
|
|
7
|
-
import "./logger-
|
|
8
|
-
import { Bt as b, F as re, Gt as ie, I as ae, L as oe, St as se, Ut as
|
|
9
|
-
import { p as O } from "./with-html-element-
|
|
10
|
-
import "./builder-
|
|
11
|
-
|
|
2
|
+
import { Cs as e, Gn as t, Hi as n, Kt as r, Us as i, Xa as a, Za as o, do as s, jt as c, ws as l, xo as u, zi as d, zr as f } from "./visualization-filters-mVnsnvLP.js";
|
|
3
|
+
import { F as p, Jt as m, N as h, Ot as g, ei as _, jr as v, s as ee } from "./utils-DYYD4Zzf.js";
|
|
4
|
+
import { jm as y } from "./handlers-CMbyj5y1.js";
|
|
5
|
+
import { t as te } from "./stroke-dash-UgMEcCS4.js";
|
|
6
|
+
import { r as ne } from "./extend-preset-BVKFtoe-.js";
|
|
7
|
+
import "./logger-3lng-wOw.js";
|
|
8
|
+
import { Bt as b, F as re, Gt as ie, I as ae, L as oe, St as se, Ut as ce, Wt as le, Y as x, _n as S, an as ue, cn as de, dn as fe, et as pe, i as me, it as he, ln as ge, n as _e, on as C, rn as ve, sn as w, st as T, tt as ye, vt as E, zt as D } from "./escobar-C4Nm3eJ7.js";
|
|
9
|
+
import { p as O } from "./with-html-element-B0Clt4jY.js";
|
|
10
|
+
import "./builder-Dxo7D7c6.js";
|
|
11
|
+
_();
|
|
12
12
|
function k(e) {
|
|
13
13
|
let { measureProps: t, index: n, items: r, vSpec: i } = e, { positive: a, negative: o } = A(t, i), s;
|
|
14
14
|
return s = n === 0 ? r[0] > 0 ? a : o : r[n] > r[n - 1] ? a : o, s;
|
|
@@ -74,16 +74,16 @@ function U(e) {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
function Se(e, t, n) {
|
|
77
|
-
let r = U(I(n)),
|
|
78
|
-
scale: e.orientation ===
|
|
77
|
+
let r = U(I(n)), i = {
|
|
78
|
+
scale: e.orientation === o.Horizontal ? w.XAxisScale : w.YAxisScale,
|
|
79
79
|
ref: "end"
|
|
80
|
-
},
|
|
80
|
+
}, a = j(e, n);
|
|
81
81
|
return {
|
|
82
|
-
type:
|
|
82
|
+
type: S.Box,
|
|
83
83
|
layout: { displayOrder: b.VisualizationElement },
|
|
84
84
|
key: R(n),
|
|
85
85
|
data: r,
|
|
86
|
-
settings: W(e, t, H,
|
|
86
|
+
settings: W(e, t, H, i, a),
|
|
87
87
|
animations: {
|
|
88
88
|
enabled: !0,
|
|
89
89
|
presetId: V
|
|
@@ -92,15 +92,15 @@ function Se(e, t, n) {
|
|
|
92
92
|
}
|
|
93
93
|
function Ce(e, t) {
|
|
94
94
|
let n = U(L), r = {
|
|
95
|
-
scale: e.orientation ===
|
|
95
|
+
scale: e.orientation === o.Horizontal ? w.XAxisScale : w.YAxisScale,
|
|
96
96
|
ref: "end"
|
|
97
|
-
},
|
|
97
|
+
}, i = e.total.color;
|
|
98
98
|
return {
|
|
99
|
-
type:
|
|
99
|
+
type: S.Box,
|
|
100
100
|
layout: { displayOrder: b.VisualizationElement },
|
|
101
101
|
key: z,
|
|
102
102
|
data: n,
|
|
103
|
-
settings: W(e, t, H, r,
|
|
103
|
+
settings: W(e, t, H, r, i),
|
|
104
104
|
animations: {
|
|
105
105
|
enabled: !0,
|
|
106
106
|
presetId: V
|
|
@@ -108,7 +108,7 @@ function Ce(e, t) {
|
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
var we = (e, t, n, r) => ({
|
|
111
|
-
type:
|
|
111
|
+
type: S.Box,
|
|
112
112
|
layout: { displayOrder: b.VisualizationElement },
|
|
113
113
|
key: E(e, t, l.Waterfall),
|
|
114
114
|
data: r,
|
|
@@ -117,16 +117,16 @@ var we = (e, t, n, r) => ({
|
|
|
117
117
|
enabled: !0,
|
|
118
118
|
presetId: V
|
|
119
119
|
}
|
|
120
|
-
}), W = (e,
|
|
121
|
-
let
|
|
122
|
-
orientation: e.orientation ??
|
|
120
|
+
}), W = (e, t, r, i, a) => {
|
|
121
|
+
let s = {
|
|
122
|
+
orientation: e.orientation ?? o.Vertical,
|
|
123
123
|
major: r,
|
|
124
|
-
minor:
|
|
124
|
+
minor: i,
|
|
125
125
|
box: {
|
|
126
126
|
minWidthPx: 2,
|
|
127
127
|
ref: "",
|
|
128
|
-
rx:
|
|
129
|
-
fill:
|
|
128
|
+
rx: c(e.barSettings.barRadius, 0),
|
|
129
|
+
fill: a,
|
|
130
130
|
stacked: !1,
|
|
131
131
|
grouped: !1,
|
|
132
132
|
boxPadding: e.barSettings.barPadding ?? 0,
|
|
@@ -137,97 +137,97 @@ var we = (e, t, n, r) => ({
|
|
|
137
137
|
ignoreOutOfBounds: e.barSettings.ignoreOutOfBounds ?? !1
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
return e.barSettings?.strokeEnabled ? (
|
|
140
|
+
return e.barSettings?.strokeEnabled ? (s.box.stroke = be(t, e.barSettings?.strokeColor ?? ""), s.box.strokeWidth = e.barSettings?.strokeWidth) : s.box.stroke = n.transparent, s;
|
|
141
141
|
}, G = "collection-no-dimension", K = "onlyMeasures";
|
|
142
|
-
|
|
142
|
+
y.Inside, y.Outside, y.Opposite;
|
|
143
143
|
function q(e, t) {
|
|
144
|
-
let
|
|
145
|
-
return
|
|
146
|
-
let o =
|
|
144
|
+
let n = e.measures.filter((e) => f(e));
|
|
145
|
+
return n.filter((r, a) => {
|
|
146
|
+
let o = i(r.dataItem), s = t[0].items[0][o], c = e.measureProps[o];
|
|
147
147
|
if (a === 0) return !!s || !c?.hideIfEmpty;
|
|
148
|
-
let l = n
|
|
148
|
+
let l = i(n[a - 1].dataItem);
|
|
149
149
|
return s !== t[0].items[0][l] || !c?.hideIfEmpty;
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
var Te = (e,
|
|
153
|
-
|
|
152
|
+
var Te = (e, n, r, i, o, s, c, l) => {
|
|
153
|
+
r = ce(e, n, r, i, o, s, c, l);
|
|
154
154
|
let u = [], d = [];
|
|
155
155
|
if ("axes" in e) {
|
|
156
|
-
let
|
|
157
|
-
if (!
|
|
158
|
-
let i = C(e) ?
|
|
159
|
-
if (u.push(
|
|
160
|
-
...
|
|
161
|
-
...
|
|
162
|
-
}, i)),
|
|
163
|
-
let
|
|
164
|
-
if (
|
|
165
|
-
let
|
|
166
|
-
d.push(ie(
|
|
167
|
-
...
|
|
168
|
-
...
|
|
169
|
-
}, void 0,
|
|
156
|
+
let r = e.axes?.dimension || {};
|
|
157
|
+
if (!r.disabled) {
|
|
158
|
+
let i = C(e) ? a.Left : a.Bottom;
|
|
159
|
+
if (u.push(le(K, r, {
|
|
160
|
+
...n.axis.measure,
|
|
161
|
+
...n.fonts
|
|
162
|
+
}, i)), r.showAxisName) {
|
|
163
|
+
let a = e.measures.filter((e) => f(e)), o = a.length ? a : e.measures;
|
|
164
|
+
if (o.length) {
|
|
165
|
+
let a = t(e.measures, !!e.enableAlternate, s?.isPrintMode);
|
|
166
|
+
d.push(ie(o, a, i, {
|
|
167
|
+
...n.axis.measure,
|
|
168
|
+
...n.fonts
|
|
169
|
+
}, void 0, r.axisTitle ?? "Measures", r.titleFontSize, "waterfall-measures-axis-label"));
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
return {
|
|
175
|
-
...
|
|
175
|
+
...r,
|
|
176
176
|
components: [
|
|
177
|
-
...
|
|
177
|
+
...r.components,
|
|
178
178
|
...u,
|
|
179
179
|
...d
|
|
180
180
|
]
|
|
181
181
|
};
|
|
182
|
-
}, Ee = (e, t,
|
|
183
|
-
if (!
|
|
184
|
-
let
|
|
185
|
-
(e.axes?.primaryMeasure?.axisRange?.axisRangeOption ?? u.Auto) === u.Auto && (C(e) ?
|
|
182
|
+
}, Ee = (e, t, n, a, o) => {
|
|
183
|
+
if (!o) return n;
|
|
184
|
+
let s = x(e, {});
|
|
185
|
+
(e.axes?.primaryMeasure?.axisRange?.axisRangeOption ?? u.Auto) === u.Auto && (C(e) ? s[w.XAxisScale].expand = .3 : s[w.YAxisScale].expand = .3);
|
|
186
186
|
let c = [];
|
|
187
|
-
return q(e,
|
|
188
|
-
let
|
|
187
|
+
return q(e, o).forEach((t, n) => {
|
|
188
|
+
let a = i(t.dataItem), o = r(t);
|
|
189
189
|
c.push({
|
|
190
|
-
value:
|
|
191
|
-
label:
|
|
190
|
+
value: a,
|
|
191
|
+
label: o || t.label || t.dataItem.name
|
|
192
192
|
});
|
|
193
|
-
let
|
|
194
|
-
|
|
195
|
-
value: I(
|
|
196
|
-
label:
|
|
193
|
+
let s = e.measureProps[a];
|
|
194
|
+
s?.subTotalEnabled && c.push({
|
|
195
|
+
value: I(n),
|
|
196
|
+
label: s?.subTotalLabel || "Sub-Total"
|
|
197
197
|
});
|
|
198
198
|
}), e.total.enabled && c.push({
|
|
199
199
|
value: L,
|
|
200
200
|
label: e.total.label || "Total"
|
|
201
|
-
}),
|
|
201
|
+
}), s.onlyMeasures = {
|
|
202
202
|
data: { items: c },
|
|
203
203
|
padding: e.barSettings.barPadding ?? 0,
|
|
204
|
-
type:
|
|
204
|
+
type: fe.Band,
|
|
205
205
|
value: (e) => `${e.datum.value.value}`,
|
|
206
206
|
label: (e) => `${e.datum.value.label}`
|
|
207
207
|
}, {
|
|
208
|
-
...
|
|
209
|
-
scales:
|
|
208
|
+
...n,
|
|
209
|
+
scales: s
|
|
210
210
|
};
|
|
211
|
-
}, J = "measures", De = (e, t,
|
|
212
|
-
if (!a) return
|
|
211
|
+
}, J = "measures", De = (e, t, n, r, a) => {
|
|
212
|
+
if (!a) return n;
|
|
213
213
|
let o = [], s, c = q(e, a), l = ae((e.supportingMeasures ?? []).filter((e) => f(e)));
|
|
214
|
-
if (c.forEach((t,
|
|
215
|
-
let
|
|
216
|
-
if (
|
|
217
|
-
else if (s === "start") a = { field:
|
|
214
|
+
if (c.forEach((t, n) => {
|
|
215
|
+
let r = i(t.dataItem), a, u;
|
|
216
|
+
if (n === 0) a = 0, u = { field: r }, s = "end";
|
|
217
|
+
else if (s === "start") a = { field: i(c[n - 1].dataItem) }, u = { field: r }, s = "end";
|
|
218
218
|
else {
|
|
219
|
-
let e =
|
|
220
|
-
a = { field:
|
|
219
|
+
let e = i(c[n - 1].dataItem);
|
|
220
|
+
a = { field: r }, u = { field: e }, s = "start";
|
|
221
221
|
}
|
|
222
222
|
o.push({
|
|
223
|
-
field:
|
|
223
|
+
field: r,
|
|
224
224
|
props: {
|
|
225
225
|
stackKey: J,
|
|
226
|
-
[
|
|
226
|
+
[r]: { field: r },
|
|
227
227
|
...l,
|
|
228
|
-
series:
|
|
228
|
+
series: r,
|
|
229
229
|
start: a,
|
|
230
|
-
color:
|
|
230
|
+
color: r,
|
|
231
231
|
end: u,
|
|
232
232
|
secondaryAxis: t.secondaryAxis,
|
|
233
233
|
isMultipleMeasures: !0,
|
|
@@ -235,10 +235,10 @@ var Te = (e, t, n, i, a, o, s, l) => {
|
|
|
235
235
|
reverted: s === "start"
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
|
-
let d = e.measureProps[
|
|
238
|
+
let d = e.measureProps[r];
|
|
239
239
|
if (d?.subTotalEnabled) {
|
|
240
|
-
let e = I(
|
|
241
|
-
s === "end" ? (t = 0,
|
|
240
|
+
let e = I(n), t, i;
|
|
241
|
+
s === "end" ? (t = 0, i = { field: r }) : (t = { field: r }, i = 0), o.push({
|
|
242
242
|
field: e,
|
|
243
243
|
props: {
|
|
244
244
|
stackKey: J,
|
|
@@ -246,7 +246,7 @@ var Te = (e, t, n, i, a, o, s, l) => {
|
|
|
246
246
|
series: e,
|
|
247
247
|
start: t,
|
|
248
248
|
color: e,
|
|
249
|
-
end:
|
|
249
|
+
end: i,
|
|
250
250
|
secondaryAxis: !1,
|
|
251
251
|
isMultipleMeasures: !0,
|
|
252
252
|
label: d?.subTotalLabel || "Sub-Total",
|
|
@@ -256,16 +256,16 @@ var Te = (e, t, n, i, a, o, s, l) => {
|
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
}), e.total.enabled) {
|
|
259
|
-
let t =
|
|
260
|
-
s === "end" ? (
|
|
259
|
+
let t = i(c[c.length - 1].dataItem), n, r;
|
|
260
|
+
s === "end" ? (n = 0, r = { field: t }) : (n = { field: t }, r = 0), o.push({
|
|
261
261
|
field: L,
|
|
262
262
|
props: {
|
|
263
263
|
stackKey: J,
|
|
264
264
|
...l,
|
|
265
265
|
series: L,
|
|
266
|
-
start:
|
|
266
|
+
start: n,
|
|
267
267
|
color: L,
|
|
268
|
-
end:
|
|
268
|
+
end: r,
|
|
269
269
|
secondaryAxis: !1,
|
|
270
270
|
isMultipleMeasures: !0,
|
|
271
271
|
label: e.total.label || "Total",
|
|
@@ -279,41 +279,41 @@ var Te = (e, t, n, i, a, o, s, l) => {
|
|
|
279
279
|
data: { extract: o }
|
|
280
280
|
};
|
|
281
281
|
return {
|
|
282
|
-
...
|
|
282
|
+
...n,
|
|
283
283
|
collections: [u]
|
|
284
284
|
};
|
|
285
|
-
}, Oe = (e, t,
|
|
286
|
-
if (!a) return
|
|
287
|
-
let o = Object.values(a[0].items[0]), s = q(e, a).reduce((
|
|
288
|
-
let s =
|
|
289
|
-
scale:
|
|
285
|
+
}, Oe = (e, t, n, r, a) => {
|
|
286
|
+
if (!a) return n;
|
|
287
|
+
let o = Object.values(a[0].items[0]), s = q(e, a).reduce((n, r, a) => {
|
|
288
|
+
let s = i(r.dataItem), c = U(s), l = {
|
|
289
|
+
scale: ue(e, r),
|
|
290
290
|
ref: "end"
|
|
291
291
|
}, u = k({
|
|
292
292
|
measureProps: e.measureProps[s],
|
|
293
293
|
index: a,
|
|
294
294
|
items: o,
|
|
295
295
|
vSpec: e
|
|
296
|
-
}), d = [...
|
|
297
|
-
return d.push(we(e,
|
|
296
|
+
}), d = [...n], f = W(e, t, H, l, u);
|
|
297
|
+
return d.push(we(e, r, f, c)), e.measureProps[s]?.subTotalEnabled && d.push(Se(e, t, a)), d;
|
|
298
298
|
}, []);
|
|
299
299
|
return e.total.enabled && s.push(Ce(e, t)), {
|
|
300
|
-
...
|
|
301
|
-
components: [...
|
|
300
|
+
...n,
|
|
301
|
+
components: [...n.components, ...s]
|
|
302
302
|
};
|
|
303
|
-
}, Y = [{ position:
|
|
304
|
-
position:
|
|
303
|
+
}, Y = [{ position: y.Outside }, {
|
|
304
|
+
position: y.Inside,
|
|
305
305
|
justify: 1
|
|
306
|
-
}], ke = (e, t,
|
|
307
|
-
if (!a) return
|
|
306
|
+
}], ke = (e, t, n, r, a) => {
|
|
307
|
+
if (!a) return n;
|
|
308
308
|
let o = [], s = q(e, a);
|
|
309
|
-
return s.forEach((
|
|
310
|
-
if (!
|
|
311
|
-
o.push(Me(e, t,
|
|
312
|
-
let a = n
|
|
313
|
-
e.measureProps[a]?.subTotalEnabled && o.push(je(e, t,
|
|
309
|
+
return s.forEach((n, r) => {
|
|
310
|
+
if (!n.dataLabels?.show) return;
|
|
311
|
+
o.push(Me(e, t, n, r));
|
|
312
|
+
let a = i(n.dataItem);
|
|
313
|
+
e.measureProps[a]?.subTotalEnabled && o.push(je(e, t, n, r));
|
|
314
314
|
}), e.total.enabled && e.total.showDataLabel && o.push(Ae(e, t, s)), {
|
|
315
|
-
...
|
|
316
|
-
components: [...
|
|
315
|
+
...n,
|
|
316
|
+
components: [...n.components, ...o]
|
|
317
317
|
};
|
|
318
318
|
}, X = {
|
|
319
319
|
layout: { displayOrder: b.Labels },
|
|
@@ -326,7 +326,7 @@ function Ae(e, t, n) {
|
|
|
326
326
|
let r = n[n.length - 1], i = B(r);
|
|
327
327
|
return {
|
|
328
328
|
...X,
|
|
329
|
-
type:
|
|
329
|
+
type: S.Labels,
|
|
330
330
|
key: "bar-labels-normal-total",
|
|
331
331
|
settings: Z(e, t, z, i, e.total?.showLabelBackdrop, e.total?.labelFontSize)
|
|
332
332
|
};
|
|
@@ -334,7 +334,7 @@ function Ae(e, t, n) {
|
|
|
334
334
|
function je(e, t, n, r) {
|
|
335
335
|
return {
|
|
336
336
|
...X,
|
|
337
|
-
type:
|
|
337
|
+
type: S.Labels,
|
|
338
338
|
key: `bar-labels-normal-${r}-sub`,
|
|
339
339
|
settings: Z(e, t, R(r), B(n), n.dataLabels?.showBackdrop, n.dataLabels?.size)
|
|
340
340
|
};
|
|
@@ -343,20 +343,20 @@ function Me(e, t, n, r) {
|
|
|
343
343
|
let i = E(e, n, l.Waterfall);
|
|
344
344
|
return {
|
|
345
345
|
...X,
|
|
346
|
-
type:
|
|
346
|
+
type: S.Labels,
|
|
347
347
|
key: `bar-labels-normal-${r}`,
|
|
348
348
|
settings: Z(e, t, i, B(n), n.dataLabels?.showBackdrop, n.dataLabels?.size)
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function Z(e, t, n, r, i = !1, a =
|
|
351
|
+
function Z(e, t, n, r, i = !1, a = de.dataPoint.valueFontSize) {
|
|
352
352
|
return { sources: [{
|
|
353
353
|
component: n,
|
|
354
|
-
selector:
|
|
354
|
+
selector: ge.Rect,
|
|
355
355
|
strategy: {
|
|
356
356
|
type: "bar",
|
|
357
357
|
settings: {
|
|
358
358
|
direction: Ne(e),
|
|
359
|
-
fontSize:
|
|
359
|
+
fontSize: ve(a),
|
|
360
360
|
fontFamily: t.fonts.general.fontFamily,
|
|
361
361
|
labels: [{
|
|
362
362
|
label: r,
|
|
@@ -374,11 +374,11 @@ function Ne(e) {
|
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
var Pe = {
|
|
377
|
-
curve:
|
|
377
|
+
curve: s.Linear,
|
|
378
378
|
line: {
|
|
379
|
-
stroke:
|
|
379
|
+
stroke: n.grey1,
|
|
380
380
|
strokeWidth: 2,
|
|
381
|
-
strokeDasharray:
|
|
381
|
+
strokeDasharray: te({
|
|
382
382
|
space: 1,
|
|
383
383
|
width: 4
|
|
384
384
|
}),
|
|
@@ -395,7 +395,7 @@ var Pe = {
|
|
|
395
395
|
let r = n.collections[0].data.extract, i = "end", a = r.slice(0, -1).map((t, n) => {
|
|
396
396
|
let a = i;
|
|
397
397
|
return r[n + 1].props?.subTotal || (i = i === "start" ? "end" : "start"), {
|
|
398
|
-
type:
|
|
398
|
+
type: S.Line,
|
|
399
399
|
layout: { displayOrder: b.VisualizationElement },
|
|
400
400
|
key: `${l.Line}.${n}`,
|
|
401
401
|
data: {
|
|
@@ -418,34 +418,34 @@ function Re(e, t) {
|
|
|
418
418
|
coordinates: {
|
|
419
419
|
major: Fe,
|
|
420
420
|
minor: {
|
|
421
|
-
scale: n ?
|
|
421
|
+
scale: n ? w.XAxisScale : w.YAxisScale,
|
|
422
422
|
ref: t
|
|
423
423
|
}
|
|
424
424
|
},
|
|
425
|
-
orientation: n ?
|
|
425
|
+
orientation: n ? o.Vertical : o.Horizontal
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
var ze = (e, t, n) => {
|
|
429
429
|
let r = e.measures.filter(f), i = r.map((t) => E(e, t, l.Waterfall));
|
|
430
|
-
return
|
|
430
|
+
return pe(e, t, n, {
|
|
431
431
|
filter: (e) => e.filter((e) => e.data?.subTotal?.value || i.findIndex((t) => t === e.key) !== -1),
|
|
432
432
|
placement: {
|
|
433
433
|
type: "bounds",
|
|
434
434
|
area: "target"
|
|
435
435
|
},
|
|
436
|
-
extract:
|
|
436
|
+
extract: ye({
|
|
437
437
|
...e,
|
|
438
438
|
measures: r
|
|
439
439
|
}, t, Be, () => "")
|
|
440
|
-
}, `tooltip-${
|
|
441
|
-
}, Be = (e, t,
|
|
442
|
-
let { formatter: u } =
|
|
443
|
-
let
|
|
444
|
-
if (!
|
|
445
|
-
let
|
|
446
|
-
return !l && e?.formatter && u ?
|
|
447
|
-
label:
|
|
448
|
-
value:
|
|
440
|
+
}, `tooltip-${S.Box}`);
|
|
441
|
+
}, Be = (e, t, n, a, o, s, c, l) => {
|
|
442
|
+
let { formatter: u } = n, d = t.data, f = he(n), p = e.filter((e) => !f.has(i(e.dataItem))), m = e.filter((e) => f.has(i(e.dataItem))).flatMap((e) => {
|
|
443
|
+
let n = i(e.dataItem), a = Object.keys(t.data).find((e) => t.data[e]?.source?.field === n);
|
|
444
|
+
if (!a) return [];
|
|
445
|
+
let o = t.data[a]?.value, s = o;
|
|
446
|
+
return !l && e?.formatter && u ? s = u(e.formatter)(o) : l && u && (s = u(T(e?.formatter))(o)), [{
|
|
447
|
+
label: r(e) || e.label || e.dataItem.name || "",
|
|
448
|
+
value: s
|
|
449
449
|
}];
|
|
450
450
|
});
|
|
451
451
|
if (d.subTotal.value) {
|
|
@@ -462,10 +462,10 @@ var ze = (e, t, n) => {
|
|
|
462
462
|
value: r
|
|
463
463
|
}, ...m];
|
|
464
464
|
} else {
|
|
465
|
-
let t = d.series.value.toString(),
|
|
466
|
-
return !l &&
|
|
467
|
-
label: (
|
|
468
|
-
value:
|
|
465
|
+
let t = d.series.value.toString(), n = e.find((e) => i(e.dataItem) === t), a = (d.reverted.value ? -1 : 1) * (d.end.value - d.start.value), o = a;
|
|
466
|
+
return !l && n?.formatter && u ? o = u(n.formatter)(a) : l && u && (o = u(T(n?.formatter))(a)), [{
|
|
467
|
+
label: (n ? r(n) : "") || n?.label || n?.dataItem.name || "",
|
|
468
|
+
value: o
|
|
469
469
|
}, ...m];
|
|
470
470
|
}
|
|
471
471
|
}, Ve = class extends re {
|
|
@@ -490,24 +490,24 @@ var ze = (e, t, n) => {
|
|
|
490
490
|
let r = t + n[n.length - 1][1];
|
|
491
491
|
n.push([e, r]);
|
|
492
492
|
}
|
|
493
|
-
}), t[0].items[0] = Object.fromEntries(n), He(e) && (e.measureProps =
|
|
493
|
+
}), t[0].items[0] = Object.fromEntries(n), He(e) && (e.measureProps = ne);
|
|
494
494
|
}
|
|
495
495
|
};
|
|
496
496
|
function He(e) {
|
|
497
497
|
return e.measures.filter((e) => f(e)).every((e) => e.dataItem.internalKey.startsWith("internalKeyMeasure"));
|
|
498
498
|
}
|
|
499
|
-
var Q =
|
|
500
|
-
let o =
|
|
499
|
+
var Q = v(), Ue = new Ve(), We = g(({ vSpec: t, vTheme: n, data: r, elementSize: i, vizProperties: a }) => {
|
|
500
|
+
let o = h(), { activeKey: s } = ee(), c = p(), u = m(), f = _e();
|
|
501
501
|
if (!r) return null;
|
|
502
502
|
if (!a.isFetchingData && $(r)) return /* @__PURE__ */ (0, Q.jsx)(O, { vBackendAPI: u });
|
|
503
503
|
if ($(r) || !t || !e(t) || !i) return null;
|
|
504
|
-
let
|
|
504
|
+
let g = {
|
|
505
505
|
...a,
|
|
506
506
|
valuePickerMode: !!s
|
|
507
|
-
},
|
|
508
|
-
return
|
|
509
|
-
config:
|
|
510
|
-
definition:
|
|
507
|
+
}, _ = n || d, v = Ue.compile(t, _, structuredClone(r), i, g, l.Waterfall, o, c, f);
|
|
508
|
+
return v ? /* @__PURE__ */ (0, Q.jsx)(me, {
|
|
509
|
+
config: g,
|
|
510
|
+
definition: v,
|
|
511
511
|
size: i,
|
|
512
512
|
vSpec: t
|
|
513
513
|
}) : null;
|