bitz-react-admin-ui 2.11.0-beta.1 → 2.11.0-beta.3

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,88 +1,88 @@
1
1
  import { j as e } from "../../../../../node_modules/react/jsx-runtime.mjs";
2
- import N from "../../../../../assets/iconfont/IconKuansongde.mjs";
3
- import W from "../../../../../assets/iconfont/IconTekuansong.mjs";
4
- import E from "../../../../../assets/iconfont/IconJincoude.mjs";
5
- import J from "../../../../../assets/iconfont/IconZhongdengde.mjs";
6
- import A from "../../../../../assets/iconfont/IconTejincou.mjs";
7
- import M from "../../../../../assets/iconfont/IconWufengexian.mjs";
8
- import O from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
9
- import Q from "../../../../../assets/iconfont/IconHangfengexian.mjs";
10
- import Y from "../../../../../assets/iconfont/IconLiefengexian.mjs";
11
- import Z from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
12
- import D from "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
13
- import { BitzConfigContext as K } from "../../../../BitzConfigProvider/context.mjs";
14
- import { BitzTableContext as L } from "../../../Store/index.mjs";
15
- import V from "../../../../BitzTheme/index.mjs";
16
- import { RedoOutlined as _ } from "@ant-design/icons";
17
- import { Form as n, Radio as f, Row as q, Col as I, Button as $ } from "antd";
18
- import U from "../../../../../node_modules/classnames/index.mjs";
19
- import { forwardRef as X, useRef as C, useEffect as j, useMemo as ee, useContext as b, useImperativeHandle as oe, useState as re, memo as le } from "react";
20
- import { BitzToolBarContext as ie } from "../../Wrapper/context.mjs";
2
+ import T from "../../../../../assets/iconfont/IconKuansongde.mjs";
3
+ import N from "../../../../../assets/iconfont/IconTekuansong.mjs";
4
+ import W from "../../../../../assets/iconfont/IconJincoude.mjs";
5
+ import E from "../../../../../assets/iconfont/IconZhongdengde.mjs";
6
+ import J from "../../../../../assets/iconfont/IconTejincou.mjs";
7
+ import A from "../../../../../assets/iconfont/IconWufengexian.mjs";
8
+ import M from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
9
+ import O from "../../../../../assets/iconfont/IconHangfengexian.mjs";
10
+ import Q from "../../../../../assets/iconfont/IconLiefengexian.mjs";
11
+ import Y from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
12
+ import Z from "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
13
+ import { BitzConfigContext as D } from "../../../../BitzConfigProvider/context.mjs";
14
+ import { BitzTableContext as K } from "../../../Store/index.mjs";
15
+ import L from "../../../../BitzTheme/index.mjs";
16
+ import { RedoOutlined as V } from "@ant-design/icons";
17
+ import { Form as t, Radio as p, Row as _, Col as I, Button as q } from "antd";
18
+ import $ from "../../../../../node_modules/classnames/index.mjs";
19
+ import { forwardRef as U, useRef as w, useEffect as b, useMemo as X, useContext as y, useImperativeHandle as ee, useState as oe, memo as re } from "react";
20
+ import { BitzToolBarContext as le } from "../../Wrapper/context.mjs";
21
21
  import l from "./RadioCard.mjs";
