bitz-react-admin-ui 2.0.1 → 2.0.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.
Files changed (29) 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/BitzConfigProvider/context.d.ts +6 -3
  5. package/dist/components/BitzConfigProvider/index.mjs +22 -9
  6. package/dist/components/BitzDayJs/index.mjs +1 -1
  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.d.ts +9 -9
  16. package/dist/components/BitzTable/Store/index.mjs +126 -148
  17. package/dist/components/BitzTable/Table/index.d.ts +1 -1
  18. package/dist/components/BitzTable/Table/index.mjs +30 -24
  19. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +53 -51
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +67 -65
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.d.ts +4 -3
  22. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +17 -17
  23. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +32 -32
  24. package/dist/components/BitzTable/ToolBar/index.mjs +4 -4
  25. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  26. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  27. package/dist/style.css +1 -1
  28. package/dist/utils/time.mjs +1 -1
  29. package/package.json +1 -1
@@ -19,7 +19,7 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
19
19
  /** PC端:BitzTable组件的整体高度,由外部通过视口高度减去其他元素高度和间隙的结果 */
20
20
  height?: number;
21
21
  /** table可滚动区域的最大宽高的值 */
22
- scroll: {
22
+ scroll?: {
23
23
  x?: number;
24
24
  y?: number;
25
25
  };
@@ -45,7 +45,7 @@ function Lt({
45
45
  mobileRefreshEmit: ne,
46
46
  operationFilter: A,
47
47
  enableControlPage: Se,
48
- pagination: f,
48
+ pagination: m,
49
49
  paginationEmit: R = () => {
50
50
  },
51
51
  mobilePageHeight: Mt = 500,
@@ -58,7 +58,7 @@ function Lt({
58
58
  tableAction: De,
59
59
  tableToolbar: Pe,
60
60
  selectionBar: Ee,
61
- scroll: m,
61
+ scroll: u,
62
62
  components: K,
63
63
  expandable: b,
64
64
  rowSelection: z,
@@ -66,12 +66,12 @@ function Lt({
66
66
  ...i
67
67
  }) {
68
68
  var Be, ze;
69
- const { token: x } = Bt.useToken(), { Table: c } = x, { tableSpaceBetweenPage: le = 10 } = c, { gap: Ae } = wt(), { stylesConfig: w, ...M } = J(Ct), ce = (Be = J(zt).Table) == null ? void 0 : Be.rowHoverable, [k, ie] = P(!1), $ = T(void 0), V = T(0), O = T(0), [Ke, I] = P(!1), [h, $e] = P([]);
69
+ const { token: x } = Bt.useToken(), { Table: c } = x, { tableSpaceBetweenPage: le = 10 } = c, { gap: Ae } = wt(), { stylesConfig: w, ...M } = J(Ct), ce = (Be = J(zt).Table) == null ? void 0 : Be.rowHoverable, [k, ie] = P(!1), $ = T(void 0), V = T(0), O = T(0), [Ke, I] = P(!1), [f, $e] = P([]);
70
70
  Q(() => {
71
71
  let e = [...d];
72
- (f == null ? void 0 : f.page) !== 1 && (e = [...h, ...e]), $e(e);
72
+ (m == null ? void 0 : m.page) !== 1 && (e = [...f, ...e]), $e(e);
73
73
  }, [d]);
74
- const Ve = l(() => !!(h != null && h.length) && (h == null ? void 0 : h.length) >= E, [h, E]), [Oe, Ie] = P([]), _e = (e, t) => {
74
+ const Ve = l(() => !!(f != null && f.length) && (f == null ? void 0 : f.length) >= E, [f, E]), [Oe, Ie] = P([]), _e = (e, t) => {
75
75
  var n;
76
76
  const r = (n = A == null ? void 0 : A(e, t)) == null ? void 0 : n.filter(
77
77
  (s) => s.type !== "divider"
@@ -101,24 +101,27 @@ function Lt({
101
101
  }), t.length)
102
102
  return Math.ceil(Math.max(...t)) + Ae * 2;
103
103
  }, he = () => {
104
- var u, C, j;
105
- const e = (u = g.current) == null ? void 0 : u.querySelector(
104
+ var h, C, j;
105
+ const e = (h = g.current) == null ? void 0 : h.querySelector(
106
106
  ".ant-table-body"
107
107
  ), t = e == null ? void 0 : e.clientWidth, n = ((e == null ? void 0 : e.offsetWidth) || 0) - t > 0, s = (j = (C = g.current) == null ? void 0 : C.querySelector(
108
108
  ".ant-table-cell-scrollbar"
109
109
  )) == null ? void 0 : j.offsetWidth;
110
110
  return { tbodyWidth: t, scrollbarSize: s, hasScrollBar: n };
111
111
  }, { y: F, hasScrollBar: fe, scrollbarSize: G } = l(() => {
112
- if (typeof L > "u")
113
- return {};
114
112
  const { hasScrollBar: e, scrollbarSize: t } = he();
113
+ if (typeof L > "u")
114
+ return {
115
+ hasScrollBar: e,
116
+ scrollbarSize: t
117
+ };
115
118
  let r = 40, n = 40;
116
119
  if (g.current) {
117
120
  const D = window.getComputedStyle(g.current);
118
121
  r = parseInt(D.getPropertyValue("--cell-height")), n = parseInt(D.getPropertyValue("--toolbar-height"));
119
122
  }
120
- const s = (p == null ? void 0 : p.height) || 0, u = s ? le : 0;
121
- return { y: (k ? window.innerHeight : L) - s - u - n - r, hasScrollBar: e, scrollbarSize: t };
123
+ const s = (p == null ? void 0 : p.height) || 0, h = s ? le : 0;
124
+ return { y: (k ? window.innerHeight : L) - s - h - n - r, hasScrollBar: e, scrollbarSize: t };
122
125
  }, [
123
126
  k,
124
127
  L,
@@ -126,19 +129,19 @@ function Lt({
126
129
  _ == null ? void 0 : _.height,
127
130
  q == null ? void 0 : q.height
128
131
  ]), me = l(() => {
129
- let e = m.x ?? 1e3;
130
- return V.current && (e -= V.current), O.current && (e -= O.current * ($.current || 0)), m != null && m.x ? { x: e, y: m.y || F } : m != null && m.y ? { x: e, y: m.y } : { x: e, y: F };
131
- }, [m, F, $.current]), Ge = (e) => {
132
+ let e = (u == null ? void 0 : u.x) ?? 1e3;
133
+ return V.current && (e -= V.current), O.current && (e -= O.current * ($.current || 0)), u != null && u.x ? { x: e, y: u.y || F } : u != null && u.y ? { x: e, y: u.y } : { x: e, y: F };
134
+ }, [u, F, $.current]), Ge = (e) => {
132
135
  const t = e.length, r = e.filter((B) => B.width), s = r.map((B) => B.width).reduce((B, X) => B + X, 0);
133
- let u = 0;
136
+ let h = 0;
134
137
  if (g.current) {
135
138
  const B = window.getComputedStyle(g.current), X = parseInt(
136
139
  B.getPropertyValue("--toolCell-paddingInline")
137
140
  );
138
- u = parseInt(B.getPropertyValue("--fontSize")) + 4 + 2 * X;
141
+ h = parseInt(B.getPropertyValue("--fontSize")) + 4 + 2 * X;
139
142
  }
140
143
  let C = 0;
141
- z && (C += u), b && (C += u);
144
+ z && (C += h), b && (C += h);
142
145
  const { tbodyWidth: j } = he(), y = parseInt(`${me.x}`) || 0, D = Math.max(y, j), ve = (parseInt(`${D}`) || 0) - s - C;
143
146
  return ve >= 0 ? ve / (t - r.length) : void 0;
144
147
  }, v = l(() => {
@@ -147,12 +150,12 @@ function Lt({
147
150
  M.columnsMap
148
151
  );
149
152
  V.current = Math.ceil(n), O.current = s;
150
- const u = r.sort(xt(M.columnsMap));
153
+ const h = r.sort(xt(M.columnsMap));
151
154
  if (Y)
152
- return u;
153
- const C = Ge(u);
155
+ return h;
156
+ const C = Ge(h);
154
157
  $.current = Math.ceil(C ?? 0);
155
- const j = u.map((y) => ({
158
+ const j = h.map((y) => ({
156
159
  ...y,
157
160
  ...y.width ? {
158
161
  width: y.useMaxWidth ? Fe() ?? y.width : y.width
@@ -261,7 +264,10 @@ function Lt({
261
264
  ft,
262
265
  {
263
266
  finished: Ve,
264
- onLoad: async () => !a && (R == null ? void 0 : R((f == null ? void 0 : f.page) + 1, f == null ? void 0 : f.size)),
267
+ onLoad: async () => (
268
+ // @ts-ignore
269
+ !a && (R == null ? void 0 : R((m == null ? void 0 : m.page) + 1, m == null ? void 0 : m.size))
270
+ ),
265
271
  loadingText: "加载中...",
266
272
  finishedText: "没有更多了",
267
273
  errorText: "加载失败",
@@ -271,7 +277,7 @@ function Lt({
271
277
  className: "mobileList",
272
278
  style: { backgroundColor: c == null ? void 0 : c.mobileListBgColor },
273
279
  children: [
274
- h == null ? void 0 : h.map((e, t) => /* @__PURE__ */ o.jsx(
280
+ f == null ? void 0 : f.map((e, t) => /* @__PURE__ */ o.jsx(
275
281
  "div",
276
282
  {
277
283
  className: "listItem",
@@ -378,7 +384,7 @@ function Lt({
378
384
  size: "small",
379
385
  elRefInstance: ue,
380
386
  enableControl: Se,
381
- pagination: f,
387
+ pagination: m,
382
388
  total: E,
383
389
  dataSource: d,
384
390
  resetPage: He,
@@ -1,53 +1,55 @@
1
1
  import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { create as D, useModal as O, antdModalV5 as W } from "@ebay/nice-modal-react";
3
- import { Modal as q, Typography as A, Card as G, Segmented as I, Flex as J } from "antd";
4
- import { useState as f, useContext as P, useRef as K, useMemo as Q } from "react";
5
- import { BitzTableContext as U } from "../../Store/index.mjs";
6
- import M from "../../../BitzButton/index.mjs";
7
- import X from "../../../BitzTheme/index.mjs";
8
- import Y from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
9
- import Z from "./StylesConfig/index.mjs";
10
- import _ from "./ColumnsSort/index.mjs";
11
- import $ from "./ExportConfig/index.mjs";
12
- import { styles as ee } from "./style.mjs";
13
- import te from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
14
- const ge = D(
15
- ({ title: B, onChange: o, getContainer: R }) => {
16
- const { token: r } = X.useToken(), s = O(), [l, T] = f(1), [z, u] = f(!1);
17
- f(!1);
2
+ import { create as q, useModal as A, antdModalV5 as G } from "@ebay/nice-modal-react";
3
+ import { Modal as I, Typography as J, Card as P, Segmented as Q, Flex as U } from "antd";
4
+ import { useState as p, useContext as K, useRef as M, useMemo as X } from "react";
5
+ import { BitzTableContext as Y } from "../../Store/index.mjs";
6
+ import T from "../../../BitzButton/index.mjs";
7
+ import Z from "../../../BitzTheme/index.mjs";
8
+ import _ from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
9
+ import $ from "./StylesConfig/index.mjs";
10
+ import ee from "./ColumnsSort/index.mjs";
11
+ import te from "./ExportConfig/index.mjs";
12
+ import { styles as oe } from "./style.mjs";
13
+ import { BitzConfigContext as re } from "../../../BitzConfigProvider/context.mjs";
14
+ import se from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
15
+ import le from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
16
+ const he = q(
17
+ ({ title: z, onChange: o, getContainer: R }) => {
18
+ const { token: r } = Z.useToken(), s = A(), [l, N] = p(1), [V, y] = p(!1);
19
+ p(!1);
18
20
  const {
19
- persistenceType: N,
20
- persistenceKey: p,
21
+ persistenceType: w,
22
+ persistenceKey: g,
21
23
  onlineChange: i,
22
- setColumnsMap: V,
23
- setSortKeyColumns: w,
24
- stylesStorageType: H,
25
- stylesStorageKey: g,
24
+ setColumnsMap: H,
25
+ setSortKeyColumns: L,
26
+ stylesStorageType: E,
27
+ stylesStorageKey: C,
26
28
  setTableStylesConfig: a,
27
29
  onlineStylesConfigChange: m
28
30
  // clearPersistenceStorage,
29
- } = P(U), t = K(null), y = K(null), L = async () => {
30
- var x, j, S, h, b, k, v, F;
31
- const c = (x = y.current) == null ? void 0 : x.getFormInstance(), C = await (c == null ? void 0 : c.getFieldsValue()), d = {
31
+ } = K(Y), c = K(re).Table, t = M(null), x = M(null), D = async () => {
32
+ var S, j, h, b, k, v, B, F;
33
+ const d = (S = x.current) == null ? void 0 : S.getFormInstance(), f = await (d == null ? void 0 : d.getFieldsValue()), O = le(f, "stylesScope"), u = {
32
34
  ...(j = t.current) == null ? void 0 : j.getLeftSortColumns(),
33
- ...(S = t.current) == null ? void 0 : S.getCenterSortColumns(),
34
- ...(h = t.current) == null ? void 0 : h.getRightSortColumns()
35
- }, E = [
36
- ...(b = t.current) == null ? void 0 : b.getLeftSortKeys(),
37
- ...(k = t.current) == null ? void 0 : k.getCenterSortKeys(),
38
- ...(v = t.current) == null ? void 0 : v.getRightSortKeys()
35
+ ...(h = t.current) == null ? void 0 : h.getCenterSortColumns(),
36
+ ...(b = t.current) == null ? void 0 : b.getRightSortColumns()
37
+ }, W = [
38
+ ...(k = t.current) == null ? void 0 : k.getLeftSortKeys(),
39
+ ...(v = t.current) == null ? void 0 : v.getCenterSortKeys(),
40
+ ...(B = t.current) == null ? void 0 : B.getRightSortKeys()
39
41
  ];
40
- a == null || a(C), V(d), w(E), H === "online" && g && (m == null || m(g, C)), N === "online" && p && (i == null || i(p, d)), o ? (u(!0), (F = o == null ? void 0 : o(d)) == null || F.finally(() => {
41
- u(!1), s.hide();
42
+ a == null || a(O), c == null || c.setStylesScope(f.stylesScope ? "global" : "current"), H(u), L(W), E === "online" && C && (m == null || m(C, f)), w === "online" && g && (i == null || i(g, u)), o ? (y(!0), (F = o == null ? void 0 : o(u)) == null || F.finally(() => {
43
+ y(!1), s.hide();
42
44
  })) : s.hide();
43
- }, n = Q(() => r.mode === "dark", [r.mode]);
45
+ }, n = X(() => r.mode === "dark", [r.mode]);
44
46
  return /* @__PURE__ */ e.jsx(
45
- q,
47
+ I,
46
48
  {
47
- className: Y(ee(r), "tableConfigModal"),
48
- title: /* @__PURE__ */ e.jsx(A.Title, { style: { fontSize: 16, margin: 0 }, children: B }),
49
+ className: _(oe(r), "tableConfigModal"),
50
+ title: /* @__PURE__ */ e.jsx(J.Title, { style: { fontSize: 16, margin: 0 }, children: z }),
49
51
  getContainer: R,
50
- ...W(s),
52
+ ...G(s),
51
53
  style: {
52
54
  "--sortCard-bgColor": n ? "#444" : "#f2f2f2",
53
55
  "--sortCard-titleColor": n ? "#ccc" : "#777",
@@ -58,20 +60,20 @@ const ge = D(
58
60
  width: 700,
59
61
  footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
60
62
  /* @__PURE__ */ e.jsx(
61
- M,
63
+ T,
62
64
  {
63
65
  type: "primary",
64
- icon: /* @__PURE__ */ e.jsx(te, {}),
65
- onClick: L,
66
- loading: z,
66
+ icon: /* @__PURE__ */ e.jsx(se, {}),
67
+ onClick: D,
68
+ loading: V,
67
69
  children: "保存"
68
70
  }
69
71
  ),
70
- /* @__PURE__ */ e.jsx(M, { onClick: () => s.hide(), children: "取消" })
72
+ /* @__PURE__ */ e.jsx(T, { onClick: () => s.hide(), children: "取消" })
71
73
  ] }),
72
- children: /* @__PURE__ */ e.jsxs(G, { className: "container", bordered: !1, children: [
74
+ children: /* @__PURE__ */ e.jsxs(P, { className: "container", bordered: !1, children: [
73
75
  /* @__PURE__ */ e.jsx("div", { className: "segmentedWrapper", children: /* @__PURE__ */ e.jsx(
74
- I,
76
+ Q,
75
77
  {
76
78
  size: "large",
77
79
  options: [
@@ -80,13 +82,13 @@ const ge = D(
80
82
  { label: "导出设置", value: 3 }
81
83
  ],
82
84
  value: l,
83
- onChange: T
85
+ onChange: N
84
86
  }
85
87
  ) }),
86
- /* @__PURE__ */ e.jsxs(J, { className: "containerBody", children: [
87
- /* @__PURE__ */ e.jsx(Z, { ref: y, display: l === 1 }),
88
- /* @__PURE__ */ e.jsx(_, { ref: t, display: l === 2 }),
89
- /* @__PURE__ */ e.jsx($, { display: l === 3 })
88
+ /* @__PURE__ */ e.jsxs(U, { className: "containerBody", children: [
89
+ /* @__PURE__ */ e.jsx($, { ref: x, display: l === 1 }),
90
+ /* @__PURE__ */ e.jsx(ee, { ref: t, display: l === 2 }),
91
+ /* @__PURE__ */ e.jsx(te, { display: l === 3 })
90
92
  ] })
91
93
  ] })
92
94
  }
@@ -94,5 +96,5 @@ const ge = D(
94
96
  }
95
97
  );
96
98
  export {
97
- ge as default
99
+ he as default
98
100
  };
@@ -1,16 +1,16 @@
1
1
  import { j as o } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import "../../../../../assets/iconfont/IconMore.mjs";
3
3
  import "../../../../../assets/iconfont/IconIcFluentHomeRegular.mjs";
4
- import b from "../../../../../assets/iconfont/IconKuansongde.mjs";
5
- import j from "../../../../../assets/iconfont/IconTekuansong.mjs";
6
- import g from "../../../../../assets/iconfont/IconJincoude.mjs";
7
- import I from "../../../../../assets/iconfont/IconZhongdengde.mjs";
8
- import P from "../../../../../assets/iconfont/IconTejincou.mjs";
9
- import z from "../../../../../assets/iconfont/IconWufengexian.mjs";
10
- import v from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
11
- import H from "../../../../../assets/iconfont/IconHangfengexian.mjs";
12
- import k from "../../../../../assets/iconfont/IconLiefengexian.mjs";
13
- import C from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
4
+ import j from "../../../../../assets/iconfont/IconKuansongde.mjs";
5
+ import g from "../../../../../assets/iconfont/IconTekuansong.mjs";
6
+ import I from "../../../../../assets/iconfont/IconJincoude.mjs";
7
+ import P from "../../../../../assets/iconfont/IconZhongdengde.mjs";
8
+ import z from "../../../../../assets/iconfont/IconTejincou.mjs";
9
+ import v from "../../../../../assets/iconfont/IconWufengexian.mjs";
10
+ import H from "../../../../../assets/iconfont/IconHangliefengexian.mjs";
11
+ import k from "../../../../../assets/iconfont/IconHangfengexian.mjs";
12
+ import C from "../../../../../assets/iconfont/IconLiefengexian.mjs";
13
+ import S from "../../../../../assets/iconfont/IconYoubanmawentianchong.mjs";
14
14
  import w from "../../../../../assets/iconfont/IconWubanmawentianchong.mjs";
15
15
  import "../../../../../assets/iconfont/IconZhongzhi.mjs";
16
16
  import "../../../../../assets/iconfont/IconGaojisousuo.mjs";
@@ -28,131 +28,133 @@ import "../../../../../assets/iconfont/IconFabu.mjs";
28
28
  import "../../../../../assets/iconfont/IconShanchu1.mjs";
29
29
  import "../../../../../assets/iconfont/IconShanchu.mjs";
30
30
  import "../../../../../assets/iconfont/IconTuodong.mjs";
31
- import { BitzTableContext as s } from "../../../Store/index.mjs";
32
- import R from "../../../../BitzTheme/index.mjs";
33
- import { Form as i, Radio as t, Checkbox as G } from "antd";
34
- import { forwardRef as N, useMemo as T, useContext as c, useEffect as F, useImperativeHandle as S } from "react";
35
- import e from "./RadioCard.mjs";
36
- const B = ({ defaultSize: l, items: m }) => m.map((r) => r.key === l ? {
37
- ...r,
38
- label: `${r.label}(默认)`
39
- } : r), bo = N(
40
- ({ display: l }, m) => {
41
- const { token: r } = R.useToken(), p = T(() => ({
31
+ import { BitzConfigContext as R } from "../../../../BitzConfigProvider/context.mjs";
32
+ import { BitzTableContext as T } from "../../../Store/index.mjs";
33
+ import G from "../../../../BitzTheme/index.mjs";
34
+ import { Form as l, Radio as t, Checkbox as N } from "antd";
35
+ import { forwardRef as F, useMemo as B, useContext as p, useEffect as W, useImperativeHandle as E } from "react";
36
+ import r from "./RadioCard.mjs";
37
+ const A = ({ defaultSize: i, items: m }) => m.map((e) => e.key === i ? {
38
+ ...e,
39
+ label: `${e.label}(默认)`
40
+ } : e), Po = F(
41
+ ({ display: i }, m) => {
42
+ var c;
43
+ const { token: e } = G.useToken(), u = B(() => ({
42
44
  width: "100%",
43
- ...{ display: l ? "flex" : "none" }
44
- }), [l]), u = {
45
+ ...{ display: i ? "flex" : "none" }
46
+ }), [i]), d = {
45
47
  size: 26,
46
- color: r.colorPrimary
47
- }, [n] = i.useForm(), d = c(s).stylesConfig;
48
- F(() => {
49
- n.setFieldsValue(d);
48
+ color: e.colorPrimary
49
+ }, [n] = l.useForm(), s = (c = p(R).Table) == null ? void 0 : c.stylesScope, { defaultTableSize: f, stylesConfig: x } = p(T);
50
+ console.log("stylesScope", s), W(() => {
51
+ n.setFieldsValue({ ...x, stylesScope: s === "global" });
50
52
  }, []);
51
- const { defaultTableSize: f } = c(s), x = B({
53
+ const y = A({
52
54
  defaultSize: f,
53
55
  items: [
54
56
  {
55
57
  key: "xs",
56
58
  label: "特紧凑",
57
- icon: P
59
+ icon: z
58
60
  },
59
61
  {
60
62
  key: "sm",
61
63
  label: "紧凑",
62
- icon: g
64
+ icon: I
63
65
  },
64
66
  {
65
67
  key: "md",
66
68
  label: "中等",
67
- icon: I
69
+ icon: P
68
70
  },
69
71
  {
70
72
  key: "lg",
71
73
  label: "宽松",
72
- icon: b
74
+ icon: j
73
75
  },
74
76
  {
75
77
  key: "xl",
76
78
  label: "特宽松",
77
- icon: j
79
+ icon: g
78
80
  }
79
81
  ]
80
82
  });
81
- return S(m, () => ({
83
+ return E(m, () => ({
82
84
  getFormInstance: () => n
83
85
  })), /* @__PURE__ */ o.jsxs(
84
- i,
86
+ l,
85
87
  {
86
88
  form: n,
87
- style: p,
89
+ style: u,
88
90
  labelCol: { span: 3 },
89
91
  labelAlign: "left",
90
92
  colon: !1,
91
93
  className: "appearanceFormContent",
92
94
  layout: "inline",
93
95
  children: [
94
- /* @__PURE__ */ o.jsx(i.Item, { label: "行高", name: "size", children: /* @__PURE__ */ o.jsx(t.Group, { className: "sizeRadioGroup", children: x.map(({ key: a, label: y, icon: h }) => /* @__PURE__ */ o.jsx(e, { label: y, value: a, children: /* @__PURE__ */ o.jsx(h, { ...u }) }, a)) }) }),
95
- /* @__PURE__ */ o.jsx(i.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ o.jsxs(t.Group, { className: "splitBorderRadioGroup", children: [
96
- /* @__PURE__ */ o.jsx(e, { label: "无分割线", value: "hide", children: /* @__PURE__ */ o.jsx(z, { size: 26, color: r.colorPrimaryHover }) }),
97
- /* @__PURE__ */ o.jsx(e, { label: "行分割线", value: "row", children: /* @__PURE__ */ o.jsx(
98
- H,
96
+ /* @__PURE__ */ o.jsx(l.Item, { label: "行高", name: "size", children: /* @__PURE__ */ o.jsx(t.Group, { className: "sizeRadioGroup", children: y.map(({ key: a, label: b, icon: h }) => /* @__PURE__ */ o.jsx(r, { label: b, value: a, children: /* @__PURE__ */ o.jsx(h, { ...d }) }, a)) }) }),
97
+ /* @__PURE__ */ o.jsx(l.Item, { label: "分割线", name: "bordered", children: /* @__PURE__ */ o.jsxs(t.Group, { className: "splitBorderRadioGroup", children: [
98
+ /* @__PURE__ */ o.jsx(r, { label: "无分割线", value: "hide", children: /* @__PURE__ */ o.jsx(v, { size: 26, color: e.colorPrimaryHover }) }),
99
+ /* @__PURE__ */ o.jsx(r, { label: "行分割线", value: "row", children: /* @__PURE__ */ o.jsx(
100
+ k,
99
101
  {
100
102
  size: 26,
101
103
  color: [
102
- r.colorPrimaryHover,
103
- r.colorPrimary,
104
- r.colorPrimary,
105
- r.colorPrimaryHover
104
+ e.colorPrimaryHover,
105
+ e.colorPrimary,
106
+ e.colorPrimary,
107
+ e.colorPrimaryHover
106
108
  ]
107
109
  }
108
110
  ) }),
109
- /* @__PURE__ */ o.jsx(e, { label: "列分割线", value: "column", children: /* @__PURE__ */ o.jsx(
110
- k,
111
+ /* @__PURE__ */ o.jsx(r, { label: "列分割线", value: "column", children: /* @__PURE__ */ o.jsx(
112
+ C,
111
113
  {
112
114
  size: 26,
113
115
  color: [
114
- r.colorPrimaryHover,
115
- r.colorPrimary,
116
- r.colorPrimary,
117
- r.colorPrimaryHover
116
+ e.colorPrimaryHover,
117
+ e.colorPrimary,
118
+ e.colorPrimary,
119
+ e.colorPrimaryHover
118
120
  ]
119
121
  }
120
122
  ) }),
121
- /* @__PURE__ */ o.jsx(e, { label: "行列分割线", value: "row-column", children: /* @__PURE__ */ o.jsx(
122
- v,
123
+ /* @__PURE__ */ o.jsx(r, { label: "行列分割线", value: "row-column", children: /* @__PURE__ */ o.jsx(
124
+ H,
123
125
  {
124
126
  size: 26,
125
127
  color: [
126
- r.colorPrimaryHover,
127
- r.colorPrimary,
128
- r.colorPrimary,
129
- r.colorPrimaryHover
128
+ e.colorPrimaryHover,
129
+ e.colorPrimary,
130
+ e.colorPrimary,
131
+ e.colorPrimaryHover
130
132
  ]
131
133
  }
132
134
  ) })
133
135
  ] }) }),
134
- /* @__PURE__ */ o.jsx(i.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ o.jsxs(t.Group, { className: "zebraRadioGroup", children: [
135
- /* @__PURE__ */ o.jsx(e, { label: "有斑马纹", value: !0, children: /* @__PURE__ */ o.jsx(
136
- C,
136
+ /* @__PURE__ */ o.jsx(l.Item, { label: "斑马纹", name: "zebra", children: /* @__PURE__ */ o.jsxs(t.Group, { className: "zebraRadioGroup", children: [
137
+ /* @__PURE__ */ o.jsx(r, { label: "有斑马纹", value: !0, children: /* @__PURE__ */ o.jsx(
138
+ S,
137
139
  {
138
140
  size: 26,
139
- color: [r.colorPrimaryHover, r.colorPrimary]
141
+ color: [e.colorPrimaryHover, e.colorPrimary]
140
142
  }
141
143
  ) }),
142
- /* @__PURE__ */ o.jsx(e, { label: "无斑马纹", value: !1, children: /* @__PURE__ */ o.jsx(
144
+ /* @__PURE__ */ o.jsx(r, { label: "无斑马纹", value: !1, children: /* @__PURE__ */ o.jsx(
143
145
  w,
144
146
  {
145
147
  size: 26,
146
- color: r.colorPrimaryHover
148
+ color: e.colorPrimaryHover
147
149
  }
148
150
  ) })
149
151
  ] }) }),
150
- /* @__PURE__ */ o.jsx(i.Item, { name: "scope", valuePropName: "checked", className: "scope", children: /* @__PURE__ */ o.jsx(G, { children: "应用到全局表格" }) })
152
+ /* @__PURE__ */ o.jsx(l.Item, { name: "stylesScope", valuePropName: "checked", className: "scope", children: /* @__PURE__ */ o.jsx(N, { children: "应用到全局表格" }) })
151
153
  ]
152
154
  }
153
155
  );
154
156
  }
155
157
  );
156
158
  export {
157
- bo as default
159
+ Po as default
158
160
  };
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  import { BitzTableToolBarProps } from '..';
3
- interface ColumnSettingProps {
3
+ interface ColumnsConfigProps {
4
4
  order?: number;
5
5
  show?: boolean;
6
6
  icon?: React.ReactNode;
7
7
  onChange?: BitzTableToolBarProps['onColumnChange'];
8
8
  }
9
- declare const _default: React.MemoExoticComponent<(props: ColumnSettingProps) => import("react/jsx-runtime").JSX.Element | null>;
10
- export default _default;
9
+ /** 表格头部右侧列配置icon按钮 */
10
+ declare const ColumnsConfig: (props: ColumnsConfigProps) => import("react/jsx-runtime").JSX.Element | null;
11
+ export default ColumnsConfig;
@@ -1,21 +1,21 @@
1
1
  import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import g, { useContext as x, useState as h, useMemo as j, useEffect as b } from "react";
3
- import { Tooltip as E } from "antd";
4
- import { show as B } from "@ebay/nice-modal-react";
5
- import p from "./ColumnConfigModal.mjs";
6
- import v from "../style.mjs";
7
- import y from "../../../BitzButton/index.mjs";
8
- import { BitzTableContext as z } from "../../Store/index.mjs";
9
- import L from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
10
- const s = "表格设置", M = (n) => {
11
- const { order: a, show: u = !0, icon: f = /* @__PURE__ */ e.jsx(L, {}) } = n, { toolbarItemClassName: d } = v(), { uuid: l } = x(z), [i, r] = h(!1), C = j(() => i ? !1 : void 0, [i]);
12
- return b(() => (document == null || document.addEventListener("fullscreenchange", (o) => {
2
+ import { 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 B from "./ColumnConfigModal.mjs";
6
+ import p from "../style.mjs";
7
+ import v from "../../../BitzButton/index.mjs";
8
+ import { BitzTableContext as y } from "../../Store/index.mjs";
9
+ import z from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
10
+ const s = "表格设置", N = (n) => {
11
+ const { order: a, show: u = !0, icon: f = /* @__PURE__ */ e.jsx(z, {}) } = n, { toolbarItemClassName: d } = p(), { uuid: l } = g(y), [i, r] = x(!1), C = h(() => i ? !1 : void 0, [i]);
12
+ return j(() => (document == null || document.addEventListener("fullscreenchange", (o) => {
13
13
  var t, m, c;
14
14
  (t = o.target) != null && t.classList.contains("bitzTableBlock") && (r(!!document.fullscreenElement), (c = (m = document.fullscreenElement) == null ? void 0 : m.classList) != null && c.contains("bitzTableBlock") || r(!1));
15
15
  }), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
16
16
  })), []), u ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
17
17
  /* @__PURE__ */ e.jsx(
18
- p,
18
+ B,
19
19
  {
20
20
  id: `ColumnConfigModal-${l}`,
21
21
  title: s,
@@ -26,19 +26,19 @@ const s = "表格设置", M = (n) => {
26
26
  getContainer: C
27
27
  }
28
28
  ),
29
- /* @__PURE__ */ e.jsx(E, { title: s, open: !1, children: /* @__PURE__ */ e.jsx(
30
- y,
29
+ /* @__PURE__ */ e.jsx(b, { title: s, open: !1, children: /* @__PURE__ */ e.jsx(
30
+ v,
31
31
  {
32
32
  type: "text",
33
33
  className: d,
34
- onClick: () => B(`ColumnConfigModal-${l}`),
34
+ onClick: () => E(`ColumnConfigModal-${l}`),
35
35
  icon: f,
36
36
  style: { order: a },
37
37
  children: s
38
38
  }
39
39
  ) })
40
40
  ] }) : null;
41
- }, _ = g.memo(M);
41
+ };
42
42
  export {
43
- _ as default
43
+ N as default
44
44
  };