bitz-react-admin-ui 2.1.5 → 2.1.7

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 (36) hide show
  1. package/dist/_virtual/dayjs.min.mjs +2 -5
  2. package/dist/_virtual/index.mjs +2 -2
  3. package/dist/_virtual/index2.mjs +2 -2
  4. package/dist/components/BitzCalendar/index.mjs +1 -1
  5. package/dist/components/BitzDayJs/index.mjs +1 -1
  6. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
  7. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
  8. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
  9. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  10. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  11. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  12. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  13. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  14. package/dist/components/BitzTable/Dropdown/index.mjs +16 -15
  15. package/dist/components/BitzTable/Store/index.d.ts +11 -2
  16. package/dist/components/BitzTable/Store/index.mjs +121 -114
  17. package/dist/components/BitzTable/Store/utils/index.mjs +24 -24
  18. package/dist/components/BitzTable/Table/index.d.ts +3 -1
  19. package/dist/components/BitzTable/Table/index.mjs +226 -229
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +4 -2
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +116 -106
  22. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +24 -25
  23. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +10 -4
  24. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +58 -50
  25. package/dist/components/BitzTable/ToolBar/ExportIcon/index.d.ts +0 -4
  26. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +45 -28
  27. package/dist/components/BitzTable/ToolBar/index.d.ts +6 -3
  28. package/dist/components/BitzTable/index.d.ts +2 -2
  29. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  30. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  31. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  32. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  33. package/dist/style.css +1 -1
  34. package/dist/utils/time.mjs +1 -1
  35. package/package.json +1 -1
  36. package/dist/_virtual/dayjs.min2.mjs +0 -4
@@ -1,7 +1,4 @@
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);
1
+ var a = { exports: {} };
5
2
  export {
6
- s as default
3
+ a as __module
7
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 "../../_virtual/dayjs.min.mjs";
4
+ import N from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/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 "../../_virtual/dayjs.min.mjs";
1
+ import t from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/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 "../../_virtual/dayjs.min.mjs";
2
+ import o from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/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 j, useMemo as D } from "react";
3
3
  import M from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isToday.mjs";
4
- import n from "../../_virtual/dayjs.min.mjs";
4
+ import n from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
5
5
  import { useBitzFuiCalendarStore as S, CalendarTypeEnum as C } from "./BitzFuiCalendarStore.mjs";
6
6
  import N 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 a } from "react";
3
3
  import e from "./CalendarAgendum.module.less.mjs";
4
- import l from "../../_virtual/dayjs.min.mjs";
4
+ import l from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
5
5
  import { Button as c } from "antd";
6
6
  const d = (_, s) => {
7
7
  let t = s.diff(_, "minute"), m;
@@ -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 "../../_virtual/dayjs.min.mjs";
3
+ import d from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/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 o, DatePicker as b, Dropdown as h } from "antd";
4
4
  import { useBitzFuiCalendarStore as w, CalendarTypeEnum as a } from "./BitzFuiCalendarStore.mjs";
5
- import g from "../../_virtual/dayjs.min.mjs";
5
+ import g from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/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 E from "./FuiCalendarItem.mjs";
4
4
  import b from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrAfter.mjs";
5
5
  import F from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrBefore.mjs";
6
6
  import M from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/utc.mjs";
7
- import r from "../../_virtual/dayjs.min.mjs";
7
+ import r from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
8
8
  import { useBitzFuiCalendarStore as z } from "./BitzFuiCalendarStore.mjs";
9
9
  r.extend(M);
10
10
  r.extend(F);
@@ -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 "../../_virtual/dayjs.min.mjs";
6
+ import e from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/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 "../../_virtual/dayjs.min.mjs";
5
+ import m from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
6
6
  import "./index.less.mjs";
7
7
  m.extend(p);
