@carto/ps-react-ui 5.0.0-widgets.4 → 5.0.0-widgets.6
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/{error-DGzuzmn1.js → error-G3sy6lw3.js} +2 -2
- package/dist/{error-DGzuzmn1.js.map → error-G3sy6lw3.js.map} +1 -1
- package/dist/{no-data-BBAoT1vK.js → no-data-DfkC_Kc_.js} +2 -2
- package/dist/{no-data-BBAoT1vK.js.map → no-data-DfkC_Kc_.js.map} +1 -1
- package/dist/note-Clng2ej6.js +124 -0
- package/dist/note-Clng2ej6.js.map +1 -0
- package/dist/{row-C_m1ovHv.js → row-B9hTUitn.js} +2 -2
- package/dist/{row-C_m1ovHv.js.map → row-B9hTUitn.js.map} +1 -1
- package/dist/{series-6xp-KQ0S.js → series-DojKkd_o.js} +3 -3
- package/dist/{series-6xp-KQ0S.js.map → series-DojKkd_o.js.map} +1 -1
- package/dist/types/widgets/category/config.d.ts +1 -0
- package/dist/types/widgets/category/types.d.ts +1 -0
- package/dist/types/widgets/echart/types.d.ts +1 -0
- package/dist/types/widgets/index.d.ts +2 -0
- package/dist/types/widgets/stores/types.d.ts +0 -75
- package/dist/types/widgets/subheader/index.d.ts +2 -2
- package/dist/types/widgets/subheader/subheader.d.ts +2 -2
- package/dist/types/widgets/subheader/types.d.ts +1 -1
- package/dist/types/widgets/table/hooks/use-pagination.d.ts +1 -7
- package/dist/types/widgets/table/hooks/use-selection.d.ts +0 -2
- package/dist/types/widgets/table/hooks/use-sort.d.ts +1 -7
- package/dist/types/widgets/table/types.d.ts +16 -5
- package/dist/widget-store-Dd7_sWZT.js +132 -0
- package/dist/widget-store-Dd7_sWZT.js.map +1 -0
- package/dist/widgets/actions.js +23 -22
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +8 -7
- package/dist/widgets/bar.js.map +1 -1
- package/dist/widgets/category.js +135 -128
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/echart.js +1 -1
- package/dist/widgets/error.js +1 -1
- package/dist/widgets/formula.js +19 -18
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +54 -53
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/markdown.js +1 -1
- package/dist/widgets/no-data.js +1 -1
- package/dist/widgets/note.js +2 -121
- package/dist/widgets/note.js.map +1 -1
- package/dist/widgets/pie.js +8 -7
- package/dist/widgets/pie.js.map +1 -1
- package/dist/widgets/range.js +2 -2
- package/dist/widgets/root.js +1 -1
- package/dist/widgets/scatterplot.js +8 -7
- package/dist/widgets/scatterplot.js.map +1 -1
- package/dist/widgets/skeleton-loader.js +1 -1
- package/dist/widgets/spread.js +20 -19
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/stores.js +1 -1
- package/dist/widgets/subheader.js +5 -5
- package/dist/widgets/subheader.js.map +1 -1
- package/dist/widgets/table.js +499 -488
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +8 -7
- package/dist/widgets/timeseries.js.map +1 -1
- package/dist/widgets/wrapper.js +1 -1
- package/dist/widgets.js +6 -4
- package/dist/widgets.js.map +1 -1
- package/package.json +1 -1
- package/dist/widget-store-DNyVElxd.js +0 -190
- package/dist/widget-store-DNyVElxd.js.map +0 -1
package/dist/widgets/formula.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { I as F, S as D, P, a as W } from "../series-
|
|
1
|
+
import { I as F, S as D, P, a as W } from "../series-DojKkd_o.js";
|
|
2
2
|
import { jsx as l, jsxs as k, Fragment as C } from "react/jsx-runtime";
|
|
3
3
|
import { c as S } from "react/compiler-runtime";
|
|
4
|
-
import { u as y } from "../widget-store-
|
|
4
|
+
import { u as y } from "../widget-store-Dd7_sWZT.js";
|
|
5
5
|
import { useShallow as R } from "zustand/shallow";
|
|
6
|
-
import { R as T, s as _ } from "../row-
|
|
7
|
-
import { Box as
|
|
6
|
+
import { R as T, s as _ } from "../row-B9hTUitn.js";
|
|
7
|
+
import { Box as p, Skeleton as $ } from "@mui/material";
|
|
8
8
|
import "@mui/icons-material";
|
|
9
9
|
import { useRef as b, useEffect as j } from "react";
|
|
10
|
+
import "react-markdown";
|
|
10
11
|
import { d as v, a as w } from "../exports-Cr43OCul.js";
|
|
11
12
|
import "../lasso-tool-CYn3ivf-.js";
|
|
12
13
|
import "../cjs-D9ro6BXv.js";
|
|
@@ -24,8 +25,8 @@ function U(e) {
|
|
|
24
25
|
} = e, t[0] = e, t[1] = o, t[2] = i, t[3] = n) : (o = t[1], i = t[2], n = t[3]);
|
|
25
26
|
const f = n === void 0 ? 0 : n;
|
|
26
27
|
let r;
|
|
27
|
-
t[4] !== o || t[5] !== f ? (r = (
|
|
28
|
-
const h =
|
|
28
|
+
t[4] !== o || t[5] !== f ? (r = (I) => {
|
|
29
|
+
const h = I.getWidget(o);
|
|
29
30
|
return {
|
|
30
31
|
value: h?.data?.[f]?.value,
|
|
31
32
|
color: h?.data?.[f]?.color,
|
|
@@ -47,7 +48,7 @@ function U(e) {
|
|
|
47
48
|
let c;
|
|
48
49
|
return t[12] !== i || t[13] !== s || t[14] !== m ? (c = /* @__PURE__ */ l(F, { TypographyProps: s, ...i, children: m }), t[12] = i, t[13] = s, t[14] = m, t[15] = c) : c = t[15], c;
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
+
function et({
|
|
51
52
|
refUI: e
|
|
52
53
|
}) {
|
|
53
54
|
return [{
|
|
@@ -61,12 +62,12 @@ function tt({
|
|
|
61
62
|
}
|
|
62
63
|
}];
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function it() {
|
|
65
66
|
return {
|
|
66
67
|
series: []
|
|
67
68
|
};
|
|
68
69
|
}
|
|
69
|
-
function
|
|
70
|
+
function ot(e) {
|
|
70
71
|
const t = S(9), o = b(null), i = y(V);
|
|
71
72
|
let n, f;
|
|
72
73
|
t[0] !== e.id || t[1] !== i ? (n = () => {
|
|
@@ -87,15 +88,15 @@ function it(e) {
|
|
|
87
88
|
] });
|
|
88
89
|
}, t[4] = e.id, t[5] = r) : r = t[5];
|
|
89
90
|
let d;
|
|
90
|
-
return t[6] !== e.id || t[7] !== r ? (d = /* @__PURE__ */ l(
|
|
91
|
+
return t[6] !== e.id || t[7] !== r ? (d = /* @__PURE__ */ l(p, { ref: o, children: /* @__PURE__ */ l(T, { id: e.id, children: r }) }), t[6] = e.id, t[7] = r, t[8] = d) : d = t[8], d;
|
|
91
92
|
}
|
|
92
93
|
function V(e) {
|
|
93
94
|
return e.setWidget;
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
+
function rt() {
|
|
96
97
|
const e = S(1);
|
|
97
98
|
let t;
|
|
98
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ l(
|
|
99
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ l(p, { sx: _.row, "aria-label": "Formula skeleton", children: /* @__PURE__ */ l($, { width: 120, height: 32 }) }), e[0] = t) : t = e[0], t;
|
|
99
100
|
}
|
|
100
101
|
function B(e) {
|
|
101
102
|
return {
|
|
@@ -104,21 +105,21 @@ function B(e) {
|
|
|
104
105
|
suffix: typeof e.suffix == "string" ? e.suffix : void 0
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
|
-
function
|
|
108
|
+
function nt(e) {
|
|
108
109
|
return e?.map(B);
|
|
109
110
|
}
|
|
110
111
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
rt as FormulaSkeleton,
|
|
113
|
+
ot as FormulaUI,
|
|
113
114
|
F as Item,
|
|
114
115
|
P as Prefix,
|
|
115
116
|
T as Row,
|
|
116
117
|
D as Series,
|
|
117
118
|
W as Suffix,
|
|
118
119
|
U as Value,
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
it as formulaConfig,
|
|
121
|
+
et as formulaDownloadConfig,
|
|
121
122
|
B as sanitizeDataItem,
|
|
122
|
-
|
|
123
|
+
nt as sanitizeDataItems
|
|
123
124
|
};
|
|
124
125
|
//# sourceMappingURL=formula.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formula.js","sources":["../../src/widgets/formula/components/value.tsx","../../src/widgets/formula/config.ts","../../src/widgets/formula/formula-ui.tsx","../../src/widgets/formula/skeleton.tsx","../../src/widgets/formula/serializer.ts"],"sourcesContent":["import { type FormulaWidgetState, type ValueProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { Item } from './item'\nimport { useShallow } from 'zustand/shallow'\n\nconst defaultFormatter = (value: number) => value.toString()\n\nexport function Value({ id, index = 0, ...props }: ValueProps) {\n const {\n value,\n color,\n formatter = defaultFormatter,\n } = useWidgetStore(\n useShallow((state) => {\n const widget = state.getWidget<FormulaWidgetState>(id)\n return {\n value: widget?.data?.[index]?.value,\n color: widget?.data?.[index]?.color,\n formatter: widget?.formatter,\n }\n }),\n )\n\n return (\n <Item TypographyProps={{ color }} {...props}>\n {formatter(value ?? 0)}\n </Item>\n )\n}\n","import { downloadToCSV, downloadToPNG } from '../actions'\nimport type { ConfigProps } from '../root/types'\nimport type { FormulaDownloadConfig, FormulaWidgetConfig } from './types'\n\nexport function formulaDownloadConfig({\n refUI,\n}: ConfigProps): FormulaDownloadConfig {\n return [\n {\n ...downloadToPNG,\n modifier: () => downloadToPNG.modifier(refUI),\n },\n {\n ...downloadToCSV,\n modifier: async (data) => {\n const formulaData = [data?.map((item) => item.value) ?? []]\n return downloadToCSV.modifier(formulaData)\n },\n },\n ]\n}\n\nexport function formulaConfig(): FormulaWidgetConfig {\n return {\n series: [],\n }\n}\n","import type { FormulaUIProps } from './types'\nimport { Row } from './components/row'\nimport { Value } from './components/value'\nimport { Prefix } from './components/prefix'\nimport { Suffix } from './components/suffix'\nimport { Series } from './components/series'\nimport { useRef, useEffect } from 'react'\nimport { useWidgetStore } from '../stores/widget-store'\nimport { Box } from '@mui/material'\n\nexport function FormulaUI(props: FormulaUIProps) {\n const ref = useRef<HTMLElement | null>(null)\n const setWidget = useWidgetStore((store) => store.setWidget)\n\n useEffect(() => {\n if (ref.current) {\n setWidget(props.id, { refUI: ref })\n }\n }, [props.id, setWidget])\n\n return (\n <Box ref={ref}>\n <Row id={props.id}>\n {({ index }) => (\n <>\n <Series id={props.id} index={index} />\n <Prefix id={props.id} index={index} />\n <Value id={props.id} index={index} />\n <Suffix id={props.id} index={index} />\n </>\n )}\n </Row>\n </Box>\n )\n}\n","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","import type { DataItem } from './types'\n\n/**\n * Sanitizes DataItem by converting ReactNode prefix/suffix values to undefined.\n * This ensures only string values are stored in the widget state.\n *\n * @param item - The DataItem to sanitize\n * @returns A new DataItem with ReactNode prefix/suffix values converted to undefined\n */\nexport function sanitizeDataItem(item: DataItem): DataItem {\n return {\n ...item,\n prefix: typeof item.prefix === 'string' ? item.prefix : undefined,\n suffix: typeof item.suffix === 'string' ? item.suffix : undefined,\n }\n}\n\n/**\n * Sanitizes an array of DataItems by converting ReactNode prefix/suffix values to undefined.\n *\n * @param items - Array of DataItems to sanitize\n * @returns A new array with sanitized DataItems\n */\nexport function sanitizeDataItems(\n items: DataItem[] | undefined,\n): DataItem[] | undefined {\n return items?.map(sanitizeDataItem)\n}\n"],"names":["defaultFormatter","value","toString","Value","t0","$","_c","id","props","t1","index","undefined","t2","state","widget","getWidget","data","color","formatter","t3","useWidgetStore","useShallow","t4","t5","t6","t7","Item","formulaDownloadConfig","refUI","downloadToPNG","modifier","downloadToCSV","formulaData","map","item","formulaConfig","series","FormulaUI","ref","useRef","setWidget","_temp","current","useEffect","jsxs","Fragment","jsx","Series","Prefix","Suffix","Box","Row","store","FormulaSkeleton","Symbol","for","styles","row","Skeleton","sanitizeDataItem","prefix","suffix","sanitizeDataItems","items"],"mappings":"
|
|
1
|
+
{"version":3,"file":"formula.js","sources":["../../src/widgets/formula/components/value.tsx","../../src/widgets/formula/config.ts","../../src/widgets/formula/formula-ui.tsx","../../src/widgets/formula/skeleton.tsx","../../src/widgets/formula/serializer.ts"],"sourcesContent":["import { type FormulaWidgetState, type ValueProps } from '../types'\nimport { useWidgetStore } from '../../stores/widget-store'\nimport { Item } from './item'\nimport { useShallow } from 'zustand/shallow'\n\nconst defaultFormatter = (value: number) => value.toString()\n\nexport function Value({ id, index = 0, ...props }: ValueProps) {\n const {\n value,\n color,\n formatter = defaultFormatter,\n } = useWidgetStore(\n useShallow((state) => {\n const widget = state.getWidget<FormulaWidgetState>(id)\n return {\n value: widget?.data?.[index]?.value,\n color: widget?.data?.[index]?.color,\n formatter: widget?.formatter,\n }\n }),\n )\n\n return (\n <Item TypographyProps={{ color }} {...props}>\n {formatter(value ?? 0)}\n </Item>\n )\n}\n","import { downloadToCSV, downloadToPNG } from '../actions'\nimport type { ConfigProps } from '../root/types'\nimport type { FormulaDownloadConfig, FormulaWidgetConfig } from './types'\n\nexport function formulaDownloadConfig({\n refUI,\n}: ConfigProps): FormulaDownloadConfig {\n return [\n {\n ...downloadToPNG,\n modifier: () => downloadToPNG.modifier(refUI),\n },\n {\n ...downloadToCSV,\n modifier: async (data) => {\n const formulaData = [data?.map((item) => item.value) ?? []]\n return downloadToCSV.modifier(formulaData)\n },\n },\n ]\n}\n\nexport function formulaConfig(): FormulaWidgetConfig {\n return {\n series: [],\n }\n}\n","import type { FormulaUIProps } from './types'\nimport { Row } from './components/row'\nimport { Value } from './components/value'\nimport { Prefix } from './components/prefix'\nimport { Suffix } from './components/suffix'\nimport { Series } from './components/series'\nimport { useRef, useEffect } from 'react'\nimport { useWidgetStore } from '../stores/widget-store'\nimport { Box } from '@mui/material'\n\nexport function FormulaUI(props: FormulaUIProps) {\n const ref = useRef<HTMLElement | null>(null)\n const setWidget = useWidgetStore((store) => store.setWidget)\n\n useEffect(() => {\n if (ref.current) {\n setWidget(props.id, { refUI: ref })\n }\n }, [props.id, setWidget])\n\n return (\n <Box ref={ref}>\n <Row id={props.id}>\n {({ index }) => (\n <>\n <Series id={props.id} index={index} />\n <Prefix id={props.id} index={index} />\n <Value id={props.id} index={index} />\n <Suffix id={props.id} index={index} />\n </>\n )}\n </Row>\n </Box>\n )\n}\n","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","import type { DataItem } from './types'\n\n/**\n * Sanitizes DataItem by converting ReactNode prefix/suffix values to undefined.\n * This ensures only string values are stored in the widget state.\n *\n * @param item - The DataItem to sanitize\n * @returns A new DataItem with ReactNode prefix/suffix values converted to undefined\n */\nexport function sanitizeDataItem(item: DataItem): DataItem {\n return {\n ...item,\n prefix: typeof item.prefix === 'string' ? item.prefix : undefined,\n suffix: typeof item.suffix === 'string' ? item.suffix : undefined,\n }\n}\n\n/**\n * Sanitizes an array of DataItems by converting ReactNode prefix/suffix values to undefined.\n *\n * @param items - Array of DataItems to sanitize\n * @returns A new array with sanitized DataItems\n */\nexport function sanitizeDataItems(\n items: DataItem[] | undefined,\n): DataItem[] | undefined {\n return items?.map(sanitizeDataItem)\n}\n"],"names":["defaultFormatter","value","toString","Value","t0","$","_c","id","props","t1","index","undefined","t2","state","widget","getWidget","data","color","formatter","t3","useWidgetStore","useShallow","t4","t5","t6","t7","Item","formulaDownloadConfig","refUI","downloadToPNG","modifier","downloadToCSV","formulaData","map","item","formulaConfig","series","FormulaUI","ref","useRef","setWidget","_temp","current","useEffect","jsxs","Fragment","jsx","Series","Prefix","Suffix","Box","Row","store","FormulaSkeleton","Symbol","for","styles","row","Skeleton","sanitizeDataItem","prefix","suffix","sanitizeDataItems","items"],"mappings":";;;;;;;;;;;;;;;;AAKA,MAAMA,IAAmBA,CAACC,MAAkBA,EAAMC,SAAAA;AAE3C,SAAAC,EAAAC,GAAA;AAAA,QAAAC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AA,IACL,GAAGA;AAAAA,IACH0B,QAAQ,OAAO1B,EAAK0B,UAAW,WAAW1B,EAAK0B,SAASjD;AAAAA,IACxDkD,QAAQ,OAAO3B,EAAK2B,UAAW,WAAW3B,EAAK2B,SAASlD;AAAAA,EAAAA;AAE5D;AAQO,SAASmD,GACdC,GACwB;AACxB,SAAOA,GAAO9B,IAAI0B,CAAgB;AACpC;"}
|
|
@@ -2,61 +2,62 @@ import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as f } from "react/compiler-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "echarts";
|
|
5
|
-
import "../widget-store-
|
|
5
|
+
import "../widget-store-Dd7_sWZT.js";
|
|
6
6
|
import "zustand/shallow";
|
|
7
|
-
import { g } from "../options-D9wflre6.js";
|
|
8
|
-
import { m } from "../utils-Dv5Z47UQ.js";
|
|
7
|
+
import { g as m } from "../options-D9wflre6.js";
|
|
8
|
+
import { m as g } from "../utils-Dv5Z47UQ.js";
|
|
9
9
|
import { f as u, c as h, b as y, a as d, d as b } from "../styles-dOu_pRNb.js";
|
|
10
10
|
import { Box as n, Skeleton as l } from "@mui/material";
|
|
11
11
|
import "@mui/icons-material";
|
|
12
|
+
import "react-markdown";
|
|
12
13
|
import { d as a, a as s } from "../exports-Cr43OCul.js";
|
|
13
14
|
import "../lasso-tool-CYn3ivf-.js";
|
|
14
15
|
import "../cjs-D9ro6BXv.js";
|
|
15
16
|
import "@dnd-kit/core";
|
|
16
17
|
import "@dnd-kit/sortable";
|
|
17
18
|
import "@dnd-kit/utilities";
|
|
18
|
-
function
|
|
19
|
-
refUI:
|
|
19
|
+
function W({
|
|
20
|
+
refUI: e
|
|
20
21
|
}) {
|
|
21
22
|
return [{
|
|
22
23
|
...a,
|
|
23
|
-
modifier: () => a.modifier(
|
|
24
|
+
modifier: () => a.modifier(e)
|
|
24
25
|
}, {
|
|
25
26
|
...s,
|
|
26
|
-
modifier: async (
|
|
27
|
-
const i = u(
|
|
27
|
+
modifier: async (t) => {
|
|
28
|
+
const i = u(t);
|
|
28
29
|
return s.modifier(i);
|
|
29
30
|
}
|
|
30
31
|
}];
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function q(e) {
|
|
33
34
|
return {
|
|
34
35
|
type: "histogram",
|
|
35
|
-
option: m(
|
|
36
|
+
option: g(m(e), x(e))
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
function x({
|
|
39
|
-
data:
|
|
40
|
-
theme:
|
|
40
|
+
data: e = [],
|
|
41
|
+
theme: t
|
|
41
42
|
}) {
|
|
42
|
-
const i = (
|
|
43
|
+
const i = (e?.length ?? 0) > 1;
|
|
43
44
|
return {
|
|
44
45
|
legend: d(i),
|
|
45
|
-
grid: y(i,
|
|
46
|
+
grid: y(i, t),
|
|
46
47
|
xAxis: {
|
|
47
48
|
type: "category",
|
|
48
49
|
axisLine: {
|
|
49
50
|
show: !1
|
|
50
51
|
},
|
|
51
52
|
axisLabel: {
|
|
52
|
-
fontSize:
|
|
53
|
-
fontFamily:
|
|
53
|
+
fontSize: t.typography.overlineDelicate.fontSize,
|
|
54
|
+
fontFamily: t.typography.overlineDelicate.fontFamily,
|
|
54
55
|
showMinLabel: !0,
|
|
55
56
|
showMaxLabel: !0,
|
|
56
57
|
hideOverlap: !0,
|
|
57
58
|
margin: 0,
|
|
58
|
-
padding: [parseInt(
|
|
59
|
-
color:
|
|
59
|
+
padding: [parseInt(t.spacing(0.5)), parseInt(t.spacing(0.5)), 0, parseInt(t.spacing(0.5))],
|
|
60
|
+
color: t.palette.black[60]
|
|
60
61
|
},
|
|
61
62
|
axisTick: {
|
|
62
63
|
show: !1
|
|
@@ -64,7 +65,7 @@ function x({
|
|
|
64
65
|
splitLine: {
|
|
65
66
|
show: !0,
|
|
66
67
|
lineStyle: {
|
|
67
|
-
color:
|
|
68
|
+
color: t.palette.black[4]
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
},
|
|
@@ -74,9 +75,9 @@ function x({
|
|
|
74
75
|
showMinLabel: !0,
|
|
75
76
|
splitNumber: 1,
|
|
76
77
|
axisLabel: {
|
|
77
|
-
fontSize:
|
|
78
|
-
fontFamily:
|
|
79
|
-
margin: parseInt(
|
|
78
|
+
fontSize: t.typography.overlineDelicate.fontSize,
|
|
79
|
+
fontFamily: t.typography.overlineDelicate.fontFamily,
|
|
80
|
+
margin: parseInt(t.spacing(1)),
|
|
80
81
|
show: !0,
|
|
81
82
|
showMaxLabel: !0,
|
|
82
83
|
showMinLabel: !0,
|
|
@@ -91,14 +92,14 @@ function x({
|
|
|
91
92
|
splitLine: {
|
|
92
93
|
show: !0,
|
|
93
94
|
lineStyle: {
|
|
94
|
-
color:
|
|
95
|
+
color: t.palette.black[4]
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
},
|
|
98
99
|
tooltip: {
|
|
99
|
-
position: h(
|
|
100
|
+
position: h(t)
|
|
100
101
|
},
|
|
101
|
-
series:
|
|
102
|
+
series: e.map((r, p) => ({
|
|
102
103
|
datasetIndex: p,
|
|
103
104
|
type: "bar",
|
|
104
105
|
barGap: "1%",
|
|
@@ -116,20 +117,20 @@ const w = {
|
|
|
116
117
|
graph: b.graph
|
|
117
118
|
}
|
|
118
119
|
};
|
|
119
|
-
function
|
|
120
|
-
const
|
|
121
|
-
let
|
|
122
|
-
|
|
120
|
+
function J() {
|
|
121
|
+
const e = f(2);
|
|
122
|
+
let t;
|
|
123
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ o(n, { sx: {
|
|
123
124
|
display: "flex",
|
|
124
125
|
alignItems: "flex-end",
|
|
125
126
|
justifyContent: "space-between",
|
|
126
127
|
gap: k,
|
|
127
128
|
height: C,
|
|
128
129
|
width: "100%"
|
|
129
|
-
}, children: Array(8).fill(0).map(S) }),
|
|
130
|
+
}, children: Array(8).fill(0).map(S) }), e[0] = t) : t = e[0];
|
|
130
131
|
let i;
|
|
131
|
-
return
|
|
132
|
-
|
|
132
|
+
return e[1] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ c(n, { sx: w.skeleton.graph.container, children: [
|
|
133
|
+
t,
|
|
133
134
|
/* @__PURE__ */ o(n, { sx: {
|
|
134
135
|
display: "flex",
|
|
135
136
|
alignItems: "center",
|
|
@@ -137,39 +138,39 @@ function q() {
|
|
|
137
138
|
width: "100%",
|
|
138
139
|
mt: L
|
|
139
140
|
}, children: Array(4).fill(0).map(_) })
|
|
140
|
-
] }),
|
|
141
|
+
] }), e[1] = i) : i = e[1], i;
|
|
141
142
|
}
|
|
142
|
-
function _(
|
|
143
|
-
return /* @__PURE__ */ o(l, { width: 32, height: 8 },
|
|
143
|
+
function _(e, t) {
|
|
144
|
+
return /* @__PURE__ */ o(l, { width: 32, height: 8 }, t);
|
|
144
145
|
}
|
|
145
|
-
function L(
|
|
146
|
+
function L(e) {
|
|
146
147
|
const {
|
|
147
|
-
spacing:
|
|
148
|
-
} =
|
|
149
|
-
return
|
|
148
|
+
spacing: t
|
|
149
|
+
} = e;
|
|
150
|
+
return t(1);
|
|
150
151
|
}
|
|
151
|
-
function S(
|
|
152
|
-
const r = `${[60, 80, 95, 85, 70, 55, 40, 30][
|
|
152
|
+
function S(e, t) {
|
|
153
|
+
const r = `${[60, 80, 95, 85, 70, 55, 40, 30][t]}%`;
|
|
153
154
|
return /* @__PURE__ */ o(l, { variant: "rectangular", sx: {
|
|
154
155
|
flex: 1,
|
|
155
156
|
height: r
|
|
156
|
-
} },
|
|
157
|
+
} }, t);
|
|
157
158
|
}
|
|
158
|
-
function C(
|
|
159
|
+
function C(e) {
|
|
159
160
|
const {
|
|
160
|
-
spacing:
|
|
161
|
-
} =
|
|
162
|
-
return
|
|
161
|
+
spacing: t
|
|
162
|
+
} = e;
|
|
163
|
+
return t(30);
|
|
163
164
|
}
|
|
164
|
-
function k(
|
|
165
|
+
function k(e) {
|
|
165
166
|
const {
|
|
166
|
-
spacing:
|
|
167
|
-
} =
|
|
168
|
-
return
|
|
167
|
+
spacing: t
|
|
168
|
+
} = e;
|
|
169
|
+
return t(0.5);
|
|
169
170
|
}
|
|
170
171
|
export {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
J as HistogramSkeleton,
|
|
173
|
+
q as histogramConfig,
|
|
174
|
+
W as histogramDownloadConfig
|
|
174
175
|
};
|
|
175
176
|
//# sourceMappingURL=histogram.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"histogram.js","sources":["../../src/widgets/histogram/config.ts","../../src/widgets/histogram/style.ts","../../src/widgets/histogram/skeleton.tsx"],"sourcesContent":["import {\n getCommonOptions,\n mergeEchartWidgetConfig,\n type EchartOptionsProps,\n} from '../echart'\nimport type {\n HistogramConfig,\n HistogramWidgetConfig,\n HistogramWidgetData,\n} from './types'\nimport {\n flattenObjectArrayToCSV,\n buildLegendConfig,\n buildGridConfig,\n createTooltipPositioner,\n} from '../_shared/chart-config'\nimport { downloadToCSV, downloadToPNG, type DownloadItem } from '../actions'\nimport type { ConfigProps } from '../root/types'\n\nexport function histogramDownloadConfig({\n refUI,\n}: ConfigProps): DownloadItem<HistogramWidgetData>[] {\n return [\n {\n ...downloadToPNG,\n modifier: () => downloadToPNG.modifier(refUI),\n },\n {\n ...downloadToCSV,\n modifier: async (data) => {\n const rows = flattenObjectArrayToCSV(data)\n return downloadToCSV.modifier(rows)\n },\n },\n ]\n}\nexport function histogramConfig(props: HistogramConfig): HistogramWidgetConfig {\n return {\n type: 'histogram',\n option: mergeEchartWidgetConfig(getCommonOptions(props), getOption(props)),\n }\n}\nfunction getOption({ data = [], theme }: HistogramConfig): EchartOptionsProps {\n const hasLegend = (data?.length ?? 0) > 1\n return {\n legend: buildLegendConfig(hasLegend),\n grid: buildGridConfig(hasLegend, theme),\n xAxis: {\n type: 'category',\n axisLine: {\n show: false,\n },\n axisLabel: {\n fontSize: theme.typography.overlineDelicate.fontSize,\n fontFamily: theme.typography.overlineDelicate.fontFamily,\n showMinLabel: true,\n showMaxLabel: true,\n hideOverlap: true,\n margin: 0,\n padding: [\n parseInt(theme.spacing(0.5)),\n parseInt(theme.spacing(0.5)),\n 0,\n parseInt(theme.spacing(0.5)),\n ],\n color: theme.palette.black[60],\n },\n axisTick: {\n show: false,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: theme.palette.black[4],\n },\n },\n },\n yAxis: {\n type: 'value',\n showMaxLabel: true,\n showMinLabel: true,\n splitNumber: 1,\n axisLabel: {\n fontSize: theme.typography.overlineDelicate.fontSize,\n fontFamily: theme.typography.overlineDelicate.fontFamily,\n margin: parseInt(theme.spacing(1)),\n show: true,\n showMaxLabel: true,\n showMinLabel: true,\n verticalAlign: 'bottom',\n },\n axisLine: {\n show: false,\n },\n axisTick: {\n show: false,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: theme.palette.black[4],\n },\n },\n },\n tooltip: {\n position: createTooltipPositioner(theme),\n },\n series: data.map((_: unknown, index: number) => ({\n datasetIndex: index,\n type: 'bar',\n barGap: '1%', // No gap between bars in histogram\n barCategoryGap: '1%', // No gap between categories in histogram\n emphasis: {\n focus: 'series',\n },\n })),\n } as EchartOptionsProps\n}\n","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\nexport function HistogramSkeleton() {\n return (\n <Box sx={styles.skeleton.graph.container}>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'flex-end',\n justifyContent: 'space-between',\n gap: ({ spacing }) => spacing(0.5),\n height: ({ spacing }) => spacing(30),\n width: '100%',\n }}\n >\n {Array(8)\n .fill(0)\n .map((_, i) => {\n // Create varying heights for histogram bars\n const heights = [60, 80, 95, 85, 70, 55, 40, 30]\n const height = `${heights[i]}%`\n return (\n <Skeleton\n key={i}\n variant='rectangular'\n sx={{\n flex: 1,\n height,\n }}\n />\n )\n })}\n </Box>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n mt: ({ spacing }) => spacing(1),\n }}\n >\n {Array(4)\n .fill(0)\n .map((_, i) => (\n <Skeleton key={i} width={32} height={8} />\n ))}\n </Box>\n </Box>\n )\n}\n"],"names":["histogramDownloadConfig","refUI","downloadToPNG","modifier","downloadToCSV","data","rows","flattenObjectArrayToCSV","histogramConfig","props","type","option","mergeEchartWidgetConfig","getCommonOptions","getOption","theme","hasLegend","length","legend","buildLegendConfig","grid","buildGridConfig","xAxis","axisLine","show","axisLabel","fontSize","typography","overlineDelicate","fontFamily","showMinLabel","showMaxLabel","hideOverlap","margin","padding","parseInt","spacing","color","palette","black","axisTick","splitLine","lineStyle","yAxis","splitNumber","verticalAlign","tooltip","position","createTooltipPositioner","series","map","_","index","datasetIndex","barGap","barCategoryGap","emphasis","focus","styles","skeleton","graph","baseSkeletonStyles","HistogramSkeleton","$","_c","t0","Symbol","for","jsx","Box","display","alignItems","justifyContent","gap","_temp","height","_temp2","width","Array","fill","_temp3","t1","container","mt","_temp4","_temp5","__0","i_0","Skeleton","spacing_1","i","flex","spacing_0"],"mappings":"
|
|
1
|
+
{"version":3,"file":"histogram.js","sources":["../../src/widgets/histogram/config.ts","../../src/widgets/histogram/style.ts","../../src/widgets/histogram/skeleton.tsx"],"sourcesContent":["import {\n getCommonOptions,\n mergeEchartWidgetConfig,\n type EchartOptionsProps,\n} from '../echart'\nimport type {\n HistogramConfig,\n HistogramWidgetConfig,\n HistogramWidgetData,\n} from './types'\nimport {\n flattenObjectArrayToCSV,\n buildLegendConfig,\n buildGridConfig,\n createTooltipPositioner,\n} from '../_shared/chart-config'\nimport { downloadToCSV, downloadToPNG, type DownloadItem } from '../actions'\nimport type { ConfigProps } from '../root/types'\n\nexport function histogramDownloadConfig({\n refUI,\n}: ConfigProps): DownloadItem<HistogramWidgetData>[] {\n return [\n {\n ...downloadToPNG,\n modifier: () => downloadToPNG.modifier(refUI),\n },\n {\n ...downloadToCSV,\n modifier: async (data) => {\n const rows = flattenObjectArrayToCSV(data)\n return downloadToCSV.modifier(rows)\n },\n },\n ]\n}\nexport function histogramConfig(props: HistogramConfig): HistogramWidgetConfig {\n return {\n type: 'histogram',\n option: mergeEchartWidgetConfig(getCommonOptions(props), getOption(props)),\n }\n}\nfunction getOption({ data = [], theme }: HistogramConfig): EchartOptionsProps {\n const hasLegend = (data?.length ?? 0) > 1\n return {\n legend: buildLegendConfig(hasLegend),\n grid: buildGridConfig(hasLegend, theme),\n xAxis: {\n type: 'category',\n axisLine: {\n show: false,\n },\n axisLabel: {\n fontSize: theme.typography.overlineDelicate.fontSize,\n fontFamily: theme.typography.overlineDelicate.fontFamily,\n showMinLabel: true,\n showMaxLabel: true,\n hideOverlap: true,\n margin: 0,\n padding: [\n parseInt(theme.spacing(0.5)),\n parseInt(theme.spacing(0.5)),\n 0,\n parseInt(theme.spacing(0.5)),\n ],\n color: theme.palette.black[60],\n },\n axisTick: {\n show: false,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: theme.palette.black[4],\n },\n },\n },\n yAxis: {\n type: 'value',\n showMaxLabel: true,\n showMinLabel: true,\n splitNumber: 1,\n axisLabel: {\n fontSize: theme.typography.overlineDelicate.fontSize,\n fontFamily: theme.typography.overlineDelicate.fontFamily,\n margin: parseInt(theme.spacing(1)),\n show: true,\n showMaxLabel: true,\n showMinLabel: true,\n verticalAlign: 'bottom',\n },\n axisLine: {\n show: false,\n },\n axisTick: {\n show: false,\n },\n splitLine: {\n show: true,\n lineStyle: {\n color: theme.palette.black[4],\n },\n },\n },\n tooltip: {\n position: createTooltipPositioner(theme),\n },\n series: data.map((_: unknown, index: number) => ({\n datasetIndex: index,\n type: 'bar',\n barGap: '1%', // No gap between bars in histogram\n barCategoryGap: '1%', // No gap between categories in histogram\n emphasis: {\n focus: 'series',\n },\n })),\n } as EchartOptionsProps\n}\n","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\nexport function HistogramSkeleton() {\n return (\n <Box sx={styles.skeleton.graph.container}>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'flex-end',\n justifyContent: 'space-between',\n gap: ({ spacing }) => spacing(0.5),\n height: ({ spacing }) => spacing(30),\n width: '100%',\n }}\n >\n {Array(8)\n .fill(0)\n .map((_, i) => {\n // Create varying heights for histogram bars\n const heights = [60, 80, 95, 85, 70, 55, 40, 30]\n const height = `${heights[i]}%`\n return (\n <Skeleton\n key={i}\n variant='rectangular'\n sx={{\n flex: 1,\n height,\n }}\n />\n )\n })}\n </Box>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n mt: ({ spacing }) => spacing(1),\n }}\n >\n {Array(4)\n .fill(0)\n .map((_, i) => (\n <Skeleton key={i} width={32} height={8} />\n ))}\n </Box>\n </Box>\n )\n}\n"],"names":["histogramDownloadConfig","refUI","downloadToPNG","modifier","downloadToCSV","data","rows","flattenObjectArrayToCSV","histogramConfig","props","type","option","mergeEchartWidgetConfig","getCommonOptions","getOption","theme","hasLegend","length","legend","buildLegendConfig","grid","buildGridConfig","xAxis","axisLine","show","axisLabel","fontSize","typography","overlineDelicate","fontFamily","showMinLabel","showMaxLabel","hideOverlap","margin","padding","parseInt","spacing","color","palette","black","axisTick","splitLine","lineStyle","yAxis","splitNumber","verticalAlign","tooltip","position","createTooltipPositioner","series","map","_","index","datasetIndex","barGap","barCategoryGap","emphasis","focus","styles","skeleton","graph","baseSkeletonStyles","HistogramSkeleton","$","_c","t0","Symbol","for","jsx","Box","display","alignItems","justifyContent","gap","_temp","height","_temp2","width","Array","fill","_temp3","t1","container","mt","_temp4","_temp5","__0","i_0","Skeleton","spacing_1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AKJ;AACD;AA3BT,SAAAd,EAAAX,GAAA;AASY,QAAA;AAAA,IAAA7B,SAAAwD;AAAAA,EAAAA,IAAA3B;AAAW,SAAK7B,EAAQ,EAAE;AAAC;AATvC,SAAAsC,EAAAT,GAAA;AAQS,QAAA;AAAA,IAAA7B,SAAAA;AAAAA,EAAAA,IAAA6B;AAAW,SAAK7B,EAAQ,GAAG;AAAC;"}
|
package/dist/widgets/markdown.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-Dd7_sWZT.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";
|
package/dist/widgets/no-data.js
CHANGED
package/dist/widgets/note.js
CHANGED
|
@@ -1,124 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as R } from "react/compiler-runtime";
|
|
3
|
-
import { useState as _, useRef as j, useEffectEvent as z, useEffect as M } from "react";
|
|
4
|
-
import { Button as F, Box as W, Link as H, Typography as P } from "@mui/material";
|
|
5
|
-
import U from "react-markdown";
|
|
6
|
-
const L = {
|
|
7
|
-
root: {
|
|
8
|
-
typography: "caption",
|
|
9
|
-
color: (n) => n.palette.text.secondary,
|
|
10
|
-
marginBlockStart: ({
|
|
11
|
-
spacing: n
|
|
12
|
-
}) => n(1)
|
|
13
|
-
},
|
|
14
|
-
clamped: {
|
|
15
|
-
display: "-webkit-box",
|
|
16
|
-
WebkitLineClamp: 3,
|
|
17
|
-
WebkitBoxOrient: "vertical",
|
|
18
|
-
overflow: "hidden"
|
|
19
|
-
},
|
|
20
|
-
expanded: {
|
|
21
|
-
display: "block"
|
|
22
|
-
},
|
|
23
|
-
linkButton: {
|
|
24
|
-
padding: 0,
|
|
25
|
-
minWidth: "auto",
|
|
26
|
-
textTransform: "none",
|
|
27
|
-
typography: "caption",
|
|
28
|
-
fontWeight: 500,
|
|
29
|
-
textDecoration: "none",
|
|
30
|
-
"&:hover": {
|
|
31
|
-
backgroundColor: "transparent"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}, C = {
|
|
35
|
-
showMore: "Show More",
|
|
36
|
-
showLess: "Show Less"
|
|
37
|
-
}, l = (n) => {
|
|
38
|
-
const e = R(2), {
|
|
39
|
-
children: t
|
|
40
|
-
} = n;
|
|
41
|
-
let r;
|
|
42
|
-
return e[0] !== t ? (r = /* @__PURE__ */ p(P, { paragraph: !0, color: "inherit", variant: "caption", children: t }), e[0] = t, e[1] = r) : r = e[1], r;
|
|
43
|
-
}, $ = {
|
|
44
|
-
h1: l,
|
|
45
|
-
h2: l,
|
|
46
|
-
h3: l,
|
|
47
|
-
p: l,
|
|
48
|
-
a: ({
|
|
49
|
-
children: n,
|
|
50
|
-
href: e,
|
|
51
|
-
target: t = "_blank",
|
|
52
|
-
rel: r = "noopener noreferrer"
|
|
53
|
-
}) => /* @__PURE__ */ p(H, { href: e, target: t, rel: r, color: "text.primary", underline: "always", children: n }),
|
|
54
|
-
img: () => null,
|
|
55
|
-
ul: l,
|
|
56
|
-
ol: l,
|
|
57
|
-
li: l
|
|
58
|
-
};
|
|
59
|
-
function Q(n) {
|
|
60
|
-
const e = R(27), {
|
|
61
|
-
children: t,
|
|
62
|
-
labels: r
|
|
63
|
-
} = n, S = r === void 0 ? C : r, [o, A] = _(!1), [E, D] = _(!1), h = j(null);
|
|
64
|
-
let m;
|
|
65
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (m = () => {
|
|
66
|
-
if (h.current) {
|
|
67
|
-
const v = h.current.scrollHeight > h.current.clientHeight;
|
|
68
|
-
D(v);
|
|
69
|
-
}
|
|
70
|
-
}, e[0] = m) : m = e[0];
|
|
71
|
-
const s = z(m);
|
|
72
|
-
let u;
|
|
73
|
-
e[1] !== s ? (u = () => {
|
|
74
|
-
s();
|
|
75
|
-
}, e[1] = s, e[2] = u) : u = e[2];
|
|
76
|
-
let g;
|
|
77
|
-
e[3] !== t ? (g = [t], e[3] = t, e[4] = g) : g = e[4], M(u, g);
|
|
78
|
-
let x;
|
|
79
|
-
e[5] !== s ? (x = () => {
|
|
80
|
-
const v = h.current;
|
|
81
|
-
if (!v)
|
|
82
|
-
return;
|
|
83
|
-
const O = new ResizeObserver(() => {
|
|
84
|
-
s();
|
|
85
|
-
});
|
|
86
|
-
return O.observe(v), () => {
|
|
87
|
-
O.disconnect();
|
|
88
|
-
};
|
|
89
|
-
}, e[5] = s, e[6] = x) : x = e[6];
|
|
90
|
-
let w;
|
|
91
|
-
if (e[7] === Symbol.for("react.memo_cache_sentinel") ? (w = [], e[7] = w) : w = e[7], M(x, w), !t)
|
|
92
|
-
return null;
|
|
93
|
-
let b;
|
|
94
|
-
e[8] !== o ? (b = () => {
|
|
95
|
-
A(!o);
|
|
96
|
-
}, e[8] = o, e[9] = b) : b = e[9];
|
|
97
|
-
const T = b;
|
|
98
|
-
let y;
|
|
99
|
-
e[10] !== S ? (y = {
|
|
100
|
-
...C,
|
|
101
|
-
...S
|
|
102
|
-
}, e[10] = S, e[11] = y) : y = e[11];
|
|
103
|
-
const i = y, B = o ? L.expanded : L.clamped;
|
|
104
|
-
let c;
|
|
105
|
-
e[12] !== B ? (c = {
|
|
106
|
-
...L.root,
|
|
107
|
-
...B
|
|
108
|
-
}, e[12] = B, e[13] = c) : c = e[13];
|
|
109
|
-
let a;
|
|
110
|
-
e[14] !== t ? (a = /* @__PURE__ */ p(U, { components: $, children: t }), e[14] = t, e[15] = a) : a = e[15];
|
|
111
|
-
let f;
|
|
112
|
-
e[16] !== c || e[17] !== a ? (f = /* @__PURE__ */ p(W, { ref: h, sx: c, children: a }), e[16] = c, e[17] = a, e[18] = f) : f = e[18];
|
|
113
|
-
let d;
|
|
114
|
-
e[19] !== T || e[20] !== o || e[21] !== i || e[22] !== E ? (d = (E || o) && /* @__PURE__ */ p(F, { onClick: T, variant: "text", color: "primary", sx: L.linkButton, "aria-expanded": o, "aria-label": o ? i.showLess : i.showMore, "aria-controls": "note-content", children: o ? i.showLess : i.showMore }), e[19] = T, e[20] = o, e[21] = i, e[22] = E, e[23] = d) : d = e[23];
|
|
115
|
-
let k;
|
|
116
|
-
return e[24] !== f || e[25] !== d ? (k = /* @__PURE__ */ N(W, { children: [
|
|
117
|
-
f,
|
|
118
|
-
d
|
|
119
|
-
] }), e[24] = f, e[25] = d, e[26] = k) : k = e[26], k;
|
|
120
|
-
}
|
|
1
|
+
import { W as t } from "../note-Clng2ej6.js";
|
|
121
2
|
export {
|
|
122
|
-
|
|
3
|
+
t as WidgetNote
|
|
123
4
|
};
|
|
124
5
|
//# sourceMappingURL=note.js.map
|
package/dist/widgets/note.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"note.js","sources":[
|
|
1
|
+
{"version":3,"file":"note.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/widgets/pie.js
CHANGED
|
@@ -2,20 +2,21 @@ import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as x } from "react/compiler-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "echarts";
|
|
5
|
-
import "../widget-store-
|
|
5
|
+
import "../widget-store-Dd7_sWZT.js";
|
|
6
6
|
import "zustand/shallow";
|
|
7
7
|
import { g as y } from "../options-D9wflre6.js";
|
|
8
8
|
import { m as _ } from "../utils-Dv5Z47UQ.js";
|
|
9
9
|
import { f as S, b as w, a as I, d as v } from "../styles-dOu_pRNb.js";
|
|
10
10
|
import { Box as l, Skeleton as a } from "@mui/material";
|
|
11
11
|
import "@mui/icons-material";
|
|
12
|
+
import "react-markdown";
|
|
12
13
|
import { d as f, a as g } from "../exports-Cr43OCul.js";
|
|
13
14
|
import "../lasso-tool-CYn3ivf-.js";
|
|
14
15
|
import "../cjs-D9ro6BXv.js";
|
|
15
16
|
import "@dnd-kit/core";
|
|
16
17
|
import "@dnd-kit/sortable";
|
|
17
18
|
import "@dnd-kit/utilities";
|
|
18
|
-
function
|
|
19
|
+
function Y({
|
|
19
20
|
refUI: e
|
|
20
21
|
}) {
|
|
21
22
|
return [{
|
|
@@ -29,7 +30,7 @@ function X({
|
|
|
29
30
|
}
|
|
30
31
|
}];
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function ee(e) {
|
|
33
34
|
return {
|
|
34
35
|
type: "pie",
|
|
35
36
|
option: _(y(e), C(e))
|
|
@@ -132,7 +133,7 @@ const j = {
|
|
|
132
133
|
graph: v.graph
|
|
133
134
|
}
|
|
134
135
|
}, h = 32, m = 294 - h, u = m - h;
|
|
135
|
-
function
|
|
136
|
+
function te() {
|
|
136
137
|
const e = x(5);
|
|
137
138
|
let t, o;
|
|
138
139
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
|
|
@@ -209,8 +210,8 @@ function T(e) {
|
|
|
209
210
|
return t(1);
|
|
210
211
|
}
|
|
211
212
|
export {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
te as PieSkeleton,
|
|
214
|
+
ee as pieConfig,
|
|
215
|
+
Y as pieDownloadConfig
|
|
215
216
|
};
|
|
216
217
|
//# sourceMappingURL=pie.js.map
|