@carto/ps-react-ui 4.3.6 → 4.3.8
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 +123 -123
- package/dist/components.js.map +1 -1
- package/dist/error-CEkRPccv.js +39 -0
- package/dist/error-CEkRPccv.js.map +1 -0
- package/dist/{lasso-tool-BctzdzBu.js → lasso-tool-jl4YK02H.js} +19 -19
- package/dist/lasso-tool-jl4YK02H.js.map +1 -0
- package/dist/no-data-hR3KcJ-_.js +60 -0
- package/dist/no-data-hR3KcJ-_.js.map +1 -0
- package/dist/{row-D3uVFImu.js → row-BKmVAUN5.js} +2 -2
- package/dist/{row-D3uVFImu.js.map → row-BKmVAUN5.js.map} +1 -1
- package/dist/{series-BAImrSBo.js → series-D1pynfeh.js} +3 -3
- package/dist/{series-BAImrSBo.js.map → series-D1pynfeh.js.map} +1 -1
- package/dist/{styles-CCZnY17y.js → styles-DrPyd0y5.js} +28 -22
- package/dist/styles-DrPyd0y5.js.map +1 -0
- package/dist/types/components/lasso-tool/types.d.ts +1 -1
- package/dist/types/widgets/_shared/chart-config/index.d.ts +1 -1
- package/dist/types/widgets/_shared/chart-config/option-builders.d.ts +7 -0
- package/dist/types/widgets/_shared/chart-config/option-builders.test.d.ts +1 -0
- package/dist/types/widgets/actions/change-column/change-column.d.ts +4 -0
- package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +1 -1
- package/dist/types/widgets/actions/fullscreen/types.d.ts +2 -1
- package/dist/types/widgets/actions/index.d.ts +1 -1
- package/dist/types/widgets/actions/lock-selection/types.d.ts +7 -7
- package/dist/types/widgets/actions/relative-data/types.d.ts +1 -1
- package/dist/types/widgets/echart/types.d.ts +0 -4
- package/dist/types/widgets/echart/utils.d.ts +2 -1
- package/dist/types/widgets/error/error.d.ts +1 -1
- package/dist/types/widgets/error/types.d.ts +8 -0
- package/dist/types/widgets/loader/loader.d.ts +1 -1
- package/dist/types/widgets/loader/types.d.ts +1 -1
- package/dist/types/widgets/stores/types.d.ts +1 -1
- package/dist/{use-widget-ref-B8x4sHIj.js → use-widget-ref-P-2i0MJG.js} +2 -2
- package/dist/{use-widget-ref-B8x4sHIj.js.map → use-widget-ref-P-2i0MJG.js.map} +1 -1
- package/dist/{utils-D3-eQyDR.js → utils-idmvq0Oa.js} +17 -16
- package/dist/utils-idmvq0Oa.js.map +1 -0
- package/dist/{widget-store-Dn0Bnc4h.js → widget-store-CzDt8oSK.js} +31 -46
- package/dist/widget-store-CzDt8oSK.js.map +1 -0
- package/dist/widgets/actions.js +714 -697
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +67 -63
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +250 -241
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +93 -100
- package/dist/widgets/echart.js.map +1 -1
- package/dist/widgets/error.js +1 -1
- package/dist/widgets/formula.js +64 -72
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +75 -73
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/loader.js +58 -49
- package/dist/widgets/loader.js.map +1 -1
- package/dist/widgets/markdown.js +2 -2
- package/dist/widgets/no-data.js +1 -1
- package/dist/widgets/pie.js +4 -4
- package/dist/widgets/range.js +97 -105
- package/dist/widgets/range.js.map +1 -1
- package/dist/widgets/scatterplot.js +8 -8
- package/dist/widgets/skeleton-loader.js +1 -1
- package/dist/widgets/spread.js +84 -100
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/stores.js +1 -1
- package/dist/widgets/table.js +493 -485
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +4 -4
- package/dist/widgets/wrapper.js +156 -156
- package/dist/widgets/wrapper.js.map +1 -1
- package/dist/widgets.js +4 -4
- package/package.json +1 -1
- package/src/components/lasso-tool/lasso-tool-inline.tsx +19 -17
- package/src/components/lasso-tool/lasso-tool.tsx +22 -20
- package/src/components/lasso-tool/types.ts +4 -3
- package/src/widgets/_shared/chart-config/index.ts +1 -0
- package/src/widgets/_shared/chart-config/option-builders.test.ts +40 -0
- package/src/widgets/_shared/chart-config/option-builders.ts +12 -0
- package/src/widgets/actions/change-column/change-column.test.tsx +129 -2
- package/src/widgets/actions/change-column/change-column.tsx +79 -2
- package/src/widgets/actions/fullscreen/fullscreen.tsx +8 -8
- package/src/widgets/actions/fullscreen/types.ts +6 -1
- package/src/widgets/actions/index.ts +4 -1
- package/src/widgets/actions/lock-selection/lock-selection.test.tsx +28 -30
- package/src/widgets/actions/lock-selection/types.ts +8 -8
- package/src/widgets/actions/relative-data/relative-data.test.tsx +13 -13
- package/src/widgets/actions/relative-data/types.ts +1 -1
- package/src/widgets/actions/stack-toggle/stack-toggle.test.tsx +19 -9
- package/src/widgets/actions/zoom-toggle/zoom-toggle.tsx +113 -95
- package/src/widgets/bar/config.ts +37 -28
- package/src/widgets/category/category-ui.tsx +25 -22
- package/src/widgets/echart/echart-ui.test.tsx +3 -18
- package/src/widgets/echart/echart-ui.tsx +4 -22
- package/src/widgets/echart/echart.test.tsx +9 -25
- package/src/widgets/echart/echart.tsx +36 -29
- package/src/widgets/echart/types.ts +0 -4
- package/src/widgets/echart/utils.ts +3 -1
- package/src/widgets/error/error.tsx +17 -14
- package/src/widgets/error/types.ts +10 -0
- package/src/widgets/formula/components/value.tsx +13 -13
- package/src/widgets/histogram/config.ts +36 -29
- package/src/widgets/loader/loader.tsx +28 -25
- package/src/widgets/loader/types.ts +3 -1
- package/src/widgets/no-data/no-data.tsx +8 -11
- package/src/widgets/range/components/range-item.tsx +9 -13
- package/src/widgets/spread/components/max-value.tsx +13 -13
- package/src/widgets/spread/components/min-value.tsx +13 -13
- package/src/widgets/stores/types.ts +1 -4
- package/src/widgets/stores/widget-store.ts +1 -27
- package/src/widgets/table/hooks/use-pagination.ts +44 -35
- package/src/widgets/table/hooks/use-sort.ts +25 -23
- package/src/widgets/wrapper/wrapper-ui.tsx +16 -17
- package/dist/error-piB8FwYO.js +0 -38
- package/dist/error-piB8FwYO.js.map +0 -1
- package/dist/lasso-tool-BctzdzBu.js.map +0 -1
- package/dist/no-data-jdlbMef0.js +0 -61
- package/dist/no-data-jdlbMef0.js.map +0 -1
- package/dist/styles-CCZnY17y.js.map +0 -1
- package/dist/utils-D3-eQyDR.js.map +0 -1
- package/dist/widget-store-Dn0Bnc4h.js.map +0 -1
package/dist/widgets/loader.js
CHANGED
|
@@ -1,62 +1,71 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import { u as
|
|
4
|
-
import { d as
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { c as _ } from "react/compiler-runtime";
|
|
2
|
+
import { useSyncExternalStore as b, useRef as R, useEffect as f } from "react";
|
|
3
|
+
import { u as c } from "../widget-store-CzDt8oSK.js";
|
|
4
|
+
import { d as E } from "../cjs-D4KH3azB.js";
|
|
5
|
+
function z(t) {
|
|
6
|
+
const e = _(36), i = c(w), n = c(v), d = c(M);
|
|
7
|
+
let u;
|
|
8
|
+
e[0] !== t.id ? (u = () => c.getState().widgets[t.id]?.registeredTools, e[0] = t.id, e[1] = u) : u = e[1];
|
|
9
|
+
const C = b(c.subscribe, u), S = R(t.data), P = R(t.config), T = R(!1);
|
|
10
|
+
let g;
|
|
11
|
+
e[2] !== t.config || e[3] !== t.data ? (g = () => {
|
|
12
|
+
S.current = t.data, P.current = t.config;
|
|
13
|
+
}, e[2] = t.config, e[3] = t.data, e[4] = g) : g = e[4], f(g);
|
|
14
|
+
let l, a;
|
|
15
|
+
e[5] !== t.id || e[6] !== t.type || e[7] !== i ? (l = () => {
|
|
16
|
+
i(t.id, {
|
|
17
|
+
type: t.type
|
|
11
18
|
});
|
|
12
|
-
},
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
t
|
|
16
|
-
isLoading:
|
|
17
|
-
isFetching:
|
|
18
|
-
error:
|
|
19
|
+
}, a = [t.id, t.type, i], e[5] = t.id, e[6] = t.type, e[7] = i, e[8] = l, e[9] = a) : (l = e[8], a = e[9]), f(l, a);
|
|
20
|
+
let r, m;
|
|
21
|
+
e[10] !== t.error || e[11] !== t.id || e[12] !== t.isFetching || e[13] !== t.isLoading || e[14] !== i ? (r = () => {
|
|
22
|
+
i(t.id, {
|
|
23
|
+
isLoading: t.isLoading ?? !1,
|
|
24
|
+
isFetching: t.isFetching ?? !1,
|
|
25
|
+
error: t.error
|
|
19
26
|
});
|
|
20
|
-
},
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
n(
|
|
28
|
-
},
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
27
|
+
}, m = [t.id, t.isLoading, t.isFetching, t.error, i], e[10] = t.error, e[11] = t.id, e[12] = t.isFetching, e[13] = t.isLoading, e[14] = i, e[15] = r, e[16] = m) : (r = e[15], m = e[16]), f(r, m);
|
|
28
|
+
let y, h;
|
|
29
|
+
e[17] !== d || e[18] !== t.config || e[19] !== t.id ? (y = () => {
|
|
30
|
+
t.config && d(t.id, t.config);
|
|
31
|
+
}, h = [t.id, t.config, d], e[17] = d, e[18] = t.config, e[19] = t.id, e[20] = y, e[21] = h) : (y = e[20], h = e[21]), f(y, h);
|
|
32
|
+
let x, L;
|
|
33
|
+
e[22] !== n || e[23] !== t.data || e[24] !== t.id ? (x = () => {
|
|
34
|
+
n(t.id, t.data);
|
|
35
|
+
}, L = [t.id, t.data, n], e[22] = n, e[23] = t.data, e[24] = t.id, e[25] = x, e[26] = L) : (x = e[25], L = e[26]), f(x, L);
|
|
36
|
+
let F;
|
|
37
|
+
e[27] !== d || e[28] !== n || e[29] !== t.id ? (F = () => {
|
|
38
|
+
if (!T.current) {
|
|
39
|
+
T.current = !0;
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
n(t.id, S.current), P.current && d(t.id, P.current);
|
|
43
|
+
}, e[27] = d, e[28] = n, e[29] = t.id, e[30] = F) : F = e[30];
|
|
44
|
+
let W;
|
|
45
|
+
return e[31] !== d || e[32] !== n || e[33] !== t.id || e[34] !== C ? (W = [C, t.id, n, d], e[31] = d, e[32] = n, e[33] = t.id, e[34] = C, e[35] = W) : W = e[35], f(F, W), t.children;
|
|
37
46
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
47
|
+
function M(t) {
|
|
48
|
+
return t.executeConfigPipeline;
|
|
40
49
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
50
|
+
function v(t) {
|
|
51
|
+
return t.executeToolPipeline;
|
|
43
52
|
}
|
|
44
|
-
function
|
|
45
|
-
return
|
|
53
|
+
function w(t) {
|
|
54
|
+
return t.setWidget;
|
|
46
55
|
}
|
|
47
|
-
function
|
|
48
|
-
return typeof
|
|
56
|
+
function A(t, e, i) {
|
|
57
|
+
return typeof t == "function" ? t(e, i) : t;
|
|
49
58
|
}
|
|
50
|
-
function
|
|
51
|
-
return
|
|
52
|
-
arrayMerge(
|
|
53
|
-
return
|
|
59
|
+
function B(...t) {
|
|
60
|
+
return E(t[0] ?? {}, t[1] ?? {}, {
|
|
61
|
+
arrayMerge(e, i) {
|
|
62
|
+
return i;
|
|
54
63
|
}
|
|
55
64
|
});
|
|
56
65
|
}
|
|
57
66
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
z as WidgetLoader,
|
|
68
|
+
B as mergeWidgetConfig,
|
|
69
|
+
A as resolveConfig
|
|
61
70
|
};
|
|
62
71
|
//# sourceMappingURL=loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sources":["../../src/widgets/loader/loader.tsx","../../src/widgets/loader/utils.ts"],"sourcesContent":["import { useEffect } from 'react'\nimport type { WidgetLoaderProps } from './types'\nimport { useWidgetStore } from '../stores/widget-store'\nimport type { WrapperState } from '../wrapper'\n\nexport function WidgetLoader<T extends
|
|
1
|
+
{"version":3,"file":"loader.js","sources":["../../src/widgets/loader/loader.tsx","../../src/widgets/loader/utils.ts"],"sourcesContent":["import { useEffect, useRef, useSyncExternalStore } from 'react'\nimport type { WidgetLoaderProps } from './types'\nimport { useWidgetStore } from '../stores/widget-store'\nimport type { WrapperState } from '../wrapper'\n\nexport function WidgetLoader<T extends object = Record<string, unknown>>(\n props: WidgetLoaderProps<T>,\n) {\n const setWidget = useWidgetStore((state) => state.setWidget)\n const executeToolPipeline = useWidgetStore(\n (state) => state.executeToolPipeline,\n )\n const executeConfigPipeline = useWidgetStore(\n (state) => state.executeConfigPipeline,\n )\n\n const registeredTools = useSyncExternalStore(\n useWidgetStore.subscribe,\n () => useWidgetStore.getState().widgets[props.id]?.registeredTools,\n )\n\n const dataRef = useRef(props.data)\n const configRef = useRef(props.config)\n const isMountedRef = useRef(false)\n\n useEffect(() => {\n dataRef.current = props.data\n configRef.current = props.config\n })\n\n // Split into 3 effects for metadata and 1 for data pipeline:\n // Each property that can be modified independently gets its own effect to avoid\n // accidentally resetting other properties.\n //\n // - Effect 1: Type (can be modified by tools that change visualization type)\n // - Effect 2: Loading/Error states (change during fetch lifecycle)\n // - Effect 3: Config (can be modified by tools that change widget configuration)\n // - Effect 4: Data pipeline execution (transforms data through registered tools)\n // - Effect 5: Re-execute pipeline when tool state changes\n\n // Effect 1: Type updates\n useEffect(() => {\n setWidget<WrapperState>(props.id, {\n type: props.type,\n })\n }, [props.id, props.type, setWidget])\n\n // Effect 2: Loading and error states\n useEffect(() => {\n setWidget<WrapperState>(props.id, {\n isLoading: props.isLoading ?? false,\n isFetching: props.isFetching ?? false,\n error: props.error,\n })\n }, [props.id, props.isLoading, props.isFetching, props.error, setWidget])\n\n // Effect 3: Config updates — run through config pipeline\n useEffect(() => {\n if (props.config) {\n void executeConfigPipeline(props.id, props.config)\n }\n }, [props.id, props.config, executeConfigPipeline])\n\n // Effect 4: Execute tool pipeline when props.data changes\n useEffect(() => {\n void executeToolPipeline(props.id, props.data)\n }, [props.id, props.data, executeToolPipeline])\n\n // Effect 5: Re-execute pipelines when registered tools change\n useEffect(() => {\n if (!isMountedRef.current) {\n isMountedRef.current = true\n return\n }\n\n void executeToolPipeline(props.id, dataRef.current)\n if (configRef.current) {\n void executeConfigPipeline(props.id, configRef.current)\n }\n }, [registeredTools, props.id, executeToolPipeline, executeConfigPipeline])\n\n return props.children\n}\n","import deepmerge from 'deepmerge'\n\n/**\n * Config can be either an object or a function that receives baseConfig and data\n * and returns a partial config to be merged with the base.\n */\nexport type ConfigOrFn<TConfig, TData = unknown> =\n | Partial<TConfig>\n | ((baseConfig: TConfig, data: TData) => Partial<TConfig>)\n\n/**\n * Resolves a config that may be either an object or a function.\n * If it's a function, calls it with baseConfig and data.\n * If it's an object (or undefined), returns it as-is.\n */\nexport function resolveConfig<TConfig, TData>(\n config: ConfigOrFn<TConfig, TData> | undefined,\n baseConfig: TConfig,\n data: TData,\n): Partial<TConfig> | undefined {\n if (typeof config === 'function') {\n return config(baseConfig, data)\n }\n return config\n}\n\nexport function mergeWidgetConfig<T>(\n ...options: [Partial<T> | undefined, Partial<T> | undefined]\n): T {\n return deepmerge(options[0] ?? {}, options[1] ?? {}, {\n arrayMerge(_, source) {\n return source as T[keyof T][]\n },\n })\n}\n"],"names":["WidgetLoader","props","$","_c","setWidget","useWidgetStore","_temp","executeToolPipeline","_temp2","executeConfigPipeline","_temp3","t0","id","getState","widgets","registeredTools","useSyncExternalStore","subscribe","dataRef","useRef","data","configRef","config","isMountedRef","t1","current","useEffect","t2","t3","type","t4","t5","error","isFetching","isLoading","t6","t7","t8","t9","t10","t11","children","state_1","state","state_0","resolveConfig","baseConfig","mergeWidgetConfig","options","deepmerge","arrayMerge","_","source"],"mappings":";;;;AAKO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,EAAA,GAGLC,IAAkBC,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AAuE,GAEnEvC,EAAKwC;AAAS;AA5EhB,SAAA/B,EAAAgC,GAAA;AAAA,SAQQC,EAAKlC;AAAsB;AARnC,SAAAD,EAAAoC,GAAA;AAAA,SAKQD,EAAKpC;AAAoB;AALjC,SAAAD,EAAAqC,GAAA;AAAA,SAGuCA,EAAKvC;AAAU;ACOtD,SAASyC,EACdvB,GACAwB,GACA1B,GAC8B;AAC9B,SAAI,OAAOE,KAAW,aACbA,EAAOwB,GAAY1B,CAAI,IAEzBE;AACT;AAEO,SAASyB,KACXC,GACA;AACH,SAAOC,EAAUD,EAAQ,CAAC,KAAK,CAAA,GAAIA,EAAQ,CAAC,KAAK,IAAI;AAAA,IACnDE,WAAWC,GAAGC,GAAQ;AACpB,aAAOA;AAAAA,IACT;AAAA,EAAA,CACD;AACH;"}
|
package/dist/widgets/markdown.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as i, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { u } from "../widget-store-
|
|
3
|
+
import { u } from "../widget-store-CzDt8oSK.js";
|
|
4
4
|
import { useShallow as g } from "zustand/shallow";
|
|
5
5
|
import { ListItem as w, List as d, Link as k, Typography as m, Skeleton as s, Box as y } from "@mui/material";
|
|
6
6
|
import S from "react-markdown";
|
|
7
7
|
import "@mui/icons-material";
|
|
8
8
|
import "react";
|
|
9
9
|
import "html2canvas";
|
|
10
|
-
import "../lasso-tool-
|
|
10
|
+
import "../lasso-tool-jl4YK02H.js";
|
|
11
11
|
import "../cjs-D4KH3azB.js";
|
|
12
12
|
import "@dnd-kit/core";
|
|
13
13
|
import "@dnd-kit/sortable";
|
package/dist/widgets/no-data.js
CHANGED
package/dist/widgets/pie.js
CHANGED
|
@@ -2,16 +2,16 @@ import { jsxs as f, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as S } from "react/compiler-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "echarts";
|
|
5
|
-
import "../widget-store-
|
|
5
|
+
import "../widget-store-CzDt8oSK.js";
|
|
6
6
|
import "zustand/shallow";
|
|
7
7
|
import { g as w } from "../options-D9wflre6.js";
|
|
8
|
-
import { m as I } from "../utils-
|
|
9
|
-
import { f as C, c as j,
|
|
8
|
+
import { m as I } from "../utils-idmvq0Oa.js";
|
|
9
|
+
import { f as C, c as j, b as k, d as A, e as O } from "../styles-DrPyd0y5.js";
|
|
10
10
|
import { Box as d, Skeleton as a } from "@mui/material";
|
|
11
11
|
import "@mui/icons-material";
|
|
12
12
|
import "react-markdown";
|
|
13
13
|
import { d as y, a as x } from "../exports-Cr43OCul.js";
|
|
14
|
-
import "../lasso-tool-
|
|
14
|
+
import "../lasso-tool-jl4YK02H.js";
|
|
15
15
|
import "../cjs-D4KH3azB.js";
|
|
16
16
|
import "@dnd-kit/core";
|
|
17
17
|
import "@dnd-kit/sortable";
|
package/dist/widgets/range.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { R as
|
|
4
|
-
import { Box as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { u as
|
|
7
|
-
import { useShallow as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as f, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import { c as L } from "react/compiler-runtime";
|
|
3
|
+
import { R as ee } from "../row-BKmVAUN5.js";
|
|
4
|
+
import { Box as E, Slider as te, TextField as ne, Skeleton as H } from "@mui/material";
|
|
5
|
+
import { useState as X } from "react";
|
|
6
|
+
import { u as $ } from "../widget-store-CzDt8oSK.js";
|
|
7
|
+
import { useShallow as J } from "zustand/shallow";
|
|
8
|
+
const v = {
|
|
9
9
|
rangeItem: {
|
|
10
10
|
display: "flex",
|
|
11
11
|
flexDirection: "column",
|
|
@@ -36,182 +36,174 @@ const _ = {
|
|
|
36
36
|
}
|
|
37
37
|
}, ie = (n) => n.toString();
|
|
38
38
|
function ae(n) {
|
|
39
|
-
const e =
|
|
39
|
+
const e = L(65), {
|
|
40
40
|
id: i,
|
|
41
41
|
index: a
|
|
42
42
|
} = n;
|
|
43
43
|
let r;
|
|
44
|
-
e[0] !== i || e[1] !== a ? (r = (
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
formatter: s?.formatter
|
|
50
|
-
};
|
|
51
|
-
}, e[0] = i, e[1] = a, e[2] = r) : r = e[2];
|
|
52
|
-
const {
|
|
53
|
-
item: t,
|
|
54
|
-
onChange: m,
|
|
55
|
-
formatter: v
|
|
56
|
-
} = H(ne(r)), o = v === void 0 ? ie : v, c = H(oe), d = H(le);
|
|
44
|
+
e[0] !== i || e[1] !== a ? (r = (s) => s.getWidget(i)?.data[a], e[0] = i, e[1] = a, e[2] = r) : r = e[2];
|
|
45
|
+
const t = $(J(r));
|
|
46
|
+
let h;
|
|
47
|
+
e[3] !== i ? (h = (s) => s.getWidget(i)?.onChange, e[3] = i, e[4] = h) : h = e[4];
|
|
48
|
+
const m = $(J(h)), o = $(J((s) => s.getWidget(i)?.formatter)) ?? ie, c = $(se), d = $(le);
|
|
57
49
|
let b;
|
|
58
|
-
e[
|
|
59
|
-
const l = b, [u, y] =
|
|
50
|
+
e[5] !== t ? (b = t ? t.value ?? [t.min, t.max] : [0, 0], e[5] = t, e[6] = b) : b = e[6];
|
|
51
|
+
const l = b, [u, y] = X("");
|
|
60
52
|
if (!t)
|
|
61
53
|
return null;
|
|
62
|
-
let
|
|
63
|
-
e[
|
|
64
|
-
if (Array.isArray(
|
|
65
|
-
const [
|
|
54
|
+
let B;
|
|
55
|
+
e[7] !== c || e[8] !== i || e[9] !== a || e[10] !== t || e[11] !== m || e[12] !== d ? (B = (s, _) => {
|
|
56
|
+
if (Array.isArray(_)) {
|
|
57
|
+
const [G, P] = _, x = c(i)?.data ?? [];
|
|
66
58
|
x[a] = {
|
|
67
59
|
...t,
|
|
68
|
-
value:
|
|
60
|
+
value: _
|
|
69
61
|
}, d(i, {
|
|
70
62
|
data: x
|
|
71
|
-
}), m?.([
|
|
63
|
+
}), m?.([G, P], a);
|
|
72
64
|
}
|
|
73
|
-
}, e[
|
|
74
|
-
const I =
|
|
75
|
-
let
|
|
76
|
-
e[
|
|
77
|
-
y(
|
|
78
|
-
}, e[
|
|
79
|
-
const S =
|
|
65
|
+
}, e[7] = c, e[8] = i, e[9] = a, e[10] = t, e[11] = m, e[12] = d, e[13] = B) : B = e[13];
|
|
66
|
+
const I = B;
|
|
67
|
+
let g;
|
|
68
|
+
e[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = (s) => {
|
|
69
|
+
y(s.target.name);
|
|
70
|
+
}, e[14] = g) : g = e[14];
|
|
71
|
+
const S = g;
|
|
80
72
|
let w;
|
|
81
|
-
if (e[
|
|
82
|
-
const
|
|
73
|
+
if (e[15] !== l[0] || e[16] !== l[1] || e[17] !== c || e[18] !== i || e[19] !== a || e[20] !== t.max || e[21] !== t.min || e[22] !== m || e[23] !== d) {
|
|
74
|
+
const s = (_) => {
|
|
83
75
|
const {
|
|
84
|
-
name:
|
|
85
|
-
value:
|
|
86
|
-
} =
|
|
76
|
+
name: G,
|
|
77
|
+
value: P
|
|
78
|
+
} = _.target;
|
|
87
79
|
let x;
|
|
88
|
-
|
|
89
|
-
const
|
|
80
|
+
G === "min" ? x = [Math.min(Math.max(t.min, parseFloat(P) || t.min), l[1]), l[1] ?? 0] : x = [l[0] ?? 0, Math.max(Math.min(t.max, parseFloat(P) || t.max), l[0])];
|
|
81
|
+
const Y = c(i)?.data ?? [];
|
|
90
82
|
d(i, {
|
|
91
|
-
data:
|
|
92
|
-
...
|
|
83
|
+
data: Y.map((O, Z) => Z === a ? {
|
|
84
|
+
...O,
|
|
93
85
|
value: x
|
|
94
|
-
} :
|
|
86
|
+
} : O)
|
|
95
87
|
}), m?.([x[0], x[1]], a);
|
|
96
88
|
};
|
|
97
|
-
w = (
|
|
98
|
-
y(""),
|
|
99
|
-
}, e[
|
|
89
|
+
w = (_) => {
|
|
90
|
+
y(""), s(_);
|
|
91
|
+
}, e[15] = l[0], e[16] = l[1], e[17] = c, e[18] = i, e[19] = a, e[20] = t.max, e[21] = t.min, e[22] = m, e[23] = d, e[24] = w;
|
|
100
92
|
} else
|
|
101
|
-
w = e[
|
|
102
|
-
const
|
|
103
|
-
let
|
|
104
|
-
e[
|
|
105
|
-
|
|
106
|
-
}, e[
|
|
107
|
-
const
|
|
108
|
-
let
|
|
109
|
-
e[
|
|
93
|
+
w = e[24];
|
|
94
|
+
const p = w;
|
|
95
|
+
let K;
|
|
96
|
+
e[25] !== p ? (K = (s) => {
|
|
97
|
+
s.key === "Enter" && (p(s), s.currentTarget.blur());
|
|
98
|
+
}, e[25] = p, e[26] = K) : K = e[26];
|
|
99
|
+
const R = K;
|
|
100
|
+
let C;
|
|
101
|
+
e[27] !== t.color ? (C = t.color && {
|
|
110
102
|
color: t.color
|
|
111
|
-
}, e[
|
|
103
|
+
}, e[27] = t.color, e[28] = C) : C = e[28];
|
|
112
104
|
let M;
|
|
113
|
-
e[
|
|
114
|
-
...
|
|
115
|
-
...
|
|
116
|
-
}, e[
|
|
105
|
+
e[29] !== C ? (M = {
|
|
106
|
+
...v.slider,
|
|
107
|
+
...C
|
|
108
|
+
}, e[29] = C, e[30] = M) : M = e[30];
|
|
117
109
|
let D;
|
|
118
|
-
e[
|
|
119
|
-
const
|
|
120
|
-
let
|
|
121
|
-
e[
|
|
110
|
+
e[31] !== l || e[32] !== o || e[33] !== I || e[34] !== t.disabled || e[35] !== t.marks || e[36] !== t.max || e[37] !== t.min || e[38] !== t.step || e[39] !== M ? (D = /* @__PURE__ */ f(E, { sx: v.sliderContainer, children: /* @__PURE__ */ f(te, { value: l, onChange: I, valueLabelDisplay: "auto", valueLabelFormat: o, min: t.min, max: t.max, step: t.step, marks: t.marks, disabled: t.disabled, sx: M }) }), e[31] = l, e[32] = o, e[33] = I, e[34] = t.disabled, e[35] = t.marks, e[36] = t.max, e[37] = t.min, e[38] = t.step, e[39] = M, e[40] = D) : D = e[40];
|
|
111
|
+
const T = `min-${l[0]}`, N = l[0] ?? 0;
|
|
112
|
+
let V;
|
|
113
|
+
e[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (V = {
|
|
122
114
|
"aria-label": "Minimum value"
|
|
123
|
-
}, e[
|
|
115
|
+
}, e[41] = V) : V = e[41];
|
|
124
116
|
let F;
|
|
125
|
-
e[
|
|
126
|
-
const
|
|
127
|
-
let
|
|
128
|
-
e[
|
|
117
|
+
e[42] !== o || e[43] !== p || e[44] !== R || e[45] !== u || e[46] !== t.disabled || e[47] !== T || e[48] !== N ? (F = /* @__PURE__ */ f(Q, { isEditing: u, name: "min", value: N, formatter: o, onFocus: S, onBlur: p, onKeyDown: R, disabled: t.disabled, inputProps: V }, T), e[42] = o, e[43] = p, e[44] = R, e[45] = u, e[46] = t.disabled, e[47] = T, e[48] = N, e[49] = F) : F = e[49];
|
|
118
|
+
const U = `max-${l[1]}`, q = l[1] ?? 0;
|
|
119
|
+
let z;
|
|
120
|
+
e[50] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = {
|
|
129
121
|
"aria-label": "Maximum value"
|
|
130
|
-
}, e[
|
|
122
|
+
}, e[50] = z) : z = e[50];
|
|
131
123
|
let k;
|
|
132
|
-
e[
|
|
133
|
-
let
|
|
134
|
-
e[
|
|
124
|
+
e[51] !== o || e[52] !== p || e[53] !== R || e[54] !== u || e[55] !== t.disabled || e[56] !== U || e[57] !== q ? (k = /* @__PURE__ */ f(Q, { isEditing: u, name: "max", value: q, formatter: o, onFocus: S, onBlur: p, onKeyDown: R, disabled: t.disabled, inputProps: z }, U), e[51] = o, e[52] = p, e[53] = R, e[54] = u, e[55] = t.disabled, e[56] = U, e[57] = q, e[58] = k) : k = e[58];
|
|
125
|
+
let W;
|
|
126
|
+
e[59] !== F || e[60] !== k ? (W = /* @__PURE__ */ j(E, { sx: v.inputsRow, children: [
|
|
135
127
|
F,
|
|
136
128
|
k
|
|
137
|
-
] }), e[
|
|
138
|
-
let
|
|
139
|
-
return e[
|
|
129
|
+
] }), e[59] = F, e[60] = k, e[61] = W) : W = e[61];
|
|
130
|
+
let A;
|
|
131
|
+
return e[62] !== D || e[63] !== W ? (A = /* @__PURE__ */ j(E, { sx: v.rangeItem, children: [
|
|
140
132
|
D,
|
|
141
|
-
|
|
142
|
-
] }), e[
|
|
133
|
+
W
|
|
134
|
+
] }), e[62] = D, e[63] = W, e[64] = A) : A = e[64], A;
|
|
143
135
|
}
|
|
144
136
|
function le(n) {
|
|
145
137
|
return n.setWidget;
|
|
146
138
|
}
|
|
147
|
-
function
|
|
139
|
+
function se(n) {
|
|
148
140
|
return n.getWidget;
|
|
149
141
|
}
|
|
150
|
-
function
|
|
151
|
-
const e =
|
|
142
|
+
function Q(n) {
|
|
143
|
+
const e = L(12), {
|
|
152
144
|
isEditing: i,
|
|
153
145
|
name: a,
|
|
154
146
|
disabled: r,
|
|
155
147
|
value: t,
|
|
156
|
-
formatter:
|
|
157
|
-
onFocus:
|
|
148
|
+
formatter: h,
|
|
149
|
+
onFocus: m,
|
|
158
150
|
onBlur: o,
|
|
159
151
|
onKeyDown: c,
|
|
160
152
|
inputProps: d
|
|
161
|
-
} = n, [b, l] =
|
|
153
|
+
} = n, [b, l] = X(String(t)), u = Number(b);
|
|
162
154
|
let y;
|
|
163
|
-
e[0] !==
|
|
155
|
+
e[0] !== h || e[1] !== u ? (y = h(u), e[0] = h, e[1] = u, e[2] = y) : y = e[2];
|
|
164
156
|
const I = i === a ? b : y;
|
|
165
|
-
let
|
|
166
|
-
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
157
|
+
let g;
|
|
158
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = (w) => {
|
|
167
159
|
l(w.target.value);
|
|
168
|
-
}, e[3] =
|
|
160
|
+
}, e[3] = g) : g = e[3];
|
|
169
161
|
let S;
|
|
170
|
-
return e[4] !== r || e[5] !== d || e[6] !== a || e[7] !== o || e[8] !==
|
|
162
|
+
return e[4] !== r || e[5] !== d || e[6] !== a || e[7] !== o || e[8] !== m || e[9] !== c || e[10] !== I ? (S = /* @__PURE__ */ f(ne, { name: a, value: I, onChange: g, onFocus: m, onBlur: o, onKeyDown: c, disabled: r, size: "small", sx: v.input, inputProps: d }), e[4] = r, e[5] = d, e[6] = a, e[7] = o, e[8] = m, e[9] = c, e[10] = I, e[11] = S) : S = e[11], S;
|
|
171
163
|
}
|
|
172
164
|
function pe(n) {
|
|
173
|
-
const e =
|
|
165
|
+
const e = L(5);
|
|
174
166
|
let i;
|
|
175
167
|
e[0] !== n.id ? (i = (r) => {
|
|
176
168
|
const {
|
|
177
169
|
index: t
|
|
178
170
|
} = r;
|
|
179
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */ f(ae, { id: n.id, index: t });
|
|
180
172
|
}, e[0] = n.id, e[1] = i) : i = e[1];
|
|
181
173
|
let a;
|
|
182
|
-
return e[2] !== n.id || e[3] !== i ? (a = /* @__PURE__ */
|
|
174
|
+
return e[2] !== n.id || e[3] !== i ? (a = /* @__PURE__ */ f(ee, { id: n.id, children: i }), e[2] = n.id, e[3] = i, e[4] = a) : a = e[4], a;
|
|
183
175
|
}
|
|
184
176
|
function he() {
|
|
185
|
-
const n =
|
|
177
|
+
const n = L(2);
|
|
186
178
|
let e;
|
|
187
|
-
n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
179
|
+
n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ f(H, { width: "100%", height: 32 }), n[0] = e) : e = n[0];
|
|
188
180
|
let i;
|
|
189
|
-
return n[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */
|
|
181
|
+
return n[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ j(E, { sx: v.rangeItem, "aria-label": "Range skeleton", children: [
|
|
190
182
|
e,
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ j(E, { sx: v.inputsRow, children: [
|
|
184
|
+
/* @__PURE__ */ f(H, { width: "100%", height: 40 }),
|
|
185
|
+
/* @__PURE__ */ f(H, { width: "100%", height: 40 })
|
|
194
186
|
] })
|
|
195
187
|
] }), n[1] = i) : i = n[1], i;
|
|
196
188
|
}
|
|
197
189
|
function xe() {
|
|
198
190
|
return {};
|
|
199
191
|
}
|
|
200
|
-
function
|
|
192
|
+
function oe(n) {
|
|
201
193
|
return {
|
|
202
194
|
...n,
|
|
203
195
|
note: typeof n.note == "string" ? n.note : void 0
|
|
204
196
|
};
|
|
205
197
|
}
|
|
206
198
|
function be(n) {
|
|
207
|
-
return n?.map(
|
|
199
|
+
return n?.map(oe);
|
|
208
200
|
}
|
|
209
201
|
export {
|
|
210
202
|
ae as RangeItem,
|
|
211
203
|
he as RangeSkeleton,
|
|
212
204
|
pe as RangeUI,
|
|
213
205
|
xe as rangeConfig,
|
|
214
|
-
|
|
206
|
+
oe as sanitizeRangeDataItem,
|
|
215
207
|
be as sanitizeRangeDataItems
|
|
216
208
|
};
|
|
217
209
|
//# sourceMappingURL=range.js.map
|