@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.
Files changed (58) hide show
  1. package/dist/components/AgentHub/Report/Detail/ReportMetaStrip/index.d.ts +19 -0
  2. package/dist/components/AgentHub/Report/Detail/ReportMetaStrip/index.js +46 -0
  3. package/dist/components/AgentHub/Report/Detail/ReportMetaStrip/index.js.map +1 -0
  4. package/dist/components/AgentHub/Report/Detail/ReportMetaStrip/style.module.scss.js +12 -0
  5. package/dist/components/AgentHub/Report/Detail/ReportMetaStrip/style.module.scss.js.map +1 -0
  6. package/dist/components/AgentHub/Report/Detail/ReportTemplate/index.d.ts +18 -0
  7. package/dist/components/AgentHub/Report/Detail/ReportTemplate/index.js +98 -0
  8. package/dist/components/AgentHub/Report/Detail/ReportTemplate/index.js.map +1 -0
  9. package/dist/components/AgentHub/Report/Detail/ReportTemplate/style.module.scss.js +14 -0
  10. package/dist/components/AgentHub/Report/Detail/ReportTemplate/style.module.scss.js.map +1 -0
  11. package/dist/components/AgentHub/Report/Detail/index.d.ts +4 -0
  12. package/dist/components/AgentHub/Report/index.d.ts +1 -0
  13. package/dist/components/Icons/index.d.ts +2 -1
  14. package/dist/components/Icons/index.js +158 -155
  15. package/dist/components/Icons/index.js.map +1 -1
  16. package/dist/components/InteractiveBlock/InteractiveBlock.d.ts +3 -0
  17. package/dist/components/InteractiveBlock/InteractiveBlock.js +49 -46
  18. package/dist/components/InteractiveBlock/InteractiveBlock.js.map +1 -1
  19. package/dist/components/InteractiveBlock/index.d.ts +1 -1
  20. package/dist/components/InteractiveBlock/style.module.scss.js +14 -13
  21. package/dist/components/InteractiveBlock/style.module.scss.js.map +1 -1
  22. package/dist/components/Modal/Modal/index.d.ts +6 -0
  23. package/dist/components/Modal/Modal/index.js +120 -0
  24. package/dist/components/Modal/Modal/index.js.map +1 -0
  25. package/dist/components/Modal/Modal/style.module.scss.js +17 -0
  26. package/dist/components/Modal/Modal/style.module.scss.js.map +1 -0
  27. package/dist/components/Modal/ModalTypes.d.ts +26 -0
  28. package/dist/components/Modal/StepModal/index.js +43 -41
  29. package/dist/components/Modal/StepModal/index.js.map +1 -1
  30. package/dist/components/Modal/index.d.ts +3 -0
  31. package/dist/components/Modal/utils/resolveModalSize.d.ts +22 -0
  32. package/dist/components/Modal/utils/resolveModalSize.js +28 -0
  33. package/dist/components/Modal/utils/resolveModalSize.js.map +1 -0
  34. package/dist/components/Table/ColumnConfigPanel.js +164 -137
  35. package/dist/components/Table/ColumnConfigPanel.js.map +1 -1
  36. package/dist/components/Table/Table.d.ts +26 -6
  37. package/dist/components/Table/Table.js +313 -100
  38. package/dist/components/Table/Table.js.map +1 -1
  39. package/dist/components/Table/columnConfig.module.scss.js +32 -28
  40. package/dist/components/Table/columnConfig.module.scss.js.map +1 -1
  41. package/dist/components/Table/columnConfigUtils.d.ts +8 -1
  42. package/dist/components/Table/columnConfigUtils.js +114 -84
  43. package/dist/components/Table/columnConfigUtils.js.map +1 -1
  44. package/dist/components/Table/index.d.ts +2 -2
  45. package/dist/components/Table/style.module.scss.js +16 -3
  46. package/dist/components/Table/style.module.scss.js.map +1 -1
  47. package/dist/components/Table/tablePrefsTypes.d.ts +12 -0
  48. package/dist/components/Table/tablePrefsTypes.js +7 -0
  49. package/dist/components/Table/tablePrefsTypes.js.map +1 -0
  50. package/dist/components/Table/tablePrefsUtils.d.ts +11 -0
  51. package/dist/components/Table/tablePrefsUtils.js +66 -0
  52. package/dist/components/Table/tablePrefsUtils.js.map +1 -0
  53. package/dist/index.d.ts +1 -0
  54. package/dist/index.js +405 -382
  55. package/dist/index.js.map +1 -1
  56. package/dist/marsun-components-core.css +1 -1
  57. package/dist/styles/global.css +1 -1
  58. package/package.json +1 -1
