@carto/ps-react-ui 4.6.2 → 4.7.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/{download-config-C3I0jWIL.js → download-config-DNLkypdN.js} +8 -7
- package/dist/{download-config-C3I0jWIL.js.map → download-config-DNLkypdN.js.map} +1 -1
- package/dist/options-CthfUJDz.js +46 -0
- package/dist/options-CthfUJDz.js.map +1 -0
- package/dist/shared-resize-observer-98b1SK1e.js +17 -0
- package/dist/shared-resize-observer-98b1SK1e.js.map +1 -0
- package/dist/styles-BYTyKQFP.js +142 -0
- package/dist/{styles-Y8q7Jff3.js.map → styles-BYTyKQFP.js.map} +1 -1
- package/dist/types/widgets/actions/brush-toggle/brush-overlay.d.ts +24 -0
- package/dist/types/widgets/actions/brush-toggle/brush-toggle.d.ts +15 -10
- package/dist/types/widgets/actions/brush-toggle/hit-test.d.ts +19 -0
- package/dist/types/widgets/actions/brush-toggle/hit-test.test.d.ts +1 -0
- package/dist/types/widgets/actions/brush-toggle/style.d.ts +8 -0
- package/dist/types/widgets/actions/brush-toggle/types.d.ts +35 -1
- package/dist/types/widgets/utils/chart-config/index.d.ts +1 -1
- package/dist/types/widgets/utils/chart-config/option-builders.d.ts +27 -0
- package/dist/widgets/actions.js +985 -772
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +34 -30
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +9 -8
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +79 -91
- package/dist/widgets/echart.js.map +1 -1
- package/dist/widgets/formula.js +43 -42
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +67 -63
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/markdown.js +15 -14
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/pie.js +38 -37
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/scatterplot.js +31 -30
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/spread.js +47 -46
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/table.js +17 -16
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +35 -34
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/utils.js +2 -2
- package/package.json +3 -1
- package/src/widgets/actions/brush-toggle/brush-overlay.tsx +386 -0
- package/src/widgets/actions/brush-toggle/brush-toggle.tsx +88 -152
- package/src/widgets/actions/brush-toggle/hit-test.test.ts +65 -0
- package/src/widgets/actions/brush-toggle/hit-test.ts +45 -0
- package/src/widgets/actions/brush-toggle/style.ts +32 -0
- package/src/widgets/actions/brush-toggle/types.ts +36 -1
- package/src/widgets/bar/config.ts +5 -0
- package/src/widgets/echart/options.ts +1 -4
- package/src/widgets/histogram/config.ts +9 -4
- package/src/widgets/pie/config.ts +2 -0
- package/src/widgets/scatterplot/config.ts +2 -0
- package/src/widgets/timeseries/config.ts +2 -0
- package/src/widgets/utils/chart-config/index.ts +2 -0
- package/src/widgets/utils/chart-config/option-builders.test.ts +105 -1
- package/src/widgets/utils/chart-config/option-builders.ts +56 -0
- package/dist/options-D9wflre6.js +0 -49
- package/dist/options-D9wflre6.js.map +0 -1
- package/dist/styles-Y8q7Jff3.js +0 -118
package/dist/styles-Y8q7Jff3.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
function u(t) {
|
|
2
|
-
if (t === 0) return 0;
|
|
3
|
-
const e = Math.abs(t), n = Math.pow(10, Math.floor(Math.log10(e))), i = Math.ceil(e / n) * n;
|
|
4
|
-
return t < 0 ? -i : i;
|
|
5
|
-
}
|
|
6
|
-
function d({
|
|
7
|
-
hasLegend: t,
|
|
8
|
-
labelFormatter: e
|
|
9
|
-
}) {
|
|
10
|
-
return {
|
|
11
|
-
show: t,
|
|
12
|
-
icon: "circle",
|
|
13
|
-
left: 0,
|
|
14
|
-
bottom: 0,
|
|
15
|
-
orient: "horizontal",
|
|
16
|
-
type: "scroll",
|
|
17
|
-
...e && {
|
|
18
|
-
formatter: (n) => String(e(n))
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
function x(t, e) {
|
|
23
|
-
return {
|
|
24
|
-
...!t && {
|
|
25
|
-
bottom: parseInt(e.spacing(3))
|
|
26
|
-
},
|
|
27
|
-
...t && {
|
|
28
|
-
bottom: parseInt(e.spacing(7))
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function y(t) {
|
|
33
|
-
return function(e, n, i, o, a) {
|
|
34
|
-
const l = {
|
|
35
|
-
top: parseInt(t.spacing(0.5))
|
|
36
|
-
};
|
|
37
|
-
return a.contentSize[0] < a.viewSize[0] - e[0] ? l.left = e[0] : l.right = a.viewSize[0] - e[0], l;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function m(t) {
|
|
41
|
-
if (t)
|
|
42
|
-
return (e) => t(e);
|
|
43
|
-
}
|
|
44
|
-
function b(t, e) {
|
|
45
|
-
const n = t && !Array.isArray(t), i = t, o = e && n ? (a) => String(e(a)) : void 0;
|
|
46
|
-
return {
|
|
47
|
-
...i,
|
|
48
|
-
axisLabel: {
|
|
49
|
-
...typeof i.axisLabel == "object" && i.axisLabel ? i.axisLabel : {},
|
|
50
|
-
formatter: o
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
function F(t, e) {
|
|
55
|
-
let n = m(e);
|
|
56
|
-
const i = t && !Array.isArray(t), o = t;
|
|
57
|
-
return (!i || o.type !== "value") && (n = void 0), {
|
|
58
|
-
...o,
|
|
59
|
-
axisLabel: {
|
|
60
|
-
...typeof o.axisLabel == "object" && o.axisLabel ? o.axisLabel : {},
|
|
61
|
-
formatter: n
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function v(t) {
|
|
66
|
-
return (e) => {
|
|
67
|
-
const n = Array.isArray(e) ? e : [e], i = (r, s) => `<div style="margin: 0px 0 0;line-height:1;">${r ? `<div style="font-size:11px;color:#FFFFFF;font-weight:400;line-height:1; margin-bottom: 10px">${r}</div>` : ""}<div style="margin: 0;line-height:1;">${s}</div><div style="clear:both"></div></div>`, o = n.map((r) => {
|
|
68
|
-
const {
|
|
69
|
-
name: s,
|
|
70
|
-
seriesName: c,
|
|
71
|
-
marker: f,
|
|
72
|
-
value: h
|
|
73
|
-
} = t(r, n);
|
|
74
|
-
return {
|
|
75
|
-
name: s,
|
|
76
|
-
seriesName: c,
|
|
77
|
-
marker: f,
|
|
78
|
-
value: h
|
|
79
|
-
};
|
|
80
|
-
}), a = o[0]?.name ?? "", p = a || n.length > 1 ? "margin: 10px 0 0;line-height:1;" : "margin: 0;line-height:1;", g = o.map(({
|
|
81
|
-
seriesName: r,
|
|
82
|
-
marker: s,
|
|
83
|
-
value: c
|
|
84
|
-
}) => `<div style="${p}"><div style="margin: 0px 0 0;line-height:1;">${s}${r ? `<span style="font-size:11px;color:#FFFFFF;font-weight:400;margin-left:2px;margin-right:10px">${r}</span>` : ""}<span style="float:right;margin-left:10px;font-size:11px;color:#FFFFFF;font-weight:900">${c}</span></div></div>`);
|
|
85
|
-
return i(a, g.join(""));
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
const w = {
|
|
89
|
-
graph: {
|
|
90
|
-
/**
|
|
91
|
-
* Common container style for chart widget skeletons
|
|
92
|
-
*/
|
|
93
|
-
container: {
|
|
94
|
-
display: "flex",
|
|
95
|
-
alignItems: "center",
|
|
96
|
-
justifyContent: "space-between",
|
|
97
|
-
flexDirection: "column",
|
|
98
|
-
gap: ({
|
|
99
|
-
spacing: t
|
|
100
|
-
}) => t(1),
|
|
101
|
-
height: ({
|
|
102
|
-
spacing: t
|
|
103
|
-
}) => t(38)
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
export {
|
|
108
|
-
b as a,
|
|
109
|
-
F as b,
|
|
110
|
-
w as c,
|
|
111
|
-
x as d,
|
|
112
|
-
d as e,
|
|
113
|
-
m as f,
|
|
114
|
-
v as g,
|
|
115
|
-
y as h,
|
|
116
|
-
u as n
|
|
117
|
-
};
|
|
118
|
-
//# sourceMappingURL=styles-Y8q7Jff3.js.map
|