bitz-react-admin-ui 2.3.2 → 2.3.4

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 (37) hide show
  1. package/dist/_virtual/dayjs.min.mjs +5 -2
  2. package/dist/_virtual/dayjs.min2.mjs +4 -0
  3. package/dist/_virtual/index.mjs +2 -2
  4. package/dist/_virtual/index2.mjs +2 -2
  5. package/dist/components/BitzCalendar/index.mjs +1 -1
  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/CalendarBody.mjs +1 -1
  11. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +1 -1
  12. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  13. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  14. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  15. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  16. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  17. package/dist/components/BitzTable/ActionCol/index.mjs +1 -1
  18. package/dist/components/BitzTable/ActionCol/style.mjs +8 -7
  19. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +21 -18
  20. package/dist/components/BitzTable/Store/index.d.ts +4 -0
  21. package/dist/components/BitzTable/Store/index.mjs +73 -71
  22. package/dist/components/BitzTable/Table/SortTableContext.d.ts +3 -5
  23. package/dist/components/BitzTable/Table/SortTableContext.mjs +42 -19
  24. package/dist/components/BitzTable/Table/index.d.ts +1 -2
  25. package/dist/components/BitzTable/Table/index.mjs +193 -186
  26. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +19 -12
  27. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +43 -45
  28. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +46 -43
  29. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +1 -1
  30. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +50 -50
  31. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  32. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  33. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  34. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  35. package/dist/style.css +1 -1
  36. package/dist/utils/time.mjs +1 -1
  37. package/package.json +1 -1
@@ -1,4 +1,7 @@
1
- var a = { exports: {} };
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.mjs";
2
+ import { __require as o } from "../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
3
+ var t = o();
4
+ const s = /* @__PURE__ */ r(t);
2
5
  export {
3
- a as __module
6
+ s as default
4
7
  };
@@ -0,0 +1,4 @@
1
+ var a = { exports: {} };
2
+ export {
3
+ a as __module
4
+ };
@@ -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,7 +1,7 @@
1
1
  import { j as n } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { useRef as O, useEffect as R } from "react";
3
3
  import { Calendar as k, Select as a, Row as w, Col as y } from "antd";
4
- import N from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
4
+ import N from "../../_virtual/dayjs.min.mjs";
5
5
  import B from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/weekOfYear.mjs";
6
6
  import "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs";
7
7
  N.extend(B);
@@ -1,4 +1,4 @@
1
- import t from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
1
+ import t from "../../_virtual/dayjs.min.mjs";
2
2
  import "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs";
