@sia.soul/sia-react-ui 0.1.148 → 0.1.149

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/index.js CHANGED
@@ -82,7 +82,7 @@ import {
82
82
  Watermark,
83
83
  message,
84
84
  notification
85
- } from "./chunk-TH7BNDV4.js";
85
+ } from "./chunk-G5YXOCSY.js";
86
86
  import "./chunk-RX242MUO.js";
87
87
  import {
88
88
  MarkdownEditor
@@ -90,12 +90,12 @@ import {
90
90
  import {
91
91
  RichTextContent,
92
92
  RichTextEditor
93
- } from "./chunk-W4HDN7MD.js";
93
+ } from "./chunk-VRUTRTLY.js";
94
94
  import {
95
95
  DatePicker,
96
96
  SelectDateRange,
97
97
  TimePanel
98
- } from "./chunk-QLS2IXU4.js";
98
+ } from "./chunk-TKRCHZB7.js";
99
99
  import {
100
100
  Checkbox,
101
101
  OverflowTags,
@@ -107,14 +107,14 @@ import {
107
107
  Tree,
108
108
  normalizeSelectionValues,
109
109
  usePressFeedback
110
- } from "./chunk-4PYHSNRA.js";
110
+ } from "./chunk-HRC6TQTZ.js";
111
111
  import {
112
112
  Dropdown,
113
113
  Input,
114
114
  Menu,
115
115
  Segmented,
116
116
  Steps
117
- } from "./chunk-EZTF5TA2.js";
117
+ } from "./chunk-J4R734AI.js";
118
118
  import {
119
119
  TextArea
120
120
  } from "./chunk-NRLIOMXY.js";
@@ -128,7 +128,7 @@ import {
128
128
  Skeleton,
129
129
  useOverlayExitPlaceholder,
130
130
  useOverlayLifecycle
131
- } from "./chunk-YHVFLSZW.js";
131
+ } from "./chunk-SCVUD2IJ.js";
132
132
  import {
133
133
  Button
134
134
  } from "./chunk-PU2V3VB5.js";
@@ -3774,8 +3774,366 @@ function buildFlatTree(items, options = {}) {
3774
3774
  return roots;
3775
3775
  }
3776
3776
 
3777
+ // src/components/ChooseBox.tsx
3778
+ import { useEffect as useEffect10, useMemo as useMemo7, useRef as useRef15, useState as useState15 } from "react";
3779
+
3780
+ // src/components/chooseBoxSource.ts
3781
+ function createBrowserChooseBoxSource() {
3782
+ const roots = [];
3783
+ const directories = /* @__PURE__ */ new Map();
3784
+ return {
3785
+ getRoots: async () => [...roots],
3786
+ authorize: async () => {
3787
+ const picker = window.showDirectoryPicker;
3788
+ if (!picker) throw new Error("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u76EE\u5F55\u6388\u6743\uFF0C\u8BF7\u4F7F\u7528 HTTPS \u6216 localhost \u4E0B\u7684 Chrome / Edge\uFF0C\u6216\u63A5\u5165\u684C\u9762\u76EE\u5F55\u6E90\u3002");
3789
+ try {
3790
+ const handle = await picker.call(window, { mode: "read" });
3791
+ for (const root2 of roots) if (await handle.isSameEntry(directories.get(root2.id))) return root2;
3792
+ const root = { id: `browser-root-${roots.length + 1}`, name: handle.name, kind: "directory", path: handle.name, handle };
3793
+ directories.set(root.id, handle);
3794
+ roots.push(root);
3795
+ return root;
3796
+ } catch (error) {
3797
+ if (error instanceof DOMException && error.name === "AbortError") return null;
3798
+ throw error;
3799
+ }
3800
+ },
3801
+ readDirectory: async (directory) => {
3802
+ const handle = directories.get(directory.id);
3803
+ if (!handle) throw new Error("\u76EE\u5F55\u5C1A\u672A\u6388\u6743\uFF0C\u8BF7\u91CD\u65B0\u6DFB\u52A0\u76EE\u5F55\u3002");
3804
+ const result = [];
3805
+ for await (const child of handle.values()) {
3806
+ const id = `${directory.id}/${encodeURIComponent(child.name)}`;
3807
+ if (child.kind === "directory") directories.set(id, child);
3808
+ result.push({
3809
+ id,
3810
+ name: child.name,
3811
+ kind: child.kind,
3812
+ path: `${directory.path}/${child.name}`,
3813
+ handle: child,
3814
+ ...child.kind === "file" ? { getFile: () => child.getFile() } : {}
3815
+ });
3816
+ }
3817
+ return result;
3818
+ }
3819
+ };
3820
+ }
3821
+ function createTauriChooseBoxSource(invoke) {
3822
+ return {
3823
+ getRoots: () => invoke("choose_box_roots"),
3824
+ readDirectory: (directory) => invoke("choose_box_read_directory", { path: directory.path })
3825
+ };
3826
+ }
3827
+
3828
+ // src/components/ChooseBox.tsx
3829
+ import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
3830
+ function ChooseBox({
3831
+ source: suppliedSource,
3832
+ kind = "file",
3833
+ multiple = false,
3834
+ value,
3835
+ defaultValue = [],
3836
+ onChange,
3837
+ disabled = false,
3838
+ placeholder,
3839
+ allowClear = true,
3840
+ accept = "",
3841
+ title,
3842
+ size: sizeProp,
3843
+ onError,
3844
+ className = "",
3845
+ ...props
3846
+ }) {
3847
+ const browserSource = useMemo7(createBrowserChooseBoxSource, []);
3848
+ const source = suppliedSource ?? browserSource;
3849
+ const size = useControlSize(sizeProp);
3850
+ const [selected, setSelected] = useControllableState({ value, defaultValue, onChange: (entries) => onChange?.([...entries]) });
3851
+ const [open, setOpen] = useState15(false);
3852
+ const [roots, setRoots] = useState15([]);
3853
+ const [cache, setCache] = useState15({});
3854
+ const [history, setHistory] = useState15([]);
3855
+ const [position, setPosition] = useState15(-1);
3856
+ const current = history[position];
3857
+ const [draft, setDraft] = useState15([]);
3858
+ const [busy, setBusy] = useState15(false);
3859
+ const [authorizing, setAuthorizing] = useState15(false);
3860
+ const [error, setError] = useState15("");
3861
+ const [query, setQuery] = useState15("");
3862
+ const [view, setView] = useState15("grid");
3863
+ const [sort, setSort] = useState15("asc");
3864
+ const [filter, setFilter] = useState15("accepted");
3865
+ const [pathText, setPathText] = useState15("");
3866
+ const session = useRef15(0);
3867
+ const request = useRef15(0);
3868
+ const authorizingLock = useRef15(false);
3869
+ const errorHandler = useRef15(onError);
3870
+ errorHandler.current = onError;
3871
+ const targetName = kind === "file" ? "\u6587\u4EF6" : "\u6587\u4EF6\u5939";
3872
+ const extensions = accept.split(",").map((item) => item.trim().toLowerCase()).filter(Boolean);
3873
+ const allowed = (entry) => entry.kind === kind && (kind === "directory" || !extensions.length || extensions.some((ext) => entry.name.toLowerCase().endsWith(ext)));
3874
+ const normalized = (entries) => {
3875
+ const result = [...new Map(entries.filter(allowed).map((entry) => [entry.id, entry])).values()];
3876
+ return multiple ? result : result.slice(0, 1);
3877
+ };
3878
+ const displayed = normalized(selected);
3879
+ const chosen = normalized(draft);
3880
+ const report = (reason) => {
3881
+ const failure = reason instanceof Error ? reason : new Error(String(reason));
3882
+ setError(failure.message);
3883
+ errorHandler.current?.(failure);
3884
+ };
3885
+ function close() {
3886
+ session.current++;
3887
+ request.current++;
3888
+ setOpen(false);
3889
+ }
3890
+ useEffect10(() => {
3891
+ if (!open) return;
3892
+ const token = ++session.current;
3893
+ setRoots([]);
3894
+ setCache({});
3895
+ setHistory([]);
3896
+ setPosition(-1);
3897
+ setQuery("");
3898
+ setPathText("");
3899
+ setError("");
3900
+ setBusy(true);
3901
+ Promise.resolve().then(() => source.getRoots()).then((entries) => {
3902
+ if (session.current !== token) return;
3903
+ const directories = entries.filter((entry) => entry.kind === "directory");
3904
+ setRoots(directories);
3905
+ if (directories[0]) {
3906
+ setHistory([directories[0]]);
3907
+ setPosition(0);
3908
+ }
3909
+ }).catch((reason) => {
3910
+ if (session.current === token) report(reason);
3911
+ }).finally(() => {
3912
+ if (session.current === token) setBusy(false);
3913
+ });
3914
+ return () => {
3915
+ session.current++;
3916
+ request.current++;
3917
+ };
3918
+ }, [open, source]);
3919
+ useEffect10(() => {
3920
+ if (disabled && open) close();
3921
+ }, [disabled, open]);
3922
+ async function read(directory, token) {
3923
+ const entries = await source.readDirectory(directory);
3924
+ if (session.current === token) setCache((previous) => ({ ...previous, [directory.id]: entries }));
3925
+ return entries;
3926
+ }
3927
+ async function refresh(directory) {
3928
+ const token = session.current, id = ++request.current;
3929
+ setBusy(true);
3930
+ setError("");
3931
+ try {
3932
+ await read(directory, token);
3933
+ } catch (reason) {
3934
+ if (token === session.current && id === request.current) report(reason);
3935
+ } finally {
3936
+ if (token === session.current && id === request.current) setBusy(false);
3937
+ }
3938
+ }
3939
+ useEffect10(() => {
3940
+ if (!open || !current) return;
3941
+ setPathText(current.path);
3942
+ setQuery("");
3943
+ void refresh(current);
3944
+ }, [open, current, source]);
3945
+ function navigate(entry) {
3946
+ if (entry.kind !== "directory" || current?.id === entry.id) return;
3947
+ setHistory((previous) => [...previous.slice(0, position + 1), entry]);
3948
+ setPosition(position + 1);
3949
+ }
3950
+ function toggle(entry) {
3951
+ if (!allowed(entry)) return;
3952
+ setDraft((previous) => multiple ? previous.some((item) => item.id === entry.id) ? previous.filter((item) => item.id !== entry.id) : [...previous, entry] : [entry]);
3953
+ }
3954
+ async function authorize() {
3955
+ if (!source.authorize || authorizingLock.current) return;
3956
+ const token = session.current;
3957
+ authorizingLock.current = true;
3958
+ setAuthorizing(true);
3959
+ setError("");
3960
+ try {
3961
+ const entry = await source.authorize();
3962
+ if (!entry || token !== session.current) return;
3963
+ const entries = await source.getRoots();
3964
+ if (token !== session.current) return;
3965
+ setRoots(entries.filter((item) => item.kind === "directory"));
3966
+ navigate(entry);
3967
+ } catch (reason) {
3968
+ if (token === session.current) report(reason);
3969
+ } finally {
3970
+ authorizingLock.current = false;
3971
+ setAuthorizing(false);
3972
+ }
3973
+ }
3974
+ const allEntries = new Map([...roots, ...Object.values(cache).flat()].map((entry) => [entry.id, entry]));
3975
+ const parent = current ? Object.entries(cache).find(([, entries]) => entries.some((entry) => entry.id === current.id))?.[0] : void 0;
3976
+ function treeNodes(entries, ancestors = /* @__PURE__ */ new Set()) {
3977
+ return entries.filter((entry) => entry.kind === "directory" && !ancestors.has(entry.id)).map((entry) => ({
3978
+ key: entry.id,
3979
+ title: entry.name,
3980
+ icon: /* @__PURE__ */ jsx19(Icon, { name: "folder" }),
3981
+ isLeaf: false,
3982
+ loaded: cache[entry.id] !== void 0,
3983
+ children: cache[entry.id] ? treeNodes(cache[entry.id], /* @__PURE__ */ new Set([...ancestors, entry.id])) : void 0
3984
+ }));
3985
+ }
3986
+ const visible = [...current ? cache[current.id] ?? [] : []].filter((entry) => entry.name.toLowerCase().includes(query.toLowerCase()) && (entry.kind === "directory" || filter === "all" || !extensions.length || extensions.some((ext) => entry.name.toLowerCase().endsWith(ext)))).sort((a, b) => Number(b.kind === "directory") - Number(a.kind === "directory") || a.name.localeCompare(b.name, "zh-CN", { numeric: true }) * (sort === "asc" ? 1 : -1));
3987
+ const selectable = visible.filter(allowed);
3988
+ const allChecked = selectable.length > 0 && selectable.every((entry) => chosen.some((item) => item.id === entry.id));
3989
+ const clearable = allowClear && displayed.length > 0 && !disabled;
3990
+ return /* @__PURE__ */ jsxs18("div", { ...props, className: `sia-choose-box${clearable ? " sia-choose-box--clearable" : ""} ${className}`.trim(), children: [
3991
+ /* @__PURE__ */ jsx19(
3992
+ Button,
3993
+ {
3994
+ className: "sia-choose-box__trigger",
3995
+ size,
3996
+ disabled,
3997
+ "aria-haspopup": "dialog",
3998
+ "aria-expanded": open,
3999
+ icon: /* @__PURE__ */ jsx19(Icon, { name: kind === "directory" ? "folder" : "file", size: 16 }),
4000
+ iconPosition: "end",
4001
+ onClick: () => {
4002
+ setDraft(normalized(selected));
4003
+ setOpen(true);
4004
+ },
4005
+ children: /* @__PURE__ */ jsx19("span", { className: `sia-choose-box__value${displayed.length ? "" : " sia-choose-box__placeholder"}`, children: displayed.length ? displayed.map((entry) => entry.path).join("\uFF1B") : placeholder ?? `\u8BF7\u9009\u62E9${targetName}` })
4006
+ }
4007
+ ),
4008
+ clearable && /* @__PURE__ */ jsx19(Button, { className: "sia-choose-box__clear", variant: "text", size, "aria-label": "\u6E05\u7A7A\u9009\u62E9", icon: /* @__PURE__ */ jsx19(Icon, { name: "close", size: 14 }), onClick: () => setSelected([]) }),
4009
+ /* @__PURE__ */ jsxs18(
4010
+ Modal,
4011
+ {
4012
+ open,
4013
+ title: title ?? `\u9009\u62E9${multiple ? "\u591A\u4E2A" : "\u5355\u4E2A"}${targetName}`,
4014
+ width: 960,
4015
+ centered: true,
4016
+ autoFocus: false,
4017
+ className: "sia-choose-box__modal",
4018
+ onCancel: close,
4019
+ okButtonProps: { disabled: busy || authorizing || !chosen.length },
4020
+ onOk: () => {
4021
+ if (disabled || busy || authorizing || !chosen.length) return false;
4022
+ setSelected(chosen);
4023
+ close();
4024
+ },
4025
+ footerExtra: /* @__PURE__ */ jsxs18("span", { role: "status", children: [
4026
+ "\u5DF2\u9009\u62E9 ",
4027
+ chosen.length,
4028
+ " \u4E2A",
4029
+ targetName
4030
+ ] }),
4031
+ children: [
4032
+ /* @__PURE__ */ jsxs18("div", { className: "sia-choose-box__toolbar", children: [
4033
+ /* @__PURE__ */ jsx19(Button, { "aria-label": "\u540E\u9000", title: "\u540E\u9000", disabled: position <= 0, icon: /* @__PURE__ */ jsx19(Icon, { name: "arrow-left" }), onClick: () => setPosition(position - 1) }),
4034
+ /* @__PURE__ */ jsx19(Button, { "aria-label": "\u524D\u8FDB", title: "\u524D\u8FDB", disabled: position >= history.length - 1, icon: /* @__PURE__ */ jsx19(Icon, { name: "arrow-right" }), onClick: () => setPosition(position + 1) }),
4035
+ /* @__PURE__ */ jsx19(Button, { "aria-label": "\u4E0A\u4E00\u7EA7", title: "\u4E0A\u4E00\u7EA7", disabled: !parent, icon: /* @__PURE__ */ jsx19(Icon, { name: "arrow-up" }), onClick: () => {
4036
+ if (parent) navigate(allEntries.get(parent));
4037
+ } }),
4038
+ /* @__PURE__ */ jsx19(Button, { "aria-label": "\u5237\u65B0\u76EE\u5F55", title: "\u5237\u65B0\u76EE\u5F55", disabled: !current || busy, icon: /* @__PURE__ */ jsx19(Icon, { name: "refresh" }), onClick: () => current && void refresh(current) }),
4039
+ /* @__PURE__ */ jsx19(Select, { "aria-label": "\u6392\u5E8F", allowClear: false, value: sort, onChange: (value2) => setSort(String(value2)), options: [{ value: "asc", label: "\u540D\u79F0\u5347\u5E8F" }, { value: "desc", label: "\u540D\u79F0\u964D\u5E8F" }] }),
4040
+ /* @__PURE__ */ jsx19(Select, { "aria-label": "\u89C6\u56FE", allowClear: false, value: view, onChange: (value2) => setView(String(value2)), options: [{ value: "grid", label: "\u56FE\u6807\u89C6\u56FE" }, { value: "list", label: "\u5217\u8868\u89C6\u56FE" }] }),
4041
+ source.authorize && /* @__PURE__ */ jsx19(Button, { loading: authorizing, onClick: () => void authorize(), icon: /* @__PURE__ */ jsx19(Icon, { name: "folder-plus" }), children: "\u6DFB\u52A0\u6388\u6743\u76EE\u5F55" })
4042
+ ] }),
4043
+ /* @__PURE__ */ jsxs18("div", { className: "sia-choose-box__path", children: [
4044
+ /* @__PURE__ */ jsx19(
4045
+ Input,
4046
+ {
4047
+ "aria-label": "\u76EE\u5F55\u8DEF\u5F84",
4048
+ value: pathText,
4049
+ allowClear: false,
4050
+ onChange: (event) => setPathText(event.target.value),
4051
+ onKeyDown: (event) => {
4052
+ if (event.key === "Enter") {
4053
+ const entry = [...allEntries.values()].find((item) => item.kind === "directory" && item.path === pathText);
4054
+ if (entry) navigate(entry);
4055
+ else setError("\u8BF7\u5148\u5728\u76EE\u5F55\u6811\u4E2D\u5C55\u5F00\u6B64\u8DEF\u5F84\uFF0C\u6216\u6DFB\u52A0\u6388\u6743\u76EE\u5F55\u3002");
4056
+ }
4057
+ }
4058
+ }
4059
+ ),
4060
+ /* @__PURE__ */ jsx19(Input, { "aria-label": "\u641C\u7D22\u5F53\u524D\u76EE\u5F55", placeholder: "\u641C\u7D22\u5F53\u524D\u76EE\u5F55", value: query, onChange: (event) => setQuery(event.target.value) })
4061
+ ] }),
4062
+ error && /* @__PURE__ */ jsx19("div", { className: "sia-choose-box__error", role: "alert", children: error }),
4063
+ /* @__PURE__ */ jsxs18("div", { className: "sia-choose-box__body", children: [
4064
+ /* @__PURE__ */ jsx19("aside", { className: "sia-choose-box__tree", "aria-label": "\u76EE\u5F55\u6811", children: /* @__PURE__ */ jsx19(
4065
+ Tree,
4066
+ {
4067
+ treeData: treeNodes(roots),
4068
+ showIcon: true,
4069
+ selectedKeys: current ? [current.id] : [],
4070
+ loadData: async (node) => {
4071
+ const token = session.current;
4072
+ try {
4073
+ await read(allEntries.get(String(node.key)), token);
4074
+ } catch (reason) {
4075
+ if (token === session.current) report(reason);
4076
+ throw reason;
4077
+ }
4078
+ },
4079
+ onSelect: (_, info) => {
4080
+ const entry = allEntries.get(String(info.node.key));
4081
+ if (entry) navigate(entry);
4082
+ }
4083
+ }
4084
+ ) }),
4085
+ /* @__PURE__ */ jsxs18("section", { className: "sia-choose-box__content", "aria-label": "\u76EE\u5F55\u5185\u5BB9", "aria-busy": busy, children: [
4086
+ /* @__PURE__ */ jsxs18("div", { className: "sia-choose-box__selection-tools", children: [
4087
+ multiple && /* @__PURE__ */ jsx19(Checkbox, { checked: allChecked, disabled: busy || !selectable.length, onChange: (checked) => setDraft((previous) => checked ? [...new Map([...previous, ...selectable].map((entry) => [entry.id, entry])).values()] : previous.filter((entry) => !selectable.some((item) => item.id === entry.id))), children: "\u5168\u9009\u5F53\u524D\u5217\u8868" }),
4088
+ kind === "directory" && /* @__PURE__ */ jsx19(Button, { size: "small", disabled: !current || busy, onClick: () => current && toggle(current), children: "\u9009\u62E9\u5F53\u524D\u6587\u4EF6\u5939" })
4089
+ ] }),
4090
+ busy ? /* @__PURE__ */ jsx19("p", { className: "sia-choose-box__empty", role: "status", children: "\u6B63\u5728\u8BFB\u53D6\u76EE\u5F55\u2026" }) : !roots.length ? /* @__PURE__ */ jsx19("p", { className: "sia-choose-box__empty", children: source.authorize ? "\u8BF7\u6DFB\u52A0\u6388\u6743\u76EE\u5F55\u540E\u5F00\u59CB\u9009\u62E9" : "\u6682\u65E0\u53EF\u7528\u76EE\u5F55" }) : !visible.length ? /* @__PURE__ */ jsx19("p", { className: "sia-choose-box__empty", children: query ? "\u6CA1\u6709\u5339\u914D\u9879" : "\u6B64\u6587\u4EF6\u5939\u4E3A\u7A7A" }) : /* @__PURE__ */ jsx19("div", { className: `sia-choose-box__entries sia-choose-box__entries--${view}`, children: visible.map((entry) => /* @__PURE__ */ jsxs18("div", { className: `sia-choose-box__entry${chosen.some((item) => item.id === entry.id) ? " is-selected" : ""}`, children: [
4091
+ multiple && allowed(entry) && /* @__PURE__ */ jsx19(Checkbox, { "aria-label": `\u9009\u62E9 ${entry.name}`, checked: chosen.some((item) => item.id === entry.id), onChange: () => toggle(entry) }),
4092
+ /* @__PURE__ */ jsxs18(
4093
+ Button,
4094
+ {
4095
+ variant: "text",
4096
+ className: "sia-choose-box__item",
4097
+ title: entry.name,
4098
+ "aria-label": entry.name,
4099
+ "aria-pressed": chosen.some((item) => item.id === entry.id),
4100
+ disabled: entry.kind === "file" && !allowed(entry),
4101
+ onClick: () => entry.kind === "directory" && kind === "file" ? navigate(entry) : toggle(entry),
4102
+ onDoubleClick: () => {
4103
+ if (entry.kind === "directory") navigate(entry);
4104
+ },
4105
+ children: [
4106
+ /* @__PURE__ */ jsx19(Icon, { className: entry.kind === "directory" ? "is-directory" : "", name: entry.kind === "directory" ? "folder" : "file", size: view === "grid" ? 38 : 20 }),
4107
+ /* @__PURE__ */ jsx19("span", { children: entry.name })
4108
+ ]
4109
+ }
4110
+ ),
4111
+ entry.kind === "directory" && kind === "directory" && /* @__PURE__ */ jsx19(Button, { size: "small", variant: "link", "aria-label": `\u6253\u5F00 ${entry.name}`, onClick: () => navigate(entry), children: "\u6253\u5F00" })
4112
+ ] }, entry.id)) })
4113
+ ] })
4114
+ ] }),
4115
+ /* @__PURE__ */ jsxs18("div", { className: "sia-choose-box__bottom", children: [
4116
+ /* @__PURE__ */ jsx19("span", { title: chosen.map((entry) => entry.path).join("\uFF1B"), children: chosen.length ? chosen.map((entry) => entry.name).join("\uFF1B") : "\u5C1A\u672A\u9009\u62E9" }),
4117
+ kind === "file" && extensions.length > 0 && /* @__PURE__ */ jsx19(
4118
+ Select,
4119
+ {
4120
+ "aria-label": "\u6587\u4EF6\u7C7B\u578B",
4121
+ allowClear: false,
4122
+ value: filter,
4123
+ onChange: (value2) => setFilter(String(value2)),
4124
+ options: [{ value: "accepted", label: `\u5141\u8BB8\u7684\u6587\u4EF6 (${accept})` }, { value: "all", label: "\u663E\u793A\u5168\u90E8\u6587\u4EF6" }]
4125
+ }
4126
+ ),
4127
+ chosen.length > 0 && /* @__PURE__ */ jsx19(Button, { size: "small", onClick: () => setDraft([]), children: "\u6E05\u7A7A\u5DF2\u9009" })
4128
+ ] })
4129
+ ]
4130
+ }
4131
+ )
4132
+ ] });
4133
+ }
4134
+
3777
4135
  // src/components/Editor.tsx
