@carto/ps-react-ui 6.4.0 → 6.5.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/dist/{actions-DyWNwvLu.js → actions-D_PVFZaM.js} +4 -4
- package/dist/{actions-DyWNwvLu.js.map → actions-D_PVFZaM.js.map} +1 -1
- package/dist/{category-BHBd5Pcc.js → category-UIGvFN3D.js} +4 -4
- package/dist/{category-BHBd5Pcc.js.map → category-UIGvFN3D.js.map} +1 -1
- package/dist/chat.js +472 -470
- package/dist/chat.js.map +1 -1
- package/dist/{components-CTUpdQuj.js → components-DDJU4m0t.js} +8 -8
- package/dist/components-DDJU4m0t.js.map +1 -0
- package/dist/components.js +2 -2
- package/dist/{download-B4sykOFm.js → download-DIj1Iz0t.js} +2 -2
- package/dist/{download-B4sykOFm.js.map → download-DIj1Iz0t.js.map} +1 -1
- package/dist/{formula-DJS-JLpk.js → formula-CSHhAoyW.js} +4 -4
- package/dist/{formula-DJS-JLpk.js.map → formula-CSHhAoyW.js.map} +1 -1
- package/dist/{item-color-B7xkIpDZ.js → item-color-7o7pFBR2.js} +26 -18
- package/dist/item-color-7o7pFBR2.js.map +1 -0
- package/dist/markdown-B8lLR-NY.js +106 -0
- package/dist/markdown-B8lLR-NY.js.map +1 -0
- package/dist/{spread-CQwFIwuz.js → spread-BRfPPIep.js} +3 -3
- package/dist/{spread-CQwFIwuz.js.map → spread-BRfPPIep.js.map} +1 -1
- package/dist/style-DTLuIo84.js +87 -0
- package/dist/style-DTLuIo84.js.map +1 -0
- package/dist/{styles-BCEBm7xh.js → styles-yKcpfyNV.js} +5 -5
- package/dist/styles-yKcpfyNV.js.map +1 -0
- package/dist/{table-DEdW_fDj.js → table-Col_FRvb.js} +2 -2
- package/dist/{table-DEdW_fDj.js.map → table-Col_FRvb.js.map} +1 -1
- package/dist/theme/tailwind.css +373 -0
- package/dist/theme.js +123 -0
- package/dist/theme.js.map +1 -0
- package/dist/types/components/lasso-tool/styles.d.ts +4 -4
- package/dist/types/theme/create-carto-theme.d.ts +7 -0
- package/dist/types/theme/deep-merge.d.ts +6 -0
- package/dist/types/theme/generate-tailwind-css.d.ts +8 -0
- package/dist/types/theme/index.d.ts +2 -0
- package/dist/types/widgets/markdown/style.d.ts +74 -0
- package/dist/types/widgets/utils/spacing-px.d.ts +13 -0
- package/dist/{utils-C-eWwOhE.js → utils-Dw4y8tiq.js} +2 -2
- package/dist/{utils-C-eWwOhE.js.map → utils-Dw4y8tiq.js.map} +1 -1
- package/dist/widgets/actions.js +3 -3
- package/dist/widgets/bar.js +54 -54
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +1 -1
- package/dist/widgets/formula.js +1 -1
- package/dist/widgets/histogram.js +70 -70
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/markdown.js +1 -1
- package/dist/widgets/pie.js +78 -78
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/scatterplot.js +82 -82
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/spread.js +1 -1
- package/dist/widgets/table.js +1 -1
- package/dist/widgets/timeseries.js +62 -62
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/utils.js +1 -1
- package/dist/widgets.js +283 -279
- package/dist/widgets.js.map +1 -1
- package/dist/{zoom-toggle-MmLjMTEw.js → zoom-toggle-DqrV_0Ji.js} +2 -2
- package/dist/{zoom-toggle-MmLjMTEw.js.map → zoom-toggle-DqrV_0Ji.js.map} +1 -1
- package/package.json +8 -1
- package/src/chat/bubbles/styles.ts +2 -0
- package/src/components/lasso-tool/lasso-tool-inline.test.tsx +4 -4
- package/src/components/lasso-tool/lasso-tool-inline.tsx +6 -6
- package/src/components/lasso-tool/styles.ts +4 -4
- package/src/theme/create-carto-theme.test.ts +53 -0
- package/src/theme/create-carto-theme.ts +21 -0
- package/src/theme/deep-merge.test.ts +25 -0
- package/src/theme/deep-merge.ts +22 -0
- package/src/theme/generate-tailwind-css.test.ts +87 -0
- package/src/theme/generate-tailwind-css.ts +178 -0
- package/src/theme/index.ts +2 -0
- package/src/theme/tailwind-compile.test.ts +71 -0
- package/src/theme/tailwind.css +373 -0
- package/src/widgets/bar/options.ts +7 -6
- package/src/widgets/histogram/options.ts +7 -6
- package/src/widgets/markdown/style.ts +40 -0
- package/src/widgets/note/widget-note.tsx +4 -1
- package/src/widgets/pie/options.ts +5 -4
- package/src/widgets/scatterplot/options.ts +7 -6
- package/src/widgets/timeseries/options.ts +7 -6
- package/src/widgets/utils/css-variables-theme.test.ts +32 -0
- package/src/widgets/utils/option-builders.ts +4 -6
- package/src/widgets/utils/spacing-px.test.ts +42 -0
- package/src/widgets/utils/spacing-px.ts +24 -0
- package/dist/components-CTUpdQuj.js.map +0 -1
- package/dist/item-color-B7xkIpDZ.js.map +0 -1
- package/dist/markdown-DmvLi3vx.js +0 -159
- package/dist/markdown-DmvLi3vx.js.map +0 -1
- package/dist/styles-BCEBm7xh.js.map +0 -1
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { r as e } from "../zoom-toggle-
|
|
1
|
+
import { r as e } from "../zoom-toggle-DqrV_0Ji.js";
|
|
2
2
|
import { n as t } from "../scale-Bhx8HKEB.js";
|
|
3
|
-
import { n, t as r } from "../download-
|
|
4
|
-
import { n as i, r as a, t as o } from "../utils-
|
|
5
|
-
import { c as s, i as c, n as
|
|
6
|
-
import { c as
|
|
7
|
-
import { Box as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import * as
|
|
3
|
+
import { n, t as r } from "../download-DIj1Iz0t.js";
|
|
4
|
+
import { n as i, r as a, t as o } from "../utils-Dw4y8tiq.js";
|
|
5
|
+
import { c as s, i as c, l, n as u, o as d, r as f, s as p, t as m } from "../item-color-7o7pFBR2.js";
|
|
6
|
+
import { c as h } from "react/compiler-runtime";
|
|
7
|
+
import { Box as g, Skeleton as _ } from "@mui/material";
|
|
8
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
9
|
+
import * as b from "echarts";
|
|
10
10
|
//#region src/widgets/timeseries/options.ts
|
|
11
|
-
function
|
|
11
|
+
function x({ theme: e, formatter: t, labelFormatter: n }) {
|
|
12
12
|
let r = 0, i = 1;
|
|
13
13
|
return {
|
|
14
14
|
grid: {
|
|
15
|
-
left:
|
|
16
|
-
top:
|
|
17
|
-
right:
|
|
18
|
-
...
|
|
15
|
+
left: l(e, 1),
|
|
16
|
+
top: l(e, 3),
|
|
17
|
+
right: l(e, 1),
|
|
18
|
+
...f(!1, e),
|
|
19
19
|
containLabel: !0
|
|
20
20
|
},
|
|
21
21
|
tooltip: {
|
|
22
22
|
trigger: "axis",
|
|
23
23
|
backgroundColor: e.palette.grey[900],
|
|
24
24
|
borderWidth: 0,
|
|
25
|
-
padding: [
|
|
25
|
+
padding: [l(e, 1), l(e, 1)],
|
|
26
26
|
textStyle: {
|
|
27
27
|
color: e.palette.common.white,
|
|
28
28
|
fontSize: 11,
|
|
29
29
|
fontFamily: e.typography.caption.fontFamily
|
|
30
30
|
},
|
|
31
31
|
axisPointer: { type: "line" },
|
|
32
|
-
position:
|
|
33
|
-
formatter:
|
|
32
|
+
position: p(e),
|
|
33
|
+
formatter: C(t, n)
|
|
34
34
|
},
|
|
35
35
|
legend: { ...c({ hasLegend: !1 }) },
|
|
36
36
|
axisPointer: { lineStyle: { color: e.palette.grey[400] } },
|
|
@@ -40,9 +40,9 @@ function b({ theme: e, formatter: t, labelFormatter: n }) {
|
|
|
40
40
|
axisLine: { show: !1 },
|
|
41
41
|
axisTick: { show: !1 },
|
|
42
42
|
axisLabel: {
|
|
43
|
-
...
|
|
43
|
+
...u(e),
|
|
44
44
|
padding: [
|
|
45
|
-
|
|
45
|
+
l(e, .5),
|
|
46
46
|
0,
|
|
47
47
|
0,
|
|
48
48
|
0
|
|
@@ -63,8 +63,8 @@ function b({ theme: e, formatter: t, labelFormatter: n }) {
|
|
|
63
63
|
lineStyle: { color: e.palette.black?.[4] ?? e.palette.divider }
|
|
64
64
|
},
|
|
65
65
|
axisLabel: {
|
|
66
|
-
...
|
|
67
|
-
margin:
|
|
66
|
+
...u(e),
|
|
67
|
+
margin: l(e, 1),
|
|
68
68
|
show: !0,
|
|
69
69
|
showMaxLabel: !0,
|
|
70
70
|
showMinLabel: !0,
|
|
@@ -75,25 +75,25 @@ function b({ theme: e, formatter: t, labelFormatter: n }) {
|
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
let { theme: r, formatter: c, labelFormatter: l, optionsOverride: u } = n, d = n.series, f = n.smooth ?? !0,
|
|
78
|
+
function S(n) {
|
|
79
|
+
let { theme: r, formatter: c, labelFormatter: l, optionsOverride: u } = n, d = n.series, f = n.smooth ?? !0, p = n.area ?? !1, h = n.selection, g = h && h.length > 0 ? new Set(h) : null, _ = (e) => e instanceof Date ? e.getTime() : e;
|
|
80
80
|
return (n, h, v) => {
|
|
81
81
|
if (n == null) {
|
|
82
|
-
let e =
|
|
82
|
+
let e = x({
|
|
83
83
|
theme: r,
|
|
84
84
|
formatter: c,
|
|
85
85
|
labelFormatter: l
|
|
86
86
|
});
|
|
87
87
|
return u ? a(e, u) : e;
|
|
88
88
|
}
|
|
89
|
-
let
|
|
90
|
-
if (
|
|
89
|
+
let y = Array.isArray(h) ? h : [];
|
|
90
|
+
if (y.length === 0) return {
|
|
91
91
|
...n,
|
|
92
92
|
dataset: [],
|
|
93
93
|
series: []
|
|
94
94
|
};
|
|
95
|
-
let
|
|
96
|
-
let n =
|
|
95
|
+
let S = y.length > 1, w = Array.isArray(n.series) ? n.series : [], T = w[0] ?? {}, E = typeof n.yAxis == "object" && !Array.isArray(n.yAxis) ? n.yAxis : {}, D = t(E), O = typeof n.grid == "object" && !Array.isArray(n.grid) ? n.grid : {}, k = typeof n.tooltip == "object" && !Array.isArray(n.tooltip) ? n.tooltip : {}, A = typeof n.legend == "object" && !Array.isArray(n.legend) ? n.legend : {}, j = v?.formatter, M = 0, N = 1, P = i(n.dataZoom, S), F = typeof O.bottom == "number" ? O.bottom : 24, I = S ? 56 : F, L = P ? I + e.sliderHeight + e.sliderGap : I, R = (e, t) => {
|
|
96
|
+
let n = m({
|
|
97
97
|
theme: r,
|
|
98
98
|
datums: e,
|
|
99
99
|
template: t,
|
|
@@ -101,13 +101,13 @@ function x(n) {
|
|
|
101
101
|
});
|
|
102
102
|
return { color: (e) => {
|
|
103
103
|
let t = e.value?.name, r = n(e);
|
|
104
|
-
return !g || t == null || g.has(_(t)) ? r :
|
|
104
|
+
return !g || t == null || g.has(_(t)) ? r : b.color.modifyAlpha(r, .15);
|
|
105
105
|
} };
|
|
106
|
-
}, z =
|
|
106
|
+
}, z = y.some((e) => e.some((e) => typeof e?.color == "string" && e.color !== ""));
|
|
107
107
|
return {
|
|
108
108
|
...n,
|
|
109
|
-
dataset:
|
|
110
|
-
series:
|
|
109
|
+
dataset: y.map((e) => ({ source: e })),
|
|
110
|
+
series: y.map((e, t) => {
|
|
111
111
|
let n = w[t] ?? T, i = o(r, d?.[t]?.color);
|
|
112
112
|
return {
|
|
113
113
|
...typeof n == "object" ? n : {},
|
|
@@ -120,7 +120,7 @@ function x(n) {
|
|
|
120
120
|
},
|
|
121
121
|
smooth: f,
|
|
122
122
|
showSymbol: g != null || z,
|
|
123
|
-
...
|
|
123
|
+
...p ? { areaStyle: {} } : {},
|
|
124
124
|
emphasis: { focus: "series" },
|
|
125
125
|
itemStyle: R(e, n),
|
|
126
126
|
...i ? {
|
|
@@ -131,7 +131,7 @@ function x(n) {
|
|
|
131
131
|
}),
|
|
132
132
|
legend: {
|
|
133
133
|
...A,
|
|
134
|
-
show:
|
|
134
|
+
show: S
|
|
135
135
|
},
|
|
136
136
|
grid: {
|
|
137
137
|
...O,
|
|
@@ -149,13 +149,13 @@ function x(n) {
|
|
|
149
149
|
},
|
|
150
150
|
tooltip: {
|
|
151
151
|
...k,
|
|
152
|
-
formatter:
|
|
152
|
+
formatter: C(j, l)
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
157
|
+
function C(e, t) {
|
|
158
|
+
return d((n) => {
|
|
159
159
|
let r = n.value, i = r?.value, a = typeof i == "number" && e ? e(i) : i ?? "", o = typeof n.marker == "string" ? n.marker : "", s = n.seriesName ? `${n.seriesName}: ` : "", c = r?.name ?? n.name, l = t && c != null ? t(c instanceof Date ? c : new Date(c)) : c ?? "";
|
|
160
160
|
return {
|
|
161
161
|
name: String(l),
|
|
@@ -167,7 +167,7 @@ function S(e, t) {
|
|
|
167
167
|
}
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region src/widgets/timeseries/skeleton.tsx
|
|
170
|
-
var
|
|
170
|
+
var w = {
|
|
171
171
|
container: {
|
|
172
172
|
display: "flex",
|
|
173
173
|
flexDirection: "column",
|
|
@@ -213,42 +213,42 @@ var C = {
|
|
|
213
213
|
gap: ({ spacing: e }) => e(1.5)
|
|
214
214
|
}
|
|
215
215
|
};
|
|
216
|
-
function
|
|
217
|
-
let e =
|
|
218
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */
|
|
219
|
-
sx:
|
|
216
|
+
function T() {
|
|
217
|
+
let e = h(2), t;
|
|
218
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ y(g, {
|
|
219
|
+
sx: w.graph,
|
|
220
220
|
children: [
|
|
221
|
-
/* @__PURE__ */ _
|
|
221
|
+
/* @__PURE__ */ v(_, {
|
|
222
222
|
variant: "rectangular",
|
|
223
|
-
sx:
|
|
223
|
+
sx: w.segmentA
|
|
224
224
|
}),
|
|
225
|
-
/* @__PURE__ */ _
|
|
225
|
+
/* @__PURE__ */ v(_, {
|
|
226
226
|
variant: "rectangular",
|
|
227
|
-
sx:
|
|
227
|
+
sx: w.segmentB
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */ _
|
|
229
|
+
/* @__PURE__ */ v(_, {
|
|
230
230
|
variant: "rectangular",
|
|
231
|
-
sx:
|
|
231
|
+
sx: w.segmentC
|
|
232
232
|
})
|
|
233
233
|
]
|
|
234
234
|
}), e[0] = t) : t = e[0];
|
|
235
235
|
let n;
|
|
236
|
-
return e[1] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */
|
|
237
|
-
sx:
|
|
238
|
-
children: [t, /* @__PURE__ */
|
|
239
|
-
sx:
|
|
240
|
-
children: [0, 1].map(
|
|
236
|
+
return e[1] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ y(g, {
|
|
237
|
+
sx: w.container,
|
|
238
|
+
children: [t, /* @__PURE__ */ v(g, {
|
|
239
|
+
sx: w.legend,
|
|
240
|
+
children: [0, 1].map(E)
|
|
241
241
|
})]
|
|
242
242
|
}), e[1] = n) : n = e[1], n;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
245
|
-
return /* @__PURE__ */
|
|
246
|
-
sx:
|
|
247
|
-
children: [/* @__PURE__ */ _
|
|
244
|
+
function E(e) {
|
|
245
|
+
return /* @__PURE__ */ y(g, {
|
|
246
|
+
sx: w.legendItem,
|
|
247
|
+
children: [/* @__PURE__ */ v(_, {
|
|
248
248
|
variant: "circular",
|
|
249
249
|
width: 8,
|
|
250
250
|
height: 8
|
|
251
|
-
}), /* @__PURE__ */ _
|
|
251
|
+
}), /* @__PURE__ */ v(_, {
|
|
252
252
|
width: 48,
|
|
253
253
|
height: 8
|
|
254
254
|
})]
|
|
@@ -256,7 +256,7 @@ function T(e) {
|
|
|
256
256
|
}
|
|
257
257
|
//#endregion
|
|
258
258
|
//#region src/widgets/timeseries/download.ts
|
|
259
|
-
function
|
|
259
|
+
function D(e) {
|
|
260
260
|
return r(e, n({
|
|
261
261
|
filename: e.filename,
|
|
262
262
|
getRows: (t) => {
|
|
@@ -269,7 +269,7 @@ function E(e) {
|
|
|
269
269
|
for (let t = 0; t < r; t++) s.push(e.seriesNames?.[t] ?? `series_${t + 1}`);
|
|
270
270
|
let c = [s];
|
|
271
271
|
for (let e of i) {
|
|
272
|
-
let t = [
|
|
272
|
+
let t = [O(e)], n = String(e);
|
|
273
273
|
for (let e of o) t.push(e.get(n) ?? "");
|
|
274
274
|
c.push(t);
|
|
275
275
|
}
|
|
@@ -277,12 +277,12 @@ function E(e) {
|
|
|
277
277
|
}
|
|
278
278
|
}));
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function O(e) {
|
|
281
281
|
return e instanceof Date ? e.toISOString() : typeof e == "number" ? new Date(e).toISOString() : e;
|
|
282
282
|
}
|
|
283
283
|
//#endregion
|
|
284
284
|
//#region src/widgets/timeseries/transforms.ts
|
|
285
|
-
function
|
|
285
|
+
function k(e, t) {
|
|
286
286
|
if (t.length === 0 || !Array.isArray(e)) return e;
|
|
287
287
|
let n = new Set(t);
|
|
288
288
|
return e.map((e) => Array.isArray(e) ? e.filter((e) => {
|
|
@@ -292,6 +292,6 @@ function O(e, t) {
|
|
|
292
292
|
}) : e);
|
|
293
293
|
}
|
|
294
294
|
//#endregion
|
|
295
|
-
export {
|
|
295
|
+
export { T as TimeseriesSkeleton, D as createTimeseriesDownloadConfig, S as createTimeseriesOptionFactory, k as filterTimeseriesByLockedItems, x as timeseriesOptions };
|
|
296
296
|
|
|
297
297
|
//# sourceMappingURL=timeseries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeseries.js","names":["<Box sx={styles.graph}>\n <Skeleton variant='rectangular' sx={styles.segmentA} />\n <Skeleton variant='rectangular' sx={styles.segmentB} />\n <Skeleton variant='rectangular' sx={styles.segmentC} />\n </Box>","<Box sx={styles.container}>\n <Box sx={styles.graph}>\n <Skeleton variant='rectangular' sx={styles.segmentA} />\n <Skeleton variant='rectangular' sx={styles.segmentB} />\n <Skeleton variant='rectangular' sx={styles.segmentC} />\n </Box>\n <Box sx={styles.legend}>\n {[0, 1].map((i) => (\n <Box key={`legend-${i}`} sx={styles.legendItem}>\n <Skeleton variant='circular' width={8} height={8} />\n <Skeleton width={48} height={8} />\n </Box>\n ))}\n </Box>\n </Box>","(i) => (\n <Box key={`legend-${i}`} sx={styles.legendItem}>\n <Skeleton variant='circular' width={8} height={8} />\n <Skeleton width={48} height={8} />\n </Box>\n )","_c","ZOOM_LAYOUT","fixedAxisBounds","withPngItem","positionDataZoomForLegend","mergeOptions","resolveThemeColor","niceNum","buildLegendConfig","buildAxisLabelStyle","createTooltipFormatter","buildGridConfig","createTooltipPositioner","createItemColorResolver","echarts","timeseriesOptions","niceMin","niceMax","theme","buildTimeseriesTooltipFormatter","formatter","labelFormatter","value","extent","createTimeseriesOptionFactory","options","series","smooth","area","selection","selectionSet","normalizeName","n","option","structural","optionsOverride","seriesArr","data","hasLegend","seriesTemplates","broadcastTemplate","baseYAxis","fixedY","baseGrid","baseTooltip","baseLegend","liveFormatter","ctx","dataZoomLayout","fallbackBottom","baseBottom","gridBottom","makeDimItemStyle","baseColor","params","raw","base","hasDatumColor","s","d","template","i","overrideColor","row","item","formattedValue","marker","seriesName","rawName","name","styles","spacing","TimeseriesSkeleton","$","c","t0","Box","Skeleton","t1","_temp","createTimeseriesDownloadConfig","args","buildCsvDownloadItem","seriesCount","timeKeys","seenKeys","point","key","lookups","p","header","rows","formatTime","lookupKey","lookup","v","filterTimeseriesByLockedItems","lockedItems","input","locked"],"sources":["../../src/widgets/timeseries/options.ts","../../src/widgets/timeseries/skeleton.tsx","../../src/widgets/timeseries/download.ts","../../src/widgets/timeseries/transforms.ts"],"sourcesContent":["import type { EChartsOption } from 'echarts'\nimport * as echarts from 'echarts'\nimport type { CallbackDataParams } from 'echarts/types/dist/shared'\nimport {\n buildAxisLabelStyle,\n buildGridConfig,\n buildLegendConfig,\n createTooltipFormatter,\n createTooltipPositioner,\n niceNum,\n} from '../utils/option-builders'\nimport { ZOOM_LAYOUT } from '../actions/zoom-toggle'\nimport type { OptionFactory } from '../echart'\nimport { mergeOptions, resolveThemeColor } from '../utils'\nimport { createItemColorResolver } from '../utils/item-color'\nimport { positionDataZoomForLegend } from '../utils/data-zoom-layout'\nimport type {\n TimeseriesEChartsOption,\n TimeseriesOptionFactoryInput,\n TimeseriesOptionsInput,\n TimeseriesWidgetData,\n} from './types'\nimport { fixedAxisBounds } from '../actions/relative-data/scale'\n\n/**\n * Builds the **structural** ECharts option for a timeseries widget —\n * time x-axis, value y-axis, themed tooltip, themed legend, CARTO color\n * palette. Mirrors {@link import('../bar/options').barOptions} so all\n * four ECharts widgets share v1 look-and-feel.\n *\n * Intentional deviations from bar (timeseries-specific):\n * - **X-axis is `type: 'time'`** (not 'category'). ECharts handles\n * uneven sample spacing and zoom-level-aware label formatting.\n * `labelFormatter` is wrapped so the consumer sees a `Date`, not\n * a numeric timestamp.\n * - **Tooltip body reads `{ name, value }` rows**, same as bar, but\n * the `name` may arrive as `Date | number | string`. The\n * `labelFormatter` receives a `Date` regardless.\n *\n * Intentionally data-agnostic: no series, no dataset, no `legend.show`\n * (those depend on data and are added by the option factory's merge\n * phase via {@link createTimeseriesOptionFactory}).\n */\nexport function timeseriesOptions({\n theme,\n formatter,\n labelFormatter,\n}: TimeseriesOptionsInput): TimeseriesEChartsOption {\n // Closure shared between yAxis min/max callbacks and the label formatter,\n // so only the rounded extents are labelled (matches v1 + bar).\n let niceMin = 0\n let niceMax = 1\n\n return {\n grid: {\n left: parseInt(theme.spacing(1)),\n top: parseInt(theme.spacing(3)),\n right: parseInt(theme.spacing(1)),\n // Default: no legend. Merger bumps this when there are >1 series.\n ...buildGridConfig(false, theme),\n containLabel: true,\n },\n tooltip: {\n trigger: 'axis',\n backgroundColor: theme.palette.grey[900],\n borderWidth: 0,\n padding: [parseInt(theme.spacing(1)), parseInt(theme.spacing(1))],\n textStyle: {\n color: theme.palette.common.white,\n fontSize: 11,\n fontFamily: theme.typography.caption.fontFamily,\n },\n axisPointer: { type: 'line' },\n position: createTooltipPositioner(theme),\n formatter: buildTimeseriesTooltipFormatter(formatter, labelFormatter),\n },\n // Legend styling baked here; `show` is toggled by the merger based on\n // series count.\n legend: {\n ...buildLegendConfig({ hasLegend: false }),\n },\n axisPointer: { lineStyle: { color: theme.palette.grey[400] } },\n color: [\n theme.palette.secondary.main,\n ...Object.values(\n (theme.palette as { qualitative?: { bold?: Record<string, string> } })\n .qualitative?.bold ?? {},\n ),\n ],\n xAxis: {\n type: 'time',\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n ...buildAxisLabelStyle(theme),\n padding: [parseInt(theme.spacing(0.5)), 0, 0, 0],\n margin: 0,\n hideOverlap: true,\n ...(labelFormatter && {\n formatter: (value: number) => labelFormatter(new Date(value)),\n }),\n },\n },\n yAxis: {\n type: 'value',\n min: (extent: { min: number }) => {\n niceMin = extent.min < 0 ? niceNum(extent.min) : 0\n return niceMin\n },\n max: (extent: { min: number; max: number }) => {\n niceMax = extent.max <= 0 ? 1 : niceNum(extent.max)\n return niceMax\n },\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n show: true,\n lineStyle: { color: theme.palette.black?.[4] ?? theme.palette.divider },\n },\n axisLabel: {\n ...buildAxisLabelStyle(theme),\n margin: parseInt(theme.spacing(1)),\n show: true,\n showMaxLabel: true,\n showMinLabel: true,\n verticalAlign: 'bottom',\n inside: true,\n formatter: (value: number) => {\n if (value !== niceMax && value !== niceMin) return ''\n if (value === 0) return ''\n return formatter ? formatter(value) : String(value)\n },\n },\n },\n } as TimeseriesEChartsOption\n}\n\n/**\n * Returns the timeseries widget's {@link OptionFactory} — one closure\n * that owns BOTH phases of option construction:\n *\n * - **Structural phase** (`option == null`) — builds the theme-aware\n * structural option via {@link timeseriesOptions}, optionally merging\n * the consumer-supplied `optionsOverride`. Called once by Provider to\n * seed `rawOptions` in the store.\n * - **Merge phase** (`option != null`) — fuses post-pipeline `state.data`\n * (`TimeseriesWidgetData`) into the option via the dataset API: one\n * dataset per series, each series referencing its dataset by index,\n * encoded by `name` (x — time) and `value` (y). Mirrors {@link import('../bar/options').createBarOptionFactory}:\n * series-template merge for `addStack`, reactive formatters from\n * `ctx`, `niceNum`-rounded y-axis bounds at fusion time, and\n * `positionDataZoomForLegend` layout for ZoomToggle sliders.\n */\nexport function createTimeseriesOptionFactory(\n options: TimeseriesOptionFactoryInput,\n): OptionFactory {\n const { theme, formatter, labelFormatter, optionsOverride } = options\n const series = options.series\n const smooth = options.smooth ?? true\n const area = options.area ?? false\n const selection = options.selection\n const selectionSet =\n selection && selection.length > 0\n ? new Set<string | number>(selection)\n : null\n // `name` may be Date | number | string. Normalize to the same type the\n // selection is keyed on (Date → ms) so Set lookups match.\n const normalizeName = (n: Date | number | string): string | number =>\n n instanceof Date ? n.getTime() : n\n return (option, data, ctx) => {\n if (option == null) {\n const structural = timeseriesOptions({ theme, formatter, labelFormatter })\n return optionsOverride\n ? (mergeOptions(\n structural as unknown as Record<string, unknown>,\n optionsOverride as Partial<Record<string, unknown>>,\n ) as EChartsOption)\n : structural\n }\n\n const seriesArr = Array.isArray(data) ? (data as TimeseriesWidgetData) : []\n if (seriesArr.length === 0) {\n return { ...option, dataset: [], series: [] }\n }\n const hasLegend = seriesArr.length > 1\n const seriesTemplates = Array.isArray(option.series) ? option.series : []\n const broadcastTemplate = seriesTemplates[0] ?? {}\n const baseYAxis =\n typeof option.yAxis === 'object' && !Array.isArray(option.yAxis)\n ? option.yAxis\n : {}\n const fixedY = fixedAxisBounds(baseYAxis)\n const baseGrid =\n typeof option.grid === 'object' && !Array.isArray(option.grid)\n ? option.grid\n : {}\n const baseTooltip =\n typeof option.tooltip === 'object' && !Array.isArray(option.tooltip)\n ? option.tooltip\n : {}\n const baseLegend =\n typeof option.legend === 'object' && !Array.isArray(option.legend)\n ? option.legend\n : {}\n\n // Reactive (live store) formatter from ctx — distinct from the\n // closure-time `formatter` captured for the structural-build branch\n // above. RelativeData can install a percent formatter on the store\n // after the factory was constructed; the merge phase reads `ctx` to\n // pick that up. `labelFormatter` (Date → string) is structural-only —\n // not relativizable — so the merge branch reads the closure-time value.\n const liveFormatter = ctx?.formatter\n\n // Closure shared between the yAxis min/max callbacks and the label\n // formatter, so only the rounded extents are labelled (matches v1 +\n // bar). Delegating the extent to ECharts (rather than precomputing\n // scalars from the raw data) keeps stacked lines inside the plot: when\n // StackToggle marks the series, ECharts feeds the *post-stack* extent\n // to these callbacks, so `niceNum` rounds the stacked total.\n let niceMin = 0\n let niceMax = 1\n\n // Zoom slider layout: when ZoomToggle has installed `dataZoom`, push the\n // slider above the legend (if any) and reserve room in the grid below.\n const dataZoomLayout = positionDataZoomForLegend(option.dataZoom, hasLegend)\n const fallbackBottom =\n typeof baseGrid.bottom === 'number' ? baseGrid.bottom : 24\n const baseBottom = hasLegend ? 56 : fallbackBottom\n const gridBottom = dataZoomLayout\n ? baseBottom + ZOOM_LAYOUT.sliderHeight + ZOOM_LAYOUT.sliderGap\n : baseBottom\n\n // Dim non-selected points via `series.itemStyle.color`. Per-row\n // `itemStyle` on dataset object-rows is silently ignored when\n // `series.encode` is in play.\n //\n // We *always* emit `itemStyle.color` (a passthrough when nothing is\n // selected), not conditionally — dropping the key between renders\n // would let ECharts' default merge keep the previous callback alive\n // and points would stay dimmed forever after an external clear.\n // Always emitting lets normal merge swap the callback in place, no\n // `replaceMerge` and no entry-animation flash on selection on/off.\n //\n // The base colour is the point's own `color`, else the template's\n // `itemStyle.color`, else the series colour / palette (`params.color`).\n const makeDimItemStyle = (datums: readonly object[], template: unknown) => {\n const baseColor = createItemColorResolver({\n theme,\n datums,\n template,\n fallback: (params) => params.color as string,\n })\n return {\n color: (params: CallbackDataParams) => {\n const datum = params.value as\n { name?: Date | number | string } | undefined\n const raw = datum?.name\n const base = baseColor(params)\n if (!selectionSet || raw == null) return base\n return selectionSet.has(normalizeName(raw))\n ? base\n : echarts.color.modifyAlpha(base, 0.15)\n },\n }\n }\n // Per-point colours only show on markers, so surface them whenever a\n // point carries its own `color` (same reason as the selection case).\n const hasDatumColor = seriesArr.some((s) =>\n s.some((d) => typeof d?.color === 'string' && d.color !== ''),\n )\n\n return {\n ...option,\n dataset: seriesArr.map((s) => ({ source: s as readonly object[] })),\n series: seriesArr.map((s, i) => {\n const template =\n (seriesTemplates[i] as object | undefined) ??\n (broadcastTemplate as object)\n // For line series, set BOTH `series[i].color` (legend swatch +\n // markers) AND `series[i].lineStyle.color` (the line itself) so\n // the override paints everywhere a series has a colour slot.\n const overrideColor = resolveThemeColor(theme, series?.[i]?.color)\n return {\n ...(typeof template === 'object' ? template : {}),\n type: 'line' as const,\n datasetIndex: i,\n name: series?.[i]?.name ?? `Series ${i + 1}`,\n encode: { x: 'name', y: 'value' },\n smooth,\n // When a selection is active, surface markers so the per-point\n // color callback has something to dim — a continuous line would\n // hide the visual selection feedback.\n showSymbol: selectionSet != null || hasDatumColor,\n ...(area ? { areaStyle: {} } : {}),\n emphasis: { focus: 'series' },\n itemStyle: makeDimItemStyle(s, template),\n ...(overrideColor\n ? { color: overrideColor, lineStyle: { color: overrideColor } }\n : {}),\n }\n }),\n legend: { ...baseLegend, show: hasLegend },\n grid: { ...baseGrid, bottom: gridBottom },\n ...(dataZoomLayout ? { dataZoom: dataZoomLayout } : {}),\n yAxis: {\n ...baseYAxis,\n // A config transform (RelativeData's `'total'` scale) may pin the\n // ends; each applies only on the side the data reaches.\n min: (extent: { min: number }) => {\n niceMin = extent.min < 0 ? (fixedY.min ?? niceNum(extent.min)) : 0\n return niceMin\n },\n max: (extent: { min: number; max: number }) => {\n niceMax = extent.max <= 0 ? 1 : (fixedY.max ?? niceNum(extent.max))\n return niceMax\n },\n axisLabel: {\n ...((baseYAxis as { axisLabel?: object }).axisLabel ?? {}),\n formatter: (value: number) => {\n if (value !== niceMax && value !== niceMin) return ''\n if (value === 0) return ''\n return liveFormatter ? liveFormatter(value) : String(value)\n },\n },\n } as EChartsOption['yAxis'],\n tooltip: {\n ...baseTooltip,\n formatter: buildTimeseriesTooltipFormatter(\n liveFormatter,\n labelFormatter,\n ),\n },\n } as EChartsOption\n }\n}\n\n/**\n * Tooltip formatter for the timeseries `{ name, value }` row shape.\n * `name` arrives as `Date | number | string` (the time-axis stores the\n * raw value the consumer supplied). The consumer's `labelFormatter`\n * expects a `Date`, so we coerce non-Date values via `new Date(...)`\n * before invoking it.\n */\nfunction buildTimeseriesTooltipFormatter(\n formatter: ((value: number) => string) | undefined,\n labelFormatter: ((value: Date) => string) | undefined,\n) {\n return createTooltipFormatter((item) => {\n const row = item.value as\n { name?: Date | number | string; value?: number } | undefined\n const raw = row?.value\n const formattedValue =\n typeof raw === 'number' && formatter ? formatter(raw) : (raw ?? '')\n const marker = typeof item.marker === 'string' ? item.marker : ''\n const seriesName = item.seriesName ? `${item.seriesName}: ` : ''\n const rawName = row?.name ?? item.name\n const name =\n labelFormatter && rawName != null\n ? labelFormatter(rawName instanceof Date ? rawName : new Date(rawName))\n : (rawName ?? '')\n return { name: String(name), seriesName, marker, value: formattedValue }\n })\n}\n","import { Box, Skeleton } from '@mui/material'\nimport type { SxProps, Theme } from '@mui/material'\n\nconst styles = {\n container: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n gap: ({ spacing }) => spacing(1),\n height: ({ spacing }) => spacing(38),\n },\n graph: {\n position: 'relative',\n flex: '1 1 auto',\n width: '100%',\n },\n segmentA: {\n position: 'absolute',\n left: 0,\n right: '70%',\n top: '60%',\n height: 4,\n },\n segmentB: {\n position: 'absolute',\n left: '25%',\n right: '40%',\n top: '35%',\n height: 4,\n },\n segmentC: {\n position: 'absolute',\n left: '55%',\n right: 0,\n top: '50%',\n height: 4,\n },\n legend: {\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(2),\n height: ({ spacing }) => spacing(5),\n },\n legendItem: {\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(1.5),\n },\n} satisfies Record<string, SxProps<Theme>>\n\n/**\n * Loading state for the Timeseries widget. Mirrors a line chart's\n * silhouette — three thin horizontal segments at staggered offsets to\n * suggest a moving line, plus a 2-dot legend stub. Sibling-consistent\n * with Bar / Histogram / Scatter skeletons (column-flex container with\n * legend strip below).\n */\nexport function TimeseriesSkeleton() {\n return (\n <Box sx={styles.container}>\n <Box sx={styles.graph}>\n <Skeleton variant='rectangular' sx={styles.segmentA} />\n <Skeleton variant='rectangular' sx={styles.segmentB} />\n <Skeleton variant='rectangular' sx={styles.segmentC} />\n </Box>\n <Box sx={styles.legend}>\n {[0, 1].map((i) => (\n <Box key={`legend-${i}`} sx={styles.legendItem}>\n <Skeleton variant='circular' width={8} height={8} />\n <Skeleton width={48} height={8} />\n </Box>\n ))}\n </Box>\n </Box>\n )\n}\n","import {\n buildCsvDownloadItem,\n withPngItem,\n type DownloadItem,\n type WidgetDownloadArgs,\n} from '../actions/download'\nimport type { TimeseriesWidgetData } from './types'\n\n/**\n * Download menu items for the Timeseries widget. Always includes a CSV item\n * with `time, series_1, series_2, …` columns (one row per unique time across\n * all series; ISO-8601 strings for `Date`/numeric times). When\n * `getCaptureEl` is given, prepends a PNG item that rasterises the captured\n * element via `html2canvas`.\n */\nexport function createTimeseriesDownloadConfig(\n args: WidgetDownloadArgs<TimeseriesWidgetData> & {\n seriesNames?: readonly string[]\n },\n): DownloadItem[] {\n return withPngItem(\n args,\n buildCsvDownloadItem({\n filename: args.filename,\n getRows: (ctx) => {\n const data = args.getData(ctx)\n const seriesCount = data.length\n\n // Collect every unique time, preserving insertion order.\n const timeKeys: (Date | number | string)[] = []\n const seenKeys = new Set<string>()\n for (const series of data) {\n for (const point of series) {\n const key = String(point.name)\n if (!seenKeys.has(key)) {\n seenKeys.add(key)\n timeKeys.push(point.name)\n }\n }\n }\n\n // Build a quick lookup per series for O(rows × series) emit.\n const lookups = data.map(\n (series) => new Map(series.map((p) => [String(p.name), p.value])),\n )\n\n const header: unknown[] = ['time']\n for (let i = 0; i < seriesCount; i++) {\n header.push(args.seriesNames?.[i] ?? `series_${i + 1}`)\n }\n const rows: unknown[][] = [header]\n for (const key of timeKeys) {\n const row: unknown[] = [formatTime(key)]\n const lookupKey = String(key)\n for (const lookup of lookups) row.push(lookup.get(lookupKey) ?? '')\n rows.push(row)\n }\n\n return rows\n },\n }),\n )\n}\n\nfunction formatTime(v: Date | number | string): string {\n if (v instanceof Date) return v.toISOString()\n if (typeof v === 'number') return new Date(v).toISOString()\n return v\n}\n","/**\n * `LockSelection` filter for Timeseries. Data is `{name, value}[][]` like\n * Bar/Pie/Category, but `name` may arrive as `Date | number | string` (the\n * time axis stores a `Date`). `lockedItems` is snapshotted from `selection`,\n * whose keys are already normalized to `Date → ms` (see `options.ts`'s\n * `normalizeName`) — so a raw `Date` name must be normalized the same way\n * before the membership check, or every point would compare a `Date` object\n * against a `number` and silently fail to match, filtering everything out.\n */\nexport function filterTimeseriesByLockedItems(\n input: unknown,\n lockedItems: readonly (string | number)[],\n): unknown {\n if (lockedItems.length === 0) return input\n if (!Array.isArray(input)) return input\n const locked = new Set<string | number>(lockedItems)\n return input.map((series: unknown): unknown => {\n if (!Array.isArray(series)) return series\n return series.filter((item: unknown) => {\n if (item == null || typeof item !== 'object' || !('name' in item)) {\n return false\n }\n const raw = (item as { name: unknown }).name\n const name = raw instanceof Date ? raw.getTime() : raw\n return (\n (typeof name === 'string' || typeof name === 'number') &&\n locked.has(name)\n )\n })\n })\n}\n"],"mappings":";;;;;;;;;;AA2CA,SAAgBkB,EAAkB,EAChC,UACA,cACA,qBACkD;CAGlD,IAAIC,IAAU,GACVC,IAAU;CAEd,OAAO;EACL,MAAM;GACJ,MAAM,SAASC,EAAM,QAAQ,CAAC,CAAC;GAC/B,KAAK,SAASA,EAAM,QAAQ,CAAC,CAAC;GAC9B,OAAO,SAASA,EAAM,QAAQ,CAAC,CAAC;GAEhC,GAAGP,EAAgB,IAAOO,CAAK;GAC/B,cAAc;EAChB;EACA,SAAS;GACP,SAAS;GACT,iBAAiBA,EAAM,QAAQ,KAAK;GACpC,aAAa;GACb,SAAS,CAAC,SAASA,EAAM,QAAQ,CAAC,CAAC,GAAG,SAASA,EAAM,QAAQ,CAAC,CAAC,CAAC;GAChE,WAAW;IACT,OAAOA,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AC,YAAY,IACnDA;AACT;;;AC3DA,SAAgBC,EACd,GACA,GACS;CAET,IADIC,EAAY,WAAW,KACvB,CAAC,MAAM,QAAQC,CAAK,GAAG,OAAOA;CAClC,IAAMC,IAAS,IAAI,IAAqBF,CAAW;CACnD,OAAOC,EAAM,KAAK,MACX,MAAM,QAAQxE,CAAM,IAClBA,EAAO,QAAQ,MAAkB;EACtC,IAAoB,OAAOsC,KAAS,aAAhCA,KAA4C,EAAE,UAAUA,IAC1D,OAAO;EAET,IAAMT,IAAOS,EAA2B,MAClCK,IAAOd,aAAe,OAAOA,EAAI,QAAQ,IAAIA;EACnD,QACG,OAAOc,KAAS,YAAY,OAAOA,KAAS,aAC7C8B,EAAO,IAAI9B,CAAI;CAEnB,CAAC,IAXkC3C,CAYpC;AACH"}
|
|
1
|
+
{"version":3,"file":"timeseries.js","names":["<Box sx={styles.graph}>\n <Skeleton variant='rectangular' sx={styles.segmentA} />\n <Skeleton variant='rectangular' sx={styles.segmentB} />\n <Skeleton variant='rectangular' sx={styles.segmentC} />\n </Box>","<Box sx={styles.container}>\n <Box sx={styles.graph}>\n <Skeleton variant='rectangular' sx={styles.segmentA} />\n <Skeleton variant='rectangular' sx={styles.segmentB} />\n <Skeleton variant='rectangular' sx={styles.segmentC} />\n </Box>\n <Box sx={styles.legend}>\n {[0, 1].map((i) => (\n <Box key={`legend-${i}`} sx={styles.legendItem}>\n <Skeleton variant='circular' width={8} height={8} />\n <Skeleton width={48} height={8} />\n </Box>\n ))}\n </Box>\n </Box>","(i) => (\n <Box key={`legend-${i}`} sx={styles.legendItem}>\n <Skeleton variant='circular' width={8} height={8} />\n <Skeleton width={48} height={8} />\n </Box>\n )","_c","ZOOM_LAYOUT","fixedAxisBounds","withPngItem","positionDataZoomForLegend","mergeOptions","resolveThemeColor","niceNum","buildLegendConfig","buildAxisLabelStyle","createTooltipFormatter","buildGridConfig","createTooltipPositioner","createItemColorResolver","echarts","timeseriesOptions","niceMin","niceMax","spacingPx","theme","buildTimeseriesTooltipFormatter","formatter","labelFormatter","value","extent","createTimeseriesOptionFactory","options","series","smooth","area","selection","selectionSet","normalizeName","n","option","structural","optionsOverride","seriesArr","data","hasLegend","seriesTemplates","broadcastTemplate","baseYAxis","fixedY","baseGrid","baseTooltip","baseLegend","liveFormatter","ctx","dataZoomLayout","fallbackBottom","baseBottom","gridBottom","makeDimItemStyle","baseColor","params","raw","base","hasDatumColor","s","d","template","i","overrideColor","row","item","formattedValue","marker","seriesName","rawName","name","styles","spacing","TimeseriesSkeleton","$","c","t0","Box","Skeleton","t1","_temp","createTimeseriesDownloadConfig","args","buildCsvDownloadItem","seriesCount","timeKeys","seenKeys","point","key","lookups","p","header","rows","formatTime","lookupKey","lookup","v","filterTimeseriesByLockedItems","lockedItems","input","locked"],"sources":["../../src/widgets/timeseries/options.ts","../../src/widgets/timeseries/skeleton.tsx","../../src/widgets/timeseries/download.ts","../../src/widgets/timeseries/transforms.ts"],"sourcesContent":["import type { EChartsOption } from 'echarts'\nimport * as echarts from 'echarts'\nimport type { CallbackDataParams } from 'echarts/types/dist/shared'\nimport {\n buildAxisLabelStyle,\n buildGridConfig,\n buildLegendConfig,\n createTooltipFormatter,\n createTooltipPositioner,\n niceNum,\n} from '../utils/option-builders'\nimport { ZOOM_LAYOUT } from '../actions/zoom-toggle'\nimport type { OptionFactory } from '../echart'\nimport { mergeOptions, resolveThemeColor } from '../utils'\nimport { spacingPx } from '../utils/spacing-px'\nimport { createItemColorResolver } from '../utils/item-color'\nimport { positionDataZoomForLegend } from '../utils/data-zoom-layout'\nimport type {\n TimeseriesEChartsOption,\n TimeseriesOptionFactoryInput,\n TimeseriesOptionsInput,\n TimeseriesWidgetData,\n} from './types'\nimport { fixedAxisBounds } from '../actions/relative-data/scale'\n\n/**\n * Builds the **structural** ECharts option for a timeseries widget —\n * time x-axis, value y-axis, themed tooltip, themed legend, CARTO color\n * palette. Mirrors {@link import('../bar/options').barOptions} so all\n * four ECharts widgets share v1 look-and-feel.\n *\n * Intentional deviations from bar (timeseries-specific):\n * - **X-axis is `type: 'time'`** (not 'category'). ECharts handles\n * uneven sample spacing and zoom-level-aware label formatting.\n * `labelFormatter` is wrapped so the consumer sees a `Date`, not\n * a numeric timestamp.\n * - **Tooltip body reads `{ name, value }` rows**, same as bar, but\n * the `name` may arrive as `Date | number | string`. The\n * `labelFormatter` receives a `Date` regardless.\n *\n * Intentionally data-agnostic: no series, no dataset, no `legend.show`\n * (those depend on data and are added by the option factory's merge\n * phase via {@link createTimeseriesOptionFactory}).\n */\nexport function timeseriesOptions({\n theme,\n formatter,\n labelFormatter,\n}: TimeseriesOptionsInput): TimeseriesEChartsOption {\n // Closure shared between yAxis min/max callbacks and the label formatter,\n // so only the rounded extents are labelled (matches v1 + bar).\n let niceMin = 0\n let niceMax = 1\n\n return {\n grid: {\n left: spacingPx(theme, 1),\n top: spacingPx(theme, 3),\n right: spacingPx(theme, 1),\n // Default: no legend. Merger bumps this when there are >1 series.\n ...buildGridConfig(false, theme),\n containLabel: true,\n },\n tooltip: {\n trigger: 'axis',\n backgroundColor: theme.palette.grey[900],\n borderWidth: 0,\n padding: [spacingPx(theme, 1), spacingPx(theme, 1)],\n textStyle: {\n color: theme.palette.common.white,\n fontSize: 11,\n fontFamily: theme.typography.caption.fontFamily,\n },\n axisPointer: { type: 'line' },\n position: createTooltipPositioner(theme),\n formatter: buildTimeseriesTooltipFormatter(formatter, labelFormatter),\n },\n // Legend styling baked here; `show` is toggled by the merger based on\n // series count.\n legend: {\n ...buildLegendConfig({ hasLegend: false }),\n },\n axisPointer: { lineStyle: { color: theme.palette.grey[400] } },\n color: [\n theme.palette.secondary.main,\n ...Object.values(\n (theme.palette as { qualitative?: { bold?: Record<string, string> } })\n .qualitative?.bold ?? {},\n ),\n ],\n xAxis: {\n type: 'time',\n axisLine: { show: false },\n axisTick: { show: false },\n axisLabel: {\n ...buildAxisLabelStyle(theme),\n padding: [spacingPx(theme, 0.5), 0, 0, 0],\n margin: 0,\n hideOverlap: true,\n ...(labelFormatter && {\n formatter: (value: number) => labelFormatter(new Date(value)),\n }),\n },\n },\n yAxis: {\n type: 'value',\n min: (extent: { min: number }) => {\n niceMin = extent.min < 0 ? niceNum(extent.min) : 0\n return niceMin\n },\n max: (extent: { min: number; max: number }) => {\n niceMax = extent.max <= 0 ? 1 : niceNum(extent.max)\n return niceMax\n },\n axisLine: { show: false },\n axisTick: { show: false },\n splitLine: {\n show: true,\n lineStyle: { color: theme.palette.black?.[4] ?? theme.palette.divider },\n },\n axisLabel: {\n ...buildAxisLabelStyle(theme),\n margin: spacingPx(theme, 1),\n show: true,\n showMaxLabel: true,\n showMinLabel: true,\n verticalAlign: 'bottom',\n inside: true,\n formatter: (value: number) => {\n if (value !== niceMax && value !== niceMin) return ''\n if (value === 0) return ''\n return formatter ? formatter(value) : String(value)\n },\n },\n },\n } as TimeseriesEChartsOption\n}\n\n/**\n * Returns the timeseries widget's {@link OptionFactory} — one closure\n * that owns BOTH phases of option construction:\n *\n * - **Structural phase** (`option == null`) — builds the theme-aware\n * structural option via {@link timeseriesOptions}, optionally merging\n * the consumer-supplied `optionsOverride`. Called once by Provider to\n * seed `rawOptions` in the store.\n * - **Merge phase** (`option != null`) — fuses post-pipeline `state.data`\n * (`TimeseriesWidgetData`) into the option via the dataset API: one\n * dataset per series, each series referencing its dataset by index,\n * encoded by `name` (x — time) and `value` (y). Mirrors {@link import('../bar/options').createBarOptionFactory}:\n * series-template merge for `addStack`, reactive formatters from\n * `ctx`, `niceNum`-rounded y-axis bounds at fusion time, and\n * `positionDataZoomForLegend` layout for ZoomToggle sliders.\n */\nexport function createTimeseriesOptionFactory(\n options: TimeseriesOptionFactoryInput,\n): OptionFactory {\n const { theme, formatter, labelFormatter, optionsOverride } = options\n const series = options.series\n const smooth = options.smooth ?? true\n const area = options.area ?? false\n const selection = options.selection\n const selectionSet =\n selection && selection.length > 0\n ? new Set<string | number>(selection)\n : null\n // `name` may be Date | number | string. Normalize to the same type the\n // selection is keyed on (Date → ms) so Set lookups match.\n const normalizeName = (n: Date | number | string): string | number =>\n n instanceof Date ? n.getTime() : n\n return (option, data, ctx) => {\n if (option == null) {\n const structural = timeseriesOptions({ theme, formatter, labelFormatter })\n return optionsOverride\n ? (mergeOptions(\n structural as unknown as Record<string, unknown>,\n optionsOverride as Partial<Record<string, unknown>>,\n ) as EChartsOption)\n : structural\n }\n\n const seriesArr = Array.isArray(data) ? (data as TimeseriesWidgetData) : []\n if (seriesArr.length === 0) {\n return { ...option, dataset: [], series: [] }\n }\n const hasLegend = seriesArr.length > 1\n const seriesTemplates = Array.isArray(option.series) ? option.series : []\n const broadcastTemplate = seriesTemplates[0] ?? {}\n const baseYAxis =\n typeof option.yAxis === 'object' && !Array.isArray(option.yAxis)\n ? option.yAxis\n : {}\n const fixedY = fixedAxisBounds(baseYAxis)\n const baseGrid =\n typeof option.grid === 'object' && !Array.isArray(option.grid)\n ? option.grid\n : {}\n const baseTooltip =\n typeof option.tooltip === 'object' && !Array.isArray(option.tooltip)\n ? option.tooltip\n : {}\n const baseLegend =\n typeof option.legend === 'object' && !Array.isArray(option.legend)\n ? option.legend\n : {}\n\n // Reactive (live store) formatter from ctx — distinct from the\n // closure-time `formatter` captured for the structural-build branch\n // above. RelativeData can install a percent formatter on the store\n // after the factory was constructed; the merge phase reads `ctx` to\n // pick that up. `labelFormatter` (Date → string) is structural-only —\n // not relativizable — so the merge branch reads the closure-time value.\n const liveFormatter = ctx?.formatter\n\n // Closure shared between the yAxis min/max callbacks and the label\n // formatter, so only the rounded extents are labelled (matches v1 +\n // bar). Delegating the extent to ECharts (rather than precomputing\n // scalars from the raw data) keeps stacked lines inside the plot: when\n // StackToggle marks the series, ECharts feeds the *post-stack* extent\n // to these callbacks, so `niceNum` rounds the stacked total.\n let niceMin = 0\n let niceMax = 1\n\n // Zoom slider layout: when ZoomToggle has installed `dataZoom`, push the\n // slider above the legend (if any) and reserve room in the grid below.\n const dataZoomLayout = positionDataZoomForLegend(option.dataZoom, hasLegend)\n const fallbackBottom =\n typeof baseGrid.bottom === 'number' ? baseGrid.bottom : 24\n const baseBottom = hasLegend ? 56 : fallbackBottom\n const gridBottom = dataZoomLayout\n ? baseBottom + ZOOM_LAYOUT.sliderHeight + ZOOM_LAYOUT.sliderGap\n : baseBottom\n\n // Dim non-selected points via `series.itemStyle.color`. Per-row\n // `itemStyle` on dataset object-rows is silently ignored when\n // `series.encode` is in play.\n //\n // We *always* emit `itemStyle.color` (a passthrough when nothing is\n // selected), not conditionally — dropping the key between renders\n // would let ECharts' default merge keep the previous callback alive\n // and points would stay dimmed forever after an external clear.\n // Always emitting lets normal merge swap the callback in place, no\n // `replaceMerge` and no entry-animation flash on selection on/off.\n //\n // The base colour is the point's own `color`, else the template's\n // `itemStyle.color`, else the series colour / palette (`params.color`).\n const makeDimItemStyle = (datums: readonly object[], template: unknown) => {\n const baseColor = createItemColorResolver({\n theme,\n datums,\n template,\n fallback: (params) => params.color as string,\n })\n return {\n color: (params: CallbackDataParams) => {\n const datum = params.value as\n { name?: Date | number | string } | undefined\n const raw = datum?.name\n const base = baseColor(params)\n if (!selectionSet || raw == null) return base\n return selectionSet.has(normalizeName(raw))\n ? base\n : echarts.color.modifyAlpha(base, 0.15)\n },\n }\n }\n // Per-point colours only show on markers, so surface them whenever a\n // point carries its own `color` (same reason as the selection case).\n const hasDatumColor = seriesArr.some((s) =>\n s.some((d) => typeof d?.color === 'string' && d.color !== ''),\n )\n\n return {\n ...option,\n dataset: seriesArr.map((s) => ({ source: s as readonly object[] })),\n series: seriesArr.map((s, i) => {\n const template =\n (seriesTemplates[i] as object | undefined) ??\n (broadcastTemplate as object)\n // For line series, set BOTH `series[i].color` (legend swatch +\n // markers) AND `series[i].lineStyle.color` (the line itself) so\n // the override paints everywhere a series has a colour slot.\n const overrideColor = resolveThemeColor(theme, series?.[i]?.color)\n return {\n ...(typeof template === 'object' ? template : {}),\n type: 'line' as const,\n datasetIndex: i,\n name: series?.[i]?.name ?? `Series ${i + 1}`,\n encode: { x: 'name', y: 'value' },\n smooth,\n // When a selection is active, surface markers so the per-point\n // color callback has something to dim — a continuous line would\n // hide the visual selection feedback.\n showSymbol: selectionSet != null || hasDatumColor,\n ...(area ? { areaStyle: {} } : {}),\n emphasis: { focus: 'series' },\n itemStyle: makeDimItemStyle(s, template),\n ...(overrideColor\n ? { color: overrideColor, lineStyle: { color: overrideColor } }\n : {}),\n }\n }),\n legend: { ...baseLegend, show: hasLegend },\n grid: { ...baseGrid, bottom: gridBottom },\n ...(dataZoomLayout ? { dataZoom: dataZoomLayout } : {}),\n yAxis: {\n ...baseYAxis,\n // A config transform (RelativeData's `'total'` scale) may pin the\n // ends; each applies only on the side the data reaches.\n min: (extent: { min: number }) => {\n niceMin = extent.min < 0 ? (fixedY.min ?? niceNum(extent.min)) : 0\n return niceMin\n },\n max: (extent: { min: number; max: number }) => {\n niceMax = extent.max <= 0 ? 1 : (fixedY.max ?? niceNum(extent.max))\n return niceMax\n },\n axisLabel: {\n ...((baseYAxis as { axisLabel?: object }).axisLabel ?? {}),\n formatter: (value: number) => {\n if (value !== niceMax && value !== niceMin) return ''\n if (value === 0) return ''\n return liveFormatter ? liveFormatter(value) : String(value)\n },\n },\n } as EChartsOption['yAxis'],\n tooltip: {\n ...baseTooltip,\n formatter: buildTimeseriesTooltipFormatter(\n liveFormatter,\n labelFormatter,\n ),\n },\n } as EChartsOption\n }\n}\n\n/**\n * Tooltip formatter for the timeseries `{ name, value }` row shape.\n * `name` arrives as `Date | number | string` (the time-axis stores the\n * raw value the consumer supplied). The consumer's `labelFormatter`\n * expects a `Date`, so we coerce non-Date values via `new Date(...)`\n * before invoking it.\n */\nfunction buildTimeseriesTooltipFormatter(\n formatter: ((value: number) => string) | undefined,\n labelFormatter: ((value: Date) => string) | undefined,\n) {\n return createTooltipFormatter((item) => {\n const row = item.value as\n { name?: Date | number | string; value?: number } | undefined\n const raw = row?.value\n const formattedValue =\n typeof raw === 'number' && formatter ? formatter(raw) : (raw ?? '')\n const marker = typeof item.marker === 'string' ? item.marker : ''\n const seriesName = item.seriesName ? `${item.seriesName}: ` : ''\n const rawName = row?.name ?? item.name\n const name =\n labelFormatter && rawName != null\n ? labelFormatter(rawName instanceof Date ? rawName : new Date(rawName))\n : (rawName ?? '')\n return { name: String(name), seriesName, marker, value: formattedValue }\n })\n}\n","import { Box, Skeleton } from '@mui/material'\nimport type { SxProps, Theme } from '@mui/material'\n\nconst styles = {\n container: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n gap: ({ spacing }) => spacing(1),\n height: ({ spacing }) => spacing(38),\n },\n graph: {\n position: 'relative',\n flex: '1 1 auto',\n width: '100%',\n },\n segmentA: {\n position: 'absolute',\n left: 0,\n right: '70%',\n top: '60%',\n height: 4,\n },\n segmentB: {\n position: 'absolute',\n left: '25%',\n right: '40%',\n top: '35%',\n height: 4,\n },\n segmentC: {\n position: 'absolute',\n left: '55%',\n right: 0,\n top: '50%',\n height: 4,\n },\n legend: {\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(2),\n height: ({ spacing }) => spacing(5),\n },\n legendItem: {\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(1.5),\n },\n} satisfies Record<string, SxProps<Theme>>\n\n/**\n * Loading state for the Timeseries widget. Mirrors a line chart's\n * silhouette — three thin horizontal segments at staggered offsets to\n * suggest a moving line, plus a 2-dot legend stub. Sibling-consistent\n * with Bar / Histogram / Scatter skeletons (column-flex container with\n * legend strip below).\n */\nexport function TimeseriesSkeleton() {\n return (\n <Box sx={styles.container}>\n <Box sx={styles.graph}>\n <Skeleton variant='rectangular' sx={styles.segmentA} />\n <Skeleton variant='rectangular' sx={styles.segmentB} />\n <Skeleton variant='rectangular' sx={styles.segmentC} />\n </Box>\n <Box sx={styles.legend}>\n {[0, 1].map((i) => (\n <Box key={`legend-${i}`} sx={styles.legendItem}>\n <Skeleton variant='circular' width={8} height={8} />\n <Skeleton width={48} height={8} />\n </Box>\n ))}\n </Box>\n </Box>\n )\n}\n","import {\n buildCsvDownloadItem,\n withPngItem,\n type DownloadItem,\n type WidgetDownloadArgs,\n} from '../actions/download'\nimport type { TimeseriesWidgetData } from './types'\n\n/**\n * Download menu items for the Timeseries widget. Always includes a CSV item\n * with `time, series_1, series_2, …` columns (one row per unique time across\n * all series; ISO-8601 strings for `Date`/numeric times). When\n * `getCaptureEl` is given, prepends a PNG item that rasterises the captured\n * element via `html2canvas`.\n */\nexport function createTimeseriesDownloadConfig(\n args: WidgetDownloadArgs<TimeseriesWidgetData> & {\n seriesNames?: readonly string[]\n },\n): DownloadItem[] {\n return withPngItem(\n args,\n buildCsvDownloadItem({\n filename: args.filename,\n getRows: (ctx) => {\n const data = args.getData(ctx)\n const seriesCount = data.length\n\n // Collect every unique time, preserving insertion order.\n const timeKeys: (Date | number | string)[] = []\n const seenKeys = new Set<string>()\n for (const series of data) {\n for (const point of series) {\n const key = String(point.name)\n if (!seenKeys.has(key)) {\n seenKeys.add(key)\n timeKeys.push(point.name)\n }\n }\n }\n\n // Build a quick lookup per series for O(rows × series) emit.\n const lookups = data.map(\n (series) => new Map(series.map((p) => [String(p.name), p.value])),\n )\n\n const header: unknown[] = ['time']\n for (let i = 0; i < seriesCount; i++) {\n header.push(args.seriesNames?.[i] ?? `series_${i + 1}`)\n }\n const rows: unknown[][] = [header]\n for (const key of timeKeys) {\n const row: unknown[] = [formatTime(key)]\n const lookupKey = String(key)\n for (const lookup of lookups) row.push(lookup.get(lookupKey) ?? '')\n rows.push(row)\n }\n\n return rows\n },\n }),\n )\n}\n\nfunction formatTime(v: Date | number | string): string {\n if (v instanceof Date) return v.toISOString()\n if (typeof v === 'number') return new Date(v).toISOString()\n return v\n}\n","/**\n * `LockSelection` filter for Timeseries. Data is `{name, value}[][]` like\n * Bar/Pie/Category, but `name` may arrive as `Date | number | string` (the\n * time axis stores a `Date`). `lockedItems` is snapshotted from `selection`,\n * whose keys are already normalized to `Date → ms` (see `options.ts`'s\n * `normalizeName`) — so a raw `Date` name must be normalized the same way\n * before the membership check, or every point would compare a `Date` object\n * against a `number` and silently fail to match, filtering everything out.\n */\nexport function filterTimeseriesByLockedItems(\n input: unknown,\n lockedItems: readonly (string | number)[],\n): unknown {\n if (lockedItems.length === 0) return input\n if (!Array.isArray(input)) return input\n const locked = new Set<string | number>(lockedItems)\n return input.map((series: unknown): unknown => {\n if (!Array.isArray(series)) return series\n return series.filter((item: unknown) => {\n if (item == null || typeof item !== 'object' || !('name' in item)) {\n return false\n }\n const raw = (item as { name: unknown }).name\n const name = raw instanceof Date ? raw.getTime() : raw\n return (\n (typeof name === 'string' || typeof name === 'number') &&\n locked.has(name)\n )\n })\n })\n}\n"],"mappings":";;;;;;;;;;AA4CA,SAAgBkB,EAAkB,EAChC,UACA,cACA,qBACkD;CAGlD,IAAIC,IAAU,GACVC,IAAU;CAEd,OAAO;EACL,MAAM;GACJ,MAAMC,EAAUC,GAAO,CAAC;GACxB,KAAKD,EAAUC,GAAO,CAAC;GACvB,OAAOD,EAAUC,GAAO,CAAC;GAEzB,GAAGR,EAAgB,IAAOQ,CAAK;GAC/B,cAAc;EAChB;EACA,SAAS;GACP,SAAS;GACT,iBAAiBA,EAAM,QAAQ,KAAK;GACpC,aAAa;GACb,SAAS,CAACD,EAAUC,GAAO,CAAC,GAAGD,EAAUC,GAAO,CAAC,CAAC;GAClD,WAAW;IACT,OAAOA,EAAM,QAAQ,OAAO;IAC5B,UAAU;IACV,YAAYA,EAAM,WAAW,QAAQ;GACvC;GACA,aAAa,EAAE,MAAM,OAAO;GAC5B,UAAUP,EAAwBO,CAAK;GACvC,WAAWC,EAAgCC,GAAWC,CAAc;EACtE;EAGA,QAAQ,EACN,GAAGd,EAAkB,EAAE,WAAW,GAAM,CAAC,EAC3C;EACA,aAAa,EAAE,WAAW,EAAE,OAAOW,EAAM,QAAQ,KAAK,KAAK,EAAE;EAC7D,OAAO,CACLA,EAAM,QAAQ,UAAU,MACxB,GAAG,OAAO,OACPA,EAAM,QACJ,aAAa,QAA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,YAAY,OAAOA,KAAS,aAC7C8B,EAAO,IAAI9B,CAAI;CAEnB,CAAC,IAXkC3C,CAYpC;AACH"}
|
package/dist/widgets/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../utils-
|
|
1
|
+
import { n as e, r as t, t as n } from "../utils-Dw4y8tiq.js";
|
|
2
2
|
export { t as mergeOptions, e as positionDataZoomForLegend, n as resolveThemeColor };
|