@hkyhy/marsun-components-core 0.1.33 → 0.1.35
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/AgentHub/Report/Detail/ReportMetaStrip/index.d.ts +19 -0
- package/dist/components/AgentHub/Report/Detail/ReportMetaStrip/index.js +46 -0
- package/dist/components/AgentHub/Report/Detail/ReportMetaStrip/index.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportMetaStrip/style.module.scss.js +12 -0
- package/dist/components/AgentHub/Report/Detail/ReportMetaStrip/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportTemplate/index.d.ts +18 -0
- package/dist/components/AgentHub/Report/Detail/ReportTemplate/index.js +98 -0
- package/dist/components/AgentHub/Report/Detail/ReportTemplate/index.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/ReportTemplate/style.module.scss.js +14 -0
- package/dist/components/AgentHub/Report/Detail/ReportTemplate/style.module.scss.js.map +1 -0
- package/dist/components/AgentHub/Report/Detail/index.d.ts +4 -0
- package/dist/components/AgentHub/Report/index.d.ts +1 -0
- package/dist/components/Icons/index.d.ts +2 -1
- package/dist/components/Icons/index.js +158 -155
- package/dist/components/Icons/index.js.map +1 -1
- package/dist/components/InteractiveBlock/InteractiveBlock.d.ts +3 -0
- package/dist/components/InteractiveBlock/InteractiveBlock.js +49 -46
- package/dist/components/InteractiveBlock/InteractiveBlock.js.map +1 -1
- package/dist/components/InteractiveBlock/index.d.ts +1 -1
- package/dist/components/InteractiveBlock/style.module.scss.js +14 -13
- package/dist/components/InteractiveBlock/style.module.scss.js.map +1 -1
- package/dist/components/Modal/Modal/index.d.ts +6 -0
- package/dist/components/Modal/Modal/index.js +120 -0
- package/dist/components/Modal/Modal/index.js.map +1 -0
- package/dist/components/Modal/Modal/style.module.scss.js +17 -0
- package/dist/components/Modal/Modal/style.module.scss.js.map +1 -0
- package/dist/components/Modal/ModalTypes.d.ts +26 -0
- package/dist/components/Modal/StepModal/index.js +43 -41
- package/dist/components/Modal/StepModal/index.js.map +1 -1
- package/dist/components/Modal/index.d.ts +3 -0
- package/dist/components/Modal/utils/resolveModalSize.d.ts +22 -0
- package/dist/components/Modal/utils/resolveModalSize.js +28 -0
- package/dist/components/Modal/utils/resolveModalSize.js.map +1 -0
- package/dist/components/Table/ColumnConfigPanel.js +164 -137
- package/dist/components/Table/ColumnConfigPanel.js.map +1 -1
- package/dist/components/Table/Table.d.ts +26 -6
- package/dist/components/Table/Table.js +313 -100
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/columnConfig.module.scss.js +32 -28
- package/dist/components/Table/columnConfig.module.scss.js.map +1 -1
- package/dist/components/Table/columnConfigUtils.d.ts +8 -1
- package/dist/components/Table/columnConfigUtils.js +114 -84
- package/dist/components/Table/columnConfigUtils.js.map +1 -1
- package/dist/components/Table/index.d.ts +2 -2
- package/dist/components/Table/style.module.scss.js +16 -3
- package/dist/components/Table/style.module.scss.js.map +1 -1
- package/dist/components/Table/tablePrefsTypes.d.ts +12 -0
- package/dist/components/Table/tablePrefsTypes.js +7 -0
- package/dist/components/Table/tablePrefsTypes.js.map +1 -0
- package/dist/components/Table/tablePrefsUtils.d.ts +11 -0
- package/dist/components/Table/tablePrefsUtils.js +66 -0
- package/dist/components/Table/tablePrefsUtils.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +405 -382
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +1 -1
- package/dist/styles/global.css +1 -1
- package/package.json +1 -1
|
@@ -1,56 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ChevronLeft as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import { useMemo as
|
|
1
|
+
import { jsxs as n, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft as I } from "../../Icons/index.js";
|
|
3
|
+
import { Modal as W, Steps as z, Button as c } from "antd";
|
|
4
|
+
import { useMemo as F, useCallback as k } from "react";
|
|
5
|
+
import { resolveModalWidth as L } from "../utils/resolveModalSize.js";
|
|
5
6
|
import f from "./style.module.scss.js";
|
|
6
|
-
import
|
|
7
|
-
const y = (
|
|
8
|
-
if (
|
|
9
|
-
return typeof
|
|
10
|
-
},
|
|
11
|
-
title:
|
|
12
|
-
steps:
|
|
13
|
-
current:
|
|
14
|
-
open:
|
|
7
|
+
import e from "classnames";
|
|
8
|
+
const y = (t) => {
|
|
9
|
+
if (t !== void 0)
|
|
10
|
+
return typeof t == "function" ? t() : t;
|
|
11
|
+
}, K = ({
|
|
12
|
+
title: t,
|
|
13
|
+
steps: i,
|
|
14
|
+
current: a,
|
|
15
|
+
open: v,
|
|
15
16
|
onCancel: s,
|
|
16
|
-
width:
|
|
17
|
+
width: x = 600,
|
|
17
18
|
showSteps: u = !0,
|
|
18
|
-
maskClosable:
|
|
19
|
-
className:
|
|
19
|
+
maskClosable: w = !1,
|
|
20
|
+
className: N,
|
|
20
21
|
onStepChange: l
|
|
21
22
|
}) => {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
}, [
|
|
23
|
+
const r = F(() => i.findIndex((m) => m.key === a), [i, a]), o = i[r], E = k(() => {
|
|
24
|
+
r > 0 && (l == null || l(i[r - 1].key));
|
|
25
|
+
}, [r, i, l]), M = k(async () => {
|
|
25
26
|
if (!(o != null && o.beforeEnter)) {
|
|
26
|
-
|
|
27
|
+
r < i.length - 1 && (l == null || l(i[r + 1].key));
|
|
27
28
|
return;
|
|
28
29
|
}
|
|
29
|
-
await o.beforeEnter() &&
|
|
30
|
-
}, [o,
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
await o.beforeEnter() && r < i.length - 1 && (l == null || l(i[r + 1].key));
|
|
31
|
+
}, [o, r, i, l]), b = t ?? (o == null ? void 0 : o.title) ?? "", B = () => (o == null ? void 0 : o.footer) !== void 0 ? y(o.footer) : /* @__PURE__ */ n("div", { className: e("step-modal-root", f["step-modal-root"]), children: [
|
|
32
|
+
r > 0 && (o == null ? void 0 : o.allowBack) !== !1 && /* @__PURE__ */ d(c, { icon: /* @__PURE__ */ d(I, {}), onClick: E, children: "上一步" }),
|
|
33
|
+
/* @__PURE__ */ d("div", { className: e("step-modal-container", f["step-modal-container"]) }),
|
|
34
|
+
/* @__PURE__ */ d(c, { onClick: s, children: "取消" }),
|
|
35
|
+
r < i.length - 1 && /* @__PURE__ */ d(c, { type: "primary", onClick: M, children: "下一步" })
|
|
36
|
+
] }), j = L({ width: x });
|
|
37
|
+
return /* @__PURE__ */ n(
|
|
38
|
+
W,
|
|
33
39
|
{
|
|
34
|
-
title:
|
|
35
|
-
open:
|
|
40
|
+
title: b,
|
|
41
|
+
open: v,
|
|
36
42
|
onCancel: s,
|
|
37
|
-
width:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
i < r.length - 1 && /* @__PURE__ */ d(c, { type: "primary", onClick: b, children: "下一步" })
|
|
43
|
-
] }),
|
|
44
|
-
maskClosable: v,
|
|
45
|
-
className: w,
|
|
43
|
+
width: j,
|
|
44
|
+
centered: !0,
|
|
45
|
+
footer: B(),
|
|
46
|
+
maskClosable: w,
|
|
47
|
+
className: N,
|
|
46
48
|
children: [
|
|
47
|
-
u &&
|
|
48
|
-
|
|
49
|
+
u && i.length > 1 && /* @__PURE__ */ d(
|
|
50
|
+
z,
|
|
49
51
|
{
|
|
50
|
-
current:
|
|
52
|
+
current: r,
|
|
51
53
|
size: "small",
|
|
52
|
-
className:
|
|
53
|
-
items:
|
|
54
|
+
className: e("step-modal-wrapper", f["step-modal-wrapper"]),
|
|
55
|
+
items: i.map((m) => ({ title: m.title, description: m.description }))
|
|
54
56
|
}
|
|
55
57
|
),
|
|
56
58
|
y(o == null ? void 0 : o.content)
|
|
@@ -59,6 +61,6 @@ const y = (m) => {
|
|
|
59
61
|
);
|
|
60
62
|
};
|
|
61
63
|
export {
|
|
62
|
-
|
|
64
|
+
K as default
|
|
63
65
|
};
|
|
64
66
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/Modal/StepModal/index.tsx"],"sourcesContent":["import { ChevronLeft } from '@/components/Icons';\nimport { Button, Modal, Steps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport type { StepModalProps } from '../StepModalTypes';\nimport styles from './style.module.scss';\nimport classNames from 'classnames';\n\n/** 解析可能是函数的 content / footer */\nconst resolve = (val: React.ReactNode | (() => React.ReactNode) | undefined) => {\n if (val === undefined) return undefined;\n return typeof val === 'function' ? val() : val;\n};\n\n/**\n * 步骤式弹窗\n *\n * 将多步骤流程封装在同一个 Modal 中,自动管理步骤导航、标题切换和底部按钮。\n *\n * 用法:\n * ```tsx\n * const [current, setCurrent] = useState('select');\n * <StepModal\n * open={open}\n * current={current}\n * onCancel={onCancel}\n * steps={[\n * { key: 'select', title: '选择文件', content: <SelectStep /> },\n * { key: 'uploading', title: '上传文件', content: <UploadingStep /> },\n * { key: 'result', title: '上传结果', content: <ResultStep /> },\n * ]}\n * onStepChange={setCurrent}\n * />\n * ```\n */\nconst StepModal: React.FC<StepModalProps> = ({\n title,\n steps,\n current,\n open,\n onCancel,\n width = 600,\n showSteps = true,\n maskClosable = false,\n className,\n onStepChange,\n}) => {\n const currentIndex = useMemo(() => steps.findIndex((s) => s.key === current), [steps, current]);\n const currentStep = steps[currentIndex];\n\n const goBack = useCallback(() => {\n if (currentIndex > 0) {\n onStepChange?.(steps[currentIndex - 1]!.key);\n }\n }, [currentIndex, steps, onStepChange]);\n\n const goNext = useCallback(async () => {\n if (!currentStep?.beforeEnter) {\n if (currentIndex < steps.length - 1) {\n onStepChange?.(steps[currentIndex + 1]!.key);\n }\n return;\n }\n const canEnter = await currentStep.beforeEnter();\n if (canEnter && currentIndex < steps.length - 1) {\n onStepChange?.(steps[currentIndex + 1]!.key);\n }\n }, [currentStep, currentIndex, steps, onStepChange]);\n\n // 自动从标题推导\n const modalTitle = title ?? currentStep?.title ?? '';\n\n // 底部按钮:优先使用步骤自定义 footer,否则自动渲染\"取消/上一步/下一步\"\n const renderFooter = () => {\n if (currentStep?.footer !== undefined) return resolve(currentStep.footer);\n\n return (\n <div className={classNames('step-modal-root', styles['step-modal-root'])}>\n {currentIndex > 0 && currentStep?.allowBack !== false && (\n <Button icon={<ChevronLeft />} onClick={goBack}>\n 上一步\n </Button>\n )}\n <div className={classNames('step-modal-container', styles['step-modal-container'])} />\n <Button onClick={onCancel}>取消</Button>\n {currentIndex < steps.length - 1 && (\n <Button type=\"primary\" onClick={goNext}>\n 下一步\n </Button>\n )}\n </div>\n );\n };\n\n return (\n <Modal\n title={modalTitle}\n open={open}\n onCancel={onCancel}\n width={
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Modal/StepModal/index.tsx"],"sourcesContent":["import { ChevronLeft } from '@/components/Icons';\nimport { Button, Modal, Steps } from 'antd';\nimport React, { useCallback, useMemo } from 'react';\nimport type { StepModalProps } from '../StepModalTypes';\nimport { resolveModalWidth } from '../utils/resolveModalSize';\nimport styles from './style.module.scss';\nimport classNames from 'classnames';\n\n/** 解析可能是函数的 content / footer */\nconst resolve = (val: React.ReactNode | (() => React.ReactNode) | undefined) => {\n if (val === undefined) return undefined;\n return typeof val === 'function' ? val() : val;\n};\n\n/**\n * 步骤式弹窗\n *\n * 将多步骤流程封装在同一个 Modal 中,自动管理步骤导航、标题切换和底部按钮。\n *\n * 用法:\n * ```tsx\n * const [current, setCurrent] = useState('select');\n * <StepModal\n * open={open}\n * current={current}\n * onCancel={onCancel}\n * steps={[\n * { key: 'select', title: '选择文件', content: <SelectStep /> },\n * { key: 'uploading', title: '上传文件', content: <UploadingStep /> },\n * { key: 'result', title: '上传结果', content: <ResultStep /> },\n * ]}\n * onStepChange={setCurrent}\n * />\n * ```\n */\nconst StepModal: React.FC<StepModalProps> = ({\n title,\n steps,\n current,\n open,\n onCancel,\n width = 600,\n showSteps = true,\n maskClosable = false,\n className,\n onStepChange,\n}) => {\n const currentIndex = useMemo(() => steps.findIndex((s) => s.key === current), [steps, current]);\n const currentStep = steps[currentIndex];\n\n const goBack = useCallback(() => {\n if (currentIndex > 0) {\n onStepChange?.(steps[currentIndex - 1]!.key);\n }\n }, [currentIndex, steps, onStepChange]);\n\n const goNext = useCallback(async () => {\n if (!currentStep?.beforeEnter) {\n if (currentIndex < steps.length - 1) {\n onStepChange?.(steps[currentIndex + 1]!.key);\n }\n return;\n }\n const canEnter = await currentStep.beforeEnter();\n if (canEnter && currentIndex < steps.length - 1) {\n onStepChange?.(steps[currentIndex + 1]!.key);\n }\n }, [currentStep, currentIndex, steps, onStepChange]);\n\n // 自动从标题推导\n const modalTitle = title ?? currentStep?.title ?? '';\n\n // 底部按钮:优先使用步骤自定义 footer,否则自动渲染\"取消/上一步/下一步\"\n const renderFooter = () => {\n if (currentStep?.footer !== undefined) return resolve(currentStep.footer);\n\n return (\n <div className={classNames('step-modal-root', styles['step-modal-root'])}>\n {currentIndex > 0 && currentStep?.allowBack !== false && (\n <Button icon={<ChevronLeft />} onClick={goBack}>\n 上一步\n </Button>\n )}\n <div className={classNames('step-modal-container', styles['step-modal-container'])} />\n <Button onClick={onCancel}>取消</Button>\n {currentIndex < steps.length - 1 && (\n <Button type=\"primary\" onClick={goNext}>\n 下一步\n </Button>\n )}\n </div>\n );\n };\n\n const effectiveWidth = resolveModalWidth({ width });\n\n return (\n <Modal\n title={modalTitle}\n open={open}\n onCancel={onCancel}\n width={effectiveWidth}\n centered\n footer={renderFooter()}\n maskClosable={maskClosable}\n className={className}\n >\n {showSteps && steps.length > 1 && (\n <Steps\n current={currentIndex}\n size=\"small\"\n className={classNames('step-modal-wrapper', styles['step-modal-wrapper'])}\n items={steps.map((s) => ({ title: s.title, description: s.description }))}\n />\n )}\n {resolve(currentStep?.content)}\n </Modal>\n );\n};\n\nexport default StepModal;\n"],"names":["resolve","val","StepModal","title","steps","current","open","onCancel","width","showSteps","maskClosable","className","onStepChange","currentIndex","useMemo","s","currentStep","goBack","useCallback","goNext","modalTitle","renderFooter","jsxs","classNames","styles","jsx","Button","ChevronLeft","effectiveWidth","resolveModalWidth","Modal","Steps"],"mappings":";;;;;;;AASA,MAAMA,IAAU,CAACC,MAA+D;AAC9E,MAAIA,MAAQ;AACZ,WAAO,OAAOA,KAAQ,aAAaA,EAAA,IAAQA;AAC7C,GAuBMC,IAAsC,CAAC;AAAA,EAC3C,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC,IAAY;AAAA,EACZ,cAAAC,IAAe;AAAA,EACf,WAAAC;AAAA,EACA,cAAAC;AACF,MAAM;AACJ,QAAMC,IAAeC,EAAQ,MAAMV,EAAM,UAAU,CAACW,MAAMA,EAAE,QAAQV,CAAO,GAAG,CAACD,GAAOC,CAAO,CAAC,GACxFW,IAAcZ,EAAMS,CAAY,GAEhCI,IAASC,EAAY,MAAM;AAC/B,IAAIL,IAAe,MACjBD,KAAA,QAAAA,EAAeR,EAAMS,IAAe,CAAC,EAAG;AAAA,EAE5C,GAAG,CAACA,GAAcT,GAAOQ,CAAY,CAAC,GAEhCO,IAASD,EAAY,YAAY;AACrC,QAAI,EAACF,KAAA,QAAAA,EAAa,cAAa;AAC7B,MAAIH,IAAeT,EAAM,SAAS,MAChCQ,KAAA,QAAAA,EAAeR,EAAMS,IAAe,CAAC,EAAG;AAE1C;AAAA,IACF;AAEA,IADiB,MAAMG,EAAY,YAAA,KACnBH,IAAeT,EAAM,SAAS,MAC5CQ,KAAA,QAAAA,EAAeR,EAAMS,IAAe,CAAC,EAAG;AAAA,EAE5C,GAAG,CAACG,GAAaH,GAAcT,GAAOQ,CAAY,CAAC,GAG7CQ,IAAajB,MAASa,KAAA,gBAAAA,EAAa,UAAS,IAG5CK,IAAe,OACfL,KAAA,gBAAAA,EAAa,YAAW,SAAkBhB,EAAQgB,EAAY,MAAM,IAGtE,gBAAAM,EAAC,SAAI,WAAWC,EAAW,mBAAmBC,EAAO,iBAAiB,CAAC,GACpE,UAAA;AAAA,IAAAX,IAAe,MAAKG,KAAA,gBAAAA,EAAa,eAAc,MAC9C,gBAAAS,EAACC,GAAA,EAAO,MAAM,gBAAAD,EAACE,GAAA,CAAA,CAAY,GAAI,SAASV,GAAQ,UAAA,OAEhD;AAAA,IAEF,gBAAAQ,EAAC,SAAI,WAAWF,EAAW,wBAAwBC,EAAO,sBAAsB,CAAC,GAAG;AAAA,IACpF,gBAAAC,EAACC,GAAA,EAAO,SAASnB,GAAU,UAAA,MAAE;AAAA,IAC5BM,IAAeT,EAAM,SAAS,KAC7B,gBAAAqB,EAACC,KAAO,MAAK,WAAU,SAASP,GAAQ,UAAA,MAAA,CAExC;AAAA,EAAA,GAEJ,GAIES,IAAiBC,EAAkB,EAAE,OAAArB,GAAO;AAElD,SACE,gBAAAc;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,OAAOV;AAAA,MACP,MAAAd;AAAA,MACA,UAAAC;AAAA,MACA,OAAOqB;AAAA,MACP,UAAQ;AAAA,MACR,QAAQP,EAAA;AAAA,MACR,cAAAX;AAAA,MACA,WAAAC;AAAA,MAEC,UAAA;AAAA,QAAAF,KAAaL,EAAM,SAAS,KAC3B,gBAAAqB;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,SAASlB;AAAA,YACT,MAAK;AAAA,YACL,WAAWU,EAAW,sBAAsBC,EAAO,oBAAoB,CAAC;AAAA,YACxE,OAAOpB,EAAM,IAAI,CAACW,OAAO,EAAE,OAAOA,EAAE,OAAO,aAAaA,EAAE,YAAA,EAAc;AAAA,UAAA;AAAA,QAAA;AAAA,QAG3Ef,EAAQgB,KAAA,gBAAAA,EAAa,OAAO;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGnC;"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
export { default as Modal } from './Modal';
|
|
2
|
+
export type { MarsunModalProps } from './ModalTypes';
|
|
1
3
|
export { default as StepModal } from './StepModal';
|
|
2
4
|
export type { StepItem, StepModalProps } from './StepModalTypes';
|
|
5
|
+
export { MODAL_SIZE_BODY_HEIGHT, MODAL_SIZE_WIDTH, resolveModalSizeAnchor, resolveModalWidth, type ModalSize, type ResolveModalWidthOptions, } from './utils/resolveModalSize';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ModalSize = 'S' | 'M' | 'L';
|
|
2
|
+
export declare const MODAL_SIZE_WIDTH: Record<ModalSize, number>;
|
|
3
|
+
/** 固定 body 可视高度(外壳不随内容无限长高) */
|
|
4
|
+
export declare const MODAL_SIZE_BODY_HEIGHT: Record<ModalSize, string>;
|
|
5
|
+
export type ResolveModalWidthOptions = {
|
|
6
|
+
size?: ModalSize;
|
|
7
|
+
width?: number;
|
|
8
|
+
/** 未传时读 window.innerWidth;SSR 默认 1200 */
|
|
9
|
+
viewportWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 解析 Modal 有效宽度:只可缩小不可放大。
|
|
13
|
+
* - 有 width / size:以之为锚点,再与 viewport-64 取 min
|
|
14
|
+
* - 皆无:按视口自动选 S→M→L,再 cap
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveModalWidth(options?: ResolveModalWidthOptions): number;
|
|
17
|
+
/** 解析用于高度锚点的 size(与宽度锚点一致,不受 cap 影响) */
|
|
18
|
+
export declare function resolveModalSizeAnchor(options: {
|
|
19
|
+
size?: ModalSize;
|
|
20
|
+
width?: number;
|
|
21
|
+
viewportWidth?: number;
|
|
22
|
+
}): ModalSize;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const r = {
|
|
2
|
+
S: 480,
|
|
3
|
+
M: 720,
|
|
4
|
+
L: 960
|
|
5
|
+
}, w = {
|
|
6
|
+
S: "min(420px, 60vh)",
|
|
7
|
+
M: "min(560px, 70vh)",
|
|
8
|
+
L: "min(720px, 80vh)"
|
|
9
|
+
}, d = 64;
|
|
10
|
+
function f(e = {}) {
|
|
11
|
+
const i = e.viewportWidth ?? (typeof window < "u" ? window.innerWidth : 1200), t = Math.max(280, i - d);
|
|
12
|
+
let n;
|
|
13
|
+
return e.width != null && Number.isFinite(e.width) ? n = e.width : e.size ? n = r[e.size] : i < 768 ? n = r.S : i < 1200 ? n = r.M : n = r.L, Math.min(n, t);
|
|
14
|
+
}
|
|
15
|
+
function h(e) {
|
|
16
|
+
if (e.size) return e.size;
|
|
17
|
+
if (e.width != null)
|
|
18
|
+
return e.width <= r.S ? "S" : e.width <= r.M ? "M" : "L";
|
|
19
|
+
const i = e.viewportWidth ?? (typeof window < "u" ? window.innerWidth : 1200);
|
|
20
|
+
return i < 768 ? "S" : i < 1200 ? "M" : "L";
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
w as MODAL_SIZE_BODY_HEIGHT,
|
|
24
|
+
r as MODAL_SIZE_WIDTH,
|
|
25
|
+
h as resolveModalSizeAnchor,
|
|
26
|
+
f as resolveModalWidth
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=resolveModalSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveModalSize.js","sources":["../../../../src/components/Modal/utils/resolveModalSize.ts"],"sourcesContent":["export type ModalSize = 'S' | 'M' | 'L';\n\nexport const MODAL_SIZE_WIDTH: Record<ModalSize, number> = {\n S: 480,\n M: 720,\n L: 960,\n};\n\n/** 固定 body 可视高度(外壳不随内容无限长高) */\nexport const MODAL_SIZE_BODY_HEIGHT: Record<ModalSize, string> = {\n S: 'min(420px, 60vh)',\n M: 'min(560px, 70vh)',\n L: 'min(720px, 80vh)',\n};\n\nconst VIEWPORT_GUTTER = 64;\n\nexport type ResolveModalWidthOptions = {\n size?: ModalSize;\n width?: number;\n /** 未传时读 window.innerWidth;SSR 默认 1200 */\n viewportWidth?: number;\n};\n\n/**\n * 解析 Modal 有效宽度:只可缩小不可放大。\n * - 有 width / size:以之为锚点,再与 viewport-64 取 min\n * - 皆无:按视口自动选 S→M→L,再 cap\n */\nexport function resolveModalWidth(options: ResolveModalWidthOptions = {}): number {\n const vw = options.viewportWidth ?? (typeof window !== 'undefined' ? window.innerWidth : 1200);\n const cap = Math.max(280, vw - VIEWPORT_GUTTER);\n\n let preferred: number;\n if (options.width != null && Number.isFinite(options.width)) {\n preferred = options.width;\n } else if (options.size) {\n preferred = MODAL_SIZE_WIDTH[options.size];\n } else if (vw < 768) {\n preferred = MODAL_SIZE_WIDTH.S;\n } else if (vw < 1200) {\n preferred = MODAL_SIZE_WIDTH.M;\n } else {\n preferred = MODAL_SIZE_WIDTH.L;\n }\n\n return Math.min(preferred, cap);\n}\n\n/** 解析用于高度锚点的 size(与宽度锚点一致,不受 cap 影响) */\nexport function resolveModalSizeAnchor(options: {\n size?: ModalSize;\n width?: number;\n viewportWidth?: number;\n}): ModalSize {\n if (options.size) return options.size;\n if (options.width != null) {\n if (options.width <= MODAL_SIZE_WIDTH.S) return 'S';\n if (options.width <= MODAL_SIZE_WIDTH.M) return 'M';\n return 'L';\n }\n const vw = options.viewportWidth ?? (typeof window !== 'undefined' ? window.innerWidth : 1200);\n if (vw < 768) return 'S';\n if (vw < 1200) return 'M';\n return 'L';\n}\n"],"names":["MODAL_SIZE_WIDTH","MODAL_SIZE_BODY_HEIGHT","VIEWPORT_GUTTER","resolveModalWidth","options","vw","cap","preferred","resolveModalSizeAnchor"],"mappings":"AAEO,MAAMA,IAA8C;AAAA,EACzD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL,GAGaC,IAAoD;AAAA,EAC/D,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL,GAEMC,IAAkB;AAcjB,SAASC,EAAkBC,IAAoC,IAAY;AAChF,QAAMC,IAAKD,EAAQ,kBAAkB,OAAO,SAAW,MAAc,OAAO,aAAa,OACnFE,IAAM,KAAK,IAAI,KAAKD,IAAKH,CAAe;AAE9C,MAAIK;AACJ,SAAIH,EAAQ,SAAS,QAAQ,OAAO,SAASA,EAAQ,KAAK,IACxDG,IAAYH,EAAQ,QACXA,EAAQ,OACjBG,IAAYP,EAAiBI,EAAQ,IAAI,IAChCC,IAAK,MACdE,IAAYP,EAAiB,IACpBK,IAAK,OACdE,IAAYP,EAAiB,IAE7BO,IAAYP,EAAiB,GAGxB,KAAK,IAAIO,GAAWD,CAAG;AAChC;AAGO,SAASE,EAAuBJ,GAIzB;AACZ,MAAIA,EAAQ,KAAM,QAAOA,EAAQ;AACjC,MAAIA,EAAQ,SAAS;AACnB,WAAIA,EAAQ,SAASJ,EAAiB,IAAU,MAC5CI,EAAQ,SAASJ,EAAiB,IAAU,MACzC;AAET,QAAMK,IAAKD,EAAQ,kBAAkB,OAAO,SAAW,MAAc,OAAO,aAAa;AACzF,SAAIC,IAAK,MAAY,MACjBA,IAAK,OAAa,MACf;AACT;"}
|
|
@@ -1,178 +1,203 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Popover as
|
|
4
|
-
import { Settings as
|
|
5
|
-
import { mergePanelWithConfig as
|
|
6
|
-
import
|
|
7
|
-
function
|
|
1
|
+
import { jsx as l, jsxs as S, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useCallback as x, useMemo as j } from "react";
|
|
3
|
+
import { Popover as W, Tooltip as J, Collapse as Q, Input as R, Space as X, Button as V, Empty as A, Checkbox as Y } from "antd";
|
|
4
|
+
import { Settings as Z, Undo2 as $, ChevronDown as q, ChevronRight as ee } from "../Icons/index.js";
|
|
5
|
+
import { mergePanelWithConfig as ne, splitVisibleHidden as re, panelItemsToConfig as le } from "./columnConfigUtils.js";
|
|
6
|
+
import o from "./columnConfig.module.scss.js";
|
|
7
|
+
function F(t, n) {
|
|
8
8
|
if (!n) return !0;
|
|
9
|
-
const
|
|
9
|
+
const a = n.toLowerCase();
|
|
10
10
|
return t.some(
|
|
11
|
-
(e) => e.label.toLowerCase().includes(
|
|
11
|
+
(e) => e.label.toLowerCase().includes(a) || e.id.toLowerCase().includes(a) || (e.children ? F(e.children, n) : !1)
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
const [
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
|
|
14
|
+
const E = ({ items: t, search: n, onChange: a, onToggle: e, depth: h = 0, collapsedIds: d, onToggleCollapse: u }) => {
|
|
15
|
+
const [g, k] = w(null), T = !!n.trim(), z = j(() => n.trim() ? t.map((r, c) => ({ it: r, i: c })).filter(({ it: r }) => F([r], n.trim())) : t.map((r, c) => ({ it: r, i: c })), [t, n]), H = (r, c) => {
|
|
16
|
+
k(c), r.dataTransfer.effectAllowed = "move", r.dataTransfer.setData("text/plain", String(c));
|
|
17
|
+
}, B = (r, c) => {
|
|
18
|
+
r.preventDefault();
|
|
19
|
+
const m = g ?? Number(r.dataTransfer.getData("text/plain"));
|
|
20
|
+
if (k(null), !Number.isFinite(m) || m === c) return;
|
|
21
|
+
const p = [...t], [y] = p.splice(m, 1);
|
|
22
|
+
y && (p.splice(c, 0, y), a(p));
|
|
23
23
|
};
|
|
24
|
-
return
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
return z.length ? /* @__PURE__ */ l("ul", { className: o.list, style: { paddingLeft: h ? 12 : 0 }, children: z.map(({ it: r, i: c }) => {
|
|
25
|
+
var y;
|
|
26
|
+
const m = !!((y = r.children) != null && y.length), p = T || !d.has(r.id);
|
|
27
|
+
return /* @__PURE__ */ S("li", { className: o.listItem, children: [
|
|
28
|
+
/* @__PURE__ */ S(
|
|
28
29
|
"div",
|
|
29
30
|
{
|
|
30
|
-
className:
|
|
31
|
-
draggable: !
|
|
32
|
-
onDragStart: (i) =>
|
|
31
|
+
className: o.row,
|
|
32
|
+
draggable: !T,
|
|
33
|
+
onDragStart: (i) => H(i, c),
|
|
33
34
|
onDragOver: (i) => i.preventDefault(),
|
|
34
|
-
onDrop: (i) =>
|
|
35
|
+
onDrop: (i) => B(i, c),
|
|
35
36
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
37
|
+
m ? /* @__PURE__ */ l(
|
|
38
|
+
"button",
|
|
39
|
+
{
|
|
40
|
+
type: "button",
|
|
41
|
+
className: o.foldBtn,
|
|
42
|
+
"aria-label": p ? "折叠" : "展开",
|
|
43
|
+
"aria-expanded": p,
|
|
44
|
+
onClick: (i) => {
|
|
45
|
+
i.stopPropagation(), u(r.id);
|
|
46
|
+
},
|
|
47
|
+
children: p ? /* @__PURE__ */ l(q, { size: 14 }) : /* @__PURE__ */ l(ee, { size: 14 })
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ l("span", { className: o.foldSpacer, "aria-hidden": !0 }),
|
|
50
|
+
/* @__PURE__ */ l("span", { className: o.grip, "aria-hidden": !0, children: "⠿" }),
|
|
51
|
+
/* @__PURE__ */ l(Y, { checked: !r.hidden, onChange: (i) => e(r.id, !i.target.checked), children: /* @__PURE__ */ l("span", { className: o.label, children: r.label || r.id }) })
|
|
38
52
|
]
|
|
39
53
|
}
|
|
40
54
|
),
|
|
41
|
-
|
|
42
|
-
|
|
55
|
+
m && p ? /* @__PURE__ */ l(
|
|
56
|
+
E,
|
|
43
57
|
{
|
|
44
|
-
items:
|
|
58
|
+
items: r.children,
|
|
45
59
|
search: n,
|
|
46
|
-
depth:
|
|
60
|
+
depth: h + 1,
|
|
61
|
+
collapsedIds: d,
|
|
62
|
+
onToggleCollapse: u,
|
|
47
63
|
onChange: (i) => {
|
|
48
|
-
const
|
|
49
|
-
|
|
64
|
+
const b = t.map(
|
|
65
|
+
(N) => N.id === r.id ? { ...N, children: i } : N
|
|
66
|
+
);
|
|
67
|
+
a(b);
|
|
50
68
|
},
|
|
51
|
-
onToggle: (i,
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
const
|
|
55
|
-
(f) => f.id === i ? { ...f, hidden:
|
|
69
|
+
onToggle: (i, b) => {
|
|
70
|
+
const N = t.map((v) => {
|
|
71
|
+
if (v.id !== r.id || !v.children) return v;
|
|
72
|
+
const L = v.children.map(
|
|
73
|
+
(f) => f.id === i ? { ...f, hidden: b } : f.children ? {
|
|
56
74
|
...f,
|
|
57
|
-
children:
|
|
75
|
+
children: O(f.children, i, b)
|
|
58
76
|
} : f
|
|
59
|
-
),
|
|
60
|
-
return { ...
|
|
77
|
+
), P = L.every((f) => f.hidden);
|
|
78
|
+
return { ...v, children: L, hidden: P ? !0 : b ? v.hidden : !1 };
|
|
61
79
|
});
|
|
62
|
-
|
|
80
|
+
a(N);
|
|
63
81
|
}
|
|
64
82
|
}
|
|
65
83
|
) : null
|
|
66
|
-
] },
|
|
67
|
-
}) }) : /* @__PURE__ */
|
|
84
|
+
] }, r.id);
|
|
85
|
+
}) }) : /* @__PURE__ */ l(A, { image: A.PRESENTED_IMAGE_SIMPLE, description: "暂无数据" });
|
|
68
86
|
};
|
|
69
|
-
function
|
|
87
|
+
function O(t, n, a) {
|
|
70
88
|
return t.map((e) => {
|
|
71
|
-
if (e.id === n) return { ...e, hidden:
|
|
89
|
+
if (e.id === n) return { ...e, hidden: a };
|
|
72
90
|
if (e.children) {
|
|
73
|
-
const
|
|
91
|
+
const h = O(e.children, n, a);
|
|
74
92
|
return {
|
|
75
93
|
...e,
|
|
76
|
-
children:
|
|
77
|
-
hidden:
|
|
94
|
+
children: h,
|
|
95
|
+
hidden: h.every((d) => d.hidden) ? !0 : e.hidden && a
|
|
78
96
|
};
|
|
79
97
|
}
|
|
80
98
|
return e;
|
|
81
99
|
});
|
|
82
100
|
}
|
|
83
|
-
function
|
|
101
|
+
function _(t, n, a) {
|
|
84
102
|
return t.map((e) => {
|
|
85
|
-
var
|
|
103
|
+
var h;
|
|
86
104
|
if (e.id === n) {
|
|
87
|
-
const
|
|
88
|
-
return { ...e, hidden:
|
|
105
|
+
const d = (h = e.children) == null ? void 0 : h.map((u) => G(u, a));
|
|
106
|
+
return { ...e, hidden: a, children: d };
|
|
89
107
|
}
|
|
90
108
|
if (e.children) {
|
|
91
|
-
const
|
|
109
|
+
const d = _(e.children, n, a), u = d.every((g) => g.hidden);
|
|
92
110
|
return {
|
|
93
111
|
...e,
|
|
94
|
-
children:
|
|
95
|
-
hidden: u ? !0 : !
|
|
112
|
+
children: d,
|
|
113
|
+
hidden: u ? !0 : !a && e.id !== n ? !1 : e.hidden
|
|
96
114
|
};
|
|
97
115
|
}
|
|
98
116
|
return e;
|
|
99
117
|
});
|
|
100
118
|
}
|
|
101
|
-
function
|
|
102
|
-
var
|
|
119
|
+
function G(t, n) {
|
|
120
|
+
var a;
|
|
103
121
|
return {
|
|
104
122
|
...t,
|
|
105
123
|
hidden: n,
|
|
106
|
-
children: (
|
|
124
|
+
children: (a = t.children) == null ? void 0 : a.map((e) => G(e, n))
|
|
107
125
|
};
|
|
108
126
|
}
|
|
109
|
-
function
|
|
127
|
+
function M(t, n) {
|
|
110
128
|
return [...t, ...n];
|
|
111
129
|
}
|
|
112
|
-
const
|
|
130
|
+
const ae = ({
|
|
113
131
|
open: t,
|
|
114
132
|
onOpenChange: n,
|
|
115
|
-
defaultItems:
|
|
133
|
+
defaultItems: a,
|
|
116
134
|
savedConfig: e,
|
|
117
|
-
onConfirm:
|
|
118
|
-
children:
|
|
135
|
+
onConfirm: h,
|
|
136
|
+
children: d
|
|
119
137
|
}) => {
|
|
120
|
-
const [u,
|
|
121
|
-
|
|
122
|
-
}, [
|
|
123
|
-
|
|
124
|
-
}, { visible:
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
m(
|
|
132
|
-
|
|
133
|
-
return
|
|
134
|
-
})
|
|
135
|
-
},
|
|
136
|
-
|
|
138
|
+
const [u, g] = w([]), [k, T] = w(""), [z, H] = w(""), [B, r] = w(!1), [c, m] = w(() => /* @__PURE__ */ new Set()), p = x(() => {
|
|
139
|
+
g(ne(a, e)), T(""), H(""), m(/* @__PURE__ */ new Set());
|
|
140
|
+
}, [a, e]), y = (s) => {
|
|
141
|
+
s && p(), n(s);
|
|
142
|
+
}, { visible: i, hidden: b } = j(() => re(u), [u]), N = (s) => {
|
|
143
|
+
g(M(s, b));
|
|
144
|
+
}, v = (s) => {
|
|
145
|
+
g(M(i, s));
|
|
146
|
+
}, L = (s, D) => {
|
|
147
|
+
g((C) => _(C, s, D));
|
|
148
|
+
}, P = x((s) => {
|
|
149
|
+
m((D) => {
|
|
150
|
+
const C = new Set(D);
|
|
151
|
+
return C.has(s) ? C.delete(s) : C.add(s), C;
|
|
152
|
+
});
|
|
153
|
+
}, []), f = () => {
|
|
154
|
+
g(a.map((s) => {
|
|
155
|
+
var D;
|
|
156
|
+
return { ...s, children: (D = s.children) == null ? void 0 : D.map((C) => ({ ...C })) };
|
|
157
|
+
})), m(/* @__PURE__ */ new Set());
|
|
158
|
+
}, K = async () => {
|
|
159
|
+
r(!0);
|
|
137
160
|
try {
|
|
138
|
-
await
|
|
161
|
+
await h(le(u)), n(!1);
|
|
139
162
|
} finally {
|
|
140
|
-
|
|
163
|
+
r(!1);
|
|
141
164
|
}
|
|
142
|
-
},
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
/* @__PURE__ */
|
|
165
|
+
}, U = /* @__PURE__ */ S("div", { className: o.panel, "data-ui": "table-column-config", children: [
|
|
166
|
+
/* @__PURE__ */ S("div", { className: o.header, children: [
|
|
167
|
+
/* @__PURE__ */ l("span", { className: o.title, children: "编辑表格" }),
|
|
168
|
+
/* @__PURE__ */ l(J, { title: "恢复默认", children: /* @__PURE__ */ l("button", { type: "button", className: o.resetBtn, onClick: f, "aria-label": "恢复默认", children: /* @__PURE__ */ l($, { size: 16 }) }) })
|
|
146
169
|
] }),
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
|
|
170
|
+
/* @__PURE__ */ l(
|
|
171
|
+
Q,
|
|
149
172
|
{
|
|
150
|
-
className:
|
|
173
|
+
className: o.collapse,
|
|
151
174
|
defaultActiveKey: ["visible", "hidden"],
|
|
152
175
|
ghost: !0,
|
|
153
176
|
items: [
|
|
154
177
|
{
|
|
155
178
|
key: "visible",
|
|
156
179
|
label: "显示的信息",
|
|
157
|
-
children: /* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
159
|
-
|
|
180
|
+
children: /* @__PURE__ */ S(I, { children: [
|
|
181
|
+
/* @__PURE__ */ l(
|
|
182
|
+
R,
|
|
160
183
|
{
|
|
161
184
|
allowClear: !0,
|
|
162
185
|
size: "small",
|
|
163
|
-
className:
|
|
186
|
+
className: o.search,
|
|
164
187
|
placeholder: "搜索",
|
|
165
|
-
value:
|
|
166
|
-
onChange: (
|
|
188
|
+
value: k,
|
|
189
|
+
onChange: (s) => T(s.target.value)
|
|
167
190
|
}
|
|
168
191
|
),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
|
|
192
|
+
/* @__PURE__ */ l(
|
|
193
|
+
E,
|
|
171
194
|
{
|
|
172
|
-
items:
|
|
173
|
-
search:
|
|
174
|
-
onChange:
|
|
175
|
-
onToggle:
|
|
195
|
+
items: i,
|
|
196
|
+
search: k,
|
|
197
|
+
onChange: N,
|
|
198
|
+
onToggle: L,
|
|
199
|
+
collapsedIds: c,
|
|
200
|
+
onToggleCollapse: P
|
|
176
201
|
}
|
|
177
202
|
)
|
|
178
203
|
] })
|
|
@@ -180,25 +205,27 @@ const q = ({
|
|
|
180
205
|
{
|
|
181
206
|
key: "hidden",
|
|
182
207
|
label: "隐藏的信息",
|
|
183
|
-
children: /* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
|
|
208
|
+
children: /* @__PURE__ */ S(I, { children: [
|
|
209
|
+
/* @__PURE__ */ l(
|
|
210
|
+
R,
|
|
186
211
|
{
|
|
187
212
|
allowClear: !0,
|
|
188
213
|
size: "small",
|
|
189
|
-
className:
|
|
214
|
+
className: o.search,
|
|
190
215
|
placeholder: "搜索",
|
|
191
|
-
value:
|
|
192
|
-
onChange: (
|
|
216
|
+
value: z,
|
|
217
|
+
onChange: (s) => H(s.target.value)
|
|
193
218
|
}
|
|
194
219
|
),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
|
|
220
|
+
/* @__PURE__ */ l(
|
|
221
|
+
E,
|
|
197
222
|
{
|
|
198
|
-
items:
|
|
199
|
-
search:
|
|
200
|
-
onChange:
|
|
201
|
-
onToggle:
|
|
223
|
+
items: b,
|
|
224
|
+
search: z,
|
|
225
|
+
onChange: v,
|
|
226
|
+
onToggle: L,
|
|
227
|
+
collapsedIds: c,
|
|
228
|
+
onToggleCollapse: P
|
|
202
229
|
}
|
|
203
230
|
)
|
|
204
231
|
] })
|
|
@@ -206,55 +233,55 @@ const q = ({
|
|
|
206
233
|
]
|
|
207
234
|
}
|
|
208
235
|
),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ l("div", { className: o.footer, children: /* @__PURE__ */ S(X, { children: [
|
|
237
|
+
/* @__PURE__ */ l(V, { size: "small", onClick: () => n(!1), children: "取消" }),
|
|
238
|
+
/* @__PURE__ */ l(V, { type: "primary", size: "small", loading: B, onClick: () => void K(), children: "确定" })
|
|
212
239
|
] }) })
|
|
213
240
|
] });
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
|
|
241
|
+
return /* @__PURE__ */ l(
|
|
242
|
+
W,
|
|
216
243
|
{
|
|
217
244
|
trigger: "click",
|
|
218
245
|
placement: "bottomRight",
|
|
219
246
|
open: t,
|
|
220
|
-
onOpenChange:
|
|
221
|
-
content:
|
|
222
|
-
overlayClassName:
|
|
247
|
+
onOpenChange: y,
|
|
248
|
+
content: U,
|
|
249
|
+
overlayClassName: o.overlay,
|
|
223
250
|
arrow: !1,
|
|
224
|
-
children:
|
|
251
|
+
children: d
|
|
225
252
|
}
|
|
226
253
|
);
|
|
227
254
|
};
|
|
228
|
-
function
|
|
255
|
+
function he({
|
|
229
256
|
open: t,
|
|
230
257
|
onOpenChange: n,
|
|
231
|
-
defaultItems:
|
|
258
|
+
defaultItems: a,
|
|
232
259
|
savedConfig: e,
|
|
233
|
-
onConfirm:
|
|
260
|
+
onConfirm: h
|
|
234
261
|
}) {
|
|
235
|
-
return /* @__PURE__ */
|
|
236
|
-
|
|
262
|
+
return /* @__PURE__ */ l(
|
|
263
|
+
ae,
|
|
237
264
|
{
|
|
238
265
|
open: t,
|
|
239
266
|
onOpenChange: n,
|
|
240
|
-
defaultItems:
|
|
267
|
+
defaultItems: a,
|
|
241
268
|
savedConfig: e,
|
|
242
|
-
onConfirm:
|
|
243
|
-
children: /* @__PURE__ */
|
|
269
|
+
onConfirm: h,
|
|
270
|
+
children: /* @__PURE__ */ l(
|
|
244
271
|
"button",
|
|
245
272
|
{
|
|
246
273
|
type: "button",
|
|
247
|
-
className:
|
|
274
|
+
className: o.gearBtn,
|
|
248
275
|
"aria-label": "编辑表格",
|
|
249
|
-
onClick: (
|
|
250
|
-
children: /* @__PURE__ */
|
|
276
|
+
onClick: (d) => d.stopPropagation(),
|
|
277
|
+
children: /* @__PURE__ */ l(Z, { size: 14 })
|
|
251
278
|
}
|
|
252
279
|
)
|
|
253
280
|
}
|
|
254
281
|
);
|
|
255
282
|
}
|
|
256
283
|
export {
|
|
257
|
-
|
|
258
|
-
|
|
284
|
+
ae as ColumnConfigPopover,
|
|
285
|
+
he as ColumnConfigTrigger
|
|
259
286
|
};
|
|
260
287
|
//# sourceMappingURL=ColumnConfigPanel.js.map
|