3778
- import { useEffect as useEffect10, useId as useId6, useRef as useRef15, useState as useState15 } from "react";
4136
+ import { useEffect as useEffect11, useId as useId6, useRef as useRef16, useState as useState16 } from "react";
3779
4137
  import EditorWorker from "monaco-editor/editor/editor.worker.js?worker";
3780
4138
 
3781
4139
  // src/components/jsonLanguage.ts
@@ -4356,7 +4714,7 @@ function registerSqlLanguages(monaco) {
4356
4714
  }
4357
4715
 
4358
4716
  // src/components/Editor.tsx
4359
- import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
4717
+ import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
4360
4718
  var EDITOR_COMMAND_SHORTCUTS = {
4361
4719
  cut: "Ctrl+X",
4362
4720
  copy: "Ctrl+C",
@@ -4451,29 +4809,29 @@ function Editor({
4451
4809
  loadingText = "\u6B63\u5728\u52A0\u8F7D\u7F16\u8F91\u5668\u2026"
4452
4810
  }) {
4453
4811
  const generatedId = useId6();
4454
- const containerRef = useRef15(null);
4455
- const rangeHighlightRef = useRef15(null);
4456
- const editorRef = useRef15(null);
4457
- const modelRef = useRef15(null);
4458
- const apiRef = useRef15(null);
4459
- const applyingControlledValueRef = useRef15(false);
4460
- const updateHighlightRef = useRef15(() => void 0);
4461
- const changeHandlerRef = useRef15(onChange);
4462
- const readyHandlerRef = useRef15(onReady);
4463
- const selectionHandlerRef = useRef15(onSelectionChange);
4464
- const keyDownHandlerRef = useRef15(onKeyDown);
4465
- const highlightRangeRef = useRef15(highlightRange);
4466
- const markersRef = useRef15(markers);
4467
- const contextMenuItemsRef = useRef15(contextMenuItems);
4468
- const completionProviderRef = useRef15(completionProvider);
4469
- const refreshSuggestionOnSpaceRef = useRef15(refreshSuggestionOnSpace);
4470
- const initialValueRef = useRef15(value);
4471
- const initialLanguageRef = useRef15(language);
4472
- const initialPathRef = useRef15(path);
4473
- const initialThemeRef = useRef15(theme);
4474
- const initialOptionsRef = useRef15(options);
4475
- const [loading, setLoading] = useState15(true);
4476
- const [, setSelectionVersion] = useState15(0);
4812
+ const containerRef = useRef16(null);
4813
+ const rangeHighlightRef = useRef16(null);
4814
+ const editorRef = useRef16(null);
4815
+ const modelRef = useRef16(null);
4816
+ const apiRef = useRef16(null);
4817
+ const applyingControlledValueRef = useRef16(false);
4818
+ const updateHighlightRef = useRef16(() => void 0);
4819
+ const changeHandlerRef = useRef16(onChange);
4820
+ const readyHandlerRef = useRef16(onReady);
4821
+ const selectionHandlerRef = useRef16(onSelectionChange);
4822
+ const keyDownHandlerRef = useRef16(onKeyDown);
4823
+ const highlightRangeRef = useRef16(highlightRange);
4824
+ const markersRef = useRef16(markers);
4825
+ const contextMenuItemsRef = useRef16(contextMenuItems);
4826
+ const completionProviderRef = useRef16(completionProvider);
4827
+ const refreshSuggestionOnSpaceRef = useRef16(refreshSuggestionOnSpace);
4828
+ const initialValueRef = useRef16(value);
4829
+ const initialLanguageRef = useRef16(language);
4830
+ const initialPathRef = useRef16(path);
4831
+ const initialThemeRef = useRef16(theme);
4832
+ const initialOptionsRef = useRef16(options);
4833
+ const [loading, setLoading] = useState16(true);
4834
+ const [, setSelectionVersion] = useState16(0);
4477
4835
  initialValueRef.current = value;
4478
4836
  initialLanguageRef.current = language;
4479
4837
  initialPathRef.current = path;
@@ -4488,7 +4846,7 @@ function Editor({
4488
4846
  contextMenuItemsRef.current = contextMenuItems;
4489
4847
  completionProviderRef.current = completionProvider;
4490
4848
  refreshSuggestionOnSpaceRef.current = refreshSuggestionOnSpace;
4491
- useEffect10(() => {
4849
+ useEffect11(() => {
4492
4850
  let disposed = false;
4493
4851
  const subscriptions = [];
4494
4852
  async function mountEditor() {
@@ -4832,7 +5190,7 @@ function Editor({
4832
5190
  updateHighlightRef.current = () => void 0;
4833
5191
  };
4834
5192
  }, [generatedId]);
4835
- useEffect10(() => {
5193
+ useEffect11(() => {
4836
5194
  const model = modelRef.current;
4837
5195
  if (!model || model.getValue() === value) return;
4838
5196
  applyingControlledValueRef.current = true;
@@ -4842,7 +5200,7 @@ function Editor({
4842
5200
  applyingControlledValueRef.current = false;
4843
5201
  }
4844
5202
  }, [loading, value]);
4845
- useEffect10(() => {
5203
+ useEffect11(() => {
4846
5204
  if (loading) return;
4847
5205
  void loadMonaco().then((monaco) => {
4848
5206
  const model = modelRef.current;
@@ -4851,7 +5209,7 @@ function Editor({
4851
5209
  }, [language, loading]);
4852
5210
  const completionEnabled = Boolean(completionProvider);
4853
5211
  const completionTriggerKey = completionTriggerCharacters.join("\0");
4854
- useEffect10(() => {
5212
+ useEffect11(() => {
4855
5213
  if (loading || !completionEnabled) return void 0;
4856
5214
  let disposed = false;
4857
5215
  let subscription;
@@ -4925,23 +5283,23 @@ function Editor({
4925
5283
  subscription?.dispose();
4926
5284
  };
4927
5285
  }, [completionEnabled, completionTriggerKey, language, loading]);
4928
- useEffect10(() => {
5286
+ useEffect11(() => {
4929
5287
  if (loading) return;
4930
5288
  void loadMonaco().then((monaco) => {
4931
5289
  if (editorRef.current) monaco.editor.setTheme(theme === "dark" ? "vs-dark" : "vs");
4932
5290
  });
4933
5291
  }, [loading, theme]);
4934
- useEffect10(() => {
5292
+ useEffect11(() => {
4935
5293
  if (loading) return;
4936
5294
  editorRef.current?.updateOptions({
4937
5295
  ...options ?? {},
4938
5296
  contextmenu: contextMenuItems.length === 0 ? options?.contextmenu ?? true : false
4939
5297
  });
4940
5298
  }, [contextMenuItems.length, loading, options]);
4941
- useEffect10(() => {
5299
+ useEffect11(() => {
4942
5300
  updateHighlightRef.current();
4943
5301
  }, [highlightRange]);
4944
- useEffect10(() => {
5302
+ useEffect11(() => {
4945
5303
  if (loading) return;
4946
5304
  void loadMonaco().then((monaco) => {
4947
5305
  const model = modelRef.current;
@@ -4959,11 +5317,11 @@ function Editor({
4959
5317
  })));
4960
5318
  });
4961
5319
  }, [generatedId, loading, markers]);
4962
- const editorNode = /* @__PURE__ */ jsxs18("div", { className: `sia-editor-control ${className}`.trim(), "data-loading": loading || void 0, children: [
4963
- /* @__PURE__ */ jsx19("div", { className: "sia-editor-control__surface", ref: containerRef, "aria-label": ariaLabel }),
4964
- /* @__PURE__ */ jsx19("div", { ref: rangeHighlightRef, className: "sia-editor-control__range-highlight", "aria-hidden": "true" }),
4965
- loading ? /* @__PURE__ */ jsxs18("div", { className: "sia-editor-control__loading", role: "status", children: [
4966
- /* @__PURE__ */ jsx19("span", {}),
5320
+ const editorNode = /* @__PURE__ */ jsxs19("div", { className: `sia-editor-control ${className}`.trim(), "data-loading": loading || void 0, children: [
5321
+ /* @__PURE__ */ jsx20("div", { className: "sia-editor-control__surface", ref: containerRef, "aria-label": ariaLabel }),
5322
+ /* @__PURE__ */ jsx20("div", { ref: rangeHighlightRef, className: "sia-editor-control__range-highlight", "aria-hidden": "true" }),
5323
+ loading ? /* @__PURE__ */ jsxs19("div", { className: "sia-editor-control__loading", role: "status", children: [
5324
+ /* @__PURE__ */ jsx20("span", {}),
4967
5325
  loadingText
4968
5326
  ] }) : null
4969
5327
  ] });
@@ -4992,7 +5350,7 @@ function Editor({
4992
5350
  item.onClick?.(api);
4993
5351
  }
4994
5352
  }
4995
- return /* @__PURE__ */ jsx19(
5353
+ return /* @__PURE__ */ jsx20(
4996
5354
  Dropdown,
4997
5355
  {
4998
5356
  className: "sia-editor-control__context-menu",
@@ -5009,19 +5367,19 @@ function Editor({
5009
5367
  }
5010
5368
 
5011
5369
  // src/components/Markdown.tsx
5012
- import { useEffect as useEffect11, useMemo as useMemo7, useRef as useRef16, useState as useState16 } from "react";
5370
+ import { useEffect as useEffect12, useMemo as useMemo8, useRef as useRef17, useState as useState17 } from "react";
5013
5371
  import DOMPurify from "dompurify";
5014
5372
  import { marked } from "marked";
5015
- import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
5373
+ import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
5016
5374
  function Markdown({ content, emptyText = "\u6682\u65E0 Markdown \u5185\u5BB9", resolveImageSrc, imagePreview = true, className = "", onClick, onKeyDown, ...props }) {
5017
- const rootRef = useRef16(null);
5018
- const [previewImage, setPreviewImage] = useState16(null);
5019
- const html = useMemo7(() => {
5375
+ const rootRef = useRef17(null);
5376
+ const [previewImage, setPreviewImage] = useState17(null);
5377
+ const html = useMemo8(() => {
5020
5378
  const rendered = marked.parse(content, { breaks: true, gfm: true });
5021
5379
  const sanitized = DOMPurify.sanitize(rendered, { USE_PROFILES: { html: true } });
5022
5380
  return sanitized.replace(/<img\b/giu, '<img loading="lazy" decoding="async" referrerpolicy="no-referrer"');
5023
5381
  }, [content]);
5024
- useEffect11(() => {
5382
+ useEffect12(() => {
5025
5383
  const root = rootRef.current;
5026
5384
  if (!root) return void 0;
5027
5385
  let cancelled = false;
@@ -5078,19 +5436,19 @@ function Markdown({ content, emptyText = "\u6682\u65E0 Markdown \u5185\u5BB9", r
5078
5436
  onKeyDown?.(event);
5079
5437
  }
5080
5438
  if (!content.trim()) {
5081
- return /* @__PURE__ */ jsx20("div", { className: `sia-markdown sia-markdown--empty ${className}`.trim(), children: emptyText });
5439
+ return /* @__PURE__ */ jsx21("div", { className: `sia-markdown sia-markdown--empty ${className}`.trim(), children: emptyText });
5082
5440
  }
5083
- return /* @__PURE__ */ jsxs19(Fragment6, { children: [
5084
- /* @__PURE__ */ jsx20("article", { ...withTitleTooltip(props), ref: rootRef, className: `sia-markdown ${className}`.trim(), onClick: handleClick, onKeyDown: handleKeyDown, dangerouslySetInnerHTML: { __html: html } }),
5085
- /* @__PURE__ */ jsx20(ImagePreview, { open: Boolean(previewImage), src: previewImage?.src, alt: previewImage?.alt, onOpenChange: (open) => {
5441
+ return /* @__PURE__ */ jsxs20(Fragment6, { children: [
5442
+ /* @__PURE__ */ jsx21("article", { ...withTitleTooltip(props), ref: rootRef, className: `sia-markdown ${className}`.trim(), onClick: handleClick, onKeyDown: handleKeyDown, dangerouslySetInnerHTML: { __html: html } }),
5443
+ /* @__PURE__ */ jsx21(ImagePreview, { open: Boolean(previewImage), src: previewImage?.src, alt: previewImage?.alt, onOpenChange: (open) => {
5086
5444
  if (!open) setPreviewImage(null);
5087
5445
  } })
5088
5446
  ] });
5089
5447
  }
5090
5448
 
5091
5449
  // src/components/InputNumber.tsx
5092
- import { forwardRef as forwardRef5, useEffect as useEffect12, useId as useId7, useRef as useRef17, useState as useState17 } from "react";
5093
- import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
5450
+ import { forwardRef as forwardRef5, useEffect as useEffect13, useId as useId7, useRef as useRef18, useState as useState18 } from "react";
5451
+ import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
5094
5452
  function formatValue(value, precision) {
5095
5453
  if (value === null || !Number.isFinite(value)) return "";
5096
5454
  return precision === void 0 ? String(value) : value.toFixed(precision);
@@ -5123,14 +5481,14 @@ var InputNumber = forwardRef5(function InputNumber2({
5123
5481
  const size = useControlSize(sizeProp);
5124
5482
  const fallbackId = useId7();
5125
5483
  const inputId = id ?? fallbackId;
5126
- const localRef = useRef17(null);
5484
+ const localRef = useRef18(null);
5127
5485
  const [currentValue, setCurrentValue] = useControllableState({ value, defaultValue, onChange });
5128
5486
  const displayValue = (next) => {
5129
5487
  const plain = formatValue(next, precision);
5130
5488
  return plain && formatter ? formatter(plain) : plain;
5131
5489
  };
5132
- const [text, setText] = useState17(() => displayValue(currentValue));
5133
- useEffect12(() => {
5490
+ const [text, setText] = useState18(() => displayValue(currentValue));
5491
+ useEffect13(() => {
5134
5492
  setText(displayValue(currentValue));
5135
5493
  }, [currentValue, precision, formatter]);
5136
5494
  function setRef(node) {
@@ -5199,7 +5557,7 @@ var InputNumber = forwardRef5(function InputNumber2({
5199
5557
  const increaseDisabled = disabled || readOnly || max !== void 0 && currentValue !== null && currentValue >= max;
5200
5558
  const decreaseDisabled = disabled || readOnly || min !== void 0 && currentValue !== null && currentValue <= min;
5201
5559
  const floatingPlaceholder = usePlaceholderMode(placeholderMode) === "floating" && Boolean(placeholder);
5202
- const input = /* @__PURE__ */ jsx21(
5560
+ const input = /* @__PURE__ */ jsx22(
5203
5561
  "input",
5204
5562
  {
5205
5563
  ...withTitleTooltip(props),
@@ -5221,26 +5579,26 @@ var InputNumber = forwardRef5(function InputNumber2({
5221
5579
  onKeyDown: handleKeyDown
5222
5580
  }
5223
5581
  );
5224
- return /* @__PURE__ */ jsxs20("span", { className: `sia-input-number sia-input-number--${size} sia-input-number--${status}${floatingPlaceholder ? " sia-input-number--floating" : ""}${floatingPlaceholder && text.length > 0 ? " is-filled" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
5225
- prefix ? /* @__PURE__ */ jsx21("span", { className: "sia-input-number__affix", children: prefix }) : null,
5226
- floatingPlaceholder ? /* @__PURE__ */ jsxs20("span", { className: "sia-input-number__input-wrap", children: [
5582
+ return /* @__PURE__ */ jsxs21("span", { className: `sia-input-number sia-input-number--${size} sia-input-number--${status}${floatingPlaceholder ? " sia-input-number--floating" : ""}${floatingPlaceholder && text.length > 0 ? " is-filled" : ""}${disabled ? " is-disabled" : ""} ${className}`.trim(), children: [
5583
+ prefix ? /* @__PURE__ */ jsx22("span", { className: "sia-input-number__affix", children: prefix }) : null,
5584
+ floatingPlaceholder ? /* @__PURE__ */ jsxs21("span", { className: "sia-input-number__input-wrap", children: [
5227
5585
  input,
5228
- /* @__PURE__ */ jsx21("span", { className: "sia-input-number__floating-placeholder", "aria-hidden": "true", children: placeholder })
5586
+ /* @__PURE__ */ jsx22("span", { className: "sia-input-number__floating-placeholder", "aria-hidden": "true", children: placeholder })
5229
5587
  ] }) : input,
5230
- suffix ? /* @__PURE__ */ jsx21("span", { className: "sia-input-number__affix", children: suffix }) : null,
5231
- controls ? /* @__PURE__ */ jsxs20("span", { className: "sia-input-number__controls", children: [
5232
- /* @__PURE__ */ jsx21("button", { type: "button", tabIndex: -1, "aria-label": "\u589E\u52A0\u6570\u503C", disabled: increaseDisabled, onClick: () => changeBy(1), children: /* @__PURE__ */ jsx21(Icon, { name: "chevron-up", size: 12 }) }),
5233
- /* @__PURE__ */ jsx21("button", { type: "button", tabIndex: -1, "aria-label": "\u51CF\u5C11\u6570\u503C", disabled: decreaseDisabled, onClick: () => changeBy(-1), children: /* @__PURE__ */ jsx21(Icon, { name: "chevron-down", size: 12 }) })
5588
+ suffix ? /* @__PURE__ */ jsx22("span", { className: "sia-input-number__affix", children: suffix }) : null,
5589
+ controls ? /* @__PURE__ */ jsxs21("span", { className: "sia-input-number__controls", children: [
5590
+ /* @__PURE__ */ jsx22("button", { type: "button", tabIndex: -1, "aria-label": "\u589E\u52A0\u6570\u503C", disabled: increaseDisabled, onClick: () => changeBy(1), children: /* @__PURE__ */ jsx22(Icon, { name: "chevron-up", size: 12 }) }),
5591
+ /* @__PURE__ */ jsx22("button", { type: "button", tabIndex: -1, "aria-label": "\u51CF\u5C11\u6570\u503C", disabled: decreaseDisabled, onClick: () => changeBy(-1), children: /* @__PURE__ */ jsx22(Icon, { name: "chevron-down", size: 12 }) })
5234
5592
  ] }) : null
5235
5593
  ] });
5236
5594
  });
5237
5595
 
5238
5596
  // src/components/SelectModal.tsx
5239
- import { useState as useState18 } from "react";
5240
- import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
5597
+ import { useState as useState19 } from "react";
5598
+ import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
5241
5599
  function SelectModalBody({ config, values, disabled, onChange }) {
5242
- const [query, setQuery] = useState18("");
5243
- const [selectedOnly, setSelectedOnly] = useState18(false);
5600
+ const [query, setQuery] = useState19("");
5601
+ const [selectedOnly, setSelectedOnly] = useState19(false);
5244
5602
  const multiple = config.mode === "multiple";
5245
5603
  const search = query.trim();
5246
5604
  const filtered = config.options.filter((option) => !search || (config.filterOption ? config.filterOption(search, option) : [option.label, option.value].some((text) => String(text ?? "").toLowerCase().includes(search.toLowerCase()))));
@@ -5254,23 +5612,23 @@ function SelectModalBody({ config, values, disabled, onChange }) {
5254
5612
  });
5255
5613
  onChange([...next]);
5256
5614
  };
5257
- return /* @__PURE__ */ jsxs21(Fragment7, { children: [
5258
- config.headerExtra != null && config.headerExtra !== false ? /* @__PURE__ */ jsx22("div", { className: "sia-select-modal__header-extra", children: config.headerExtra }) : null,
5259
- /* @__PURE__ */ jsxs21("div", { className: "sia-select-modal__heading", children: [
5260
- /* @__PURE__ */ jsxs21("div", { role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
5261
- /* @__PURE__ */ jsx22(Button, { role: "tab", "aria-selected": !selectedOnly, variant: "link", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
5262
- /* @__PURE__ */ jsxs21(Button, { role: "tab", "aria-selected": selectedOnly, variant: "link", onClick: () => setSelectedOnly(true), children: [
5615
+ return /* @__PURE__ */ jsxs22(Fragment7, { children: [
5616
+ config.headerExtra != null && config.headerExtra !== false ? /* @__PURE__ */ jsx23("div", { className: "sia-select-modal__header-extra", children: config.headerExtra }) : null,
5617
+ /* @__PURE__ */ jsxs22("div", { className: "sia-select-modal__heading", children: [
5618
+ /* @__PURE__ */ jsxs22("div", { role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
5619
+ /* @__PURE__ */ jsx23(Button, { role: "tab", "aria-selected": !selectedOnly, variant: "link", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
5620
+ /* @__PURE__ */ jsxs22(Button, { role: "tab", "aria-selected": selectedOnly, variant: "link", onClick: () => setSelectedOnly(true), children: [
5263
5621
  "\u5DF2\u9009\u9879(",
5264
5622
  values.length,
5265
5623
  ")"
5266
5624
  ] })
5267
5625
  ] }),
5268
- /* @__PURE__ */ jsx22(
5626
+ /* @__PURE__ */ jsx23(
5269
5627
  Input,
5270
5628
  {
5271
5629
  "aria-label": config.searchPlaceholder ?? "\u641C\u7D22\u9009\u9879",
5272
5630
  placeholder: config.searchPlaceholder ?? "\u641C\u7D22\u9009\u9879",
5273
- prefix: /* @__PURE__ */ jsx22(Icon, { name: "search", size: 14 }),
5631
+ prefix: /* @__PURE__ */ jsx23(Icon, { name: "search", size: 14 }),
5274
5632
  value: query,
5275
5633
  allowClear: true,
5276
5634
  disabled,
@@ -5281,8 +5639,8 @@ function SelectModalBody({ config, values, disabled, onChange }) {
5281
5639
  }
5282
5640
  )
5283
5641
  ] }),
5284
- multiple ? /* @__PURE__ */ jsxs21("div", { className: "sia-select-modal__actions", children: [
5285
- /* @__PURE__ */ jsx22(
5642
+ multiple ? /* @__PURE__ */ jsxs22("div", { className: "sia-select-modal__actions", children: [
5643
+ /* @__PURE__ */ jsx23(
5286
5644
  Checkbox,
5287
5645
  {
5288
5646
  checked: all,
@@ -5292,10 +5650,10 @@ function SelectModalBody({ config, values, disabled, onChange }) {
5292
5650
  children: "\u5168\u9009"
5293
5651
  }
5294
5652
  ),
5295
- /* @__PURE__ */ jsx22(Button, { variant: "link", size: "small", disabled: disabled || !enabled.length, onClick: () => batch("invert"), children: "\u53CD\u9009" }),
5296
- /* @__PURE__ */ jsx22(Button, { variant: "link", size: "small", danger: true, disabled: disabled || !values.length, onClick: () => onChange([]), children: "\u6E05\u7A7A" })
5653
+ /* @__PURE__ */ jsx23(Button, { variant: "link", size: "small", disabled: disabled || !enabled.length, onClick: () => batch("invert"), children: "\u53CD\u9009" }),
5654
+ /* @__PURE__ */ jsx23(Button, { variant: "link", size: "small", danger: true, disabled: disabled || !values.length, onClick: () => onChange([]), children: "\u6E05\u7A7A" })
5297
5655
  ] }) : null,
5298
- /* @__PURE__ */ jsx22(
5656
+ /* @__PURE__ */ jsx23(
5299
5657
  SelectionPanel,
5300
5658
  {
5301
5659
  options: filtered,
@@ -5322,7 +5680,7 @@ function openSelectModal(config) {
5322
5680
  if (config.mode !== "multiple") values = values.slice(0, 1);
5323
5681
  let submitting = false;
5324
5682
  function body() {
5325
- return /* @__PURE__ */ jsx22(SelectModalBody, { config: current, values, disabled: submitting || Boolean(current.confirmLoading), onChange: (next) => {
5683
+ return /* @__PURE__ */ jsx23(SelectModalBody, { config: current, values, disabled: submitting || Boolean(current.confirmLoading), onChange: (next) => {
5326
5684
  values = next;
5327
5685
  handle.update({ children: body() });
5328
5686
  } });
@@ -5365,8 +5723,8 @@ function openSelectModal(config) {
5365
5723
  }
5366
5724
 
5367
5725
  // src/components/Treemap.tsx
5368
- import { useEffect as useEffect13, useMemo as useMemo8, useRef as useRef18, useState as useState19 } from "react";
5369
- import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
5726
+ import { useEffect as useEffect14, useMemo as useMemo9, useRef as useRef19, useState as useState20 } from "react";
5727
+ import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
5370
5728
  import { createElement } from "react";
5371
5729
  function positiveValue(value) {
5372
5730
  return Number.isFinite(value) && value > 0 ? value : 1;
@@ -5738,19 +6096,19 @@ function Treemap({
5738
6096
  style,
5739
6097
  ...props
5740
6098
  }) {
5741
- const containerRef = useRef18(null);
5742
- const [size, setSize] = useState19({ width: 0, height: 0 });
5743
- const [internalExpandedKeys, setInternalExpandedKeys] = useState19(() => [...defaultExpandedKeys]);
5744
- const [internalFocusedKey, setInternalFocusedKey] = useState19(defaultFocusedKey);
6099
+ const containerRef = useRef19(null);
6100
+ const [size, setSize] = useState20({ width: 0, height: 0 });
6101
+ const [internalExpandedKeys, setInternalExpandedKeys] = useState20(() => [...defaultExpandedKeys]);
6102
+ const [internalFocusedKey, setInternalFocusedKey] = useState20(defaultFocusedKey);
5745
6103
  const currentExpandedKeys = expandedKeys ?? internalExpandedKeys;
5746
6104
  const currentFocusedKey = focusedKey === void 0 ? internalFocusedKey : focusedKey;
5747
- const expandedSet = useMemo8(() => new Set(currentExpandedKeys), [currentExpandedKeys]);
5748
- const focusedNode = useMemo8(
6105
+ const expandedSet = useMemo9(() => new Set(currentExpandedKeys), [currentExpandedKeys]);
6106
+ const focusedNode = useMemo9(
5749
6107
  () => currentFocusedKey ? findNode(data, currentFocusedKey) : null,
5750
6108
  [currentFocusedKey, data]
5751
6109
  );
5752
6110
  const effectiveFocusedNode = focusedNode && expandedSet.has(focusedNode.key) && Boolean(focusedNode.children?.length) ? focusedNode : null;
5753
- const positions = useMemo8(
6111
+ const positions = useMemo9(
5754
6112
  () => collectPositions(
5755
6113
  effectiveFocusedNode ? [effectiveFocusedNode] : data,
5756
6114
  { x: 0, y: 0, ...size },
@@ -5766,7 +6124,7 @@ function Treemap({
5766
6124
  ),
5767
6125
  [activeKey, aggregateOverflow, data, effectiveFocusedNode, expandedSet, gap, headerHeight, maxVisibleNodes, minTileHeight, minTileWidth, overflowLabel, size]
5768
6126
  );
5769
- useEffect13(() => {
6127
+ useEffect14(() => {
5770
6128
  const element = containerRef.current;
5771
6129
  if (!element) return void 0;
5772
6130
  const updateSize = () => {
@@ -5778,7 +6136,7 @@ function Treemap({
5778
6136
  observer.observe(element);
5779
6137
  return () => observer.disconnect();
5780
6138
  }, []);
5781
- useEffect13(() => {
6139
+ useEffect14(() => {
5782
6140
  if (!currentFocusedKey || effectiveFocusedNode) return;
5783
6141
  if (focusedKey === void 0) setInternalFocusedKey(null);
5784
6142
  onFocusedChange?.(null);
@@ -5798,7 +6156,7 @@ function Treemap({
5798
6156
  }
5799
6157
  onNodeClick?.({ node, expanded: isExpanded, nativeEvent });
5800
6158
  }
5801
- return /* @__PURE__ */ jsxs22(
6159
+ return /* @__PURE__ */ jsxs23(
5802
6160
  "div",
5803
6161
  {
5804
6162
  ...withTitleTooltip(props),
@@ -5807,7 +6165,7 @@ function Treemap({
5807
6165
  style,
5808
6166
  role: "tree",
5809
6167
  children: [
5810
- data.length === 0 ? /* @__PURE__ */ jsx23("div", { className: "sia-treemap__empty", children: emptyContent }) : null,
6168
+ data.length === 0 ? /* @__PURE__ */ jsx24("div", { className: "sia-treemap__empty", children: emptyContent }) : null,
5811
6169
  positions.map(({ node, rectangle, depth, expanded }) => {
5812
6170
  const active = node.key === activeKey || Boolean(node.__active);
5813
6171
  const fontSize = tileFontSize(rectangle);
@@ -5837,8 +6195,8 @@ function Treemap({
5837
6195
  "data-treemap-key": node.key,
5838
6196
  key: node.key
5839
6197
  },
5840
- /* @__PURE__ */ jsxs22("div", { className: "sia-treemap__header", children: [
5841
- /* @__PURE__ */ jsxs22(
6198
+ /* @__PURE__ */ jsxs23("div", { className: "sia-treemap__header", children: [
6199
+ /* @__PURE__ */ jsxs23(
5842
6200
  "button",
5843
6201
  {
5844
6202
  type: "button",
@@ -5846,12 +6204,12 @@ function Treemap({
5846
6204
  disabled: node.disabled,
5847
6205
  onClick: (event) => handleNodeClick(node, event),
5848
6206
  children: [
5849
- /* @__PURE__ */ jsx23("span", { className: "sia-treemap__label", children: node.label }),
5850
- showValue ? /* @__PURE__ */ jsx23("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
6207
+ /* @__PURE__ */ jsx24("span", { className: "sia-treemap__label", children: node.label }),
6208
+ showValue ? /* @__PURE__ */ jsx24("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
5851
6209
  ]
5852
6210
  }
5853
6211
  ),
5854
- /* @__PURE__ */ jsx23(
6212
+ /* @__PURE__ */ jsx24(
5855
6213
  "button",
5856
6214
  {
5857
6215
  type: "button",
@@ -5859,7 +6217,7 @@ function Treemap({
5859
6217
  "aria-label": effectiveFocusedNode?.key === node.key ? `\u8FD8\u539F ${node.label}` : `\u805A\u7126\u5C55\u5F00 ${node.label}`,
5860
6218
  ...withTitleTooltip({ title: effectiveFocusedNode?.key === node.key ? "\u8FD8\u539F\u539F\u6709\u89C6\u56FE" : "\u5C55\u5F00\u5230\u6574\u4E2A\u533A\u57DF" }),
5861
6219
  onClick: () => updateFocusedKey(effectiveFocusedNode?.key === node.key ? null : node.key),
5862
- children: /* @__PURE__ */ jsx23(Icon, { name: effectiveFocusedNode?.key === node.key ? "fullscreen-exit" : "fullscreen", size: 14 })
6220
+ children: /* @__PURE__ */ jsx24(Icon, { name: effectiveFocusedNode?.key === node.key ? "fullscreen-exit" : "fullscreen", size: 14 })
5863
6221
  }
5864
6222
  )
5865
6223
  ] })
@@ -5879,9 +6237,9 @@ function Treemap({
5879
6237
  onClick: (event) => handleNodeClick(node, event),
5880
6238
  key: node.key
5881
6239
  },
5882
- showLabel ? /* @__PURE__ */ jsxs22("span", { className: "sia-treemap__content", children: [
5883
- /* @__PURE__ */ jsx23("span", { className: "sia-treemap__label", children: node.label }),
5884
- showValue ? /* @__PURE__ */ jsx23("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
6240
+ showLabel ? /* @__PURE__ */ jsxs23("span", { className: "sia-treemap__content", children: [
6241
+ /* @__PURE__ */ jsx24("span", { className: "sia-treemap__label", children: node.label }),
6242
+ showValue ? /* @__PURE__ */ jsx24("span", { className: "sia-treemap__value", children: valueFormatter(node.value, node) }) : null
5885
6243
  ] }) : null
5886
6244
  );
5887
6245
  })
@@ -5891,8 +6249,8 @@ function Treemap({
5891
6249
  }
5892
6250
 
5893
6251
  // src/components/Table/TableCellContent.tsx
5894
- import { useLayoutEffect as useLayoutEffect5, useRef as useRef19, useState as useState20 } from "react";
5895
- import { jsx as jsx24 } from "react/jsx-runtime";
6252
+ import { useLayoutEffect as useLayoutEffect5, useRef as useRef20, useState as useState21 } from "react";
6253
+ import { jsx as jsx25 } from "react/jsx-runtime";
5896
6254
  var pendingLayouts = /* @__PURE__ */ new Map();
5897
6255
  var layoutFrame;
5898
6256
  function scheduleLayout(element, task) {
@@ -5910,8 +6268,8 @@ function scheduleLayout(element, task) {
5910
6268
  });
5911
6269
  }
5912
6270
  function TableCellContent({ children, ellipsis, title }) {
5913
- const ref = useRef19(null);
5914
- const [overflowing, setOverflowing] = useState20(false);
6271
+ const ref = useRef20(null);
6272
+ const [overflowing, setOverflowing] = useState21(false);
5915
6273
  const customContent = typeof children !== "string" && typeof children !== "number" && children != null;
5916
6274
  useLayoutEffect5(() => {
5917
6275
  const element = ref.current;
@@ -5945,13 +6303,13 @@ function TableCellContent({ children, ellipsis, title }) {
5945
6303
  pendingLayouts.delete(element);
5946
6304
  };
5947
6305
  }, [children, ellipsis, customContent]);
5948
- return /* @__PURE__ */ jsx24("div", { ref, className: "sia-table__cell-content", "data-custom-content": customContent || void 0, "data-content-overflow": ellipsis && customContent && overflowing || void 0, children: title ? /* @__PURE__ */ jsx24(Tooltip, { title, className: "sia-table__cell-tooltip", children: /* @__PURE__ */ jsx24("span", { children }) }) : children });
6306
+ return /* @__PURE__ */ jsx25("div", { ref, className: "sia-table__cell-content", "data-custom-content": customContent || void 0, "data-content-overflow": ellipsis && customContent && overflowing || void 0, children: title ? /* @__PURE__ */ jsx25(Tooltip, { title, className: "sia-table__cell-tooltip", children: /* @__PURE__ */ jsx25("span", { children }) }) : children });
5949
6307
  }
5950
6308
 
5951
6309
  // src/components/Table/useRemainingHeight.ts
5952
- import { useLayoutEffect as useLayoutEffect6, useState as useState21 } from "react";
6310
+ import { useLayoutEffect as useLayoutEffect6, useState as useState22 } from "react";
5953
6311
  function useRemainingHeight(rootRef, options) {
5954
- const [height, setHeight] = useState21();
6312
+ const [height, setHeight] = useState22();
5955
6313
  const enabled = !!options;
5956
6314
  const container = typeof options === "object" ? options.container : void 0;
5957
6315
  const bottomOffset = typeof options === "object" ? options.bottomOffset ?? 0 : 0;
@@ -6027,7 +6385,7 @@ function useRemainingHeight(rootRef, options) {
6027
6385
  }
6028
6386
 
6029
6387
  // src/components/Table/TableCanvasLayer.tsx
6030
- import { useLayoutEffect as useLayoutEffect7, useRef as useRef20 } from "react";
6388
+ import { useLayoutEffect as useLayoutEffect7, useRef as useRef21 } from "react";
6031
6389
 
6032
6390
  // src/components/Table/utils.ts
6033
6391
  var AUTO_WIDTH_COLUMN_KEYS = /* @__PURE__ */ new Set(["action", "actions", "operation", "operations"]);
@@ -6080,9 +6438,9 @@ function toTablePageParams(current, pageSize) {
6080
6438
  }
6081
6439
 
6082
6440
  // src/components/Table/TableCanvasLayer.tsx
6083
- import { jsx as jsx25 } from "react/jsx-runtime";
6441
+ import { jsx as jsx26 } from "react/jsx-runtime";
6084
6442
  function TableCanvasLayer({ viewport, rows, columns, widths, rowHeight, headerHeight }) {
6085
- const canvasRef = useRef20(null);
6443
+ const canvasRef = useRef21(null);
6086
6444
  useLayoutEffect7(() => {
6087
6445
  const canvas = canvasRef.current;
6088
6446
  const scroller = viewport.current;
@@ -6206,7 +6564,7 @@ function TableCanvasLayer({ viewport, rows, columns, widths, rowHeight, headerHe
6206
6564
  window.removeEventListener("resize", schedule);
6207
6565
  };
6208
6566
  }, [viewport, rows, columns, widths, rowHeight, headerHeight]);
6209
- return /* @__PURE__ */ jsx25("canvas", { ref: canvasRef, "aria-hidden": "true", className: "sia-table__canvas-layer" });
6567
+ return /* @__PURE__ */ jsx26("canvas", { ref: canvasRef, "aria-hidden": "true", className: "sia-table__canvas-layer" });
6210
6568
  }
6211
6569
 
6212
6570
  // src/components/Table/rowIdentity.ts
@@ -6268,10 +6626,10 @@ function playCellFocusGlow(cell, isVisible, onFinish, options) {
6268
6626
  }
6269
6627
 
6270
6628
  // src/components/Table/Table.tsx
6271
- import { Fragment as Fragment9, forwardRef as forwardRef6, isValidElement as isValidElement4, memo, useCallback as useCallback2, useEffect as useEffect15, useImperativeHandle, useMemo as useMemo9, useRef as useRef22, useState as useState23 } from "react";
6629
+ import { Fragment as Fragment9, forwardRef as forwardRef6, isValidElement as isValidElement4, memo, useCallback as useCallback2, useEffect as useEffect16, useImperativeHandle, useMemo as useMemo10, useRef as useRef23, useState as useState24 } from "react";
6272
6630
 
6273
6631
  // src/components/Table/plugins.tsx
6274
- import { isValidElement as isValidElement3, useEffect as useEffect14, useRef as useRef21, useState as useState22 } from "react";
6632
+ import { isValidElement as isValidElement3, useEffect as useEffect15, useRef as useRef22, useState as useState23 } from "react";
6275
6633
 
6276
6634
  // src/components/Table/columnSettings.ts
6277
6635
  function reconcileColumnSettings(columns, defaults, saved) {
@@ -6358,7 +6716,7 @@ function saveSettingsPatch(adapter, scope, patch) {
6358
6716
  }
6359
6717
 
6360
6718
  // src/components/Table/plugins.tsx
6361
- import { Fragment as Fragment8, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
6719
+ import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
6362
6720
  function TableCheckbox({
6363
6721
  checked,
6364
6722
  indeterminate,
@@ -6366,7 +6724,7 @@ function TableCheckbox({
6366
6724
  label,
6367
6725
  onChange
6368
6726
  }) {
6369
- return /* @__PURE__ */ jsx26(
6727
+ return /* @__PURE__ */ jsx27(
6370
6728
  Checkbox,
6371
6729
  {
6372
6730
  className: "sia-table__checkbox",
@@ -6984,20 +7342,20 @@ function TableSelectedItemsPanel({
6984
7342
  onRemove,
6985
7343
  onClear
6986
7344
  }) {
6987
- const [showAll, setShowAll] = useState22(false);
7345
+ const [showAll, setShowAll] = useState23(false);
6988
7346
  const visibleEntries = showAll ? entries : entries.slice(0, maxCount);
6989
7347
  const hiddenCount = Math.max(0, entries.length - visibleEntries.length);
6990
7348
  const baseColumnMap = new Map(
6991
7349
  flattenTableColumns(baseColumns).map((column) => [column.key, column])
6992
7350
  );
6993
- return /* @__PURE__ */ jsxs23("div", { className: "sia-table-selection-panel", children: [
6994
- /* @__PURE__ */ jsxs23("div", { className: "sia-table-selection-panel__header", children: [
6995
- /* @__PURE__ */ jsxs23("strong", { children: [
7351
+ return /* @__PURE__ */ jsxs24("div", { className: "sia-table-selection-panel", children: [
7352
+ /* @__PURE__ */ jsxs24("div", { className: "sia-table-selection-panel__header", children: [
7353
+ /* @__PURE__ */ jsxs24("strong", { children: [
6996
7354
  "\u5DF2\u9009 ",
6997
- /* @__PURE__ */ jsx26("span", { children: entries.length }),
7355
+ /* @__PURE__ */ jsx27("span", { children: entries.length }),
6998
7356
  " \u9879"
6999
7357
  ] }),
7000
- /* @__PURE__ */ jsx26(
7358
+ /* @__PURE__ */ jsx27(
7001
7359
  Button,
7002
7360
  {
7003
7361
  size: "small",
@@ -7008,15 +7366,15 @@ function TableSelectedItemsPanel({
7008
7366
  }
7009
7367
  )
7010
7368
  ] }),
7011
- /* @__PURE__ */ jsx26("div", { className: "sia-table-selection-panel__body", children: /* @__PURE__ */ jsxs23("table", { children: [
7012
- /* @__PURE__ */ jsx26("thead", { children: /* @__PURE__ */ jsxs23("tr", { children: [
7013
- columns.map((column) => /* @__PURE__ */ jsx26("th", { children: getColumnLabel(column) }, column.key)),
7014
- /* @__PURE__ */ jsx26("th", { "aria-label": "\u64CD\u4F5C" })
7369
+ /* @__PURE__ */ jsx27("div", { className: "sia-table-selection-panel__body", children: /* @__PURE__ */ jsxs24("table", { children: [
7370
+ /* @__PURE__ */ jsx27("thead", { children: /* @__PURE__ */ jsxs24("tr", { children: [
7371
+ columns.map((column) => /* @__PURE__ */ jsx27("th", { children: getColumnLabel(column) }, column.key)),
7372
+ /* @__PURE__ */ jsx27("th", { "aria-label": "\u64CD\u4F5C" })
7015
7373
  ] }) }),
7016
- /* @__PURE__ */ jsx26("tbody", { children: visibleEntries.map((entry, selectedIndex) => /* @__PURE__ */ jsxs23("tr", { children: [
7374
+ /* @__PURE__ */ jsx27("tbody", { children: visibleEntries.map((entry, selectedIndex) => /* @__PURE__ */ jsxs24("tr", { children: [
7017
7375
  columns.map((column) => {
7018
7376
  if (column.meta?.plugin === "index")
7019
- return /* @__PURE__ */ jsx26("td", { children: entry.sourceIndex + 1 }, column.key);
7377
+ return /* @__PURE__ */ jsx27("td", { children: entry.sourceIndex + 1 }, column.key);
7020
7378
  const baseColumn = baseColumnMap.get(column.key) ?? column;
7021
7379
  const value = getTableValue(
7022
7380
  entry.record,
@@ -7036,9 +7394,9 @@ function TableSelectedItemsPanel({
7036
7394
  entry.sourceIndex,
7037
7395
  { row, rowIndex: entry.sourceIndex, column: baseColumn }
7038
7396
  ) ?? value;
7039
- return /* @__PURE__ */ jsx26("td", { children: content }, column.key);
7397
+ return /* @__PURE__ */ jsx27("td", { children: content }, column.key);
7040
7398
  }),
7041
- /* @__PURE__ */ jsx26("td", { children: /* @__PURE__ */ jsx26(
7399
+ /* @__PURE__ */ jsx27("td", { children: /* @__PURE__ */ jsx27(
7042
7400
  Button,
7043
7401
  {
7044
7402
  size: "small",
@@ -7049,11 +7407,11 @@ function TableSelectedItemsPanel({
7049
7407
  ) })
7050
7408
  ] }, entry.key)) })
7051
7409
  ] }) }),
7052
- hiddenCount > 0 ? /* @__PURE__ */ jsxs23("div", { className: "sia-table-selection-panel__more", children: [
7410
+ hiddenCount > 0 ? /* @__PURE__ */ jsxs24("div", { className: "sia-table-selection-panel__more", children: [
7053
7411
  "\u8FD8\u6709 ",
7054
7412
  hiddenCount,
7055
7413
  " \u9879\u672A\u5C55\u793A",
7056
- /* @__PURE__ */ jsx26(Button, { size: "small", variant: "link", onClick: () => setShowAll(true), children: "\u5C55\u793A\u5168\u90E8" })
7414
+ /* @__PURE__ */ jsx27(Button, { size: "small", variant: "link", onClick: () => setShowAll(true), children: "\u5C55\u793A\u5168\u90E8" })
7057
7415
  ] }) : null
7058
7416
  ] });
7059
7417
  }
@@ -7174,7 +7532,7 @@ function createSelectionPlugin(options = {}) {
7174
7532
  const keys = selected(context);
7175
7533
  const allChecked = enabledRows.length > 0 && enabledRows.every((row) => keys.includes(row.key));
7176
7534
  const someChecked = enabledRows.some((row) => keys.includes(row.key));
7177
- return /* @__PURE__ */ jsx26(
7535
+ return /* @__PURE__ */ jsx27(
7178
7536
  TableCheckbox,
7179
7537
  {
7180
7538
  label: "\u9009\u62E9\u5F53\u524D\u9875\u5168\u90E8\u884C",
@@ -7190,7 +7548,7 @@ function createSelectionPlugin(options = {}) {
7190
7548
  }
7191
7549
  );
7192
7550
  },
7193
- render: (_value, record, _index, info) => mode === "single" ? /* @__PURE__ */ jsx26(
7551
+ render: (_value, record, _index, info) => mode === "single" ? /* @__PURE__ */ jsx27(
7194
7552
  Radio2,
7195
7553
  {
7196
7554
  className: "sia-table__checkbox",
@@ -7201,7 +7559,7 @@ function createSelectionPlugin(options = {}) {
7201
7559
  onClick: (event) => event.stopPropagation(),
7202
7560
  onChange: () => toggle(info.row.key, record, context)
7203
7561
  }
7204
- ) : /* @__PURE__ */ jsx26(
7562
+ ) : /* @__PURE__ */ jsx27(
7205
7563
  TableCheckbox,
7206
7564
  {
7207
7565
  label: `\u9009\u62E9\u7B2C ${info.rowIndex + 1} \u884C`,
@@ -7241,8 +7599,8 @@ function createSelectionPlugin(options = {}) {
7241
7599
  const columns = flattenTableColumns(context.columns).filter(
7242
7600
  (column) => !column.hidden && column.meta?.plugin !== "selection"
7243
7601
  ).slice(0, Math.max(1, options.selectionPanelColumnCount ?? 4));
7244
- return /* @__PURE__ */ jsxs23("span", { className: "sia-table__selection-footer", children: [
7245
- /* @__PURE__ */ jsx26(
7602
+ return /* @__PURE__ */ jsxs24("span", { className: "sia-table__selection-footer", children: [
7603
+ /* @__PURE__ */ jsx27(
7246
7604
  Popover,
7247
7605
  {
7248
7606
  placement: "top-start",
@@ -7250,7 +7608,7 @@ function createSelectionPlugin(options = {}) {
7250
7608
  open: context.state.panelOpen && entries.length > 0,
7251
7609
  onOpenChange: (panelOpen) => context.setState((state) => ({ ...state, panelOpen })),
7252
7610
  overlayClassName: "sia-table-selection-popover",
7253
- content: /* @__PURE__ */ jsx26(
7611
+ content: /* @__PURE__ */ jsx27(
7254
7612
  TableSelectedItemsPanel,
7255
7613
  {
7256
7614
  entries,
@@ -7266,7 +7624,7 @@ function createSelectionPlugin(options = {}) {
7266
7624
  onClear: () => setKeys([], context)
7267
7625
  }
7268
7626
  ),
7269
- children: /* @__PURE__ */ jsxs23(
7627
+ children: /* @__PURE__ */ jsxs24(
7270
7628
  Button,
7271
7629
  {
7272
7630
  className: "sia-table__selected-trigger",
@@ -7282,7 +7640,7 @@ function createSelectionPlugin(options = {}) {
7282
7640
  )
7283
7641
  }
7284
7642
  ),
7285
- mode === "multiple" && options.showPreserveSelectedRowKeys !== false ? /* @__PURE__ */ jsx26(
7643
+ mode === "multiple" && options.showPreserveSelectedRowKeys !== false ? /* @__PURE__ */ jsx27(
7286
7644
  Checkbox,
7287
7645
  {
7288
7646
  checked: preserving(context),
@@ -7339,9 +7697,9 @@ function createSortPlugin(options = {}) {
7339
7697
  const info = current(context);
7340
7698
  const order = info?.field === field ? info.order : null;
7341
7699
  const sortHint = `${getColumnLabel(currentColumn)}\uFF1A${order === "ascend" ? "\u5F53\u524D\u5347\u5E8F\uFF0C\u70B9\u51FB\u5207\u6362\u4E3A\u964D\u5E8F" : order === "descend" ? "\u5F53\u524D\u964D\u5E8F\uFF0C\u70B9\u51FB\u53D6\u6D88\u6392\u5E8F" : "\u672A\u6392\u5E8F\uFF0C\u70B9\u51FB\u6309\u5347\u5E8F\u6392\u5E8F"}`;
7342
- return /* @__PURE__ */ jsxs23("span", { className: "sia-table__sortable-header", children: [
7343
- /* @__PURE__ */ jsx26("span", { children: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title ?? currentColumn.name ?? currentColumn.key }),
7344
- /* @__PURE__ */ jsx26(
7700
+ return /* @__PURE__ */ jsxs24("span", { className: "sia-table__sortable-header", children: [
7701
+ /* @__PURE__ */ jsx27("span", { children: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title ?? currentColumn.name ?? currentColumn.key }),
7702
+ /* @__PURE__ */ jsx27(
7345
7703
  "button",
7346
7704
  {
7347
7705
  type: "button",
@@ -7353,9 +7711,9 @@ function createSortPlugin(options = {}) {
7353
7711
  event.stopPropagation();
7354
7712
  cycle(field, context);
7355
7713
  },
7356
- children: order ? /* @__PURE__ */ jsx26(Icon, { name: order === "ascend" ? "chevron-up" : "chevron-down", size: 18 }) : /* @__PURE__ */ jsxs23(Fragment8, { children: [
7357
- /* @__PURE__ */ jsx26(Icon, { name: "chevron-up", size: 11 }),
7358
- /* @__PURE__ */ jsx26(Icon, { name: "chevron-down", size: 11 })
7714
+ children: order ? /* @__PURE__ */ jsx27(Icon, { name: order === "ascend" ? "chevron-up" : "chevron-down", size: 18 }) : /* @__PURE__ */ jsxs24(Fragment8, { children: [
7715
+ /* @__PURE__ */ jsx27(Icon, { name: "chevron-up", size: 11 }),
7716
+ /* @__PURE__ */ jsx27(Icon, { name: "chevron-down", size: 11 })
7359
7717
  ] })
7360
7718
  }
7361
7719
  )
@@ -7390,27 +7748,27 @@ function TableFilterControl({
7390
7748
  placeholder,
7391
7749
  onApply
7392
7750
  }) {
7393
- const [open, setOpen] = useState22(false);
7394
- const [draft, setDraft] = useState22(value);
7751
+ const [open, setOpen] = useState23(false);
7752
+ const [draft, setDraft] = useState23(value);
7395
7753
  const label = getColumnLabel(column);
7396
- useEffect14(() => {
7754
+ useEffect15(() => {
7397
7755
  if (open) setDraft(value);
7398
7756
  }, [open, value]);
7399
7757
  const apply = (nextValue) => {
7400
7758
  onApply(nextValue.trim());
7401
7759
  setOpen(false);
7402
7760
  };
7403
- return /* @__PURE__ */ jsxs23("span", { className: "sia-table__filter-header", children: [
7404
- /* @__PURE__ */ jsx26("span", { children: column.title ?? column.name ?? column.key }),
7405
- /* @__PURE__ */ jsx26(
7761
+ return /* @__PURE__ */ jsxs24("span", { className: "sia-table__filter-header", children: [
7762
+ /* @__PURE__ */ jsx27("span", { children: column.title ?? column.name ?? column.key }),
7763
+ /* @__PURE__ */ jsx27(
7406
7764
  Popover,
7407
7765
  {
7408
7766
  open,
7409
7767
  onOpenChange: setOpen,
7410
7768
  placement: "bottom-end",
7411
7769
  overlayClassName: "sia-table-filter-popover",
7412
- content: /* @__PURE__ */ jsxs23("div", { className: "sia-table-filter-panel", children: [
7413
- /* @__PURE__ */ jsx26(
7770
+ content: /* @__PURE__ */ jsxs24("div", { className: "sia-table-filter-panel", children: [
7771
+ /* @__PURE__ */ jsx27(
7414
7772
  Input,
7415
7773
  {
7416
7774
  size: "small",
@@ -7424,8 +7782,8 @@ function TableFilterControl({
7424
7782
  }
7425
7783
  }
7426
7784
  ),
7427
- /* @__PURE__ */ jsxs23("div", { className: "sia-table-filter-panel__actions", children: [
7428
- /* @__PURE__ */ jsx26(
7785
+ /* @__PURE__ */ jsxs24("div", { className: "sia-table-filter-panel__actions", children: [
7786
+ /* @__PURE__ */ jsx27(
7429
7787
  Button,
7430
7788
  {
7431
7789
  size: "small",
@@ -7437,7 +7795,7 @@ function TableFilterControl({
7437
7795
  children: "\u6E05\u9664"
7438
7796
  }
7439
7797
  ),
7440
- /* @__PURE__ */ jsx26(
7798
+ /* @__PURE__ */ jsx27(
7441
7799
  Button,
7442
7800
  {
7443
7801
  size: "small",
@@ -7448,7 +7806,7 @@ function TableFilterControl({
7448
7806
  )
7449
7807
  ] })
7450
7808
  ] }),
7451
- children: /* @__PURE__ */ jsx26(
7809
+ children: /* @__PURE__ */ jsx27(
7452
7810
  "button",
7453
7811
  {
7454
7812
  type: "button",
@@ -7456,7 +7814,7 @@ function TableFilterControl({
7456
7814
  "aria-label": `\u7B5B\u9009${label}`,
7457
7815
  "aria-pressed": Boolean(value),
7458
7816
  onClick: (event) => event.stopPropagation(),
7459
- children: /* @__PURE__ */ jsx26(Icon, { name: "search", size: 13 })
7817
+ children: /* @__PURE__ */ jsx27(Icon, { name: "search", size: 13 })
7460
7818
  }
7461
7819
  )
7462
7820
  }
@@ -7518,7 +7876,7 @@ function createFilterPlugin(options = {}) {
7518
7876
  title: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title
7519
7877
  };
7520
7878
  const placeholder = typeof options.placeholder === "function" ? options.placeholder(currentColumn) : options.placeholder ?? `\u8F93\u5165${getColumnLabel(currentColumn)}\u7B5B\u9009`;
7521
- return /* @__PURE__ */ jsx26(
7879
+ return /* @__PURE__ */ jsx27(
7522
7880
  TableFilterControl,
7523
7881
  {
7524
7882
  column: renderedColumn,
@@ -7607,7 +7965,7 @@ function createPaginationPlugin(options = {}) {
7607
7965
  const page = currentPage(context);
7608
7966
  const filteredCount = context.getPluginApi("filter")?.getFilteredRows().length;
7609
7967
  const totalRecords = options.totalCount ?? filteredCount ?? context.sourceData.length;
7610
- return /* @__PURE__ */ jsx26(
7968
+ return /* @__PURE__ */ jsx27(
7611
7969
  Pagination,
7612
7970
  {
7613
7971
  className: "sia-table__pagination",
@@ -7745,19 +8103,19 @@ function createTreePlugin(options = {}) {
7745
8103
  return {
7746
8104
  ...column,
7747
8105
  ...options.showLine ? { ellipsis: false, meta: { ...column.meta, treeLines: true } } : {},
7748
- render: (value, record, index, info) => /* @__PURE__ */ jsxs23(
8106
+ render: (value, record, index, info) => /* @__PURE__ */ jsxs24(
7749
8107
  "span",
7750
8108
  {
7751
8109
  className: `sia-table__tree-cell${options.showLine ? " sia-table__tree-cell--lines" : ""}`,
7752
8110
  style: options.showLine ? void 0 : { paddingLeft: info.row.depth * 18 },
7753
8111
  children: [
7754
- options.showLine && info.row.depth > 0 && /* @__PURE__ */ jsxs23(Fragment8, { children: [
7755
- info.row.meta.treeGuides.map((continued, level) => /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", className: `sia-table__tree-guide${continued ? " sia-table__tree-guide--continued" : ""}` }, level)),
7756
- /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", className: `sia-table__tree-guide sia-table__tree-guide--branch${info.row.meta.treeHasNextSibling ? " sia-table__tree-guide--continued" : ""}` })
8112
+ options.showLine && info.row.depth > 0 && /* @__PURE__ */ jsxs24(Fragment8, { children: [
8113
+ info.row.meta.treeGuides.map((continued, level) => /* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: `sia-table__tree-guide${continued ? " sia-table__tree-guide--continued" : ""}` }, level)),
8114
+ /* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: `sia-table__tree-guide sia-table__tree-guide--branch${info.row.meta.treeHasNextSibling ? " sia-table__tree-guide--continued" : ""}` })
7757
8115
  ] }),
7758
- /* @__PURE__ */ jsxs23("span", { className: options.showLine ? "sia-table__tree-node" : void 0, style: options.showLine ? void 0 : { display: "contents" }, children: [
7759
- options.showLine && !!info.row.meta.treeHasChildren && current(context).includes(info.row.key) && /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", className: "sia-table__tree-stem" }),
7760
- info.row.meta.treeHasChildren ? /* @__PURE__ */ jsx26(
8116
+ /* @__PURE__ */ jsxs24("span", { className: options.showLine ? "sia-table__tree-node" : void 0, style: options.showLine ? void 0 : { display: "contents" }, children: [
8117
+ options.showLine && !!info.row.meta.treeHasChildren && current(context).includes(info.row.key) && /* @__PURE__ */ jsx27("span", { "aria-hidden": "true", className: "sia-table__tree-stem" }),
8118
+ info.row.meta.treeHasChildren ? /* @__PURE__ */ jsx27(
7761
8119
  "button",
7762
8120
  {
7763
8121
  type: "button",
@@ -7768,7 +8126,7 @@ function createTreePlugin(options = {}) {
7768
8126
  event.stopPropagation();
7769
8127
  toggle(info.row.key, context);
7770
8128
  },
7771
- children: /* @__PURE__ */ jsx26(
8129
+ children: /* @__PURE__ */ jsx27(
7772
8130
  Icon,
7773
8131
  {
7774
8132
  name: current(context).includes(info.row.key) ? "chevron-down" : "chevron-right",
@@ -7776,7 +8134,7 @@ function createTreePlugin(options = {}) {
7776
8134
  }
7777
8135
  )
7778
8136
  }
7779
- ) : /* @__PURE__ */ jsx26("span", { className: "sia-table__tree-placeholder" })
8137
+ ) : /* @__PURE__ */ jsx27("span", { className: "sia-table__tree-placeholder" })
7780
8138
  ] }),
7781
8139
  previousRender ? previousRender(value, record, index, info) : value
7782
8140
  ]
@@ -7832,17 +8190,17 @@ function EditableTableCell({
7832
8190
  showEditIcon
7833
8191
  }) {
7834
8192
  const config = typeof editable === "object" ? editable : { type: "input" };
7835
- const [editValue, setEditValue] = useState22(value);
7836
- const [saving, setSaving] = useState22(false);
7837
- const inputRef = useRef21(null);
7838
- const editorRef = useRef21(null);
7839
- const editValueRef = useRef21(value);
7840
- const savingRef = useRef21(false);
7841
- const saveRef = useRef21(
8193
+ const [editValue, setEditValue] = useState23(value);
8194
+ const [saving, setSaving] = useState23(false);
8195
+ const inputRef = useRef22(null);
8196
+ const editorRef = useRef22(null);
8197
+ const editValueRef = useRef22(value);
8198
+ const savingRef = useRef22(false);
8199
+ const saveRef = useRef22(
7842
8200
  async () => {
7843
8201
  }
7844
8202
  );
7845
- useEffect14(() => {
8203
+ useEffect15(() => {
7846
8204
  if (!active) return;
7847
8205
  editValueRef.current = value;
7848
8206
  setEditValue(value);
@@ -7873,7 +8231,7 @@ function EditableTableCell({
7873
8231
  }
7874
8232
  }
7875
8233
  saveRef.current = save;
7876
- useEffect14(() => {
8234
+ useEffect15(() => {
7877
8235
  if (!active || config.type === "select" || config.type === "custom") return;
7878
8236
  const handleOutsidePointerDown = (event) => {
7879
8237
  const target = event.target;
@@ -7889,15 +8247,15 @@ function EditableTableCell({
7889
8247
  );
7890
8248
  }, [active, config.type]);
7891
8249
  if (!active)
7892
- return /* @__PURE__ */ jsxs23(
8250
+ return /* @__PURE__ */ jsxs24(
7893
8251
  "div",
7894
8252
  {
7895
8253
  className: "sia-table__editable-display",
7896
8254
  onClick: trigger === "click" ? onStart : void 0,
7897
8255
  onDoubleClick: trigger === "doubleClick" ? onStart : void 0,
7898
8256
  children: [
7899
- /* @__PURE__ */ jsx26("span", { children: content }),
7900
- showEditIcon && /* @__PURE__ */ jsx26(Icon, { name: "edit", size: 13 })
8257
+ /* @__PURE__ */ jsx27("span", { children: content }),
8258
+ showEditIcon && /* @__PURE__ */ jsx27(Icon, { name: "edit", size: 13 })
7901
8259
  ]
7902
8260
  }
7903
8261
  );
@@ -7905,7 +8263,7 @@ function EditableTableCell({
7905
8263
  if (config.type === "custom" && config.editRender) {
7906
8264
  editor = config.editRender(record, (next) => void save(next), onCancel);
7907
8265
  } else if (config.type === "inputNumber") {
7908
- editor = /* @__PURE__ */ jsx26(
8266
+ editor = /* @__PURE__ */ jsx27(
7909
8267
  InputNumber,
7910
8268
  {
7911
8269
  ref: inputRef,
@@ -7926,7 +8284,7 @@ function EditableTableCell({
7926
8284
  }
7927
8285
  );
7928
8286
  } else if (config.type === "select") {
7929
- editor = /* @__PURE__ */ jsx26(
8287
+ editor = /* @__PURE__ */ jsx27(
7930
8288
  Select,
7931
8289
  {
7932
8290
  size: "small",
@@ -7940,14 +8298,14 @@ function EditableTableCell({
7940
8298
  }
7941
8299
  );
7942
8300
  } else {
7943
- editor = /* @__PURE__ */ jsx26(
8301
+ editor = /* @__PURE__ */ jsx27(
7944
8302
  Input,
7945
8303
  {
7946
8304
  ref: inputRef,
7947
8305
  size: "small",
7948
8306
  value: String(editValue ?? ""),
7949
8307
  disabled: saving,
7950
- suffix: saving ? /* @__PURE__ */ jsx26(Icon, { name: "loader", size: 13, spin: true }) : null,
8308
+ suffix: saving ? /* @__PURE__ */ jsx27(Icon, { name: "loader", size: 13, spin: true }) : null,
7951
8309
  onChange: (event) => updateEditValue(event.target.value),
7952
8310
  onBlur: () => void save(),
7953
8311
  onKeyDown: (event) => {
@@ -7957,7 +8315,7 @@ function EditableTableCell({
7957
8315
  }
7958
8316
  );
7959
8317
  }
7960
- return /* @__PURE__ */ jsx26("div", { ref: editorRef, className: "sia-table__editor", children: editor });
8318
+ return /* @__PURE__ */ jsx27("div", { ref: editorRef, className: "sia-table__editor", children: editor });
7961
8319
  }
7962
8320
  function createEditablePlugin(options = {}) {
7963
8321
  const trigger = options.trigger ?? "click";
@@ -7977,7 +8335,7 @@ function createEditablePlugin(options = {}) {
7977
8335
  const active = canEdit && context.state.editing?.rowKey === info.row.key && context.state.editing.columnKey === column.key;
7978
8336
  const content = previousRender ? previousRender(value, record, index, info) : value;
7979
8337
  if (!canEdit) return content;
7980
- return /* @__PURE__ */ jsx26(
8338
+ return /* @__PURE__ */ jsx27(
7981
8339
  EditableTableCell,
7982
8340
  {
7983
8341
  active,
@@ -8041,9 +8399,9 @@ function createResizePlugin(options = {}) {
8041
8399
  ...column,
8042
8400
  autoWidth,
8043
8401
  width,
8044
- renderHeader: (currentColumn, coreContext) => /* @__PURE__ */ jsxs23("span", { className: "sia-table__resizable-header", children: [
8045
- /* @__PURE__ */ jsx26("span", { children: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title ?? currentColumn.name ?? currentColumn.key }),
8046
- /* @__PURE__ */ jsx26(
8402
+ renderHeader: (currentColumn, coreContext) => /* @__PURE__ */ jsxs24("span", { className: "sia-table__resizable-header", children: [
8403
+ /* @__PURE__ */ jsx27("span", { children: previousHeader ? previousHeader(currentColumn, coreContext) : currentColumn.title ?? currentColumn.name ?? currentColumn.key }),
8404
+ /* @__PURE__ */ jsx27(
8047
8405
  "span",
8048
8406
  {
8049
8407
  className: "sia-table__resize-handle",
@@ -8179,12 +8537,12 @@ function ColumnSettingPanel({
8179
8537
  onClose,
8180
8538
  onApply
8181
8539
  }) {
8182
- const [draft, setDraft] = useState22(items);
8183
- const listRef = useRef21(null);
8184
- const cancelDrag = useRef21(null);
8185
- const [preview, setPreview] = useState22(null);
8186
- const syncedDraft = useRef21({ open: false, signature: "" });
8187
- useEffect14(() => {
8540
+ const [draft, setDraft] = useState23(items);
8541
+ const listRef = useRef22(null);
8542
+ const cancelDrag = useRef22(null);
8543
+ const [preview, setPreview] = useState23(null);
8544
+ const syncedDraft = useRef22({ open: false, signature: "" });
8545
+ useEffect15(() => {
8188
8546
  const signature = JSON.stringify(items);
8189
8547
  const changed = signature !== syncedDraft.current.signature;
8190
8548
  if (open !== syncedDraft.current.open || changed) cancelDrag.current?.();
@@ -8193,7 +8551,7 @@ function ColumnSettingPanel({
8193
8551
  }
8194
8552
  syncedDraft.current = { open, signature };
8195
8553
  }, [items, open]);
8196
- useEffect14(() => () => cancelDrag.current?.(), []);
8554
+ useEffect15(() => () => cancelDrag.current?.(), []);
8197
8555
  const labels = new Map(
8198
8556
  flattenTableColumns(columns).map((column) => [
8199
8557
  column.key,
@@ -8320,7 +8678,7 @@ function ColumnSettingPanel({
8320
8678
  window.addEventListener("blur", cancel);
8321
8679
  frame = requestAnimationFrame(tick);
8322
8680
  }
8323
- return /* @__PURE__ */ jsxs23(
8681
+ return /* @__PURE__ */ jsxs24(
8324
8682
  Drawer2,
8325
8683
  {
8326
8684
  open,
@@ -8329,9 +8687,9 @@ function ColumnSettingPanel({
8329
8687
  onOpenChange: (next) => {
8330
8688
  if (!next) onClose();
8331
8689
  },
8332
- footer: /* @__PURE__ */ jsxs23(Fragment8, { children: [
8333
- /* @__PURE__ */ jsx26(Button, { onClick: onClose, children: "\u53D6\u6D88" }),
8334
- /* @__PURE__ */ jsx26(
8690
+ footer: /* @__PURE__ */ jsxs24(Fragment8, { children: [
8691
+ /* @__PURE__ */ jsx27(Button, { onClick: onClose, children: "\u53D6\u6D88" }),
8692
+ /* @__PURE__ */ jsx27(
8335
8693
  Button,
8336
8694
  {
8337
8695
  variant: "primary",
@@ -8342,19 +8700,19 @@ function ColumnSettingPanel({
8342
8700
  )
8343
8701
  ] }),
8344
8702
  children: [
8345
- loadError ? /* @__PURE__ */ jsxs23("p", { role: "alert", children: [
8703
+ loadError ? /* @__PURE__ */ jsxs24("p", { role: "alert", children: [
8346
8704
  "\u8BFB\u53D6\u5217\u914D\u7F6E\u5931\u8D25\u3002",
8347
- /* @__PURE__ */ jsx26(Button, { variant: "link", onClick: onRetry, children: "\u91CD\u8BD5" })
8705
+ /* @__PURE__ */ jsx27(Button, { variant: "link", onClick: onRetry, children: "\u91CD\u8BD5" })
8348
8706
  ] }) : null,
8349
- /* @__PURE__ */ jsx26(Spin, { spinning: Boolean(loading), className: "sia-table-settings__loading", "aria-label": loading ? "\u6B63\u5728\u8BFB\u53D6\u5217\u914D\u7F6E" : void 0, children: /* @__PURE__ */ jsxs23(
8707
+ /* @__PURE__ */ jsx27(Spin, { spinning: Boolean(loading), className: "sia-table-settings__loading", "aria-label": loading ? "\u6B63\u5728\u8BFB\u53D6\u5217\u914D\u7F6E" : void 0, children: /* @__PURE__ */ jsxs24(
8350
8708
  "fieldset",
8351
8709
  {
8352
8710
  disabled: loading || loadError,
8353
8711
  style: { border: 0, padding: 0, margin: 0, minWidth: 0 },
8354
8712
  "aria-busy": loading,
8355
8713
  children: [
8356
- /* @__PURE__ */ jsxs23("label", { className: "sia-table-settings__all", children: [
8357
- /* @__PURE__ */ jsx26(
8714
+ /* @__PURE__ */ jsxs24("label", { className: "sia-table-settings__all", children: [
8715
+ /* @__PURE__ */ jsx27(
8358
8716
  TableCheckbox,
8359
8717
  {
8360
8718
  label: "\u5168\u9009\u5217",
@@ -8365,7 +8723,7 @@ function ColumnSettingPanel({
8365
8723
  )
8366
8724
  }
8367
8725
  ),
8368
- /* @__PURE__ */ jsxs23("span", { children: [
8726
+ /* @__PURE__ */ jsxs24("span", { children: [
8369
8727
  "\u5168\u9009\uFF08",
8370
8728
  visibleCount,
8371
8729
  "/",
@@ -8373,12 +8731,12 @@ function ColumnSettingPanel({
8373
8731
  "\uFF09"
8374
8732
  ] })
8375
8733
  ] }),
8376
- /* @__PURE__ */ jsx26(
8734
+ /* @__PURE__ */ jsx27(
8377
8735
  "div",
8378
8736
  {
8379
8737
  ref: listRef,
8380
8738
  className: `sia-table-settings__list${preview ? " is-sorting" : ""}`,
8381
- children: draft.map((item) => /* @__PURE__ */ jsxs23(
8739
+ children: draft.map((item) => /* @__PURE__ */ jsxs24(
8382
8740
  "div",
8383
8741
  {
8384
8742
  "data-column-key": item.key,
@@ -8388,8 +8746,8 @@ function ColumnSettingPanel({
8388
8746
  } : void 0,
8389
8747
  onPointerDown: (event) => startSort(event, item.key),
8390
8748
  children: [
8391
- /* @__PURE__ */ jsx26(Icon, { name: "menu", size: 15 }),
8392
- /* @__PURE__ */ jsx26(
8749
+ /* @__PURE__ */ jsx27(Icon, { name: "menu", size: 15 }),
8750
+ /* @__PURE__ */ jsx27(
8393
8751
  TableCheckbox,
8394
8752
  {
8395
8753
  label: `\u663E\u793A${labels.get(item.key) ?? item.key}\u5217`,
@@ -8401,15 +8759,15 @@ function ColumnSettingPanel({
8401
8759
  )
8402
8760
  }
8403
8761
  ),
8404
- /* @__PURE__ */ jsx26(
8762
+ /* @__PURE__ */ jsx27(
8405
8763
  "span",
8406
8764
  {
8407
8765
  className: "sia-table-settings__name",
8408
8766
  children: labels.get(item.key) ?? item.key
8409
8767
  }
8410
8768
  ),
8411
- /* @__PURE__ */ jsxs23("div", { className: "sia-table-settings__actions", children: [
8412
- /* @__PURE__ */ jsx26(
8769
+ /* @__PURE__ */ jsxs24("div", { className: "sia-table-settings__actions", children: [
8770
+ /* @__PURE__ */ jsx27(
8413
8771
  Button,
8414
8772
  {
8415
8773
  size: "small",
@@ -8422,7 +8780,7 @@ function ColumnSettingPanel({
8422
8780
  children: "\u5DE6"
8423
8781
  }
8424
8782
  ),
8425
- /* @__PURE__ */ jsx26(
8783
+ /* @__PURE__ */ jsx27(
8426
8784
  Button,
8427
8785
  {
8428
8786
  size: "small",
@@ -8572,7 +8930,7 @@ function createColumnSettingPlugin(options = {}) {
8572
8930
  {
8573
8931
  key: "builtin:export",
8574
8932
  label: "\u8868\u683C\u5BFC\u51FA",
8575
- icon: /* @__PURE__ */ jsx26(Icon, { name: "download", size: 18 }),
8933
+ icon: /* @__PURE__ */ jsx27(Icon, { name: "download", size: 18 }),
8576
8934
  disabled: exportApi().getRows().length === 0
8577
8935
  },
8578
8936
  { key: "builtin:divider", type: "divider" }
@@ -8580,7 +8938,7 @@ function createColumnSettingPlugin(options = {}) {
8580
8938
  {
8581
8939
  key: "builtin:columns",
8582
8940
  label: "\u5217\u8BBE\u7F6E",
8583
- icon: /* @__PURE__ */ jsx26(Icon, { name: "settings", size: 18 })
8941
+ icon: /* @__PURE__ */ jsx27(Icon, { name: "settings", size: 18 })
8584
8942
  },
8585
8943
  ...customItems.map((item) => ({
8586
8944
  key: "custom:" + item.key,
@@ -8592,7 +8950,7 @@ function createColumnSettingPlugin(options = {}) {
8592
8950
  disabled: item.disabled === true || typeof item.disabled === "function" && item.disabled(context)
8593
8951
  }))
8594
8952
  ];
8595
- return /* @__PURE__ */ jsx26(
8953
+ return /* @__PURE__ */ jsx27(
8596
8954
  Dropdown,
8597
8955
  {
8598
8956
  disabled: options.buttonProps?.disabled || options.buttonProps?.loading,
@@ -8609,12 +8967,12 @@ function createColumnSettingPlugin(options = {}) {
8609
8967
  void customItems.find((item) => "custom:" + item.key === key)?.onClick?.(context);
8610
8968
  }
8611
8969
  },
8612
- children: /* @__PURE__ */ jsx26(
8970
+ children: /* @__PURE__ */ jsx27(
8613
8971
  Button,
8614
8972
  {
8615
8973
  size: "small",
8616
8974
  variant: "text",
8617
- icon: /* @__PURE__ */ jsx26(Icon, { name: "settings", size: 16 }),
8975
+ icon: /* @__PURE__ */ jsx27(Icon, { name: "settings", size: 16 }),
8618
8976
  "aria-label": "\u8868\u683C\u8BBE\u7F6E",
8619
8977
  ...options.buttonProps,
8620
8978
  className: `sia-table__settings-button${options.buttonProps?.children == null ? " sia-table__toolbar-icon" : ""} ${options.buttonProps?.className ?? ""}`.trim()
@@ -8623,7 +8981,7 @@ function createColumnSettingPlugin(options = {}) {
8623
8981
  }
8624
8982
  );
8625
8983
  },
8626
- renderOverlay: (context) => /* @__PURE__ */ jsx26(
8984
+ renderOverlay: (context) => /* @__PURE__ */ jsx27(
8627
8985
  ColumnSettingPanel,
8628
8986
  {
8629
8987
  open: context.state.open,
@@ -8673,11 +9031,11 @@ function ToolbarItems({
8673
9031
  items,
8674
9032
  context
8675
9033
  }) {
8676
- return /* @__PURE__ */ jsx26(Fragment8, { children: items.map((item) => {
9034
+ return /* @__PURE__ */ jsx27(Fragment8, { children: items.map((item) => {
8677
9035
  if (item.hidden === true || typeof item.hidden === "function" && item.hidden(context))
8678
9036
  return null;
8679
9037
  const disabled = item.disabled === true || typeof item.disabled === "function" && item.disabled(context);
8680
- return /* @__PURE__ */ jsx26(
9038
+ return /* @__PURE__ */ jsx27(
8681
9039
  Button,
8682
9040
  {
8683
9041
  size: "small",
@@ -8700,16 +9058,16 @@ function createToolbarPlugin(options) {
8700
9058
  return {
8701
9059
  id: "toolbar",
8702
9060
  order: 5,
8703
- renderToolbarStart: (context) => /* @__PURE__ */ jsxs23(Fragment8, { children: [
9061
+ renderToolbarStart: (context) => /* @__PURE__ */ jsxs24(Fragment8, { children: [
8704
9062
  options.start,
8705
- /* @__PURE__ */ jsx26(ToolbarItems, { items: items("start"), context })
9063
+ /* @__PURE__ */ jsx27(ToolbarItems, { items: items("start"), context })
8706
9064
  ] }),
8707
- renderToolbarEnd: (context) => /* @__PURE__ */ jsxs23(Fragment8, { children: [
9065
+ renderToolbarEnd: (context) => /* @__PURE__ */ jsxs24(Fragment8, { children: [
8708
9066
  options.end,
8709
- /* @__PURE__ */ jsx26(ToolbarItems, { items: items("end"), context }),
8710
- items("end", true).length > 0 ? /* @__PURE__ */ jsxs23("details", { className: "sia-table__toolbar-menu", children: [
8711
- /* @__PURE__ */ jsx26("summary", { "aria-label": "\u66F4\u591A\u8868\u683C\u64CD\u4F5C", children: /* @__PURE__ */ jsx26(Icon, { name: "more-horizontal", size: 16 }) }),
8712
- /* @__PURE__ */ jsx26("div", { children: /* @__PURE__ */ jsx26(ToolbarItems, { items: items("end", true), context }) })
9067
+ /* @__PURE__ */ jsx27(ToolbarItems, { items: items("end"), context }),
9068
+ items("end", true).length > 0 ? /* @__PURE__ */ jsxs24("details", { className: "sia-table__toolbar-menu", children: [
9069
+ /* @__PURE__ */ jsx27("summary", { "aria-label": "\u66F4\u591A\u8868\u683C\u64CD\u4F5C", children: /* @__PURE__ */ jsx27(Icon, { name: "more-horizontal", size: 16 }) }),
9070
+ /* @__PURE__ */ jsx27("div", { children: /* @__PURE__ */ jsx27(ToolbarItems, { items: items("end", true), context }) })
8713
9071
  ] }) : null
8714
9072
  ] })
8715
9073
  };
@@ -8791,11 +9149,11 @@ function createExportPlugin(options = {}) {
8791
9149
  return {
8792
9150
  id: "export",
8793
9151
  order: 95,
8794
- renderToolbarEnd: options.showButton === false ? void 0 : (context) => /* @__PURE__ */ jsx26(
9152
+ renderToolbarEnd: options.showButton === false ? void 0 : (context) => /* @__PURE__ */ jsx27(
8795
9153
  Button,
8796
9154
  {
8797
9155
  size: "small",
8798
- icon: /* @__PURE__ */ jsx26(Icon, { name: "download", size: 14 }),
9156
+ icon: /* @__PURE__ */ jsx27(Icon, { name: "download", size: 14 }),
8799
9157
  disabled: getRows(context).length === 0,
8800
9158
  onClick: () => void download(context),
8801
9159
  children: options.buttonLabel ?? "\u5BFC\u51FA"
@@ -8810,7 +9168,7 @@ function createExportPlugin(options = {}) {
8810
9168
  }
8811
9169
 
8812
9170
  // src/components/Table/Table.tsx
8813
- import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
9171
+ import { jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
8814
9172
  var EMPTY_DATA = [];
8815
9173
  var EMPTY_COLUMNS = [];
8816
9174
  var EMPTY_PLUGINS = [];
@@ -8924,7 +9282,7 @@ var TableBodyRow = memo(function TableBodyRow2({
8924
9282
  onCellPointerDown,
8925
9283
  onCellPointerMove
8926
9284
  }) {
8927
- return /* @__PURE__ */ jsx27(
9285
+ return /* @__PURE__ */ jsx28(
8928
9286
  "tr",
8929
9287
  {
8930
9288
  "data-row-key": String(row.key),
@@ -8940,7 +9298,7 @@ var TableBodyRow = memo(function TableBodyRow2({
8940
9298
  if (columnIndex > 0 && !visibleColumns.has(columns[columnIndex - 1].key)) return null;
8941
9299
  let count = 1;
8942
9300
  while (columnIndex + count < columns.length && !visibleColumns.has(columns[columnIndex + count].key)) count++;
8943
- return /* @__PURE__ */ jsx27("td", { colSpan: count, "aria-hidden": "true", style: { padding: 0 } }, `spacer-${column.key}`);
9301
+ return /* @__PURE__ */ jsx28("td", { colSpan: count, "aria-hidden": "true", style: { padding: 0 } }, `spacer-${column.key}`);
8944
9302
  }
8945
9303
  const pluginCellProps = getCellProps(column);
8946
9304
  if (pluginCellProps.hidden) return null;
@@ -8951,7 +9309,7 @@ var TableBodyRow = memo(function TableBodyRow2({
8951
9309
  const fixedStyle = fixed === "left" ? { left: leftOffsets.get(column.key) } : fixed === "right" ? { right: rightOffsets.get(column.key) } : void 0;
8952
9310
  const fixedEdgeClass = fixed === "left" && column.key === leftFixedEdgeKey ? " sia-table__cell--fixed-left-edge" : fixed === "right" && column.key === rightFixedEdgeKey ? " sia-table__cell--fixed-right-edge" : "";
8953
9311
  const autoWidthClass = column.autoWidth ? " sia-table__cell--auto-width" : "";
8954
- return /* @__PURE__ */ jsx27(
9312
+ return /* @__PURE__ */ jsx28(
8955
9313
  "td",
8956
9314
  {
8957
9315
  "data-column-key": column.key,
@@ -8968,7 +9326,7 @@ var TableBodyRow = memo(function TableBodyRow2({
8968
9326
  onContextMenu: (event) => onCellContextMenu(column, event),
8969
9327
  onPointerDown: (event) => onCellPointerDown(column, event),
8970
9328
  onPointerMove: (event) => onCellPointerMove(column, event),
8971
- children: !canvas || visibleColumns.has(column.key) && (pluginCellProps.content !== void 0 || !column.canvasRender && column.render) ? /* @__PURE__ */ jsx27(
9329
+ children: !canvas || visibleColumns.has(column.key) && (pluginCellProps.content !== void 0 || !column.canvasRender && column.render) ? /* @__PURE__ */ jsx28(
8972
9330
  TableCellContent,
8973
9331
  {
8974
9332
  ellipsis: column.ellipsis !== false,
@@ -9020,31 +9378,31 @@ function TableInner(props, ref) {
9020
9378
  style,
9021
9379
  ...htmlProps
9022
9380
  } = props;
9023
- const rootRef = useRef22(null);
9381
+ const rootRef = useRef23(null);
9024
9382
  const remainingHeight = useRemainingHeight(rootRef, height == null && tableHeight == null ? fillRemaining : false);
9025
- const scrollRef = useRef22(null);
9026
- const cellFocusRequest = useRef22(0);
9027
- const cellGlow = useRef22(null);
9028
- useEffect15(() => () => {
9383
+ const scrollRef = useRef23(null);
9384
+ const cellFocusRequest = useRef23(0);
9385
+ const cellGlow = useRef23(null);
9386
+ useEffect16(() => () => {
9029
9387
  cellFocusRequest.current++;
9030
9388
  cellGlow.current?.();
9031
9389
  }, []);
9032
- const tableRef = useRef22(null);
9390
+ const tableRef = useRef23(null);
9033
9391
  useScrollbarProximity();
9034
- const scrollbarDragRef = useRef22(null);
9035
- const [internalLoading, setInternalLoading] = useState23(false);
9036
- const [scrollTop, setScrollTop] = useState23(0);
9037
- const [scrollLeft, setScrollLeft] = useState23(0);
9038
- const [viewportHeight, setViewportHeight] = useState23(420);
9039
- const [viewportWidth, setViewportWidth] = useState23(0);
9040
- const [autoColumnWidths, setAutoColumnWidths] = useState23({});
9041
- const [resolveRowIdentity] = useState23(createRowIdentity);
9392
+ const scrollbarDragRef = useRef23(null);
9393
+ const [internalLoading, setInternalLoading] = useState24(false);
9394
+ const [scrollTop, setScrollTop] = useState24(0);
9395
+ const [scrollLeft, setScrollLeft] = useState24(0);
9396
+ const [viewportHeight, setViewportHeight] = useState24(420);
9397
+ const [viewportWidth, setViewportWidth] = useState24(0);
9398
+ const [autoColumnWidths, setAutoColumnWidths] = useState24({});
9399
+ const [resolveRowIdentity] = useState24(createRowIdentity);
9042
9400
  const getRowKey = useCallback2((record, index) => resolveRowIdentity(record, index, typeof rowKey === "function" ? rowKey : rowKey == null ? void 0 : String(rowKey)), [rowKey, resolveRowIdentity]);
9043
- const builtInResizePlugin = useMemo9(() => createResizePlugin(), []);
9044
- const builtInHighlightPlugin = useMemo9(() => createHighlightPlugin(), []);
9045
- const builtInCellSelectionPlugin = useMemo9(() => createCellSelectionPlugin(), []);
9046
- const builtInIndexPlugin = useMemo9(() => createIndexPlugin(), []);
9047
- const activePlugins = useMemo9(() => {
9401
+ const builtInResizePlugin = useMemo10(() => createResizePlugin(), []);
9402
+ const builtInHighlightPlugin = useMemo10(() => createHighlightPlugin(), []);
9403
+ const builtInCellSelectionPlugin = useMemo10(() => createCellSelectionPlugin(), []);
9404
+ const builtInIndexPlugin = useMemo10(() => createIndexPlugin(), []);
9405
+ const activePlugins = useMemo10(() => {
9048
9406
  const plugins = providedPlugins.filter((plugin) => (resizable || plugin.id !== "resize") && (cellSelection || plugin.id !== "cellSelection") && (showIndex || plugin.id !== "index"));
9049
9407
  if (!plugins.some((plugin) => plugin.id === "highlight")) plugins.push(builtInHighlightPlugin);
9050
9408
  if (resizable && !plugins.some((plugin) => plugin.id === "resize")) plugins.push(builtInResizePlugin);
@@ -9052,15 +9410,15 @@ function TableInner(props, ref) {
9052
9410
  if (showIndex && !plugins.some((plugin) => plugin.id === "index")) plugins.push(builtInIndexPlugin);
9053
9411
  return plugins;
9054
9412
  }, [builtInHighlightPlugin, builtInResizePlugin, builtInCellSelectionPlugin, builtInIndexPlugin, providedPlugins, resizable, cellSelection, showIndex]);
9055
- const sortedPlugins = useMemo9(() => [...activePlugins].sort((a, b) => (a.order ?? 100) - (b.order ?? 100)), [activePlugins]);
9056
- const pluginsByIdRef = useRef22(/* @__PURE__ */ new Map());
9413
+ const sortedPlugins = useMemo10(() => [...activePlugins].sort((a, b) => (a.order ?? 100) - (b.order ?? 100)), [activePlugins]);
9414
+ const pluginsByIdRef = useRef23(/* @__PURE__ */ new Map());
9057
9415
  pluginsByIdRef.current = new Map(sortedPlugins.map((plugin) => [plugin.id, plugin]));
9058
- const [pluginStates, setPluginStates] = useState23(() => Object.fromEntries(
9416
+ const [pluginStates, setPluginStates] = useState24(() => Object.fromEntries(
9059
9417
  sortedPlugins.map((plugin) => [plugin.id, resolveInitialState(plugin)])
9060
9418
  ));
9061
- const pluginApisRef = useRef22({});
9062
- const contextsRef = useRef22(/* @__PURE__ */ new Map());
9063
- const mountedPluginsRef = useRef22(/* @__PURE__ */ new Map());
9419
+ const pluginApisRef = useRef23({});
9420
+ const contextsRef = useRef23(/* @__PURE__ */ new Map());
9421
+ const mountedPluginsRef = useRef23(/* @__PURE__ */ new Map());
9064
9422
  const pipeline = { columns: baseColumns, rows: createTableRows(dataSource, getRowKey) };
9065
9423
  const nextApis = {};
9066
9424
  const contexts = /* @__PURE__ */ new Map();
@@ -9117,7 +9475,7 @@ function TableInner(props, ref) {
9117
9475
  });
9118
9476
  pluginApisRef.current = nextApis;
9119
9477
  contextsRef.current = contexts;
9120
- useEffect15(() => {
9478
+ useEffect16(() => {
9121
9479
  const activePlugins2 = new Map(sortedPlugins.map((plugin) => [plugin.id, plugin]));
9122
9480
  for (const [pluginId, mounted] of mountedPluginsRef.current) {
9123
9481
  if (activePlugins2.get(pluginId) === mounted.plugin) continue;
@@ -9129,7 +9487,7 @@ function TableInner(props, ref) {
9129
9487
  mountedPluginsRef.current.set(plugin.id, { plugin, cleanup: plugin.onMount(contextsRef.current.get(plugin.id)) });
9130
9488
  }
9131
9489
  }, [sortedPlugins]);
9132
- useEffect15(() => () => {
9490
+ useEffect16(() => () => {
9133
9491
  for (const mounted of mountedPluginsRef.current.values()) mounted.cleanup?.();
9134
9492
  mountedPluginsRef.current.clear();
9135
9493
  }, []);
@@ -9173,7 +9531,7 @@ function TableInner(props, ref) {
9173
9531
  verticalTrackElement?.style.setProperty("--sia-table-scrollbar-y-size", `${verticalThumb}px`);
9174
9532
  verticalTrackElement?.style.setProperty("--sia-table-scrollbar-y-position", `${verticalPosition}px`);
9175
9533
  }, []);
9176
- useEffect15(() => {
9534
+ useEffect16(() => {
9177
9535
  const element = scrollRef.current;
9178
9536
  if (!element || typeof ResizeObserver === "undefined") return;
9179
9537
  const observer = new ResizeObserver(() => {
@@ -9186,19 +9544,19 @@ function TableInner(props, ref) {
9186
9544
  updateScrollMetrics();
9187
9545
  return () => observer.disconnect();
9188
9546
  }, [updateScrollMetrics]);
9189
- useEffect15(() => {
9547
+ useEffect16(() => {
9190
9548
  updateScrollMetrics();
9191
9549
  });
9192
- const orderedColumns = useMemo9(() => sortTableColumnsByFixed(pipeline.columns), [pipeline.columns]);
9193
- const leafColumns = useMemo9(() => flattenTableColumns(orderedColumns), [orderedColumns]);
9194
- const headerRows = useMemo9(() => buildHeaderRows(orderedColumns), [orderedColumns]);
9195
- const measuredCells = useRef22(/* @__PURE__ */ new WeakSet());
9550
+ const orderedColumns = useMemo10(() => sortTableColumnsByFixed(pipeline.columns), [pipeline.columns]);
9551
+ const leafColumns = useMemo10(() => flattenTableColumns(orderedColumns), [orderedColumns]);
9552
+ const headerRows = useMemo10(() => buildHeaderRows(orderedColumns), [orderedColumns]);
9553
+ const measuredCells = useRef23(/* @__PURE__ */ new WeakSet());
9196
9554
  const autoWidthSignature = leafColumns.map((column) => `${column.key}:${column.autoWidth}:${resizedWidths[column.key] ?? ""}`).join("|");
9197
- useEffect15(() => {
9555
+ useEffect16(() => {
9198
9556
  measuredCells.current = /* @__PURE__ */ new WeakSet();
9199
9557
  setAutoColumnWidths({});
9200
9558
  }, [dataSource, baseColumns, size, autoWidthSignature]);
9201
- useEffect15(() => {
9559
+ useEffect16(() => {
9202
9560
  const autoWidthColumns = leafColumns.filter((column) => column.autoWidth && resizedWidths[column.key] === void 0);
9203
9561
  const root = rootRef.current;
9204
9562
  if (!root || autoWidthColumns.length === 0) return;
@@ -9283,7 +9641,7 @@ function TableInner(props, ref) {
9283
9641
  }
9284
9642
  const topSpacer = shouldVirtualize ? startIndex * rowHeight : 0;
9285
9643
  const bottomSpacer = shouldVirtualize ? Math.max(0, (pipeline.rows.length - endIndex) * rowHeight) : 0;
9286
- const rowElements = useMemo9(() => /* @__PURE__ */ new Map(), [
9644
+ const rowElements = useMemo10(() => /* @__PURE__ */ new Map(), [
9287
9645
  dataSource,
9288
9646
  baseColumns,
9289
9647
  sortedPlugins,
@@ -9303,20 +9661,20 @@ function TableInner(props, ref) {
9303
9661
  ]);
9304
9662
  const toolbarStart = sortedPlugins.map((plugin) => {
9305
9663
  const content = plugin.renderToolbarStart?.(getContext(plugin));
9306
- return content ? /* @__PURE__ */ jsx27(Fragment9, { children: content }, `toolbar-start-${plugin.id}`) : null;
9664
+ return content ? /* @__PURE__ */ jsx28(Fragment9, { children: content }, `toolbar-start-${plugin.id}`) : null;
9307
9665
  }).filter(Boolean);
9308
9666
  const toolbarEnd = sortedPlugins.map((plugin) => {
9309
9667
  const content = plugin.renderToolbarEnd?.(getContext(plugin));
9310
- return content ? /* @__PURE__ */ jsx27(Fragment9, { children: content }, `toolbar-end-${plugin.id}`) : null;
9668
+ return content ? /* @__PURE__ */ jsx28(Fragment9, { children: content }, `toolbar-end-${plugin.id}`) : null;
9311
9669
  }).filter(Boolean);
9312
9670
  const summaries = sortedPlugins.flatMap((plugin) => plugin.renderSummary?.(getContext(plugin)) ?? []);
9313
9671
  const footers = sortedPlugins.map((plugin) => {
9314
9672
  const content = plugin.renderFooter?.(getContext(plugin));
9315
- return content ? /* @__PURE__ */ jsx27(Fragment9, { children: content }, `footer-${plugin.id}`) : null;
9673
+ return content ? /* @__PURE__ */ jsx28(Fragment9, { children: content }, `footer-${plugin.id}`) : null;
9316
9674
  }).filter(Boolean);
9317
9675
  const overlays = sortedPlugins.map((plugin) => {
9318
9676
  const content = plugin.renderOverlay?.(getContext(plugin));
9319
- return content ? /* @__PURE__ */ jsx27(Fragment9, { children: content }, `overlay-${plugin.id}`) : null;
9677
+ return content ? /* @__PURE__ */ jsx28(Fragment9, { children: content }, `overlay-${plugin.id}`) : null;
9320
9678
  }).filter(Boolean);
9321
9679
  const hasToolbar = toolbarStart.length > 0 || toolbarEnd.length > 0;
9322
9680
  const effectiveHeight = height ?? tableHeight ?? remainingHeight ?? (shouldVirtualize && maxBodyHeight == null ? 420 : void 0);
@@ -9493,10 +9851,10 @@ function TableInner(props, ref) {
9493
9851
  }
9494
9852
  function renderHeaderContent(column, content) {
9495
9853
  const title = getHeaderTitleText(column.title ?? column.name) || column.name || column.key;
9496
- return /* @__PURE__ */ jsxs24("span", { className: `sia-table__header-label${column.required ? " sia-table__header-label--required" : ""}`, children: [
9497
- column.required && /* @__PURE__ */ jsx27("span", { className: "sia-table__required-mark", "aria-hidden": "true", children: "*" }),
9498
- /* @__PURE__ */ jsx27("span", { className: "sia-table__header-label-content", "data-sia-title-overflow-only": true, ...withTitleTooltip({ title }), children: content }),
9499
- column.description != null && /* @__PURE__ */ jsx27(Tooltip, { title: column.description, placement: "top", trigger: ["hover", "focus"], children: /* @__PURE__ */ jsx27("button", { type: "button", className: "sia-table__header-description", "aria-label": `${column.name ?? column.key}\u5217\u8BF4\u660E`, onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsx27(Icon, { name: "info", size: 14 }) }) })
9854
+ return /* @__PURE__ */ jsxs25("span", { className: `sia-table__header-label${column.required ? " sia-table__header-label--required" : ""}`, children: [
9855
+ column.required && /* @__PURE__ */ jsx28("span", { className: "sia-table__required-mark", "aria-hidden": "true", children: "*" }),
9856
+ /* @__PURE__ */ jsx28("span", { className: "sia-table__header-label-content", "data-sia-title-overflow-only": true, ...withTitleTooltip({ title }), children: content }),
9857
+ column.description != null && /* @__PURE__ */ jsx28(Tooltip, { title: column.description, placement: "top", trigger: ["hover", "focus"], children: /* @__PURE__ */ jsx28("button", { type: "button", className: "sia-table__header-description", "aria-label": `${column.name ?? column.key}\u5217\u8BF4\u660E`, onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsx28(Icon, { name: "info", size: 14 }) }) })
9500
9858
  ] });
9501
9859
  }
9502
9860
  function getPluginCellProps(row, column) {
@@ -9536,17 +9894,17 @@ function TableInner(props, ref) {
9536
9894
  }
9537
9895
  function renderSummaryRow(summary) {
9538
9896
  let labelRendered = false;
9539
- return /* @__PURE__ */ jsx27("tr", { className: `sia-table__summary-row ${summary.className ?? ""}`.trim(), children: leafColumns.map((column) => {
9897
+ return /* @__PURE__ */ jsx28("tr", { className: `sia-table__summary-row ${summary.className ?? ""}`.trim(), children: leafColumns.map((column) => {
9540
9898
  const value = summary.values[column.key];
9541
9899
  const isLabel = value === void 0 && !labelRendered && summary.label !== void 0;
9542
9900
  const content = value !== void 0 ? value : isLabel ? (labelRendered = true, summary.label) : null;
9543
9901
  const fixed = normalizeFixed(column.fixed);
9544
9902
  const fixedEdgeClass = fixed === "left" && column.key === leftFixedEdgeKey ? " sia-table__cell--fixed-left-edge" : fixed === "right" && column.key === rightFixedEdgeKey ? " sia-table__cell--fixed-right-edge" : "";
9545
9903
  const autoWidthClass = column.autoWidth ? " sia-table__cell--auto-width" : "";
9546
- return /* @__PURE__ */ jsx27("td", { "data-column-key": column.key, className: `sia-table__cell sia-table__cell--${column.align ?? "left"} sia-table__summary-cell${isLabel ? " sia-table__summary-cell--label" : ""}${fixed ? ` sia-table__cell--fixed sia-table__cell--fixed-${fixed}` : ""}${fixedEdgeClass}${autoWidthClass}`, style: getFixedStyle(column), children: isLabel ? /* @__PURE__ */ jsx27("span", { className: "sia-table__summary-label", children: content }) : content }, column.key);
9904
+ return /* @__PURE__ */ jsx28("td", { "data-column-key": column.key, className: `sia-table__cell sia-table__cell--${column.align ?? "left"} sia-table__summary-cell${isLabel ? " sia-table__summary-cell--label" : ""}${fixed ? ` sia-table__cell--fixed sia-table__cell--fixed-${fixed}` : ""}${fixedEdgeClass}${autoWidthClass}`, style: getFixedStyle(column), children: isLabel ? /* @__PURE__ */ jsx28("span", { className: "sia-table__summary-label", children: content }) : content }, column.key);
9547
9905
  }) }, summary.key);
9548
9906
  }
9549
- return /* @__PURE__ */ jsxs24(
9907
+ return /* @__PURE__ */ jsxs25(
9550
9908
  "div",
9551
9909
  {
9552
9910
  ref: rootRef,
@@ -9597,19 +9955,19 @@ function TableInner(props, ref) {
9597
9955
  htmlProps.onDoubleClickCapture?.(event);
9598
9956
  },
9599
9957
  children: [
9600
- hasToolbar ? /* @__PURE__ */ jsxs24("div", { className: "sia-table__toolbar", children: [
9601
- /* @__PURE__ */ jsx27("div", { children: toolbarStart }),
9602
- /* @__PURE__ */ jsx27("div", { children: toolbarEnd })
9958
+ hasToolbar ? /* @__PURE__ */ jsxs25("div", { className: "sia-table__toolbar", children: [
9959
+ /* @__PURE__ */ jsx28("div", { children: toolbarStart }),
9960
+ /* @__PURE__ */ jsx28("div", { children: toolbarEnd })
9603
9961
  ] }) : null,
9604
- /* @__PURE__ */ jsxs24("div", { className: "sia-table__viewport-wrap", style: viewportStyle, children: [
9605
- /* @__PURE__ */ jsx27("div", { className: "sia-table__viewport", ref: scrollRef, onScroll: handleScroll, children: /* @__PURE__ */ jsxs24("table", { ref: tableRef, className: "sia-table__element", style: { width: Math.max(totalWidth, 1), ...manualColumnLayout ? { minWidth: 0 } : {}, ...tableStyle }, children: [
9606
- /* @__PURE__ */ jsx27("colgroup", { children: leafColumns.map((column) => /* @__PURE__ */ jsx27("col", { "data-column-key": column.key, style: { width: columnWidths.get(column.key) ?? DEFAULT_WIDTH } }, column.key)) }),
9607
- /* @__PURE__ */ jsx27("thead", { className: stickyHeader ? "sia-table__head sia-table__head--sticky" : "sia-table__head", children: headerRows.map((headerRow, depth) => /* @__PURE__ */ jsx27("tr", { children: headerRow.map((cell) => {
9962
+ /* @__PURE__ */ jsxs25("div", { className: "sia-table__viewport-wrap", style: viewportStyle, children: [
9963
+ /* @__PURE__ */ jsx28("div", { className: "sia-table__viewport", ref: scrollRef, onScroll: handleScroll, children: /* @__PURE__ */ jsxs25("table", { ref: tableRef, className: "sia-table__element", style: { width: Math.max(totalWidth, 1), ...manualColumnLayout ? { minWidth: 0 } : {}, ...tableStyle }, children: [
9964
+ /* @__PURE__ */ jsx28("colgroup", { children: leafColumns.map((column) => /* @__PURE__ */ jsx28("col", { "data-column-key": column.key, style: { width: columnWidths.get(column.key) ?? DEFAULT_WIDTH } }, column.key)) }),
9965
+ /* @__PURE__ */ jsx28("thead", { className: stickyHeader ? "sia-table__head sia-table__head--sticky" : "sia-table__head", children: headerRows.map((headerRow, depth) => /* @__PURE__ */ jsx28("tr", { children: headerRow.map((cell) => {
9608
9966
  const fixed = cell.fixed;
9609
9967
  const pluginHeaderProps = getPluginHeaderCellProps(cell.column);
9610
9968
  const fixedEdgeClass = fixed === "left" && cell.column.key === leftFixedEdgeKey ? " sia-table__cell--fixed-left-edge" : fixed === "right" && cell.column.key === rightFixedEdgeKey ? " sia-table__cell--fixed-right-edge" : "";
9611
9969
  const autoWidthClass = cell.column.autoWidth ? " sia-table__cell--auto-width" : "";
9612
- return /* @__PURE__ */ jsx27(
9970
+ return /* @__PURE__ */ jsx28(
9613
9971
  "th",
9614
9972
  {
9615
9973
  "data-column-key": cell.column.key,
@@ -9630,10 +9988,10 @@ function TableInner(props, ref) {
9630
9988
  `${cell.column.key}-${depth}-${cell.firstLeafKey}`
9631
9989
  );
9632
9990
  }) }, depth)) }),
9633
- /* @__PURE__ */ jsxs24("tbody", { children: [
9634
- maxBodyHeight != null && pipeline.rows.length === 0 ? /* @__PURE__ */ jsx27("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx27("td", { colSpan: leafColumns.length, style: { height: 120, padding: 0, border: 0 } }) }) : null,
9635
- pipeline.rows.length === 0 && summaries.length > 0 ? /* @__PURE__ */ jsx27("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx27("td", { colSpan: leafColumns.length, style: { height: Math.max(0, viewportHeight - (headerRows.length + summaries.length) * rowHeight), padding: 0, border: 0 } }) }) : null,
9636
- topSpacer > 0 ? /* @__PURE__ */ jsx27("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx27("td", { colSpan: leafColumns.length, style: { height: topSpacer, padding: 0, border: 0 } }) }) : null,
9991
+ /* @__PURE__ */ jsxs25("tbody", { children: [
9992
+ maxBodyHeight != null && pipeline.rows.length === 0 ? /* @__PURE__ */ jsx28("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx28("td", { colSpan: leafColumns.length, style: { height: 120, padding: 0, border: 0 } }) }) : null,
9993
+ pipeline.rows.length === 0 && summaries.length > 0 ? /* @__PURE__ */ jsx28("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx28("td", { colSpan: leafColumns.length, style: { height: Math.max(0, viewportHeight - (headerRows.length + summaries.length) * rowHeight), padding: 0, border: 0 } }) }) : null,
9994
+ topSpacer > 0 ? /* @__PURE__ */ jsx28("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx28("td", { colSpan: leafColumns.length, style: { height: topSpacer, padding: 0, border: 0 } }) }) : null,
9637
9995
  renderedRows.map((row, offset) => {
9638
9996
  const cached = rowElements.get(row.key);
9639
9997
  if (cached) return cached;
@@ -9642,7 +10000,7 @@ function TableInner(props, ref) {
9642
10000
  const status = typeof rowStatus === "function" ? rowStatus(row.record, row.sourceIndex) : rowStatus;
9643
10001
  const statusClass = status ? `sia-table__row--${status}` : "";
9644
10002
  const customClass = typeof rowClassName === "function" ? rowClassName(row.record, row.sourceIndex) : rowClassName ?? "";
9645
- const element = /* @__PURE__ */ jsx27(
10003
+ const element = /* @__PURE__ */ jsx28(
9646
10004
  TableBodyRow,
9647
10005
  {
9648
10006
  canvas,
@@ -9693,13 +10051,13 @@ function TableInner(props, ref) {
9693
10051
  rowElements.set(row.key, element);
9694
10052
  return element;
9695
10053
  }),
9696
- bottomSpacer > 0 ? /* @__PURE__ */ jsx27("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx27("td", { colSpan: leafColumns.length, style: { height: bottomSpacer, padding: 0, border: 0 } }) }) : null
10054
+ bottomSpacer > 0 ? /* @__PURE__ */ jsx28("tr", { "aria-hidden": "true", children: /* @__PURE__ */ jsx28("td", { colSpan: leafColumns.length, style: { height: bottomSpacer, padding: 0, border: 0 } }) }) : null
9697
10055
  ] }),
9698
- summaries.length > 0 ? /* @__PURE__ */ jsx27("tfoot", { className: "sia-table__summary", children: summaries.map(renderSummaryRow) }) : null
10056
+ summaries.length > 0 ? /* @__PURE__ */ jsx28("tfoot", { className: "sia-table__summary", children: summaries.map(renderSummaryRow) }) : null
9699
10057
  ] }) }),
9700
- pipeline.rows.length === 0 ? /* @__PURE__ */ jsx27("div", { className: "sia-table__empty", role: "status", children: emptyText }) : null,
9701
- canvas ? /* @__PURE__ */ jsx27(TableCanvasLayer, { viewport: scrollRef, rows: pipeline.rows, columns: leafColumns, widths: columnWidths, rowHeight, headerHeight: headerRows.length * rowHeight }) : null,
9702
- /* @__PURE__ */ jsx27(
10058
+ pipeline.rows.length === 0 ? /* @__PURE__ */ jsx28("div", { className: "sia-table__empty", role: "status", children: emptyText }) : null,
10059
+ canvas ? /* @__PURE__ */ jsx28(TableCanvasLayer, { viewport: scrollRef, rows: pipeline.rows, columns: leafColumns, widths: columnWidths, rowHeight, headerHeight: headerRows.length * rowHeight }) : null,
10060
+ /* @__PURE__ */ jsx28(
9703
10061
  "div",
9704
10062
  {
9705
10063
  className: "sia-scrollbar-track sia-table__scrollbar sia-table__scrollbar--horizontal",
@@ -9710,10 +10068,10 @@ function TableInner(props, ref) {
9710
10068
  onPointerMove: handleScrollbarPointerMove,
9711
10069
  onPointerUp: handleScrollbarPointerEnd,
9712
10070
  onPointerCancel: handleScrollbarPointerEnd,
9713
- children: /* @__PURE__ */ jsx27("div", { className: "sia-table__scrollbar-thumb" })
10071
+ children: /* @__PURE__ */ jsx28("div", { className: "sia-table__scrollbar-thumb" })
9714
10072
  }
9715
10073
  ),
9716
- /* @__PURE__ */ jsx27(
10074
+ /* @__PURE__ */ jsx28(
9717
10075
  "div",
9718
10076
  {
9719
10077
  className: "sia-scrollbar-track sia-table__scrollbar sia-table__scrollbar--vertical",
@@ -9724,14 +10082,14 @@ function TableInner(props, ref) {
9724
10082
  onPointerMove: handleScrollbarPointerMove,
9725
10083
  onPointerUp: handleScrollbarPointerEnd,
9726
10084
  onPointerCancel: handleScrollbarPointerEnd,
9727
- children: /* @__PURE__ */ jsx27("div", { className: "sia-table__scrollbar-thumb" })
10085
+ children: /* @__PURE__ */ jsx28("div", { className: "sia-table__scrollbar-thumb" })
9728
10086
  }
9729
10087
  )
9730
10088
  ] }),
9731
- footers.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "sia-table__footer", children: footers }) : null,
9732
- loading || internalLoading ? /* @__PURE__ */ jsxs24("div", { className: "sia-table__loading", role: "status", children: [
9733
- /* @__PURE__ */ jsx27(Icon, { name: "loader", size: 22, spin: true }),
9734
- /* @__PURE__ */ jsx27("span", { children: "\u52A0\u8F7D\u4E2D" })
10089
+ footers.length > 0 ? /* @__PURE__ */ jsx28("div", { className: "sia-table__footer", children: footers }) : null,
10090
+ loading || internalLoading ? /* @__PURE__ */ jsxs25("div", { className: "sia-table__loading", role: "status", children: [
10091
+ /* @__PURE__ */ jsx28(Icon, { name: "loader", size: 22, spin: true }),
10092
+ /* @__PURE__ */ jsx28("span", { children: "\u52A0\u8F7D\u4E2D" })
9735
10093
  ] }) : null,
9736
10094
  overlays
9737
10095
  ]
@@ -9804,7 +10162,7 @@ function incrementWorksheetValue(value, offset) {
9804
10162
  }
9805
10163
 
9806
10164
  // src/components/Table/worksheet.tsx
9807
- import { Fragment as Fragment10, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
10165
+ import { Fragment as Fragment10, jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
9808
10166
  var isEmpty2 = (value) => value == null || value === "";
9809
10167
  var editorKind = (column) => !column.editable ? "readonly" : typeof column.editable === "object" ? column.editable.type ?? "input" : "input";
9810
10168
  var nativeEditor = (target) => target instanceof Element && Boolean(
@@ -10212,9 +10570,9 @@ function createWorksheetPlugin(options) {
10212
10570
  const area = bounds(), cols = columns();
10213
10571
  const handle = area && context.rows[area.bottom]?.key === info.row.key && cols[area.right]?.key === column.key && // 填充入口与编辑权限一致,避免只读格或保存锁定后仍暗示可以拖拽修改。
10214
10572
  editable(record, column) && (suppressEditing || !context.state.editing);
10215
- return /* @__PURE__ */ jsxs25(Fragment10, { children: [
10573
+ return /* @__PURE__ */ jsxs26(Fragment10, { children: [
10216
10574
  render ? render(value, record, index, info) : value,
10217
- handle && /* @__PURE__ */ jsx28(
10575
+ handle && /* @__PURE__ */ jsx29(
10218
10576
  "button",
10219
10577
  {
10220
10578
  type: "button",
@@ -10260,25 +10618,25 @@ function createWorksheetPlugin(options) {
10260
10618
  },
10261
10619
  renderToolbarStart(current) {
10262
10620
  remember(current);
10263
- return options.toolbar === false ? null : /* @__PURE__ */ jsxs25("span", { className: "sia-table__worksheet-tools", children: [
10264
- /* @__PURE__ */ jsx28(
10621
+ return options.toolbar === false ? null : /* @__PURE__ */ jsxs26("span", { className: "sia-table__worksheet-tools", children: [
10622
+ /* @__PURE__ */ jsx29(
10265
10623
  Button,
10266
10624
  {
10267
10625
  variant: "text",
10268
10626
  size: "small",
10269
- icon: /* @__PURE__ */ jsx28(Icon, { name: "undo" }),
10627
+ icon: /* @__PURE__ */ jsx29(Icon, { name: "undo" }),
10270
10628
  disabled: !undoStack.length,
10271
10629
  title: "\u64A4\u9500\uFF08Ctrl/Cmd + Z\uFF09",
10272
10630
  onClick: api.undo,
10273
10631
  children: "\u64A4\u9500"
10274
10632
  }
10275
10633
  ),
10276
- /* @__PURE__ */ jsx28(
10634
+ /* @__PURE__ */ jsx29(
10277
10635
  Button,
10278
10636
  {
10279
10637
  variant: "text",
10280
10638
  size: "small",
10281
- icon: /* @__PURE__ */ jsx28(Icon, { name: "redo" }),
10639
+ icon: /* @__PURE__ */ jsx29(Icon, { name: "redo" }),
10282
10640
  disabled: !redoStack.length,
10283
10641
  title: "\u6062\u590D\uFF08Ctrl/Cmd + Shift + Z \u6216 Ctrl/Cmd + Y\uFF09",
10284
10642
  onClick: api.redo,
@@ -10289,7 +10647,7 @@ function createWorksheetPlugin(options) {
10289
10647
  },
10290
10648
  renderOverlay(current) {
10291
10649
  remember(current);
10292
- return /* @__PURE__ */ jsx28(
10650
+ return /* @__PURE__ */ jsx29(
10293
10651
  "span",
10294
10652
  {
10295
10653
  hidden: true,
@@ -10377,14 +10735,14 @@ function createWorksheetPlugin(options) {
10377
10735
 
10378
10736
  // src/components/Video.tsx
10379
10737
  import { forwardRef as forwardRef7 } from "react";
10380
- import { jsx as jsx29 } from "react/jsx-runtime";
10738
+ import { jsx as jsx30 } from "react/jsx-runtime";
10381
10739
  var Video = forwardRef7(function Video2({ controls = true, muted = false, playsInline = true, className = "", ...props }, ref) {
10382
- return /* @__PURE__ */ jsx29("video", { ...props, ref, controls, muted, playsInline, className: `sia-video ${className}`.trim() });
10740
+ return /* @__PURE__ */ jsx30("video", { ...props, ref, controls, muted, playsInline, className: `sia-video ${className}`.trim() });
10383
10741
  });
10384
10742
 
10385
10743
  // src/components/InputSelect.tsx
10386
- import { forwardRef as forwardRef8, useEffect as useEffect16, useRef as useRef23, useState as useState24 } from "react";
10387
- import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
10744
+ import { forwardRef as forwardRef8, useEffect as useEffect17, useRef as useRef24, useState as useState25 } from "react";
10745
+ import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
10388
10746
  var InputSelect = forwardRef8(function InputSelect2({
10389
10747
  options,
10390
10748
  value,
@@ -10411,22 +10769,22 @@ var InputSelect = forwardRef8(function InputSelect2({
10411
10769
  ...inputProps
10412
10770
  }, forwardedRef) {
10413
10771
  const size = useControlSize(sizeProp);
10414
- const [internal, setInternal] = useState24(defaultValue);
10772
+ const [internal, setInternal] = useState25(defaultValue);
10415
10773
  const current = value !== void 0 ? value : internal;
10416
10774
  const values = normalizeSelectionValues(current == null ? [] : Array.isArray(current) ? current : [current], options);
10417
10775
  const text = values.map((item) => displayField === "label" ? String(options.find((option) => option.optionType !== "divider" && option.value === item)?.label ?? item) : String(item)).join(",");
10418
- const [draft, setDraft] = useState24(text);
10419
- useEffect16(() => {
10776
+ const [draft, setDraft] = useState25(text);
10777
+ useEffect17(() => {
10420
10778
  setDraft(text);
10421
10779
  }, [text, current]);
10422
- const [open, setOpen] = useState24(false);
10423
- const [search, setSearch] = useState24("");
10424
- const [modalOpen, setModalOpen] = useState24(false);
10425
- const [modalValues, setModalValues] = useState24([]);
10426
- const [selectedOnly, setSelectedOnly] = useState24(false);
10427
- const rootRef = useRef23(null);
10428
- const popupRef = useRef23(null);
10429
- const inputRef = useRef23(null);
10780
+ const [open, setOpen] = useState25(false);
10781
+ const [search, setSearch] = useState25("");
10782
+ const [modalOpen, setModalOpen] = useState25(false);
10783
+ const [modalValues, setModalValues] = useState25([]);
10784
+ const [selectedOnly, setSelectedOnly] = useState25(false);
10785
+ const rootRef = useRef24(null);
10786
+ const popupRef = useRef24(null);
10787
+ const inputRef = useRef24(null);
10430
10788
  const config = typeof enableModal === "object" ? enableModal : {};
10431
10789
  function changeOpen(next) {
10432
10790
  if (next && (disabled || loading)) return;
@@ -10446,7 +10804,7 @@ var InputSelect = forwardRef8(function InputSelect2({
10446
10804
  inputRef.current?.focus();
10447
10805
  }
10448
10806
  }
10449
- useEffect16(() => {
10807
+ useEffect17(() => {
10450
10808
  if (!open) return;
10451
10809
  const outside = (event) => {
10452
10810
  if (!rootRef.current?.contains(event.target) && !popupRef.current?.contains(event.target)) changeOpen(false);
@@ -10454,7 +10812,7 @@ var InputSelect = forwardRef8(function InputSelect2({
10454
10812
  document.addEventListener("pointerdown", outside);
10455
10813
  return () => document.removeEventListener("pointerdown", outside);
10456
10814
  }, [open, onOpenChange]);
10457
- useEffect16(() => {
10815
+ useEffect17(() => {
10458
10816
  if (disabled || loading) {
10459
10817
  changeOpen(false);
10460
10818
  setModalOpen(false);
@@ -10467,14 +10825,14 @@ var InputSelect = forwardRef8(function InputSelect2({
10467
10825
  setSelectedOnly(false);
10468
10826
  setModalOpen(true);
10469
10827
  }
10470
- return /* @__PURE__ */ jsxs26("div", { ref: rootRef, style, className: `sia-input-select${open || modalOpen ? " is-open" : ""} ${className}`, onKeyDown: (event) => {
10828
+ return /* @__PURE__ */ jsxs27("div", { ref: rootRef, style, className: `sia-input-select${open || modalOpen ? " is-open" : ""} ${className}`, onKeyDown: (event) => {
10471
10829
  if (event.key === "Escape" && open) {
10472
10830
  event.stopPropagation();
10473
10831
  changeOpen(false);
10474
10832
  inputRef.current?.focus();
10475
10833
  }
10476
10834
  }, children: [
10477
- /* @__PURE__ */ jsx30(
10835
+ /* @__PURE__ */ jsx31(
10478
10836
  Input,
10479
10837
  {
10480
10838
  ...inputProps,
@@ -10511,26 +10869,26 @@ var InputSelect = forwardRef8(function InputSelect2({
10511
10869
  emit(parseInput ? parseInput(next) : multiple ? next.split(",").map((item) => item.trim()).filter(Boolean) : next);
10512
10870
  changeOpen(true);
10513
10871
  },
10514
- suffix: /* @__PURE__ */ jsxs26("span", { className: "sia-input-select__suffix", children: [
10515
- allowClear && draft && !disabled && /* @__PURE__ */ jsx30(Button, { className: "sia-input-select__clear", variant: "text", size: "small", disabled: loading, "aria-label": "\u6E05\u9664\u8F93\u5165\u9009\u62E9", onClick: (event) => {
10872
+ suffix: /* @__PURE__ */ jsxs27("span", { className: "sia-input-select__suffix", children: [
10873
+ allowClear && draft && !disabled && /* @__PURE__ */ jsx31(Button, { className: "sia-input-select__clear", variant: "text", size: "small", disabled: loading, "aria-label": "\u6E05\u9664\u8F93\u5165\u9009\u62E9", onClick: (event) => {
10516
10874
  event.stopPropagation();
10517
10875
  setDraft("");
10518
10876
  emit(multiple ? [] : void 0);
10519
10877
  inputRef.current?.focus();
10520
10878
  }, children: "\xD7" }),
10521
10879
  suffix,
10522
- enableModal && /* @__PURE__ */ jsx30(Button, { variant: "text", size: "small", disabled: disabled || loading, "aria-label": "\u6253\u5F00\u9009\u62E9\u5F39\u7A97", onClick: (event) => {
10880
+ enableModal && /* @__PURE__ */ jsx31(Button, { variant: "text", size: "small", disabled: disabled || loading, "aria-label": "\u6253\u5F00\u9009\u62E9\u5F39\u7A97", onClick: (event) => {
10523
10881
  event.stopPropagation();
10524
10882
  openModal();
10525
10883
  }, children: "\u2026" }),
10526
- /* @__PURE__ */ jsx30(Button, { variant: "text", size: "small", disabled: disabled || loading, "aria-label": "\u5C55\u5F00\u9009\u9879", onClick: (event) => {
10884
+ /* @__PURE__ */ jsx31(Button, { variant: "text", size: "small", disabled: disabled || loading, "aria-label": "\u5C55\u5F00\u9009\u9879", onClick: (event) => {
10527
10885
  event.stopPropagation();
10528
10886
  changeOpen(!open);
10529
- }, children: /* @__PURE__ */ jsx30(Icon, { name: loading ? "refresh" : open ? "chevron-up" : "chevron-down", size: 13 }) })
10887
+ }, children: /* @__PURE__ */ jsx31(Icon, { name: loading ? "refresh" : open ? "chevron-up" : "chevron-down", size: 13 }) })
10530
10888
  ] })
10531
10889
  }
10532
10890
  ),
10533
- /* @__PURE__ */ jsx30(PopupPortal, { ref: popupRef, anchorRef: rootRef, open: open && !disabled && !loading, className: "sia-input-select__popup", children: /* @__PURE__ */ jsx30(
10891
+ /* @__PURE__ */ jsx31(PopupPortal, { ref: popupRef, anchorRef: rootRef, open: open && !disabled && !loading, className: "sia-input-select__popup", children: /* @__PURE__ */ jsx31(
10534
10892
  SelectionPanel,
10535
10893
  {
10536
10894
  options,
@@ -10545,7 +10903,7 @@ var InputSelect = forwardRef8(function InputSelect2({
10545
10903
  onSearch: setSearch
10546
10904
  }
10547
10905
  ) }),
10548
- enableModal && /* @__PURE__ */ jsxs26(
10906
+ enableModal && /* @__PURE__ */ jsxs27(
10549
10907
  Modal,
10550
10908
  {
10551
10909
  open: modalOpen,
@@ -10558,15 +10916,15 @@ var InputSelect = forwardRef8(function InputSelect2({
10558
10916
  setModalOpen(false);
10559
10917
  },
10560
10918
  children: [
10561
- /* @__PURE__ */ jsxs26("div", { className: "sia-selection-panel__actions", role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
10562
- /* @__PURE__ */ jsx30(Button, { role: "tab", "aria-selected": !selectedOnly, variant: !selectedOnly ? "primary" : "text", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
10563
- /* @__PURE__ */ jsxs26(Button, { role: "tab", "aria-selected": selectedOnly, variant: selectedOnly ? "primary" : "text", onClick: () => setSelectedOnly(true), children: [
10919
+ /* @__PURE__ */ jsxs27("div", { className: "sia-selection-panel__actions", role: "tablist", "aria-label": "\u9009\u9879\u8303\u56F4", children: [
10920
+ /* @__PURE__ */ jsx31(Button, { role: "tab", "aria-selected": !selectedOnly, variant: !selectedOnly ? "primary" : "text", onClick: () => setSelectedOnly(false), children: "\u5168\u90E8" }),
10921
+ /* @__PURE__ */ jsxs27(Button, { role: "tab", "aria-selected": selectedOnly, variant: selectedOnly ? "primary" : "text", onClick: () => setSelectedOnly(true), children: [
10564
10922
  "\u5DF2\u9009\u9879(",
10565
10923
  modalValues.length,
10566
10924
  ")"
10567
10925
  ] })
10568
10926
  ] }),
10569
- modalOpen && /* @__PURE__ */ jsx30(
10927
+ modalOpen && /* @__PURE__ */ jsx31(
10570
10928
  SelectionPanel,
10571
10929
  {
10572
10930
  options,
@@ -10587,10 +10945,10 @@ var InputSelect = forwardRef8(function InputSelect2({
10587
10945
  });
10588
10946
 
10589
10947
  // src/components/QueryForm.tsx
10590
- import { Children as Children4, isValidElement as isValidElement5, useLayoutEffect as useLayoutEffect9, useRef as useRef27, useState as useState27 } from "react";
10948
+ import { Children as Children4, isValidElement as isValidElement5, useLayoutEffect as useLayoutEffect9, useRef as useRef28, useState as useState28 } from "react";
10591
10949
 
10592
10950
  // src/components/useQueryFormMotion.ts
10593
- import { useLayoutEffect as useLayoutEffect8, useRef as useRef24 } from "react";
10951
+ import { useLayoutEffect as useLayoutEffect8, useRef as useRef25 } from "react";
10594
10952
  function readLayout(row) {
10595
10953
  const root = row.getBoundingClientRect();
10596
10954
  const scaleX = root.width / row.offsetWidth || 1, scaleY = root.height / row.offsetHeight || 1;
@@ -10603,9 +10961,9 @@ function readLayout(row) {
10603
10961
  return { height: row.offsetHeight, boxes };
10604
10962
  }
10605
10963
  function useQueryFormMotion(ref, layoutKey) {
10606
- const previous = useRef24();
10607
- const stop = useRef24();
10608
- const snapshot = useRef24();
10964
+ const previous = useRef25();
10965
+ const stop = useRef25();
10966
+ const snapshot = useRef25();
10609
10967
  useLayoutEffect8(() => {
10610
10968
  const row = ref.current;
10611
10969
  if (!row) return;
@@ -10714,10 +11072,10 @@ function useQueryFormMotion(ref, layoutKey) {
10714
11072
  }
10715
11073
 
10716
11074
  // src/components/QueryFormSettings.tsx
10717
- import { useEffect as useEffect18, useRef as useRef26, useState as useState26 } from "react";
11075
+ import { useEffect as useEffect19, useRef as useRef27, useState as useState27 } from "react";
10718
11076
 
10719
11077
  // src/components/useQueryFieldSort.ts
10720
- import { useEffect as useEffect17, useRef as useRef25, useState as useState25 } from "react";
11078
+ import { useEffect as useEffect18, useRef as useRef26, useState as useState26 } from "react";
10721
11079
  function getQuerySortPreview(keys, rects, from, dy, gap) {
10722
11080
  const center = rects[from].top + rects[from].height / 2 + dy;
10723
11081
  const rest = keys.map((_, index) => index).filter((index) => index !== from);
@@ -10736,13 +11094,13 @@ function getQuerySortPreview(keys, rects, from, dy, gap) {
10736
11094
  return { ordered, offsets };
10737
11095
  }
10738
11096
  function useQueryFieldSort(keys, enabled, onCommit) {
10739
- const listRef = useRef25(null);
10740
- const cancelRef = useRef25();
10741
- const commitRef = useRef25(onCommit);
11097
+ const listRef = useRef26(null);
11098
+ const cancelRef = useRef26();
11099
+ const commitRef = useRef26(onCommit);
10742
11100
  commitRef.current = onCommit;
10743
- const [preview, setPreview] = useState25();
11101
+ const [preview, setPreview] = useState26();
10744
11102
  const signature = JSON.stringify(keys);
10745
- useEffect17(() => {
11103
+ useEffect18(() => {
10746
11104
  cancelRef.current?.();
10747
11105
  return () => cancelRef.current?.();
10748
11106
  }, [enabled, signature]);
@@ -10865,18 +11223,18 @@ function countQueryFieldRows(centers) {
10865
11223
  }
10866
11224
 
10867
11225
  // src/components/QueryFormSettings.tsx
10868
- import { Fragment as Fragment11, jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
11226
+ import { Fragment as Fragment11, jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
10869
11227
  function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed, disabled) {
10870
- const [snapshot, setSnapshot] = useState26();
10871
- const [draft, setDraft] = useState26({ fields: [], defaultCollapsed: defaultCollapsed ?? false });
10872
- const [open, setOpen] = useState26(false);
10873
- const [loading, setLoading] = useState26(false);
10874
- const [saving, setSaving] = useState26(false);
10875
- const [error, setError] = useState26("");
10876
- const [loadFailed, setLoadFailed] = useState26(false);
10877
- const token = useRef26(0);
10878
- const saveLock = useRef26(false);
10879
- const latest = useRef26({ config, fields, defaultCollapsed, applyCollapsed });
11228
+ const [snapshot, setSnapshot] = useState27();
11229
+ const [draft, setDraft] = useState27({ fields: [], defaultCollapsed: defaultCollapsed ?? false });
11230
+ const [open, setOpen] = useState27(false);
11231
+ const [loading, setLoading] = useState27(false);
11232
+ const [saving, setSaving] = useState27(false);
11233
+ const [error, setError] = useState27("");
11234
+ const [loadFailed, setLoadFailed] = useState27(false);
11235
+ const token = useRef27(0);
11236
+ const saveLock = useRef27(false);
11237
+ const latest = useRef27({ config, fields, defaultCollapsed, applyCollapsed });
10880
11238
  latest.current = { config, fields, defaultCollapsed, applyCollapsed };
10881
11239
  const moduleName = config?.scope.moduleName;
10882
11240
  const businessKey = config?.scope.businessKey;
@@ -10904,7 +11262,7 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
10904
11262
  if (request === token.current) setLoading(false);
10905
11263
  }
10906
11264
  }
10907
- useEffect18(() => {
11265
+ useEffect19(() => {
10908
11266
  setSnapshot(void 0);
10909
11267
  setOpen(false);
10910
11268
  setError("");
@@ -10960,7 +11318,7 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
10960
11318
  const items = new Map(visibleDraft.map((item) => [item.key, item]));
10961
11319
  setDraft((current) => ({ ...current, fields: keys.map((key, order) => ({ ...items.get(key), order })) }));
10962
11320
  });
10963
- const control = config ? /* @__PURE__ */ jsx31(
11321
+ const control = config ? /* @__PURE__ */ jsx32(
10964
11322
  Button,
10965
11323
  {
10966
11324
  type: "button",
@@ -10969,16 +11327,16 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
10969
11327
  "aria-label": "\u67E5\u8BE2\u8BBE\u7F6E",
10970
11328
  disabled: disabled || saving,
10971
11329
  loading: loading && !open,
10972
- icon: /* @__PURE__ */ jsx31(Icon, { name: "more-vertical" }),
11330
+ icon: /* @__PURE__ */ jsx32(Icon, { name: "more-vertical" }),
10973
11331
  onClick: () => {
10974
11332
  setOpen(true);
10975
11333
  void load(true);
10976
11334
  }
10977
11335
  }
10978
11336
  ) : null;
10979
- const panel = config ? /* @__PURE__ */ jsxs27(Fragment11, { children: [
10980
- !open && error ? /* @__PURE__ */ jsx31("span", { className: "sia-query-form__error", role: "alert", children: "\u67E5\u8BE2\u8BBE\u7F6E\u8BFB\u53D6\u5931\u8D25\uFF0C\u8BF7\u6253\u5F00\u8BBE\u7F6E\u91CD\u8BD5" }) : null,
10981
- /* @__PURE__ */ jsx31(
11337
+ const panel = config ? /* @__PURE__ */ jsxs28(Fragment11, { children: [
11338
+ !open && error ? /* @__PURE__ */ jsx32("span", { className: "sia-query-form__error", role: "alert", children: "\u67E5\u8BE2\u8BBE\u7F6E\u8BFB\u53D6\u5931\u8D25\uFF0C\u8BF7\u6253\u5F00\u8BBE\u7F6E\u91CD\u8BD5" }) : null,
11339
+ /* @__PURE__ */ jsx32(
10982
11340
  Modal,
10983
11341
  {
10984
11342
  title: "\u67E5\u8BE2\u8BBE\u7F6E",
@@ -10991,15 +11349,15 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
10991
11349
  onOpenChange: (next) => {
10992
11350
  if (!saveLock.current) setOpen(next);
10993
11351
  },
10994
- children: /* @__PURE__ */ jsxs27("div", { className: "sia-query-settings", children: [
10995
- loading ? /* @__PURE__ */ jsx31("p", { role: "status", children: "\u6B63\u5728\u8BFB\u53D6\u67E5\u8BE2\u8BBE\u7F6E\u2026" }) : null,
10996
- error ? /* @__PURE__ */ jsxs27("div", { role: "alert", className: "sia-query-form__error", children: [
11352
+ children: /* @__PURE__ */ jsxs28("div", { className: "sia-query-settings", children: [
11353
+ loading ? /* @__PURE__ */ jsx32("p", { role: "status", children: "\u6B63\u5728\u8BFB\u53D6\u67E5\u8BE2\u8BBE\u7F6E\u2026" }) : null,
11354
+ error ? /* @__PURE__ */ jsxs28("div", { role: "alert", className: "sia-query-form__error", children: [
10997
11355
  error,
10998
- loadFailed ? /* @__PURE__ */ jsx31(Button, { type: "button", variant: "link", onClick: () => void load(true), children: "\u91CD\u8BD5" }) : null
11356
+ loadFailed ? /* @__PURE__ */ jsx32(Button, { type: "button", variant: "link", onClick: () => void load(true), children: "\u91CD\u8BD5" }) : null
10999
11357
  ] }) : null,
11000
- /* @__PURE__ */ jsx31(Checkbox, { checked: draft.defaultCollapsed, disabled: locked, onChange: (checked) => setDraft((current) => ({ ...current, defaultCollapsed: checked })), children: "\u9ED8\u8BA4\u6536\u8D77\u67E5\u8BE2\u6761\u4EF6" }),
11001
- /* @__PURE__ */ jsx31("p", { className: "sia-query-settings__hint", children: "\u52FE\u9009\u9700\u8981\u663E\u793A\u7684\u6761\u4EF6\uFF0C\u62D6\u52A8\u6216\u4F7F\u7528\u4E0A\u4E0B\u6309\u94AE\u8C03\u6574\u987A\u5E8F\u3002" }),
11002
- /* @__PURE__ */ jsx31("div", { ref: sort.listRef, className: `sia-query-settings__list${sort.preview ? " is-sorting" : ""}`, children: visibleDraft.map((item, index) => /* @__PURE__ */ jsxs27(
11358
+ /* @__PURE__ */ jsx32(Checkbox, { checked: draft.defaultCollapsed, disabled: locked, onChange: (checked) => setDraft((current) => ({ ...current, defaultCollapsed: checked })), children: "\u9ED8\u8BA4\u6536\u8D77\u67E5\u8BE2\u6761\u4EF6" }),
11359
+ /* @__PURE__ */ jsx32("p", { className: "sia-query-settings__hint", children: "\u52FE\u9009\u9700\u8981\u663E\u793A\u7684\u6761\u4EF6\uFF0C\u62D6\u52A8\u6216\u4F7F\u7528\u4E0A\u4E0B\u6309\u94AE\u8C03\u6574\u987A\u5E8F\u3002" }),
11360
+ /* @__PURE__ */ jsx32("div", { ref: sort.listRef, className: `sia-query-settings__list${sort.preview ? " is-sorting" : ""}`, children: visibleDraft.map((item, index) => /* @__PURE__ */ jsxs28(
11003
11361
  "div",
11004
11362
  {
11005
11363
  "data-query-field-key": item.key,
@@ -11007,18 +11365,18 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
11007
11365
  style: sort.preview ? { transform: `translateY(${sort.preview.offsets[item.key] ?? 0}px)` } : void 0,
11008
11366
  onPointerDown: (event) => sort.start(event, item.key),
11009
11367
  children: [
11010
- /* @__PURE__ */ jsx31(Icon, { name: "menu", size: 15 }),
11011
- /* @__PURE__ */ jsx31(Checkbox, { "aria-label": `\u663E\u793A ${item.key}`, checked: item.visible, disabled: locked || hideDisabledKeys.has(item.key), onChange: (checked) => setDraft((current) => ({ ...current, fields: visibleDraft.map((field) => field.key === item.key ? { ...field, visible: checked } : field) })) }),
11012
- /* @__PURE__ */ jsx31("span", { className: "sia-query-settings__name", children: labels.get(item.key) ?? item.key }),
11013
- /* @__PURE__ */ jsxs27("div", { className: "sia-query-settings__order", children: [
11014
- /* @__PURE__ */ jsx31(Button, { type: "button", size: "small", variant: "text", "aria-label": `\u4E0A\u79FB ${item.key}`, disabled: locked || index === 0, icon: /* @__PURE__ */ jsx31(Icon, { name: "chevron-up" }), onClick: () => move(index, index - 1) }),
11015
- /* @__PURE__ */ jsx31(Button, { type: "button", size: "small", variant: "text", "aria-label": `\u4E0B\u79FB ${item.key}`, disabled: locked || index === visibleDraft.length - 1, icon: /* @__PURE__ */ jsx31(Icon, { name: "chevron-down" }), onClick: () => move(index, index + 1) })
11368
+ /* @__PURE__ */ jsx32(Icon, { name: "menu", size: 15 }),
11369
+ /* @__PURE__ */ jsx32(Checkbox, { "aria-label": `\u663E\u793A ${item.key}`, checked: item.visible, disabled: locked || hideDisabledKeys.has(item.key), onChange: (checked) => setDraft((current) => ({ ...current, fields: visibleDraft.map((field) => field.key === item.key ? { ...field, visible: checked } : field) })) }),
11370
+ /* @__PURE__ */ jsx32("span", { className: "sia-query-settings__name", children: labels.get(item.key) ?? item.key }),
11371
+ /* @__PURE__ */ jsxs28("div", { className: "sia-query-settings__order", children: [
11372
+ /* @__PURE__ */ jsx32(Button, { type: "button", size: "small", variant: "text", "aria-label": `\u4E0A\u79FB ${item.key}`, disabled: locked || index === 0, icon: /* @__PURE__ */ jsx32(Icon, { name: "chevron-up" }), onClick: () => move(index, index - 1) }),
11373
+ /* @__PURE__ */ jsx32(Button, { type: "button", size: "small", variant: "text", "aria-label": `\u4E0B\u79FB ${item.key}`, disabled: locked || index === visibleDraft.length - 1, icon: /* @__PURE__ */ jsx32(Icon, { name: "chevron-down" }), onClick: () => move(index, index + 1) })
11016
11374
  ] })
11017
11375
  ]
11018
11376
  },
11019
11377
  item.key
11020
11378
  )) }),
11021
- /* @__PURE__ */ jsx31(Button, { type: "button", disabled: locked, onClick: () => setDraft({ fields: reconcileQueryFields(fields.map((field) => field.key)), defaultCollapsed: defaultCollapsed ?? false }), children: "\u6062\u590D\u9ED8\u8BA4" })
11379
+ /* @__PURE__ */ jsx32(Button, { type: "button", disabled: locked, onClick: () => setDraft({ fields: reconcileQueryFields(fields.map((field) => field.key)), defaultCollapsed: defaultCollapsed ?? false }), children: "\u6062\u590D\u9ED8\u8BA4" })
11022
11380
  ] })
11023
11381
  }
11024
11382
  )
@@ -11027,7 +11385,7 @@ function useQueryFormSettings(config, fields, defaultCollapsed, applyCollapsed,
11027
11385
  }
11028
11386
 
11029
11387
  // src/components/QueryForm.tsx
11030
- import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
11388
+ import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
11031
11389
  function QueryForm({
11032
11390
  fields,
11033
11391
  settings,
@@ -11062,23 +11420,23 @@ function QueryForm({
11062
11420
  ...formProps
11063
11421
  }) {
11064
11422
  const [form] = useForm(providedForm);
11065
- const [internalCollapsed, setInternalCollapsed] = useState27(defaultCollapsed);
11066
- const [expandedRows, setExpandedRows] = useState27(0);
11067
- const [needsCollapse, setNeedsCollapse] = useState27(false);
11423
+ const [internalCollapsed, setInternalCollapsed] = useState28(defaultCollapsed);
11424
+ const [expandedRows, setExpandedRows] = useState28(0);
11425
+ const [needsCollapse, setNeedsCollapse] = useState28(false);
11068
11426
  const collapsed = collapsible && needsCollapse && (controlledCollapsed ?? internalCollapsed ?? expandedRows >= 3);
11069
- const [searching, setSearching] = useState27(false);
11070
- const [saving, setSaving] = useState27(false);
11071
- const [removing, setRemoving] = useState27(false);
11072
- const [saveOpen, setSaveOpen] = useState27(false);
11073
- const [saveName, setSaveName] = useState27("");
11074
- const [saveError, setSaveError] = useState27("");
11075
- const [error, setError] = useState27("");
11076
- const [activeShortcut, setActiveShortcut] = useState27("");
11077
- const source = useRef27({ source: "submit" });
11078
- const searchLock = useRef27(false);
11079
- const saveLock = useRef27(false);
11080
- const removeLock = useRef27(false);
11081
- const snapshot = useRef27();
11427
+ const [searching, setSearching] = useState28(false);
11428
+ const [saving, setSaving] = useState28(false);
11429
+ const [removing, setRemoving] = useState28(false);
11430
+ const [saveOpen, setSaveOpen] = useState28(false);
11431
+ const [saveName, setSaveName] = useState28("");
11432
+ const [saveError, setSaveError] = useState28("");
11433
+ const [error, setError] = useState28("");
11434
+ const [activeShortcut, setActiveShortcut] = useState28("");
11435
+ const source = useRef28({ source: "submit" });
11436
+ const searchLock = useRef28(false);
11437
+ const saveLock = useRef28(false);
11438
+ const removeLock = useRef28(false);
11439
+ const snapshot = useRef28();
11082
11440
  const busy = disabled || loading || searching;
11083
11441
  const shortcutBusy = busy || shortcutsLoading || saving || removing;
11084
11442
  const fieldLabel = (content) => {
@@ -11090,7 +11448,7 @@ function QueryForm({
11090
11448
  width,
11091
11449
  hideDisabled: settingsHideDisabled,
11092
11450
  label: settingsLabel ?? item.label ?? (typeof item.children === "function" ? void 0 : fieldLabel(item.children)) ?? key,
11093
- content: /* @__PURE__ */ jsx32(Form.Item, { noStyle: true, ...item })
11451
+ content: /* @__PURE__ */ jsx33(Form.Item, { noStyle: true, ...item })
11094
11452
  })) : Children4.toArray(children).map((content, index) => ({
11095
11453
  key: isValidElement5(content) && content.key != null ? String(content.key) : String(index),
11096
11454
  width: void 0,
@@ -11105,11 +11463,11 @@ function QueryForm({
11105
11463
  const entries = configured.map((item) => ({ ...entriesByKey.get(item.key), visible: item.visible, visibleIndex: item.visible ? visibleIndex++ : -1 }));
11106
11464
  const layoutKey = JSON.stringify(configured);
11107
11465
  const limit = Math.max(1, Math.floor(collapsedCount));
11108
- const rowRef = useRef27(null);
11109
- const actionsRef = useRef27(null);
11110
- const toggleRef = useRef27(null);
11111
- const [fittingCount, setFittingCount] = useState27(limit);
11112
- const [settingsRows, setSettingsRows] = useState27(0);
11466
+ const rowRef = useRef28(null);
11467
+ const actionsRef = useRef28(null);
11468
+ const toggleRef = useRef28(null);
11469
+ const [fittingCount, setFittingCount] = useState28(limit);
11470
+ const [settingsRows, setSettingsRows] = useState28(0);
11113
11471
  useLayoutEffect9(() => {
11114
11472
  const row = rowRef.current;
11115
11473
  const actions = actionsRef.current;
@@ -11273,8 +11631,8 @@ function QueryForm({
11273
11631
  setRemoving(false);
11274
11632
  }
11275
11633
  }
11276
- return /* @__PURE__ */ jsxs28("div", { className: `sia-query-form ${className}`.trim(), children: [
11277
- /* @__PURE__ */ jsxs28(
11634
+ return /* @__PURE__ */ jsxs29("div", { className: `sia-query-form ${className}`.trim(), children: [
11635
+ /* @__PURE__ */ jsxs29(
11278
11636
  Form,
11279
11637
  {
11280
11638
  ...formProps,
@@ -11293,8 +11651,8 @@ function QueryForm({
11293
11651
  onValuesChange?.(changed, values);
11294
11652
  },
11295
11653
  children: [
11296
- quickQueries.length ? /* @__PURE__ */ jsxs28("div", { className: "sia-query-form__quick", "aria-label": "\u9884\u8BBE\u5FEB\u6377\u67E5\u8BE2", children: [
11297
- quickQueries.map((query) => /* @__PURE__ */ jsx32(
11654
+ quickQueries.length ? /* @__PURE__ */ jsxs29("div", { className: "sia-query-form__quick", "aria-label": "\u9884\u8BBE\u5FEB\u6377\u67E5\u8BE2", children: [
11655
+ quickQueries.map((query) => /* @__PURE__ */ jsx33(
11298
11656
  Badge,
11299
11657
  {
11300
11658
  className: "sia-query-form__quick-badge",
@@ -11303,7 +11661,7 @@ function QueryForm({
11303
11661
  title: query.count === void 0 ? void 0 : `\u5171 ${query.count} \u6761`,
11304
11662
  ...query.badgeProps,
11305
11663
  count: query.count,
11306
- children: /* @__PURE__ */ jsx32(
11664
+ children: /* @__PURE__ */ jsx33(
11307
11665
  Button,
11308
11666
  {
11309
11667
  size: query.size ?? quickQuerySize,
@@ -11319,7 +11677,7 @@ function QueryForm({
11319
11677
  )),
11320
11678
  " "
11321
11679
  ] }) : null,
11322
- /* @__PURE__ */ jsx32("div", { className: "sia-query-form__motion", children: /* @__PURE__ */ jsxs28(
11680
+ /* @__PURE__ */ jsx33("div", { className: "sia-query-form__motion", children: /* @__PURE__ */ jsxs29(
11323
11681
  "div",
11324
11682
  {
11325
11683
  ref: rowRef,
@@ -11328,7 +11686,7 @@ function QueryForm({
11328
11686
  "--sia-query-field-width": typeof fieldWidth === "number" ? `${fieldWidth}px` : fieldWidth
11329
11687
  },
11330
11688
  children: [
11331
- entries.map((entry) => /* @__PURE__ */ jsx32(
11689
+ entries.map((entry) => /* @__PURE__ */ jsx33(
11332
11690
  "div",
11333
11691
  {
11334
11692
  className: "sia-query-form__field",
@@ -11342,9 +11700,9 @@ function QueryForm({
11342
11700
  },
11343
11701
  entry.key
11344
11702
  )),
11345
- /* @__PURE__ */ jsxs28("div", { ref: actionsRef, className: "sia-query-form__actions", children: [
11346
- /* @__PURE__ */ jsxs28(Space.Compact, { children: [
11347
- /* @__PURE__ */ jsx32(
11703
+ /* @__PURE__ */ jsxs29("div", { ref: actionsRef, className: "sia-query-form__actions", children: [
11704
+ /* @__PURE__ */ jsxs29(Space.Compact, { children: [
11705
+ /* @__PURE__ */ jsx33(
11348
11706
  Button,
11349
11707
  {
11350
11708
  type: "submit",
@@ -11354,8 +11712,8 @@ function QueryForm({
11354
11712
  children: searchText
11355
11713
  }
11356
11714
  ),
11357
- /* @__PURE__ */ jsx32(Button, { disabled: busy, onClick: reset, children: resetText }),
11358
- onSaveQuery ? /* @__PURE__ */ jsx32(
11715
+ /* @__PURE__ */ jsx33(Button, { disabled: busy, onClick: reset, children: resetText }),
11716
+ onSaveQuery ? /* @__PURE__ */ jsx33(
11359
11717
  Button,
11360
11718
  {
11361
11719
  disabled: shortcutBusy,
@@ -11370,12 +11728,12 @@ function QueryForm({
11370
11728
  ) : null,
11371
11729
  showSettings ?? settingsRows > 2 ? cloudSettings.control : null
11372
11730
  ] }),
11373
- collapsible && entries.length > 0 ? /* @__PURE__ */ jsx32("span", { ref: toggleRef, hidden: !needsCollapse, children: /* @__PURE__ */ jsx32(
11731
+ collapsible && entries.length > 0 ? /* @__PURE__ */ jsx33("span", { ref: toggleRef, hidden: !needsCollapse, children: /* @__PURE__ */ jsx33(
11374
11732
  Button,
11375
11733
  {
11376
11734
  variant: "link",
11377
11735
  "aria-expanded": !collapsed,
11378
- icon: /* @__PURE__ */ jsx32(Icon, { name: collapsed ? "chevron-down" : "chevron-up" }),
11736
+ icon: /* @__PURE__ */ jsx33(Icon, { name: collapsed ? "chevron-down" : "chevron-up" }),
11379
11737
  iconPosition: "end",
11380
11738
  onClick: () => {
11381
11739
  setInternalCollapsed(!collapsed);
@@ -11390,8 +11748,8 @@ function QueryForm({
11390
11748
  ]
11391
11749
  }
11392
11750
  ) }),
11393
- savedQueries.length ? /* @__PURE__ */ jsxs28("div", { className: "sia-query-form__saved", "aria-label": "\u5DF2\u4FDD\u5B58\u5FEB\u6377\u67E5\u8BE2", children: [
11394
- savedQueries.map((query, index) => /* @__PURE__ */ jsx32(
11751
+ savedQueries.length ? /* @__PURE__ */ jsxs29("div", { className: "sia-query-form__saved", "aria-label": "\u5DF2\u4FDD\u5B58\u5FEB\u6377\u67E5\u8BE2", children: [
11752
+ savedQueries.map((query, index) => /* @__PURE__ */ jsx33(
11395
11753
  Tag,
11396
11754
  {
11397
11755
  status: query.status ?? ["processing", "success", "warning", "error"][index % 4],
@@ -11417,11 +11775,11 @@ function QueryForm({
11417
11775
  )),
11418
11776
  " "
11419
11777
  ] }) : null,
11420
- error ? /* @__PURE__ */ jsx32("p", { className: "sia-query-form__error", role: "alert", children: error }) : null
11778
+ error ? /* @__PURE__ */ jsx33("p", { className: "sia-query-form__error", role: "alert", children: error }) : null
11421
11779
  ]
11422
11780
  }
11423
11781
  ),
11424
- /* @__PURE__ */ jsxs28(
11782
+ /* @__PURE__ */ jsxs29(
11425
11783
  Modal,
11426
11784
  {
11427
11785
  open: saveOpen,
@@ -11433,7 +11791,7 @@ function QueryForm({
11433
11791
  if (!saveLock.current) setSaveOpen(next);
11434
11792
  },
11435
11793
  children: [
11436
- /* @__PURE__ */ jsx32(
11794
+ /* @__PURE__ */ jsx33(
11437
11795
  Input,
11438
11796
  {
11439
11797
  autoFocus: true,
@@ -11452,7 +11810,7 @@ function QueryForm({
11452
11810
  }
11453
11811
  }
11454
11812
  ),
11455
- saveError ? /* @__PURE__ */ jsx32("p", { className: "sia-query-form__error", role: "alert", children: saveError }) : null
11813
+ saveError ? /* @__PURE__ */ jsx33("p", { className: "sia-query-form__error", role: "alert", children: saveError }) : null
11456
11814
  ]
11457
11815
  }
11458
11816
  )
@@ -11461,7 +11819,7 @@ function QueryForm({
11461
11819
 
11462
11820
  // src/components/NumberRange.tsx
11463
11821
  import { forwardRef as forwardRef9 } from "react";
11464
- import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
11822
+ import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
11465
11823
  var NumberRange = forwardRef9(function NumberRange2({
11466
11824
  value,
11467
11825
  defaultValue = [null, null],
@@ -11490,7 +11848,7 @@ var NumberRange = forwardRef9(function NumberRange2({
11490
11848
  setValue2(index === 0 ? [next, range[1]] : [range[0], next]);
11491
11849
  }
11492
11850
  const inputProps = { min, max, step, precision, size, status, disabled, readOnly, placeholderMode, controls: false };
11493
- return /* @__PURE__ */ jsxs29(
11851
+ return /* @__PURE__ */ jsxs30(
11494
11852
  "span",
11495
11853
  {
11496
11854
  ...props,
@@ -11499,7 +11857,7 @@ var NumberRange = forwardRef9(function NumberRange2({
11499
11857
  "aria-disabled": disabled || void 0,
11500
11858
  className: `sia-number-range sia-number-range--${size} sia-number-range--${status}${disabled ? " is-disabled" : ""} ${className}`.trim(),
11501
11859
  children: [
11502
- /* @__PURE__ */ jsx33(
11860
+ /* @__PURE__ */ jsx34(
11503
11861
  InputNumber,
11504
11862
  {
11505
11863
  ...inputProps,
@@ -11511,8 +11869,8 @@ var NumberRange = forwardRef9(function NumberRange2({
11511
11869
  onChange: (next) => change(0, next)
11512
11870
  }
11513
11871
  ),
11514
- /* @__PURE__ */ jsx33(Icon, { className: "sia-number-range__separator", name: "tilde", size: 12, strokeWidth: 1.5, "aria-hidden": "true" }),
11515
- /* @__PURE__ */ jsx33(
11872
+ /* @__PURE__ */ jsx34(Icon, { className: "sia-number-range__separator", name: "tilde", size: 12, strokeWidth: 1.5, "aria-hidden": "true" }),
11873
+ /* @__PURE__ */ jsx34(
11516
11874
  InputNumber,
11517
11875
  {
11518
11876
  ...inputProps,
@@ -11524,15 +11882,15 @@ var NumberRange = forwardRef9(function NumberRange2({
11524
11882
  onChange: (next) => change(1, next)
11525
11883
  }
11526
11884
  ),
11527
- allowClear && !disabled && !readOnly && range.some((item) => item !== null) ? /* @__PURE__ */ jsx33("button", { type: "button", className: "sia-number-range__clear", "aria-label": "\u6E05\u9664\u6570\u5B57\u533A\u95F4", onClick: () => setValue2([null, null]), children: /* @__PURE__ */ jsx33(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null
11885
+ allowClear && !disabled && !readOnly && range.some((item) => item !== null) ? /* @__PURE__ */ jsx34("button", { type: "button", className: "sia-number-range__clear", "aria-label": "\u6E05\u9664\u6570\u5B57\u533A\u95F4", onClick: () => setValue2([null, null]), children: /* @__PURE__ */ jsx34(Icon, { name: "circle-close", variant: "filled", size: 15 }) }) : null
11528
11886
  ]
11529
11887
  }
11530
11888
  );
11531
11889
  });
11532
11890
 
11533
11891
  // src/components/VirtualGrid.tsx
11534
- import { useEffect as useEffect19, useLayoutEffect as useLayoutEffect10, useRef as useRef28, useState as useState28 } from "react";
11535
- import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
11892
+ import { useEffect as useEffect20, useLayoutEffect as useLayoutEffect10, useRef as useRef29, useState as useState29 } from "react";
11893
+ import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
11536
11894
  function VirtualGrid({
11537
11895
  items,
11538
11896
  itemKey,
@@ -11551,11 +11909,11 @@ function VirtualGrid({
11551
11909
  tabIndex = 0,
11552
11910
  ...props
11553
11911
  }) {
11554
- const viewport = useRef28(null);
11555
- const [size, setSize] = useState28({ width: 0, height: 0 });
11556
- const [scrollTop, setScrollTop] = useState28(0);
11557
- const frame = useRef28();
11558
- const requestedLength = useRef28();
11912
+ const viewport = useRef29(null);
11913
+ const [size, setSize] = useState29({ width: 0, height: 0 });
11914
+ const [scrollTop, setScrollTop] = useState29(0);
11915
+ const frame = useRef29();
11916
+ const requestedLength = useRef29();
11559
11917
  const height = Math.max(1, rowHeight);
11560
11918
  const spacing = Math.max(0, gap);
11561
11919
  const columns = Math.max(1, Math.floor((size.width + spacing) / (Math.max(1, minColumnWidth) + spacing)));
@@ -11584,14 +11942,14 @@ function VirtualGrid({
11584
11942
  if (el.scrollTop !== next) el.scrollTop = next;
11585
11943
  setScrollTop(next);
11586
11944
  }, [totalHeight, size.height]);
11587
- useEffect19(() => {
11945
+ useEffect20(() => {
11588
11946
  if (!onLoadMore || !hasMore || loading || size.height <= 0) return;
11589
11947
  if (totalHeight - scrollTop - size.height > Math.max(0, loadMoreThreshold)) return;
11590
11948
  if (requestedLength.current === items.length) return;
11591
11949
  requestedLength.current = items.length;
11592
11950
  onLoadMore();
11593
11951
  }, [items.length, hasMore, loading, size.height, scrollTop, totalHeight, loadMoreThreshold, onLoadMore]);
11594
- return /* @__PURE__ */ jsxs30(
11952
+ return /* @__PURE__ */ jsxs31(
11595
11953
  "div",
11596
11954
  {
11597
11955
  ...props,
@@ -11609,16 +11967,16 @@ function VirtualGrid({
11609
11967
  });
11610
11968
  },
11611
11969
  children: [
11612
- /* @__PURE__ */ jsx34("div", { className: "sia-virtual-grid__spacer", style: { height: totalHeight }, children: Array.from({ length: Math.max(0, endRow - startRow) }, (_, offset) => {
11970
+ /* @__PURE__ */ jsx35("div", { className: "sia-virtual-grid__spacer", style: { height: totalHeight }, children: Array.from({ length: Math.max(0, endRow - startRow) }, (_, offset) => {
11613
11971
  const row = startRow + offset;
11614
- return /* @__PURE__ */ jsx34("div", { className: "sia-virtual-grid__row", role: "presentation", style: {
11972
+ return /* @__PURE__ */ jsx35("div", { className: "sia-virtual-grid__row", role: "presentation", style: {
11615
11973
  top: row * stride,
11616
11974
  height,
11617
11975
  columnGap: spacing,
11618
11976
  gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`
11619
11977
  }, children: items.slice(row * columns, (row + 1) * columns).map((item, column) => {
11620
11978
  const index = row * columns + column;
11621
- return /* @__PURE__ */ jsx34("div", { className: "sia-virtual-grid__item", role: "listitem", "aria-posinset": index + 1, "aria-setsize": hasMore ? -1 : items.length, children: renderItem(item, index) }, itemKey(item, index));
11979
+ return /* @__PURE__ */ jsx35("div", { className: "sia-virtual-grid__item", role: "listitem", "aria-posinset": index + 1, "aria-setsize": hasMore ? -1 : items.length, children: renderItem(item, index) }, itemKey(item, index));
11622
11980
  }) }, row);
11623
11981
  }) }),
11624
11982
  !items.length && !loading ? empty : null
@@ -11658,6 +12016,7 @@ export {
11658
12016
  ChartVisualMap,
11659
12017
  ChartWhirlingLoading,
11660
12018
  Checkbox,
12019
+ ChooseBox,
11661
12020
  ChordChart,
11662
12021
  Col,
11663
12022
  Collapse,
@@ -11763,6 +12122,7 @@ export {
11763
12122
  chartColor,
11764
12123
  chartTicks,
11765
12124
  createBaiduMapHost,
12125
+ createBrowserChooseBoxSource,
11766
12126
  createCellSelectionPlugin,
11767
12127
  createColumnSettingPlugin,
11768
12128
  createColumnTransformPlugin,
@@ -11778,6 +12138,7 @@ export {
11778
12138
  createSelectionPlugin,
11779
12139
  createSortPlugin,
11780
12140
  createSummaryPlugin,
12141
+ createTauriChooseBoxSource,
11781
12142
  createToolbarPlugin,
11782
12143
  createTreePlugin,
11783
12144
  createWorksheetPlugin,