bitz-react-admin-ui 1.8.3 → 1.9.0

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.
@@ -0,0 +1,39 @@
1
+ export declare const getCssVar: ({ height, fillEvenRow, colorBgContainer, table, gap, }: {
2
+ height: any;
3
+ fillEvenRow: any;
4
+ colorBgContainer: any;
5
+ table: any;
6
+ gap: any;
7
+ }) => {
8
+ height: any;
9
+ '--toolbar-bgColor': any;
10
+ '--thead-bgColor': any;
11
+ '--thead-hoverBgColor': any;
12
+ '--evenRow-BgColor': any;
13
+ '--oddRow-BgColor': any;
14
+ '--radioCheckbox-borderColor': any;
15
+ '--expandIcon-borderColor': any;
16
+ '--rowHover-bgColor': any;
17
+ '--tbodyRow-borderColor': any;
18
+ '--container-gap': any;
19
+ '--xlTable-fontSize': string;
20
+ '--lgTable-fontSize': string;
21
+ '--mdTable-fontSize': string;
22
+ '--smTable-fontSize': string;
23
+ '--xsTable-fontSize': string;
24
+ '--xlTable-height': string;
25
+ '--lgTable-height': string;
26
+ '--mdTable-height': string;
27
+ '--smTable-height': string;
28
+ '--xsTable-height': string;
29
+ '--xlTable-lineHeight': string;
30
+ '--lgTable-lineHeight': string;
31
+ '--mdTable-lineHeight': string;
32
+ '--smTable-lineHeight': string;
33
+ '--xsTable-lineHeight': string;
34
+ '--xlSkeleton-height': string;
35
+ '--lgSkeleton-height': string;
36
+ '--mdSkeleton-height': string;
37
+ '--smSkeleton-height': string;
38
+ '--xsSkeleton-height': string;
39
+ };
@@ -0,0 +1,46 @@
1
+ const u = ({
2
+ height: v,
3
+ fillEvenRow: w,
4
+ colorBgContainer: R,
5
+ table: o,
6
+ gap: I
7
+ }) => {
8
+ var h, i, g, r, x, n, T, d, p, s, $, H, m, C, S, k, f, z, B, c;
9
+ return {
10
+ height: v,
11
+ "--toolbar-bgColor": o == null ? void 0 : o.toolbarBgColor,
12
+ "--thead-bgColor": o == null ? void 0 : o.headerBg,
13
+ "--thead-hoverBgColor": o == null ? void 0 : o.headerSortHoverBg,
14
+ "--evenRow-BgColor": w,
15
+ "--oddRow-BgColor": R,
16
+ "--radioCheckbox-borderColor": o == null ? void 0 : o.radioCheckboxBorderColor,
17
+ "--expandIcon-borderColor": o == null ? void 0 : o.expandIconBorderColor,
18
+ "--rowHover-bgColor": o == null ? void 0 : o.rowHoverBg,
19
+ "--tbodyRow-borderColor": o == null ? void 0 : o.borderColor,
20
+ "--container-gap": I,
21
+ "--xlTable-fontSize": `${(h = o == null ? void 0 : o.xlTable) == null ? void 0 : h.fontSize}px`,
22
+ "--lgTable-fontSize": `${(i = o == null ? void 0 : o.lgTable) == null ? void 0 : i.fontSize}px`,
23
+ "--mdTable-fontSize": `${(g = o == null ? void 0 : o.mdTable) == null ? void 0 : g.fontSize}px`,
24
+ "--smTable-fontSize": `${(r = o == null ? void 0 : o.smTable) == null ? void 0 : r.fontSize}px`,
25
+ "--xsTable-fontSize": `${(x = o == null ? void 0 : o.xsTable) == null ? void 0 : x.fontSize}px`,
26
+ "--xlTable-height": `${(n = o == null ? void 0 : o.xlTable) == null ? void 0 : n.height}px`,
27
+ "--lgTable-height": `${(T = o == null ? void 0 : o.lgTable) == null ? void 0 : T.height}px`,
28
+ "--mdTable-height": `${(d = o == null ? void 0 : o.mdTable) == null ? void 0 : d.height}px`,
29
+ "--smTable-height": `${(p = o == null ? void 0 : o.smTable) == null ? void 0 : p.height}px`,
30
+ "--xsTable-height": `${(s = o == null ? void 0 : o.xsTable) == null ? void 0 : s.height}px`,
31
+ "--xlTable-lineHeight": `${($ = o == null ? void 0 : o.xlTable) == null ? void 0 : $.lineHeight}px`,
32
+ "--lgTable-lineHeight": `${(H = o == null ? void 0 : o.lgTable) == null ? void 0 : H.lineHeight}px`,
33
+ "--mdTable-lineHeight": `${(m = o == null ? void 0 : o.mdTable) == null ? void 0 : m.lineHeight}px`,
34
+ "--smTable-lineHeight": `${(C = o == null ? void 0 : o.smTable) == null ? void 0 : C.lineHeight}px`,
35
+ "--xsTable-lineHeight": `${(S = o == null ? void 0 : o.xsTable) == null ? void 0 : S.lineHeight}px`,
36
+ "--xlSkeleton-height": `${(k = o == null ? void 0 : o.xlTable) == null ? void 0 : k.skeletonHeight}px`,
37
+ "--lgSkeleton-height": `${(f = o == null ? void 0 : o.lgTable) == null ? void 0 : f.skeletonHeight}px`,
38
+ "--mdSkeleton-height": `${(z = o == null ? void 0 : o.mdTable) == null ? void 0 : z.skeletonHeight}px`,
39
+ "--smSkeleton-height": `${(B = o == null ? void 0 : o.smTable) == null ? void 0 : B.skeletonHeight}px`,
40
+ "--xsSkeleton-height": `${(c = o == null ? void 0 : o.xsTable) == null ? void 0 : c.skeletonHeight}px`
41
+ // '--tableBody-bootomBorderColor': table?.borderColor || '#f0f0f0',
42
+ };
43
+ };
44
+ export {
45
+ u as getCssVar
46
+ };
@@ -20,7 +20,6 @@ const J = () => {
20
20
  {
21
21
  [`.${o}`]: {
22
22
  height: "100%",
23
- lineHeight: "normal",
24
23
  paddingBlock: 0,
25
24
  borderRadius: 0,
26
25
  borderColor: "transparent",
@@ -10,7 +10,6 @@ export declare const getExpandable: (prop?: string) => {
10
10
  /** 布局 */
11
11
  export declare const getLayoutConfig: (lrLayout: any, showToolTagSelect: any) => {
12
12
  gutter: number;
13
- spaceSize: number;
14
13
  left: {
15
14
  span: number;
16
15
  };
@@ -24,7 +23,6 @@ export declare const getLayoutConfig: (lrLayout: any, showToolTagSelect: any) =>
24
23
  };
25
24
  } | {
26
25
  gutter: number;
27
- spaceSize: number;
28
26
  left: {
29
27
  span: number;
30
28
  };
@@ -1,34 +1,34 @@
1
1
  import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Table as f } from "antd";
2
+ import { Table as m } from "antd";
3
3
  import a from "../../BitzDescriptions/index.mjs";
4
- import m from "../TableCell/index.mjs";
5
- import c from "../TextBlock/index.mjs";
6
- const j = (n, r, e) => {
7
- const l = n.map((t) => (typeof t.title == "string" && (t.title = /* @__PURE__ */ o.jsx(c, { value: t.title, bold: 600 })), {
4
+ import p from "../TableCell/index.mjs";
5
+ import u from "../TextBlock/index.mjs";
6
+ const S = (n, r, e) => {
7
+ const l = n.map((t) => (typeof t.title == "string" && (t.title = /* @__PURE__ */ o.jsx(u, { value: t.title, bold: 600 })), {
8
8
  ...t,
9
- render: (i, u, g) => {
10
- const p = (r == null ? void 0 : r.length) === 1 ? !1 : g + 1 > ((r == null ? void 0 : r.length) || 0) / 2;
9
+ render: (i, c, g) => {
10
+ const f = (r == null ? void 0 : r.length) === 1 ? !1 : g + 1 > ((r == null ? void 0 : r.length) || 0) / 2;
11
11
  if (t != null && t.render) {
12
- const s = t.render(i, u, g);
12
+ const s = t.render(i, c, g);
13
13
  if (typeof s == "object")
14
14
  return s;
15
15
  if (["boolean", "number", "bigint", "string"].includes(
16
16
  typeof s
17
17
  ))
18
- return /* @__PURE__ */ o.jsx(m, { value: `${s}`, isLatterHalf: p });
18
+ return /* @__PURE__ */ o.jsx(p, { value: `${s}`, isLatterHalf: f });
19
19
  }
20
- return !i && !["boolean", "number", "bigint"].includes(typeof i) ? /* @__PURE__ */ o.jsx(c, { value: "-" }) : /* @__PURE__ */ o.jsx(m, { value: i, isLatterHalf: p });
20
+ return !i && !["boolean", "number", "bigint"].includes(typeof i) ? /* @__PURE__ */ o.jsx(u, { value: "-" }) : /* @__PURE__ */ o.jsx(p, { value: i, isLatterHalf: f });
21
21
  }
22
22
  }));
23
23
  return [
24
- f.SELECTION_COLUMN,
25
- f.EXPAND_COLUMN,
24
+ m.SELECTION_COLUMN,
25
+ m.EXPAND_COLUMN,
26
26
  {
27
27
  title: "序号",
28
28
  rowScope: "row",
29
29
  className: "numRow",
30
30
  width: 50,
31
- render: (t, i, u) => u + 1 + (e.pageIndex - 1) * e.pageSize
31
+ render: (t, i, c) => c + 1 + (e.pageIndex - 1) * e.pageSize
32
32
  },
33
33
  ...l
34
34
  ];
@@ -40,7 +40,7 @@ const j = (n, r, e) => {
40
40
  },
41
41
  expandedRowRender: (r) => {
42
42
  var l;
43
- const e = (l = r[n]) == null ? void 0 : l.map((t) => (typeof t.label == "string" && (t.label = /* @__PURE__ */ o.jsx(c, { minRows: 1, maxRows: 5, value: t.label })), typeof t.children == "string" && (t.children = /* @__PURE__ */ o.jsx(c, { minRows: 1, maxRows: 5, value: t.children })), t));
43
+ const e = (l = r[n]) == null ? void 0 : l.map((t) => (typeof t.label == "string" && (t.label = /* @__PURE__ */ o.jsx(u, { minRows: 1, maxRows: 5, value: t.label })), typeof t.children == "string" && (t.children = /* @__PURE__ */ o.jsx(u, { minRows: 1, maxRows: 5, value: t.children })), t));
44
44
  return /* @__PURE__ */ o.jsx(
45
45
  a,
46
46
  {
@@ -56,7 +56,6 @@ const j = (n, r, e) => {
56
56
  if (n) {
57
57
  const e = {
58
58
  gutter: 20,
59
- spaceSize: 10,
60
59
  left: {
61
60
  span: 6
62
61
  },
@@ -73,7 +72,6 @@ const j = (n, r, e) => {
73
72
  } else {
74
73
  const e = {
75
74
  gutter: 0,
76
- spaceSize: 10,
77
75
  left: {
78
76
  span: 0
79
77
  },
@@ -90,7 +88,7 @@ const j = (n, r, e) => {
90
88
  }
91
89
  };
92
90
  export {
93
- j as getColumns,
91
+ S as getColumns,
94
92
  w as getExpandable,
95
93
  R as getLayoutConfig
96
94
  };
@@ -1,46 +1,47 @@
1
1
  import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useRef as ee, useState as T, useMemo as F, useCallback as te, useEffect as re } from "react";
3
- import { theme as se, Row as y, Col as i, Space as K, Form as h, Select as A, Spin as le, Typography as oe, Table as ce, Pagination as ne, Flex as ie, Empty as G } from "antd";
4
- import H from "../../BitzButton/index.mjs";
2
+ import { useRef as te, useState as T, useMemo as K, useCallback as re, useEffect as le } from "react";
3
+ import { Row as y, Col as a, Space as A, Form as h, Select as G, Spin as se, Typography as oe, Table as ce, Pagination as ne, Flex as ie, Empty as H } from "antd";
4
+ import J from "../../BitzButton/index.mjs";
5
5
  import { getColumns as ae, getExpandable as pe, getLayoutConfig as ue } from "./getData.mjs";
6
6
  import de from "../TextBlock/index.mjs";
7
7
  import xe from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
8
+ import he from "../../BitzTheme/index.mjs";
8
9
  import "./index.less.mjs";
9
- import he from "../../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.mjs";
10
+ import me from "../../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.mjs";
10
11
  import je from "../../../node_modules/.store/@ant-design_icons@5.3.3/node_modules/@ant-design/icons/es/icons/CloseOutlined.mjs";
11
12
  function Ee({
12
- columns: k,
13
- tableData: E,
14
- total: J,
15
- loading: j,
16
- loadingFailed: f,
17
- loadAgain: O,
18
- page: b,
19
- onPageChange: I,
20
- searchInput: Q,
21
- showToolTagSelect: P,
22
- toolTags: W,
13
+ columns: P,
14
+ tableData: z,
15
+ total: O,
16
+ loading: m,
17
+ loadingFailed: b,
18
+ loadAgain: Q,
19
+ page: f,
20
+ onPageChange: B,
21
+ searchInput: W,
22
+ showToolTagSelect: E,
23
+ toolTags: $,
23
24
  onToolTagChange: g,
24
25
  lrLayout: w,
25
- parentRender: z,
26
+ parentRender: I,
26
27
  keys: R,
27
- rows: B,
28
+ rows: k,
28
29
  fieldNames: r,
29
30
  onChange: d,
30
- onDropdownVisibleChange: m
31
+ onDropdownVisibleChange: j
31
32
  }) {
32
- var _;
33
- const C = ee(null), v = xe(C), { token: a } = se.useToken(), [o, $] = T([]), [l, q] = T([]), [L, U] = T(void 0), X = (t, s) => {
34
- U(t), g == null || g(t, s), t || (m(!0), setTimeout(() => {
35
- m(!1);
33
+ var F;
34
+ const C = te(null), v = xe(C), { token: o } = he.useToken(), { tableSpaceBetweenPage: M = 10 } = o == null ? void 0 : o.BitzTableSelect, [c, q] = T([]), [s, L] = T([]), [U, X] = T(void 0), Y = (t, l) => {
35
+ X(t), g == null || g(t, l), t || (j(!0), setTimeout(() => {
36
+ j(!1);
36
37
  }, 0));
37
- }, Y = F(() => ae(k, E, b), [k]), Z = {
38
- selectedRowKeys: o,
39
- onSelect: (t, s) => {
40
- if (s)
41
- o.push(t[r.value]), l.push(t), d(o, l);
38
+ }, Z = K(() => ae(P, z, f), [P]), D = {
39
+ selectedRowKeys: c,
40
+ onSelect: (t, l) => {
41
+ if (l)
42
+ c.push(t[r.value]), s.push(t), d(c, s);
42
43
  else {
43
- const p = l.filter(
44
+ const p = s.filter(
44
45
  (u) => u[r.value] !== t[r.value]
45
46
  );
46
47
  d(
@@ -49,211 +50,203 @@ function Ee({
49
50
  );
50
51
  }
51
52
  },
52
- onSelectAll: (t, s, p) => {
53
- const u = p.map((n) => n[r.value]);
53
+ onSelectAll: (t, l, p) => {
54
+ const u = p.map((i) => i[r.value]);
54
55
  if (t) {
55
- const n = o.concat(u), S = l.concat(p);
56
- d(n, S);
56
+ const i = c.concat(u), S = s.concat(p);
57
+ d(i, S);
57
58
  } else {
58
- const n = o == null ? void 0 : o.filter((x) => !u.includes(x)), S = /* @__PURE__ */ new Map();
59
+ const i = c == null ? void 0 : c.filter((x) => !u.includes(x)), S = /* @__PURE__ */ new Map();
59
60
  p.forEach((x) => {
60
61
  S.set(x[r.value], x);
61
62
  });
62
- const N = l == null ? void 0 : l.filter(
63
+ const ee = s == null ? void 0 : s.filter(
63
64
  (x) => !S.has(x[r.value])
64
65
  );
65
- d(n, N);
66
+ d(i, ee);
66
67
  }
67
68
  }
68
- }, D = te(() => pe(r.items), [r.items]), M = (t, s) => /* @__PURE__ */ e.jsxs("span", { style: { color: a.colorText }, children: [
69
+ }, V = re(() => pe(r.items), [r.items]), _ = (t, l) => /* @__PURE__ */ e.jsxs("span", { style: { color: o.colorText }, children: [
69
70
  t[0],
70
71
  " ",
71
- /* @__PURE__ */ e.jsx("span", { style: { color: a.colorPrimary, fontWeight: 600 }, children: s }),
72
+ /* @__PURE__ */ e.jsx("span", { style: { color: o.colorPrimary, fontWeight: 600 }, children: l }),
72
73
  " ",
73
74
  t[1]
74
- ] }), V = () => {
75
- const t = (s) => {
76
- const p = l.findIndex(
77
- (n) => n[r.value] === s[r.value]
78
- ), u = o.findIndex(
79
- (n) => n === s[r.value]
75
+ ] }), N = () => {
76
+ const t = (l) => {
77
+ const p = s.findIndex(
78
+ (i) => i[r.value] === l[r.value]
79
+ ), u = c.findIndex(
80
+ (i) => i === l[r.value]
80
81
  );
81
- l.splice(p, 1), o.splice(u, 1), d(o, l);
82
+ s.splice(p, 1), c.splice(u, 1), d(c, s);
82
83
  };
83
84
  return /* @__PURE__ */ e.jsxs(
84
- K,
85
+ A,
85
86
  {
86
87
  direction: "vertical",
87
88
  style: {
88
89
  width: "calc(100% - 5px)",
89
90
  paddingRight: 5,
90
- maxHeight: l.length ? 220 : "auto",
91
+ maxHeight: s.length ? 220 : "auto",
91
92
  overflow: "hidden auto"
92
93
  },
93
94
  children: [
94
- l.map((s) => /* @__PURE__ */ e.jsxs(
95
+ s.map((l) => /* @__PURE__ */ e.jsxs(
95
96
  ie,
96
97
  {
97
98
  justify: "space-between",
98
99
  style: {
99
100
  padding: "4px 8px",
100
- border: `1px solid ${a.colorBorder}`,
101
+ border: `1px solid ${o.colorBorder}`,
101
102
  backgroundColor: "#f5f5f5",
102
- borderRadius: a.borderRadiusSM,
103
+ borderRadius: o.borderRadiusSM,
103
104
  overflow: "hidden"
104
105
  },
105
106
  children: [
106
- /* @__PURE__ */ e.jsx("div", { style: { width: "calc(100% - 15px)" }, children: /* @__PURE__ */ e.jsx(de, { value: s[r.label] }) }),
107
+ /* @__PURE__ */ e.jsx("div", { style: { width: "calc(100% - 15px)" }, children: /* @__PURE__ */ e.jsx(de, { value: l[r.label] }) }),
107
108
  /* @__PURE__ */ e.jsx(
108
109
  je,
109
110
  {
110
111
  style: {
111
- color: a.colorError,
112
+ color: o.colorError,
112
113
  fontSize: 13,
113
114
  cursor: "pointer"
114
115
  },
115
- onClick: () => t(s)
116
+ onClick: () => t(l)
116
117
  }
117
118
  )
118
119
  ]
119
120
  },
120
- s[r.value]
121
+ l[r.value]
121
122
  )),
122
- !l.length && /* @__PURE__ */ e.jsx(G, { image: G.PRESENTED_IMAGE_SIMPLE })
123
+ !s.length && /* @__PURE__ */ e.jsx(H, { image: H.PRESENTED_IMAGE_SIMPLE })
123
124
  ]
124
125
  }
125
126
  );
126
- }, c = F(() => ue(w, P), [w, P]);
127
- return re(() => {
128
- $(R ?? []), q(B ?? []);
129
- }, [R, B]), /* @__PURE__ */ e.jsxs(y, { gutter: c.gutter, children: [
130
- /* @__PURE__ */ e.jsx(i, { span: c.left.span, children: w && z && z(c.spaceSize, v == null ? void 0 : v.height) }),
131
- /* @__PURE__ */ e.jsx(i, { span: c.right.span, children: /* @__PURE__ */ e.jsxs(
132
- K,
133
- {
134
- direction: "vertical",
135
- size: c.spaceSize,
136
- style: { width: "100%" },
137
- children: [
138
- /* @__PURE__ */ e.jsx(h, { className: "tableSelectPopupSearchForm", children: /* @__PURE__ */ e.jsx(y, { gutter: [16, 16], children: /* @__PURE__ */ e.jsx(i, { span: 24, children: /* @__PURE__ */ e.jsxs(y, { justify: "space-between", gutter: [16, 16], children: [
139
- /* @__PURE__ */ e.jsx(i, { span: c.right.search, children: /* @__PURE__ */ e.jsx(h.Item, { children: Q }) }),
140
- /* @__PURE__ */ e.jsx(i, { span: c.right.operation, children: /* @__PURE__ */ e.jsxs(y, { justify: "end", gutter: 8, children: [
141
- /* @__PURE__ */ e.jsx(i, { span: c.right.toolTagSelect, children: /* @__PURE__ */ e.jsx(h.Item, { children: /* @__PURE__ */ e.jsx(
142
- A,
143
- {
144
- allowClear: !0,
145
- className: "tableSelectPopupToolTagSelect",
146
- style: {
147
- width: "100%",
148
- "--toolTagSelect-color": j ? a.colorTextDisabled : a.colorText
149
- },
150
- placeholder: "常用标签",
151
- showSearch: !1,
152
- disabled: j,
153
- options: W,
154
- value: L,
155
- onChange: X,
156
- onDropdownVisibleChange: m
157
- }
158
- ) }) }),
159
- /* @__PURE__ */ e.jsx(i, { span: c.right.totalSelect, children: /* @__PURE__ */ e.jsx(h.Item, { children: /* @__PURE__ */ e.jsxs("div", { className: "tableSelectPopupTotalSelect", children: [
160
- /* @__PURE__ */ e.jsx(
161
- A,
162
- {
163
- style: { width: "100%" },
164
- mode: "multiple",
165
- placeholder: "",
166
- showSearch: !1,
167
- options: l,
168
- value: o,
169
- fieldNames: r,
170
- popupClassName: "tableSelectPopupTotalPopup",
171
- dropdownRender: V,
172
- tagRender: () => /* @__PURE__ */ e.jsx(e.Fragment, {}),
173
- onDropdownVisibleChange: m
174
- }
175
- ),
176
- /* @__PURE__ */ e.jsx("div", { className: "tableSelectPopupTotalSelectTip", children: M(
177
- ["已选择", "条数据"],
178
- o.length || 0
179
- ) })
180
- ] }) }) }),
181
- /* @__PURE__ */ e.jsx(i, { span: c.right.button, children: /* @__PURE__ */ e.jsx(
182
- H,
183
- {
184
- type: "primary",
185
- danger: !0,
186
- onClick: () => d([], [], "clear"),
187
- children: "清空"
188
- }
189
- ) }),
190
- /* @__PURE__ */ e.jsx(i, { span: c.right.button, children: /* @__PURE__ */ e.jsx(
191
- H,
192
- {
193
- type: "primary",
194
- onClick: () => d([], [], "confirm"),
195
- children: "确认"
196
- }
197
- ) })
198
- ] }) })
199
- ] }) }) }) }),
200
- /* @__PURE__ */ e.jsx(
201
- "div",
127
+ }, n = K(() => ue(w, E), [w, E]);
128
+ return le(() => {
129
+ q(R ?? []), L(k ?? []);
130
+ }, [R, k]), /* @__PURE__ */ e.jsxs(y, { gutter: n.gutter, children: [
131
+ /* @__PURE__ */ e.jsx(a, { span: n.left.span, children: w && I && I(M, v == null ? void 0 : v.height) }),
132
+ /* @__PURE__ */ e.jsx(a, { span: n.right.span, children: /* @__PURE__ */ e.jsxs(A, { direction: "vertical", size: M, style: { width: "100%" }, children: [
133
+ /* @__PURE__ */ e.jsx(h, { className: "tableSelectPopupSearchForm", children: /* @__PURE__ */ e.jsx(y, { gutter: [16, 16], children: /* @__PURE__ */ e.jsx(a, { span: 24, children: /* @__PURE__ */ e.jsxs(y, { justify: "space-between", gutter: [16, 16], children: [
134
+ /* @__PURE__ */ e.jsx(a, { span: n.right.search, children: /* @__PURE__ */ e.jsx(h.Item, { children: W }) }),
135
+ /* @__PURE__ */ e.jsx(a, { span: n.right.operation, children: /* @__PURE__ */ e.jsxs(y, { justify: "end", gutter: 8, children: [
136
+ /* @__PURE__ */ e.jsx(a, { span: n.right.toolTagSelect, children: /* @__PURE__ */ e.jsx(h.Item, { children: /* @__PURE__ */ e.jsx(
137
+ G,
202
138
  {
203
- ref: C,
204
- ...f && {
205
- className: "pointerMouse",
206
- onClick: () => O()
139
+ allowClear: !0,
140
+ className: "tableSelectPopupToolTagSelect",
141
+ style: {
142
+ width: "100%",
143
+ "--toolTagSelect-color": m ? o.colorTextDisabled : o.colorText
207
144
  },
145
+ placeholder: "常用标签",
146
+ showSearch: !1,
147
+ disabled: m,
148
+ options: $,
149
+ value: U,
150
+ onChange: Y,
151
+ onDropdownVisibleChange: j
152
+ }
153
+ ) }) }),
154
+ /* @__PURE__ */ e.jsx(a, { span: n.right.totalSelect, children: /* @__PURE__ */ e.jsx(h.Item, { children: /* @__PURE__ */ e.jsxs("div", { className: "tableSelectPopupTotalSelect", children: [
155
+ /* @__PURE__ */ e.jsx(
156
+ G,
157
+ {
158
+ style: { width: "100%" },
159
+ mode: "multiple",
160
+ placeholder: "",
161
+ showSearch: !1,
162
+ options: s,
163
+ value: c,
164
+ fieldNames: r,
165
+ popupClassName: "tableSelectPopupTotalPopup",
166
+ dropdownRender: N,
167
+ tagRender: () => /* @__PURE__ */ e.jsx(e.Fragment, {}),
168
+ onDropdownVisibleChange: j
169
+ }
170
+ ),
171
+ /* @__PURE__ */ e.jsx("div", { className: "tableSelectPopupTotalSelectTip", children: _(
172
+ ["已选择", "条数据"],
173
+ c.length || 0
174
+ ) })
175
+ ] }) }) }),
176
+ /* @__PURE__ */ e.jsx(a, { span: n.right.button, children: /* @__PURE__ */ e.jsx(
177
+ J,
178
+ {
179
+ type: "primary",
180
+ danger: !0,
181
+ onClick: () => d([], [], "clear"),
182
+ children: "清空"
183
+ }
184
+ ) }),
185
+ /* @__PURE__ */ e.jsx(a, { span: n.right.button, children: /* @__PURE__ */ e.jsx(
186
+ J,
187
+ {
188
+ type: "primary",
189
+ onClick: () => d([], [], "confirm"),
190
+ children: "确认"
191
+ }
192
+ ) })
193
+ ] }) })
194
+ ] }) }) }) }),
195
+ /* @__PURE__ */ e.jsx(
196
+ "div",
197
+ {
198
+ ref: C,
199
+ ...b && {
200
+ className: "pointerMouse",
201
+ onClick: () => Q()
202
+ },
203
+ children: /* @__PURE__ */ e.jsx(
204
+ se,
205
+ {
206
+ spinning: b,
207
+ indicator: /* @__PURE__ */ e.jsx(me, {}),
208
+ tip: /* @__PURE__ */ e.jsx(oe.Text, { type: "danger", children: "加载失败,点击重试" }),
208
209
  children: /* @__PURE__ */ e.jsx(
209
- le,
210
+ ce,
210
211
  {
211
- spinning: f,
212
- indicator: /* @__PURE__ */ e.jsx(he, {}),
213
- tip: /* @__PURE__ */ e.jsx(oe.Text, { type: "danger", children: "加载失败,点击重试" }),
214
- children: /* @__PURE__ */ e.jsx(
215
- ce,
216
- {
217
- rowKey: r.value,
218
- loading: j,
219
- bordered: !0,
220
- sticky: !0,
221
- size: "small",
222
- scroll: { y: 400 },
223
- pagination: !1,
224
- rowSelection: Z,
225
- columns: Y,
226
- dataSource: E,
227
- ...f && { className: "loadingFailedTable" },
228
- ...D(),
229
- style: {
230
- "--tableBody-bootomBorderColor": (_ = a.Table) == null ? void 0 : _.borderColor
231
- }
232
- }
233
- )
212
+ rowKey: r.value,
213
+ loading: m,
214
+ bordered: !0,
215
+ sticky: !0,
216
+ size: "small",
217
+ scroll: { y: 400 },
218
+ pagination: !1,
219
+ rowSelection: D,
220
+ columns: Z,
221
+ dataSource: z,
222
+ ...b && { className: "loadingFailedTable" },
223
+ ...V(),
224
+ style: {
225
+ "--tableBody-bootomBorderColor": ((F = o.Table) == null ? void 0 : F.borderColor) || o.colorBorderSecondary
226
+ }
234
227
  }
235
228
  )
236
229
  }
237
- ),
238
- /* @__PURE__ */ e.jsx(h, { children: /* @__PURE__ */ e.jsx(h.Item, { style: { marginBottom: 0 }, children: /* @__PURE__ */ e.jsx(
239
- ne,
240
- {
241
- disabled: j,
242
- className: "tableSelectPopupTablePagination",
243
- size: "small",
244
- current: b.pageIndex,
245
- pageSize: b.pageSize,
246
- showTotal: (t) => M(["共", "条"], t),
247
- showSizeChanger: !0,
248
- showQuickJumper: !0,
249
- total: J,
250
- onChange: I,
251
- onShowSizeChange: (t, s) => I(1, s)
252
- }
253
- ) }) })
254
- ]
255
- }
256
- ) })
230
+ )
231
+ }
232
+ ),
233
+ /* @__PURE__ */ e.jsx(h, { children: /* @__PURE__ */ e.jsx(h.Item, { style: { marginBottom: 0 }, children: /* @__PURE__ */ e.jsx(
234
+ ne,
235
+ {
236
+ disabled: m,
237
+ className: "tableSelectPopupTablePagination",
238
+ size: "small",
239
+ current: f.pageIndex,
240
+ pageSize: f.pageSize,
241
+ showTotal: (t) => _(["共", "条"], t),
242
+ showSizeChanger: !0,
243
+ showQuickJumper: !0,
244
+ total: O,
245
+ onChange: B,
246
+ onShowSizeChange: (t, l) => B(1, l)
247
+ }
248
+ ) }) })
249
+ ] }) })
257
250
  ] });
258
251
  }
259
252
  export {
@@ -60,7 +60,9 @@ export interface BitzTableSelectProps<T extends BaseOptionType> extends AntSelec
60
60
  placeholder?: string;
61
61
  /** 向父/组件传递数据的事件 */
62
62
  onChange?: (value: Key[]) => void;
63
+ /** 计算popup总宽度的追加值 */
64
+ offsetWidth?: number;
63
65
  }
64
66
  /** 下拉表格组件 */
65
- declare function BitzTableSelect<T extends BaseOptionType>({ columns, tableData, loading, loadingFailed, loadAgain, total, page, onPageChange, onSearch, showToolTagSelect, placeholder, fieldNames, ...rest }: BitzTableSelectProps<T>): import("react/jsx-runtime").JSX.Element;
67
+ declare function BitzTableSelect<T extends BaseOptionType>({ columns, tableData, loading, loadingFailed, loadAgain, total, page, onPageChange, onSearch, showToolTagSelect, placeholder, fieldNames, offsetWidth, ...rest }: BitzTableSelectProps<T>): import("react/jsx-runtime").JSX.Element;
66
68
  export default BitzTableSelect;