bitz-react-admin-ui 1.7.5 → 1.7.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 (28) 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/index.d.ts +3 -0
  5. package/dist/components/BitzConfirmModal/index.d.ts +6 -5
  6. package/dist/components/BitzConfirmModal/index.mjs +33 -65
  7. package/dist/components/BitzDayJs/index.mjs +1 -1
  8. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
  9. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
  10. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
  11. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  12. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  13. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  14. package/dist/components/BitzFullScreen/index.d.ts +6 -1
  15. package/dist/components/BitzFullScreen/index.mjs +22 -14
  16. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  17. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  18. package/dist/components/BitzTable/Store/index.d.ts +18 -27
  19. package/dist/components/BitzTable/Store/utils/index.d.ts +2 -2
  20. package/dist/components/BitzTable/Table/index.mjs +255 -238
  21. package/dist/components/BitzTable/TableSkeleton/index.mjs +20 -19
  22. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.module.less.mjs +29 -29
  23. package/dist/components/BitzTable/index.d.ts +12 -3
  24. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  25. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  26. package/dist/style.css +1 -1
  27. package/dist/utils/time.mjs +1 -1
  28. package/package.json +1 -1
@@ -1,48 +1,49 @@
1
1
  import { j as i } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { theme as g, Skeleton as L, Table as f } from "antd";
2
+ import { theme as _, Skeleton as L, Table as f } from "antd";
3
3
  import O from "../../../node_modules/.store/antd@5.15.3/node_modules/antd/es/table/ExpandIcon.mjs";
4
- import { useContext as R, useMemo as a, useRef as T, useEffect as h } from "react";
4
+ import { useContext as R, useMemo as a, useRef as T, useEffect as w } from "react";
5
5
  import "../../../node_modules/.store/antd@5.15.3/node_modules/antd/es/config-provider/index.mjs";
