bitz-react-admin-ui 2.2.7 → 2.2.9
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/Draggable.mjs +4 -0
- package/dist/_virtual/DraggableCore.mjs +4 -0
- package/dist/_virtual/Resizable.mjs +4 -0
- package/dist/_virtual/ResizableBox.mjs +4 -0
- package/dist/_virtual/_commonjsHelpers.mjs +26 -4
- package/dist/_virtual/cjs.mjs +4 -0
- package/dist/_virtual/clsx.m.mjs +6 -0
- package/dist/_virtual/domFns.mjs +4 -0
- package/dist/_virtual/getPrefix.mjs +4 -0
- package/dist/_virtual/index.mjs +2 -2
- package/dist/_virtual/index2.mjs +2 -2
- package/dist/_virtual/index6.mjs +4 -0
- package/dist/_virtual/log.mjs +4 -0
- package/dist/_virtual/positionFns.mjs +4 -0
- package/dist/_virtual/propTypes.mjs +4 -0
- package/dist/_virtual/shims.mjs +4 -0
- package/dist/_virtual/utils.mjs +4 -0
- package/dist/components/BitzTable/ActionBar/ActionBar.d.ts +21 -9
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +84 -51
- package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
- package/dist/components/BitzTable/ActionCol/index.mjs +66 -58
- package/dist/components/BitzTable/Store/utils/index.d.ts +1 -1
- package/dist/components/BitzTable/Store/utils/index.mjs +21 -21
- package/dist/components/BitzTable/SubTable/index.mjs +7 -1
- package/dist/components/BitzTable/Table/ResizableTitle.d.ts +8 -0
- package/dist/components/BitzTable/Table/ResizableTitle.mjs +32 -0
- package/dist/components/BitzTable/Table/index.d.ts +1 -1
- package/dist/components/BitzTable/Table/index.mjs +319 -299
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +4 -0
- package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
- package/dist/node_modules/.store/clsx@1.2.1/node_modules/clsx/dist/clsx.m.mjs +22 -0
- package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +9 -8
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/Draggable.mjs +343 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/DraggableCore.mjs +324 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/cjs.mjs +14 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/domFns.mjs +174 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/getPrefix.mjs +35 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/log.mjs +7 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/positionFns.mjs +107 -0
- package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/shims.mjs +30 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/Resizable.mjs +201 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/ResizableBox.mjs +162 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/propTypes.mjs +118 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/utils.mjs +54 -0
- package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs +13 -0
- package/dist/node_modules/.store/use-sync-external-store@1.2.0/node_modules/use-sync-external-store/shim/index.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
1
|
+
var u = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function f(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
5
|
+
function l(e) {
|
|
6
|
+
if (e.__esModule)
|
|
7
|
+
return e;
|
|
8
|
+
var r = e.default;
|
|
9
|
+
if (typeof r == "function") {
|
|
10
|
+
var t = function o() {
|
|
11
|
+
return this instanceof o ? Reflect.construct(r, arguments, this.constructor) : r.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
t.prototype = r.prototype;
|
|
14
|
+
} else
|
|
15
|
+
t = {};
|
|
16
|
+
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(o) {
|
|
17
|
+
var n = Object.getOwnPropertyDescriptor(e, o);
|
|
18
|
+
Object.defineProperty(t, o, n.get ? n : {
|
|
19
|
+
enumerable: !0,
|
|
20
|
+
get: function() {
|
|
21
|
+
return e[o];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}), t;
|
|
25
|
+
}
|
|
5
26
|
export {
|
|
6
|
-
|
|
7
|
-
l as
|
|
27
|
+
u as commonjsGlobal,
|
|
28
|
+
l as getAugmentedNamespace,
|
|
29
|
+
f as getDefaultExportFromCjs
|
|
8
30
|
};
|
package/dist/_virtual/index.mjs
CHANGED
package/dist/_virtual/index2.mjs
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { FC, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
-
import { DropdownProps } from 'antd';
|
|
2
|
+
import { DropdownProps as AntDropdownProps, ButtonProps as AntButtonProps } from 'antd';
|
|
3
3
|
import { SubMenuType } from 'antd/es/menu/hooks/useItems';
|
|
4
4
|
import { DensitySize } from '../Store';
|
|
5
|
-
|
|
5
|
+
interface AddButtonType extends Omit<AntButtonProps, 'children' | 'onClick'> {
|
|
6
6
|
/** 按钮文字 */
|
|
7
7
|
text: string;
|
|
8
8
|
show?: boolean;
|
|
9
9
|
onClick: MouseEventHandler;
|
|
10
|
-
}
|
|
11
|
-
|
|
10
|
+
}
|
|
11
|
+
interface ExcelButtonType extends Omit<AntDropdownProps, 'menu' | 'children'> {
|
|
12
12
|
show?: boolean;
|
|
13
13
|
/** 按钮文字 */
|
|
14
14
|
text?: string;
|
|
15
|
-
/** 触发下拉菜单的方式 */
|
|
16
|
-
trigger?: DropdownProps['trigger'];
|
|
17
15
|
menu?: SubMenuType[];
|
|
18
16
|
/**
|
|
19
17
|
* menu点击事件,通过key值判断是下载或导入
|
|
@@ -22,15 +20,29 @@ type ExcelButtonType = {
|
|
|
22
20
|
*/
|
|
23
21
|
onClick?: (key: string) => void;
|
|
24
22
|
otherMenu?: SubMenuType[];
|
|
25
|
-
}
|
|
23
|
+
}
|
|
24
|
+
interface ButtonProps extends Omit<AntButtonProps, 'type' | 'children'> {
|
|
25
|
+
type: 'primary' | 'secondary';
|
|
26
|
+
text: string;
|
|
27
|
+
}
|
|
28
|
+
interface DropdownProps extends AntDropdownProps {
|
|
29
|
+
type: 'dropdown';
|
|
30
|
+
text: string;
|
|
31
|
+
}
|
|
32
|
+
export type ActionbarBtnTypeValue = 'primary' | 'secondary' | 'dropdown';
|
|
33
|
+
export type ActionbarBtnBaseType<T extends ActionbarBtnTypeValue = 'primary'> = T extends 'primary' | 'secondary' ? Omit<AntButtonProps, 'type'> : DropdownProps;
|
|
34
|
+
export type ActionbarBtnType<T extends ActionbarBtnTypeValue = 'primary'> = {
|
|
35
|
+
type: T;
|
|
36
|
+
} & ActionbarBtnBaseType<T>;
|
|
26
37
|
export interface BitzTableActionBarProps {
|
|
27
38
|
size?: DensitySize;
|
|
28
39
|
/** 添加按钮 */
|
|
29
|
-
add
|
|
40
|
+
add?: AddButtonType;
|
|
30
41
|
/** excel dropdown按钮,下载和导入菜单 */
|
|
31
|
-
excel
|
|
42
|
+
excel?: ExcelButtonType;
|
|
32
43
|
/** 中间的按钮 */
|
|
33
44
|
children?: ReactNode;
|
|
45
|
+
actions?: (ButtonProps | DropdownProps)[];
|
|
34
46
|
}
|
|
35
47
|
/** 表格头部左侧按钮组 -- 添加、excel导入 */
|
|
36
48
|
declare const BitzTableActionBar: FC<BitzTableActionBarProps>;
|
|
@@ -1,69 +1,102 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { Space as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { j as s } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { useMemo as y } from "react";
|
|
3
|
+
import { Space as l } from "antd";
|
|
4
|
+
import m from "../../BitzButton/index.mjs";
|
|
5
|
+
import k from "./style.mjs";
|
|
6
|
+
import f from "../Dropdown/index.mjs";
|
|
7
|
+
import N from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PlusCircleFilled.mjs";
|
|
8
|
+
import o from "../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
|
|
9
|
+
import c from "../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CaretDownOutlined.mjs";
|
|
10
|
+
const G = ({
|
|
11
|
+
size: C,
|
|
12
|
+
add: e,
|
|
12
13
|
excel: t,
|
|
13
|
-
|
|
14
|
+
actions: i,
|
|
15
|
+
children: E
|
|
14
16
|
}) => {
|
|
15
|
-
const { blockCls:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
const { blockCls: g, addBtnClassName: h, btnClassName: a } = k(C), w = y(() => [
|
|
18
|
+
{
|
|
19
|
+
key: "download",
|
|
20
|
+
label: "Excel模板下载"
|
|
21
|
+
// icon: (
|
|
22
|
+
// <CloudDownloadOutlined style={{ fontSize: 14 }} />
|
|
23
|
+
// ),
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
key: "import",
|
|
27
|
+
label: "Excel数据导入"
|
|
28
|
+
// icon: (
|
|
29
|
+
// <CloudUploadOutlined style={{ fontSize: 14 }} />
|
|
30
|
+
// ),
|
|
31
|
+
},
|
|
32
|
+
...(t == null ? void 0 : t.otherMenu) ?? []
|
|
33
|
+
], [t]), d = y(() => i == null ? void 0 : i.map((r, n) => r.type === "primary" ? /* @__PURE__ */ s.jsx(
|
|
34
|
+
m,
|
|
35
|
+
{
|
|
36
|
+
type: "primary",
|
|
37
|
+
icon: /* @__PURE__ */ s.jsx(N, {}),
|
|
38
|
+
className: h,
|
|
39
|
+
...o(r, "type", "className", "children"),
|
|
40
|
+
children: r == null ? void 0 : r.text
|
|
41
|
+
},
|
|
42
|
+
n
|
|
43
|
+
) : r.type === "secondary" ? /* @__PURE__ */ s.jsx(
|
|
44
|
+
m,
|
|
45
|
+
{
|
|
46
|
+
type: "text",
|
|
47
|
+
className: a,
|
|
48
|
+
...o(r, "type", "className", "children"),
|
|
49
|
+
children: r == null ? void 0 : r.text
|
|
50
|
+
},
|
|
51
|
+
n
|
|
52
|
+
) : /* @__PURE__ */ s.jsx(
|
|
53
|
+
f,
|
|
54
|
+
{
|
|
55
|
+
getPopupContainer: (p) => {
|
|
56
|
+
var j, u;
|
|
57
|
+
return (u = (j = p.parentElement) == null ? void 0 : j.parentElement) == null ? void 0 : u.parentElement;
|
|
24
58
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
i.show !== !1 && /* @__PURE__ */ o.jsx(
|
|
37
|
-
f,
|
|
59
|
+
...o(r, "children"),
|
|
60
|
+
children: /* @__PURE__ */ s.jsx(m, { className: a, type: "text", children: /* @__PURE__ */ s.jsxs(l, { size: 6, children: [
|
|
61
|
+
/* @__PURE__ */ s.jsx("span", { children: r.text }),
|
|
62
|
+
/* @__PURE__ */ s.jsx(c, {})
|
|
63
|
+
] }) })
|
|
64
|
+
},
|
|
65
|
+
n
|
|
66
|
+
)), [i]);
|
|
67
|
+
return /* @__PURE__ */ s.jsxs(l.Compact, { className: g, style: { height: "100%" }, children: [
|
|
68
|
+
(e == null ? void 0 : e.show) !== !1 && /* @__PURE__ */ s.jsx(
|
|
69
|
+
m,
|
|
38
70
|
{
|
|
39
71
|
type: "primary",
|
|
40
|
-
icon: /* @__PURE__ */
|
|
41
|
-
|
|
42
|
-
className
|
|
43
|
-
children:
|
|
72
|
+
icon: /* @__PURE__ */ s.jsx(N, {}),
|
|
73
|
+
className: h,
|
|
74
|
+
...o(e, "show", "type", "className", "children"),
|
|
75
|
+
children: e == null ? void 0 : e.text
|
|
44
76
|
}
|
|
45
77
|
),
|
|
46
|
-
|
|
47
|
-
t.show !== !1 && /* @__PURE__ */
|
|
48
|
-
|
|
78
|
+
i ? d : E,
|
|
79
|
+
(t == null ? void 0 : t.show) !== !1 && /* @__PURE__ */ s.jsx(
|
|
80
|
+
f,
|
|
49
81
|
{
|
|
50
|
-
menu: { items:
|
|
51
|
-
var
|
|
52
|
-
return (
|
|
82
|
+
menu: { items: w, onClick: ({ key: r }) => {
|
|
83
|
+
var n;
|
|
84
|
+
return (n = t == null ? void 0 : t.onClick) == null ? void 0 : n.call(t, r);
|
|
53
85
|
} },
|
|
54
86
|
trigger: (t == null ? void 0 : t.trigger) || ["click"],
|
|
55
|
-
getPopupContainer: (
|
|
56
|
-
var
|
|
57
|
-
return (
|
|
87
|
+
getPopupContainer: (r) => {
|
|
88
|
+
var n, p;
|
|
89
|
+
return (p = (n = r.parentElement) == null ? void 0 : n.parentElement) == null ? void 0 : p.parentElement;
|
|
58
90
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
/* @__PURE__ */
|
|
91
|
+
...o(t, "show", "menu", "trigger", "children"),
|
|
92
|
+
children: /* @__PURE__ */ s.jsx(m, { className: a, type: "text", children: /* @__PURE__ */ s.jsxs(l, { size: 6, children: [
|
|
93
|
+
/* @__PURE__ */ s.jsx("span", { children: (t == null ? void 0 : t.text) ?? "Excel文档导入" }),
|
|
94
|
+
/* @__PURE__ */ s.jsx(c, {})
|
|
62
95
|
] }) })
|
|
63
96
|
}
|
|
64
97
|
)
|
|
65
98
|
] });
|
|
66
99
|
};
|
|
67
100
|
export {
|
|
68
|
-
|
|
101
|
+
G as default
|
|
69
102
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BitzTableActionProps, BitzTableColumnType, BitzTableActionColProps } from '..';
|
|
2
|
-
export declare function BitzTableAction<T>({ actionGroup, refInstance, }: BitzTableActionProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function BitzTableAction<T>({ loading, actionGroup, refInstance, }: BitzTableActionProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
/** 表格操作列 */
|
|
4
4
|
declare function BitzTableActionCol<T>(props: BitzTableActionColProps<T>): BitzTableColumnType<T>;
|
|
5
5
|
export default BitzTableActionCol;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { Space as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
2
|
+
import y from "../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
|
|
3
|
+
import { Space as z, Skeleton as S } from "antd";
|
|
4
|
+
import { useRef as I, useMemo as u, useContext as R } from "react";
|
|
5
|
+
import h from "../../BitzButton/index.mjs";
|
|
6
|
+
import w from "./style.mjs";
|
|
7
7
|
import "../index.mjs";
|
|
8
|
-
import
|
|
9
|
-
import { BitzTableContext as
|
|
10
|
-
const
|
|
11
|
-
skeletonCls:
|
|
12
|
-
...
|
|
13
|
-
}) => /* @__PURE__ */ t.jsxs(
|
|
14
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
8
|
+
import b from "../Dropdown/index.mjs";
|
|
9
|
+
import { BitzTableContext as T } from "../Store/index.mjs";
|
|
10
|
+
const B = ({
|
|
11
|
+
skeletonCls: l,
|
|
12
|
+
...n
|
|
13
|
+
}) => /* @__PURE__ */ t.jsxs(h, { type: "text", ...n, children: [
|
|
14
|
+
/* @__PURE__ */ t.jsx("span", { children: n.children }),
|
|
15
15
|
/* @__PURE__ */ t.jsx(
|
|
16
|
-
|
|
16
|
+
S,
|
|
17
17
|
{
|
|
18
18
|
active: !0,
|
|
19
19
|
title: !1,
|
|
20
|
-
className:
|
|
20
|
+
className: l,
|
|
21
21
|
paragraph: {
|
|
22
22
|
rows: 1,
|
|
23
23
|
width: "100%"
|
|
@@ -25,73 +25,74 @@ const k = ({
|
|
|
25
25
|
}
|
|
26
26
|
)
|
|
27
27
|
] });
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
function A({
|
|
29
|
+
loading: l,
|
|
30
|
+
actionGroup: n,
|
|
31
|
+
refInstance: a
|
|
31
32
|
}) {
|
|
32
|
-
const { loading:
|
|
33
|
-
gap:
|
|
34
|
-
primaryBtnClassName:
|
|
35
|
-
dangerBtnClassName:
|
|
36
|
-
dropdownBtnClassName:
|
|
33
|
+
const { loading: i, fullscreen: x } = R(T), s = u(() => l ?? i, [l, i]), {
|
|
34
|
+
gap: o,
|
|
35
|
+
primaryBtnClassName: r,
|
|
36
|
+
dangerBtnClassName: f,
|
|
37
|
+
dropdownBtnClassName: k,
|
|
37
38
|
maskClassName: g,
|
|
38
39
|
skeletonBtnClassName: c,
|
|
39
40
|
skeletonClassName: m
|
|
40
|
-
} =
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
} = w(), C = u(() => {
|
|
42
|
+
const d = n.length >= 4 ? 2 : n.length, p = n.slice(0, d), j = [];
|
|
43
|
+
if (p != null && p.length && p.forEach((e, N) => {
|
|
44
|
+
j.push(
|
|
45
|
+
s ? /* @__PURE__ */ t.jsx(
|
|
46
|
+
B,
|
|
46
47
|
{
|
|
47
48
|
className: c,
|
|
48
49
|
skeletonCls: m,
|
|
49
50
|
children: e == null ? void 0 : e.label
|
|
50
51
|
},
|
|
51
|
-
|
|
52
|
-
) : e.children ? /* @__PURE__ */ t.jsx(
|
|
53
|
-
|
|
52
|
+
N
|
|
53
|
+
) : e.children ? /* @__PURE__ */ t.jsx(b, { menu: { items: e.children }, children: /* @__PURE__ */ t.jsx(
|
|
54
|
+
h,
|
|
54
55
|
{
|
|
55
56
|
type: "text",
|
|
56
|
-
className: e.danger ?
|
|
57
|
+
className: e.danger ? f : r,
|
|
57
58
|
children: e == null ? void 0 : e.label
|
|
58
59
|
}
|
|
59
|
-
) },
|
|
60
|
-
|
|
60
|
+
) }, N) : /* @__PURE__ */ t.jsx(
|
|
61
|
+
h,
|
|
61
62
|
{
|
|
62
63
|
type: "text",
|
|
63
|
-
className: e.danger ?
|
|
64
|
+
className: e.danger ? f : r,
|
|
64
65
|
onClick: e == null ? void 0 : e.onClick,
|
|
65
66
|
children: e == null ? void 0 : e.label
|
|
66
67
|
},
|
|
67
|
-
|
|
68
|
+
N
|
|
68
69
|
)
|
|
69
70
|
);
|
|
70
|
-
}),
|
|
71
|
-
const e =
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
}), d === 2 && n.length >= 4) {
|
|
72
|
+
const e = n.slice(2, n.length);
|
|
73
|
+
j.push(
|
|
74
|
+
s ? /* @__PURE__ */ t.jsx(
|
|
75
|
+
B,
|
|
75
76
|
{
|
|
76
77
|
className: c,
|
|
77
78
|
skeletonCls: m,
|
|
78
79
|
children: "更多"
|
|
79
80
|
},
|
|
80
81
|
5
|
|
81
|
-
) : /* @__PURE__ */ t.jsx(
|
|
82
|
+
) : /* @__PURE__ */ t.jsx(b, { menu: { items: e }, children: /* @__PURE__ */ t.jsx(h, { type: "text", className: k, children: "更多" }) }, 5)
|
|
82
83
|
);
|
|
83
84
|
}
|
|
84
|
-
return
|
|
85
|
-
}, [
|
|
86
|
-
return /* @__PURE__ */ t.jsxs("div", { onClick: (
|
|
87
|
-
/* @__PURE__ */ t.jsx(
|
|
85
|
+
return j;
|
|
86
|
+
}, [s, n]);
|
|
87
|
+
return /* @__PURE__ */ t.jsxs("div", { onClick: (d) => d.stopPropagation(), children: [
|
|
88
|
+
/* @__PURE__ */ t.jsx(z, { size: o, ref: a, className: "actionGroup", children: C }),
|
|
88
89
|
/* @__PURE__ */ t.jsx("div", { className: g })
|
|
89
90
|
] });
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
-
const { actionGroup:
|
|
93
|
-
return
|
|
94
|
-
width: Math.floor(
|
|
92
|
+
function F(l) {
|
|
93
|
+
const { actionGroup: n, loading: a, ...i } = l, { gap: x } = w(), s = I(null), o = y(s), r = u(() => o != null && o.width ? o.width + x * 2 + 1 : 181, [o, x]);
|
|
94
|
+
return u(() => ({
|
|
95
|
+
width: Math.floor(r),
|
|
95
96
|
mobileHide: !0,
|
|
96
97
|
isOperationCol: !0,
|
|
97
98
|
title: "操作",
|
|
@@ -100,16 +101,23 @@ function q(s) {
|
|
|
100
101
|
dataIndex: "operationCol",
|
|
101
102
|
className: "operationCol",
|
|
102
103
|
disabled: !0,
|
|
103
|
-
render: (g, c
|
|
104
|
-
const
|
|
105
|
-
(
|
|
104
|
+
render: (k, g, c) => {
|
|
105
|
+
const m = n(g, c).filter(
|
|
106
|
+
(C) => C.type != "detail"
|
|
107
|
+
);
|
|
108
|
+
return /* @__PURE__ */ t.jsx(
|
|
109
|
+
A,
|
|
110
|
+
{
|
|
111
|
+
actionGroup: m,
|
|
112
|
+
loading: a,
|
|
113
|
+
refInstance: s
|
|
114
|
+
}
|
|
106
115
|
);
|
|
107
|
-
return /* @__PURE__ */ t.jsx(R, { actionGroup: u, refInstance: a });
|
|
108
116
|
},
|
|
109
|
-
...
|
|
110
|
-
}), [
|
|
117
|
+
...i
|
|
118
|
+
}), [r, s, a, n]);
|
|
111
119
|
}
|
|
112
120
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
121
|
+
A as BitzTableAction,
|
|
122
|
+
F as default
|
|
115
123
|
};
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
const
|
|
1
|
+
const u = (e, d) => {
|
|
2
2
|
let o = 0, r = 0;
|
|
3
3
|
return {
|
|
4
|
-
filterColumns: ((i,
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
4
|
+
filterColumns: ((i, l) => i.map((n) => {
|
|
5
|
+
const t = h(n, n.index), s = l[t];
|
|
6
|
+
return s && s.show === !1 ? (typeof n.width == "number" ? o += n.width : r += 1, !1) : { ...n, ...s };
|
|
7
7
|
}))(e, d).filter(Boolean),
|
|
8
|
-
|
|
8
|
+
hiddenTotalWidth: Math.floor(o),
|
|
9
9
|
autoWidthColLength: r
|
|
10
10
|
};
|
|
11
|
-
},
|
|
12
|
-
var t,
|
|
13
|
-
const { fixed: r, index:
|
|
11
|
+
}, h = (e, d) => "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join("-") : e.dataIndex : `${d}`, c = (e) => (d, o) => {
|
|
12
|
+
var t, s, x, y;
|
|
13
|
+
const { fixed: r, index: a } = d, { fixed: f, index: i } = o;
|
|
14
14
|
if (r === "left" && f !== "left" || f === "right" && r !== "right")
|
|
15
15
|
return -2;
|
|
16
16
|
if (f === "left" && r !== "left" || r === "right" && f !== "right")
|
|
17
17
|
return 2;
|
|
18
|
-
const
|
|
19
|
-
return (t = e[
|
|
18
|
+
const l = d.key || `${a}`, n = o.key || `${i}`;
|
|
19
|
+
return (t = e[l]) != null && t.order || (s = e[n]) != null && s.order ? (((x = e[l]) == null ? void 0 : x.order) || 0) - (((y = e[n]) == null ? void 0 : y.order) || 0) : (d.index || 0) - (o.index || 0);
|
|
20
20
|
};
|
|
21
21
|
function k(e, d, o) {
|
|
22
22
|
const r = {};
|
|
23
|
-
let
|
|
24
|
-
const f = (i,
|
|
23
|
+
let a = "";
|
|
24
|
+
const f = (i, l, n) => {
|
|
25
25
|
for (const t in i)
|
|
26
|
-
if (i.hasOwnProperty(t) && (typeof i[t] == "object" && i[t] !== null && (
|
|
27
|
-
const
|
|
28
|
-
r[
|
|
29
|
-
...
|
|
30
|
-
[
|
|
26
|
+
if (i.hasOwnProperty(t) && (typeof i[t] == "object" && i[t] !== null && (a = t, r[t] = { ...i[t] }, f(i[t], l, n)), t === l)) {
|
|
27
|
+
const s = r[a];
|
|
28
|
+
r[a] = {
|
|
29
|
+
...s,
|
|
30
|
+
[l]: n
|
|
31
31
|
// [prop]: current.disabled || current.fixed ? true : val,
|
|
32
|
-
},
|
|
32
|
+
}, a = "";
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
return f(e, d, o), r;
|
|
36
36
|
}
|
|
37
37
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
c as columnSort,
|
|
39
|
+
h as genColumnKey,
|
|
40
|
+
u as loopFilter,
|
|
41
41
|
k as updateNestedObject
|
|
42
42
|
};
|
|
@@ -56,7 +56,13 @@ function Be({
|
|
|
56
56
|
...r,
|
|
57
57
|
width: r.useMaxWidth ? P() ?? r.width : r.width
|
|
58
58
|
}));
|
|
59
|
-
return ie(
|
|
59
|
+
return ie(
|
|
60
|
+
e,
|
|
61
|
+
n,
|
|
62
|
+
!1,
|
|
63
|
+
!!m,
|
|
64
|
+
!!c
|
|
65
|
+
);
|
|
60
66
|
}, [g]), k = o(() => ue(d), [d]), G = o(() => l ? k : d, [l, d, k]), S = o(() => {
|
|
61
67
|
const e = u == null ? void 0 : u.length, t = e > 4 ? e >= 8 ? 8 : e : 4;
|
|
62
68
|
return Array.from({ length: t }).map((r, i) => ({
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ResizeCallbackData } from 'react-resizable';
|
|
2
|
+
declare const ResizableTitle: (props: React.HTMLAttributes<any> & {
|
|
3
|
+
hasScrollBar?: boolean;
|
|
4
|
+
scrollbarSize?: number;
|
|
5
|
+
onResize: (e: React.SyntheticEvent<Element>, data: ResizeCallbackData) => void;
|
|
6
|
+
width: number;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ResizableTitle;
|