3
3
  const m = {
4
4
  dayjs() {
@@ -1,5 +1,5 @@
1
1
  import { create as a } from "../../node_modules/.store/zustand@4.5.2/node_modules/zustand/esm/index.mjs";
2
- import o from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
2
+ import o from "../../_virtual/dayjs.min.mjs";
3
3
  var d = /* @__PURE__ */ ((e) => (e.day = "day", e.workWeek = "workWeek", e.week = "week", e.agendum = "agendum", e))(d || {});
4
4
  const i = a((e, k) => ({
5
5
  colHeight: 0,
@@ -1,7 +1,7 @@
1
1
  import { j as d } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { useState as y, useEffect as g, useMemo as j } from "react";
3
3
  import D from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isToday.mjs";
4
- import n from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
4
+ import n from "../../_virtual/dayjs.min.mjs";
5
5
  import { useBitzFuiCalendarStore as M, CalendarTypeEnum as S } from "./BitzFuiCalendarStore.mjs";
6
6
  import C from "./CalendarAgendumItem.mjs";
7
7
  import x from "./CalendarAgendum.module.less.mjs";
@@ -1,7 +1,7 @@
1
1
  import { j as i } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { useMemo as c } from "react";
3
3
  import e from "./CalendarAgendum.module.less.mjs";
4
- import r from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
4
+ import r from "../../_virtual/dayjs.min.mjs";
5
5
  import { Button as a } from "antd";
6
6
  const d = (_, s) => {
7
7
  const t = s.diff(_, "minute");
@@ -2,7 +2,7 @@ import { j as a } from "../../node_modules/.store/react@18.2.0/node_modules/reac
2
2
  import { useState as _, useEffect as y, useMemo as f } from "react";
3
3
  import C from "./ColumnData.mjs";
4
4
  import { useBitzFuiCalendarStore as h, CalendarTypeEnum as o } from "./BitzFuiCalendarStore.mjs";
5
- import j from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
5
+ import j from "../../_virtual/dayjs.min.mjs";
6
6
  import x from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isoWeek.mjs";
7
7
  j.extend(x);
8
8
  const N = (n) => {
@@ -2,7 +2,7 @@ import { j as s } from "../../node_modules/.store/react@18.2.0/node_modules/reac
2
2
  import m from "./CalendarHeadItem.mjs";
3
3
  import { useMemo as d } from "react";
4
4
  import { useBitzFuiCalendarStore as u, CalendarTypeEnum as n } from "./BitzFuiCalendarStore.mjs";
5
- import f from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
5
+ import f from "../../_virtual/dayjs.min.mjs";
6
6
  import l from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isoWeek.mjs";
7
7
  f.extend(l);
8
8
  const x = () => {
@@ -1,6 +1,6 @@
1
1
  import { j as a } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { memo as m, useMemo as r } from "react";
3
- import d from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
3
+ import d from "../../_virtual/dayjs.min.mjs";
4
4
  import i from "../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
5
  const n = (t) => {
6
6
  const { time: e } = t, s = r(() => e.isSame(d(), "day"), [e]);
@@ -2,7 +2,7 @@ import { j as e } from "../../node_modules/.store/react@18.2.0/node_modules/reac
2
2
  import { memo as C, useMemo as i } from "react";
3
3
  import { Space as c, Button as s, DatePicker as b, Dropdown as h } from "antd";
4
4
  import { useBitzFuiCalendarStore as w, CalendarTypeEnum as a } from "./BitzFuiCalendarStore.mjs";
5
- import g from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
5
+ import g from "../../_virtual/dayjs.min.mjs";
6
6
  import T from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/AppstoreOutlined.mjs";
7
7
  import v from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/LeftOutlined.mjs";
8
8
  import _ from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RightOutlined.mjs";
@@ -4,7 +4,7 @@ import M from "./FuiCalendarItem.mjs";
4
4
  import E from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrAfter.mjs";
5
5
  import Y from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrBefore.mjs";
6
6
  import b from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/utc.mjs";
7
- import n from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
7
+ import n from "../../_virtual/dayjs.min.mjs";
8
8
  import { useBitzFuiCalendarStore as F } from "./BitzFuiCalendarStore.mjs";
9
9
  n.extend(b);
10
10
  n.extend(Y);
@@ -3,7 +3,7 @@ import { useState as w, useMemo as x, useEffect as E } from "react";
3
3
  import A from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/objectSupport.mjs";
4
4
  import H from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrAfter.mjs";
5
5
  import D from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/utc.mjs";
6
- import e from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
6
+ import e from "../../_virtual/dayjs.min.mjs";
7
7
  import "./index.less.mjs";
8
8
  e.extend(A);
9
9
  e.extend(H);
@@ -2,7 +2,7 @@ import { j as e } from "../../node_modules/.store/react@18.2.0/node_modules/reac
2
2
  import { useMemo as d } from "react";
3
3
  import p from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/objectSupport.mjs";
4
4
  import T from "./BitzMeetingTimeItem.mjs";
5
- import m from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
5
+ import m from "../../_virtual/dayjs.min.mjs";
6
6
  import "./index.less.mjs";
7
7
  m.extend(p);
8
8
  const x = (a) => {
@@ -91,7 +91,7 @@ function E({
91
91
  }
92
92
  function K(l) {
93
93
  var m;
94
- const { actionGroup: n, loading: c, ...d } = l, x = ((m = w.useToken().token.Table) == null ? void 0 : m.cellPaddingInline) ?? R, o = I(null), s = B(o), i = u(() => s != null && s.width ? s.width + x * 2 + 1 : 181, [s, x]);
94
+ const { actionGroup: n, loading: c, ...d } = l, x = ((m = w.useToken().token.Table) == null ? void 0 : m.cellPaddingInline) ?? R, o = I(null), s = B(o), i = u(() => s != null && s.width ? s.width + x * 2 + 1 : 141, [s, x]);
95
95
  return u(() => ({
96
96
  width: Math.floor(i),
97
97
  mobileHide: !0,
@@ -14,9 +14,9 @@ import { BitzTableContext as T } from "../Store/index.mjs";
14
14
  import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
15
15
  import E from "../../BitzTheme/index.mjs";
16
16
  const O = () => {
17
- const { tableSize: s } = z(T);
18
- H(() => s ?? "lg", [s]);
19
- const { theme: B, hashId: r, token: i } = E.useToken(), e = "actionTextBtn", a = "primaryBtn", l = "delBtn", c = "dropdownBtn", m = "skeletonBtn", p = "skeleton", d = "actionColMask", h = (t, o) => [
17
+ const { tableSize: i } = z(T);
18
+ H(() => i ?? "lg", [i]);
19
+ const { theme: B, hashId: r, token: s } = E.useToken(), e = "actionTextBtn", a = "primaryBtn", l = "delBtn", c = "dropdownBtn", m = "skeletonBtn", p = "skeleton", d = "actionColMask", h = (t, o) => [
20
20
  {
21
21
  [`.${t}`]: {
22
22
  fontSize: "inherit",
@@ -36,6 +36,7 @@ const O = () => {
36
36
  },
37
37
  {
38
38
  [`.${o}`]: {
39
+ cursor: "default",
39
40
  position: "absolute",
40
41
  insetBlock: -1,
41
42
  insetInline: 0,
@@ -101,15 +102,15 @@ const O = () => {
101
102
  N(
102
103
  {
103
104
  theme: B,
104
- token: i,
105
+ token: s,
105
106
  hashId: r,
106
107
  path: [e]
107
108
  },
108
109
  () => [
109
110
  h(e, d),
110
- u(a, i),
111
- g(l, i),
112
- C(c, i),
111
+ u(a, s),
112
+ g(l, s),
113
+ C(c, s),
113
114
  v(m, p)
114
115
  ]
115
116
  );
@@ -1,23 +1,26 @@
1
1
  import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { Space as c } from "antd";
3
- import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
4
- import { useContext as i, useMemo as p, useEffect as f } from "react";
5
- import { BitzTableContext as C } from "../Store/index.mjs";
6
- import u from "./style.mjs";
7
- const v = ({ show: e, children: s }) => {
8
- const {
9
- blockClassName: a,
10
- showCls: o,
11
- btnClassName: x,
12
- batchOperationClassName: r,
13
- alertContentClassName: N
14
- } = u(), { setSelected: m } = i(C), l = p(() => n(a, {
15
- [`${o}`]: e
16
- }), [e]);
17
- return f(() => {
18
- m(e ?? !1);
19
- }, [e]), /* @__PURE__ */ t.jsx("div", { className: l, children: /* @__PURE__ */ t.jsx(c.Compact, { className: r, children: s || /* @__PURE__ */ t.jsx("div", {}) }) });
3
+ import i from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
4
+ import { useContext as n, useMemo as p } from "react";
5
+ import { BitzTableContext as x } from "../Store/index.mjs";
6
+ import d from "./style.mjs";
7
+ const N = ({ children: o }) => {
8
+ const { blockClassName: r, showCls: a, batchOperationClassName: m } = d(), { selected: s, toolbarWidth: e } = n(x), l = p(() => i(r, {
9
+ [`${a}`]: s
10
+ }), [s]);
11
+ return /* @__PURE__ */ t.jsx("div", { className: l, children: /* @__PURE__ */ t.jsx(
12
+ c.Compact,
13
+ {
14
+ className: m,
15
+ style: {
16
+ ...e && {
17
+ width: `calc(100% - 50px - ${e}px)`
18
+ }
19
+ },
20
+ children: o || /* @__PURE__ */ t.jsx("div", {})
21
+ }
22
+ ) });
20
23
  };
21
24
  export {
22
- v as default
25
+ N as default
23
26
  };
@@ -101,6 +101,8 @@ declare function useContainer(props: UseContainerProps): {
101
101
  setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
102
102
  selected: boolean;
103
103
  setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
104
+ toolbarWidth: number;
105
+ setToolbarWidth: import("react").Dispatch<import("react").SetStateAction<number>>;
104
106
  columns: BitzTableColumnsType<any> | undefined;
105
107
  baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[];
106
108
  persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
@@ -138,6 +140,8 @@ declare const BitzTableContext: import("react").Context<{
138
140
  setFullscreen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
139
141
  selected: boolean;
140
142
  setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
143
+ toolbarWidth: number;
144
+ setToolbarWidth: import("react").Dispatch<import("react").SetStateAction<number>>;
141
145
  columns: BitzTableColumnsType<any> | undefined;
142
146
  baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[];
143
147
  persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
@@ -1,12 +1,12 @@
1
- import { j as Te } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Table as ce } from "antd";
1
+ import { j as Ke } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { Table as le } from "antd";
3
3
  import V from "../../../hooks/useMergedState.mjs";
4
- import { createContext as be, useRef as Ke, useState as le, useContext as Oe, useEffect as d, useMemo as g, useCallback as v } from "react";
5
- import { genColumnKey as z } from "./utils/index.mjs";
6
- import { getUuid as Ve } from "../../../utils/uuid.mjs";
7
- import { BitzConfigContext as ve } from "../../BitzConfigProvider/context.mjs";
4
+ import { createContext as Oe, useRef as Ve, useState as v, useContext as ve, useEffect as d, useMemo as g, useCallback as z } from "react";
5
+ import { genColumnKey as N } from "./utils/index.mjs";
6
+ import { getUuid as ze } from "../../../utils/uuid.mjs";
7
+ import { BitzConfigContext as Ne } from "../../BitzConfigProvider/context.mjs";
8
8
  import m from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
9
- const ze = {
9
+ const Ee = {
10
10
  fixed: "left",
11
11
  className: "sorterCol",
12
12
  isDragSorterCol: !0,
@@ -16,18 +16,18 @@ const ze = {
16
16
  onCell: () => ({
17
17
  "data-column-name": "dragSorterCell"
18
18
  })
19
- }, Ne = [
20
- ze,
21
- ce.SELECTION_COLUMN,
22
- ce.EXPAND_COLUMN
19
+ }, Ie = [
20
+ Ee,
21
+ le.SELECTION_COLUMN,
22
+ le.EXPAND_COLUMN
23
23
  ];
24
- function Ee(e) {
25
- var M, k, H, R, L, P, U, D, _, G, Z, A, F, X, q, Q, W, Y, $, p, ee, te, ne, ie, ae;
26
- const T = Ke(Ve()), [fe, re] = le(!1), [se, ue] = le(!1), s = Oe(ve).Table, de = s == null ? void 0 : s.defaultSize, N = e.size ?? e.defaultSize ?? de ?? "lg", ye = e.zebra ?? e.defaultZebra ?? (s == null ? void 0 : s.zebra) ?? !0, Se = e.bordered ?? e.defaultBordered ?? (s == null ? void 0 : s.bordered) ?? "row-column", K = e.defaultStylesConfig || {
27
- size: N,
28
- zebra: ye,
29
- bordered: Se
30
- }, [y, E] = V(
24
+ function Je(e) {
25
+ var k, H, R, L, P, U, D, _, G, W, Z, A, F, X, q, Q, Y, $, p, ee, te, ne, ie, ae, oe;
26
+ const T = Ve(ze()), [fe, re] = v(!1), [se, ue] = v(!1), [de, ye] = v(0), s = ve(Ne).Table, Se = s == null ? void 0 : s.defaultSize, E = e.size ?? e.defaultSize ?? Se ?? "lg", Ce = e.zebra ?? e.defaultZebra ?? (s == null ? void 0 : s.zebra) ?? !0, ge = e.bordered ?? e.defaultBordered ?? (s == null ? void 0 : s.bordered) ?? "row-column", K = e.defaultStylesConfig || {
27
+ size: E,
28
+ zebra: Ce,
29
+ bordered: ge
30
+ }, [y, I] = V(
31
31
  () => {
32
32
  var n, c, l, a;
33
33
  const { persistenceType: t, persistenceKey: i, onlineGet: o } = e.stylesConfigState || {};
@@ -47,8 +47,8 @@ function Ee(e) {
47
47
  return e.stylesConfig || ((l = e.stylesConfigState) == null ? void 0 : l.value) || ((a = e.stylesConfigState) == null ? void 0 : a.defaultValue) || K;
48
48
  },
49
49
  {
50
- value: ((M = e.stylesConfigState) == null ? void 0 : M.value) || e.stylesConfig,
51
- onChange: ((k = e.stylesConfigState) == null ? void 0 : k.onChange) || e.onStylesConfigChange
50
+ value: ((k = e.stylesConfigState) == null ? void 0 : k.value) || e.stylesConfig,
51
+ onChange: ((H = e.stylesConfigState) == null ? void 0 : H.onChange) || e.onStylesConfigChange
52
52
  }
53
53
  );
54
54
  d(() => {
@@ -65,13 +65,13 @@ function Ee(e) {
65
65
  try {
66
66
  c == null || c.setItem(i, JSON.stringify(y));
67
67
  } catch (l) {
68
- console.warn(l), J();
68
+ console.warn(l), B();
69
69
  }
70
70
  }
71
71
  }, [
72
- (H = e.stylesConfigState) == null ? void 0 : H.persistenceKey,
72
+ (R = e.stylesConfigState) == null ? void 0 : R.persistenceKey,
73
73
  y,
74
- (R = e.stylesConfigState) == null ? void 0 : R.persistenceType
74
+ (L = e.stylesConfigState) == null ? void 0 : L.persistenceType
75
75
  ]), d(() => {
76
76
  var t, i, o;
77
77
  if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
@@ -80,7 +80,7 @@ function Ee(e) {
80
80
  (o = n == null ? void 0 : n(c)) == null || o.then((l) => {
81
81
  var f;
82
82
  const a = m(l ?? {}, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
83
- E(
83
+ I(
84
84
  Object.keys(a).length ? a : K
85
85
  );
86
86
  });
@@ -89,7 +89,7 @@ function Ee(e) {
89
89
  }
90
90
  }
91
91
  }, []);
92
- const u = g(() => (e.columns ?? []).filter((t) => !Ne.includes(t)), [e.columns]), x = g(() => {
92
+ const u = g(() => (e.columns ?? []).filter((t) => !Ie.includes(t)), [e.columns]), x = g(() => {
93
93
  var i;
94
94
  if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
95
95
  return e.exportConfigState.defaultValue;
@@ -101,7 +101,7 @@ function Ee(e) {
101
101
  }
102
102
  };
103
103
  return u.forEach((o, n) => {
104
- const { title: c, isOperationCol: l } = o, a = z(o, n);
104
+ const { title: c, isOperationCol: l } = o, a = N(o, n);
105
105
  a && !l && t.fields.push({
106
106
  field: a,
107
107
  title: c,
@@ -128,8 +128,8 @@ function Ee(e) {
128
128
  return e.exportConfig || ((l = e.exportConfigState) == null ? void 0 : l.value) || ((a = e.exportConfigState) == null ? void 0 : a.defaultValue) || x;
129
129
  },
130
130
  {
131
- value: ((L = e.exportConfigState) == null ? void 0 : L.value) || e.exportConfig,
132
- onChange: ((P = e.exportConfigState) == null ? void 0 : P.onChange) || e.onExportConfigChange
131
+ value: ((P = e.exportConfigState) == null ? void 0 : P.value) || e.exportConfig,
132
+ onChange: ((U = e.exportConfigState) == null ? void 0 : U.onChange) || e.onExportConfigChange
133
133
  }
134
134
  );
135
135
  d(() => {
@@ -150,8 +150,8 @@ function Ee(e) {
150
150
  }
151
151
  }
152
152
  }, [
153
- (U = e.exportConfigState) == null ? void 0 : U.persistenceKey,
154
- (D = e.exportConfigState) == null ? void 0 : D.persistenceType,
153
+ (D = e.exportConfigState) == null ? void 0 : D.persistenceKey,
154
+ (_ = e.exportConfigState) == null ? void 0 : _.persistenceType,
155
155
  x
156
156
  ]), d(() => {
157
157
  var o, n;
@@ -167,13 +167,13 @@ function Ee(e) {
167
167
  try {
168
168
  c == null || c.setItem(i, JSON.stringify(O));
169
169
  } catch (l) {
170
- console.warn(l), B();
170
+ console.warn(l), j();
171
171
  }
172
172
  }
173
173
  }, [
174
- (_ = e.exportConfigState) == null ? void 0 : _.persistenceKey,
174
+ (G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
175
175
  O,
176
- (G = e.exportConfigState) == null ? void 0 : G.persistenceType
176
+ (W = e.exportConfigState) == null ? void 0 : W.persistenceType
177
177
  ]), d(() => {
178
178
  var t, i, o;
179
179
  if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
@@ -197,12 +197,12 @@ function Ee(e) {
197
197
  return e.columnsState.defaultValue;
198
198
  const t = u.filter((a) => a.fixed === "left").map((a, f) => ({ ...a, order: f })), i = u.filter((a) => a.fixed === "right").map((a, f) => ({ ...a, order: f })), o = u.filter((a) => !["left", "right"].includes(a.fixed)).map((a, f) => ({ ...a, order: f })), n = [...t, ...o, ...i], c = {};
199
199
  return n.forEach((a, f) => {
200
- const { order: r, fixed: xe, disabled: he } = a, oe = z(a, f);
201
- oe && (c[oe] = {
200
+ const { order: r, fixed: Te, disabled: be } = a, ce = N(a, f);
201
+ ce && (c[ce] = {
202
202
  show: !0,
203
203
  order: r,
204
- fixed: xe,
205
- disabled: he
204
+ fixed: Te,
205
+ disabled: be
206
206
  });
207
207
  }), c;
208
208
  }, [u]), [C, w] = V(
@@ -251,7 +251,7 @@ function Ee(e) {
251
251
  (X = e.columnsState) == null ? void 0 : X.persistenceType,
252
252
  S
253
253
  ]);
254
- const I = v(() => {
254
+ const J = z(() => {
255
255
  const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
256
256
  if (!i || !t || typeof window > "u")
257
257
  return;
@@ -261,7 +261,7 @@ function Ee(e) {
261
261
  } catch (n) {
262
262
  console.warn(n);
263
263
  }
264
- }, [e.columnsState]), J = v(() => {
264
+ }, [e.columnsState]), B = z(() => {
265
265
  const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
266
266
  if (!i || !t || typeof window > "u")
267
267
  return;
@@ -271,7 +271,7 @@ function Ee(e) {
271
271
  } catch (n) {
272
272
  console.warn(n);
273
273
  }
274
- }, [e.stylesConfigState]), B = v(() => {
274
+ }, [e.stylesConfigState]), j = z(() => {
275
275
  const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
276
276
  if (!i || !t || typeof window > "u")
277
277
  return;
@@ -296,7 +296,7 @@ function Ee(e) {
296
296
  try {
297
297
  c == null || c.setItem(i, JSON.stringify(C));
298
298
  } catch (l) {
299
- console.warn(l), I();
299
+ console.warn(l), J();
300
300
  }
301
301
  }
302
302
  }, [
@@ -321,61 +321,63 @@ function Ee(e) {
321
321
  var i, o;
322
322
  const t = u.findIndex((n) => n == null ? void 0 : n.isOperationCol);
323
323
  if (t >= 0) {
324
- const n = u[t], c = z(n, t);
324
+ const n = u[t], c = N(n, t);
325
325
  !(((i = C == null ? void 0 : C[c]) == null ? void 0 : i.fixed) === ((o = S == null ? void 0 : S[c]) == null ? void 0 : o.fixed)) && Object.keys(C ?? {}).length === 0 && w(S);
326
326
  }
327
327
  }, [S, C]);
328
- const Ce = g(() => (e == null ? void 0 : e.rowHoverable) ?? (s == null ? void 0 : s.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, s == null ? void 0 : s.rowHoverable]), ge = g(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), b = g(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), me = g(() => ["column", "row-column"].includes(b), [b]), we = g(() => {
328
+ const me = g(() => (e == null ? void 0 : e.rowHoverable) ?? (s == null ? void 0 : s.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, s == null ? void 0 : s.rowHoverable]), we = g(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), b = g(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), xe = g(() => ["column", "row-column"].includes(b), [b]), he = g(() => {
329
329
  let t = !1;
330
330
  return ["hide", "column"].includes(b) && (t = !0), t;
331
- }, [b]), j = {
331
+ }, [b]), M = {
332
332
  loading: e.loading ?? !1,
333
333
  uuid: T.current,
334
334
  fullscreen: fe,
335
335
  setFullscreen: re,
336
336
  selected: se,
337
337
  setSelected: ue,
338
+ toolbarWidth: de,
339
+ setToolbarWidth: ye,
338
340
  columns: e.columns,
339
341
  baseColumns: u,
340
- persistenceType: (W = e.columnsState) == null ? void 0 : W.persistenceType,
341
- persistenceKey: (Y = e.columnsState) == null ? void 0 : Y.persistenceKey,
342
- onlineChange: ($ = e.columnsState) == null ? void 0 : $.onlineChange,
342
+ persistenceType: (Y = e.columnsState) == null ? void 0 : Y.persistenceType,
343
+ persistenceKey: ($ = e.columnsState) == null ? void 0 : $.persistenceKey,
344
+ onlineChange: (p = e.columnsState) == null ? void 0 : p.onlineChange,
343
345
  columnsMap: C,
344
346
  setColumnsMap: w,
345
347
  defaultColumnKeyMap: S,
346
- clearPersistenceStorage: I,
348
+ clearPersistenceStorage: J,
347
349
  stylesConfig: y,
348
- setTableStylesConfig: E,
349
- defaultTableSize: N,
350
+ setTableStylesConfig: I,
351
+ defaultTableSize: E,
350
352
  tableSize: y.size,
351
- stylesStorageType: (p = e.stylesConfigState) == null ? void 0 : p.persistenceType,
352
- stylesStorageKey: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceKey,
353
- onlineStylesConfigChange: (te = e.stylesConfigState) == null ? void 0 : te.onlineChange,
354
- clearStylesConfigCache: J,
353
+ stylesStorageType: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceType,
354
+ stylesStorageKey: (te = e.stylesConfigState) == null ? void 0 : te.persistenceKey,
355
+ onlineStylesConfigChange: (ne = e.stylesConfigState) == null ? void 0 : ne.onlineChange,
356
+ clearStylesConfigCache: B,
355
357
  defaultTableStylesConfig: K,
356
358
  exportConfig: O,
357
359
  setTableExportConfig: h,
358
360
  defaultTableExportConfig: x,
359
- exportStorageType: (ne = e.exportConfigState) == null ? void 0 : ne.persistenceType,
360
- exportStorageKey: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceKey,
361
- onlineExportConfigChange: (ae = e.exportConfigState) == null ? void 0 : ae.onlineChange,
362
- clearExportConfigCache: B,
363
- zebra: ge,
364
- rowHoverable: Ce,
365
- showColumnBorder: me,
366
- hideRowBorder: we
361
+ exportStorageType: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceType,
362
+ exportStorageKey: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceKey,
363
+ onlineExportConfigChange: (oe = e.exportConfigState) == null ? void 0 : oe.onlineChange,
364
+ clearExportConfigCache: j,
365
+ zebra: we,
366
+ rowHoverable: me,
367
+ showColumnBorder: xe,
368
+ hideRowBorder: he
367
369
  };
368
- return Object.defineProperty(j, "uuid", {
370
+ return Object.defineProperty(M, "uuid", {
369
371
  get: () => T.current
370
- }), j;
372
+ }), M;
371
373
  }
372
- const Ie = be({}), Pe = (e) => {
373
- const T = Ee(e.initValue);
374
- return /* @__PURE__ */ Te.jsx(Ie.Provider, { value: T, children: e.children });
374
+ const Be = Oe({}), De = (e) => {
375
+ const T = Je(e.initValue);
376
+ return /* @__PURE__ */ Ke.jsx(Be.Provider, { value: T, children: e.children });
375
377
  };
376
378
  export {
377
- Ie as BitzTableContext,
378
- ze as SORTER_COLUMN,
379
- Pe as default,
380
- Ne as toolCols
379
+ Be as BitzTableContext,
380
+ Ee as SORTER_COLUMN,
381
+ De as default,
382
+ Ie as toolCols
381
383
  };
@@ -1,12 +1,10 @@
1
- import { DragEndEvent } from '@dnd-kit/core';
2
1
  import { ReactNode } from 'react';
3
2
  interface SortTableContextProps {
4
3
  children?: ReactNode;
5
4
  enabledRowDragSort?: boolean;
6
5
  dataSource: any[];
7
6
  mergeRowKey: string;
8
- onDragEnd: (event: DragEndEvent) => void;
7
+ onDragEnd: (newCols: any[]) => void;
9
8
  }
10
- declare function SortTableContext({ children, enabledRowDragSort, dataSource, mergeRowKey, onDragEnd, }: SortTableContextProps): import("react/jsx-runtime").JSX.Element;
11
- declare const _default: import("react").MemoExoticComponent<typeof SortTableContext>;
12
- export default _default;
9
+ declare function SortTableContext({ children, enabledRowDragSort, dataSource, mergeRowKey, onDragEnd: dragEndEmit, }: SortTableContextProps): import("react/jsx-runtime").JSX.Element;
10
+ export default SortTableContext;