bitz-react-admin-ui 1.9.7 → 1.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/_virtual/dayjs.min.mjs +5 -2
  2. package/dist/_virtual/dayjs.min2.mjs +4 -0
  3. package/dist/components/BitzCalendar/index.mjs +1 -1
  4. package/dist/components/BitzDayJs/index.mjs +1 -1
  5. package/dist/components/BitzFluentInput/index.mjs +18 -18
  6. package/dist/components/BitzFluentSelect/index.mjs +13 -13
  7. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
  8. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
  9. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
  10. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  11. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  12. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  13. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  14. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  15. package/dist/components/BitzTable/Store/index.mjs +10 -8
  16. package/dist/components/BitzTable/Table/index.mjs +149 -139
  17. package/dist/components/BitzTable/Table/utils.mjs +12 -12
  18. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.d.ts +2 -0
  19. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +244 -236
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +32 -27
  21. package/dist/components/BitzTable/index.d.ts +4 -2
  22. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  23. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  24. package/dist/style.css +1 -1
  25. package/dist/utils/time.mjs +1 -1
  26. package/package.json +1 -1
@@ -1,249 +1,257 @@
1
1
  import { j as o } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { create as oe, useModal as se, antdModalV5 as te } from "@ebay/nice-modal-react";
3
- import { Modal as le, Typography as ne, Checkbox as re, Button as ae } from "antd";
2
+ import { create as se, useModal as te, antdModalV5 as le } from "@ebay/nice-modal-react";
3
+ import { Modal as ne, Typography as re, Checkbox as ae, Button as ce } from "antd";
4
4
  import r from "./index.module.less.mjs";
5
- import { useState as N, useContext as ce, useEffect as ie, useCallback as V, useMemo as M } from "react";
6
- import { TableContext as me } from "../../Store/index.mjs";
7
- import { genColumnKey as F, columnSort as de } from "../../Store/utils/index.mjs";
5
+ import { useState as N, useContext as ie, useEffect as me, useCallback as V, useMemo as M } from "react";
6
+ import { TableContext as de } from "../../Store/index.mjs";
7
+ import { genColumnKey as F, columnSort as ue } from "../../Store/utils/index.mjs";
8
8
  import p from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
9
- import { DndContext as ue } from "../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
10
- import { SortableContext as pe, verticalListSortingStrategy as fe, arrayMove as he } from "../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
11
- import xe from "./DndItem.mjs";
12
- import { restrictToVerticalAxis as be, restrictToWindowEdges as ye } from "../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
9
+ import { DndContext as pe } from "../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
10
+ import { SortableContext as he, verticalListSortingStrategy as xe, arrayMove as fe } from "../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
11
+ import be from "./DndItem.mjs";
12
+ import { restrictToVerticalAxis as ye, restrictToWindowEdges as Ce } from "../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
13
13
  import P from "../../../BitzButton/index.mjs";
14
- import { useImmer as Ce } from "../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
15
- import { css as Me } from "../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
16
- import je from "../../../BitzTheme/index.mjs";
14
+ import { useImmer as Me } from "../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
15
+ import { css as je } from "../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
16
+ import ke from "../../../BitzTheme/index.mjs";
17
17
  import "./index.less.mjs";
18
18
  import W from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
