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.
- package/dist/_virtual/dayjs.min.mjs +5 -2
- package/dist/_virtual/dayjs.min2.mjs +4 -0
- package/dist/components/BitzCalendar/index.mjs +1 -1
- package/dist/components/BitzConfigProvider/index.d.ts +3 -0
- package/dist/components/BitzConfirmModal/index.d.ts +6 -5
- package/dist/components/BitzConfirmModal/index.mjs +33 -65
- package/dist/components/BitzDayJs/index.mjs +1 -1
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
- package/dist/components/BitzFullScreen/index.d.ts +6 -1
- package/dist/components/BitzFullScreen/index.mjs +22 -14
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
- package/dist/components/BitzMeetingTime/index.mjs +1 -1
- package/dist/components/BitzTable/Store/index.d.ts +18 -27
- package/dist/components/BitzTable/Store/utils/index.d.ts +2 -2
- package/dist/components/BitzTable/Table/index.mjs +255 -238
- package/dist/components/BitzTable/TableSkeleton/index.mjs +20 -19
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.module.less.mjs +29 -29
- package/dist/components/BitzTable/index.d.ts +12 -3
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
- package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
- package/dist/style.css +1 -1
- package/dist/utils/time.mjs +1 -1
- 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
|
|
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
|
|
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
|
|
7
|
-
import { ConfigContext as
|
|
8
|
-
const
|
|
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 } =
|
|
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]),
|
|
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,
|
|
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: (
|
|
35
|
+
width: (j + 1) % 2 === 0 ? "100%" : "60%"
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
)
|
|
38
39
|
});
|
|
39
|
-
}, [s]),
|
|
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 =
|
|
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]),
|
|
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
|
|
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:
|
|
77
|
-
rowSelection:
|
|
77
|
+
expandable: g,
|
|
78
|
+
rowSelection: h,
|
|
78
79
|
pagination: !1,
|
|
79
|
-
columns: [f.SELECTION_COLUMN, f.EXPAND_COLUMN, ...
|
|
80
|
+
columns: [f.SELECTION_COLUMN, f.EXPAND_COLUMN, ...E],
|
|
80
81
|
rowKey: "index",
|
|
81
|
-
dataSource:
|
|
82
|
+
dataSource: I,
|
|
82
83
|
loading: !1,
|
|
83
84
|
style: {
|
|
84
85
|
...u.style,
|
|
85
86
|
position: "absolute",
|
|
86
87
|
inset: 0,
|
|
87
|
-
top:
|
|
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
|
-
|
|
98
|
+
q as default
|
|
98
99
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
const
|
|
2
|
-
introduce:
|
|
3
|
-
block:
|
|
4
|
-
body:
|
|
5
|
-
container:
|
|
6
|
-
header:
|
|
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:
|
|
9
|
-
item:
|
|
10
|
-
checked:
|
|
11
|
-
"content-item-text": "_content-item-
|
|
12
|
-
"content-item-text-disabled": "_content-item-text-
|
|
13
|
-
moveItem:
|
|
14
|
-
isDragging:
|
|
15
|
-
disabled:
|
|
16
|
-
"moveItem-text": "_moveItem-
|
|
17
|
-
moveItemShanchu:
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
|
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
|
-
|
|
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;
|