bitz-react-admin-ui 2.5.6 → 2.5.7

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 (23) hide show
  1. package/dist/_virtual/index.mjs +2 -2
  2. package/dist/_virtual/index2.mjs +2 -2
  3. package/dist/components/BitzTable/Store/index.d.ts +14 -1
  4. package/dist/components/BitzTable/Store/index.mjs +64 -59
  5. package/dist/components/BitzTable/Table/index.d.ts +2 -5
  6. package/dist/components/BitzTable/Table/index.mjs +319 -319
  7. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +55 -63
  8. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +160 -162
  9. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +1 -1
  10. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +78 -79
  11. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +47 -47
  12. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +6 -4
  13. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.d.ts +1 -1
  14. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +40 -45
  15. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +29 -34
  16. package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +3 -2
  17. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +38 -56
  18. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +12 -8
  19. package/dist/components/BitzTable/ToolBar/index.d.ts +1 -1
  20. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  21. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  22. package/dist/style.css +1 -1
  23. package/package.json +1 -1
@@ -1,127 +1,126 @@
1
- import { j as n } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { BitzTableContext as F } from "../../../Store/index.mjs";
3
- import M from "../../../../BitzTheme/index.mjs";
4
- import { findParentFirstNodeByClass as O } from "../../../../../utils/findNode.mjs";
5
- import P from "../../../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
6
- import { Form as C, Flex as y, Checkbox as G, Radio as h, InputNumber as $, Select as q } from "antd";
7
- import { memo as J, useRef as Q, useMemo as f, useContext as I, useState as u, useEffect as R, useImperativeHandle as U } from "react";
8
- import W from "./DndList.mjs";
9
- function X({
10
- display: r,
11
- showSelectRadio: g = !1,
12
- parentHeight: p,
13
- refInstance: N
1
+ import { j as t } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
+ import { BitzTableContext as S } from "../../../Store/index.mjs";
3
+ import D from "../../../../BitzTheme/index.mjs";
4
+ import { findParentFirstNodeByClass as L } from "../../../../../utils/findNode.mjs";
5
+ import { Form as y, Flex as v, Checkbox as O, Radio as f, InputNumber as P, Select as G } from "antd";
6
+ import { memo as H, useRef as $, useMemo as u, useContext as q, useState as p, useEffect as J, useImperativeHandle as Q } from "react";
7
+ import U from "./DndList.mjs";
8
+ function W({
9
+ display: k,
10
+ showSelectRadio: m = !1,
11
+ refInstance: z
14
12
  }) {
15
- M.useToken();
16
- const v = Q(null), t = P(v), T = f(() => ({
17
- // display: display ? 'flex' : 'none'
18
- width: r ? "100%" : 0,
19
- height: "100%",
20
- pointerEvents: r ? "auto" : "none",
21
- opacity: r ? 1 : 0,
22
- overflow: "hidden",
23
- ...r ? {} : {
24
- position: "absolute",
25
- left: 0,
26
- right: 0
13
+ D.useToken();
14
+ const A = $(null), F = u(() => ({
15
+ display: k ? "flex" : "none",
16
+ width: "100%"
17
+ }), [k]), d = q(S), s = d.exportConfig, g = d.selected, n = d.pagination, r = d.total, [a, b] = p([]), [i, h] = p([]), [C, w] = p("current"), [x, E] = p("page"), [j, N] = p(1);
18
+ J(() => {
19
+ var e, l, c, T;
20
+ h(s.fields), b(s.fields.map((M) => M.field)), w(
21
+ m && g ? "selectedRows" : s.config.key
22
+ ), E(((l = (e = s.config) == null ? void 0 : e.info) == null ? void 0 : l.type) ?? "page"), N(((T = (c = s.config) == null ? void 0 : c.info) == null ? void 0 : T.value) ?? 1);
23
+ }, [s, m, g]);
24
+ const o = u(() => i.filter((e) => e.show).map((e) => e.field), [i]), I = u(() => a.length === o.length, [a, o]), R = u(() => o.length > 0 && o.length < a.length, [o, a]), B = ({ target: e }) => {
25
+ h(i.map((l) => ({ ...l, show: e.checked })));
26
+ }, V = (e, l) => {
27
+ h(e), b(l);
28
+ }, K = u(() => {
29
+ if (x === "page") {
30
+ if (r && (n != null && n.size)) {
31
+ let e = Math.floor(r / (n == null ? void 0 : n.size));
32
+ return r % (n == null ? void 0 : n.size) && e++, e;
33
+ }
34
+ return 1;
27
35
  }
28
- }), [r]), B = f(() => typeof p == "number" && p && (t != null && t.height) ? p - (t == null ? void 0 : t.height) - 20 : "auto", [p, t == null ? void 0 : t.height]), l = I(F).exportConfig, x = I(F).selected, [i, w] = u([]), [a, d] = u([]), [m, b] = u("current"), [k, E] = u("page"), [j, S] = u(1);
29
- R(() => {
30
- var e, s, c, A;
31
- d(l.fields), w(l.fields.map((L) => L.field)), b(
32
- g && x ? "selectedRows" : l.config.key
33
- ), E(((s = (e = l.config) == null ? void 0 : e.info) == null ? void 0 : s.type) ?? "page"), S(((A = (c = l.config) == null ? void 0 : c.info) == null ? void 0 : A.value) ?? 1);
34
- }, [l, g, x]);
35
- const o = f(() => a.filter((e) => e.show).map((e) => e.field), [a]), V = f(() => i.length === o.length, [i, o]), z = f(() => o.length > 0 && o.length < i.length, [o, i]), K = ({ target: e }) => {
36
- d(a.map((s) => ({ ...s, show: e.checked })));
37
- }, D = (e, s) => {
38
- d(e), w(s);
39
- };
40
- return U(N, () => ({
36
+ return r;
37
+ }, [x, n, r]);
38
+ return Q(z, () => ({
41
39
  getExportConfig: () => {
42
40
  const e = {
43
41
  fields: [],
44
42
  config: {
45
- key: m,
43
+ key: C,
46
44
  info: void 0
47
45
  }
48
46
  };
49
- return a.forEach((s) => {
47
+ return i.forEach((l) => {
50
48
  let c = !1;
51
- o.includes(s.field) && (c = !0), e.fields.push({ ...s, show: c });
52
- }), m === "any" && (e.config.info = {
53
- type: k,
49
+ o.includes(l.field) && (c = !0), e.fields.push({ ...l, show: c });
50
+ }), C === "any" && (e.config.info = {
51
+ type: x,
54
52
  value: (j || 0) < 1 ? 1 : j || 1
55
53
  }), e;
56
54
  },
57
55
  hasOne: () => o.length > 0
58
- })), /* @__PURE__ */ n.jsxs(
59
- C,
56
+ })), /* @__PURE__ */ t.jsxs(
57
+ y,
60
58
  {
61
- style: T,
59
+ style: F,
62
60
  labelCol: { span: 3 },
63
61
  labelAlign: "left",
64
62
  colon: !1,
65
63
  className: "exportConfigFormContent",
66
64
  children: [
67
- /* @__PURE__ */ n.jsx(C.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ n.jsxs(y, { vertical: !0, style: { gap: 8, maxHeight: B }, children: [
68
- /* @__PURE__ */ n.jsx(
69
- G,
65
+ /* @__PURE__ */ t.jsx(y.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ t.jsxs(v, { vertical: !0, style: { gap: 8 }, children: [
66
+ /* @__PURE__ */ t.jsx(
67
+ O,
70
68
  {
71
- checked: V,
72
- indeterminate: z,
73
- onChange: K,
69
+ checked: I,
70
+ indeterminate: R,
71
+ onChange: B,
74
72
  style: { alignSelf: "flex-start" },
75
73
  children: "全选"
76
74
  }
77
75
  ),
78
- /* @__PURE__ */ n.jsx(
79
- W,
76
+ /* @__PURE__ */ t.jsx(
77
+ U,
80
78
  {
81
- dataList: a,
82
- keys: i,
83
- onChange: d,
84
- onMoveEnd: D
79
+ dataList: i,
80
+ keys: a,
81
+ onChange: h,
82
+ onMoveEnd: V
85
83
  }
86
84
  )
87
85
  ] }) }),
88
- /* @__PURE__ */ n.jsx(C.Item, { label: "导出设置", className: "exportTotal", children: /* @__PURE__ */ n.jsx(
89
- h.Group,
86
+ /* @__PURE__ */ t.jsx(y.Item, { label: "导出设置", className: "exportTotal", children: /* @__PURE__ */ t.jsx(
87
+ f.Group,
90
88
  {
91
- ref: v,
92
- value: m,
93
- onChange: ({ target: e }) => b(e.value),
94
- children: /* @__PURE__ */ n.jsxs(y, { vertical: !0, gap: 8, align: "flex-start", children: [
95
- g && x && /* @__PURE__ */ n.jsx(h, { value: "selectedRows", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出选中数据" }) }),
96
- /* @__PURE__ */ n.jsx(h, { value: "current", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "仅导出当前页" }) }),
97
- /* @__PURE__ */ n.jsx(h, { value: "any", children: /* @__PURE__ */ n.jsxs(y, { align: "center", gap: 8, children: [
98
- /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }),
99
- /* @__PURE__ */ n.jsx(
100
- $,
89
+ ref: A,
90
+ value: C,
91
+ onChange: ({ target: e }) => w(e.value),
92
+ children: /* @__PURE__ */ t.jsxs(v, { vertical: !0, gap: 8, align: "flex-start", children: [
93
+ m && g && /* @__PURE__ */ t.jsx(f, { value: "selectedRows", children: "导出选中数据" }),
94
+ /* @__PURE__ */ t.jsx(f, { value: "current", children: "仅导出当前页" }),
95
+ /* @__PURE__ */ t.jsx(f, { value: "any", children: /* @__PURE__ */ t.jsxs(v, { align: "center", gap: 8, children: [
96
+ /* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }),
97
+ /* @__PURE__ */ t.jsx(
98
+ P,
101
99
  {
102
100
  controls: !1,
103
101
  min: 1,
102
+ max: K,
104
103
  value: j,
105
- onChange: (e) => S(e),
104
+ onChange: (e) => N(e),
106
105
  style: { width: 120 },
107
- addonAfter: /* @__PURE__ */ n.jsx(
108
- q,
106
+ addonAfter: /* @__PURE__ */ t.jsx(
107
+ G,
109
108
  {
110
- value: k,
109
+ value: x,
111
110
  onChange: E,
112
111
  options: [
113
112
  { label: "页", value: "page" },
114
113
  { label: "条", value: "pieces" }
115
114
  ],
116
115
  onClick: (e) => e.preventDefault(),
117
- getPopupContainer: (e) => O(e, "containerBody")
116
+ getPopupContainer: (e) => L(e, "containerBody")
118
117
  }
119
118
  )
120
119
  }
121
120
  ),
122
- /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "数据" })
121
+ /* @__PURE__ */ t.jsx("span", { style: { whiteSpace: "nowrap" }, children: "数据" })
123
122
  ] }) }),
124
- /* @__PURE__ */ n.jsx(h, { value: "all", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出全部数据" }) })
123
+ /* @__PURE__ */ t.jsx(f, { value: "all", children: "导出全部数据" })
125
124
  ] })
126
125
  }
127
126
  ) })
@@ -129,7 +128,7 @@ function X({
129
128
  }
130
129
  );
131
130
  }
132
- const oe = J(X);
131
+ const le = H(W);
133
132
  export {
134
- oe as default
133
+ le as default
135
134
  };
@@ -1,11 +1,11 @@
1
- import { j as o } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
1
+ import { j as e } from "../../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
2
  import H from "../../../../../assets/iconfont/IconKuansongde.mjs";
3
3
  import C from "../../../../../assets/iconfont/IconTekuansong.mjs";
4
4
  import S from "../../../../../assets/iconfont/IconJincoude.mjs";
5
5
  import k from "../../../../../assets/iconfont/IconZhongdengde.mjs";
6
- import w from "../../../../../assets/iconfont/IconTejincou.mjs";
7
- import T from "../../../../../assets/iconfont/IconWufengexian.mjs";
8
- import R from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
6
+ import T from "../../../../../assets/iconfont/IconTejincou.mjs";
7
+ import R from "../../../../../assets/iconfont/IconWufengexian.mjs";
8
+ import w from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
9
9
  import B from "../../../../../assets/iconfont/IconHangfengexian.mjs";
10
10
  import G from "../../../../../assets/iconfont/IconLiefengexian.mjs";
11
11
  import F from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
@@ -13,27 +13,27 @@ import N from "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
13
13
  import { BitzConfigContext as W } from "../../../../BitzConfigProvider/context.mjs";
14
14
  import { BitzTableContext as E } from "../../../Store/index.mjs";
15
15
  import $ from "../../../../BitzTheme/index.mjs";
16
- import { Form as s, Radio as u, Checkbox as A } from "antd";
16
+ import { Form as i, Radio as u, Checkbox as A } from "antd";
17
17
  import D from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
18
18
  import { forwardRef as J, useMemo as K, useContext as p, useEffect as L, useImperativeHandle as M, memo as V } from "react";
19
19
  import { BitzToolBarContext as Y } from "../../Wrapper/context.mjs";
20
20
  import l from "./RadioCard.mjs";
21
- const Z = ({ defaultSize: n, items: c }) => c.map((e) => e.key === n ? {
22
- ...e,
23
- label: `${e.label}(默认)`
24
- } : e), q = J(({ display: n }, c) => {
21
+ const Z = ({ defaultSize: n, items: c }) => c.map((o) => o.key === n ? {
22
+ ...o,
23
+ label: `${o.label}(默认)`
24
+ } : o), q = J(({ display: n }, c) => {
25
25
  var x, b, f;
26
- const { token: e } = $.useToken(), j = K(() => ({
26
+ const { token: o } = $.useToken(), h = K(() => ({
27
27
  width: "100%",
28
- ...{ display: n ? "flex" : "none" }
28
+ display: n ? "flex" : "none"
29
29
  }), [n]), z = {
30
30
  size: 26,
31
- color: e.colorPrimary
32
- }, [m] = s.useForm(), g = (x = p(W).Table) == null ? void 0 : x.stylesScope, { defaultTableSize: P, stylesConfig: I } = p(E), r = (b = p(Y).config) == null ? void 0 : b.stylesConfig, d = (i, a) => {
33
- var y, h;
31
+ color: o.colorPrimary
32
+ }, [m] = i.useForm(), g = (x = p(W).Table) == null ? void 0 : x.stylesScope, { defaultTableSize: P, stylesConfig: I } = p(E), r = (b = p(Y).config) == null ? void 0 : b.stylesConfig, d = (s, a) => {
33
+ var y, j;
34
34
  let t = a;
35
- return (y = r == null ? void 0 : r[i]) != null && y.disabled && (t = D(a, "disabledControl")), {
36
- disabled: (h = r == null ? void 0 : r[i]) == null ? void 0 : h.disabled,
35
+ return (y = r == null ? void 0 : r[s]) != null && y.disabled && (t = D(a, "disabledControl")), {
36
+ disabled: (j = r == null ? void 0 : r[s]) == null ? void 0 : j.disabled,
37
37
  className: t
38
38
  };
39
39
  };
@@ -49,7 +49,7 @@ const Z = ({ defaultSize: n, items: c }) => c.map((e) => e.key === n ? {
49
49
  {
50
50
  key: "xs",
51
51
  label: "特紧凑",
52
- icon: w
52
+ icon: T
53
53
  },
54
54
  {
55
55
  key: "sm",
@@ -75,77 +75,77 @@ const Z = ({ defaultSize: n, items: c }) => c.map((e) => e.key === n ? {
75
75
  });
76
76
  return M(c, () => ({
77
77
  getFormInstance: () => m
78
- })), /* @__PURE__ */ o.jsxs(
79
- s,
78
+ })), /* @__PURE__ */ e.jsxs(
79
+ i,
80
80
  {
81
81
  form: m,
82
- style: j,
82
+ style: h,
83
83
  labelCol: { span: 3 },
84
84
  labelAlign: "left",
85
85
  colon: !1,
86
86
  className: "stylesConfigFormContent",
87
87
  children: [
88
- /* @__PURE__ */ o.jsx(s.Item, { label: "行高", name: "size", children: /* @__PURE__ */ o.jsx(u.Group, { ...d("size", "sizeRadioGroup"), children: v.map(({ key: i, label: a, icon: t }) => /* @__PURE__ */ o.jsx(l, { label: a, value: i, children: /* @__PURE__ */ o.jsx(t, { ...z }) }, i)) }) }),
89
- /* @__PURE__ */ o.jsx(s.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ o.jsxs(u.Group, { ...d("bordered", "splitBorderRadioGroup"), children: [
90
- /* @__PURE__ */ o.jsx(l, { label: "无分割线", value: "hide", children: /* @__PURE__ */ o.jsx(T, { size: 26, color: e.colorPrimaryHover }) }),
91
- /* @__PURE__ */ o.jsx(l, { label: "行分割线", value: "row", children: /* @__PURE__ */ o.jsx(
88
+ /* @__PURE__ */ e.jsx(i.Item, { label: "行高", name: "size", children: /* @__PURE__ */ e.jsx(u.Group, { ...d("size", "sizeRadioGroup"), children: v.map(({ key: s, label: a, icon: t }) => /* @__PURE__ */ e.jsx(l, { label: a, value: s, children: /* @__PURE__ */ e.jsx(t, { ...z }) }, s)) }) }),
89
+ /* @__PURE__ */ e.jsx(i.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ e.jsxs(u.Group, { ...d("bordered", "splitBorderRadioGroup"), children: [
90
+ /* @__PURE__ */ e.jsx(l, { label: "无分割线", value: "hide", children: /* @__PURE__ */ e.jsx(R, { size: 26, color: o.colorPrimaryHover }) }),
91
+ /* @__PURE__ */ e.jsx(l, { label: "行分割线", value: "row", children: /* @__PURE__ */ e.jsx(
92
92
  B,
93
93
  {
94
94
  size: 26,
95
95
  color: [
96
- e.colorPrimaryHover,
97
- e.colorPrimary,
98
- e.colorPrimary,
99
- e.colorPrimaryHover
96
+ o.colorPrimaryHover,
97
+ o.colorPrimary,
98
+ o.colorPrimary,
99
+ o.colorPrimaryHover
100
100
  ]
101
101
  }
102
102
  ) }),
103
- /* @__PURE__ */ o.jsx(l, { label: "列分割线", value: "column", children: /* @__PURE__ */ o.jsx(
103
+ /* @__PURE__ */ e.jsx(l, { label: "列分割线", value: "column", children: /* @__PURE__ */ e.jsx(
104
104
  G,
105
105
  {
106
106
  size: 26,
107
107
  color: [
108
- e.colorPrimaryHover,
109
- e.colorPrimary,
110
- e.colorPrimary,
111
- e.colorPrimaryHover
108
+ o.colorPrimaryHover,
109
+ o.colorPrimary,
110
+ o.colorPrimary,
111
+ o.colorPrimaryHover
112
112
  ]
113
113
  }
114
114
  ) }),
115
- /* @__PURE__ */ o.jsx(l, { label: "行列分割线", value: "row-column", children: /* @__PURE__ */ o.jsx(
116
- R,
115
+ /* @__PURE__ */ e.jsx(l, { label: "行列分割线", value: "row-column", children: /* @__PURE__ */ e.jsx(
116
+ w,
117
117
  {
118
118
  size: 26,
119
119
  color: [
120
- e.colorPrimaryHover,
121
- e.colorPrimary,
122
- e.colorPrimary,
123
- e.colorPrimaryHover
120
+ o.colorPrimaryHover,
121
+ o.colorPrimary,
122
+ o.colorPrimary,
123
+ o.colorPrimaryHover
124
124
  ]
125
125
  }
126
126
  ) })
127
127
  ] }) }),
128
- /* @__PURE__ */ o.jsx(s.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ o.jsxs(u.Group, { ...d("zebra", "zebraRadioGroup"), children: [
129
- /* @__PURE__ */ o.jsx(l, { label: "有斑马纹", value: !0, children: /* @__PURE__ */ o.jsx(
128
+ /* @__PURE__ */ e.jsx(i.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ e.jsxs(u.Group, { ...d("zebra", "zebraRadioGroup"), children: [
129
+ /* @__PURE__ */ e.jsx(l, { label: "有斑马纹", value: !0, children: /* @__PURE__ */ e.jsx(
130
130
  F,
131
131
  {
132
132
  size: 26,
133
- color: [e.colorPrimaryHover, e.colorPrimary]
133
+ color: [o.colorPrimaryHover, o.colorPrimary]
134
134
  }
135
135
  ) }),
136
- /* @__PURE__ */ o.jsx(l, { label: "无斑马纹", value: !1, children: /* @__PURE__ */ o.jsx(
136
+ /* @__PURE__ */ e.jsx(l, { label: "无斑马纹", value: !1, children: /* @__PURE__ */ e.jsx(
137
137
  N,
138
138
  {
139
139
  size: 26,
140
- color: e.colorPrimaryHover
140
+ color: o.colorPrimaryHover
141
141
  }
142
142
  ) })
143
143
  ] }) }),
144
- /* @__PURE__ */ o.jsx(s.Item, { name: "stylesScope", valuePropName: "checked", className: "scope", children: /* @__PURE__ */ o.jsx(A, { disabled: (f = r == null ? void 0 : r.stylesScope) == null ? void 0 : f.disabled, children: "应用到全局表格" }) })
144
+ /* @__PURE__ */ e.jsx(i.Item, { name: "stylesScope", valuePropName: "checked", className: "scope", children: /* @__PURE__ */ e.jsx(A, { disabled: (f = r == null ? void 0 : r.stylesScope) == null ? void 0 : f.disabled, children: "应用到全局表格" }) })
145
145
  ]
146
146
  }
147
147
  );
148
- }), fo = V(q);
148
+ }), be = V(q);
149
149
  export {
150
- fo as default
150
+ be as default
151
151
  };
@@ -21,11 +21,11 @@ const m = (o) => i`
21
21
 
22
22
  .sortCard {
23
23
  width: 100%;
24
- height: 100%;
25
24
  background-color: var(--sortCard-bgColor);
26
25
  border-radius: ${r(o.borderRadius)};
27
26
  padding-inline: 6px;
28
27
  padding-block-end: 10px;
28
+ overflow: hidden auto;
29
29
  box-sizing: border-box;
30
30
 
31
31
  .title {
@@ -62,9 +62,11 @@ const m = (o) => i`
62
62
  border-radius: ${r(o.borderRadius)};
63
63
 
64
64
  &.showSortItemOperat {
65
- grid-template-columns: var(--dragIcon-width) calc(
65
+ grid-template-columns:
66
+ var(--dragIcon-width) calc(
66
67
  100% - var(--dragIcon-width) - var(--operation-width)
67
- ) var(--operation-width);
68
+ )
69
+ var(--operation-width);
68
70
  }
69
71
 
70
72
  &:hover {
@@ -165,7 +167,7 @@ const m = (o) => i`
165
167
  flex: 1;
166
168
  display: flex;
167
169
  align-items: flex-end;
168
- margin-block: 60px 0;
170
+ margin-block-end: 0;
169
171
  }
170
172
 
171
173
  .ant-radio-wrapper {
@@ -5,7 +5,7 @@ export interface ExportModalProps {
5
5
  open: boolean;
6
6
  close: () => void;
7
7
  title: string;
8
- onExport?: (val: ExportConfigProps<'export'>) => Promise<void>;
8
+ onExport?: (val: ExportConfigProps<'export'>) => void;
9
9
  getContainer: ModalProps['getContainer'];
10
10
  }
11
11
  declare const ExportModal: FC<ExportModalProps>;
@@ -1,69 +1,64 @@
1
1
  import { j as e } from "../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { message as y } from "antd";
3
- import { useState as m, useContext as E, useRef as b, useMemo as B } from "react";
4
- import { BitzTableContext as O } from "../../Store/index.mjs";
5
- import c from "../../../BitzButton/index.mjs";
6
- import R from "../../../BitzTheme/index.mjs";
7
- import T from "../Modal/index.mjs";
8
- import z from "../ColConfigIcon/ExportConfig/index.mjs";
9
- import M from "../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
10
- const q = ({
11
- open: u,
12
- title: p,
13
- onExport: s,
2
+ import { message as C } from "antd";
3
+ import { useState as g, useContext as j, useRef as k, useMemo as y } from "react";
4
+ import { BitzTableContext as E } from "../../Store/index.mjs";
5
+ import f from "../../../BitzButton/index.mjs";
6
+ import b from "../../../BitzTheme/index.mjs";
7
+ import B from "../Modal/index.mjs";
8
+ import O from "../ColConfigIcon/ExportConfig/index.mjs";
9
+ import R from "../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
10
+ const I = ({
11
+ open: m,
12
+ title: c,
13
+ onExport: n,
14
14
  close: o,
15
- getContainer: d
15
+ getContainer: l
16
16
  }) => {
17
- const { token: i } = R.useToken(), [x, r] = m(!1), [g, t] = m(!1), { defaultTableExportConfig: h } = E(O), n = b(null), C = async () => {
18
- var f, l;
19
- if (g)
17
+ const { token: s } = b.useToken(), [u, t] = g(!1), { defaultTableExportConfig: p } = j(E), r = k(null), x = async () => {
18
+ var i, a;
19
+ if (u)
20
20
  return;
21
- if (t(!0), !((f = n.current) == null ? void 0 : f.hasOne())) {
22
- y.error("导出设置至少需要一个字段"), t(!1);
21
+ if (t(!0), !((i = r.current) == null ? void 0 : i.hasOne())) {
22
+ C.error("导出设置至少需要一个字段"), t(!1);
23
23
  return;
24
24
  }
25
- const k = ((l = n.current) == null ? void 0 : l.getExportConfig()) ?? h;
26
- s && (t(!1), r(!0), s(k).finally(() => {
27
- r(!1), o();
28
- }));
25
+ const h = ((a = r.current) == null ? void 0 : a.getExportConfig()) ?? p;
26
+ n && (t(!1), n(h), o());
29
27
  };
30
- B(() => i.mode === "dark", [i.mode]);
31
- const j = () => {
32
- r(!1), t(!1);
28
+ y(() => s.mode === "dark", [s.mode]);
29
+ const d = () => {
30
+ t(!1);
33
31
  };
34
32
  return /* @__PURE__ */ e.jsx(
35
- T,
33
+ B,
36
34
  {
37
- open: u,
38
- title: p,
35
+ open: m,
36
+ title: c,
39
37
  close: o,
40
- closeAfter: j,
41
- getContainer: d,
38
+ closeAfter: d,
39
+ getContainer: l,
40
+ styles: {
41
+ content: {
42
+ maxHeight: "calc(100vh - 200px)",
43
+ height: "auto"
44
+ }
45
+ },
42
46
  footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
43
47
  /* @__PURE__ */ e.jsx(
44
- c,
48
+ f,
45
49
  {
46
50
  type: "primary",
47
- icon: /* @__PURE__ */ e.jsx(M, {}),
48
- onClick: C,
49
- loading: x,
51
+ icon: /* @__PURE__ */ e.jsx(R, {}),
52
+ onClick: x,
50
53
  children: "导出"
51
54
  }
52
55
  ),
53
- /* @__PURE__ */ e.jsx(c, { onClick: o, children: "取消" })
56
+ /* @__PURE__ */ e.jsx(f, { onClick: o, children: "取消" })
54
57
  ] }),
55
- children: (a) => /* @__PURE__ */ e.jsx(
56
- z,
57
- {
58
- parentHeight: a,
59
- refInstance: n,
60
- display: !0,
61
- showSelectRadio: !0
62
- }
63
- )
58
+ children: /* @__PURE__ */ e.jsx(O, { refInstance: r, display: !0, showSelectRadio: !0 })
64
59
  }
65
60
  );
66
61
  };
67
62
  export {
68
- q as default
63
+ I as default
69
64
  };
@@ -1,47 +1,42 @@
1
1
  import { j as t } from "../../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
- import { memo as b, useState as i, useContext as a, useMemo as g } from "react";
3
- import E from "../style.mjs";
4
- import B from "../../../BitzButton/index.mjs";
5
- import { BitzTableContext as m } from "../../Store/index.mjs";
6
- import { exportConfigTitle as I } from "../ColConfigIcon/ColumnConfigModal.mjs";
7
- import h from "./ExportModal.mjs";
8
- import z from "../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/DownloadOutlined.mjs";
9
- const D = ({
10
- show: f = !0,
11
- order: p,
2
+ import { memo as j, useState as y, useContext as l, useMemo as E } from "react";
3
+ import b from "../style.mjs";
4
+ import h from "../../../BitzButton/index.mjs";
5
+ import { BitzTableContext as i } from "../../Store/index.mjs";
6
+ import { exportConfigTitle as B } from "../ColConfigIcon/ColumnConfigModal.mjs";
7
+ import C from "./ExportModal.mjs";
8
+ import I from "../../../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/DownloadOutlined.mjs";
9
+ const z = ({
10
+ show: p = !0,
11
+ order: a,
12
12
  onClick: o,
13
- icon: c = /* @__PURE__ */ t.jsx(z, {})
13
+ icon: f = /* @__PURE__ */ t.jsx(I, {})
14
14
  }) => {
15
- const { toolbarItemClassName: u } = E(), [x, s] = i(!1), [d, r] = i(!1);
16
- a(m).exportConfig;
17
- const { loading: j, fullscreen: n } = a(m), y = g(() => n ? !1 : void 0, [n]), C = async (e) => {
18
- var l;
19
- if (o)
20
- return r(!0), o(
21
- e.config.key,
22
- e.fields,
23
- (l = e.config) == null ? void 0 : l.info
24
- ).finally(() => r(!1));
15
+ const { toolbarItemClassName: x } = b(), [u, s] = y(!1);
16
+ l(i).exportConfig;
17
+ const { loading: c, fullscreen: n, dataSource: e } = l(i), d = E(() => n ? !1 : void 0, [n]), g = async (r) => {
18
+ var m;
19
+ o == null || o(r.config.key, r.fields, (m = r.config) == null ? void 0 : m.info);
25
20
  };
26
- return f ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
21
+ return p ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
27
22
  /* @__PURE__ */ t.jsx(
28
- h,
23
+ C,
29
24
  {
30
- open: x,
31
- title: I,
32
- getContainer: y,
33
- onExport: C,
25
+ open: u,
26
+ title: B,
27
+ getContainer: d,
28
+ onExport: g,
34
29
  close: () => s(!1)
35
30
  }
36
31
  ),
37
32
  /* @__PURE__ */ t.jsx(
38
- B,
33
+ h,
39
34
  {
40
35
  type: "text",
41
- className: u,
42
- icon: c,
43
- style: { order: p },
44
- disabled: j || d,
36
+ className: x,
37
+ icon: f,
38
+ style: { order: a },
39
+ disabled: c || !(e != null && e.length),
45
40
  onClick: () => s(!0),
46
41
  children: "导出"
47
42
  }
@@ -73,7 +68,7 @@ const D = ({
73
68
  // </Dropdown>
74
69
  null
75
70
  );
76
- }, F = b(D);
71
+ }, G = j(z);
77
72
  export {
78
- F as default
73
+ G as default
79
74
  };
@@ -12,7 +12,8 @@ export interface ModalProps {
12
12
  getContainer: AntModalProps['getContainer'];
13
13
  footer: ReactNode;
14
14
  extra?: ReactNode;
15
- children: (height: any) => ReactNode;
15
+ styles?: AntModalProps['styles'];
16
+ children: ReactNode;
16
17
  }
17
- declare function Modal({ open, title, close, closeAfter, getContainer, footer, extra, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
18
+ declare function Modal({ open, title, close, closeAfter, getContainer, footer, extra, styles: modalStyles, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
18
19
  export default Modal;