8
8
  const x = (a) => {
@@ -1,21 +1,22 @@
1
- import { j as a } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Dropdown as e } from "antd";
3
- import { useMemo as d } from "react";
4
- import c from "./style.mjs";
5
- const p = (o, s) => o == null ? void 0 : o.map((t) => {
6
- const r = { ...t };
7
- return r != null && r.children && (r.children = p(r == null ? void 0 : r.children, s), r.popupClassName = s), r;
8
- }), m = ({ menu: o, ...s }) => {
9
- const { popupClassName: t } = c(), r = d(() => p(o == null ? void 0 : o.items, t), [o == null ? void 0 : o.items]);
10
- return /* @__PURE__ */ a.jsx(
11
- e,
1
+ import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { Dropdown as c } from "antd";
3
+ import d from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
4
+ import { useMemo as m } from "react";
5
+ import n from "./style.mjs";
6
+ const p = (r, s) => r == null ? void 0 : r.map((t) => {
7
+ const o = { ...t };
8
+ return o != null && o.children && (o.children = p(o == null ? void 0 : o.children, s), o.popupClassName = s), o;
9
+ }), j = ({ menu: r, overlayClassName: s, ...t }) => {
10
+ const { popupClassName: o } = n(), a = m(() => p(r == null ? void 0 : r.items, o), [r == null ? void 0 : r.items]);
11
+ return /* @__PURE__ */ e.jsx(
12
+ c,
12
13
  {
13
- ...s,
14
- menu: { ...o, items: r },
15
- overlayClassName: t
14
+ ...t,
15
+ menu: { ...r, items: a },
16
+ overlayClassName: d(o, s)
16
17
  }
17
18
  );
18
19
  };
19
20
  export {
20
- m as default
21
+ j as default
21
22
  };
@@ -44,7 +44,7 @@ export interface ExportConfigProps {
44
44
  title: string;
45
45
  show: boolean;
46
46
  }
47
- export interface ExportConfigState<TableKey = any> {
47
+ export interface ExportColumnStateType<TableKey = any> {
48
48
  persistenceType?: 'localStorage' | 'sessionStorage' | 'online';
49
49
  persistenceKey?: TableKey;
50
50
  defaultValue?: ExportConfigProps[];
@@ -71,10 +71,11 @@ export type UseContainerProps<T = any> = {
71
71
  bordered?: BitzTableBorderedType;
72
72
  defaultBordered?: BitzTableBorderedType;
73
73
  /** 导出配置 */
74
- exportConfigState?: ExportConfigState;
74
+ exportConfigState?: ExportColumnStateType;
75
75
  defaultExportConfig?: ExportConfigProps[];
76
76
  exportConfig?: ExportConfigProps[];
77
77
  onExportConfigChange?: (value: ExportConfigProps[]) => void;
78
+ rowHoverable?: boolean;
78
79
  };
79
80
  declare function useContainer(props: UseContainerProps): {
80
81
  uuid: string;
@@ -104,6 +105,10 @@ declare function useContainer(props: UseContainerProps): {
104
105
  exportStorageKey: any;
105
106
  onlineExportConfigChange: ((key: any, state: ExportConfigProps[]) => void) | undefined;
106
107
  clearExportConfigCache: () => void;
108
+ zebra: boolean | undefined;
109
+ rowHoverable: boolean;
110
+ showColumnBorder: boolean;
111
+ hideRowBorder: boolean;
107
112
  };
108
113
  declare const BitzTableContext: import("react").Context<{
109
114
  uuid: string;
@@ -133,6 +138,10 @@ declare const BitzTableContext: import("react").Context<{
133
138
  exportStorageKey: any;
134
139
  onlineExportConfigChange: ((key: any, state: ExportConfigProps[]) => void) | undefined;
135
140
  clearExportConfigCache: () => void;
141
+ zebra: boolean | undefined;
142
+ rowHoverable: boolean;
143
+ showColumnBorder: boolean;
144
+ hideRowBorder: boolean;
136
145
  }>;
137
146
  export type ContainerType = typeof useContainer;
138
147
  declare const Container: React.FC<{
@@ -1,17 +1,17 @@
1
- import { j as he } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import O from "../../../hooks/useMergedState.mjs";
3
- import { createContext as Ke, useRef as fe, useContext as Te, useEffect as y, useMemo as ue, useCallback as J } from "react";
1
+ import { j as be } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import J from "../../../hooks/useMergedState.mjs";
3
+ import { createContext as Ve, useRef as re, useContext as ve, useEffect as d, useMemo as C, useCallback as N } from "react";
4
4
  import { genColumnKey as se } from "./utils/index.mjs";
5
- import { getUuid as Ve } from "../../../utils/uuid.mjs";
6
- import { BitzConfigContext as be } from "../../BitzConfigProvider/context.mjs";
5
+ import { getUuid as ze } from "../../../utils/uuid.mjs";
6
+ import { BitzConfigContext as Oe } from "../../BitzConfigProvider/context.mjs";
7
7
  import S from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/merge.mjs";
8
- function ve(e) {
9
- var j, B, P, k, D, Z, G, R, U, q, A, F, H, L, Q, W, X, Y, _, $, p, ee, te, ne, ie;
10
- const x = fe(Ve()), K = fe([]), r = Te(be).Table, re = r == null ? void 0 : r.defaultSize, N = e.defaultSize ?? re ?? "lg", ye = r == null ? void 0 : r.zebra, Se = e.defaultZebra ?? ye ?? !0, de = r == null ? void 0 : r.bordered, ge = e.defaultBordered ?? de ?? "row-column", T = e.defaultStylesConfig || {
11
- size: N,
12
- zebra: Se,
13
- bordered: ge
14
- }, [h, z] = O(
8
+ function Je(e) {
9
+ var H, P, k, R, G, Z, D, U, q, A, F, L, Q, W, X, Y, _, $, p, ee, te, ne, ie, ae, ce;
10
+ const K = re(ze()), b = re([]), r = ve(Oe).Table, ye = r == null ? void 0 : r.defaultSize, I = e.defaultSize ?? ye ?? "lg", de = e.defaultZebra ?? (r == null ? void 0 : r.zebra) ?? !0, Se = e.defaultBordered ?? (r == null ? void 0 : r.bordered) ?? "row-column", V = e.defaultStylesConfig || {
11
+ size: I,
12
+ zebra: de,
13
+ bordered: Se
14
+ }, [y, E] = J(
15
15
  () => {
16
16
  var n, o, c, l;
17
17
  const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.stylesConfigState || {};
@@ -28,14 +28,14 @@ function ve(e) {
28
28
  console.warn(u);
29
29
  }
30
30
  }
31
- return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((l = e.stylesConfigState) == null ? void 0 : l.defaultValue) || T;
31
+ return e.stylesConfig || ((c = e.stylesConfigState) == null ? void 0 : c.value) || ((l = e.stylesConfigState) == null ? void 0 : l.defaultValue) || V;
32
32
  },
33
33
  {
34
- value: ((j = e.stylesConfigState) == null ? void 0 : j.value) || e.stylesConfig,
35
- onChange: ((B = e.stylesConfigState) == null ? void 0 : B.onChange) || e.onStylesConfigChange
34
+ value: ((H = e.stylesConfigState) == null ? void 0 : H.value) || e.stylesConfig,
35
+ onChange: ((P = e.stylesConfigState) == null ? void 0 : P.onChange) || e.onStylesConfigChange
36
36
  }
37
37
  );
38
- y(() => {
38
+ d(() => {
39
39
  var a, n;
40
40
  if (!((a = e.stylesConfigState) != null && a.persistenceKey) || !((n = e.stylesConfigState) != null && n.persistenceType) || typeof window > "u")
41
41
  return;
@@ -47,16 +47,16 @@ function ve(e) {
47
47
  if (t !== "online") {
48
48
  const o = window[t];
49
49
  try {
50
- o == null || o.setItem(i, JSON.stringify(h));
50
+ o == null || o.setItem(i, JSON.stringify(y));
51
51
  } catch (c) {
52
- console.warn(c), E();
52
+ console.warn(c), M();
53
53
  }
54
54
  }
55
55
  }, [
56
- (P = e.stylesConfigState) == null ? void 0 : P.persistenceKey,
57
- h,
58
- (k = e.stylesConfigState) == null ? void 0 : k.persistenceType
59
- ]), y(() => {
56
+ (k = e.stylesConfigState) == null ? void 0 : k.persistenceKey,
57
+ y,
58
+ (R = e.stylesConfigState) == null ? void 0 : R.persistenceType
59
+ ]), d(() => {
60
60
  var t, i, a;
61
61
  if ((t = e.stylesConfigState) != null && t.persistenceKey && ((i = e.stylesConfigState) == null ? void 0 : i.persistenceType) === "online") {
62
62
  const { onlineGet: n, persistenceKey: o } = e.stylesConfigState;
@@ -64,8 +64,8 @@ function ve(e) {
64
64
  (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
65
65
  var f, u;
66
66
  const l = S(c, (f = e == null ? void 0 : e.stylesConfigState) == null ? void 0 : f.value);
67
- z(
68
- (u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : T
67
+ E(
68
+ (u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : V
69
69
  );
70
70
  });
71
71
  } catch (c) {
@@ -73,22 +73,22 @@ function ve(e) {
73
73
  }
74
74
  }
75
75
  }, []);
76
- const g = ue(() => {
76
+ const m = C(() => {
77
77
  var i, a;
78
78
  if ((i = e == null ? void 0 : e.exportConfigState) != null && i.defaultValue)
79
79
  return e.exportConfigState.defaultValue;
80
80
  const t = [];
81
81
  return (a = e.columns) == null || a.forEach(
82
- ({ key: n, dataIndex: o, title: c }, l) => {
83
- const f = se(n ?? o, l);
84
- f && t.push({
85
- field: f,
82
+ ({ key: n, dataIndex: o, title: c, isOperationCol: l }, f) => {
83
+ const u = se(n ?? o, f);
84
+ u && !l && t.push({
85
+ field: u,
86
86
  title: c,
87
87
  show: !0
88
88
  });
89
89
  }
90
90
  ), t;
91
- }, [e.columns]), [V, C] = O(
91
+ }, [e.columns]), [v, w] = J(
92
92
  () => {
93
93
  var n, o, c, l;
94
94
  const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
@@ -105,35 +105,35 @@ function ve(e) {
105
105
  console.warn(u);
106
106
  }
107
107
  }
108
- return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((l = e.exportConfigState) == null ? void 0 : l.defaultValue) || g;
108
+ return e.exportConfig || ((c = e.exportConfigState) == null ? void 0 : c.value) || ((l = e.exportConfigState) == null ? void 0 : l.defaultValue) || m;
109
109
  },
110
110
  {
111
- value: ((D = e.exportConfigState) == null ? void 0 : D.value) || e.exportConfig,
111
+ value: ((G = e.exportConfigState) == null ? void 0 : G.value) || e.exportConfig,
112
112
  onChange: ((Z = e.exportConfigState) == null ? void 0 : Z.onChange) || e.onExportConfigChange
113
113
  }
114
114
  );
115
- y(() => {
115
+ d(() => {
116
116
  var n, o;
117
117
  const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.exportConfigState || {};
118
118
  if (i && t && typeof window < "u" && t !== "online") {
119
119
  const c = window[t];
120
120
  try {
121
121
  const l = c == null ? void 0 : c.getItem(i);
122
- l ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? C(
122
+ l ? (n = e == null ? void 0 : e.exportConfigState) != null && n.defaultValue ? w(
123
123
  S(
124
124
  JSON.parse(l),
125
125
  (o = e == null ? void 0 : e.exportConfigState) == null ? void 0 : o.defaultValue
126
126
  )
127
- ) : C(JSON.parse(l)) : C(g);
127
+ ) : w(JSON.parse(l)) : w(m);
128
128
  } catch (l) {
129
129
  console.warn(l);
130
130
  }
131
131
  }
132
132
  }, [
133
- (G = e.exportConfigState) == null ? void 0 : G.persistenceKey,
134
- (R = e.exportConfigState) == null ? void 0 : R.persistenceType,
135
- g
136
- ]), y(() => {
133
+ (D = e.exportConfigState) == null ? void 0 : D.persistenceKey,
134
+ (U = e.exportConfigState) == null ? void 0 : U.persistenceType,
135
+ m
136
+ ]), d(() => {
137
137
  var a, n;
138
138
  if (!((a = e.exportConfigState) != null && a.persistenceKey) || !((n = e.exportConfigState) != null && n.persistenceType) || typeof window > "u")
139
139
  return;
@@ -145,47 +145,47 @@ function ve(e) {
145
145
  if (t !== "online") {
146
146
  const o = window[t];
147
147
  try {
148
- o == null || o.setItem(i, JSON.stringify(V));
148
+ o == null || o.setItem(i, JSON.stringify(v));
149
149
  } catch (c) {
150
- console.warn(c), M();
150
+ console.warn(c), j();
151
151
  }
152
152
  }
153
153
  }, [
154
- (U = e.exportConfigState) == null ? void 0 : U.persistenceKey,
155
- V,
156
- (q = e.exportConfigState) == null ? void 0 : q.persistenceType
157
- ]), y(() => {
154
+ (q = e.exportConfigState) == null ? void 0 : q.persistenceKey,
155
+ v,
156
+ (A = e.exportConfigState) == null ? void 0 : A.persistenceType
157
+ ]), d(() => {
158
158
  var t, i, a;
159
159
  if ((t = e.exportConfigState) != null && t.persistenceKey && ((i = e.exportConfigState) == null ? void 0 : i.persistenceType) === "online") {
160
160
  const { onlineGet: n, persistenceKey: o } = e.exportConfigState;
161
161
  try {
162
162
  (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
163
163
  var f;
164
- const l = S(c, (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
165
- C(l ?? g);
164
+ const l = S(c ?? [], (f = e == null ? void 0 : e.exportConfigState) == null ? void 0 : f.value);
165
+ w(l != null && l.length ? l : m);
166
166
  });
167
167
  } catch (c) {
168
168
  console.warn(c);
169
169
  }
170
170
  }
171
171
  }, []);
172
- const m = ue(() => {
173
- var c, l, f, u, ae, ce, oe;
172
+ const x = C(() => {
173
+ var c, l, f, u, oe, le, ue;
174
174
  if ((c = e == null ? void 0 : e.columnsState) != null && c.defaultValue)
175
175
  return e.columnsState.defaultValue;
176
- const t = ((f = (l = e.columns) == null ? void 0 : l.filter((s) => s.fixed === "left")) == null ? void 0 : f.map((s, d) => ({ ...s, order: d }))) ?? [], i = ((ae = (u = e.columns) == null ? void 0 : u.filter((s) => s.fixed === "right")) == null ? void 0 : ae.map((s, d) => ({ ...s, order: d }))) ?? [], a = ((oe = (ce = e.columns) == null ? void 0 : ce.filter((s) => !["left", "right"].includes(s.fixed))) == null ? void 0 : oe.map((s, d) => ({ ...s, order: d }))) ?? [], n = [...t, ...a, ...i], o = {};
176
+ const t = ((f = (l = e.columns) == null ? void 0 : l.filter((s) => s.fixed === "left")) == null ? void 0 : f.map((s, g) => ({ ...s, order: g }))) ?? [], i = ((oe = (u = e.columns) == null ? void 0 : u.filter((s) => s.fixed === "right")) == null ? void 0 : oe.map((s, g) => ({ ...s, order: g }))) ?? [], a = ((ue = (le = e.columns) == null ? void 0 : le.filter((s) => !["left", "right"].includes(s.fixed))) == null ? void 0 : ue.map((s, g) => ({ ...s, order: g }))) ?? [], n = [...t, ...a, ...i], o = {};
177
177
  return n == null || n.forEach(
178
- ({ key: s, dataIndex: d, order: Ce, fixed: me, disabled: we }, xe) => {
179
- const le = se(s ?? d, xe);
180
- le && (o[le] = {
178
+ ({ key: s, dataIndex: g, order: xe, fixed: he, disabled: Ke }, Te) => {
179
+ const fe = se(s ?? g, Te);
180
+ fe && (o[fe] = {
181
181
  show: !0,
182
- order: Ce,
183
- fixed: me,
184
- disabled: we
182
+ order: xe,
183
+ fixed: he,
184
+ disabled: Ke
185
185
  });
186
186
  }
187
187
  ), o;
188
- }, [e.columns]), [b, w] = O(
188
+ }, [e.columns]), [z, h] = J(
189
189
  () => {
190
190
  var n, o, c, l;
191
191
  const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
@@ -202,36 +202,36 @@ function ve(e) {
202
202
  console.warn(u);
203
203
  }
204
204
  }
205
- return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((l = e.columnsState) == null ? void 0 : l.defaultValue) || m;
205
+ return e.columnsStateMap || ((c = e.columnsState) == null ? void 0 : c.value) || ((l = e.columnsState) == null ? void 0 : l.defaultValue) || x;
206
206
  },
207
207
  {
208
- value: ((A = e.columnsState) == null ? void 0 : A.value) || e.columnsStateMap,
209
- onChange: ((F = e.columnsState) == null ? void 0 : F.onChange) || e.onColumnsStateChange
208
+ value: ((F = e.columnsState) == null ? void 0 : F.value) || e.columnsStateMap,
209
+ onChange: ((L = e.columnsState) == null ? void 0 : L.onChange) || e.onColumnsStateChange
210
210
  }
211
211
  );
212
- y(() => {
212
+ d(() => {
213
213
  var n, o;
214
214
  const { persistenceType: t, persistenceKey: i, onlineGet: a } = e.columnsState || {};
215
215
  if (i && t && typeof window < "u" && t !== "online") {
216
216
  const c = window[t];
217
217
  try {
218
218
  const l = c == null ? void 0 : c.getItem(i);
219
- l ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? w(
219
+ l ? (n = e == null ? void 0 : e.columnsState) != null && n.defaultValue ? h(
220
220
  S(
221
221
  JSON.parse(l),
222
222
  (o = e == null ? void 0 : e.columnsState) == null ? void 0 : o.defaultValue
223
223
  )
224
- ) : w(JSON.parse(l)) : w(m);
224
+ ) : h(JSON.parse(l)) : h(x);
225
225
  } catch (l) {
226
226
  console.warn(l);
227
227
  }
228
228
  }
229
229
  }, [
230
- (H = e.columnsState) == null ? void 0 : H.persistenceKey,
231
- (L = e.columnsState) == null ? void 0 : L.persistenceType,
232
- m
230
+ (Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
231
+ (W = e.columnsState) == null ? void 0 : W.persistenceType,
232
+ x
233
233
  ]);
234
- const I = J(() => {
234
+ const B = N(() => {
235
235
  const { persistenceType: t, persistenceKey: i } = e.columnsState || {};
236
236
  if (!i || !t || typeof window > "u")
237
237
  return;
@@ -241,7 +241,7 @@ function ve(e) {
241
241
  } catch (n) {
242
242
  console.warn(n);
243
243
  }
244
- }, [e.columnsState]), E = J(() => {
244
+ }, [e.columnsState]), M = N(() => {
245
245
  const { persistenceType: t, persistenceKey: i } = e.stylesConfigState || {};
246
246
  if (!i || !t || typeof window > "u")
247
247
  return;
@@ -251,7 +251,7 @@ function ve(e) {
251
251
  } catch (n) {
252
252
  console.warn(n);
253
253
  }
254
- }, [e.stylesConfigState]), M = J(() => {
254
+ }, [e.stylesConfigState]), j = N(() => {
255
255
  const { persistenceType: t, persistenceKey: i } = e.exportConfigState || {};
256
256
  if (!i || !t || typeof window > "u")
257
257
  return;
@@ -262,7 +262,7 @@ function ve(e) {
262
262
  console.warn(n);
263
263
  }
264
264
  }, [e.exportConfigState]);
265
- y(() => {
265
+ d(() => {
266
266
  var a, n;
267
267
  if (!((a = e.columnsState) != null && a.persistenceKey) || !((n = e.columnsState) != null && n.persistenceType) || typeof window > "u")
268
268
  return;
@@ -274,16 +274,16 @@ function ve(e) {
274
274
  if (t !== "online") {
275
275
  const o = window[t];
276
276
  try {
277
- o == null || o.setItem(i, JSON.stringify(b));
277
+ o == null || o.setItem(i, JSON.stringify(z));
278
278
  } catch (c) {
279
- console.warn(c), I();
279
+ console.warn(c), B();
280
280
  }
281
281
  }
282
282
  }, [
283
- (Q = e.columnsState) == null ? void 0 : Q.persistenceKey,
284
- b,
285
- (W = e.columnsState) == null ? void 0 : W.persistenceType
286
- ]), y(() => {
283
+ (X = e.columnsState) == null ? void 0 : X.persistenceKey,
284
+ z,
285
+ (Y = e.columnsState) == null ? void 0 : Y.persistenceType
286
+ ]), d(() => {
287
287
  var t, i, a;
288
288
  if ((t = e.columnsState) != null && t.persistenceKey && ((i = e.columnsState) == null ? void 0 : i.persistenceType) === "online") {
289
289
  const { onlineGet: n, persistenceKey: o } = e.columnsState;
@@ -291,8 +291,8 @@ function ve(e) {
291
291
  (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
292
292
  var f, u;
293
293
  const l = S(c, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
294
- w(
295
- (u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : m
294
+ h(
295
+ (u = Object.keys(l ?? {})) != null && u.length ? l ?? {} : x
296
296
  );
297
297
  });
298
298
  } catch (c) {
@@ -300,48 +300,55 @@ function ve(e) {
300
300
  }
301
301
  }
302
302
  }, []);
303
- const v = {
304
- uuid: x.current,
303
+ const ge = C(() => (e == null ? void 0 : e.rowHoverable) ?? (r == null ? void 0 : r.rowHoverable) ?? !0, [e == null ? void 0 : e.rowHoverable, r == null ? void 0 : r.rowHoverable]), Ce = C(() => e.zebra ?? y.zebra, [e.zebra, y.zebra]), T = C(() => e.bordered ?? y.bordered, [e.bordered, y.bordered]), me = C(() => ["column", "row-column"].includes(T), [T]), we = C(() => {
304
+ let t = !1;
305
+ return ["hide", "column"].includes(T) && (t = !0), t;
306
+ }, [T]), O = {
307
+ uuid: K.current,
305
308
  columns: e.columns,
306
- persistenceType: (X = e.columnsState) == null ? void 0 : X.persistenceType,
307
- persistenceKey: (Y = e.columnsState) == null ? void 0 : Y.persistenceKey,
308
- onlineChange: (_ = e.columnsState) == null ? void 0 : _.onlineChange,
309
- sortKeyColumns: K.current,
309
+ persistenceType: (_ = e.columnsState) == null ? void 0 : _.persistenceType,
310
+ persistenceKey: ($ = e.columnsState) == null ? void 0 : $.persistenceKey,
311
+ onlineChange: (p = e.columnsState) == null ? void 0 : p.onlineChange,
312
+ sortKeyColumns: b.current,
310
313
  setSortKeyColumns: (t) => {
311
- K.current = t;
314
+ b.current = t;
312
315
  },
313
- columnsMap: b,
314
- setColumnsMap: w,
315
- defaultColumnKeyMap: m,
316
- clearPersistenceStorage: I,
317
- stylesConfig: h,
318
- setTableStylesConfig: z,
319
- defaultTableSize: N,
320
- tableSize: h.size,
321
- stylesStorageType: ($ = e.stylesConfigState) == null ? void 0 : $.persistenceType,
322
- stylesStorageKey: (p = e.stylesConfigState) == null ? void 0 : p.persistenceKey,
323
- onlineStylesConfigChange: (ee = e.stylesConfigState) == null ? void 0 : ee.onlineChange,
324
- clearStylesConfigCache: E,
325
- defaultTableStylesConfig: T,
326
- exportConfig: V,
327
- setTableExportConfig: C,
328
- defaultTableExportConfig: g,
329
- exportStorageType: (te = e.exportConfigState) == null ? void 0 : te.persistenceType,
330
- exportStorageKey: (ne = e.exportConfigState) == null ? void 0 : ne.persistenceKey,
331
- onlineExportConfigChange: (ie = e.exportConfigState) == null ? void 0 : ie.onlineChange,
332
- clearExportConfigCache: M
316
+ columnsMap: z,
317
+ setColumnsMap: h,
318
+ defaultColumnKeyMap: x,
319
+ clearPersistenceStorage: B,
320
+ stylesConfig: y,
321
+ setTableStylesConfig: E,
322
+ defaultTableSize: I,
323
+ tableSize: y.size,
324
+ stylesStorageType: (ee = e.stylesConfigState) == null ? void 0 : ee.persistenceType,
325
+ stylesStorageKey: (te = e.stylesConfigState) == null ? void 0 : te.persistenceKey,
326
+ onlineStylesConfigChange: (ne = e.stylesConfigState) == null ? void 0 : ne.onlineChange,
327
+ clearStylesConfigCache: M,
328
+ defaultTableStylesConfig: V,
329
+ exportConfig: v,
330
+ setTableExportConfig: w,
331
+ defaultTableExportConfig: m,
332
+ exportStorageType: (ie = e.exportConfigState) == null ? void 0 : ie.persistenceType,
333
+ exportStorageKey: (ae = e.exportConfigState) == null ? void 0 : ae.persistenceKey,
334
+ onlineExportConfigChange: (ce = e.exportConfigState) == null ? void 0 : ce.onlineChange,
335
+ clearExportConfigCache: j,
336
+ zebra: Ce,
337
+ rowHoverable: ge,
338
+ showColumnBorder: me,
339
+ hideRowBorder: we
333
340
  };
334
- return Object.defineProperty(v, "sortKeyColumns", {
341
+ return Object.defineProperty(O, "sortKeyColumns", {
342
+ get: () => b.current
343
+ }), Object.defineProperty(O, "uuid", {
335
344
  get: () => K.current
336
- }), Object.defineProperty(v, "uuid", {
337
- get: () => x.current
338
- }), v;
345
+ }), O;
339
346
  }
340
- const Oe = Ke({}), Be = (e) => {
341
- const x = ve(e.initValue);
342
- return /* @__PURE__ */ he.jsx(Oe.Provider, { value: x, children: e.children });
347
+ const Ne = Ve({}), ke = (e) => {
348
+ const K = Je(e.initValue);
349
+ return /* @__PURE__ */ be.jsx(Ne.Provider, { value: K, children: e.children });
343
350
  };
344
351
  export {
345
- Oe as BitzTableContext,
346
- Be as default
352
+ Ne as BitzTableContext,
353
+ ke as default
347
354
  };