@@ -1,56 +1,58 @@
1
- import { jsxs as k, jsx as d } from "react/jsx-runtime";
2
- import { ChevronLeft as M } from "../../Icons/index.js";
3
- import { Modal as j, Steps as F, Button as c } from "antd";
4
- import { useMemo as I, useCallback as n } from "react";
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 a from "classnames";
7
- const y = (m) => {
8
- if (m !== void 0)
9
- return typeof m == "function" ? m() : m;
10
- }, H = ({
11
- title: m,
12
- steps: r,
13
- current: e,
14
- open: x,
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: N = 600,
17
+ width: x = 600,
17
18
  showSteps: u = !0,
18
- maskClosable: v = !1,
19
- className: w,
19
+ maskClosable: w = !1,
20
+ className: N,
20
21
  onStepChange: l
21
22
  }) => {
22
- const i = I(() => r.findIndex((t) => t.key === e), [r, e]), o = r[i], E = n(() => {
23
- i > 0 && (l == null || l(r[i - 1].key));
24
- }, [i, r, l]), b = n(async () => {
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
- i < r.length - 1 && (l == null || l(r[i + 1].key));
27
+ r < i.length - 1 && (l == null || l(i[r + 1].key));
27
28
  return;
28
29
  }
29
- await o.beforeEnter() && i < r.length - 1 && (l == null || l(r[i + 1].key));
30
- }, [o, i, r, l]), B = m ?? (o == null ? void 0 : o.title) ?? "";
31
- return /* @__PURE__ */ k(
32
- j,
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: B,
35
- open: x,
40
+ title: b,
41
+ open: v,
36
42
  onCancel: s,
37
- width: N,
38
- footer: (o == null ? void 0 : o.footer) !== void 0 ? y(o.footer) : /* @__PURE__ */ k("div", { className: a("step-modal-root", f["step-modal-root"]), children: [
39
- i > 0 && (o == null ? void 0 : o.allowBack) !== !1 && /* @__PURE__ */ d(c, { icon: /* @__PURE__ */ d(M, {}), onClick: E, children: "上一步" }),
40
- /* @__PURE__ */ d("div", { className: a("step-modal-container", f["step-modal-container"]) }),
41
- /* @__PURE__ */ d(c, { onClick: s, children: "取消" }),
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 && r.length > 1 && /* @__PURE__ */ d(
48
- F,
49
+ u && i.length > 1 && /* @__PURE__ */ d(
50
+ z,
49
51
  {
50
- current: i,
52
+ current: r,
51
53
  size: "small",
52
- className: a("step-modal-wrapper", f["step-modal-wrapper"]),
53
- items: r.map((t) => ({ title: t.title, description: t.description }))
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
- H as default
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={width}\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","jsxs","Modal","classNames","styles","jsx","Button","ChevronLeft","Steps"],"mappings":";;;;;;AAQA,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;AAwBlD,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOF;AAAA,MACP,MAAAd;AAAA,MACA,UAAAC;AAAA,MACA,OAAAC;AAAA,MACA,SA1BEQ,KAAA,gBAAAA,EAAa,YAAW,SAAkBhB,EAAQgB,EAAY,MAAM,IAGtE,gBAAAK,EAAC,SAAI,WAAWE,EAAW,mBAAmBC,EAAO,iBAAiB,CAAC,GACpE,UAAA;AAAA,QAAAX,IAAe,MAAKG,KAAA,gBAAAA,EAAa,eAAc,MAC9C,gBAAAS,EAACC,GAAA,EAAO,MAAM,gBAAAD,EAACE,GAAA,CAAA,CAAY,GAAI,SAASV,GAAQ,UAAA,OAEhD;AAAA,QAEF,gBAAAQ,EAAC,SAAI,WAAWF,EAAW,wBAAwBC,EAAO,sBAAsB,CAAC,GAAG;AAAA,QACpF,gBAAAC,EAACC,GAAA,EAAO,SAASnB,GAAU,UAAA,MAAE;AAAA,QAC5BM,IAAeT,EAAM,SAAS,KAC7B,gBAAAqB,EAACC,KAAO,MAAK,WAAU,SAASP,GAAQ,UAAA,MAAA,CAExC;AAAA,MAAA,GAEJ;AAAA,MAWA,cAAAT;AAAA,MACA,WAAAC;AAAA,MAEC,UAAA;AAAA,QAAAF,KAAaL,EAAM,SAAS,KAC3B,gBAAAqB;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAASf;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
+ {"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 a, jsxs as C, Fragment as z } from "react/jsx-runtime";
2
- import { useState as N, useCallback as x, useMemo as A } from "react";
3
- import { Popover as G, Tooltip as K, Collapse as U, Input as E, Space as W, Button as P, Empty as I, Checkbox as J } from "antd";
4
- import { Settings as Q, Undo2 as X } from "../Icons/index.js";
5
- import { mergePanelWithConfig as Y, splitVisibleHidden as Z, panelItemsToConfig as $ } from "./columnConfigUtils.js";
6
- import c from "./columnConfig.module.scss.js";
7
- function B(t, n) {
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 r = n.toLowerCase();
9
+ const a = n.toLowerCase();
10
10
  return t.some(
11
- (e) => e.label.toLowerCase().includes(r) || e.id.toLowerCase().includes(r) || (e.children ? B(e.children, n) : !1)
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 L = ({ items: t, search: n, onChange: r, onToggle: e, depth: d = 0 }) => {
15
- const [h, u] = N(null), m = A(() => n.trim() ? t.map((l, s) => ({ it: l, i: s })).filter(({ it: l }) => B([l], n.trim())) : t.map((l, s) => ({ it: l, i: s })), [t, n]), D = (l, s) => {
16
- u(s), l.dataTransfer.effectAllowed = "move", l.dataTransfer.setData("text/plain", String(s));
17
- }, S = (l, s) => {
18
- l.preventDefault();
19
- const v = h ?? Number(l.dataTransfer.getData("text/plain"));
20
- if (u(null), !Number.isFinite(v) || v === s) return;
21
- const i = [...t], [p] = i.splice(v, 1);
22
- p && (i.splice(s, 0, p), r(i));
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 m.length ? /* @__PURE__ */ a("ul", { className: c.list, style: { paddingLeft: d ? 12 : 0 }, children: m.map(({ it: l, i: s }) => {
25
- var v;
26
- return /* @__PURE__ */ C("li", { className: c.listItem, children: [
27
- /* @__PURE__ */ C(
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: c.row,
31
- draggable: !n.trim(),
32
- onDragStart: (i) => D(i, s),
31
+ className: o.row,
32
+ draggable: !T,
33
+ onDragStart: (i) => H(i, c),
33
34
  onDragOver: (i) => i.preventDefault(),
34
- onDrop: (i) => S(i, s),
35
+ onDrop: (i) => B(i, c),
35
36
  children: [
36
- /* @__PURE__ */ a("span", { className: c.grip, "aria-hidden": !0, children: "⠿" }),
37
- /* @__PURE__ */ a(J, { checked: !l.hidden, onChange: (i) => e(l.id, !i.target.checked), children: /* @__PURE__ */ a("span", { className: c.label, children: l.label || l.id }) })
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
- (v = l.children) != null && v.length ? /* @__PURE__ */ a(
42
- L,
55
+ m && p ? /* @__PURE__ */ l(
56
+ E,
43
57
  {
44
- items: l.children,
58
+ items: r.children,
45
59
  search: n,
46
- depth: d + 1,
60
+ depth: h + 1,
61
+ collapsedIds: d,
62
+ onToggleCollapse: u,
47
63
  onChange: (i) => {
48
- const p = t.map((b) => b.id === l.id ? { ...b, children: i } : b);
49
- r(p);
64
+ const b = t.map(
65
+ (N) => N.id === r.id ? { ...N, children: i } : N
66
+ );
67
+ a(b);
50
68
  },
51
- onToggle: (i, p) => {
52
- const b = t.map((g) => {
53
- if (g.id !== l.id || !g.children) return g;
54
- const y = g.children.map(
55
- (f) => f.id === i ? { ...f, hidden: p } : f.children ? {
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: M(f.children, i, p)
75
+ children: O(f.children, i, b)
58
76
  } : f
59
- ), w = y.every((f) => f.hidden);
60
- return { ...g, children: y, hidden: w ? !0 : p ? g.hidden : !1 };
77
+ ), P = L.every((f) => f.hidden);
78
+ return { ...v, children: L, hidden: P ? !0 : b ? v.hidden : !1 };
61
79
  });
62
- r(b);
80
+ a(N);
63
81
  }
64
82
  }
65
83
  ) : null
66
- ] }, l.id);
67
- }) }) : /* @__PURE__ */ a(I, { image: I.PRESENTED_IMAGE_SIMPLE, description: "暂无数据" });
84
+ ] }, r.id);
85
+ }) }) : /* @__PURE__ */ l(A, { image: A.PRESENTED_IMAGE_SIMPLE, description: "暂无数据" });
68
86
  };
69
- function M(t, n, r) {
87
+ function O(t, n, a) {
70
88
  return t.map((e) => {
71
- if (e.id === n) return { ...e, hidden: r };
89
+ if (e.id === n) return { ...e, hidden: a };
72
90
  if (e.children) {
73
- const d = M(e.children, n, r);
91
+ const h = O(e.children, n, a);
74
92
  return {
75
93
  ...e,
76
- children: d,
77
- hidden: d.every((h) => h.hidden) ? !0 : e.hidden && r
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 R(t, n, r) {
101
+ function _(t, n, a) {
84
102
  return t.map((e) => {
85
- var d;
103
+ var h;
86
104
  if (e.id === n) {
87
- const h = (d = e.children) == null ? void 0 : d.map((u) => j(u, r));
88
- return { ...e, hidden: r, children: h };
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 h = R(e.children, n, r), u = h.every((m) => m.hidden);
109
+ const d = _(e.children, n, a), u = d.every((g) => g.hidden);
92
110
  return {
93
111
  ...e,
94
- children: h,
95
- hidden: u ? !0 : !r && e.id !== n ? !1 : e.hidden
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 j(t, n) {
102
- var r;
119
+ function G(t, n) {
120
+ var a;
103
121
  return {
104
122
  ...t,
105
123
  hidden: n,
106
- children: (r = t.children) == null ? void 0 : r.map((e) => j(e, n))
124
+ children: (a = t.children) == null ? void 0 : a.map((e) => G(e, n))
107
125
  };
108
126
  }
109
- function V(t, n) {
127
+ function M(t, n) {
110
128
  return [...t, ...n];
111
129
  }
112
- const q = ({
130
+ const ae = ({
113
131
  open: t,
114
132
  onOpenChange: n,
115
- defaultItems: r,
133
+ defaultItems: a,
116
134
  savedConfig: e,
117
- onConfirm: d,
118
- children: h
135
+ onConfirm: h,
136
+ children: d
119
137
  }) => {
120
- const [u, m] = N([]), [D, S] = N(""), [l, s] = N(""), [v, i] = N(!1), p = x(() => {
121
- m(Y(r, e)), S(""), s("");
122
- }, [r, e]), b = (o) => {
123
- o && p(), n(o);
124
- }, { visible: g, hidden: y } = A(() => Z(u), [u]), w = (o) => {
125
- m(V(o, y));
126
- }, f = (o) => {
127
- m(V(g, o));
128
- }, H = (o, k) => {
129
- m((T) => R(T, o, k));
130
- }, F = () => {
131
- m(r.map((o) => {
132
- var k;
133
- return { ...o, children: (k = o.children) == null ? void 0 : k.map((T) => ({ ...T })) };
134
- }));
135
- }, O = async () => {
136
- i(!0);
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 d($(u)), n(!1);
161
+ await h(le(u)), n(!1);
139
162
  } finally {
140
- i(!1);
163
+ r(!1);
141
164
  }
142
- }, _ = /* @__PURE__ */ C("div", { className: c.panel, "data-ui": "table-column-config", children: [
143
- /* @__PURE__ */ C("div", { className: c.header, children: [
144
- /* @__PURE__ */ a("span", { className: c.title, children: "编辑表格" }),
145
- /* @__PURE__ */ a(K, { title: "恢复默认", children: /* @__PURE__ */ a("button", { type: "button", className: c.resetBtn, onClick: F, "aria-label": "恢复默认", children: /* @__PURE__ */ a(X, { size: 16 }) }) })
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__ */ a(
148
- U,
170
+ /* @__PURE__ */ l(
171
+ Q,
149
172
  {
150
- className: c.collapse,
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__ */ C(z, { children: [
158
- /* @__PURE__ */ a(
159
- E,
180
+ children: /* @__PURE__ */ S(I, { children: [
181
+ /* @__PURE__ */ l(
182
+ R,
160
183
  {
161
184
  allowClear: !0,
162
185
  size: "small",
163
- className: c.search,
186
+ className: o.search,
164
187
  placeholder: "搜索",
165
- value: D,
166
- onChange: (o) => S(o.target.value)
188
+ value: k,
189
+ onChange: (s) => T(s.target.value)
167
190
  }
168
191
  ),
169
- /* @__PURE__ */ a(
170
- L,
192
+ /* @__PURE__ */ l(
193
+ E,
171
194
  {
172
- items: g,
173
- search: D,
174
- onChange: w,
175
- onToggle: H
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__ */ C(z, { children: [
184
- /* @__PURE__ */ a(
185
- E,
208
+ children: /* @__PURE__ */ S(I, { children: [
209
+ /* @__PURE__ */ l(
210
+ R,
186
211
  {
187
212
  allowClear: !0,
188
213
  size: "small",
189
- className: c.search,
214
+ className: o.search,
190
215
  placeholder: "搜索",
191
- value: l,
192
- onChange: (o) => s(o.target.value)
216
+ value: z,
217
+ onChange: (s) => H(s.target.value)
193
218
  }
194
219
  ),
195
- /* @__PURE__ */ a(
196
- L,
220
+ /* @__PURE__ */ l(
221
+ E,
197
222
  {
198
- items: y,
199
- search: l,
200
- onChange: f,
201
- onToggle: H
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__ */ a("div", { className: c.footer, children: /* @__PURE__ */ C(W, { children: [
210
- /* @__PURE__ */ a(P, { size: "small", onClick: () => n(!1), children: "取消" }),
211
- /* @__PURE__ */ a(P, { type: "primary", size: "small", loading: v, onClick: () => void O(), children: "确定" })
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__ */ a(
215
- G,
241
+ return /* @__PURE__ */ l(
242
+ W,
216
243
  {
217
244
  trigger: "click",
218
245
  placement: "bottomRight",
219
246
  open: t,
220
- onOpenChange: b,
221
- content: _,
222
- overlayClassName: c.overlay,
247
+ onOpenChange: y,
248
+ content: U,
249
+ overlayClassName: o.overlay,
223
250
  arrow: !1,
224
- children: h
251
+ children: d
225
252
  }
226
253
  );
227
254
  };
228
- function ie({
255
+ function he({
229
256
  open: t,
230
257
  onOpenChange: n,
231
- defaultItems: r,
258
+ defaultItems: a,
232
259
  savedConfig: e,
233
- onConfirm: d
260
+ onConfirm: h
234
261
  }) {
235
- return /* @__PURE__ */ a(
236
- q,
262
+ return /* @__PURE__ */ l(
263
+ ae,
237
264
  {
238
265
  open: t,
239
266
  onOpenChange: n,
240
- defaultItems: r,
267
+ defaultItems: a,
241
268
  savedConfig: e,
242
- onConfirm: d,
243
- children: /* @__PURE__ */ a(
269
+ onConfirm: h,
270
+ children: /* @__PURE__ */ l(
244
271
  "button",
245
272
  {
246
273
  type: "button",
247
- className: c.gearBtn,
274
+ className: o.gearBtn,
248
275
  "aria-label": "编辑表格",
249
- onClick: (h) => h.stopPropagation(),
250
- children: /* @__PURE__ */ a(Q, { size: 14 })
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
- q as ColumnConfigPopover,
258
- ie as ColumnConfigTrigger
284
+ ae as ColumnConfigPopover,
285
+ he as ColumnConfigTrigger
259
286
  };
260
287
  //# sourceMappingURL=ColumnConfigPanel.js.map