19
- import ke from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
20
- import ge from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
21
- const $e = oe(({ onChange: x }) => {
22
- var _, E, z, H;
23
- const { token: i } = je.useToken(), b = se(), [j, k] = N(null), [$, K] = N(!1), [q, w] = N(!1), [a, y] = Ce({
24
- columnsMap: {},
25
- sortKeyColumns: []
26
- }), {
27
- persistenceType: G,
28
- persistenceKey: B,
29
- onlineChange: g,
30
- columnsMap: J,
31
- setColumnsMap: L,
32
- sortKeyColumns: Q,
33
- setSortKeyColumns: U,
34
- // clearPersistenceStorage,
35
- ...l
36
- } = ce(me);
37
- ie(() => {
38
- y((e) => {
39
- e.columnsMap = { ...J }, e.sortKeyColumns = [...Q];
40
- });
41
- }, []);
42
- const X = V(() => {
43
- y((e) => {
44
- e.columnsMap = { ...l.defaultColumnKeyMap };
45
- });
46
- }, []), f = M(() => {
47
- var s, n;
48
- const e = [];
49
- return (s = l == null ? void 0 : l.columns) != null && s.length && ((n = l == null ? void 0 : l.columns) == null || n.map(({ key: u, dataIndex: t, ...m }) => {
50
- const C = F(
51
- u || t,
52
- [u || t].filter(Boolean).join("-")
53
- ), d = a.columnsMap[C || "null"];
54
- return (d == null ? void 0 : d.show) !== !1 && e.push({
55
- key: C,
56
- ...W(m, ["className"]),
57
- selectable: !1,
58
- disabled: (d == null ? void 0 : d.disable) === !0
59
- }), d;
60
- })), e.sort(de(a.columnsMap));
61
- }, [a.columnsMap, l == null ? void 0 : l.columns]), S = V(
62
- (e) => {
63
- var s;
64
- return (s = a.sortKeyColumns) == null ? void 0 : s.findIndex((n) => n === e);
65
- },
66
- [a.sortKeyColumns]
67
- ), T = M(
68
- () => j ? S(j) : -1,
69
- [j, S]
70
- ), D = M(() => {
71
- const e = [], s = /* @__PURE__ */ new Map();
72
- return { list: ((u, t) => u.map(({ key: m, dataIndex: C, children: d, ...R }) => {
73
- var O;
74
- const v = F(
75
- m || C,
76
- [t == null ? void 0 : t.columnKey, R.index].filter(Boolean).join("-")
77
- ), c = a.columnsMap[v || "null"] || { show: !0 };
78
- (c == null ? void 0 : c.show) !== !1 && !d && e.push(v);
79
- const A = {
80
- key: v,
81
- ...W(R, ["className"]),
82
- selectable: !1,
83
- disabled: c.disable === !0,
84
- disableCheckbox: typeof c.disable == "boolean" ? c == null ? void 0 : c.disable : (O = c == null ? void 0 : c.disable) == null ? void 0 : O.checkbox,
85
- isLeaf: t ? !0 : void 0
86
- };
87
- return s.set(m, A), A;
88
- }))(l == null ? void 0 : l.columns), keys: e, map: s };
89
- }, [a.columnsMap, l == null ? void 0 : l.columns]), Y = (e, s) => {
90
- const n = { ...a.columnsMap };
91
- ((t) => {
92
- const m = { ...n[t] };
93
- m.show = !e, n[t] = m;
94
- })(s.key), w(!0), y((t) => {
95
- t.columnsMap = { ...n };
96
- });
97
- }, Z = (e, s) => {
98
- const n = { ...a.columnsMap }, u = he(a.sortKeyColumns, e, s);
99
- u.forEach((t, m) => {
100
- n[t] = { ...n[t] || {}, order: m };
101
- }), w(!0), y((t) => {
102
- t.columnsMap = { ...n }, t.sortKeyColumns = u;
103
- });
104
- }, ee = () => {
105
- var e;
106
- L(a.columnsMap), U(a.sortKeyColumns), G === "online" && B && (g == null || g(B, a.columnsMap)), x ? (K(!0), (e = x == null ? void 0 : x(a.columnsMap)) == null || e.finally(() => {
107
- K(!1), b.hide();
108
- })) : b.hide();
109
- }, I = () => {
110
- b.hide();
111
- }, h = M(() => i.mode === "dark", [i.mode]);
112
- return /* @__PURE__ */ o.jsxs(
113
- le,
114
- {
115
- className: "tableColumnSettingModal",
116
- title: /* @__PURE__ */ o.jsx(ne.Title, { style: { fontSize: 16, margin: 0 }, children: "列设置" }),
117
- getContainer: !1,
118
- ...te(b),
119
- style: {
120
- "--modalContent-bgColor": (_ = i.Modal) == null ? void 0 : _.contentBg,
121
- "--header-bgColor": (E = i.Modal) == null ? void 0 : E.headerBg,
122
- "--footer-bgColor": (z = i.Modal) == null ? void 0 : z.footerBg,
123
- "--blockTitle-colorBg": h ? "#333" : "#fff",
124
- "--leftBody-bgColor": h ? "#262626" : "#e0e0e0",
125
- "--rightBody-bgColor": h ? "#262626" : "#fff",
126
- "--checked": h ? "#303030" : "#eee",
127
- "--block-bgColor": h ? "#222" : "#fff",
128
- "--colorText": i.colorText,
129
- "--colorText-desc": i.colorTextDescription,
130
- "--colorBorder": i.colorBorder
19
+ import ge from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
20
+ import Se from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
21
+ const qe = se(
22
+ ({ onChange: f, getContainer: $ }) => {
23
+ var _, E, z, H;
24
+ const { token: i } = ke.useToken(), b = te(), [j, k] = N(null), [q, K] = N(!1), [G, w] = N(!1), [a, y] = Me({
25
+ columnsMap: {},
26
+ sortKeyColumns: []
27
+ }), {
28
+ persistenceType: J,
29
+ persistenceKey: B,
30
+ onlineChange: g,
31
+ columnsMap: L,
32
+ setColumnsMap: Q,
33
+ sortKeyColumns: U,
34
+ setSortKeyColumns: X,
35
+ // clearPersistenceStorage,
36
+ ...l
37
+ } = ie(de);
38
+ me(() => {
39
+ y((e) => {
40
+ e.columnsMap = { ...L }, e.sortKeyColumns = [...U];
41
+ });
42
+ }, []);
43
+ const Y = V(() => {
44
+ y((e) => {
45
+ e.columnsMap = { ...l.defaultColumnKeyMap };
46
+ });
47
+ }, []), h = M(() => {
48
+ var s, n;
49
+ const e = [];
50
+ return (s = l == null ? void 0 : l.columns) != null && s.length && ((n = l == null ? void 0 : l.columns) == null || n.map(
51
+ ({ key: u, dataIndex: t, ...m }) => {
52
+ const C = F(
53
+ u || t,
54
+ [u || t].filter(Boolean).join("-")
55
+ ), d = a.columnsMap[C || "null"];
56
+ return (d == null ? void 0 : d.show) !== !1 && e.push({
57
+ key: C,
58
+ ...W(m, ["className"]),
59
+ selectable: !1,
60
+ disabled: (d == null ? void 0 : d.disable) === !0
61
+ }), d;
62
+ }
63
+ )), e.sort(ue(a.columnsMap));
64
+ }, [a.columnsMap, l == null ? void 0 : l.columns]), S = V(
65
+ (e) => {
66
+ var s;
67
+ return (s = a.sortKeyColumns) == null ? void 0 : s.findIndex((n) => n === e);
131
68
  },
132
- styles: { body: { maxHeight: window.innerHeight - 300 } },
133
- width: 600,
134
- onCancel: I,
135
- footer: /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
136
- /* @__PURE__ */ o.jsx(
137
- P,
138
- {
139
- type: "primary",
140
- icon: /* @__PURE__ */ o.jsx(ke, {}),
141
- onClick: ee,
142
- disabled: !q,
143
- loading: $,
144
- children: "保存"
145
- }
146
- ),
147
- /* @__PURE__ */ o.jsx(P, { onClick: I, children: "取消" })
148
- ] }),
149
- children: [
150
- /* @__PURE__ */ o.jsx("div", { className: p(r.introduce, "tableColumnSetting_introduce"), children: "选择要在表中显示的可用列。拖动选定的列以对其重新排序。" }),
151
- /* @__PURE__ */ o.jsxs(
152
- "div",
153
- {
154
- className: p(r.container, "tableColumnSetting_container"),
155
- style: { maxHeight: window.innerHeight - 390, overflow: "auto" },
156
- children: [
157
- /* @__PURE__ */ o.jsxs("div", { className: r.block, children: [
158
- /* @__PURE__ */ o.jsxs("div", { className: p(r.header, "tableColumnSetting_header"), children: [
159
- /* @__PURE__ */ o.jsx("div", { className: p(r.title, "tableColumnSetting_title"), children: "可用列" }),
160
- /* @__PURE__ */ o.jsx("div", {})
161
- ] }),
162
- /* @__PURE__ */ o.jsx("div", { className: p(r.body, "tableColumnSetting_body"), children: /* @__PURE__ */ o.jsx("ul", { className: r.content, children: (H = D.list) == null ? void 0 : H.map((e) => {
163
- const s = D.keys.includes(e.key);
164
- return /* @__PURE__ */ o.jsxs(
165
- "li",
166
- {
167
- className: p(r.item, {
168
- [r.checked]: !s,
169
- tableColumnSetting_checked: !s
170
- }),
171
- onClick: () => !e.disabled && Y(s, e),
172
- children: [
173
- /* @__PURE__ */ o.jsx(re, { checked: s, disabled: e.disabled }),
174
- /* @__PURE__ */ o.jsx(
175
- "span",
176
- {
177
- className: p(
178
- r["content-item-text"],
179
- {
180
- [r["content-item-text-disabled"]]: e.disabled
181
- },
182
- "tableColumnSetting_content-item-text"
183
- ),
184
- children: e.title
185
- }
186
- )
187
- ]
188
- },
189
- e.key
190
- );
191
- }) }) })
192
- ] }),
193
- /* @__PURE__ */ o.jsxs("div", { className: r.block, children: [
194
- /* @__PURE__ */ o.jsxs("div", { className: r.header, children: [
195
- /* @__PURE__ */ o.jsx("div", { className: r.title, children: "选定列" }),
196
- /* @__PURE__ */ o.jsx(
197
- ae,
198
- {
199
- type: "link",
200
- icon: /* @__PURE__ */ o.jsx(ge, {}),
201
- size: "small",
202
- onClick: X,
203
- className: Me`
204
- &:hover {
205
- color: ${i.colorPrimary} !important;
206
- }
207
- `,
208
- children: "重置"
209
- }
210
- )
69
+ [a.sortKeyColumns]
70
+ ), T = M(
71
+ () => j ? S(j) : -1,
72
+ [j, S]
73
+ ), D = M(() => {
74
+ const e = [], s = /* @__PURE__ */ new Map();
75
+ return {
76
+ list: ((u, t) => u.map(({ key: m, dataIndex: C, children: d, ...R }) => {
77
+ var O;
78
+ const v = F(
79
+ m || C,
80
+ [t == null ? void 0 : t.columnKey, R.index].filter(Boolean).join("-")
81
+ ), c = a.columnsMap[v || "null"] || { show: !0 };
82
+ (c == null ? void 0 : c.show) !== !1 && !d && e.push(v);
83
+ const A = {
84
+ key: v,
85
+ ...W(R, ["className"]),
86
+ selectable: !1,
87
+ disabled: c.disable === !0,
88
+ disableCheckbox: typeof c.disable == "boolean" ? c == null ? void 0 : c.disable : (O = c == null ? void 0 : c.disable) == null ? void 0 : O.checkbox,
89
+ isLeaf: t ? !0 : void 0
90
+ };
91
+ return s.set(m, A), A;
92
+ }))((l == null ? void 0 : l.columns) ?? []),
93
+ keys: e,
94
+ map: s
95
+ };
96
+ }, [a.columnsMap, l == null ? void 0 : l.columns]), Z = (e, s) => {
97
+ const n = { ...a.columnsMap };
98
+ ((t) => {
99
+ const m = { ...n[t] };
100
+ m.show = !e, n[t] = m;
101
+ })(s.key), w(!0), y((t) => {
102
+ t.columnsMap = { ...n };
103
+ });
104
+ }, ee = (e, s) => {
105
+ const n = { ...a.columnsMap }, u = fe(a.sortKeyColumns, e, s);
106
+ u.forEach((t, m) => {
107
+ n[t] = { ...n[t] || {}, order: m };
108
+ }), w(!0), y((t) => {
109
+ t.columnsMap = { ...n }, t.sortKeyColumns = u;
110
+ });
111
+ }, oe = () => {
112
+ var e;
113
+ Q(a.columnsMap), X(a.sortKeyColumns), J === "online" && B && (g == null || g(B, a.columnsMap)), f ? (K(!0), (e = f == null ? void 0 : f(a.columnsMap)) == null || e.finally(() => {
114
+ K(!1), b.hide();
115
+ })) : b.hide();
116
+ }, I = () => {
117
+ b.hide();
118
+ }, x = M(() => i.mode === "dark", [i.mode]);
119
+ return /* @__PURE__ */ o.jsxs(
120
+ ne,
121
+ {
122
+ className: "tableColumnSettingModal",
123
+ title: /* @__PURE__ */ o.jsx(re.Title, { style: { fontSize: 16, margin: 0 }, children: "列设置" }),
124
+ getContainer: $,
125
+ ...le(b),
126
+ style: {
127
+ "--modalContent-bgColor": (_ = i.Modal) == null ? void 0 : _.contentBg,
128
+ "--header-bgColor": (E = i.Modal) == null ? void 0 : E.headerBg,
129
+ "--footer-bgColor": (z = i.Modal) == null ? void 0 : z.footerBg,
130
+ "--blockTitle-colorBg": x ? "#333" : "#fff",
131
+ "--leftBody-bgColor": x ? "#262626" : "#e0e0e0",
132
+ "--rightBody-bgColor": x ? "#262626" : "#fff",
133
+ "--checked": x ? "#303030" : "#eee",
134
+ "--block-bgColor": x ? "#222" : "#fff",
135
+ "--colorText": i.colorText,
136
+ "--colorText-desc": i.colorTextDescription,
137
+ "--colorBorder": i.colorBorder
138
+ },
139
+ styles: { body: { maxHeight: window.innerHeight - 300 } },
140
+ width: 600,
141
+ onCancel: I,
142
+ footer: /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
143
+ /* @__PURE__ */ o.jsx(
144
+ P,
145
+ {
146
+ type: "primary",
147
+ icon: /* @__PURE__ */ o.jsx(ge, {}),
148
+ onClick: oe,
149
+ disabled: !G,
150
+ loading: q,
151
+ children: "保存"
152
+ }
153
+ ),
154
+ /* @__PURE__ */ o.jsx(P, { onClick: I, children: "取消" })
155
+ ] }),
156
+ children: [
157
+ /* @__PURE__ */ o.jsx("div", { className: p(r.introduce, "tableColumnSetting_introduce"), children: "选择要在表中显示的可用列。拖动选定的列以对其重新排序。" }),
158
+ /* @__PURE__ */ o.jsxs(
159
+ "div",
160
+ {
161
+ className: p(r.container, "tableColumnSetting_container"),
162
+ style: { maxHeight: window.innerHeight - 390, overflow: "auto" },
163
+ children: [
164
+ /* @__PURE__ */ o.jsxs("div", { className: r.block, children: [
165
+ /* @__PURE__ */ o.jsxs("div", { className: p(r.header, "tableColumnSetting_header"), children: [
166
+ /* @__PURE__ */ o.jsx("div", { className: p(r.title, "tableColumnSetting_title"), children: "可用列" }),
167
+ /* @__PURE__ */ o.jsx("div", {})
168
+ ] }),
169
+ /* @__PURE__ */ o.jsx("div", { className: p(r.body, "tableColumnSetting_body"), children: /* @__PURE__ */ o.jsx("ul", { className: r.content, children: (H = D.list) == null ? void 0 : H.map((e) => {
170
+ const s = D.keys.includes(e.key);
171
+ return /* @__PURE__ */ o.jsxs(
172
+ "li",
173
+ {
174
+ className: p(r.item, {
175
+ [r.checked]: !s,
176
+ tableColumnSetting_checked: !s
177
+ }),
178
+ onClick: () => !e.disabled && Z(s, e),
179
+ children: [
180
+ /* @__PURE__ */ o.jsx(ae, { checked: s, disabled: e.disabled }),
181
+ /* @__PURE__ */ o.jsx(
182
+ "span",
183
+ {
184
+ className: p(
185
+ r["content-item-text"],
186
+ {
187
+ [r["content-item-text-disabled"]]: e.disabled
188
+ },
189
+ "tableColumnSetting_content-item-text"
190
+ ),
191
+ children: e.title
192
+ }
193
+ )
194
+ ]
195
+ },
196
+ e.key
197
+ );
198
+ }) }) })
211
199
  ] }),
212
- /* @__PURE__ */ o.jsx("div", { className: p(r.body, "tableColumnSetting_body-order"), children: /* @__PURE__ */ o.jsx(
213
- ue,
214
- {
215
- modifiers: [be, ye],
216
- onDragStart: (e) => {
217
- const { active: s } = e;
218
- s && k(s == null ? void 0 : s.id);
219
- },
220
- onDragCancel: () => k(null),
221
- onDragEnd: (e) => {
222
- k(null);
223
- const { over: s } = e;
224
- if (s) {
225
- const n = S(s.id);
226
- T !== n && Z(T, n);
227
- }
228
- },
229
- children: /* @__PURE__ */ o.jsx(
230
- pe,
200
+ /* @__PURE__ */ o.jsxs("div", { className: r.block, children: [
201
+ /* @__PURE__ */ o.jsxs("div", { className: r.header, children: [
202
+ /* @__PURE__ */ o.jsx("div", { className: r.title, children: "选定列" }),
203
+ /* @__PURE__ */ o.jsx(
204
+ ce,
231
205
  {
232
- items: f == null ? void 0 : f.map((e) => e.key),
233
- strategy: fe,
234
- children: /* @__PURE__ */ o.jsx("ul", { className: r.content, children: f == null ? void 0 : f.map((e) => /* @__PURE__ */ o.jsx(xe, { item: e }, e.key)) })
206
+ type: "link",
207
+ icon: /* @__PURE__ */ o.jsx(Se, {}),
208
+ size: "small",
209
+ onClick: Y,
210
+ className: je`
211
+ &:hover {
212
+ color: ${i.colorPrimary} !important;
213
+ }
214
+ `,
215
+ children: "重置"
235
216
  }
236
217
  )
237
- }
238
- ) })
239
- ] })
240
- ]
241
- }
242
- )
243
- ]
244
- }
245
- );
246
- });
218
+ ] }),
219
+ /* @__PURE__ */ o.jsx("div", { className: p(r.body, "tableColumnSetting_body-order"), children: /* @__PURE__ */ o.jsx(
220
+ pe,
221
+ {
222
+ modifiers: [ye, Ce],
223
+ onDragStart: (e) => {
224
+ const { active: s } = e;
225
+ s && k(s == null ? void 0 : s.id);
226
+ },
227
+ onDragCancel: () => k(null),
228
+ onDragEnd: (e) => {
229
+ k(null);
230
+ const { over: s } = e;
231
+ if (s) {
232
+ const n = S(s.id);
233
+ T !== n && ee(T, n);
234
+ }
235
+ },
236
+ children: /* @__PURE__ */ o.jsx(
237
+ he,
238
+ {
239
+ items: h == null ? void 0 : h.map((e) => e.key),
240
+ strategy: xe,
241
+ children: /* @__PURE__ */ o.jsx("ul", { className: r.content, children: h == null ? void 0 : h.map((e) => /* @__PURE__ */ o.jsx(be, { item: e }, e.key)) })
242
+ }
243
+ )
244
+ }
245
+ ) })
246
+ ] })
247
+ ]
248
+ }
249
+ )
250
+ ]
251
+ }
252
+ );
253
+ }
254
+ );
247
255
  export {
248
- $e as default
256
+ qe as default
249
257
  };
