@astrato-io/visualizations 0.10.1 → 0.12.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/CHANGELOG.md +30 -1
- package/README.md +148 -5
- package/THIRD_PARTY_NOTICES.md +494 -0
- package/VISUALIZATION_DEFINITIONS.md +9 -146
- package/chunks/{Button-Dn3rJrYf.js → Button-CQdoKSXX.js} +3 -3
- package/chunks/{CircularProgress-BFeu06Yb.js → CircularProgress-DpT1lwWw.js} +20 -20
- package/chunks/FieldTypeIcon-Cg4F9Q5D.js +22 -0
- package/chunks/{LinearProgress-ClO6GUjN.js → LinearProgress-B7S0Q26A.js} +14 -14
- package/chunks/{MenuOption-Czc34u4q.js → MenuOption-DpKFJxmo.js} +167 -167
- package/chunks/{Title-BgYnaVTR.js → Title-m5damhc0.js} +37 -37
- package/chunks/{_createAggregator-BMu9uRax.js → _createAggregator-BA8_iU9q.js} +17 -17
- package/chunks/{app-filter-bar.compiler-CVir0wkl.js → app-filter-bar.compiler--T4Qz3Wu.js} +8 -8
- package/chunks/{bar-layout-C_UgRlVl.js → bar-layout-OFhxn2Go.js} +2 -2
- package/chunks/{bar.compiler-DYuFdi9J.js → bar.compiler-hWZBYYvV.js} +71 -69
- package/chunks/{builder-C-TKA-My.js → builder-7w_bgV_h.js} +106 -55
- package/chunks/{coloring-BtnPiQ_o.js → coloring-Cd6p0GQJ.js} +93 -88
- package/chunks/{createSimplePaletteValueFilter--zrZxRV9.js → createSimplePaletteValueFilter-CiJT8s1s.js} +169 -169
- package/chunks/defaults-CMFqXvaJ.js +3 -0
- package/chunks/{definitions-CT304NDn.js → definitions-DTauTjIX.js} +399 -398
- package/chunks/{escobar-CvEV2ES1.js → escobar-CMvphKSK.js} +4949 -4879
- package/chunks/{extend-preset-D9-JP92b.js → extend-preset-BpXttHFk.js} +449 -450
- package/chunks/{filter.compiler-CXeZznks.js → filter.compiler-DOGFweJz.js} +10 -10
- package/chunks/{filtering-8_bFv-jb.js → filtering-NOnDcGbo.js} +241 -241
- package/chunks/handlers-CyYFSfhM.js +15393 -0
- package/chunks/{icon-picker-styles-BXiJ1SZS.js → icon-picker-styles-DuSERhBU.js} +8 -8
- package/chunks/{isEqual-D8Ay63xR.js → isEqual-4f8yUUtC.js} +1 -1
- package/chunks/{isFocusVisible-Bu8gGZu5.js → isFocusVisible-Czm70MGc.js} +9 -9
- package/chunks/line.compiler-B-4H55_T.js +203 -0
- package/chunks/linear-Bq_r9l5S.js +264 -0
- package/chunks/{logger-DdZpR7xZ.js → logger-Cioob-QV.js} +74 -73
- package/chunks/{lookup-BWllin0q.js → lookup-B3tWH2hX.js} +1 -0
- package/chunks/{map.compiler-Q_Y1Pvat.js → map.compiler-Cv5V6EhF.js} +40 -40
- package/chunks/measure-axis-label-format-COy8U_dd.js +27 -0
- package/chunks/measure-format-default-B_kuGSzi.js +26 -0
- package/chunks/{metadata-BQm_TXI1.js → metadata-dGSe5UWy.js} +5 -5
- package/chunks/number.compiler-D7nMcEMv.js +57 -0
- package/chunks/{operations-DKQWuLL7.js → operations-CgfehCad.js} +11397 -11114
- package/chunks/{range-BdhzvYQ_.js → range-Dmwp9kVB.js} +2 -2
- package/chunks/{react-dom-BGP4tbXV.js → react-dom-CfuL-m78.js} +82 -82
- package/chunks/{render-wrappers-BZpyDnJy.js → render-wrappers--g-zPFBW.js} +1 -1
- package/chunks/{requirements-e8Fe96ag.js → requirements-DHayNJ2C.js} +245 -221
- package/chunks/{shared-C_2F90xq.js → shared-DoEN9nNM.js} +505 -494
- package/chunks/standalone-B3hRGgYi.js +773 -0
- package/chunks/{standalone-BkbiH-o8.js → standalone-BPNXgFft.js} +498 -759
- package/chunks/standalone-BPTT8XEu.js +424 -0
- package/chunks/standalone-BgAeHROc.js +2 -0
- package/chunks/{standalone-BE_ONgiG.js → standalone-BkQxag7M.js} +102 -102
- package/chunks/{standalone-Cc98Pdr6.js → standalone-Bxa3x6dg.js} +872 -872
- package/chunks/standalone-C0If-V6O.js +773 -0
- package/chunks/standalone-C1TOyflX.js +287 -0
- package/chunks/{standalone-CY_kjarf.js → standalone-CE5PwJN0.js} +18 -18
- package/chunks/{standalone-B8ZSqauS.js → standalone-CG7IFN6n.js} +120 -120
- package/chunks/{standalone-wOWRCpdn.js → standalone-CKlgGu80.js} +49 -49
- package/chunks/standalone-CNf-oA2U.js +355 -0
- package/chunks/{standalone-BDrXVxlP.js → standalone-CXPdWFlw.js} +14 -14
- package/chunks/{standalone-z0o52o5t.js → standalone-Cf0_5tbu.js} +5567 -5568
- package/chunks/{standalone-Cl0TSfqC.js → standalone-DMi4-Vp3.js} +122 -122
- package/chunks/{standalone-DNh9NcMa.js → standalone-DTEX67C8.js} +154 -154
- package/chunks/{standalone-DHRalbVO.js → standalone-DU46-kYv.js} +279 -279
- package/chunks/standalone-Dbn3jSH6.js +690 -0
- package/chunks/{standalone-CsoMmE9T.js → standalone-DdcAL_k_.js} +839 -843
- package/chunks/standalone-DwCIA0UG.js +1057 -0
- package/chunks/standalone-Dz13tl3P.js +357 -0
- package/chunks/standalone-H9GFzFk_.js +8377 -0
- package/chunks/{standalone-CaTxAydz.js → standalone-MduR0qre.js} +2227 -1000
- package/chunks/standalone-ejTz66P3.js +2 -0
- package/chunks/{standalone-DflyWtuR.js → standalone-keB-0wK3.js} +216 -216
- package/chunks/{standalone-BTY3w_JA.js → standalone-nnkuQd0K.js} +28 -28
- package/chunks/standalone-vGGR6Vcn.js +6 -0
- package/chunks/{table.compiler-COaHE9VD.js → table.compiler-mS4UvhLT.js} +31 -31
- package/chunks/theme-MYp6Rj1J.js +232 -0
- package/chunks/{useFieldName-CdnCWzhd.js → useFieldName-AdSak4Ch.js} +1 -1
- package/chunks/{utils-DganVptf.js → utils-CUKgR7it.js} +4216 -4070
- package/chunks/{view-Bzlros43.js → view-BeYwpcVD.js} +1561 -1561
- package/chunks/{visualization-filters-D7i6oh1Z.js → visualization-filters-B9qik5_K.js} +2683 -2342
- package/chunks/{with-html-element-CiIhFEa5.js → with-html-element-1GSeLT59.js} +3712 -3682
- package/definitions.js +2 -2
- package/docs/operations/astrato-app-filter-bar.md +1 -1
- package/docs/operations/bar.md +144 -32
- package/docs/operations/combo.md +79 -17
- package/docs/operations/date-picker.md +4 -4
- package/docs/operations/distribution-gauge.md +18 -16
- package/docs/operations/dot.md +107 -24
- package/docs/operations/filter.md +10 -8
- package/docs/operations/gauge.md +20 -18
- package/docs/operations/heatMap.md +73 -21
- package/docs/operations/histogram.md +45 -12
- package/docs/operations/iframe.md +1 -1
- package/docs/operations/image.md +1 -1
- package/docs/operations/index.md +12 -11
- package/docs/operations/line.md +86 -24
- package/docs/operations/map.md +5274 -0
- package/docs/operations/number.md +10 -9
- package/docs/operations/pie.md +23 -21
- package/docs/operations/radar.md +13 -11
- package/docs/operations/sankey.md +19 -17
- package/docs/operations/scatter.md +111 -28
- package/docs/operations/shape.md +5 -5
- package/docs/operations/simpleTextObject.md +4 -4
- package/docs/operations/slider.md +1 -1
- package/docs/operations/table.md +27 -25
- package/docs/operations/tree.md +5 -3
- package/docs/operations/treemap.md +70 -18
- package/docs/operations/waterfall.md +40 -7
- package/docs/operations/word-cloud.md +69 -17
- package/getters.js +3 -3
- package/index.js +585 -612
- package/metadata.js +2 -2
- package/operations.js +25 -18
- package/package.json +74 -70
- package/src/definitions/index.d.ts +1 -7
- package/src/definitions/model/definitions/descriptors/descriptor-metadata.d.ts +3 -48
- package/src/definitions/model/definitions/schema-registry.d.ts +15 -14
- package/src/definitions/model/definitions/schemas/bar.schema.d.ts +3 -3
- package/src/definitions/model/definitions/schemas/broad-chart.schema.d.ts +2 -2
- package/src/definitions/model/definitions/schemas/common.schema.d.ts +19 -6
- package/src/definitions/model/definitions/schemas/index.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/line.schema.d.ts +4 -3
- package/src/definitions/model/definitions/schemas/number.schema.d.ts +1 -1
- package/src/definitions/model/definitions/schemas/table.schema.d.ts +14 -14
- package/src/index.d.ts +1 -1
- package/src/operations/index.d.ts +11 -1
- package/src/types.d.ts +166 -1
- package/src/visualization-catalog.d.ts +3 -0
- package/styles.css +1 -1
- package/chunks/FieldTypeIcon-DrMoGpHJ.js +0 -22
- package/chunks/color-rules-DYJL4fIW.js +0 -15
- package/chunks/color-settings-DJFoFTip.js +0 -5
- package/chunks/defaults-Dtk7fg3C.js +0 -3
- package/chunks/handlers-C6CZ0XJA.js +0 -15399
- package/chunks/line.compiler-DmHpmQCC.js +0 -198
- package/chunks/number.compiler-DQdg6zTy.js +0 -53
- package/chunks/standalone-4MsKiqs0.js +0 -355
- package/chunks/standalone-B794g9pE.js +0 -1012
- package/chunks/standalone-BA2YXyJS.js +0 -422
- package/chunks/standalone-BgumbdaJ2.js +0 -357
- package/chunks/standalone-Blh4qejk.js +0 -689
- package/chunks/standalone-CXY4FpF7.js +0 -773
- package/chunks/standalone-DH0xTEes.js +0 -2
- package/chunks/standalone-DcnHjNnC.js +0 -2
- package/chunks/standalone-DrHdGkY7.js +0 -762
- package/chunks/standalone-c_rROMtx.js +0 -287
- package/chunks/standalone-drcFLeN6.js +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
var o = /* @__PURE__ */ e(
|
|
2
|
+
import { Ua as t } from "./visualization-filters-B9qik5_K.js";
|
|
3
|
+
import { G as n, di as r, fi as i, ui as a } from "./utils-CUKgR7it.js";
|
|
4
|
+
var o = /* @__PURE__ */ e(i());
|
|
5
5
|
o.forwardRef(function(e, t) {
|
|
6
6
|
return o.createElement("img", {
|
|
7
7
|
...e,
|
|
@@ -2127,13 +2127,13 @@ n({ wrapper: {
|
|
|
2127
2127
|
flexGrow: 1
|
|
2128
2128
|
},
|
|
2129
2129
|
scrollableIconList: {
|
|
2130
|
-
...
|
|
2130
|
+
...a.propertiesPanel,
|
|
2131
2131
|
paddingBottom: 24,
|
|
2132
2132
|
maxHeight: 552
|
|
2133
2133
|
},
|
|
2134
2134
|
categorySection: { margin: "0 15px" },
|
|
2135
2135
|
categoryLabel: {
|
|
2136
|
-
...
|
|
2136
|
+
...r.normal13,
|
|
2137
2137
|
textTransform: "capitalize",
|
|
2138
2138
|
padding: "16px 0 8px"
|
|
2139
2139
|
},
|
|
@@ -2187,12 +2187,12 @@ n({ wrapper: {
|
|
|
2187
2187
|
textAlign: "center"
|
|
2188
2188
|
},
|
|
2189
2189
|
noIconsParagraph: {
|
|
2190
|
-
...
|
|
2190
|
+
...r.normal13,
|
|
2191
2191
|
color: t.grey1,
|
|
2192
2192
|
wordWrap: "break-word"
|
|
2193
2193
|
},
|
|
2194
2194
|
noIconsQuery: {
|
|
2195
|
-
...
|
|
2195
|
+
...r.normal13,
|
|
2196
2196
|
color: t.mainDarkNavy
|
|
2197
2197
|
},
|
|
2198
2198
|
emptyIcon: {
|
|
@@ -2224,7 +2224,7 @@ var l = n({
|
|
|
2224
2224
|
zIndex: 999,
|
|
2225
2225
|
width: "max-content",
|
|
2226
2226
|
padding: "8px",
|
|
2227
|
-
...
|
|
2227
|
+
...r.normal12,
|
|
2228
2228
|
color: t.grey1,
|
|
2229
2229
|
borderRadius: 4,
|
|
2230
2230
|
backgroundColor: t.white,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Fr as t } from "./visualization-filters-B9qik5_K.js";
|
|
3
3
|
var n = {
|
|
4
4
|
SaveLocalVSpec: "VSPEC/SAVE_LOCAL_VSPEC",
|
|
5
5
|
UpdateVSpec: "VSPEC/UPDATE",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-DleVn1XH.js";
|
|
2
|
-
import {
|
|
2
|
+
import { at as t, fi as n, rt as r } from "./utils-CUKgR7it.js";
|
|
3
3
|
function i(e) {
|
|
4
4
|
return typeof e == "string";
|
|
5
5
|
}
|
|
6
|
-
var a = /* @__PURE__ */ e(
|
|
6
|
+
var a = /* @__PURE__ */ e(n(), 1);
|
|
7
7
|
function o(...e) {
|
|
8
8
|
let t = a.useRef(void 0), n = a.useCallback((t) => {
|
|
9
9
|
let n = e.map((e) => {
|
|
@@ -76,30 +76,30 @@ function m(e) {
|
|
|
76
76
|
return t;
|
|
77
77
|
}
|
|
78
78
|
function h(e) {
|
|
79
|
-
let { getSlotProps:
|
|
80
|
-
if (!
|
|
81
|
-
let e =
|
|
79
|
+
let { getSlotProps: n, additionalProps: r, externalSlotProps: i, externalForwardedProps: a, className: o } = e;
|
|
80
|
+
if (!n) {
|
|
81
|
+
let e = t(r?.className, o, a?.className, i?.className), n = {
|
|
82
82
|
...r,
|
|
83
83
|
...a,
|
|
84
84
|
...i
|
|
85
85
|
};
|
|
86
|
-
if (e.length > 0 && (
|
|
86
|
+
if (e.length > 0 && (n.className = e), r?.style || a?.style || i?.style) {
|
|
87
87
|
let e = {
|
|
88
88
|
...r?.style,
|
|
89
89
|
...a?.style,
|
|
90
90
|
...i?.style
|
|
91
91
|
};
|
|
92
|
-
Object.keys(e).length > 0 && (
|
|
92
|
+
Object.keys(e).length > 0 && (n.style = e);
|
|
93
93
|
}
|
|
94
94
|
return {
|
|
95
|
-
props:
|
|
95
|
+
props: n,
|
|
96
96
|
internalRef: void 0
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
let s = p({
|
|
100
100
|
...a,
|
|
101
101
|
...i
|
|
102
|
-
}), c = m(i), l = m(a), u =
|
|
102
|
+
}), c = m(i), l = m(a), u = n(s), d = t(u?.className, r?.className, o, a?.className, i?.className), f = {
|
|
103
103
|
...u,
|
|
104
104
|
...r,
|
|
105
105
|
...l,
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { d as e } from "./visualization-filters-B9qik5_K.js";
|
|
2
|
+
import { A as t, C as n, D as r, G as i, S as a, T as o, _ as s, a as c, c as l, d as u, f as d, g as f, h as p, i as m, j as h, n as g, o as _, r as v, s as y, t as b, u as x, v as S, x as C, y as w } from "./shared-DoEN9nNM.js";
|
|
3
|
+
import { Fp as T, Tm as E } from "./handlers-CyYFSfhM.js";
|
|
4
|
+
import { A as D, C as O, E as k, P as A, S as j } from "./operations-CgfehCad.js";
|
|
5
|
+
import { n as M, t as N } from "./measure-axis-label-format-COy8U_dd.js";
|
|
6
|
+
import { t as P } from "./measure-format-default-B_kuGSzi.js";
|
|
7
|
+
e();
|
|
8
|
+
var F = async (e) => {
|
|
9
|
+
let F = T(e);
|
|
10
|
+
if (F) return {
|
|
11
|
+
issues: [{
|
|
12
|
+
code: "invalid_structure",
|
|
13
|
+
message: F,
|
|
14
|
+
path: []
|
|
15
|
+
}],
|
|
16
|
+
success: !1
|
|
17
|
+
};
|
|
18
|
+
let I = i.safeParse(e.definition);
|
|
19
|
+
if (!I.success) return {
|
|
20
|
+
issues: o(I.error, e.definition),
|
|
21
|
+
success: !1
|
|
22
|
+
};
|
|
23
|
+
let L = E.safeParse(e.baseVSpec);
|
|
24
|
+
if (!L.success) return {
|
|
25
|
+
issues: [u("invalid_structure", ["baseVSpec"], "Base line vSpec is invalid.")],
|
|
26
|
+
success: !1
|
|
27
|
+
};
|
|
28
|
+
let R = L.data;
|
|
29
|
+
if (!S(R, [
|
|
30
|
+
"dimensions",
|
|
31
|
+
"measures",
|
|
32
|
+
"supportingMeasures",
|
|
33
|
+
"sortingMeasures"
|
|
34
|
+
])) return {
|
|
35
|
+
issues: [u("non_fresh_base_vspec", ["baseVSpec"], "Line definitions require a fresh base vSpec.")],
|
|
36
|
+
success: !1
|
|
37
|
+
};
|
|
38
|
+
let z = I.data, B = [...z.data.dimensions, ...z.data.measures], V = [
|
|
39
|
+
...t(z.data.dimensions, e.availableFields, ["data", "dimensions"], "dimension"),
|
|
40
|
+
...t(z.data.measures, e.availableFields, ["data", "measures"], "measure"),
|
|
41
|
+
...n([{
|
|
42
|
+
items: z.data.dimensions,
|
|
43
|
+
path: ["data", "dimensions"]
|
|
44
|
+
}, {
|
|
45
|
+
items: z.data.measures,
|
|
46
|
+
path: ["data", "measures"]
|
|
47
|
+
}]),
|
|
48
|
+
...h(z.filterGroup, e.availableFields),
|
|
49
|
+
...C(z.sorting, B.map((e) => e.ref)),
|
|
50
|
+
...a(z.presentation?.coloring, z.data.dimensions.map((e) => e.ref), z.data.measures.map((e) => e.ref))
|
|
51
|
+
];
|
|
52
|
+
if (V.length) return {
|
|
53
|
+
issues: V,
|
|
54
|
+
success: !1
|
|
55
|
+
};
|
|
56
|
+
let H = {
|
|
57
|
+
state: x(e, R),
|
|
58
|
+
success: !0
|
|
59
|
+
};
|
|
60
|
+
for (let [e, t] of z.data.dimensions.entries()) {
|
|
61
|
+
if ("issue" in H) return {
|
|
62
|
+
issues: [H.issue],
|
|
63
|
+
success: !1
|
|
64
|
+
};
|
|
65
|
+
H = await b(H.state, t, "dimension", j.ADD_DIMENSION, { key: t.fieldKey }, [
|
|
66
|
+
"data",
|
|
67
|
+
"dimensions",
|
|
68
|
+
e
|
|
69
|
+
]);
|
|
70
|
+
}
|
|
71
|
+
for (let [t, n] of z.data.measures.entries()) {
|
|
72
|
+
if ("issue" in H) return {
|
|
73
|
+
issues: [H.issue],
|
|
74
|
+
success: !1
|
|
75
|
+
};
|
|
76
|
+
H = await b(H.state, n, "measure", j.ADD_MEASURE, r(n, e.availableFields), [
|
|
77
|
+
"data",
|
|
78
|
+
"measures",
|
|
79
|
+
t
|
|
80
|
+
]);
|
|
81
|
+
}
|
|
82
|
+
if ("issue" in H || (H = await v(H.state, z.data.dimensions, j.UPDATE_DIMENSION, ["data", "dimensions"]), "issue" in H) || (H = await y(H.state, z.data.dimensions, "setDimensionTemporalGrouping", ["data", "dimensions"]), "issue" in H) || (H = await c(H.state, z.data.dimensions, {
|
|
83
|
+
formatString: "setDimensionFormatString",
|
|
84
|
+
formatType: "setDimensionFormatType"
|
|
85
|
+
}, ["data", "dimensions"]), "issue" in H) || (H = await c(H.state, z.data.measures, {
|
|
86
|
+
currency: "setMeasureCurrency",
|
|
87
|
+
currencyIsPrefix: "setMeasureCurrencyIsPrefix",
|
|
88
|
+
formatString: "setMeasureFormatString",
|
|
89
|
+
formatType: "setMeasureFormatType",
|
|
90
|
+
negativeType: "setMeasureNegativeType"
|
|
91
|
+
}, ["data", "measures"]), "issue" in H) || (H = await P(H.state, z.data.measures, ["data", "measures"]), "issue" in H)) return {
|
|
92
|
+
issues: [H.issue],
|
|
93
|
+
success: !1
|
|
94
|
+
};
|
|
95
|
+
let U = H.state, W = z.data.measures.flatMap((e) => e.axis ? [{
|
|
96
|
+
name: j.CHANGE_MEASURE_AXIS,
|
|
97
|
+
payload: {
|
|
98
|
+
...w(U.resolvedRefs[e.ref]),
|
|
99
|
+
secondaryAxis: e.axis === "secondary"
|
|
100
|
+
}
|
|
101
|
+
}] : []);
|
|
102
|
+
if (H = await p(H.state, W, ["data", "measures"]), "issue" in H) return {
|
|
103
|
+
issues: [H.issue],
|
|
104
|
+
success: !1
|
|
105
|
+
};
|
|
106
|
+
let G = H.state;
|
|
107
|
+
if (H = await p(G, z.data.measures.flatMap((e) => e.dataPointShape === void 0 ? [] : [{
|
|
108
|
+
name: j.SET_MEASURE_SHAPE,
|
|
109
|
+
payload: {
|
|
110
|
+
...w(G.resolvedRefs[e.ref]),
|
|
111
|
+
shape: e.dataPointShape
|
|
112
|
+
}
|
|
113
|
+
}]), ["data", "measures"]), "issue" in H || (H = await m(H.state, z.filterGroup), "issue" in H) || (H = await _(H.state, z.sorting, j.CHANGE_SORT_ORDER_AND_DIRECTION, j.TOGGLE_SORTING_ITEM), "issue" in H)) return {
|
|
114
|
+
issues: [H.issue],
|
|
115
|
+
success: !1
|
|
116
|
+
};
|
|
117
|
+
let K = [];
|
|
118
|
+
z.limiting?.queryLimit !== void 0 && K.push({
|
|
119
|
+
name: j.SET_QUERY_LIMIT,
|
|
120
|
+
payload: z.limiting.queryLimit
|
|
121
|
+
});
|
|
122
|
+
let q = z.presentation;
|
|
123
|
+
K.push({
|
|
124
|
+
name: j.SET_SELECT_ON_CLICK,
|
|
125
|
+
payload: q?.selectOnClick ?? R.lineSettings?.selectOnClick ?? !0
|
|
126
|
+
});
|
|
127
|
+
let J = s(q?.axes);
|
|
128
|
+
if (J) return {
|
|
129
|
+
issues: [J],
|
|
130
|
+
success: !1
|
|
131
|
+
};
|
|
132
|
+
q?.orientation !== void 0 && K.push({
|
|
133
|
+
name: j.SET_ORIENTATION,
|
|
134
|
+
payload: q.orientation
|
|
135
|
+
}), K.push(...M(q)), K.push(...N(q, R, O.rangeAxes)), q?.legend && K.push(...d(H.state.vSpec, q.legend));
|
|
136
|
+
let Y = q?.dataLabels, X = H.state;
|
|
137
|
+
z.data.measures.forEach((e) => {
|
|
138
|
+
let t = w(X.resolvedRefs[e.ref]);
|
|
139
|
+
K.push({
|
|
140
|
+
name: A.SET_MEASURE_DATA_LABELS_SHOW,
|
|
141
|
+
payload: {
|
|
142
|
+
...t,
|
|
143
|
+
show: Y?.visible ?? !1
|
|
144
|
+
}
|
|
145
|
+
}), Y?.density && K.push({
|
|
146
|
+
name: A.SET_MEASURE_DATA_LABEL_DENSITY,
|
|
147
|
+
payload: {
|
|
148
|
+
...t,
|
|
149
|
+
density: Y.density
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}), Object.entries(q?.axes ?? {}).forEach(([e, t]) => {
|
|
153
|
+
t && (t.titleVisible !== void 0 && K.push({
|
|
154
|
+
name: j.SET_SHOW_AXIS_TITLE,
|
|
155
|
+
payload: {
|
|
156
|
+
axisName: e,
|
|
157
|
+
showAxisName: t.titleVisible
|
|
158
|
+
}
|
|
159
|
+
}), t.title !== void 0 && K.push({
|
|
160
|
+
name: j.SET_AXIS_TITLE,
|
|
161
|
+
payload: {
|
|
162
|
+
axisName: e,
|
|
163
|
+
axisTitle: t.title
|
|
164
|
+
}
|
|
165
|
+
}), t.labelsVisible !== void 0 && K.push({
|
|
166
|
+
name: j.SET_SHOW_AXIS_LABELS,
|
|
167
|
+
payload: {
|
|
168
|
+
axisName: e,
|
|
169
|
+
showLabels: t.labelsVisible
|
|
170
|
+
}
|
|
171
|
+
}), t.ticksVisible !== void 0 && K.push({
|
|
172
|
+
name: j.SET_SHOW_AXIS_TICKS,
|
|
173
|
+
payload: {
|
|
174
|
+
axisName: e,
|
|
175
|
+
showAxisTicks: t.ticksVisible
|
|
176
|
+
}
|
|
177
|
+
}), t.lineVisible !== void 0 && K.push({
|
|
178
|
+
name: j.SET_SHOW_AXIS_LINE,
|
|
179
|
+
payload: {
|
|
180
|
+
axisName: e,
|
|
181
|
+
showAxisLine: t.lineVisible
|
|
182
|
+
}
|
|
183
|
+
}), K.push(...l(e, t)), "scale" in t && t.scale !== void 0 && K.push({
|
|
184
|
+
name: k.SET_AXIS_SCALE,
|
|
185
|
+
payload: {
|
|
186
|
+
axisName: e,
|
|
187
|
+
scale: t.scale
|
|
188
|
+
}
|
|
189
|
+
}));
|
|
190
|
+
});
|
|
191
|
+
let Z = q?.axes?.primaryMeasure?.bands;
|
|
192
|
+
return Z && K.push({
|
|
193
|
+
name: D.SET_MEASURE_AXIS_BANDS,
|
|
194
|
+
payload: { bands: Z }
|
|
195
|
+
}), H = await p(H.state, K, ["presentation"]), "issue" in H ? {
|
|
196
|
+
issues: [H.issue],
|
|
197
|
+
success: !1
|
|
198
|
+
} : (H = await g(H.state, z.presentation?.coloring), "issue" in H ? {
|
|
199
|
+
issues: [H.issue],
|
|
200
|
+
success: !1
|
|
201
|
+
} : f(H.state, E));
|
|
202
|
+
};
|
|
203
|
+
export { F as compileLineVisualizationDefinition };
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { s as e, t, u as n } from "./src-77e3mC7i.js";
|
|
2
|
+
import { A as r, D as i, F as a, I as o, M as s, P as c, R as l, g as u, h as d, m as f, t as p, x as m } from "./src-D9XogOrc.js";
|
|
3
|
+
function h(e, t) {
|
|
4
|
+
switch (arguments.length) {
|
|
5
|
+
case 0: break;
|
|
6
|
+
case 1:
|
|
7
|
+
this.range(e);
|
|
8
|
+
break;
|
|
9
|
+
default:
|
|
10
|
+
this.range(t).domain(e);
|
|
11
|
+
break;
|
|
12
|
+
}
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
var g = Symbol("implicit");
|
|
16
|
+
function _() {
|
|
17
|
+
var e = /* @__PURE__ */ new Map(), t = [], n = [], r = g;
|
|
18
|
+
function i(i) {
|
|
19
|
+
var a = i + "", o = e.get(a);
|
|
20
|
+
if (!o) {
|
|
21
|
+
if (r !== g) return r;
|
|
22
|
+
e.set(a, o = t.push(i));
|
|
23
|
+
}
|
|
24
|
+
return n[(o - 1) % n.length];
|
|
25
|
+
}
|
|
26
|
+
return i.domain = function(n) {
|
|
27
|
+
if (!arguments.length) return t.slice();
|
|
28
|
+
t = [], e = /* @__PURE__ */ new Map();
|
|
29
|
+
for (let r of n) {
|
|
30
|
+
let n = r + "";
|
|
31
|
+
e.has(n) || e.set(n, t.push(r));
|
|
32
|
+
}
|
|
33
|
+
return i;
|
|
34
|
+
}, i.range = function(e) {
|
|
35
|
+
return arguments.length ? (n = Array.from(e), i) : n.slice();
|
|
36
|
+
}, i.unknown = function(e) {
|
|
37
|
+
return arguments.length ? (r = e, i) : r;
|
|
38
|
+
}, i.copy = function() {
|
|
39
|
+
return _(t, n).unknown(r);
|
|
40
|
+
}, h.apply(i, arguments), i;
|
|
41
|
+
}
|
|
42
|
+
var v = (e) => () => e;
|
|
43
|
+
function y(e, t) {
|
|
44
|
+
return function(n) {
|
|
45
|
+
return e + n * t;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function b(e, t, n) {
|
|
49
|
+
return e **= +n, t = t ** +n - e, n = 1 / n, function(r) {
|
|
50
|
+
return (e + r * t) ** +n;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function x(e) {
|
|
54
|
+
return (e = +e) == 1 ? S : function(t, n) {
|
|
55
|
+
return n - t ? b(t, n, e) : v(isNaN(t) ? n : t);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function S(e, t) {
|
|
59
|
+
var n = t - e;
|
|
60
|
+
return n ? y(e, n) : v(isNaN(e) ? t : e);
|
|
61
|
+
}
|
|
62
|
+
t();
|
|
63
|
+
var C = (function e(t) {
|
|
64
|
+
var r = x(t);
|
|
65
|
+
function i(e, t) {
|
|
66
|
+
var i = r((e = n(e)).r, (t = n(t)).r), a = r(e.g, t.g), o = r(e.b, t.b), s = S(e.opacity, t.opacity);
|
|
67
|
+
return function(t) {
|
|
68
|
+
return e.r = i(t), e.g = a(t), e.b = o(t), e.opacity = s(t), e + "";
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return i.gamma = e, i;
|
|
72
|
+
})(1);
|
|
73
|
+
function w(e, t) {
|
|
74
|
+
t ||= [];
|
|
75
|
+
var n = e ? Math.min(t.length, e.length) : 0, r = t.slice(), i;
|
|
76
|
+
return function(a) {
|
|
77
|
+
for (i = 0; i < n; ++i) r[i] = e[i] * (1 - a) + t[i] * a;
|
|
78
|
+
return r;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function T(e) {
|
|
82
|
+
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
83
|
+
}
|
|
84
|
+
function E(e, t) {
|
|
85
|
+
var n = t ? t.length : 0, r = e ? Math.min(n, e.length) : 0, i = Array(r), a = Array(n), o;
|
|
86
|
+
for (o = 0; o < r; ++o) i[o] = F(e[o], t[o]);
|
|
87
|
+
for (; o < n; ++o) a[o] = t[o];
|
|
88
|
+
return function(e) {
|
|
89
|
+
for (o = 0; o < r; ++o) a[o] = i[o](e);
|
|
90
|
+
return a;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function D(e, t) {
|
|
94
|
+
var n = /* @__PURE__ */ new Date();
|
|
95
|
+
return e = +e, t = +t, function(r) {
|
|
96
|
+
return n.setTime(e * (1 - r) + t * r), n;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function O(e, t) {
|
|
100
|
+
return e = +e, t = +t, function(n) {
|
|
101
|
+
return e * (1 - n) + t * n;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function k(e, t) {
|
|
105
|
+
var n = {}, r = {}, i;
|
|
106
|
+
for (i in (typeof e != "object" || !e) && (e = {}), (typeof t != "object" || !t) && (t = {}), t) i in e ? n[i] = F(e[i], t[i]) : r[i] = t[i];
|
|
107
|
+
return function(e) {
|
|
108
|
+
for (i in n) r[i] = n[i](e);
|
|
109
|
+
return r;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
var A = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, j = new RegExp(A.source, "g");
|
|
113
|
+
function M(e) {
|
|
114
|
+
return function() {
|
|
115
|
+
return e;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function N(e) {
|
|
119
|
+
return function(t) {
|
|
120
|
+
return e(t) + "";
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function P(e, t) {
|
|
124
|
+
var n = A.lastIndex = j.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
|
|
125
|
+
for (e += "", t += ""; (r = A.exec(e)) && (i = j.exec(t));) (a = i.index) > n && (a = t.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({
|
|
126
|
+
i: o,
|
|
127
|
+
x: O(r, i)
|
|
128
|
+
})), n = j.lastIndex;
|
|
129
|
+
return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? N(c[0].x) : M(t) : (t = c.length, function(e) {
|
|
130
|
+
for (var n = 0, r; n < t; ++n) s[(r = c[n]).i] = r.x(e);
|
|
131
|
+
return s.join("");
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
t();
|
|
135
|
+
function F(t, n) {
|
|
136
|
+
var r = typeof n, i;
|
|
137
|
+
return n == null || r === "boolean" ? v(n) : (r === "number" ? O : r === "string" ? (i = e(n)) ? (n = i, C) : P : n instanceof e ? C : n instanceof Date ? D : T(n) ? w : Array.isArray(n) ? E : typeof n.valueOf != "function" && typeof n.toString != "function" || isNaN(n) ? k : O)(t, n);
|
|
138
|
+
}
|
|
139
|
+
function I(e, t) {
|
|
140
|
+
return e = +e, t = +t, function(n) {
|
|
141
|
+
return Math.round(e * (1 - n) + t * n);
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
p();
|
|
145
|
+
function L(e) {
|
|
146
|
+
return function() {
|
|
147
|
+
return e;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
function R(e) {
|
|
151
|
+
return +e;
|
|
152
|
+
}
|
|
153
|
+
var z = [0, 1];
|
|
154
|
+
function B(e) {
|
|
155
|
+
return e;
|
|
156
|
+
}
|
|
157
|
+
function V(e, t) {
|
|
158
|
+
return (t -= e = +e) ? function(n) {
|
|
159
|
+
return (n - e) / t;
|
|
160
|
+
} : L(isNaN(t) ? NaN : .5);
|
|
161
|
+
}
|
|
162
|
+
function H(e, t) {
|
|
163
|
+
var n;
|
|
164
|
+
return e > t && (n = e, e = t, t = n), function(n) {
|
|
165
|
+
return Math.max(e, Math.min(t, n));
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function U(e, t, n) {
|
|
169
|
+
var r = e[0], i = e[1], a = t[0], o = t[1];
|
|
170
|
+
return i < r ? (r = V(i, r), a = n(o, a)) : (r = V(r, i), a = n(a, o)), function(e) {
|
|
171
|
+
return a(r(e));
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function W(e, t, n) {
|
|
175
|
+
var r = Math.min(e.length, t.length) - 1, i = Array(r), a = Array(r), o = -1;
|
|
176
|
+
for (e[r] < e[0] && (e = e.slice().reverse(), t = t.slice().reverse()); ++o < r;) i[o] = V(e[o], e[o + 1]), a[o] = n(t[o], t[o + 1]);
|
|
177
|
+
return function(t) {
|
|
178
|
+
var n = m(e, t, 1, r) - 1;
|
|
179
|
+
return a[n](i[n](t));
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function G(e, t) {
|
|
183
|
+
return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());
|
|
184
|
+
}
|
|
185
|
+
function K() {
|
|
186
|
+
var e = z, t = z, n = F, r, i, a, o = B, s, c, l;
|
|
187
|
+
function u() {
|
|
188
|
+
var n = Math.min(e.length, t.length);
|
|
189
|
+
return o !== B && (o = H(e[0], e[n - 1])), s = n > 2 ? W : U, c = l = null, d;
|
|
190
|
+
}
|
|
191
|
+
function d(i) {
|
|
192
|
+
return i == null || isNaN(i = +i) ? a : (c ||= s(e.map(r), t, n))(r(o(i)));
|
|
193
|
+
}
|
|
194
|
+
return d.invert = function(n) {
|
|
195
|
+
return o(i((l ||= s(t, e.map(r), O))(n)));
|
|
196
|
+
}, d.domain = function(t) {
|
|
197
|
+
return arguments.length ? (e = Array.from(t, R), u()) : e.slice();
|
|
198
|
+
}, d.range = function(e) {
|
|
199
|
+
return arguments.length ? (t = Array.from(e), u()) : t.slice();
|
|
200
|
+
}, d.rangeRound = function(e) {
|
|
201
|
+
return t = Array.from(e), n = I, u();
|
|
202
|
+
}, d.clamp = function(e) {
|
|
203
|
+
return arguments.length ? (o = e ? !0 : B, u()) : o !== B;
|
|
204
|
+
}, d.interpolate = function(e) {
|
|
205
|
+
return arguments.length ? (n = e, u()) : n;
|
|
206
|
+
}, d.unknown = function(e) {
|
|
207
|
+
return arguments.length ? (a = e, d) : a;
|
|
208
|
+
}, function(e, t) {
|
|
209
|
+
return r = e, i = t, u();
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function q() {
|
|
213
|
+
return K()(B, B);
|
|
214
|
+
}
|
|
215
|
+
p(), i();
|
|
216
|
+
function J(e, t, n, i) {
|
|
217
|
+
var u = d(e, t, n), f;
|
|
218
|
+
switch (i = l(i ?? ",f"), i.type) {
|
|
219
|
+
case "s":
|
|
220
|
+
var p = Math.max(Math.abs(e), Math.abs(t));
|
|
221
|
+
return i.precision == null && !isNaN(f = s(u, p)) && (i.precision = f), o(i, p);
|
|
222
|
+
case "":
|
|
223
|
+
case "e":
|
|
224
|
+
case "g":
|
|
225
|
+
case "p":
|
|
226
|
+
case "r":
|
|
227
|
+
i.precision == null && !isNaN(f = r(u, Math.max(Math.abs(e), Math.abs(t)))) && (i.precision = f - (i.type === "e"));
|
|
228
|
+
break;
|
|
229
|
+
case "f":
|
|
230
|
+
case "%":
|
|
231
|
+
i.precision == null && !isNaN(f = c(u)) && (i.precision = f - (i.type === "%") * 2);
|
|
232
|
+
break;
|
|
233
|
+
}
|
|
234
|
+
return a(i);
|
|
235
|
+
}
|
|
236
|
+
p();
|
|
237
|
+
function Y(e) {
|
|
238
|
+
var t = e.domain;
|
|
239
|
+
return e.ticks = function(e) {
|
|
240
|
+
var n = t();
|
|
241
|
+
return u(n[0], n[n.length - 1], e ?? 10);
|
|
242
|
+
}, e.tickFormat = function(e, n) {
|
|
243
|
+
var r = t();
|
|
244
|
+
return J(r[0], r[r.length - 1], e ?? 10, n);
|
|
245
|
+
}, e.nice = function(n) {
|
|
246
|
+
n ??= 10;
|
|
247
|
+
var r = t(), i = 0, a = r.length - 1, o = r[i], s = r[a], c, l, u = 10;
|
|
248
|
+
for (s < o && (l = o, o = s, s = l, l = i, i = a, a = l); u-- > 0;) {
|
|
249
|
+
if (l = f(o, s, n), l === c) return r[i] = o, r[a] = s, t(r);
|
|
250
|
+
if (l > 0) o = Math.floor(o / l) * l, s = Math.ceil(s / l) * l;
|
|
251
|
+
else if (l < 0) o = Math.ceil(o * l) / l, s = Math.floor(s * l) / l;
|
|
252
|
+
else break;
|
|
253
|
+
c = l;
|
|
254
|
+
}
|
|
255
|
+
return e;
|
|
256
|
+
}, e;
|
|
257
|
+
}
|
|
258
|
+
function X() {
|
|
259
|
+
var e = q();
|
|
260
|
+
return e.copy = function() {
|
|
261
|
+
return G(e, X());
|
|
262
|
+
}, h.apply(e, arguments), Y(e);
|
|
263
|
+
}
|
|
264
|
+
export { _ as n, h as r, X as t };
|