bitz-react-admin-ui 2.6.7 → 2.6.9

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.
@@ -1,4 +1,4 @@
1
- var s = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- s as __module
3
+ p as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var p = { exports: {} };
1
+ var s = { exports: {} };
2
2
  export {
3
- p as __module
3
+ s as __module
4
4
  };
@@ -1,15 +1,15 @@
1
1
  import { j as n } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
2
2
  import P from "../../../node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/useSize/index.mjs";
3
3
  import { Space as E, Skeleton as L, theme as D } from "antd";
4
- import { forwardRef as F, useContext as H, useMemo as k, useState as M, Fragment as O, useRef as S } from "react";
4
+ import { forwardRef as F, useContext as H, useMemo as N, useState as M, Fragment as O, useRef as S } from "react";
5
5
  import x from "../../BitzButton/index.mjs";
6
6
  import _, { actionColBtnGap as q } from "./style.mjs";
7
7
  import "../index.mjs";
8
8
  import T from "../Dropdown/index.mjs";
9
9
  import { tablePaddingInline as G } from "../../BitzConfigProvider/context.mjs";
10
10
  import { BitzTableContext as J } from "../Store/index.mjs";
11
- const j = ({
12
- skeletonCls: h,
11
+ const k = ({
12
+ skeletonCls: p,
13
13
  ...s
14
14
  }) => /* @__PURE__ */ n.jsxs(x, { type: "text", ...s, children: [
15
15
  /* @__PURE__ */ n.jsx("span", { children: s.children }),
@@ -18,7 +18,7 @@ const j = ({
18
18
  {
19
19
  active: !0,
20
20
  title: !1,
21
- className: h,
21
+ className: p,
22
22
  paragraph: {
23
23
  rows: 1,
24
24
  width: "100%"
@@ -26,130 +26,130 @@ const j = ({
26
26
  }
27
27
  )
28
28
  ] }), K = F(
29
- ({ loading: h, useMaxWidth: s, actionGroup: a, customActions: r }, N) => {
30
- const { loading: f, fullscreen: b } = H(J), o = k(() => h ?? f, [h, f]), {
29
+ ({ loading: p, useMaxWidth: s, actionGroup: a, customActions: r }, b) => {
30
+ const { loading: C, fullscreen: y } = H(J), o = N(() => p ?? C, [p, C]), {
31
31
  primaryBtnClassName: l,
32
- dangerBtnClassName: c,
33
- secondaryBtnClassName: C,
32
+ dangerBtnClassName: d,
33
+ secondaryBtnClassName: g,
34
34
  maskClassName: z,
35
- skeletonBtnClassName: d,
36
- skeletonClassName: p
37
- } = _(), [g] = M([
35
+ skeletonBtnClassName: c,
36
+ skeletonClassName: u
37
+ } = _(), [j] = M([
38
38
  /* @__PURE__ */ n.jsx(
39
- j,
39
+ k,
40
40
  {
41
- className: d,
42
- skeletonCls: p,
41
+ className: c,
42
+ skeletonCls: u,
43
43
  children: "占位"
44
44
  },
45
45
  1
46
46
  ),
47
47
  /* @__PURE__ */ n.jsx(
48
- j,
48
+ k,
49
49
  {
50
- className: d,
51
- skeletonCls: p,
50
+ className: c,
51
+ skeletonCls: u,
52
52
  children: "占位"
53
53
  },
54
54
  2
55
55
  )
56
- ]), y = k(() => {
56
+ ]), B = N(() => {
57
57
  if (o && s)
58
- return g;
58
+ return j;
59
59
  const m = a.length >= 4 ? 2 : a.length, i = a.slice(0, m), t = [];
60
- if (i != null && i.length && i.forEach((e, u) => {
60
+ if (i != null && i.length && i.forEach((e, h) => {
61
61
  t.push(
62
62
  o ? /* @__PURE__ */ n.jsx(
63
- j,
63
+ k,
64
64
  {
65
- className: d,
66
- skeletonCls: p,
65
+ className: c,
66
+ skeletonCls: u,
67
67
  children: e == null ? void 0 : e.label
68
68
  },
69
- u
69
+ h
70
70
  ) : e.children ? /* @__PURE__ */ n.jsx(T, { menu: { items: e.children }, children: /* @__PURE__ */ n.jsx(
71
71
  x,
72
72
  {
73
73
  type: "text",
74
- className: e.danger ? c : l,
74
+ className: e.danger ? d : l,
75
75
  children: e == null ? void 0 : e.label
76
76
  }
77
- ) }, u) : /* @__PURE__ */ n.jsx(
77
+ ) }, h) : /* @__PURE__ */ n.jsx(
78
78
  x,
79
79
  {
80
80
  type: "text",
81
- className: e.danger ? c : l,
81
+ className: e.danger ? d : l,
82
82
  onClick: e == null ? void 0 : e.onClick,
83
83
  children: e == null ? void 0 : e.label
84
84
  },
85
- u
85
+ h
86
86
  )
87
87
  );
88
88
  }), m === 2 && a.length >= 4) {
89
89
  const e = a.slice(2, a.length);
90
90
  t.push(
91
91
  o ? /* @__PURE__ */ n.jsx(
92
- j,
92
+ k,
93
93
  {
94
- className: d,
95
- skeletonCls: p,
94
+ className: c,
95
+ skeletonCls: u,
96
96
  children: "更多"
97
97
  },
98
98
  5
99
- ) : /* @__PURE__ */ n.jsx(T, { menu: { items: e }, children: /* @__PURE__ */ n.jsx(x, { type: "text", className: C, children: "更多" }) }, 5)
99
+ ) : /* @__PURE__ */ n.jsx(T, { menu: { items: e }, children: /* @__PURE__ */ n.jsx(x, { type: "text", className: g, children: "更多" }) }, 5)
100
100
  );
101
101
  }
102
102
  return t;
103
- }, [o, s, a]), B = k(() => {
103
+ }, [o, s, a]), w = N(() => {
104
104
  if (!(r != null && r.length))
105
105
  return;
106
106
  if (o && s)
107
- return g;
107
+ return j;
108
108
  const m = r.map((t, e) => /* @__PURE__ */ n.jsx(
109
- j,
109
+ k,
110
110
  {
111
- className: d,
112
- skeletonCls: p,
111
+ className: c,
112
+ skeletonCls: u,
113
113
  children: t == null ? void 0 : t.label
114
114
  },
115
115
  e
116
116
  )), i = r.map((t, e) => {
117
- let u = /* @__PURE__ */ n.jsx(
117
+ let h = /* @__PURE__ */ n.jsx(
118
118
  x,
119
119
  {
120
120
  type: "text",
121
- className: t.danger ? c : l,
121
+ className: t.danger ? d : l,
122
122
  onClick: t.onClick,
123
123
  children: t == null ? void 0 : t.label
124
124
  },
125
125
  e
126
126
  );
127
- t.type === "secondary" && (u = /* @__PURE__ */ n.jsx(
127
+ t.type === "secondary" && (h = /* @__PURE__ */ n.jsx(
128
128
  x,
129
129
  {
130
130
  type: "text",
131
- className: C,
131
+ className: g,
132
132
  onClick: t.onClick,
133
133
  children: t == null ? void 0 : t.label
134
134
  },
135
135
  e
136
136
  ));
137
- const w = t.render ?? ((I, R) => /* @__PURE__ */ n.jsx(O, { children: I }, R));
138
- return w == null ? void 0 : w(u, e);
137
+ const f = t.render ?? ((I, R) => /* @__PURE__ */ n.jsx(O, { children: I }, R));
138
+ return f == null ? void 0 : f(h, e);
139
139
  });
140
140
  return o ? m : i;
141
141
  }, [o, s, r]);
142
142
  return /* @__PURE__ */ n.jsxs("div", { onClick: (m) => m.stopPropagation(), style: { overflow: "hidden" }, children: [
143
- /* @__PURE__ */ n.jsx(E, { size: q, ref: N, className: "actionGroup", children: B ?? y }),
143
+ /* @__PURE__ */ n.jsx(E, { size: q, ref: b, className: "actionGroup", children: w ?? B }),
144
144
  /* @__PURE__ */ n.jsx("div", { className: z })
145
145
  ] });
146
146
  }
147
147
  );
148
- function ee(h) {
149
- var d;
150
- const { actionGroup: s, loading: a, customActions: r, defaultWidth: N, ...f } = h, b = ((d = D.useToken().token.Table) == null ? void 0 : d.cellPaddingInline) ?? G, o = S(null), l = P(o), c = S(0), C = k(() => (l != null && l.width && !c.current && (c.current = l == null ? void 0 : l.width), !(l != null && l.width) && c.current ? c.current + b * 2 + 1 : l != null && l.width ? l.width + b * 2 + 1 : N ?? 141), [l, b, N]);
151
- return k(() => ({
152
- width: Math.floor(C),
148
+ function ee(p) {
149
+ var c;
150
+ const { actionGroup: s, loading: a, customActions: r, defaultWidth: b, ...C } = p, y = ((c = D.useToken().token.Table) == null ? void 0 : c.cellPaddingInline) ?? G, o = S(null), l = P(o), d = S(0), g = N(() => (l != null && l.width && !d.current && (d.current = l == null ? void 0 : l.width), !(l != null && l.width) && d.current ? d.current + y * 2 + 1 : l != null && l.width ? l.width + y * 2 + 1 : b ?? 141), [l, y, b]);
151
+ return N(() => ({
152
+ width: Math.floor(g),
153
153
  mobileHide: !0,
154
154
  isOperationCol: !0,
155
155
  title: "操作",
@@ -158,22 +158,26 @@ function ee(h) {
158
158
  dataIndex: "operationCol",
159
159
  className: "operationCol",
160
160
  disabled: !0,
161
- render: (p, g, y) => {
161
+ render: (u, j, B) => {
162
162
  var i, t;
163
- const B = ((i = r == null ? void 0 : r(g, y)) == null ? void 0 : i.filter((e) => e.type != "detail")) ?? [], m = ((t = s == null ? void 0 : s(g, y)) == null ? void 0 : t.filter((e) => e.type != "detail")) ?? [];
163
+ const w = ((i = r == null ? void 0 : r(j, B)) == null ? void 0 : i.filter((e) => e.type != "detail")) ?? [], m = ((t = s == null ? void 0 : s(j, B)) == null ? void 0 : t.filter((e) => {
164
+ var f;
165
+ const h = typeof e.hidden == "function" ? (f = e.hidden) == null ? void 0 : f.call(e) : e.hidden;
166
+ return e.type != "detail" && !h;
167
+ })) ?? [];
164
168
  return /* @__PURE__ */ n.jsx(
165
169
  K,
166
170
  {
167
171
  actionGroup: m,
168
- customActions: B,
172
+ customActions: w,
169
173
  loading: a,
170
- useMaxWidth: f.useMaxWidth,
174
+ useMaxWidth: C.useMaxWidth,
171
175
  ref: o
172
176
  }
173
177
  );
174
178
  },
175
- ...f
176
- }), [C, o.current, a, s, r]);
179
+ ...C
180
+ }), [g, o.current, a, s, r]);
177
181
  }
178
182
  export {
179
183
  K as BitzTableAction,