bitz-react-admin-ui 1.9.6 → 1.9.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.
@@ -1,18 +1,40 @@
1
- import { Table as e } from "antd";
2
- const l = 0, t = 1;
3
- function I(d, o, f, i) {
4
- let x = l;
5
- if (f) {
6
- const n = d.indexOf(e.SELECTION_COLUMN);
7
- n >= 0 && (x = n), o.splice(x, 0, e.SELECTION_COLUMN);
1
+ import { j as f } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { Skeleton as x, Table as d } from "antd";
3
+ function a(o, t) {
4
+ return o == null ? void 0 : o.map((e) => {
5
+ const n = { ...e };
6
+ return e != null && e.isOperationCol || e != null && e.isToolCol || t.includes(e) ? e : (n != null && n.children && (n.children = a(n == null ? void 0 : n.children, t)), {
7
+ ...n,
8
+ sorter: !1,
9
+ render: (l, i, r) => /* @__PURE__ */ f.jsx(
10
+ x,
11
+ {
12
+ active: !0,
13
+ title: !1,
14
+ paragraph: {
15
+ rows: 1,
16
+ width: (r + 1) % 2 === 0 ? "100%" : "60%"
17
+ }
18
+ }
19
+ )
20
+ });
21
+ });
22
+ }
23
+ const C = 0, c = 1;
24
+ function s(o, t, e, n) {
25
+ let l = C;
26
+ if (e) {
27
+ const i = o.indexOf(d.SELECTION_COLUMN);
28
+ i >= 0 && (l = i), t.splice(l, 0, d.SELECTION_COLUMN);
8
29
  }
9
- if (i) {
10
- let n = 0;
11
- const C = d.indexOf(e.EXPAND_COLUMN);
12
- C >= 0 && (n = C), f && x === 0 && C === -1 && (n = t), o.splice(n, 0, e.EXPAND_COLUMN);
30
+ if (n) {
31
+ let i = 0;
32
+ const r = o.indexOf(d.EXPAND_COLUMN);
33
+ r >= 0 && (i = r), e && l === 0 && r === -1 && (i = c), t.splice(i, 0, d.EXPAND_COLUMN);
13
34
  }
14
- return o;
35
+ return t;
15
36
  }
16
37
  export {
17
- I as getColumnsWithTool
38
+ s as getColumnsWithTool,
39
+ a as loopBuildSkeleton
18
40
  };
@@ -47,10 +47,16 @@ interface BitzTableColumnType<RecordType = any> extends ColumnsConfigProps, Tabl
47
47
  mobileHideLabel?: boolean;
48
48
  /** 是否为操作列 */
49
49
  isOperationCol?: boolean;
50
+ /** 是否为复选框/展开列 */
51
+ isToolCol?: boolean;
50
52
  /** 列宽根据内容宽度最大的设置(只应用在操作列上) */
51
53
  useMaxWidth?: boolean;
52
54
  }
53
- type BitzTableColumnsType<DataType> = BitzTableColumnType<DataType>[];
55
+ /** 表头分组 */
56
+ interface BitzTableColumnGroupType<RecordType> extends Omit<BitzTableColumnType<RecordType>, 'dataIndex'> {
57
+ children: BitzTableColumnsType<RecordType>;
58
+ }
59
+ type BitzTableColumnsType<RecordType> = (BitzTableColumnType<RecordType> | BitzTableColumnGroupType<RecordType>)[];
54
60
  type CompoundedComponent = React.ForwardRefExoticComponent<BitzTableProps> & {
55
61
  ActionBar: typeof ActionBar;
56
62
  ToolBar: typeof ToolBar;
@@ -58,6 +64,6 @@ type CompoundedComponent = React.ForwardRefExoticComponent<BitzTableProps> & {
58
64
  ActionCol: typeof ActionCol;
59
65
  };
60
66
  declare const BitzTable: CompoundedComponent;
61
- export type { BitzTableProps, BitzTableSizeType, ColumnsConfigProps, SizeStateType, ColumnStateType, BitzTableColumnType, BitzTableColumnsType, ActionsFunType, Action, BitzTableActionProps, BitzTableActionColProps, };
67
+ export type { BitzTableProps, BitzTableSizeType, ColumnsConfigProps, SizeStateType, ColumnStateType, BitzTableColumnType, BitzTableColumnGroupType, BitzTableColumnsType, ActionsFunType, Action, BitzTableActionProps, BitzTableActionColProps, };
62
68
  export { BitzTableProvider, BitzTableContext };
63
69
  export default BitzTable;