22
- import se from "./ScopeSwitch.mjs";
23
- import { useLingui as ne, Trans as te } from "@lingui/react";
24
- const ae = ({
25
- defaultSize: s,
26
- items: x
27
- }) => x.map((t) => t.key === s ? {
28
- ...t,
29
- label: /* @__PURE__ */ e.jsx(te, { id: "sYsJ/j", values: {
30
- 0: t.label
22
+ import ie from "./ScopeSwitch.mjs";
23
+ import { useLingui as ne, Trans as se } from "@lingui/react";
24
+ const te = ({
25
+ defaultSize: n,
26
+ items: h
27
+ }) => h.map((a) => a.key === n ? {
28
+ ...a,
29
+ label: /* @__PURE__ */ e.jsx(se, { id: "sYsJ/j", values: {
30
+ 0: a.label
31
31
  } })
32
- } : t), ce = X(({
33
- display: s,
34
- postHeight: x
35
- }, t) => {
32
+ } : a), ae = U(({
33
+ display: n,
34
+ postHeight: h
35
+ }, a) => {
36
36
  var z, v;
37
37
  const {
38
38
  _: o
39
39
  } = ne(), {
40
40
  token: r
41
- } = V.useToken(), y = C(null);
42
- j(() => {
41
+ } = L.useToken(), m = w(null);
42
+ b(() => {
43
43
  var i;
44
- x((i = y.current) == null ? void 0 : i.clientHeight);
45
- }, []);
46
- const w = ee(() => ({
44
+ m.current && h((i = m.current) == null ? void 0 : i.clientHeight);
45
+ }, [m.current]);
46
+ const C = X(() => ({
47
47
  display: "flex",
48
- width: s ? "100%" : 0,
49
- pointerEvents: s ? "auto" : "none",
50
- opacity: s ? 1 : 0,
51
- overflow: s ? "inherit" : "hidden",
52
- ...s ? {} : {
48
+ width: n ? "100%" : 0,
49
+ pointerEvents: n ? "auto" : "none",
50
+ opacity: n ? 1 : 0,
51
+ overflow: n ? "inherit" : "hidden",
52
+ ...n ? {} : {
53
53
  position: "absolute",
54
54
  left: 0,
55
55
  right: 0
56
56
  }
57
- }), [s]), R = {
57
+ }), [n]), H = {
58
58
  size: 26,
59
59
  color: r.colorPrimary
60
- }, [c] = n.useForm(), H = (z = b(K).Table) == null ? void 0 : z.stylesScope, {
61
- defaultTableSize: k,
60
+ }, [d] = t.useForm(), k = (z = y(D).Table) == null ? void 0 : z.stylesScope, {
61
+ defaultTableSize: R,
62
62
  stylesConfig: g,
63
- defaultTableStylesConfig: p
64
- } = b(L), a = (v = b(ie).config) == null ? void 0 : v.stylesConfig, m = (i, d) => {
63
+ defaultTableStylesConfig: j
64
+ } = y(K), c = (v = y(le).config) == null ? void 0 : v.stylesConfig, u = (i, x) => {
65
65
  var P, S;
66
- let u = d;
67
- return (P = a == null ? void 0 : a[i]) != null && P.disabled && (u = U(d, "disabledControl")), {
68
- disabled: (S = a == null ? void 0 : a[i]) == null ? void 0 : S.disabled,
69
- className: u
66
+ let f = x;
67
+ return (P = c == null ? void 0 : c[i]) != null && P.disabled && (f = $(x, "disabledControl")), {
68
+ disabled: (S = c == null ? void 0 : c[i]) == null ? void 0 : S.disabled,
69
+ className: f
70
70
  };
71
71
  };
72
- j(() => {
73
- c.setFieldsValue({
74
- ...p,
72
+ b(() => {
73
+ d.setFieldsValue({
74
+ ...j,
75
75
  ...g,
76
- stylesScope: H === "global"
76
+ stylesScope: k === "global"
77
77
  });
78
- }, [g, p]);
78
+ }, [g, j]);
79
79
  const B = () => {
80
- c.setFieldsValue({
81
- ...p,
80
+ d.setFieldsValue({
81
+ ...j,
82
82
  stylesScope: !1
83
83
  });
84
- }, F = ae({
85
- defaultSize: k,
84
+ }, F = te({
85
+ defaultSize: R,
86
86
  items: [{
87
87
  key: "xs",
88
88
  label: o(
@@ -91,7 +91,7 @@ const ae = ({
91
91
  id: "iZ4WSd"
92
92
  }
93
93
  ),
94
- icon: A
94
+ icon: J
95
95
  }, {
96
96
  key: "sm",
97
97
  label: o(
@@ -100,7 +100,7 @@ const ae = ({
100
100
  id: "W1ol+r"
101
101
  }
102
102
  ),
103
- icon: E
103
+ icon: W
104
104
  }, {
105
105
  key: "md",
106
106
  label: o(
@@ -109,7 +109,7 @@ const ae = ({
109
109
  id: "iuR5P4"
110
110
  }
111
111
  ),
112
- icon: J
112
+ icon: E
113
113
  }, {
114
114
  key: "lg",
115
115
  label: o(
@@ -118,7 +118,7 @@ const ae = ({
118
118
  id: "kKoOyf"
119
119
  }
120
120
  ),
121
- icon: N
121
+ icon: T
122
122
  }, {
123
123
  key: "xl",
124
124
  label: o(
@@ -127,86 +127,86 @@ const ae = ({
127
127
  id: "6QWPkM"
128
128
  }
129
129
  ),
130
- icon: W
130
+ icon: N
131
131
  }]
132
132
  });
133
- oe(t, () => ({
134
- getFormInstance: () => c
133
+ ee(a, () => ({
134
+ getFormInstance: () => d
135
135
  }));
136
- const h = C(null), [G, T] = re("auto");
137
- return j(() => {
138
- h && T(h.current.clientWidth + 10);
139
- }, []), /* @__PURE__ */ e.jsx("div", { style: w, ref: y, children: /* @__PURE__ */ e.jsxs(n, { form: c, style: {
136
+ const s = w(null), [ce, G] = oe("auto");
137
+ return b(() => {
138
+ s != null && s.current && G(s.current.clientWidth + 10);
139
+ }, [s == null ? void 0 : s.current]), /* @__PURE__ */ e.jsx("div", { style: C, ref: m, children: /* @__PURE__ */ e.jsxs(t, { form: d, style: {
140
140
  width: "100%"
141
141
  }, labelCol: {
142
142
  span: 3
143
143
  }, labelAlign: "left", colon: !1, className: "stylesConfigFormContent", children: [
144
- /* @__PURE__ */ e.jsx(n.Item, { label: o(
144
+ /* @__PURE__ */ e.jsx(t.Item, { label: o(
145
145
  /*i18n*/
146
146
  {
147
147
  id: "a4wCNJ"
148
148
  }
149
- ), name: "size", children: /* @__PURE__ */ e.jsx(f.Group, { ...m("size", "sizeRadioGroup"), children: F.map(({
149
+ ), name: "size", children: /* @__PURE__ */ e.jsx(p.Group, { ...u("size", "sizeRadioGroup"), children: F.map(({
150
150
  key: i,
151
- label: d,
152
- icon: u
153
- }) => /* @__PURE__ */ e.jsx(l, { label: d, value: i, children: /* @__PURE__ */ e.jsx(u, { ...R }) }, i)) }) }),
154
- /* @__PURE__ */ e.jsx(n.Item, { label: o(
151
+ label: x,
152
+ icon: f
153
+ }) => /* @__PURE__ */ e.jsx(l, { label: x, value: i, children: /* @__PURE__ */ e.jsx(f, { ...H }) }, i)) }) }),
154
+ /* @__PURE__ */ e.jsx(t.Item, { label: o(
155
155
  /*i18n*/
156
156
  {
157
157
  id: "/w3zDE"
158
158
  }
159
- ), name: "bordered", children: /* @__PURE__ */ e.jsxs(f.Group, { ...m("bordered", "splitBorderRadioGroup"), children: [
159
+ ), name: "bordered", children: /* @__PURE__ */ e.jsxs(p.Group, { ...u("bordered", "splitBorderRadioGroup"), children: [
160
160
  /* @__PURE__ */ e.jsx(l, { label: o(
161
161
  /*i18n*/
162
162
  {
163
163
  id: "EseB3J"
164
164
  }
165
- ), value: "hide", children: /* @__PURE__ */ e.jsx(M, { size: 26, color: r.colorPrimaryHover }) }),
165
+ ), value: "hide", children: /* @__PURE__ */ e.jsx(A, { size: 26, color: r.colorPrimaryHover }) }),
166
166
  /* @__PURE__ */ e.jsx(l, { label: o(
167
167
  /*i18n*/
168
168
  {
169
169
  id: "nnvA12"
170
170
  }
171
- ), value: "row", children: /* @__PURE__ */ e.jsx(Q, { size: 26, color: [r.colorPrimaryHover, r.colorPrimary, r.colorPrimary, r.colorPrimaryHover] }) }),
171
+ ), value: "row", children: /* @__PURE__ */ e.jsx(O, { size: 26, color: [r.colorPrimaryHover, r.colorPrimary, r.colorPrimary, r.colorPrimaryHover] }) }),
172
172
  /* @__PURE__ */ e.jsx(l, { label: o(
173
173
  /*i18n*/
174
174
  {
175
175
  id: "iM6yAp"
176
176
  }
177
- ), value: "column", children: /* @__PURE__ */ e.jsx(Y, { size: 26, color: [r.colorPrimaryHover, r.colorPrimary, r.colorPrimary, r.colorPrimaryHover] }) }),
177
+ ), value: "column", children: /* @__PURE__ */ e.jsx(Q, { size: 26, color: [r.colorPrimaryHover, r.colorPrimary, r.colorPrimary, r.colorPrimaryHover] }) }),
178
178
  /* @__PURE__ */ e.jsx(l, { label: o(
179
179
  /*i18n*/
180
180
  {
181
181
  id: "PbzBaa"
182
182
  }
183
- ), value: "row-column", children: /* @__PURE__ */ e.jsx(O, { size: 26, color: [r.colorPrimaryHover, r.colorPrimary, r.colorPrimary, r.colorPrimaryHover] }) })
183
+ ), value: "row-column", children: /* @__PURE__ */ e.jsx(M, { size: 26, color: [r.colorPrimaryHover, r.colorPrimary, r.colorPrimary, r.colorPrimaryHover] }) })
184
184
  ] }) }),
185
- /* @__PURE__ */ e.jsx(n.Item, { label: o(
185
+ /* @__PURE__ */ e.jsx(t.Item, { label: o(
186
186
  /*i18n*/
187
187
  {
188
188
  id: "l5izxf"
189
189
  }
190
- ), name: "zebra", children: /* @__PURE__ */ e.jsxs(f.Group, { ...m("zebra", "zebraRadioGroup"), children: [
190
+ ), name: "zebra", children: /* @__PURE__ */ e.jsxs(p.Group, { ...u("zebra", "zebraRadioGroup"), children: [
191
191
  /* @__PURE__ */ e.jsx(l, { label: o(
192
192
  /*i18n*/
193
193
  {
194
194
  id: "B0/8Pd"
195
195
  }
196
- ), value: !0, children: /* @__PURE__ */ e.jsx(Z, { size: 26, color: [r.colorPrimaryHover, r.colorPrimary] }) }),
196
+ ), value: !0, children: /* @__PURE__ */ e.jsx(Y, { size: 26, color: [r.colorPrimaryHover, r.colorPrimary] }) }),
197
197
  /* @__PURE__ */ e.jsx(l, { label: o(
198
198
  /*i18n*/
199
199
  {
200
200
  id: "lQCj9N"
201
201
  }
202
- ), value: !1, children: /* @__PURE__ */ e.jsx(D, { size: 26, color: r.colorPrimaryHover }) })
202
+ ), value: !1, children: /* @__PURE__ */ e.jsx(Z, { size: 26, color: r.colorPrimaryHover }) })
203
203
  ] }) }),
204
- /* @__PURE__ */ e.jsx(n.Item, { label: o(
204
+ /* @__PURE__ */ e.jsx(t.Item, { label: o(
205
205
  /*i18n*/
206
206
  {
207
207
  id: "64GRJc"
208
208
  }
209
- ), name: "pageSize", children: /* @__PURE__ */ e.jsxs(f.Group, { ...m("pageSize", "pageSizeGroup"), children: [
209
+ ), name: "pageSize", children: /* @__PURE__ */ e.jsxs(p.Group, { ...u("pageSize", "pageSizeGroup"), children: [
210
210
  /* @__PURE__ */ e.jsx(l, { label: o(
211
211
  /*i18n*/
212
212
  {
@@ -232,13 +232,13 @@ const ae = ({
232
232
  }
233
233
  ), value: 100, children: /* @__PURE__ */ e.jsx(e.Fragment, {}) })
234
234
  ] }) }),
235
- /* @__PURE__ */ e.jsxs(q, { gutter: 16, className: "scopeAndReset", children: [
236
- /* @__PURE__ */ e.jsx(I, { ref: h, style: {
237
- width: G
238
- }, className: "scope", children: /* @__PURE__ */ e.jsx(n.Item, { name: "stylesScope", children: /* @__PURE__ */ e.jsx(se, {}) }) }),
235
+ /* @__PURE__ */ e.jsxs(_, { gutter: 16, className: "scopeAndReset", children: [
236
+ /* @__PURE__ */ e.jsx(I, { ref: s, style: {
237
+ width: 200
238
+ }, className: "scope", children: /* @__PURE__ */ e.jsx(t.Item, { name: "stylesScope", children: /* @__PURE__ */ e.jsx(ie, {}) }) }),
239
239
  /* @__PURE__ */ e.jsx(I, { style: {
240
240
  alignSelf: "flex-end"
241
- }, className: "reset", children: /* @__PURE__ */ e.jsx($, { type: "link", icon: /* @__PURE__ */ e.jsx(_, {}), size: "small", onClick: B, children: o(
241
+ }, className: "reset", children: /* @__PURE__ */ e.jsx(q, { type: "link", icon: /* @__PURE__ */ e.jsx(V, {}), size: "small", onClick: B, children: o(
242
242
  /*i18n*/
243
243
  {
244
244
  id: "3mjHNG"
@@ -246,7 +246,7 @@ const ae = ({
246
246
  ) }) })
247
247
  ] })
248
248
  ] }) });
249
- }), Ge = le(ce);
249
+ }), Ge = re(ae);
250
250
  export {
251
251
  Ge as default
252
252
  };
@@ -1,53 +1,56 @@
1
- import { j as e } from "../../../../node_modules/react/jsx-runtime.mjs";
2
- import { memo as j, useContext as g, useMemo as z, useEffect as F } from "react";
3
- import { FullscreenExitOutlined as L, FullscreenOutlined as T } from "@ant-design/icons";
4
- import C from "../style.mjs";
5
- import h from "../../../BitzButton/index.mjs";
6
- import o from "../../../../node_modules/screenfull/index.mjs";
7
- import k from "../../../BitzToast/index.mjs";
8
- import { findParentFirstNodeByClass as y } from "../../../../utils/findNode.mjs";
9
- import { BitzTableContext as I } from "../../Store/index.mjs";
10
- import { useLingui as v, Trans as d } from "@lingui/react";
11
- const N = ({
12
- order: x,
13
- show: p = !0
1
+ import { j as t } from "../../../../node_modules/react/jsx-runtime.mjs";
2
+ import { memo as F, useContext as g, useState as z, useMemo as T, useEffect as C } from "react";
3
+ import { FullscreenExitOutlined as h, FullscreenOutlined as k } from "@ant-design/icons";
4
+ import y from "../style.mjs";
5
+ import I from "../../../BitzButton/index.mjs";
6
+ import r from "../../../../node_modules/screenfull/index.mjs";
7
+ import S from "../../../BitzToast/index.mjs";
8
+ import { findParentFirstNodeByClass as v } from "../../../../utils/findNode.mjs";
9
+ import { BitzTableContext as L } from "../../Store/index.mjs";
10
+ import { useLingui as N, Trans as f } from "@lingui/react";
11
+ const O = ({
12
+ order: d,
13
+ show: x = !0
14
14
  }) => {
15
15
  const {
16
- _: b
17
- } = v(), {
18
- toolbarItemClassName: B
19
- } = C(), {
20
- fullscreen: s,
16
+ _: p
17
+ } = N(), {
18
+ toolbarItemClassName: b
19
+ } = y(), {
20
+ fullscreen: B,
21
21
  setFullscreen: l
22
- } = g(I), r = z(() => s ? {
23
- title: /* @__PURE__ */ e.jsx(d, { id: "HMDSro" }),
24
- icon: /* @__PURE__ */ e.jsx(L, {})
22
+ } = g(L), [n, j] = z(B), c = T(() => n ? {
23
+ title: /* @__PURE__ */ t.jsx(f, { id: "HMDSro" }),
24
+ icon: /* @__PURE__ */ t.jsx(h, {})
25
25
  } : {
26
- title: /* @__PURE__ */ e.jsx(d, { id: "sgaIOj" }),
27
- icon: /* @__PURE__ */ e.jsx(T, {})
28
- }, [s]), E = (t) => {
29
- o.isEnabled || k.error(b(
30
- /*i18n*/
31
- {
32
- id: "3xBuJn"
33
- }
34
- ));
35
- const n = y(t.target, "bitzTableBlock");
36
- s ? o.exit() : o.request(n);
26
+ title: /* @__PURE__ */ t.jsx(f, { id: "sgaIOj" }),
27
+ icon: /* @__PURE__ */ t.jsx(k, {})
28
+ }, [n]), E = (o) => {
29
+ if (!r.isEnabled)
30
+ return S.error(p(
31
+ /*i18n*/
32
+ {
33
+ id: "3xBuJn"
34
+ }
35
+ ));
36
+ const s = v(o.target, "bitzTableBlock");
37
+ n ? r.exit() : r.request(s), j(!n);
37
38
  };
38
- return F(() => {
39
- const t = "bz-fullscreen", n = (i) => {
40
- var c, u;
41
- ((c = i.target) != null && c.classList.contains("bitzTableBlock") || (u = i.target) != null && u.classList.contains(t)) && setTimeout(() => {
42
- var m, a, f;
43
- l(!!document.fullscreenElement), (a = (m = document.fullscreenElement) == null ? void 0 : m.classList) != null && a.contains("bitzTableBlock") || (f = document.fullscreenElement) != null && f.classList.contains(t) || l(!1);
39
+ return C(() => {
40
+ const o = "bz-fullscreen", s = (i) => {
41
+ var u, m;
42
+ ((u = i.target) != null && u.classList.contains("bitzTableBlock") || (m = i.target) != null && m.classList.contains(o)) && setTimeout(() => {
43
+ var a;
44
+ l(!!document.fullscreenElement);
45
+ const e = (a = document.fullscreenElement) == null ? void 0 : a.classList;
46
+ e != null && e.contains("bitzTableBlock") || e != null && e.contains(o) || l(!1);
44
47
  }, 300);
45
48
  };
46
- return document == null || document.addEventListener("fullscreenchange", n), () => document == null ? void 0 : document.removeEventListener("fullscreenchange", n);
47
- }, []), p ? /* @__PURE__ */ e.jsx(h, { type: "text", className: B, onClick: E, icon: r.icon, style: {
48
- order: x
49
- }, children: r.title }) : null;
50
- }, R = j(N);
49
+ return document == null || document.addEventListener("fullscreenchange", s), () => document == null ? void 0 : document.removeEventListener("fullscreenchange", s);
50
+ }, []), x ? /* @__PURE__ */ t.jsx(I, { type: "text", className: b, onClick: E, icon: c.icon, style: {
51
+ order: d
52
+ }, children: c.title }) : null;
53
+ }, w = F(O);
51
54
  export {
52
- R as default
55
+ w as default
53
56
  };
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../_virtual/index6.mjs";
1
+ import { __module as e } from "../../_virtual/index5.mjs";
2
2
  import "./build/Resizable.mjs";
3
3
  import "./build/ResizableBox.mjs";
4
4
  import { __exports as r } from "../../_virtual/Resizable.mjs";
@@ -1,4 +1,4 @@
1
- import { __module as r } from "../../../_virtual/index5.mjs";
1
+ import { __module as r } from "../../../_virtual/index6.mjs";
2
2
  import { __require as i } from "../cjs/use-sync-external-store-shim.production.min.mjs";
3
3
  import { __require as o } from "../cjs/use-sync-external-store-shim.development.mjs";
4
4
  var e;