@@ -1,38 +1,43 @@
1
- import { j as t } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import a, { useContext as u } from "react";
3
- import { Tooltip as c } from "antd";
4
- import { show as f } from "@ebay/nice-modal-react";
5
- import C from "./ColumnSettingModal.mjs";
6
- import d from "../style.mjs";
7
- import x from "../../../BitzButton/index.mjs";
8
- import { TableContext as g } from "../../Store/index.mjs";
9
- import h from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
10
- const j = (o) => {
11
- const { order: m, show: i = !0, icon: l = /* @__PURE__ */ t.jsx(h, {}) } = o, { toolbarItemClassName: r } = d(), { uuid: e } = u(g);
12
- return i ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
13
- /* @__PURE__ */ t.jsx(
14
- C,
1
+ import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import C, { useContext as g, useState as x, useMemo as h, useEffect as j } from "react";
3
+ import { Tooltip as b } from "antd";
4
+ import { show as E } from "@ebay/nice-modal-react";
5
+ import S from "./ColumnSettingModal.mjs";
6
+ import p from "../style.mjs";
7
+ import v from "../../../BitzButton/index.mjs";
8
+ import { TableContext as y } from "../../Store/index.mjs";
9
+ import B from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
10
+ const L = (n) => {
11
+ const { order: c, show: a = !0, icon: u = /* @__PURE__ */ e.jsx(B, {}) } = n, { toolbarItemClassName: f } = p(), { uuid: l } = g(y), [s, i] = x(!1), d = h(() => s ? !1 : void 0, [s]);
12
+ return j(() => (document == null || document.addEventListener("fullscreenchange", (o) => {
13
+ var t, r, m;
14
+ (t = o.target) != null && t.classList.contains("bitzTableBlock") && (i(!!document.fullscreenElement), (m = (r = document.fullscreenElement) == null ? void 0 : r.classList) != null && m.contains("bitzTableBlock") || i(!1));
15
+ }), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
16
+ })), []), a ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
17
+ /* @__PURE__ */ e.jsx(
18
+ S,
15
19
  {
16
- id: `ColumnSettingModal-${e}`,
17
- onChange: async (s) => {
18
- var n;
19
- return (n = o.onChange) == null ? void 0 : n.call(o, s);
20
- }
20
+ id: `ColumnSettingModal-${l}`,
21
+ onChange: async (o) => {
22
+ var t;
23
+ return (t = n.onChange) == null ? void 0 : t.call(n, o);
24
+ },
25
+ getContainer: d
21
26
  }
22
27
  ),
23
- /* @__PURE__ */ t.jsx(c, { title: "列设置", open: !1, children: /* @__PURE__ */ t.jsx(
24
- x,
28
+ /* @__PURE__ */ e.jsx(b, { title: "列设置", open: !1, children: /* @__PURE__ */ e.jsx(
29
+ v,
25
30
  {
26
31
  type: "text",
27
- className: r,
28
- onClick: () => f(`ColumnSettingModal-${e}`),
29
- icon: l,
30
- style: { order: m },
32
+ className: f,
33
+ onClick: () => E(`ColumnSettingModal-${l}`),
34
+ icon: u,
35
+ style: { order: c },
31
36
  children: "列设置"
32
37
  }
33
38
  ) })
34
39
  ] }) : null;
35
- }, N = a.memo(j);
40
+ }, R = C.memo(L);
36
41
  export {
37
- N as default
42
+ R as default
38
43
  };
@@ -47,8 +47,10 @@ interface BitzTableColumnType<RecordType = any> extends ColumnsConfigProps, Tabl
47
47
  mobileHideLabel?: boolean;
48
48
  /** 是否为操作列 */
49
49
  isOperationCol?: boolean;
50
- /** 是否为复选框/展开列 */
51
- isToolCol?: boolean;
50
+ /** 是否为复选框列 */
51
+ isCheckboxCol?: boolean;
52
+ /** 是否为展开列 */
53
+ isExpandIconCol?: boolean;
52
54
  /** 列宽根据内容宽度最大的设置(只应用在操作列上) */
53
55
  useMaxWidth?: boolean;
54
56
  }