6
- import w from "../../../node_modules/.store/antd@5.15.3/node_modules/antd/locale/en_US.mjs";
7
- import { ConfigContext as N } from "../../../node_modules/.store/antd@5.15.3/node_modules/antd/es/config-provider/context.mjs";
8
- const U = ({
6
+ import N from "../../../node_modules/.store/antd@5.15.3/node_modules/antd/locale/en_US.mjs";
7
+ import { ConfigContext as S } from "../../../node_modules/.store/antd@5.15.3/node_modules/antd/es/config-provider/context.mjs";
8
+ const q = ({
9
9
  columns: s,
10
10
  dataLength: c,
11
11
  rowSelection: l,
12
12
  expandable: o,
13
13
  loading: r,
14
+ showTableTool: y,
14
15
  ...u
15
16
  }) => {
16
17
  var x;
17
- const { token: m } = g.useToken(), { table: p, locale: y = w } = R(N), C = { ...y.Table }, b = ((x = p == null ? void 0 : p.expandable) == null ? void 0 : x.expandIcon) || (o == null ? void 0 : o.expandIcon) || O(C), k = a(() => {
18
+ const { token: m } = _.useToken(), { table: p, locale: C = N } = R(S), b = { ...C.Table }, k = ((x = p == null ? void 0 : p.expandable) == null ? void 0 : x.expandIcon) || (o == null ? void 0 : o.expandIcon) || O(b), I = a(() => {
18
19
  if (!r)
19
20
  return [];
20
21
  const t = c > 4 ? c >= 20 ? 20 : c : 4;
21
22
  return Array.from({ length: t }).map((e, n) => ({ index: n }));
22
- }, [r, c]), I = a(() => {
23
+ }, [r, c]), E = a(() => {
23
24
  var t;
24
25
  return (t = s == null ? void 0 : s.filter((e) => Object.keys(e).length !== 0)) == null ? void 0 : t.map((e) => e != null && e.isOperationCol ? e : {
25
26
  ...e,
26
27
  sorter: !1,
27
- render: (n, S, _) => /* @__PURE__ */ i.jsx(
28
+ render: (n, B, j) => /* @__PURE__ */ i.jsx(
28
29
  L,
29
30
  {
30
31
  active: !0,
31
32
  title: !1,
32
33
  paragraph: {
33
34
  rows: 1,
34
- width: (_ + 1) % 2 === 0 ? "100%" : "60%"
35
+ width: (j + 1) % 2 === 0 ? "100%" : "60%"
35
36
  }
36
37
  }
37
38
  )
38
39
  });
39
- }, [s]), E = a(() => {
40
+ }, [s]), g = a(() => {
40
41
  if (o)
41
42
  return {
42
43
  ...o,
43
44
  expandedRowRender: () => /* @__PURE__ */ i.jsx(i.Fragment, {}),
44
45
  expandIcon: (t) => {
45
- const e = b(t);
46
+ const e = k(t);
46
47
  return {
47
48
  ...e,
48
49
  props: {
@@ -56,7 +57,7 @@ const U = ({
56
57
  };
57
58
  }
58
59
  };
59
- }, [o]), j = a(() => {
60
+ }, [o]), h = a(() => {
60
61
  if (l)
61
62
  return {
62
63
  ...l,
@@ -64,7 +65,7 @@ const U = ({
64
65
  getCheckboxProps: () => ({ disabled: !0 })
65
66
  };
66
67
  }, [l]), d = T();
67
- return h(() => {
68
+ return w(() => {
68
69
  var e, n;
69
70
  const t = (n = (e = d.current) == null ? void 0 : e.nativeElement) == null ? void 0 : n.querySelector(".ant-table-body");
70
71
  t && (t.scrollLeft = 0);
@@ -73,18 +74,18 @@ const U = ({
73
74
  {
74
75
  ...u,
75
76
  ref: d,
76
- expandable: E,
77
- rowSelection: j,
77
+ expandable: g,
78
+ rowSelection: h,
78
79
  pagination: !1,
79
- columns: [f.SELECTION_COLUMN, f.EXPAND_COLUMN, ...I],
80
+ columns: [f.SELECTION_COLUMN, f.EXPAND_COLUMN, ...E],
80
81
  rowKey: "index",
81
- dataSource: k,
82
+ dataSource: I,
82
83
  loading: !1,
83
84
  style: {
84
85
  ...u.style,
85
86
  position: "absolute",
86
87
  inset: 0,
87
- top: 40,
88
+ top: y ? "var(--toolbar-height)" : 0,
88
89
  zIndex: r ? 100 : -1,
89
90
  /** 保险起见,使用了zIndex也要用opacity控制显隐 */
90
91
  opacity: r ? 1 : 0,
@@ -94,5 +95,5 @@ const U = ({
94
95
  );
95
96
  };
96
97
  export {
97
- U as default
98
+ q as default
98
99
  };
@@ -1,34 +1,34 @@
1
- const t = "_introduce_lbjuo_1", e = "_block_lbjuo_8", o = "_body_lbjuo_13", _ = "_container_lbjuo_16", n = "_header_lbjuo_23", c = "_title_lbjuo_32", l = "_content_lbjuo_47", b = "_item_lbjuo_54", i = "_checked_lbjuo_63", s = "_moveItem_lbjuo_75", d = "_isDragging_lbjuo_89", m = "_disabled_lbjuo_92", u = "_moveItemShanchu_lbjuo_103", a = {
2
- introduce: t,
3
- block: e,
4
- body: o,
5
- container: _,
6
- header: n,
1
+ const e = "_introduce_e5ppq_1", t = "_block_e5ppq_8", _ = "_body_e5ppq_13", n = "_container_e5ppq_16", o = "_header_e5ppq_23", c = "_title_e5ppq_32", p = "_content_e5ppq_47", i = "_item_e5ppq_53", s = "_checked_e5ppq_62", d = "_moveItem_e5ppq_74", m = "_isDragging_e5ppq_88", a = "_disabled_e5ppq_91", q = "_moveItemShanchu_e5ppq_102", l = {
2
+ introduce: e,
3
+ block: t,
4
+ body: _,
5
+ container: n,
6
+ header: o,
7
7
  title: c,
8
- content: l,
9
- item: b,
10
- checked: i,
11
- "content-item-text": "_content-item-text_lbjuo_66",
12
- "content-item-text-disabled": "_content-item-text-disabled_lbjuo_72",
13
- moveItem: s,
14
- isDragging: d,
15
- disabled: m,
16
- "moveItem-text": "_moveItem-text_lbjuo_96",
17
- moveItemShanchu: u
8
+ content: p,
9
+ item: i,
10
+ checked: s,
11
+ "content-item-text": "_content-item-text_e5ppq_65",
12
+ "content-item-text-disabled": "_content-item-text-disabled_e5ppq_71",
13
+ moveItem: d,
14
+ isDragging: m,
15
+ disabled: a,
16
+ "moveItem-text": "_moveItem-text_e5ppq_95",
17
+ moveItemShanchu: q
18
18
  };
19
19
  export {
20
- e as block,
21
- o as body,
22
- i as checked,
23
- _ as container,
24
- l as content,
25
- a as default,
26
- m as disabled,
27
- n as header,
28
- t as introduce,
29
- d as isDragging,
30
- b as item,
31
- s as moveItem,
32
- u as moveItemShanchu,
20
+ t as block,
21
+ _ as body,
22
+ s as checked,
23
+ n as container,
24
+ p as content,
25
+ l as default,
26
+ a as disabled,
27
+ o as header,
28
+ e as introduce,
29
+ m as isDragging,
30
+ i as item,
31
+ d as moveItem,
32
+ q as moveItemShanchu,
33
33
  c as title
34
34
  };
@@ -1,10 +1,11 @@
1
1
  import { BitzTableProps } from './Table';
2
- import BitzTableProvider, { TableContext as BitzTableContext, DensitySize as BitzTableSizeType, ProTableColumn } from './Store';
2
+ import BitzTableProvider, { TableContext as BitzTableContext, DensitySize as BitzTableSizeType } from './Store';
3
3
  import ActionBar from './ActionBar';
4
4
  import ToolBar from './ToolBar';
5
5
  import ActionCol from './ActionCol';
6
6
  import SelectionBar from './SelectionBar';
7
7
  import { ReactNode, Ref } from 'react';
8
+ import { TableColumnType } from 'antd';
8
9
  /** 操作按钮属性 */
9
10
  interface Action<T> {
10
11
  key?: string;
@@ -30,7 +31,15 @@ type ActionsFunType<T> = (record: T, index: number) => Action<T>[];
30
31
  interface BitzTableActionColProps<T> extends Pick<BitzTableActionProps<T>, 'loading'>, Omit<BitzTableColumnType<T>, 'width' | 'render'> {
31
32
  actionGroup: ActionsFunType<T>;
32
33
  }
33
- interface BitzTableColumnType<RecordType = any> extends ProTableColumn<RecordType> {
34
+ /** 列的排序和显隐控制 */
35
+ interface ColumnsConfigProps {
36
+ show?: boolean;
37
+ order?: number;
38
+ disable?: boolean | {
39
+ checkbox: boolean;
40
+ };
41
+ }
42
+ interface BitzTableColumnType<RecordType = any> extends ColumnsConfigProps, TableColumnType<RecordType> {
34
43
  /** 隐藏列 移动端生效 */
35
44
  mobileHide?: boolean;
36
45
  /** 隐藏label 移动端生效 */
@@ -48,6 +57,6 @@ type CompoundedComponent = React.ForwardRefExoticComponent<BitzTableProps> & {
48
57
  ActionCol: typeof ActionCol;
49
58
  };
50
59
  declare const BitzTable: CompoundedComponent;
51
- export type { BitzTableProps, BitzTableSizeType, BitzTableColumnType, BitzTableColumnsType, ActionsFunType, Action, BitzTableActionProps, BitzTableActionColProps, };
60
+ export type { BitzTableProps, BitzTableSizeType, ColumnsConfigProps, BitzTableColumnType, BitzTableColumnsType, ActionsFunType, Action, BitzTableActionProps, BitzTableActionColProps, };
52
61
  export { BitzTableProvider, BitzTableContext };
53
62
  export default BitzTable;