bitz-react-admin-ui 2.6.1 → 2.6.3
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 +2 -5
- package/dist/components/BitzCalendar/index.mjs +1 -1
- package/dist/components/BitzConfigProvider/context.d.ts +7 -1
- 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/CalendarBody.mjs +1 -1
- package/dist/components/BitzFuiCalendar/CalendarHead.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/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
- package/dist/components/BitzMeetingTime/index.mjs +1 -1
- package/dist/components/BitzTable/ActionCol/index.mjs +73 -73
- package/dist/components/BitzTable/Store/index.d.ts +30 -0
- package/dist/components/BitzTable/Store/index.mjs +246 -217
- package/dist/components/BitzTable/Store/utils/index.d.ts +1 -1
- package/dist/components/BitzTable/Store/utils/index.mjs +12 -12
- package/dist/components/BitzTable/Table/index.d.ts +9 -1
- package/dist/components/BitzTable/Table/index.mjs +425 -403
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +103 -95
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +2 -1
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +243 -197
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +141 -105
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.d.ts +8 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +23 -0
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +127 -74
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +76 -25
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +151 -96
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +29 -27
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +19 -9
- package/dist/components/BitzTable/ToolBar/Modal/style.d.ts +4 -0
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +42 -14
- package/dist/components/BitzTable/index.d.ts +2 -0
- package/dist/node_modules/.store/dayjs@1.11.11/node_modules/dayjs/dayjs.min.mjs +292 -292
- package/dist/node_modules/.store/dayjs@1.11.11/node_modules/dayjs/locale/zh-cn.mjs +13 -13
- package/dist/node_modules/.store/lodash@4.17.21/node_modules/lodash/debounce.mjs +34 -37
- package/dist/style.css +1 -1
- package/dist/utils/time.mjs +1 -1
- package/package.json +1 -1
- package/dist/_virtual/dayjs.min2.mjs +0 -4
- package/dist/node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/useDebounceFn/index.mjs +0 -29
- package/dist/node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/utils/lodash-polyfill.mjs +0 -7
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { __require as o } from "../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/dayjs.min.mjs";
|
|
3
|
-
var t = o();
|
|
4
|
-
const s = /* @__PURE__ */ r(t);
|
|
1
|
+
var a = { exports: {} };
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
a as __module
|
|
7
4
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as n } from "../../node_modules/.store/react@18.3.1/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 "../../
|
|
4
|
+
import N from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/dayjs.min.mjs";
|
|
5
5
|
import B from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/plugin/weekOfYear.mjs";
|
|
6
6
|
import "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/locale/zh-cn.mjs";
|
|
7
7
|
N.extend(B);
|
|
@@ -13,10 +13,16 @@ export type StylesConfigScopeType = 'current' | 'global';
|
|
|
13
13
|
export interface TableComponentContextProps {
|
|
14
14
|
/** 是否显示外边框和列边框 */
|
|
15
15
|
bordered?: BitzTableBorderedType;
|
|
16
|
-
/**
|
|
16
|
+
/** size */
|
|
17
17
|
defaultSize?: DensitySize;
|
|
18
18
|
/** 是否开启斑马纹,填充偶数行背景色 */
|
|
19
19
|
zebra?: boolean;
|
|
20
|
+
/** 操作列位置 */
|
|
21
|
+
operationPlacement?: boolean;
|
|
22
|
+
/** pageSize */
|
|
23
|
+
pageSize?: boolean;
|
|
24
|
+
/** 数据排序 */
|
|
25
|
+
orderBy?: boolean;
|
|
20
26
|
/** 是否开启rowHover样式 */
|
|
21
27
|
rowHoverable?: boolean;
|
|
22
28
|
/** 根据从左到右方向排序,不在数组中则不显示 */
|
|
@@ -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 "../../
|
|
2
|
+
import o from "../../node_modules/.store/dayjs@1.11.11/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.3.1/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.11/node_modules/dayjs/plugin/isToday.mjs";
|
|
4
|
-
import n from "../../
|
|
4
|
+
import n from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/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.3.1/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 "../../
|
|
4
|
+
import r from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/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.3.1/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 "../../
|
|
5
|
+
import j from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/dayjs.min.mjs";
|
|
6
6
|
import x from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/plugin/isoWeek.mjs";
|
|
7
7
|
j.extend(x);
|
|
8
8
|
const N = (n) => {
|
|
@@ -2,7 +2,7 @@ import { j as i } from "../../node_modules/.store/react@18.3.1/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 s } from "./BitzFuiCalendarStore.mjs";
|
|
5
|
-
import f from "../../
|
|
5
|
+
import f from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/dayjs.min.mjs";
|
|
6
6
|
import p from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/plugin/isoWeek.mjs";
|
|
7
7
|
f.extend(p);
|
|
8
8
|
const j = () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as a } from "../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import { memo as m, useMemo as r } from "react";
|
|
3
|
-
import d from "../../
|
|
3
|
+
import d from "../../node_modules/.store/dayjs@1.11.11/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.3.1/node_modules/reac
|
|
|
2
2
|
import { useMemo as s } from "react";
|
|
3
3
|
import { Space as c, Button as i, DatePicker as h, Dropdown as C } from "antd";
|
|
4
4
|
import { useBitzFuiCalendarStore as b, CalendarTypeEnum as a } from "./BitzFuiCalendarStore.mjs";
|
|
5
|
-
import w from "../../
|
|
5
|
+
import w from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/dayjs.min.mjs";
|
|
6
6
|
import g from "../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/AppstoreOutlined.mjs";
|
|
7
7
|
import v from "../../node_modules/.store/@ant-design_icons@5.3.7/node_modules/@ant-design/icons/es/icons/LeftOutlined.mjs";
|
|
8
8
|
import T from "../../node_modules/.store/@ant-design_icons@5.3.7/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.11/node_modules/dayjs/plugin/isSameOrAfter.mjs";
|
|
5
5
|
import F from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrBefore.mjs";
|
|
6
6
|
import M from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/plugin/utc.mjs";
|
|
7
|
-
import r from "../../
|
|
7
|
+
import r from "../../node_modules/.store/dayjs@1.11.11/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.11/node_modules/dayjs/plugin/objectSupport.mjs";
|
|
4
4
|
import H from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/plugin/isSameOrAfter.mjs";
|
|
5
5
|
import D from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/plugin/utc.mjs";
|
|
6
|
-
import e from "../../
|
|
6
|
+
import e from "../../node_modules/.store/dayjs@1.11.11/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.3.1/node_modules/reac
|
|
|
2
2
|
import { useMemo as d } from "react";
|
|
3
3
|
import p from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/plugin/objectSupport.mjs";
|
|
4
4
|
import T from "./BitzMeetingTimeItem.mjs";
|
|
5
|
-
import m from "../../
|
|
5
|
+
import m from "../../node_modules/.store/dayjs@1.11.11/node_modules/dayjs/dayjs.min.mjs";
|
|
6
6
|
import "./index.less.mjs";
|
|
7
7
|
m.extend(p);
|
|
8
8
|
const x = (a) => {
|
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { Space as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import
|
|
1
|
+
import { j as l } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import I from "../../../node_modules/.store/ahooks@3.8.0/node_modules/ahooks/es/useSize/index.mjs";
|
|
3
|
+
import { Space as R, Skeleton as P, theme as E } from "antd";
|
|
4
|
+
import { forwardRef as L, useContext as M, useMemo as g, Fragment as D, useRef as w } from "react";
|
|
5
|
+
import f from "../../BitzButton/index.mjs";
|
|
6
6
|
import F, { actionColBtnGap as H } from "./style.mjs";
|
|
7
7
|
import "../index.mjs";
|
|
8
|
-
import
|
|
8
|
+
import z from "../Dropdown/index.mjs";
|
|
9
9
|
import { tablePaddingInline as O } from "../../BitzConfigProvider/context.mjs";
|
|
10
10
|
import { BitzTableContext as W } from "../Store/index.mjs";
|
|
11
11
|
const b = ({
|
|
12
|
-
skeletonCls:
|
|
13
|
-
...
|
|
14
|
-
}) => /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
12
|
+
skeletonCls: h,
|
|
13
|
+
...s
|
|
14
|
+
}) => /* @__PURE__ */ l.jsxs(f, { type: "text", ...s, children: [
|
|
15
|
+
/* @__PURE__ */ l.jsx("span", { children: s.children }),
|
|
16
|
+
/* @__PURE__ */ l.jsx(
|
|
17
|
+
P,
|
|
18
18
|
{
|
|
19
19
|
active: !0,
|
|
20
20
|
title: !1,
|
|
21
|
-
className:
|
|
21
|
+
className: h,
|
|
22
22
|
paragraph: {
|
|
23
23
|
rows: 1,
|
|
24
24
|
width: "100%"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
|
-
] }), _ =
|
|
29
|
-
({ loading:
|
|
30
|
-
const { loading:
|
|
31
|
-
primaryBtnClassName:
|
|
32
|
-
dangerBtnClassName:
|
|
33
|
-
secondaryBtnClassName:
|
|
34
|
-
maskClassName:
|
|
35
|
-
skeletonBtnClassName:
|
|
36
|
-
skeletonClassName:
|
|
37
|
-
} = F(),
|
|
38
|
-
const
|
|
39
|
-
if (
|
|
28
|
+
] }), _ = L(
|
|
29
|
+
({ loading: h, actionGroup: s, customActions: r }, p) => {
|
|
30
|
+
const { loading: C, fullscreen: y } = M(W), o = g(() => h ?? C, [h, C]), {
|
|
31
|
+
primaryBtnClassName: c,
|
|
32
|
+
dangerBtnClassName: n,
|
|
33
|
+
secondaryBtnClassName: x,
|
|
34
|
+
maskClassName: j,
|
|
35
|
+
skeletonBtnClassName: k,
|
|
36
|
+
skeletonClassName: u
|
|
37
|
+
} = F(), B = g(() => {
|
|
38
|
+
const a = s.length >= 4 ? 2 : s.length, d = s.slice(0, a), t = [];
|
|
39
|
+
if (d != null && d.length && d.forEach((e, i) => {
|
|
40
40
|
t.push(
|
|
41
|
-
|
|
41
|
+
o ? /* @__PURE__ */ l.jsx(
|
|
42
42
|
b,
|
|
43
43
|
{
|
|
44
|
-
className:
|
|
45
|
-
skeletonCls:
|
|
44
|
+
className: k,
|
|
45
|
+
skeletonCls: u,
|
|
46
46
|
children: e == null ? void 0 : e.label
|
|
47
47
|
},
|
|
48
|
-
|
|
49
|
-
) : e.children ? /* @__PURE__ */
|
|
50
|
-
|
|
48
|
+
i
|
|
49
|
+
) : e.children ? /* @__PURE__ */ l.jsx(z, { menu: { items: e.children }, children: /* @__PURE__ */ l.jsx(
|
|
50
|
+
f,
|
|
51
51
|
{
|
|
52
52
|
type: "text",
|
|
53
|
-
className: e.danger ?
|
|
53
|
+
className: e.danger ? n : c,
|
|
54
54
|
children: e == null ? void 0 : e.label
|
|
55
55
|
}
|
|
56
|
-
) },
|
|
57
|
-
|
|
56
|
+
) }, i) : /* @__PURE__ */ l.jsx(
|
|
57
|
+
f,
|
|
58
58
|
{
|
|
59
59
|
type: "text",
|
|
60
|
-
className: e.danger ?
|
|
60
|
+
className: e.danger ? n : c,
|
|
61
61
|
onClick: e == null ? void 0 : e.onClick,
|
|
62
62
|
children: e == null ? void 0 : e.label
|
|
63
63
|
},
|
|
64
|
-
|
|
64
|
+
i
|
|
65
65
|
)
|
|
66
66
|
);
|
|
67
|
-
}),
|
|
68
|
-
const e =
|
|
67
|
+
}), a === 2 && s.length >= 4) {
|
|
68
|
+
const e = s.slice(2, s.length);
|
|
69
69
|
t.push(
|
|
70
|
-
|
|
70
|
+
o ? /* @__PURE__ */ l.jsx(
|
|
71
71
|
b,
|
|
72
72
|
{
|
|
73
|
-
className:
|
|
74
|
-
skeletonCls:
|
|
73
|
+
className: k,
|
|
74
|
+
skeletonCls: u,
|
|
75
75
|
children: "更多"
|
|
76
76
|
},
|
|
77
77
|
5
|
|
78
|
-
) : /* @__PURE__ */
|
|
78
|
+
) : /* @__PURE__ */ l.jsx(z, { menu: { items: e }, children: /* @__PURE__ */ l.jsx(f, { type: "text", className: x, children: "更多" }) }, 5)
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
return t;
|
|
82
|
-
}, [
|
|
82
|
+
}, [o, s]), N = g(() => {
|
|
83
83
|
if (!(r != null && r.length))
|
|
84
84
|
return;
|
|
85
|
-
const
|
|
85
|
+
const a = r.map((t, e) => /* @__PURE__ */ l.jsx(
|
|
86
86
|
b,
|
|
87
87
|
{
|
|
88
|
-
className:
|
|
89
|
-
skeletonCls:
|
|
88
|
+
className: k,
|
|
89
|
+
skeletonCls: u,
|
|
90
90
|
children: t == null ? void 0 : t.label
|
|
91
91
|
},
|
|
92
92
|
e
|
|
93
|
-
)),
|
|
94
|
-
let
|
|
95
|
-
|
|
93
|
+
)), d = r.map((t, e) => {
|
|
94
|
+
let i = /* @__PURE__ */ l.jsx(
|
|
95
|
+
f,
|
|
96
96
|
{
|
|
97
97
|
type: "text",
|
|
98
|
-
className: t.danger ?
|
|
98
|
+
className: t.danger ? n : c,
|
|
99
99
|
onClick: t.onClick,
|
|
100
100
|
children: t == null ? void 0 : t.label
|
|
101
101
|
},
|
|
102
102
|
e
|
|
103
103
|
);
|
|
104
|
-
t.type === "secondary" && (
|
|
105
|
-
|
|
104
|
+
t.type === "secondary" && (i = /* @__PURE__ */ l.jsx(
|
|
105
|
+
f,
|
|
106
106
|
{
|
|
107
107
|
type: "text",
|
|
108
|
-
className:
|
|
108
|
+
className: x,
|
|
109
109
|
onClick: t.onClick,
|
|
110
110
|
children: t == null ? void 0 : t.label
|
|
111
111
|
},
|
|
112
112
|
e
|
|
113
113
|
));
|
|
114
|
-
const
|
|
115
|
-
return
|
|
114
|
+
const m = t.render ?? ((S, T) => /* @__PURE__ */ l.jsx(D, { children: S }, T));
|
|
115
|
+
return m == null ? void 0 : m(i, e);
|
|
116
116
|
});
|
|
117
|
-
return
|
|
118
|
-
}, [
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
117
|
+
return o ? a : d;
|
|
118
|
+
}, [o, r]);
|
|
119
|
+
return /* @__PURE__ */ l.jsxs("div", { onClick: (a) => a.stopPropagation(), style: { overflow: "hidden" }, children: [
|
|
120
|
+
/* @__PURE__ */ l.jsx(R, { size: H, ref: p, className: "actionGroup", children: N ?? B }),
|
|
121
|
+
/* @__PURE__ */ l.jsx("div", { className: j })
|
|
122
122
|
] });
|
|
123
123
|
}
|
|
124
124
|
);
|
|
125
|
-
function $(
|
|
126
|
-
var
|
|
127
|
-
const { actionGroup:
|
|
128
|
-
return
|
|
129
|
-
width: Math.floor(
|
|
125
|
+
function $(h) {
|
|
126
|
+
var u;
|
|
127
|
+
const { actionGroup: s, loading: r, customActions: p, defaultWidth: C, ...y } = h, o = ((u = E.useToken().token.Table) == null ? void 0 : u.cellPaddingInline) ?? O, c = w(null), n = I(c), x = w(0), j = g(() => (n != null && n.width && (x.current = n == null ? void 0 : n.width), !(n != null && n.width) && x.current ? x.current + o * 2 + 1 : n != null && n.width ? n.width + o * 2 + 1 : C ?? 141), [n, o, C]);
|
|
128
|
+
return g(() => ({
|
|
129
|
+
width: Math.floor(j),
|
|
130
130
|
mobileHide: !0,
|
|
131
131
|
isOperationCol: !0,
|
|
132
132
|
title: "操作",
|
|
@@ -135,21 +135,21 @@ function $(m) {
|
|
|
135
135
|
dataIndex: "operationCol",
|
|
136
136
|
className: "operationCol",
|
|
137
137
|
disabled: !0,
|
|
138
|
-
render: (
|
|
139
|
-
var
|
|
140
|
-
const
|
|
141
|
-
return /* @__PURE__ */
|
|
138
|
+
render: (B, N, a) => {
|
|
139
|
+
var e, i;
|
|
140
|
+
const d = ((e = p == null ? void 0 : p(N, a)) == null ? void 0 : e.filter((m) => m.type != "detail")) ?? [], t = ((i = s == null ? void 0 : s(N, a)) == null ? void 0 : i.filter((m) => m.type != "detail")) ?? [];
|
|
141
|
+
return /* @__PURE__ */ l.jsx(
|
|
142
142
|
_,
|
|
143
143
|
{
|
|
144
|
-
actionGroup:
|
|
145
|
-
customActions:
|
|
144
|
+
actionGroup: t,
|
|
145
|
+
customActions: d,
|
|
146
146
|
loading: r,
|
|
147
|
-
ref:
|
|
147
|
+
ref: c
|
|
148
148
|
}
|
|
149
149
|
);
|
|
150
150
|
},
|
|
151
151
|
...y
|
|
152
|
-
}), [
|
|
152
|
+
}), [j, c, r, s, p]);
|
|
153
153
|
}
|
|
154
154
|
export {
|
|
155
155
|
_ as BitzTableAction,
|
|
@@ -28,10 +28,14 @@ export type ColumnStateType<TableKey extends string = any> = {
|
|
|
28
28
|
/** 仅在 persistenceType=online 有效 用于获取网络数据 */
|
|
29
29
|
onlineGet?: (key: TableKey) => Promise<Record<string, ColumnsConfigProps> | null | undefined>;
|
|
30
30
|
};
|
|
31
|
+
export type OrderByType = 'asc' | 'desc';
|
|
31
32
|
export interface StylesConfigProps {
|
|
32
33
|
size?: DensitySize;
|
|
33
34
|
bordered?: BitzTableBorderedType;
|
|
34
35
|
zebra?: boolean;
|
|
36
|
+
operationPlacement?: 'left' | 'right';
|
|
37
|
+
pageSize?: number;
|
|
38
|
+
orderBy?: OrderByType;
|
|
35
39
|
}
|
|
36
40
|
export interface StylesConfigOnChangeValue extends StylesConfigProps {
|
|
37
41
|
stylesScope?: StylesConfigScopeType;
|
|
@@ -95,6 +99,12 @@ export type UseContainerProps<T = any> = {
|
|
|
95
99
|
defaultZebra?: StylesConfigProps['zebra'];
|
|
96
100
|
bordered?: BitzTableBorderedType;
|
|
97
101
|
defaultBordered?: BitzTableBorderedType;
|
|
102
|
+
operationPlacement?: StylesConfigProps['operationPlacement'];
|
|
103
|
+
defaultOperationPlacement?: StylesConfigProps['operationPlacement'];
|
|
104
|
+
pageSize?: StylesConfigProps['pageSize'];
|
|
105
|
+
defaultPageSize?: StylesConfigProps['pageSize'];
|
|
106
|
+
orderBy?: StylesConfigProps['orderBy'];
|
|
107
|
+
defaultOrderBy?: StylesConfigProps['orderBy'];
|
|
98
108
|
/** 导出配置 */
|
|
99
109
|
exportConfigState?: ExportColumnStateType;
|
|
100
110
|
defaultExportConfig?: ExportConfigProps;
|
|
@@ -114,6 +124,12 @@ declare function useContainer(props: UseContainerProps): {
|
|
|
114
124
|
setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
115
125
|
toolbarWidth: number;
|
|
116
126
|
setToolbarWidth: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
127
|
+
startAutoSaveCountdown: () => void;
|
|
128
|
+
isSaving: boolean;
|
|
129
|
+
countdown: number;
|
|
130
|
+
cancelAutoSave: () => void;
|
|
131
|
+
immediateSave: () => void;
|
|
132
|
+
setCountdown: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
117
133
|
columns: BitzTableColumnsType<any> | undefined;
|
|
118
134
|
baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[];
|
|
119
135
|
persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
@@ -136,6 +152,9 @@ declare function useContainer(props: UseContainerProps): {
|
|
|
136
152
|
size: "xl" | "lg" | "md" | "sm" | "xs";
|
|
137
153
|
zebra: boolean;
|
|
138
154
|
bordered: BitzTableBorderedType;
|
|
155
|
+
operationPlacement: boolean | "left" | "right";
|
|
156
|
+
pageSize: number | boolean;
|
|
157
|
+
orderBy: boolean | OrderByType;
|
|
139
158
|
} & StylesConfigProps;
|
|
140
159
|
exportConfig: ExportConfigProps<"config">;
|
|
141
160
|
setTableExportConfig: (updater: ExportConfigProps<"config"> | ((origin: ExportConfigProps<"config">) => ExportConfigProps<"config">), ignoreDestroy?: boolean | undefined) => void;
|
|
@@ -148,6 +167,7 @@ declare function useContainer(props: UseContainerProps): {
|
|
|
148
167
|
rowHoverable: boolean;
|
|
149
168
|
showColumnBorder: boolean;
|
|
150
169
|
hideRowBorder: boolean;
|
|
170
|
+
operationPlacement: "left" | "right" | undefined;
|
|
151
171
|
};
|
|
152
172
|
declare const BitzTableContext: import("react").Context<{
|
|
153
173
|
loading: boolean;
|
|
@@ -161,6 +181,12 @@ declare const BitzTableContext: import("react").Context<{
|
|
|
161
181
|
setSelected: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
162
182
|
toolbarWidth: number;
|
|
163
183
|
setToolbarWidth: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
184
|
+
startAutoSaveCountdown: () => void;
|
|
185
|
+
isSaving: boolean;
|
|
186
|
+
countdown: number;
|
|
187
|
+
cancelAutoSave: () => void;
|
|
188
|
+
immediateSave: () => void;
|
|
189
|
+
setCountdown: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
164
190
|
columns: BitzTableColumnsType<any> | undefined;
|
|
165
191
|
baseColumns: (BitzTableColumnType<any> | import("..").BitzTableColumnGroupType<any>)[];
|
|
166
192
|
persistenceType: "online" | "localStorage" | "sessionStorage" | undefined;
|
|
@@ -183,6 +209,9 @@ declare const BitzTableContext: import("react").Context<{
|
|
|
183
209
|
size: "xl" | "lg" | "md" | "sm" | "xs";
|
|
184
210
|
zebra: boolean;
|
|
185
211
|
bordered: BitzTableBorderedType;
|
|
212
|
+
operationPlacement: boolean | "left" | "right";
|
|
213
|
+
pageSize: number | boolean;
|
|
214
|
+
orderBy: boolean | OrderByType;
|
|
186
215
|
} & StylesConfigProps;
|
|
187
216
|
exportConfig: ExportConfigProps<"config">;
|
|
188
217
|
setTableExportConfig: (updater: ExportConfigProps<"config"> | ((origin: ExportConfigProps<"config">) => ExportConfigProps<"config">), ignoreDestroy?: boolean | undefined) => void;
|
|
@@ -195,6 +224,7 @@ declare const BitzTableContext: import("react").Context<{
|
|
|
195
224
|
rowHoverable: boolean;
|
|
196
225
|
showColumnBorder: boolean;
|
|
197
226
|
hideRowBorder: boolean;
|
|
227
|
+
operationPlacement: "left" | "right" | undefined;
|
|
198
228
|
}>;
|
|
199
229
|
export type ContainerType = typeof useContainer;
|
|
200
230
|
declare const Container: React.FC<{
|