@carto/ps-react-ui 4.3.0-widgets.0 → 5.0.0-widgets.2
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/components.js +25 -23
- package/dist/components.js.map +1 -1
- package/dist/error-zHOU_QIB.js +38 -0
- package/dist/error-zHOU_QIB.js.map +1 -0
- package/dist/exports-Cr43OCul.js +51 -0
- package/dist/exports-Cr43OCul.js.map +1 -0
- package/dist/{lasso-tool-BC-rsMMW.js → lasso-tool-CYn3ivf-.js} +165 -183
- package/dist/lasso-tool-CYn3ivf-.js.map +1 -0
- package/dist/no-data-Cz80hEWj.js +61 -0
- package/dist/no-data-Cz80hEWj.js.map +1 -0
- package/dist/options-D9wflre6.js +49 -0
- package/dist/options-D9wflre6.js.map +1 -0
- package/dist/row-C_m1ovHv.js +35 -0
- package/dist/row-C_m1ovHv.js.map +1 -0
- package/dist/series-6xp-KQ0S.js +91 -0
- package/dist/series-6xp-KQ0S.js.map +1 -0
- package/dist/{smart-tooltip-BSlcAkBM.js → smart-tooltip-BEtBaIdz.js} +2 -2
- package/dist/{smart-tooltip-BSlcAkBM.js.map → smart-tooltip-BEtBaIdz.js.map} +1 -1
- package/dist/styles-dOu_pRNb.js +77 -0
- package/dist/styles-dOu_pRNb.js.map +1 -0
- package/dist/tooltip-BDnrRKrp.js +25 -0
- package/dist/tooltip-BDnrRKrp.js.map +1 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/use-debounce.d.ts +19 -0
- package/dist/types/hooks/use-widget-ref.d.ts +17 -0
- package/dist/types/widgets/_shared/chart-config/config-factory.d.ts +5 -11
- package/dist/types/widgets/_shared/chart-config/option-builders.d.ts +3 -8
- package/dist/types/widgets/actions/change-column/change-column-icon.d.ts +1 -0
- package/dist/types/widgets/actions/change-column/change-column.d.ts +16 -0
- package/dist/types/widgets/actions/change-column/sortable-column-item.d.ts +9 -0
- package/dist/types/widgets/actions/change-column/types.d.ts +19 -0
- package/dist/types/widgets/actions/download/download.d.ts +1 -1
- package/dist/types/widgets/actions/download/exports.d.ts +1 -1
- package/dist/types/widgets/actions/download/types.d.ts +3 -11
- package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +1 -1
- package/dist/types/widgets/actions/fullscreen/styles.d.ts +6 -0
- package/dist/types/widgets/actions/fullscreen/types.d.ts +8 -9
- package/dist/types/widgets/actions/index.d.ts +14 -1
- package/dist/types/widgets/actions/lock-selection/lock-selection.d.ts +19 -0
- package/dist/types/widgets/actions/lock-selection/types.d.ts +38 -0
- package/dist/types/widgets/actions/relative-data/relative-data.d.ts +18 -0
- package/dist/types/widgets/actions/relative-data/style.d.ts +8 -0
- package/dist/types/widgets/actions/relative-data/types.d.ts +27 -0
- package/dist/types/widgets/actions/relative-data/utils.d.ts +9 -0
- package/dist/types/widgets/actions/relative-data/utils.test.d.ts +1 -0
- package/dist/types/widgets/actions/searcher/searcher-toggle.d.ts +18 -0
- package/dist/types/widgets/actions/searcher/searcher.d.ts +21 -0
- package/dist/types/widgets/actions/searcher/types.d.ts +64 -0
- package/dist/types/widgets/actions/shared/styles.d.ts +11 -0
- package/dist/types/widgets/actions/stack-toggle/grouped-bar-chart-icon.d.ts +1 -0
- package/dist/types/widgets/actions/stack-toggle/stack-toggle.d.ts +16 -0
- package/dist/types/widgets/actions/stack-toggle/types.d.ts +25 -0
- package/dist/types/widgets/actions/zoom-toggle/index.d.ts +2 -0
- package/dist/types/widgets/actions/zoom-toggle/style.d.ts +13 -0
- package/dist/types/widgets/actions/zoom-toggle/types.d.ts +41 -0
- package/dist/types/widgets/actions/zoom-toggle/zoom-toggle.d.ts +18 -0
- package/dist/types/widgets/bar/config.d.ts +5 -4
- package/dist/types/widgets/bar/index.d.ts +2 -2
- package/dist/types/widgets/bar/types.d.ts +6 -12
- package/dist/types/widgets/category/category-ui.d.ts +2 -0
- package/dist/types/widgets/category/components/category-bar.d.ts +7 -0
- package/dist/types/widgets/category/components/category-legend.d.ts +6 -0
- package/dist/types/widgets/category/components/category-row-multi.d.ts +11 -0
- package/dist/types/widgets/category/components/category-row-other.d.ts +6 -0
- package/dist/types/widgets/category/components/category-row-single.d.ts +11 -0
- package/dist/types/widgets/category/components/index.d.ts +10 -0
- package/dist/types/widgets/category/config.d.ts +15 -0
- package/dist/types/widgets/category/index.d.ts +6 -0
- package/dist/types/widgets/category/skeleton.d.ts +1 -0
- package/dist/types/widgets/category/style.d.ts +121 -0
- package/dist/types/widgets/category/types.d.ts +33 -0
- package/dist/types/widgets/echart/echart-ui.d.ts +1 -1
- package/dist/types/widgets/echart/index.d.ts +2 -2
- package/dist/types/widgets/echart/options.d.ts +2 -3
- package/dist/types/widgets/echart/types.d.ts +11 -10
- package/dist/types/widgets/echart/utils.d.ts +22 -16
- package/dist/types/widgets/error/error.d.ts +2 -0
- package/dist/types/widgets/error/index.d.ts +2 -0
- package/dist/types/widgets/error/types.d.ts +12 -0
- package/dist/types/widgets/formula/components/row.d.ts +1 -1
- package/dist/types/widgets/formula/config.d.ts +4 -2
- package/dist/types/widgets/formula/index.d.ts +2 -1
- package/dist/types/widgets/formula/types.d.ts +6 -18
- package/dist/types/widgets/histogram/config.d.ts +5 -4
- package/dist/types/widgets/histogram/index.d.ts +2 -2
- package/dist/types/widgets/histogram/types.d.ts +6 -12
- package/dist/types/widgets/index.d.ts +6 -4
- package/dist/types/widgets/markdown/config.d.ts +4 -2
- package/dist/types/widgets/markdown/index.d.ts +2 -2
- package/dist/types/widgets/markdown/markdown-ui.d.ts +1 -1
- package/dist/types/widgets/markdown/types.d.ts +6 -16
- package/dist/types/widgets/no-data/index.d.ts +2 -0
- package/dist/types/widgets/no-data/no-data.d.ts +35 -0
- package/dist/types/widgets/no-data/style.d.ts +6 -0
- package/dist/types/widgets/no-data/types.d.ts +67 -0
- package/dist/types/widgets/note/note.d.ts +1 -1
- package/dist/types/widgets/note/style.d.ts +12 -1
- package/dist/types/widgets/note/types.d.ts +4 -3
- package/dist/types/widgets/pie/config.d.ts +5 -4
- package/dist/types/widgets/pie/index.d.ts +2 -2
- package/dist/types/widgets/pie/types.d.ts +6 -12
- package/dist/types/widgets/range/config.d.ts +6 -2
- package/dist/types/widgets/range/index.d.ts +2 -1
- package/dist/types/widgets/range/types.d.ts +6 -17
- package/dist/types/widgets/root/index.d.ts +2 -1
- package/dist/types/widgets/root/root.d.ts +1 -1
- package/dist/types/widgets/root/types.d.ts +6 -12
- package/dist/types/widgets/root/utils.d.ts +1 -0
- package/dist/types/widgets/scatterplot/config.d.ts +5 -4
- package/dist/types/widgets/scatterplot/index.d.ts +2 -2
- package/dist/types/widgets/scatterplot/types.d.ts +6 -12
- package/dist/types/widgets/selection-summary/index.d.ts +2 -0
- package/dist/types/widgets/selection-summary/selection-summary.d.ts +2 -0
- package/dist/types/widgets/selection-summary/style.d.ts +9 -0
- package/dist/types/widgets/selection-summary/types.d.ts +13 -0
- package/dist/types/widgets/spread/config.d.ts +10 -2
- package/dist/types/widgets/spread/index.d.ts +2 -1
- package/dist/types/widgets/spread/types.d.ts +6 -18
- package/dist/types/widgets/stores/index.d.ts +2 -0
- package/dist/types/widgets/stores/types.d.ts +179 -12
- package/dist/types/widgets/stores/widget-store.d.ts +2 -27
- package/dist/types/widgets/subheader/index.d.ts +2 -0
- package/dist/types/widgets/subheader/style.d.ts +19 -0
- package/dist/types/widgets/subheader/subheader.d.ts +2 -0
- package/dist/types/widgets/subheader/types.d.ts +10 -0
- package/dist/types/widgets/table/components/cell-header.d.ts +5 -0
- package/dist/types/widgets/table/components/cell.d.ts +16 -0
- package/dist/types/widgets/table/components/index.d.ts +4 -0
- package/dist/types/widgets/table/components/pagination-actions.d.ts +5 -0
- package/dist/types/widgets/table/components/pagination.d.ts +5 -0
- package/dist/types/widgets/table/components/row.d.ts +5 -0
- package/dist/types/widgets/table/config.d.ts +11 -0
- package/dist/types/widgets/table/helpers.d.ts +38 -0
- package/dist/types/widgets/table/helpers.test.d.ts +1 -0
- package/dist/types/widgets/table/hooks/index.d.ts +6 -0
- package/dist/types/widgets/table/hooks/use-pagination.d.ts +45 -0
- package/dist/types/widgets/table/hooks/use-pagination.test.d.ts +1 -0
- package/dist/types/widgets/table/hooks/use-selection.d.ts +32 -0
- package/dist/types/widgets/table/hooks/use-selection.test.d.ts +1 -0
- package/dist/types/widgets/table/hooks/use-sort.d.ts +29 -0
- package/dist/types/widgets/table/hooks/use-sort.test.d.ts +1 -0
- package/dist/types/widgets/table/index.d.ts +13 -0
- package/dist/types/widgets/table/serializer.d.ts +16 -0
- package/dist/types/widgets/table/skeleton.d.ts +10 -0
- package/dist/types/widgets/table/style.d.ts +33 -0
- package/dist/types/widgets/table/table-ui.d.ts +32 -0
- package/dist/types/widgets/table/types.d.ts +201 -0
- package/dist/types/widgets/timeseries/config.d.ts +5 -4
- package/dist/types/widgets/timeseries/index.d.ts +2 -2
- package/dist/types/widgets/timeseries/types.d.ts +6 -12
- package/dist/types/widgets/toolbar-actions/index.d.ts +2 -0
- package/dist/types/widgets/toolbar-actions/styles.d.ts +37 -0
- package/dist/types/widgets/toolbar-actions/toolbar-actions.d.ts +8 -0
- package/dist/types/widgets/toolbar-actions/types.d.ts +45 -0
- package/dist/types/widgets/wrapper/index.d.ts +2 -2
- package/dist/types/widgets/wrapper/styles.d.ts +6 -0
- package/dist/types/widgets/wrapper/types.d.ts +7 -5
- package/dist/types/widgets/wrapper/wrapper-ui.d.ts +1 -1
- package/dist/types/widgets/wrapper/wrapper.d.ts +1 -1
- package/dist/utils-Dv5Z47UQ.js +144 -0
- package/dist/utils-Dv5Z47UQ.js.map +1 -0
- package/dist/widget-store-DNyVElxd.js +190 -0
- package/dist/widget-store-DNyVElxd.js.map +1 -0
- package/dist/widgets/actions.js +826 -6
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +189 -4
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +460 -0
- package/dist/widgets/category.js.map +1 -0
- package/dist/widgets/echart.js +120 -8
- package/dist/widgets/echart.js.map +1 -1
- package/dist/widgets/error.js +5 -0
- package/dist/widgets/error.js.map +1 -0
- package/dist/widgets/formula.js +117 -20
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +172 -4
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/markdown.js +127 -0
- package/dist/widgets/markdown.js.map +1 -0
- package/dist/widgets/no-data.js +5 -0
- package/dist/widgets/no-data.js.map +1 -0
- package/dist/widgets/note.js +121 -2
- package/dist/widgets/note.js.map +1 -1
- package/dist/widgets/pie.js +213 -4
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/range.js +210 -12
- package/dist/widgets/range.js.map +1 -1
- package/dist/widgets/root.js +65 -2
- package/dist/widgets/root.js.map +1 -1
- package/dist/widgets/scatterplot.js +219 -4
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/selection-summary.js +40 -0
- package/dist/widgets/selection-summary.js.map +1 -0
- package/dist/widgets/skeleton-loader.js +21 -2
- package/dist/widgets/skeleton-loader.js.map +1 -1
- package/dist/widgets/spread.js +162 -17
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/stores.js +5 -0
- package/dist/widgets/stores.js.map +1 -0
- package/dist/widgets/subheader.js +52 -0
- package/dist/widgets/subheader.js.map +1 -0
- package/dist/widgets/table.js +691 -0
- package/dist/widgets/table.js.map +1 -0
- package/dist/widgets/timeseries.js +171 -4
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/toolbar-actions.js +6106 -0
- package/dist/widgets/toolbar-actions.js.map +1 -0
- package/dist/widgets/wrapper.js +292 -6
- package/dist/widgets/wrapper.js.map +1 -1
- package/dist/widgets.js +6 -83
- package/dist/widgets.js.map +1 -1
- package/package.json +46 -6
- package/dist/const-BLV7Tvte.js +0 -758
- package/dist/const-BLV7Tvte.js.map +0 -1
- package/dist/download-KroQ0SWg.js +0 -195
- package/dist/download-KroQ0SWg.js.map +0 -1
- package/dist/echart-CqfROFu3.js +0 -214
- package/dist/echart-CqfROFu3.js.map +0 -1
- package/dist/formula-ui-ChzvMEOG.js +0 -52
- package/dist/formula-ui-ChzvMEOG.js.map +0 -1
- package/dist/lasso-tool-BC-rsMMW.js.map +0 -1
- package/dist/markdown-n_tOtoiT.js +0 -27
- package/dist/markdown-n_tOtoiT.js.map +0 -1
- package/dist/markdown-ui-BBrzzd7Y.js +0 -62
- package/dist/markdown-ui-BBrzzd7Y.js.map +0 -1
- package/dist/note-DF-n70TX.js +0 -101
- package/dist/note-DF-n70TX.js.map +0 -1
- package/dist/range-ui-CtUX11Xm.js +0 -146
- package/dist/range-ui-CtUX11Xm.js.map +0 -1
- package/dist/root-L_WZnJY5.js +0 -46
- package/dist/root-L_WZnJY5.js.map +0 -1
- package/dist/row-DQaSxmDV.js +0 -18
- package/dist/row-DQaSxmDV.js.map +0 -1
- package/dist/series-CsyEPq-X.js +0 -83
- package/dist/series-CsyEPq-X.js.map +0 -1
- package/dist/skeleton-BSPcEvfq.js +0 -27
- package/dist/skeleton-BSPcEvfq.js.map +0 -1
- package/dist/skeleton-C4rOYTy-.js +0 -78
- package/dist/skeleton-C4rOYTy-.js.map +0 -1
- package/dist/skeleton-C9Jqc241.js +0 -82
- package/dist/skeleton-C9Jqc241.js.map +0 -1
- package/dist/skeleton-D-zHBBIw.js +0 -64
- package/dist/skeleton-D-zHBBIw.js.map +0 -1
- package/dist/skeleton-DMP-IwaJ.js +0 -109
- package/dist/skeleton-DMP-IwaJ.js.map +0 -1
- package/dist/skeleton-DRorqowB.js +0 -22
- package/dist/skeleton-DRorqowB.js.map +0 -1
- package/dist/skeleton-DsZhv-AH.js +0 -89
- package/dist/skeleton-DsZhv-AH.js.map +0 -1
- package/dist/skeleton-Dx3FCer0.js +0 -13
- package/dist/skeleton-Dx3FCer0.js.map +0 -1
- package/dist/skeleton-QVDdb1c2.js +0 -21
- package/dist/skeleton-QVDdb1c2.js.map +0 -1
- package/dist/skeleton-loader-DWC1-EAx.js +0 -23
- package/dist/skeleton-loader-DWC1-EAx.js.map +0 -1
- package/dist/spread-ui-BjzH190y.js +0 -82
- package/dist/spread-ui-BjzH190y.js.map +0 -1
- package/dist/style-BGeCtQkP.js +0 -19
- package/dist/style-BGeCtQkP.js.map +0 -1
- package/dist/style-C7v1iwqD.js +0 -34
- package/dist/style-C7v1iwqD.js.map +0 -1
- package/dist/styles-cohnxh9F.js +0 -23
- package/dist/styles-cohnxh9F.js.map +0 -1
- package/dist/types/widgets/config-loader/index.d.ts +0 -2
- package/dist/types/widgets/config-loader/types.d.ts +0 -12
- package/dist/types/widgets/config-loader/use-config.d.ts +0 -5
- package/dist/types/widgets/widget/const.d.ts +0 -2
- package/dist/types/widgets/widget/types.d.ts +0 -47
- package/dist/types/widgets/widget/widget.d.ts +0 -2
- package/dist/use-config-BYEOiIcu.js +0 -43
- package/dist/use-config-BYEOiIcu.js.map +0 -1
- package/dist/widget-store-yDO2ul8g.js +0 -44
- package/dist/widget-store-yDO2ul8g.js.map +0 -1
- package/dist/widgets/config-loader.js +0 -5
- package/dist/widgets/config-loader.js.map +0 -1
- package/dist/wrapper-57csMybC.js +0 -265
- package/dist/wrapper-57csMybC.js.map +0 -1
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as f } from "react/compiler-runtime";
|
|
3
|
-
import { Box as r, Skeleton as i } from "@mui/material";
|
|
4
|
-
import { b as g } from "./styles-cohnxh9F.js";
|
|
5
|
-
const u = {
|
|
6
|
-
skeleton: {
|
|
7
|
-
graph: g.graph
|
|
8
|
-
}
|
|
9
|
-
}, p = 32, h = 294 - p, m = h - p;
|
|
10
|
-
function j() {
|
|
11
|
-
const e = f(5);
|
|
12
|
-
let t, c;
|
|
13
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
14
|
-
display: "flex",
|
|
15
|
-
alignItems: "center",
|
|
16
|
-
justifyContent: "center",
|
|
17
|
-
position: "relative"
|
|
18
|
-
}, c = /* @__PURE__ */ n(i, { variant: "circular", width: h, height: h }), e[0] = t, e[1] = c) : (t = e[0], c = e[1]);
|
|
19
|
-
let o;
|
|
20
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ n(i, { sx: {
|
|
21
|
-
position: "absolute",
|
|
22
|
-
zIndex: 1
|
|
23
|
-
}, variant: "circular", width: m, height: m }), e[2] = o) : o = e[2];
|
|
24
|
-
let s;
|
|
25
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ a(r, { sx: t, children: [
|
|
26
|
-
c,
|
|
27
|
-
o,
|
|
28
|
-
/* @__PURE__ */ a(r, { sx: {
|
|
29
|
-
position: "absolute",
|
|
30
|
-
zIndex: 2,
|
|
31
|
-
display: "flex",
|
|
32
|
-
flexDirection: "column",
|
|
33
|
-
alignItems: "center",
|
|
34
|
-
justifyContent: "center",
|
|
35
|
-
gap: S
|
|
36
|
-
}, children: [
|
|
37
|
-
/* @__PURE__ */ n(i, { height: 24, width: 72 }),
|
|
38
|
-
/* @__PURE__ */ n(i, { height: 8, width: 48 })
|
|
39
|
-
] })
|
|
40
|
-
] }), e[3] = s) : s = e[3];
|
|
41
|
-
let l;
|
|
42
|
-
return e[4] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ a(r, { sx: u.skeleton.graph.container, children: [
|
|
43
|
-
s,
|
|
44
|
-
/* @__PURE__ */ n(r, { sx: {
|
|
45
|
-
display: "flex",
|
|
46
|
-
alignItems: "center",
|
|
47
|
-
gap: y,
|
|
48
|
-
height: x
|
|
49
|
-
}, children: Array(2).fill(0).map(_) })
|
|
50
|
-
] }), e[4] = l) : l = e[4], l;
|
|
51
|
-
}
|
|
52
|
-
function _(e, t) {
|
|
53
|
-
return /* @__PURE__ */ a(r, { sx: {
|
|
54
|
-
display: "flex",
|
|
55
|
-
alignItems: "center",
|
|
56
|
-
gap: d
|
|
57
|
-
}, children: [
|
|
58
|
-
/* @__PURE__ */ n(i, { variant: "circular", width: 8, height: 8 }),
|
|
59
|
-
/* @__PURE__ */ n(i, { width: 48, height: 8 })
|
|
60
|
-
] }, t);
|
|
61
|
-
}
|
|
62
|
-
function d(e) {
|
|
63
|
-
const {
|
|
64
|
-
spacing: t
|
|
65
|
-
} = e;
|
|
66
|
-
return t(1.5);
|
|
67
|
-
}
|
|
68
|
-
function x(e) {
|
|
69
|
-
const {
|
|
70
|
-
spacing: t
|
|
71
|
-
} = e;
|
|
72
|
-
return t(5);
|
|
73
|
-
}
|
|
74
|
-
function y(e) {
|
|
75
|
-
const {
|
|
76
|
-
spacing: t
|
|
77
|
-
} = e;
|
|
78
|
-
return t(2);
|
|
79
|
-
}
|
|
80
|
-
function S(e) {
|
|
81
|
-
const {
|
|
82
|
-
spacing: t
|
|
83
|
-
} = e;
|
|
84
|
-
return t(1);
|
|
85
|
-
}
|
|
86
|
-
export {
|
|
87
|
-
j as PieSkeleton
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=skeleton-DsZhv-AH.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-DsZhv-AH.js","sources":["../src/widgets/pie/style.ts","../src/widgets/pie/skeleton.tsx"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\nimport { baseSkeletonStyles } from '../_shared/skeleton'\n\nexport const styles = {\n skeleton: {\n graph: baseSkeletonStyles.graph,\n },\n} satisfies Record<string, SxProps<Theme>>\n","import { Box, Skeleton } from '@mui/material'\nimport { styles } from './style'\n\nconst GUTTER = 32\nconst SIZE = 294 - GUTTER\nconst INNER_SIZE = SIZE - GUTTER\n\nexport function PieSkeleton() {\n return (\n <Box sx={styles.skeleton.graph.container}>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n }}\n >\n <Skeleton variant='circular' width={SIZE} height={SIZE} />\n <Skeleton\n sx={{\n position: 'absolute',\n zIndex: 1,\n }}\n variant='circular'\n width={INNER_SIZE}\n height={INNER_SIZE}\n />\n <Box\n sx={{\n position: 'absolute',\n zIndex: 2,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n gap: ({ spacing }) => spacing(1),\n }}\n >\n <Skeleton height={24} width={72} />\n <Skeleton height={8} width={48} />\n </Box>\n </Box>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(2),\n height: ({ spacing }) => spacing(5),\n }}\n >\n {Array(2)\n .fill(0)\n .map((_, i) => (\n <Box\n key={i}\n sx={{\n display: 'flex',\n alignItems: 'center',\n gap: ({ spacing }) => spacing(1.5),\n }}\n >\n <Skeleton variant='circular' width={8} height={8} />\n <Skeleton width={48} height={8} />\n </Box>\n ))}\n </Box>\n </Box>\n )\n}\n"],"names":["styles","skeleton","graph","baseSkeletonStyles","GUTTER","SIZE","INNER_SIZE","PieSkeleton","$","_c","t0","t1","Symbol","for","display","alignItems","justifyContent","position","Skeleton","t2","jsx","zIndex","t3","Box","jsxs","flexDirection","gap","_temp","t4","container","_temp2","height","_temp3","Array","fill","map","_temp5","_","i","_temp4","spacing","spacing_2","spacing_1","spacing_0"],"mappings":";;;;AAGO,MAAMA,IAAS;AAAA,EACpBC,UAAU;AAAA,IACRC,OAAOC,EAAmBD;AAAAA,EAAAA;AAE9B,GCJME,IAAS,IACTC,IAAO,MAAMD,GACbE,IAAaD,IAAOD;AAEnB,SAAAG,IAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA;AAAA,MAAAC,GAAAC;AAAA,EAAAH,EAAA,CAAA,MAAAI,OAAAC,IAAA,2BAAA,KAIKH,IAAA;AAAA,IAAAI,SACO;AAAA,IAAMC,YACH;AAAA,IAAQC,gBACJ;AAAA,IAAQC,UACd;AAAA,EAAA,GAGZN,sBAACO,GAAA,EAAiB,SAAA,YAAkBb,OAAAA,GAAcA,QAAAA,GAAI,GAAIG,OAAAE,GAAAF,OAAAG,MAAAD,IAAAF,EAAA,CAAA,GAAAG,IAA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1DNoB;AA0DM;AA5DH,SAAAQ,EAAAC,GAAAC,GAAA;AAAA,SA+CK,gBAAAd,EAACD,KAEK,IAAA;AAAA,IAAAT,SACO;AAAA,IAAMC,YACH;AAAA,IAAQW,KACfa;AAAAA,EAAAA,GAGP,UAAA;AAAA,IAAA,gBAAAnB,EAACF,KAAiB,SAAA,YAAkB,OAAA,GAAW,QAAA,GAAC;AAAA,IAChD,gBAAAE,EAACF,GAAA,EAAgB,OAAA,IAAY,QAAA,EAAA,CAAC;AAAA,EAAA,EAAA,GARzBoB,CASP;AAAM;AAzDX,SAAAC,EAAA7B,GAAA;AAoDe,QAAA;AAAA,IAAA8B,SAAAC;AAAAA,EAAAA,IAAA/B;AAAW,SAAK8B,EAAQ,GAAG;AAAC;AApD3C,SAAAR,EAAAtB,GAAA;AAyCY,QAAA;AAAA,IAAA8B,SAAAE;AAAAA,EAAAA,IAAAhC;AAAW,SAAK8B,EAAQ,CAAC;AAAC;AAzCtC,SAAAV,EAAApB,GAAA;AAwCS,QAAA;AAAA,IAAA8B,SAAAG;AAAAA,EAAAA,IAAAjC;AAAW,SAAK8B,EAAQ,CAAC;AAAC;AAxCnC,SAAAb,EAAAjB,GAAA;AA6BW,QAAA;AAAA,IAAA8B,SAAAA;AAAAA,EAAAA,IAAA9B;AAAW,SAAK8B,EAAQ,CAAC;AAAC;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { c as t } from "react/compiler-runtime";
|
|
3
|
-
import { Box as l, Skeleton as m } from "@mui/material";
|
|
4
|
-
import { s as i } from "./style-BGeCtQkP.js";
|
|
5
|
-
function f() {
|
|
6
|
-
const e = t(1);
|
|
7
|
-
let o;
|
|
8
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ r(l, { sx: i.row, "aria-label": "Formula skeleton", children: /* @__PURE__ */ r(m, { width: 120, height: 32 }) }), e[0] = o) : o = e[0], o;
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
f as FormulaSkeleton
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=skeleton-Dx3FCer0.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-Dx3FCer0.js","sources":["../src/widgets/formula/skeleton.tsx"],"sourcesContent":["import { Box, Skeleton } from '@mui/material'\nimport { styles } from './style'\n\nexport function FormulaSkeleton() {\n return (\n <Box sx={styles.row} aria-label='Formula skeleton'>\n <Skeleton width={120} height={32} />\n </Box>\n )\n}\n"],"names":["FormulaSkeleton","$","_c","t0","Symbol","for","jsx","Box","styles","row","Skeleton"],"mappings":";;;;AAGO,SAAAA,IAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA;AAAA,MAAAC;AAAA,SAAAF,EAAA,CAAA,MAAAG,OAAAC,IAAA,2BAAA,KAEHF,IAAA,gBAAAG,EAACC,GAAA,EAAQ,IAAAC,EAAMC,KAAiB,cAAA,oBAC9B,UAAA,gBAAAH,EAACI,GAAA,EAAgB,OAAA,KAAa,QAAA,IAAE,GAClC,GAAMT,OAAAE,KAAAA,IAAAF,EAAA,CAAA,GAFNE;AAEM;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as i, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as m } from "react/compiler-runtime";
|
|
3
|
-
import { Skeleton as r, Box as l } from "@mui/material";
|
|
4
|
-
import { s } from "./style-C7v1iwqD.js";
|
|
5
|
-
function g() {
|
|
6
|
-
const e = m(2);
|
|
7
|
-
let t;
|
|
8
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ i(r, { width: "100%", height: 32 }), e[0] = t) : t = e[0];
|
|
9
|
-
let o;
|
|
10
|
-
return e[1] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ n(l, { sx: s.rangeItem, "aria-label": "Range skeleton", children: [
|
|
11
|
-
t,
|
|
12
|
-
/* @__PURE__ */ n(l, { sx: s.inputsRow, children: [
|
|
13
|
-
/* @__PURE__ */ i(r, { width: "100%", height: 40 }),
|
|
14
|
-
/* @__PURE__ */ i(r, { width: "100%", height: 40 })
|
|
15
|
-
] })
|
|
16
|
-
] }), e[1] = o) : o = e[1], o;
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
g as RangeSkeleton
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=skeleton-QVDdb1c2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-QVDdb1c2.js","sources":["../src/widgets/range/skeleton.tsx"],"sourcesContent":["import { Box, Skeleton } from '@mui/material'\nimport { styles } from './style'\n\nexport function RangeSkeleton() {\n return (\n <Box sx={styles.rangeItem} aria-label='Range skeleton'>\n <Skeleton width='100%' height={32} />\n <Box sx={styles.inputsRow}>\n <Skeleton width='100%' height={40} />\n <Skeleton width='100%' height={40} />\n </Box>\n </Box>\n )\n}\n"],"names":["RangeSkeleton","$","_c","t0","Symbol","for","jsx","Skeleton","t1","Box","styles","rangeItem","jsxs","inputsRow"],"mappings":";;;;AAGO,SAAAA,IAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA;AAAA,MAAAC;AAAA,EAAAF,EAAA,CAAA,MAAAG,OAAAC,IAAA,2BAAA,KAGDF,IAAA,gBAAAG,EAACC,GAAA,EAAe,OAAA,QAAe,QAAA,IAAE,GAAIN,OAAAE,KAAAA,IAAAF,EAAA,CAAA;AAAA,MAAAO;AAAA,SAAAP,EAAA,CAAA,MAAAG,OAAAC,IAAA,2BAAA,KADvCG,sBAACC,GAAA,EAAQ,IAAAC,EAAMC,WAAuB,cAAA,kBACpCR,UAAAA;AAAAA,IAAAA;AAAAA,IACA,gBAAAS,EAACH,GAAA,EAAQ,IAAAC,EAAMG,WACb,UAAA;AAAA,MAAA,gBAAAP,EAACC,GAAA,EAAe,OAAA,QAAe,QAAA,IAAE;AAAA,MACjC,gBAAAD,EAACC,GAAA,EAAe,OAAA,QAAe,QAAA,GAAA,CAAE;AAAA,IAAA,EAAA,CACnC;AAAA,EAAA,GACF,GAAMN,OAAAO,KAAAA,IAAAP,EAAA,CAAA,GANNO;AAMM;"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as f } from "react/compiler-runtime";
|
|
3
|
-
import { u as d } from "./widget-store-yDO2ul8g.js";
|
|
4
|
-
import { Suspense as u } from "react";
|
|
5
|
-
function S(s) {
|
|
6
|
-
const e = f(4), {
|
|
7
|
-
id: r,
|
|
8
|
-
children: l,
|
|
9
|
-
Skeleton: i
|
|
10
|
-
} = s;
|
|
11
|
-
let o;
|
|
12
|
-
if (e[0] !== r ? (o = (t) => t.widgets[r]?.isLoading, e[0] = r, e[1] = o) : o = e[1], d(o)) {
|
|
13
|
-
if (!i)
|
|
14
|
-
return null;
|
|
15
|
-
let t;
|
|
16
|
-
return e[2] !== i ? (t = /* @__PURE__ */ n(u, { fallback: null, children: /* @__PURE__ */ n(i, {}) }), e[2] = i, e[3] = t) : t = e[3], t;
|
|
17
|
-
}
|
|
18
|
-
return l;
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
S
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=skeleton-loader-DWC1-EAx.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-loader-DWC1-EAx.js","sources":["../src/widgets/skeleton-loader/skeleton-loader.tsx"],"sourcesContent":["import type { SkeletonLoaderProps } from './types'\nimport { useWidgetStore } from '../stores/widget-store'\nimport { Suspense } from 'react'\n\nexport function SkeletonLoader({\n id,\n children,\n Skeleton,\n}: SkeletonLoaderProps) {\n const isLoading = useWidgetStore((state) => state.widgets[id]?.isLoading)\n\n if (isLoading) {\n if (!Skeleton) {\n return null\n }\n\n return (\n <Suspense fallback={null}>\n <Skeleton />\n </Suspense>\n )\n }\n\n return children\n}\n"],"names":["SkeletonLoader","t0","$","_c","id","children","Skeleton","t1","state","widgets","isLoading","useWidgetStore","t2","Suspense","jsx"],"mappings":";;;;AAIO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA,GAAwB;AAAA,IAAAC,IAAAA;AAAAA,IAAAC,UAAAA;AAAAA,IAAAC,UAAAA;AAAAA,EAAAA,IAAAL;AAIT,MAAAM;AAGpB,MAHoBL,SAAAE,KACaG,IAAAC,CAAAA,MAAWA,EAAKC,QAASL,CAAE,GAAYM,WAAAR,OAAAE,GAAAF,OAAAK,KAAAA,IAAAL,EAAA,CAAA,GAAtDS,EAAeJ,CAAuC,GAE3D;AACX,QAAI,CAACD;AAAQ,aACJ;AACR,QAAAM;AAAA,WAAAV,SAAAI,KAGCM,sBAACC,GAAA,EAAmB,UAAA,MAClB,UAAA,gBAAAC,EAACR,KAAQ,GACX,GAAWJ,OAAAI,GAAAJ,OAAAU,KAAAA,IAAAV,EAAA,CAAA,GAFXU;AAAAA,EAEW;AAEd,SAEMP;AAAQ;"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { jsx as s, jsxs as y, Fragment as P } from "react/jsx-runtime";
|
|
2
|
-
import { c as g } from "react/compiler-runtime";
|
|
3
|
-
import { I as S, a as $, P as b, S as j } from "./series-CsyEPq-X.js";
|
|
4
|
-
import { a as h } from "./widget-store-yDO2ul8g.js";
|
|
5
|
-
import "@mui/material";
|
|
6
|
-
import { R as M } from "./row-DQaSxmDV.js";
|
|
7
|
-
function _(e) {
|
|
8
|
-
const t = g(2);
|
|
9
|
-
let i;
|
|
10
|
-
return t[0] !== e ? (i = /* @__PURE__ */ s(S, { ...e, children: "-" }), t[0] = e, t[1] = i) : i = t[1], i;
|
|
11
|
-
}
|
|
12
|
-
const v = (e) => e.toString();
|
|
13
|
-
function w(e) {
|
|
14
|
-
const t = g(13);
|
|
15
|
-
let i, o, r;
|
|
16
|
-
t[0] !== e ? ({
|
|
17
|
-
id: i,
|
|
18
|
-
index: r,
|
|
19
|
-
...o
|
|
20
|
-
} = e, t[0] = e, t[1] = i, t[2] = o, t[3] = r) : (i = t[1], o = t[2], r = t[3]);
|
|
21
|
-
const d = r === void 0 ? 0 : r, u = h(i), x = u?.data?.[d], c = u?.formatter ?? v, f = x?.color;
|
|
22
|
-
let n;
|
|
23
|
-
t[4] !== f ? (n = {
|
|
24
|
-
color: f
|
|
25
|
-
}, t[4] = f, t[5] = n) : n = t[5];
|
|
26
|
-
const m = x?.min ?? 0;
|
|
27
|
-
let l;
|
|
28
|
-
t[6] !== c || t[7] !== m ? (l = c(m), t[6] = c, t[7] = m, t[8] = l) : l = t[8];
|
|
29
|
-
let a;
|
|
30
|
-
return t[9] !== o || t[10] !== n || t[11] !== l ? (a = /* @__PURE__ */ s(S, { TypographyProps: n, ...o, children: l }), t[9] = o, t[10] = n, t[11] = l, t[12] = a) : a = t[12], a;
|
|
31
|
-
}
|
|
32
|
-
const F = (e) => e.toString();
|
|
33
|
-
function I(e) {
|
|
34
|
-
const t = g(13);
|
|
35
|
-
let i, o, r;
|
|
36
|
-
t[0] !== e ? ({
|
|
37
|
-
id: i,
|
|
38
|
-
index: r,
|
|
39
|
-
...o
|
|
40
|
-
} = e, t[0] = e, t[1] = i, t[2] = o, t[3] = r) : (i = t[1], o = t[2], r = t[3]);
|
|
41
|
-
const d = r === void 0 ? 0 : r, u = h(i), x = u?.data?.[d], c = u?.formatter ?? F, f = x?.color;
|
|
42
|
-
let n;
|
|
43
|
-
t[4] !== f ? (n = {
|
|
44
|
-
color: f
|
|
45
|
-
}, t[4] = f, t[5] = n) : n = t[5];
|
|
46
|
-
const m = x?.max ?? 0;
|
|
47
|
-
let l;
|
|
48
|
-
t[6] !== c || t[7] !== m ? (l = c(m), t[6] = c, t[7] = m, t[8] = l) : l = t[8];
|
|
49
|
-
let a;
|
|
50
|
-
return t[9] !== o || t[10] !== n || t[11] !== l ? (a = /* @__PURE__ */ s(S, { TypographyProps: n, ...o, children: l }), t[9] = o, t[10] = n, t[11] = l, t[12] = a) : a = t[12], a;
|
|
51
|
-
}
|
|
52
|
-
function T(e) {
|
|
53
|
-
const t = g(5);
|
|
54
|
-
let i;
|
|
55
|
-
t[0] !== e.id ? (i = (r) => {
|
|
56
|
-
const {
|
|
57
|
-
index: d
|
|
58
|
-
} = r;
|
|
59
|
-
return /* @__PURE__ */ y(P, { children: [
|
|
60
|
-
/* @__PURE__ */ s($, { id: e.id, index: d }),
|
|
61
|
-
/* @__PURE__ */ s(b, { id: e.id, index: d }),
|
|
62
|
-
/* @__PURE__ */ s(w, { id: e.id, index: d }),
|
|
63
|
-
/* @__PURE__ */ s(_, {}),
|
|
64
|
-
/* @__PURE__ */ s(I, { id: e.id, index: d }),
|
|
65
|
-
/* @__PURE__ */ s(j, { id: e.id, index: d })
|
|
66
|
-
] });
|
|
67
|
-
}, t[0] = e.id, t[1] = i) : i = t[1];
|
|
68
|
-
let o;
|
|
69
|
-
return t[2] !== e.id || t[3] !== i ? (o = /* @__PURE__ */ s(M, { id: e.id, children: i }), t[2] = e.id, t[3] = i, t[4] = o) : o = t[4], o;
|
|
70
|
-
}
|
|
71
|
-
const k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
72
|
-
__proto__: null,
|
|
73
|
-
SpreadUI: T
|
|
74
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
75
|
-
export {
|
|
76
|
-
w as M,
|
|
77
|
-
T as S,
|
|
78
|
-
I as a,
|
|
79
|
-
_ as b,
|
|
80
|
-
k as s
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=spread-ui-BjzH190y.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spread-ui-BjzH190y.js","sources":["../src/widgets/spread/components/separator.tsx","../src/widgets/spread/components/min-value.tsx","../src/widgets/spread/components/max-value.tsx","../src/widgets/spread/spread-ui.tsx"],"sourcesContent":["import { Item } from '../../formula/components/item'\nimport type { ItemProps } from '../../formula/types'\n\nexport function Separator(props: Omit<ItemProps, 'children'>) {\n return <Item {...props}>-</Item>\n}\n","import { type SpreadWidgetState, type ValueProps } from '../types'\nimport { useWidget } from '../../stores/widget-store'\nimport { Item } from '../../formula/components/item'\n\nconst defaultFormatter = (value: number) => value.toString()\n\nexport function MinValue({ id, index = 0, ...props }: ValueProps) {\n const widget = useWidget<SpreadWidgetState>(id)\n\n const el = widget?.data?.[index]\n\n const formatter = widget?.formatter ?? defaultFormatter\n\n return (\n <Item TypographyProps={{ color: el?.color }} {...props}>\n {formatter(el?.min ?? 0)}\n </Item>\n )\n}\n","import { type SpreadWidgetState, type ValueProps } from '../types'\nimport { useWidget } from '../../stores/widget-store'\nimport { Item } from '../../formula/components/item'\n\nconst defaultFormatter = (value: number) => value.toString()\n\nexport function MaxValue({ id, index = 0, ...props }: ValueProps) {\n const widget = useWidget<SpreadWidgetState>(id)\n\n const el = widget?.data?.[index]\n\n const formatter = widget?.formatter ?? defaultFormatter\n\n return (\n <Item TypographyProps={{ color: el?.color }} {...props}>\n {formatter(el?.max ?? 0)}\n </Item>\n )\n}\n","import type { SpreadUIProps } from './types'\n\nimport { Separator } from './components/separator'\nimport { MinValue } from './components/min-value'\nimport { MaxValue } from './components/max-value'\nimport { Prefix, Row, Suffix, Series } from '../formula'\n\nexport function SpreadUI(props: SpreadUIProps) {\n return (\n <Row id={props.id}>\n {({ index }) => (\n <>\n <Series id={props.id} index={index} />\n <Prefix id={props.id} index={index} />\n <MinValue id={props.id} index={index} />\n <Separator />\n <MaxValue id={props.id} index={index} />\n <Suffix id={props.id} index={index} />\n </>\n )}\n </Row>\n )\n}\n"],"names":["Separator","props","$","_c","t0","jsx","Item","defaultFormatter","value","toString","MinValue","id","t1","index","undefined","widget","useWidget","el","data","formatter","t2","color","t3","t4","min","t5","t6","MaxValue","max","SpreadUI","jsxs","Fragment","Series","Prefix","Suffix","Row"],"mappings":";;;;;;AAGO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IA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|
7
|
-
row: {
|
|
8
|
-
display: "flex",
|
|
9
|
-
alignItems: "center",
|
|
10
|
-
gap: (e) => e.spacing(1),
|
|
11
|
-
"& + &": {
|
|
12
|
-
marginTop: (e) => e.spacing(1)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
a as s
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=style-BGeCtQkP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style-BGeCtQkP.js","sources":["../src/widgets/formula/style.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\nexport const styles = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: (theme: Theme) => theme.spacing(2),\n },\n item: {\n '&[data-disabled=\"true\"]': {\n color: (theme: Theme) => theme.palette.text.disabled,\n },\n },\n row: {\n display: 'flex',\n alignItems: 'center',\n gap: (theme: Theme) => theme.spacing(1),\n\n '& + &': {\n marginTop: (theme: Theme) => theme.spacing(1),\n },\n },\n} satisfies Record<string, SxProps<Theme>>\n"],"names":["styles","item","color","theme","palette","text","disabled","row","display","alignItems","gap","spacing","marginTop"],"mappings":"AAEO,MAAMA,IAAS;AAAA,EAMpBC,MAAM;AAAA,IACJ,2BAA2B;AAAA,MACzBC,OAAOA,CAACC,MAAiBA,EAAMC,QAAQC,KAAKC;AAAAA,IAAAA;AAAAA,EAC9C;AAAA,EAEFC,KAAK;AAAA,IACHC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZC,KAAKA,CAACP,MAAiBA,EAAMQ,QAAQ,CAAC;AAAA,IAEtC,SAAS;AAAA,MACPC,WAAWA,CAACT,MAAiBA,EAAMQ,QAAQ,CAAC;AAAA,IAAA;AAAA,EAC9C;AAEJ;"}
|
package/dist/style-C7v1iwqD.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
const i = {
|
|
2
|
-
rangeItem: {
|
|
3
|
-
display: "flex",
|
|
4
|
-
flexDirection: "column",
|
|
5
|
-
gap: (e) => e.spacing(1.5)
|
|
6
|
-
},
|
|
7
|
-
sliderContainer: {
|
|
8
|
-
display: "flex",
|
|
9
|
-
flexDirection: "column",
|
|
10
|
-
gap: (e) => e.spacing(1),
|
|
11
|
-
px: (e) => e.spacing(1)
|
|
12
|
-
},
|
|
13
|
-
inputsRow: {
|
|
14
|
-
display: "flex",
|
|
15
|
-
gap: (e) => e.spacing(2),
|
|
16
|
-
alignItems: "center"
|
|
17
|
-
},
|
|
18
|
-
input: {
|
|
19
|
-
flex: 1,
|
|
20
|
-
"& .MuiInputBase-input": {
|
|
21
|
-
textAlign: "center"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
slider: {
|
|
25
|
-
width: "100%",
|
|
26
|
-
"&.Mui-disabled": {
|
|
27
|
-
color: (e) => e.palette.text.disabled
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
i as s
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=style-C7v1iwqD.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style-C7v1iwqD.js","sources":["../src/widgets/range/style.ts"],"sourcesContent":["import type { SxProps, Theme } from '@mui/material'\n\nexport const styles: Record<string, SxProps<Theme>> = {\n root: {\n display: 'flex',\n flexDirection: 'column',\n gap: (theme: Theme) => theme.spacing(2),\n },\n rangeItem: {\n display: 'flex',\n flexDirection: 'column',\n gap: (theme: Theme) => theme.spacing(1.5),\n },\n sliderContainer: {\n display: 'flex',\n flexDirection: 'column',\n gap: (theme: Theme) => theme.spacing(1),\n px: (theme: Theme) => theme.spacing(1),\n },\n inputsRow: {\n display: 'flex',\n gap: (theme: Theme) => theme.spacing(2),\n alignItems: 'center',\n },\n input: {\n flex: 1,\n '& .MuiInputBase-input': {\n textAlign: 'center',\n },\n },\n slider: {\n width: '100%',\n '&.Mui-disabled': {\n color: (theme: Theme) => theme.palette.text.disabled,\n },\n },\n} satisfies Record<string, SxProps<Theme>>\n"],"names":["styles","rangeItem","display","flexDirection","gap","theme","spacing","sliderContainer","px","inputsRow","alignItems","input","flex","textAlign","slider","width","color","palette","text","disabled"],"mappings":"AAEO,MAAMA,IAAyC;AAAA,EAMpDC,WAAW;AAAA,IACTC,SAAS;AAAA,IACTC,eAAe;AAAA,IACfC,KAAKA,CAACC,MAAiBA,EAAMC,QAAQ,GAAG;AAAA,EAAA;AAAA,EAE1CC,iBAAiB;AAAA,IACfL,SAAS;AAAA,IACTC,eAAe;AAAA,IACfC,KAAKA,CAACC,MAAiBA,EAAMC,QAAQ,CAAC;AAAA,IACtCE,IAAIA,CAACH,MAAiBA,EAAMC,QAAQ,CAAC;AAAA,EAAA;AAAA,EAEvCG,WAAW;AAAA,IACTP,SAAS;AAAA,IACTE,KAAKA,CAACC,MAAiBA,EAAMC,QAAQ,CAAC;AAAA,IACtCI,YAAY;AAAA,EAAA;AAAA,EAEdC,OAAO;AAAA,IACLC,MAAM;AAAA,IACN,yBAAyB;AAAA,MACvBC,WAAW;AAAA,IAAA;AAAA,EACb;AAAA,EAEFC,QAAQ;AAAA,IACNC,OAAO;AAAA,IACP,kBAAkB;AAAA,MAChBC,OAAOA,CAACX,MAAiBA,EAAMY,QAAQC,KAAKC;AAAAA,IAAAA;AAAAA,EAC9C;AAEJ;"}
|
package/dist/styles-cohnxh9F.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const t = {
|
|
2
|
-
graph: {
|
|
3
|
-
/**
|
|
4
|
-
* Common container style for chart widget skeletons
|
|
5
|
-
*/
|
|
6
|
-
container: {
|
|
7
|
-
display: "flex",
|
|
8
|
-
alignItems: "center",
|
|
9
|
-
justifyContent: "space-between",
|
|
10
|
-
flexDirection: "column",
|
|
11
|
-
gap: ({
|
|
12
|
-
spacing: e
|
|
13
|
-
}) => e(1),
|
|
14
|
-
height: ({
|
|
15
|
-
spacing: e
|
|
16
|
-
}) => e(38)
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
t as b
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=styles-cohnxh9F.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles-cohnxh9F.js","sources":["../src/widgets/_shared/skeleton/styles.ts"],"sourcesContent":["import type { Theme } from '@mui/material'\n\n/**\n * Base skeleton styles shared across all chart widgets\n */\nexport const baseSkeletonStyles = {\n graph: {\n /**\n * Common container style for chart widget skeletons\n */\n container: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n flexDirection: 'column',\n gap: ({ spacing }: Theme) => spacing(1),\n height: ({ spacing }: Theme) => spacing(38),\n },\n },\n} as const\n"],"names":["baseSkeletonStyles","graph","container","display","alignItems","justifyContent","flexDirection","gap","spacing","height"],"mappings":"AAKO,MAAMA,IAAqB;AAAA,EAChCC,OAAO;AAAA;AAAA;AAAA;AAAA,IAILC,WAAW;AAAA,MACTC,SAAS;AAAA,MACTC,YAAY;AAAA,MACZC,gBAAgB;AAAA,MAChBC,eAAe;AAAA,MACfC,KAAKA,CAAC;AAAA,QAAEC,SAAAA;AAAAA,MAAAA,MAAqBA,EAAQ,CAAC;AAAA,MACtCC,QAAQA,CAAC;AAAA,QAAED,SAAAA;AAAAA,MAAAA,MAAqBA,EAAQ,EAAE;AAAA,IAAA;AAAA,EAC5C;AAEJ;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@mui/material';
|
|
2
|
-
import { WidgetState } from 'src/widgets/stores/types';
|
|
3
|
-
export interface ConfigProps<T> {
|
|
4
|
-
id: WidgetState['id'];
|
|
5
|
-
defaultConfig: (props: BaseConfig) => T;
|
|
6
|
-
config?: (props: T) => T;
|
|
7
|
-
}
|
|
8
|
-
export interface BaseConfig {
|
|
9
|
-
refUI?: WidgetState['refUI'];
|
|
10
|
-
theme: Theme;
|
|
11
|
-
data: WidgetState['data'];
|
|
12
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { DownloadProps } from '../actions/download/types';
|
|
2
|
-
import { FullScreenProps } from '../actions/fullscreen/types';
|
|
3
|
-
import { WrapperUIProps, WrapperProps } from '../wrapper';
|
|
4
|
-
import { BaseConfig, ConfigProps } from '../config-loader';
|
|
5
|
-
import { FormulaProps, FormulaWidgetConfig } from '../formula/types';
|
|
6
|
-
import { RootProps } from '../root/types';
|
|
7
|
-
import { ComponentType } from 'react';
|
|
8
|
-
import { BarProps, BarWidgetConfig } from '../bar/types';
|
|
9
|
-
import { PieProps, PieWidgetConfig } from '../pie/types';
|
|
10
|
-
import { ScatterplotProps, ScatterplotWidgetConfig } from '../scatterplot/types';
|
|
11
|
-
import { TimeseriesProps, TimeseriesWidgetConfig } from '../timeseries/types';
|
|
12
|
-
import { HistogramProps, HistogramWidgetConfig } from '../histogram/types';
|
|
13
|
-
import { SpreadProps, SpreadWidgetConfig } from '../spread/types';
|
|
14
|
-
import { RangeProps, RangeWidgetConfig } from '../range/types';
|
|
15
|
-
import { MarkdownProps, MarkdownWidgetConfig } from '../markdown/types';
|
|
16
|
-
export interface BaseWidgetProps<C = unknown> extends Omit<RootProps, 'children'> {
|
|
17
|
-
children?: RootProps['children'];
|
|
18
|
-
config?: ConfigProps<C>['config'];
|
|
19
|
-
actions?: WrapperUIProps['actions'];
|
|
20
|
-
options?: WrapperUIProps['options'];
|
|
21
|
-
onChangeCollapsed?: WrapperProps['onChangeCollapsed'];
|
|
22
|
-
WrapperProps?: Pick<WrapperProps, 'sx' | 'Component' | 'labels'>;
|
|
23
|
-
ActionsProps?: {
|
|
24
|
-
download?: Pick<DownloadProps, 'Icon' | 'IconButtonProps'>;
|
|
25
|
-
fullScreen?: Pick<FullScreenProps, 'Icon'>;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export type WidgetProps = FormulaProps | BarProps | PieProps | ScatterplotProps | TimeseriesProps | HistogramProps | SpreadProps | RangeProps | MarkdownProps;
|
|
29
|
-
export type WidgetConfig = FormulaWidgetConfig | BarWidgetConfig | PieWidgetConfig | ScatterplotWidgetConfig | TimeseriesWidgetConfig | HistogramWidgetConfig | SpreadWidgetConfig | RangeWidgetConfig | MarkdownWidgetConfig;
|
|
30
|
-
export interface WidgetBaseComponentConfig<C = unknown> {
|
|
31
|
-
component: ComponentType<{
|
|
32
|
-
id: string;
|
|
33
|
-
}>;
|
|
34
|
-
skeleton: ComponentType;
|
|
35
|
-
defaultConfig: (props: BaseConfig) => C;
|
|
36
|
-
}
|
|
37
|
-
export interface WidgetComponentConfig {
|
|
38
|
-
formula: WidgetBaseComponentConfig<FormulaWidgetConfig>;
|
|
39
|
-
bar: WidgetBaseComponentConfig<BarWidgetConfig>;
|
|
40
|
-
pie: WidgetBaseComponentConfig<PieWidgetConfig>;
|
|
41
|
-
scatterplot: WidgetBaseComponentConfig<ScatterplotWidgetConfig>;
|
|
42
|
-
timeseries: WidgetBaseComponentConfig<TimeseriesWidgetConfig>;
|
|
43
|
-
histogram: WidgetBaseComponentConfig<HistogramWidgetConfig>;
|
|
44
|
-
spread: WidgetBaseComponentConfig<SpreadWidgetConfig>;
|
|
45
|
-
range: WidgetBaseComponentConfig<RangeWidgetConfig>;
|
|
46
|
-
markdown: WidgetBaseComponentConfig<MarkdownWidgetConfig>;
|
|
47
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { c as W } from "react/compiler-runtime";
|
|
2
|
-
import { u as C } from "./widget-store-yDO2ul8g.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { useTheme as w } from "@mui/material";
|
|
5
|
-
function j(a) {
|
|
6
|
-
const e = W(16), {
|
|
7
|
-
id: t,
|
|
8
|
-
defaultConfig: c,
|
|
9
|
-
config: o
|
|
10
|
-
} = a;
|
|
11
|
-
let r;
|
|
12
|
-
e[0] !== t ? (r = (s) => s.widgets[t], e[0] = t, e[1] = r) : r = e[1];
|
|
13
|
-
const f = C(r), m = C(x), g = w();
|
|
14
|
-
f?.refUI, f?.data;
|
|
15
|
-
const p = f?.refUI, I = f?.data;
|
|
16
|
-
let i;
|
|
17
|
-
e[2] !== c || e[3] !== p || e[4] !== I || e[5] !== g ? (i = c({
|
|
18
|
-
refUI: p,
|
|
19
|
-
theme: g,
|
|
20
|
-
data: I
|
|
21
|
-
}), e[2] = c, e[3] = p, e[4] = I, e[5] = g, e[6] = i) : i = e[6];
|
|
22
|
-
const n = i;
|
|
23
|
-
let l;
|
|
24
|
-
e[7] !== o || e[8] !== n ? (l = o ? o(n) : n, e[7] = o, e[8] = n, e[9] = l) : l = e[9];
|
|
25
|
-
const U = l;
|
|
26
|
-
let d;
|
|
27
|
-
e[10] !== t || e[11] !== m ? (d = (s) => {
|
|
28
|
-
delete s.refUI, delete s.theme, delete s.data, m(t, s);
|
|
29
|
-
}, e[10] = t, e[11] = m, e[12] = d) : d = e[12];
|
|
30
|
-
const h = d;
|
|
31
|
-
let u;
|
|
32
|
-
return e[13] !== U || e[14] !== h ? (u = {
|
|
33
|
-
config: U,
|
|
34
|
-
run: h
|
|
35
|
-
}, e[13] = U, e[14] = h, e[15] = u) : u = e[15], u;
|
|
36
|
-
}
|
|
37
|
-
function x(a) {
|
|
38
|
-
return a.setWidget;
|
|
39
|
-
}
|
|
40
|
-
export {
|
|
41
|
-
j as u
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=use-config-BYEOiIcu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-config-BYEOiIcu.js","sources":["../src/widgets/config-loader/use-config.ts"],"sourcesContent":["import { useWidgetStore } from '../stores/widget-store'\nimport type { BaseConfig, ConfigProps } from './types'\nimport { useCallback, useMemo } from 'react'\nimport { useTheme } from '@mui/material'\n\nexport function useConfig<T>({ id, defaultConfig, config }: ConfigProps<T>): {\n config: T\n run: (config: Partial<Omit<T & BaseConfig, 'id'>>) => void\n} {\n const widget = useWidgetStore((state) => state.widgets[id])\n const setWidget = useWidgetStore((state) => state.setWidget)\n\n const theme = useTheme()\n\n const defaultCfg = useMemo(() => {\n return defaultConfig({\n refUI: widget?.refUI,\n theme,\n data: widget?.data,\n })\n }, [defaultConfig, widget?.refUI, widget?.data, theme])\n\n const result = useMemo(() => {\n return config ? config(defaultCfg) : defaultCfg\n }, [config, defaultCfg])\n\n const run = useCallback(\n (config: Partial<Omit<T & BaseConfig, 'id'>>) => {\n delete config.refUI\n delete config.theme\n delete config.data\n setWidget(id, config)\n },\n [id, setWidget],\n )\n\n return {\n config: result,\n run,\n }\n}\n"],"names":["useConfig","t0","$","_c","id","defaultConfig","config","t1","state","widgets","widget","useWidgetStore","setWidget","_temp","theme","useTheme","refUI","data","t2","t3","t4","defaultCfg","t5","result","t6","config_0","run","t7","state_0"],"mappings":";;;;AAKO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,EAAA,GAAsB;AAAA,IAAAC,IAAAA;AAAAA,IAAAC,eAAAA;AAAAA,IAAAC,QAAAA;AAAAA,EAAAA,IAAAL;AAA6C,MAAAM;AAAA,EAAAL,SAAAE,KAI1CG,IAAAC,CAAAA,MAAWA,EAAKC,QAASL,CAAE,GAACF,OAAAE,GAAAF,OAAAK,KAAAA,IAAAL,EAAA,CAAA;AAA1D,QAAAQ,IAAeC,EAAeJ,CAA4B,GAC1DK,IAAkBD,EAAeE,CAA0B,GAE3DC,IAAcC,EAAAA;AAQKL,EAAAA,GAAMM,OAASN,GAAMO;AAJ7B,QAAAC,IAAAR,GAAMM,OAEPG,IAAAT,GAAMO;AAAM,MAAAG;AAAA,EAAAlB,EAAA,CAAA,MAAAG,KAAAH,EAAA,CAAA,MAAAgB,KAAAhB,EAAA,CAAA,MAAAiB,KAAAjB,SAAAY,KAHbM,IAAAf,EAAc;AAAA,IAAAW,OACZE;AAAAA,IAAaJ,OAAAA;AAAAA,IAAAG,MAEdE;AAAAA,EAAAA,CACP,GAACjB,OAAAG,GAAAH,OAAAgB,GAAAhB,OAAAiB,GAAAjB,OAAAY,GAAAZ,OAAAkB,KAAAA,IAAAlB,EAAA,CAAA;AALJ,QAAAmB,IACED;AAKqD,MAAAE;AAAA,EAAApB,EAAA,CAAA,MAAAI,KAAAJ,SAAAmB,KAG9CC,IAAAhB,IAASA,EAAOe,CAAuB,IAAvCA,GAAwCnB,OAAAI,GAAAJ,OAAAmB,GAAAnB,OAAAoB,KAAAA,IAAApB,EAAA,CAAA;AADjD,QAAAqB,IACED;AACsB,MAAAE;AAAA,EAAAtB,EAAA,EAAA,MAAAE,KAAAF,UAAAU,KAGtBY,IAAAC,CAAAA,MAAA;AACE,WAAOnB,EAAMU,OACb,OAAOV,EAAMQ,OACb,OAAOR,EAAMW,MACbL,EAAUR,GAAIE,CAAM;AAAA,EAAC,GACtBJ,QAAAE,GAAAF,QAAAU,GAAAV,QAAAsB,KAAAA,IAAAtB,EAAA,EAAA;AANH,QAAAwB,IAAYF;AAQX,MAAAG;AAAA,SAAAzB,EAAA,EAAA,MAAAqB,KAAArB,UAAAwB,KAEMC,IAAA;AAAA,IAAArB,QACGiB;AAAAA,IAAMG,KAAAA;AAAAA,EAAAA,GAEfxB,QAAAqB,GAAArB,QAAAwB,GAAAxB,QAAAyB,KAAAA,IAAAzB,EAAA,EAAA,GAHMyB;AAGN;AAlCI,SAAAd,EAAAe,GAAA;AAAA,SAKuCpB,EAAKI;AAAU;"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { c as d } from "react/compiler-runtime";
|
|
2
|
-
import { create as g } from "zustand";
|
|
3
|
-
import { devtools as n } from "zustand/middleware";
|
|
4
|
-
const c = g()(n((t, r) => ({
|
|
5
|
-
// State
|
|
6
|
-
widgets: {},
|
|
7
|
-
// Actions
|
|
8
|
-
setWidget: (e, i) => t((s) => {
|
|
9
|
-
const o = s.widgets[e] ?? {};
|
|
10
|
-
return {
|
|
11
|
-
widgets: {
|
|
12
|
-
...s.widgets,
|
|
13
|
-
[e]: {
|
|
14
|
-
...o,
|
|
15
|
-
...i,
|
|
16
|
-
id: e
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}, void 0, "setWidget"),
|
|
21
|
-
removeWidget: (e) => t((i) => {
|
|
22
|
-
const s = {
|
|
23
|
-
...i.widgets
|
|
24
|
-
};
|
|
25
|
-
return delete s[e], {
|
|
26
|
-
widgets: s
|
|
27
|
-
};
|
|
28
|
-
}, void 0, "removeWidget"),
|
|
29
|
-
clearWidgets: () => t({
|
|
30
|
-
widgets: {}
|
|
31
|
-
}, void 0, "clearWidgets"),
|
|
32
|
-
getWidget: (e) => r().widgets[e]
|
|
33
|
-
}), {
|
|
34
|
-
name: "widget-store"
|
|
35
|
-
})), u = (t) => {
|
|
36
|
-
const r = d(2);
|
|
37
|
-
let e;
|
|
38
|
-
return r[0] !== t ? (e = (i) => i.widgets[t], r[0] = t, r[1] = e) : e = r[1], c(e);
|
|
39
|
-
};
|
|
40
|
-
export {
|
|
41
|
-
u as a,
|
|
42
|
-
c as u
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=widget-store-yDO2ul8g.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"widget-store-yDO2ul8g.js","sources":["../src/widgets/stores/widget-store.ts"],"sourcesContent":["import { create } from 'zustand'\nimport { devtools } from 'zustand/middleware'\nimport type { WidgetState, WidgetStore } from './types'\n\n/**\n * Zustand store for managing widget state across the application.\n *\n * This store provides centralized state management for all widget UI components\n *\n * @example\n * ```tsx\n * // Import the store\n * import { useWidgetStore } from '@carto/ps-react-ui/widgets'\n *\n * // Use in a component\n * function MyWidget() {\n * const setWidget = useWidgetStore((state) => state.setWidget)\n * const widget = useWidgetStore((state) => state.widgets['my-widget'])\n *\n * useEffect(() => {\n * setWidget({\n * id: 'my-widget',\n * type: 'formula',\n * title: 'Total Sales',\n * isLoading: false,\n * visible: true,\n * data: { value: 1000, prefix: '$' }\n * })\n * }, [setWidget])\n *\n * return <div>{widget?.data?.value}</div>\n * }\n * ```\n *\n * @example\n * ```tsx\n * // Get widgets by type\n * const getWidgetsByType = useWidgetStore((state) => state.getWidgetsByType)\n * const formulaWidgets = getWidgetsByType('formula')\n * ```\n */\nexport const useWidgetStore = create<WidgetStore>()(\n devtools(\n (set, get) => ({\n // State\n widgets: {},\n\n // Actions\n setWidget: (id, widget) =>\n set(\n (state) => {\n const current =\n state.widgets[id] ?? ({} as WidgetStore['widgets'][string])\n\n return {\n widgets: {\n ...state.widgets,\n [id]: {\n ...current,\n ...widget,\n id,\n },\n },\n }\n },\n undefined,\n 'setWidget',\n ),\n\n removeWidget: (id) =>\n set(\n (state) => {\n const widgets = { ...state.widgets }\n\n delete widgets[id]\n\n return { widgets }\n },\n undefined,\n 'removeWidget',\n ),\n\n clearWidgets: () =>\n set(\n {\n widgets: {},\n },\n undefined,\n 'clearWidgets',\n ),\n\n getWidget: <T extends WidgetState>(id: string) => {\n return get().widgets[id] as T | undefined\n },\n }),\n {\n name: 'widget-store',\n },\n ),\n)\n\n/** Hook to get a specific widget by ID\n * @param id - Widget ID\n * @returns Widget state or undefined if not found\n * @example\n * ```tsx\n * const widget = useWidget('widget-1')\n * ```\n */\nexport const useWidget = <T extends WidgetState>(id: string) => {\n return useWidgetStore((state) => state.widgets[id] as T | undefined)\n}\n"],"names":["useWidgetStore","create","devtools","set","get","widgets","setWidget","id","widget","state","current","undefined","removeWidget","clearWidgets","getWidget","name","useWidget","$","_c","t0"],"mappings":";;;AAyCO,MAAMA,IAAiBC,EAAAA,EAC5BC,EACE,CAACC,GAAKC,OAAS;AAAA;AAAA,EAEbC,SAAS,CAAA;AAAA;AAAA,EAGTC,WAAWA,CAACC,GAAIC,MACdL,EACGM,CAAAA,MAAU;AACT,UAAMC,IACJD,EAAMJ,QAAQE,CAAE,KAAM,CAAA;AAExB,WAAO;AAAA,MACLF,SAAS;AAAA,QACP,GAAGI,EAAMJ;AAAAA,QACT,CAACE,CAAE,GAAG;AAAA,UACJ,GAAGG;AAAAA,UACH,GAAGF;AAAAA,UACHD,IAAAA;AAAAA,QAAAA;AAAAA,MACF;AAAA,IACF;AAAA,EAEJ,GACAI,QACA,WACF;AAAA,EAEFC,cAAeL,CAAAA,MACbJ,EACGM,CAAAA,MAAU;AACT,UAAMJ,IAAU;AAAA,MAAE,GAAGI,EAAMJ;AAAAA,IAAAA;AAE3B,kBAAOA,EAAQE,CAAE,GAEV;AAAA,MAAEF,SAAAA;AAAAA,IAAAA;AAAAA,EACX,GACAM,QACA,cACF;AAAA,EAEFE,cAAcA,MACZV,EACE;AAAA,IACEE,SAAS,CAAA;AAAA,EAAC,GAEZM,QACA,cACF;AAAA,EAEFG,WAAW,CAAwBP,MAC1BH,EAAAA,EAAMC,QAAQE,CAAE;AAE3B,IACA;AAAA,EACEQ,MAAM;AACR,CACF,CACF,GAUaC,IAAYT,CAAAA,MAAA;AAAA,QAAAU,IAAAC,EAAA,CAAA;AAAA,MAAAC;AAAA,SAAAF,SAAAV,KACDY,IAAAV,CAAAA,MAAWA,EAAKJ,QAASE,CAAE,GAAkBU,OAAAV,GAAAU,OAAAE,KAAAA,IAAAF,EAAA,CAAA,GAA5DjB,EAAemB,CAA6C;AAAC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-loader.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|