bitz-react-admin-ui 2.4.6 → 2.4.8
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/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/Table/ResizableTitle copy.mjs +67 -0
- package/dist/components/BitzTable/Table/index.d.ts +26 -26
- package/dist/components/BitzTable/Table/index.mjs +393 -368
- package/dist/components/BitzTable/ToolBar/Modal/style.mjs +6 -6
- package/dist/components/BitzTable/index.d.ts +3 -0
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +1 -1
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +50 -49
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +4 -4
- package/dist/components/BitzTableSelect/index.d.ts +0 -1
- package/dist/components/BitzTableSelect/index.mjs +17 -19
- package/dist/components/BitzTableSelect/utils.d.ts +4 -0
- package/dist/components/BitzTableSelect/utils.mjs +5 -0
- 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 +8 -7
- 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
|
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { j as o } from "../../../node_modules/.store/react@18.3.1/node_modules/react/jsx-runtime.mjs";
|
|
2
|
+
import { Resizable as E } from "../../../node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs";
|
|
3
|
+
import { useState as b, useMemo as y, useRef as i } from "react";
|
|
4
|
+
import $ from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
|
|
5
|
+
const W = (p) => {
|
|
6
|
+
const { hasScrollBar: z, scrollbarSize: g, onResize: S, width: r, datagridref: w, stretchref: a, ...L } = p, [P, d] = b(!1), m = y(() => {
|
|
7
|
+
var t, n;
|
|
8
|
+
const e = { ...L };
|
|
9
|
+
return ((t = e.className) == null ? void 0 : t.includes("ant-table-cell-fix-right")) && !z && ((n = e.style) != null && n.right) && (e.style = { ...e.style ?? {} }, e.style.right = Number(e.style.right ?? 0) - (g || 0)), e;
|
|
10
|
+
}, [p]), [x, R] = b(0), l = i(0), f = i(0), c = i(0), u = i(!1), h = y(() => l.current - r + 48, [l.current, r]);
|
|
11
|
+
if (!r)
|
|
12
|
+
return /* @__PURE__ */ o.jsx("th", { ...m });
|
|
13
|
+
const j = (e) => {
|
|
14
|
+
let s = e.offsetLeft, t = e.offsetParent;
|
|
15
|
+
for (; t !== null; )
|
|
16
|
+
s += t.offsetLeft, t = t.offsetParent;
|
|
17
|
+
return { x: s };
|
|
18
|
+
}, D = (e, { size: s }) => {
|
|
19
|
+
let t = s.width - r, n = l.current + t;
|
|
20
|
+
if (c.current = e.clientX - f.current, r + n - l.current <= 48 || c.current < h) {
|
|
21
|
+
u.current = !0;
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const v = a.current;
|
|
25
|
+
c.current >= h && u.current && (n = h, t = 48 - r, u.current = !1), v.style.left = `${n}px`, R(t);
|
|
26
|
+
}, N = (e) => {
|
|
27
|
+
d(!0);
|
|
28
|
+
const s = a.current;
|
|
29
|
+
s.style.opacity = 1, s.style.pointerEvents = "auto", f.current = j(w.current).x;
|
|
30
|
+
const t = e.clientX - f.current;
|
|
31
|
+
s.style.left = `${t}px`, l.current = t, c.current = t;
|
|
32
|
+
}, O = (...e) => {
|
|
33
|
+
R(0), d(!1);
|
|
34
|
+
const s = a.current;
|
|
35
|
+
s.style.opacity = 0, s.style.pointerEvents = "none", setTimeout(() => {
|
|
36
|
+
s.style.left = "0px";
|
|
37
|
+
}, 200), S(...e);
|
|
38
|
+
}, X = /* @__PURE__ */ o.jsx(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
className: "bitzResizableHandle",
|
|
42
|
+
style: { transform: `translateX(${x}px)` },
|
|
43
|
+
onClick: (e) => {
|
|
44
|
+
e.stopPropagation(), e.preventDefault();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
return /* @__PURE__ */ o.jsx(
|
|
49
|
+
E,
|
|
50
|
+
{
|
|
51
|
+
width: r + x,
|
|
52
|
+
height: 0,
|
|
53
|
+
handle: X,
|
|
54
|
+
className: $("bitzResizable", {
|
|
55
|
+
disabledUserSelect: P
|
|
56
|
+
}),
|
|
57
|
+
onResize: D,
|
|
58
|
+
onResizeStart: N,
|
|
59
|
+
onResizeStop: O,
|
|
60
|
+
draggableOpts: { enableUserSelectHack: !1 },
|
|
61
|
+
children: /* @__PURE__ */ o.jsx("th", { ...m })
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
W as default
|
|
67
|
+
};
|
|
@@ -8,11 +8,11 @@ import { ActionsFunType, BitzTableColumnsType, SelelctionAlertProps } from '..';
|
|
|
8
8
|
import { BitzTableBorderedType } from '../../BitzConfigProvider/context';
|
|
9
9
|
import './index.less';
|
|
10
10
|
export interface BitzTableProps<RecordType = any> extends Omit<TableProps<RecordType>, 'size' | 'pagination' | 'bordered'> {
|
|
11
|
-
/**
|
|
11
|
+
/** PC端:是否开启rowHover样式 */
|
|
12
12
|
rowHoverable?: boolean;
|
|
13
|
-
/**
|
|
13
|
+
/** PC端:是否开启斑马纹样式 */
|
|
14
14
|
zebra?: boolean;
|
|
15
|
-
/** border */
|
|
15
|
+
/** PC端:border样式 */
|
|
16
16
|
bordered?: BitzTableBorderedType;
|
|
17
17
|
/** PC端:是否显示分页 */
|
|
18
18
|
showPagination?: boolean;
|
|
@@ -20,38 +20,36 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
|
|
|
20
20
|
height?: number;
|
|
21
21
|
/** PC端:当height小于minHeight时使用minHeight替代height */
|
|
22
22
|
minHeight?: number;
|
|
23
|
-
/**
|
|
23
|
+
/** PC端:滚动条 */
|
|
24
24
|
scroll?: {
|
|
25
25
|
x?: number;
|
|
26
26
|
y?: number;
|
|
27
27
|
auto?: boolean;
|
|
28
28
|
};
|
|
29
|
-
/**
|
|
29
|
+
/** table数据源 */
|
|
30
30
|
dataSource?: RecordType[];
|
|
31
|
-
/**
|
|
31
|
+
/** 分页总数 */
|
|
32
32
|
total?: number;
|
|
33
|
-
/**
|
|
33
|
+
/** 自定义的列表参数 */
|
|
34
34
|
columns?: BitzTableColumnsType<RecordType>;
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
/**
|
|
35
|
+
/** table布局size */
|
|
36
|
+
size?: DensitySize;
|
|
37
|
+
/** 请求加载状态 */
|
|
38
38
|
loading?: boolean;
|
|
39
39
|
/** 骨架屏列表个数 */
|
|
40
40
|
skeletonNum?: {
|
|
41
41
|
pc?: number;
|
|
42
42
|
mobile?: number;
|
|
43
43
|
};
|
|
44
|
-
/**
|
|
44
|
+
/** 移动端:骨架屏段落行数 */
|
|
45
45
|
skeletonRowNum?: SkeletonParagraphProps['rows'];
|
|
46
|
-
/**
|
|
46
|
+
/** 移动端:骨架屏行宽度 */
|
|
47
47
|
skeletonRowsWidth?: SkeletonParagraphProps['width'];
|
|
48
|
-
/**
|
|
48
|
+
/** 移动端:自定义骨架屏 */
|
|
49
49
|
skeletonRender?: () => ReactNode;
|
|
50
|
-
/** table布局size */
|
|
51
|
-
size?: DensitySize;
|
|
52
50
|
/** 是否启用分页组件的受控属性 */
|
|
53
51
|
enableControlPage?: boolean;
|
|
54
|
-
/**
|
|
52
|
+
/** 多选/单选 相关 */
|
|
55
53
|
selectionAlert?: SelelctionAlertProps;
|
|
56
54
|
/** 分页控件的分页属性 */
|
|
57
55
|
pagination?: {
|
|
@@ -60,10 +58,12 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
|
|
|
60
58
|
};
|
|
61
59
|
/** PC端:给父组件传值 page当前第几页 pageSize每页有多少 */
|
|
62
60
|
paginationEmit?: (page: number, pageSize: number) => void;
|
|
63
|
-
/**
|
|
61
|
+
/** PC端:是否启用拖拽 */
|
|
64
62
|
enabledRowDragSort?: boolean;
|
|
65
|
-
/**
|
|
63
|
+
/** PC端:拖拽结束 */
|
|
66
64
|
onRowDragEnd?: (newCols: RecordType[]) => void;
|
|
65
|
+
/** 移动端:操作按钮 */
|
|
66
|
+
operationFilter?: ActionsFunType<RecordType>;
|
|
67
67
|
/** 移动端:加载更多返回函数 */
|
|
68
68
|
/** 移动端:下拉刷新 */
|
|
69
69
|
mobileRefreshEmit?: () => Promise<unknown> | void;
|
|
@@ -77,21 +77,21 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
|
|
|
77
77
|
noDataImg?: any;
|
|
78
78
|
/** 移动端:下拉刷新的颜色定义 */
|
|
79
79
|
color?: string;
|
|
80
|
-
/**
|
|
80
|
+
/** PC端:操作栏-左侧 */
|
|
81
81
|
tableAction?: ReactNode;
|
|
82
|
-
/**
|
|
82
|
+
/** PC端:操作栏-右侧 */
|
|
83
83
|
tableToolbar?: ReactNode;
|
|
84
|
-
/**
|
|
84
|
+
/** PC端:浮动的选择操作栏 */
|
|
85
85
|
selectionBar?: ReactNode;
|
|
86
|
-
/**
|
|
86
|
+
/** PC端:是否展示工具栏 默认为 true */
|
|
87
87
|
showTableTool?: boolean;
|
|
88
|
-
/**
|
|
88
|
+
/** PC端:用于配置和存储表格外观,不传则不存储 */
|
|
89
89
|
stylesConfigState?: StylesStateType;
|
|
90
|
-
/**
|
|
90
|
+
/** PC端:用于配置和存储列配置,不传则不存储 */
|
|
91
91
|
columnsState?: ColumnStateType;
|
|
92
|
-
/**
|
|
92
|
+
/** PC端:用于配置和存储导出列配置,不传则不存储 */
|
|
93
93
|
exportConfigState?: ExportColumnStateType;
|
|
94
|
-
/**
|
|
94
|
+
/** PC端:自定义行类名 */
|
|
95
95
|
rowClassName?: RowClassName<RecordType>;
|
|
96
96
|
/** 重置分页的page为1 */
|
|
97
97
|
resetPage?: number;
|