bitz-react-admin-ui 2.8.0 → 2.8.2
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/assets/iconfont/IconChenggong.mjs +25 -4
- package/dist/assets/iconfont/IconClose.mjs +24 -3
- package/dist/assets/iconfont/IconColumnCancelFixed.mjs +23 -2
- package/dist/assets/iconfont/IconColumnFixedLeft.mjs +27 -6
- package/dist/assets/iconfont/IconColumnFixedRight.mjs +27 -6
- package/dist/assets/iconfont/IconCuowu.mjs +23 -2
- package/dist/assets/iconfont/IconDragOrder.mjs +25 -4
- package/dist/assets/iconfont/IconDuigoux.mjs +25 -4
- package/dist/assets/iconfont/IconFabu.mjs +35 -5
- package/dist/assets/iconfont/IconFanhui.mjs +25 -4
- package/dist/assets/iconfont/IconGaojisousuo.mjs +26 -5
- package/dist/assets/iconfont/IconHangfengexian.mjs +41 -3
- package/dist/assets/iconfont/IconHangliefengexian.mjs +42 -4
- package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +26 -5
- package/dist/assets/iconfont/IconIcon21.mjs +25 -4
- package/dist/assets/iconfont/IconJincoude.mjs +25 -4
- package/dist/assets/iconfont/IconJinggao.mjs +25 -4
- package/dist/assets/iconfont/IconKuansongde.mjs +26 -5
- package/dist/assets/iconfont/IconLiefengexian.mjs +41 -3
- package/dist/assets/iconfont/IconMore.mjs +41 -4
- package/dist/assets/iconfont/IconShanchu.mjs +27 -6
- package/dist/assets/iconfont/IconShanchu1.mjs +35 -5
- package/dist/assets/iconfont/IconSousuo.mjs +27 -6
- package/dist/assets/iconfont/IconTejincou.mjs +25 -4
- package/dist/assets/iconfont/IconTekuansong.mjs +26 -5
- package/dist/assets/iconfont/IconTishi1.mjs +27 -6
- package/dist/assets/iconfont/IconTuodong.mjs +28 -7
- package/dist/assets/iconfont/IconWubanmawentianchong.mjs +35 -3
- package/dist/assets/iconfont/IconWufengexian.mjs +26 -4
- package/dist/assets/iconfont/IconXinxitishi.mjs +27 -6
- package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +34 -3
- package/dist/assets/iconfont/IconZhongdengde.mjs +24 -3
- package/dist/assets/iconfont/IconZhongzhi.mjs +24 -3
- package/dist/assets/iconfont/index.mjs +33 -33
- package/dist/components/BitzAddTag/index.mjs +41 -8
- package/dist/components/BitzAddressBook/index.mjs +122 -35
- package/dist/components/BitzAppPage/index.mjs +18 -4
- package/dist/components/BitzAppRefresh/index.mjs +27 -15
- package/dist/components/BitzBetterScroll/index.mjs +5 -5
- package/dist/components/BitzButton/index.mjs +23 -9
- package/dist/components/BitzCalendar/index.mjs +52 -19
- package/dist/components/BitzCascader/BitzCascaderMobile.mjs +68 -30
- package/dist/components/BitzCascader/index.mjs +6 -2
- package/dist/components/BitzCollapse/index.mjs +4 -4
- package/dist/components/BitzConfigProvider/context.mjs +3 -1
- package/dist/components/BitzConfigProvider/index.mjs +12 -8
- package/dist/components/BitzConfirmModal/index.mjs +24 -1
- package/dist/components/BitzDescriptions/index.mjs +11 -1
- package/dist/components/BitzDrawer/index.mjs +17 -2
- package/dist/components/BitzEmpty/index.mjs +6 -2
- package/dist/components/BitzException/index.mjs +6 -1
- package/dist/components/BitzFloatLayout/index.mjs +10 -1
- package/dist/components/BitzFluentDatePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangePicker/index.mjs +1 -1
- package/dist/components/BitzFluentRangeTimePicker/index.mjs +1 -1
- package/dist/components/BitzFluentTimePicker/index.mjs +6 -6
- package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +13 -16
- package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +26 -20
- package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +21 -3
- package/dist/components/BitzFuiCalendar/CalendarBody.mjs +27 -4
- package/dist/components/BitzFuiCalendar/CalendarHead.mjs +5 -2
- package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +12 -3
- package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +47 -15
- package/dist/components/BitzFuiCalendar/ColumnData.mjs +25 -9
- package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +44 -8
- package/dist/components/BitzFuiCalendar/index.mjs +7 -1
- package/dist/components/BitzFullScreen/index.mjs +9 -6
- package/dist/components/BitzHighlight/Child.mjs +23 -9
- package/dist/components/BitzHighlight/Highlight.mjs +26 -5
- package/dist/components/BitzHighlight/chunks.mjs +20 -17
- package/dist/components/BitzHighlight/style.mjs +4 -1
- package/dist/components/BitzImage/index.mjs +1 -1
- package/dist/components/BitzImage/previewImage.mjs +12 -5
- package/dist/components/BitzLanguageTabs/index.mjs +14 -3
- package/dist/components/BitzLazyLoad/index.mjs +7 -1
- package/dist/components/BitzList/List.mjs +17 -3
- package/dist/components/BitzList/LoadMore.mjs +29 -20
- package/dist/components/BitzLoadMore/index.mjs +34 -14
- package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +24 -11
- package/dist/components/BitzMeetingTime/index.mjs +10 -6
- package/dist/components/BitzMobileLoading/index.mjs +1 -1
- package/dist/components/BitzModal/index.mjs +24 -11
- package/dist/components/BitzNoData/index.mjs +4 -1
- package/dist/components/BitzNoMore/index.mjs +1 -1
- package/dist/components/BitzOrganizationSelection/index.mjs +43 -14
- package/dist/components/BitzPageContainer/index.mjs +107 -46
- package/dist/components/BitzPageHeader/index.mjs +89 -21
- package/dist/components/BitzPagination/index.mjs +71 -22
- package/dist/components/BitzPopover/index.mjs +4 -4
- package/dist/components/BitzPullRefresh/PullRefresh.mjs +47 -18
- package/dist/components/BitzQRCode/index.mjs +6 -1
- package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +35 -17
- package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +20 -13
- package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +4 -1
- package/dist/components/BitzQueryFilter/index.mjs +69 -20
- package/dist/components/BitzRefresh/index.mjs +5 -1
- package/dist/components/BitzRemark/index.mjs +4 -4
- package/dist/components/BitzScheduleCenter/index.mjs +24 -30
- package/dist/components/BitzSearch/index.mjs +1 -1
- package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +123 -48
- package/dist/components/BitzSelect/index.mjs +1 -1
- package/dist/components/BitzSkeleton/index.mjs +31 -1
- package/dist/components/BitzSwitch/index.mjs +7 -2
- package/dist/components/BitzTabbar/BitzTabbar.mjs +25 -8
- package/dist/components/BitzTabbar/BitzTabbarItem.mjs +4 -1
- package/dist/components/BitzTable/ActionBar/ActionBar.mjs +80 -12
- package/dist/components/BitzTable/ActionBar/Button.mjs +20 -15
- package/dist/components/BitzTable/ActionBar/style.mjs +12 -9
- package/dist/components/BitzTable/ActionCol/index.mjs +182 -44
- package/dist/components/BitzTable/ActionCol/style.mjs +15 -12
- package/dist/components/BitzTable/Dropdown/index.mjs +8 -1
- package/dist/components/BitzTable/Dropdown/style.mjs +9 -6
- package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -6
- package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +11 -4
- package/dist/components/BitzTable/SelectionBar/style.mjs +18 -8
- package/dist/components/BitzTable/Store/index.mjs +103 -62
- package/dist/components/BitzTable/Store/utils/index.mjs +5 -5
- package/dist/components/BitzTable/SubTable/index.mjs +122 -73
- package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +43 -21
- package/dist/components/BitzTable/Table/SortTableContext.mjs +39 -17
- package/dist/components/BitzTable/Table/SortableRow.mjs +44 -20
- package/dist/components/BitzTable/Table/TdCell.mjs +16 -5
- package/dist/components/BitzTable/Table/index.mjs +494 -246
- package/dist/components/BitzTable/Table/style.mjs +10 -1
- package/dist/components/BitzTable/Table/utils.mjs +11 -4
- package/dist/components/BitzTable/TextOverflow/index.mjs +12 -3
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +105 -31
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +104 -23
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +68 -29
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +346 -159
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +50 -16
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +42 -16
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +135 -38
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +9 -2
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/ScopeSwitch.mjs +18 -5
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +121 -49
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +62 -18
- package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +59 -16
- package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +42 -14
- package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +20 -5
- package/dist/components/BitzTable/ToolBar/Modal/index.mjs +46 -14
- package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -9
- package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +49 -2
- package/dist/components/BitzTable/ToolBar/style.mjs +6 -1
- package/dist/components/BitzTableOperations/index.mjs +13 -3
- package/dist/components/BitzTableSelect/Picker/index.mjs +43 -10
- package/dist/components/BitzTableSelect/Select/index.mjs +90 -21
- package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +23 -13
- package/dist/components/BitzTableSelect/SelectPopup/index.mjs +219 -69
- package/dist/components/BitzTableSelect/SingleSelect/index.mjs +87 -22
- package/dist/components/BitzTableSelect/TableCell/index.mjs +52 -11
- package/dist/components/BitzTableSelect/TextBlock/index.mjs +30 -12
- package/dist/components/BitzTableSelect/index.mjs +65 -14
- package/dist/components/BitzTableSelect/utils.mjs +3 -3
- package/dist/components/BitzTag/index.mjs +1 -1
- package/dist/components/BitzText/index.mjs +41 -14
- package/dist/components/BitzText/utils.mjs +3 -3
- package/dist/components/BitzTheme/index.mjs +6 -6
- package/dist/components/BitzTimeline/index.mjs +11 -1
- package/dist/components/BitzTimer/Form.mjs +32 -11
- package/dist/components/BitzTimer/Timer.mjs +76 -38
- package/dist/components/BitzTimer/index.mjs +66 -43
- package/dist/components/BitzToast/Toast/index.mjs +28 -10
- package/dist/components/BitzToast/index.mjs +1 -1
- package/dist/components/BitzTooltip/index.mjs +59 -20
- package/dist/components/BitzTooltip/style.mjs +9 -6
- package/dist/components/BitzTooltip/utils.mjs +2 -2
- package/dist/components/BitzTree/index.mjs +4 -1
- package/dist/components/BitzUeEditor/index.mjs +5 -5
- package/dist/components/BitzUpload/index.mjs +81 -43
- package/dist/components/BitzWebAppDrawer/index.mjs +35 -4
- package/dist/components/BitzWebAppModal/index.mjs +6 -3
- package/dist/hooks/use-event-listener.mjs +11 -2
- package/dist/hooks/use-lock-fn.mjs +13 -10
- package/dist/hooks/use-scroll-parent.mjs +16 -14
- package/dist/hooks/useEvent.mjs +7 -4
- package/dist/hooks/useMergedState.mjs +11 -11
- package/dist/style.css +1 -1
- package/dist/utils/WithFluent.mjs +9 -3
- package/dist/utils/create.mjs +7 -1
- package/package.json +1 -1
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
const F = ({
|
|
1
|
+
const F = ({
|
|
2
|
+
height: w,
|
|
3
|
+
token: i,
|
|
4
|
+
evenRowBgColor: y,
|
|
5
|
+
table: o,
|
|
6
|
+
gap: I,
|
|
7
|
+
borderColor: R,
|
|
8
|
+
scrollbarWidth: e,
|
|
9
|
+
other: u
|
|
10
|
+
}) => {
|
|
2
11
|
var h, g, r, x, n, T, p, s, d, $, m, H, C, S, f, c, k, z, B, v;
|
|
3
12
|
return {
|
|
4
13
|
height: w,
|
|
@@ -7,10 +7,17 @@ function S(t) {
|
|
|
7
7
|
return e != null && e.isOperationCol || e != null && e.isCheckboxCol || e != null && e.isExpandIconCol || I.includes(e) ? e : (o != null && o.children && (o.children = S(o == null ? void 0 : o.children)), {
|
|
8
8
|
...o,
|
|
9
9
|
sorter: !1,
|
|
10
|
-
render: (c, d, n) => E.jsx(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
render: (c, d, n) => /* @__PURE__ */ E.jsx(
|
|
11
|
+
O,
|
|
12
|
+
{
|
|
13
|
+
active: !0,
|
|
14
|
+
title: !1,
|
|
15
|
+
paragraph: {
|
|
16
|
+
rows: 1,
|
|
17
|
+
width: (n + 1) % 2 === 0 ? "100%" : "60%"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
)
|
|
14
21
|
});
|
|
15
22
|
});
|
|
16
23
|
}
|
|
@@ -15,9 +15,18 @@ const c = "-", m = a`
|
|
|
15
15
|
}
|
|
16
16
|
`, f = ({ value: o, children: s }) => {
|
|
17
17
|
const t = e(() => o || c, [o]), i = e(() => r ? { open: !1 } : { title: t }, [r, t]);
|
|
18
|
-
return p.jsx(
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
return /* @__PURE__ */ p.jsx(
|
|
19
|
+
l.Text,
|
|
20
|
+
{
|
|
21
|
+
ellipsis: {
|
|
22
|
+
tooltip: i
|
|
23
|
+
},
|
|
24
|
+
style: { fontSize: "inherit", width: "100%" },
|
|
25
|
+
copyable: !!o,
|
|
26
|
+
className: m,
|
|
27
|
+
children: s || t
|
|
28
|
+
}
|
|
29
|
+
);
|
|
21
30
|
}, T = n(f);
|
|
22
31
|
export {
|
|
23
32
|
T as default
|
|
@@ -5,36 +5,56 @@ import { BitzTableContext as de } from "../../Store/index.mjs";
|
|
|
5
5
|
import q from "../../../BitzButton/index.mjs";
|
|
6
6
|
import he from "../../../BitzTheme/index.mjs";
|
|
7
7
|
import xe from "./StylesConfig/index.mjs";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import ye from "./ColumnsSort/index.mjs";
|
|
9
|
+
import Ce from "./ExportConfig/index.mjs";
|
|
10
10
|
import { BitzConfigContext as Se } from "../../../BitzConfigProvider/context.mjs";
|
|
11
11
|
import He from "../Modal/index.mjs";
|
|
12
12
|
import { blockGap as J, modalHeaderHeight as P, modalFooterHeight as Q } from "../Modal/style.mjs";
|
|
13
13
|
import je from "../../../../node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
|
|
14
14
|
import Ee from "../../../../node_modules/lodash-es/omit.mjs";
|
|
15
|
-
const Te = "导出设置", Ae = ({
|
|
16
|
-
|
|
15
|
+
const Te = "导出设置", Ae = ({
|
|
16
|
+
open: p,
|
|
17
|
+
title: U,
|
|
18
|
+
onChange: u,
|
|
19
|
+
close: g,
|
|
20
|
+
getContainer: X
|
|
21
|
+
}) => {
|
|
22
|
+
const { token: b } = he.useToken(), [n, i] = f(-1), [Y, d] = f(!1);
|
|
17
23
|
f(!1);
|
|
18
|
-
const [Z, c] = f(!1), {
|
|
19
|
-
|
|
24
|
+
const [Z, c] = f(!1), {
|
|
25
|
+
persistenceType: _,
|
|
26
|
+
persistenceKey: k,
|
|
27
|
+
onlineChange: h,
|
|
28
|
+
setColumnsMap: ee,
|
|
29
|
+
stylesStorageType: te,
|
|
30
|
+
stylesStorageKey: v,
|
|
31
|
+
setTableStylesConfig: x,
|
|
32
|
+
onlineStylesConfigChange: y,
|
|
33
|
+
defaultTableExportConfig: oe,
|
|
34
|
+
exportStorageType: re,
|
|
35
|
+
exportStorageKey: w,
|
|
36
|
+
setTableExportConfig: se,
|
|
37
|
+
onlineExportConfigChange: C
|
|
38
|
+
} = W(de), a = W(Se).Table, m = l(null), B = l(null), S = l(null), ne = async () => {
|
|
39
|
+
var F, K, M, O, V, N, L, A, D;
|
|
20
40
|
if (Z)
|
|
21
41
|
return;
|
|
22
42
|
c(!0);
|
|
23
|
-
const e = (
|
|
43
|
+
const e = (F = m.current) == null ? void 0 : F.getCheckedKeys();
|
|
24
44
|
if (!(e != null && e.length)) {
|
|
25
45
|
i(2), I.error("表格至少需要显示一列"), c(!1);
|
|
26
46
|
return;
|
|
27
47
|
}
|
|
28
|
-
if (!((
|
|
48
|
+
if (!((K = S.current) == null ? void 0 : K.hasOne())) {
|
|
29
49
|
i(3), I.error("导出设置至少需要一个字段"), c(!1);
|
|
30
50
|
return;
|
|
31
51
|
}
|
|
32
|
-
const o = (
|
|
33
|
-
...(
|
|
34
|
-
...(
|
|
35
|
-
...(
|
|
36
|
-
}, R = ((
|
|
37
|
-
x == null || x(fe), (A = a == null ? void 0 : a.setStylesScope) == null || A.call(a,
|
|
52
|
+
const o = (M = B.current) == null ? void 0 : M.getFormInstance(), s = await (o == null ? void 0 : o.getFieldsValue()), fe = Ee(s, "stylesScope"), T = {
|
|
53
|
+
...(O = m.current) == null ? void 0 : O.getLeftSortColumns(),
|
|
54
|
+
...(V = m.current) == null ? void 0 : V.getCenterSortColumns(),
|
|
55
|
+
...(N = m.current) == null ? void 0 : N.getRightSortColumns()
|
|
56
|
+
}, R = ((L = S.current) == null ? void 0 : L.getExportConfig()) ?? oe;
|
|
57
|
+
x == null || x(fe), (A = a == null ? void 0 : a.setStylesScope) == null || A.call(a, s.stylesScope ? "global" : "current"), ee(T), se(R), te === "online" && v && (y == null || y(v, s)), _ === "online" && k && (h == null || h(k, T)), re === "online" && w && (C == null || C(w, R)), c(!1), u ? (d(!0), (D = u == null ? void 0 : u(s, T, R)) == null || D.finally(() => {
|
|
38
58
|
d(!1), g();
|
|
39
59
|
})) : g();
|
|
40
60
|
};
|
|
@@ -51,29 +71,83 @@ const Te = "导出设置", Ae = ({ open: p, title: U, onChange: u, close: g, get
|
|
|
51
71
|
var o;
|
|
52
72
|
const e = (o = j.current) == null ? void 0 : o.clientHeight, r = window.innerHeight - J - P - Q - 48 - e - 32;
|
|
53
73
|
E.current[2] = window.innerHeight - J, ae(r);
|
|
54
|
-
},
|
|
55
|
-
var
|
|
56
|
-
const o = (
|
|
74
|
+
}, z = (e, r) => {
|
|
75
|
+
var s;
|
|
76
|
+
const o = (s = j.current) == null ? void 0 : s.clientHeight;
|
|
57
77
|
E.current[r] = P + Q + 48 + 32 + o + e;
|
|
58
78
|
};
|
|
59
79
|
return $(() => {
|
|
60
80
|
var r, o;
|
|
61
81
|
const e = (o = (r = H.current) == null ? void 0 : r.parentElement) == null ? void 0 : o.parentElement;
|
|
62
|
-
e && (e.style.height = `${E.current[
|
|
63
|
-
}, [
|
|
82
|
+
e && (e.style.height = `${E.current[n]}px`);
|
|
83
|
+
}, [n]), $(() => {
|
|
64
84
|
p && i(1);
|
|
65
|
-
}, [p]),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
}, [p]), /* @__PURE__ */ t.jsx(
|
|
86
|
+
He,
|
|
87
|
+
{
|
|
88
|
+
open: p,
|
|
89
|
+
title: U,
|
|
90
|
+
close: g,
|
|
91
|
+
closeAfter: le,
|
|
92
|
+
getContainer: X,
|
|
93
|
+
footer: /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
94
|
+
/* @__PURE__ */ t.jsx(
|
|
95
|
+
q,
|
|
96
|
+
{
|
|
97
|
+
type: "primary",
|
|
98
|
+
icon: /* @__PURE__ */ t.jsx(je, {}),
|
|
99
|
+
onClick: ne,
|
|
100
|
+
loading: Y,
|
|
101
|
+
children: "保存"
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ t.jsx(q, { onClick: g, children: "取消" })
|
|
105
|
+
] }),
|
|
106
|
+
children: /* @__PURE__ */ t.jsx(ue, { className: "container", bordered: !1, ref: H, children: /* @__PURE__ */ t.jsxs(G, { vertical: !0, align: "center", children: [
|
|
107
|
+
/* @__PURE__ */ t.jsx("div", { className: "segmentedWrapper", ref: j, children: /* @__PURE__ */ t.jsx(
|
|
108
|
+
ge,
|
|
109
|
+
{
|
|
110
|
+
size: "large",
|
|
111
|
+
options: [
|
|
112
|
+
{ label: "外观设置", value: 1 },
|
|
113
|
+
{ label: "列设置", value: 2 },
|
|
114
|
+
{ label: Te, value: 3 }
|
|
115
|
+
],
|
|
116
|
+
value: n,
|
|
117
|
+
onChange: ie
|
|
118
|
+
}
|
|
119
|
+
) }),
|
|
120
|
+
/* @__PURE__ */ t.jsxs(G, { className: "containerBody", children: [
|
|
121
|
+
/* @__PURE__ */ t.jsx(
|
|
122
|
+
xe,
|
|
123
|
+
{
|
|
124
|
+
ref: B,
|
|
125
|
+
postHeight: (e) => z(e, 1),
|
|
126
|
+
display: n === 1
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ t.jsx(
|
|
130
|
+
ye,
|
|
131
|
+
{
|
|
132
|
+
ref: m,
|
|
133
|
+
postHeight: me,
|
|
134
|
+
height: ce,
|
|
135
|
+
display: n === 2
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ t.jsx(
|
|
139
|
+
Ce,
|
|
140
|
+
{
|
|
141
|
+
refInstance: S,
|
|
142
|
+
postHeight: (e) => z(e, 3),
|
|
143
|
+
display: n === 3,
|
|
144
|
+
showSelectRadio: !1
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] })
|
|
148
|
+
] }) })
|
|
149
|
+
}
|
|
150
|
+
);
|
|
77
151
|
};
|
|
78
152
|
export {
|
|
79
153
|
Ae as default,
|
|
@@ -1,29 +1,58 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as e } from "../../../../../node_modules/react/jsx-runtime.mjs";
|
|
2
2
|
import F, { useState as E, useMemo as M } from "react";
|
|
3
3
|
import { useSortable as O } from "../../../../../node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
|
|
4
|
-
import { CSS as
|
|
5
|
-
import { theme as j, Flex as
|
|
4
|
+
import { CSS as v } from "../../../../../node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
|
|
5
|
+
import { theme as j, Flex as d, Checkbox as _, Tooltip as k } from "antd";
|
|
6
6
|
import $ from "../../../../../node_modules/classnames/index.mjs";
|
|
7
7
|
import q from "../../../../../assets/iconfont/IconDragOrder.mjs";
|
|
8
8
|
import u from "../../../../../assets/iconfont/IconColumnFixedLeft.mjs";
|
|
9
9
|
import x from "../../../../../assets/iconfont/IconColumnFixedRight.mjs";
|
|
10
10
|
import g from "../../../../../assets/iconfont/IconColumnCancelFixed.mjs";
|
|
11
|
-
const h = ({ icon:
|
|
11
|
+
const h = ({ icon: t, className: i, open: o, title: r, onClick: s }) => {
|
|
12
12
|
const { token: n } = j.useToken();
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
return /* @__PURE__ */ e.jsx(
|
|
14
|
+
k,
|
|
15
|
+
{
|
|
16
|
+
getTooltipContainer: (a) => a.parentElement,
|
|
17
|
+
title: r,
|
|
18
|
+
open: o ? !1 : void 0,
|
|
19
|
+
children: /* @__PURE__ */ e.jsx(
|
|
20
|
+
t,
|
|
21
|
+
{
|
|
22
|
+
size: n.fontSize + 4,
|
|
23
|
+
className: i,
|
|
24
|
+
onClick: s
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}, A = ({
|
|
30
|
+
item: t,
|
|
31
|
+
isDragOverlay: i,
|
|
32
|
+
placement: o,
|
|
33
|
+
onLeftClick: r,
|
|
34
|
+
onRightClick: s,
|
|
35
|
+
onCheckboxChange: n
|
|
36
|
+
}) => {
|
|
37
|
+
const {
|
|
38
|
+
attributes: a,
|
|
39
|
+
isDragging: l,
|
|
40
|
+
setNodeRef: I,
|
|
41
|
+
listeners: y,
|
|
42
|
+
transform: S,
|
|
43
|
+
transition: N
|
|
44
|
+
} = O({
|
|
45
|
+
id: t == null ? void 0 : t.key
|
|
17
46
|
// disabled: item?.disabled,
|
|
18
47
|
}), { token: T } = j.useToken(), w = {
|
|
19
48
|
transition: N,
|
|
20
|
-
transform:
|
|
49
|
+
transform: v.Transform.toString(S),
|
|
21
50
|
...l && {
|
|
22
51
|
opacity: 0.6
|
|
23
52
|
}
|
|
24
53
|
}, z = ({ target: D }) => {
|
|
25
|
-
n == null || n(
|
|
26
|
-
}, [c, f] = E(!1), { text: m, icon:
|
|
54
|
+
n == null || n(t.key, D.checked);
|
|
55
|
+
}, [c, f] = E(!1), { text: m, icon: p } = M(() => o === "left" ? {
|
|
27
56
|
text: {
|
|
28
57
|
left: "取消固定",
|
|
29
58
|
right: "固定在右侧"
|
|
@@ -51,18 +80,70 @@ const h = ({ icon: e, className: i, open: o, title: r, onClick: s }) => {
|
|
|
51
80
|
right: g
|
|
52
81
|
}
|
|
53
82
|
}, [o]);
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
83
|
+
return /* @__PURE__ */ e.jsxs(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
className: $({ sortItemDragging: l }, "sortItem", {
|
|
87
|
+
showSortItemOperat: c && !i
|
|
88
|
+
}),
|
|
89
|
+
style: w,
|
|
90
|
+
ref: I,
|
|
91
|
+
onMouseEnter: () => f(!0),
|
|
92
|
+
onMouseLeave: () => f(!1),
|
|
93
|
+
...a,
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ e.jsx(d, { align: "center", className: "dragIcon", ...y, children: /* @__PURE__ */ e.jsx(
|
|
96
|
+
q,
|
|
97
|
+
{
|
|
98
|
+
size: T.fontSize + 4,
|
|
99
|
+
style: { opacity: c ? 1 : 0.3 }
|
|
100
|
+
}
|
|
101
|
+
) }),
|
|
102
|
+
/* @__PURE__ */ e.jsx(
|
|
103
|
+
_,
|
|
104
|
+
{
|
|
105
|
+
checked: t.show,
|
|
106
|
+
onChange: z,
|
|
107
|
+
title: t.title,
|
|
108
|
+
children: t.title
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ e.jsxs(
|
|
112
|
+
d,
|
|
113
|
+
{
|
|
114
|
+
style: {
|
|
115
|
+
height: "100%",
|
|
116
|
+
display: c && !i ? "flex" : "none"
|
|
117
|
+
},
|
|
118
|
+
align: "center",
|
|
119
|
+
className: "operation pointerCursor",
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ e.jsx(
|
|
122
|
+
h,
|
|
123
|
+
{
|
|
124
|
+
className: "leftOperation",
|
|
125
|
+
title: m.left,
|
|
126
|
+
open: l,
|
|
127
|
+
icon: p.left,
|
|
128
|
+
onClick: () => r == null ? void 0 : r(t.key, o)
|
|
129
|
+
}
|
|
130
|
+
),
|
|
131
|
+
/* @__PURE__ */ e.jsx(
|
|
132
|
+
h,
|
|
133
|
+
{
|
|
134
|
+
className: "rightOperation",
|
|
135
|
+
title: m.right,
|
|
136
|
+
open: l,
|
|
137
|
+
icon: p.right,
|
|
138
|
+
onClick: () => s == null ? void 0 : s(t.key, o)
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
);
|
|
66
147
|
}, W = F.memo(A);
|
|
67
148
|
export {
|
|
68
149
|
W as default
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { j as s } from "../../../../../node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { genColumnKey as
|
|
3
|
-
import { DndContext as
|
|
4
|
-
import { restrictToVerticalAxis as
|
|
5
|
-
import { SortableContext as N, verticalListSortingStrategy as O, arrayMove as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import { useMemo as
|
|
8
|
-
import
|
|
2
|
+
import { genColumnKey as w, columnSort as S } from "../../../Store/utils/index.mjs";
|
|
3
|
+
import { DndContext as I, closestCenter as E, DragOverlay as K } from "../../../../../node_modules/@dnd-kit/core/dist/core.esm.mjs";
|
|
4
|
+
import { restrictToVerticalAxis as k, restrictToWindowEdges as A } from "../../../../../node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
|
|
5
|
+
import { SortableContext as N, verticalListSortingStrategy as O, arrayMove as T } from "../../../../../node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
|
|
6
|
+
import { Flex as F } from "antd";
|
|
7
|
+
import { useMemo as R, useState as V } from "react";
|
|
8
|
+
import u from "./DndItem.mjs";
|
|
9
9
|
import W from "../../../../../node_modules/lodash-es/omit.mjs";
|
|
10
|
-
const U = ({
|
|
11
|
-
|
|
10
|
+
const U = ({
|
|
11
|
+
placement: g,
|
|
12
|
+
dataList: t,
|
|
13
|
+
keys: d,
|
|
14
|
+
columnsMap: c,
|
|
15
|
+
onLeftClick: h,
|
|
16
|
+
onRightClick: p,
|
|
17
|
+
onChange: j,
|
|
18
|
+
onMoveEnd: v
|
|
19
|
+
}) => {
|
|
20
|
+
const x = R(() => {
|
|
12
21
|
const e = [];
|
|
13
|
-
return t != null && t.length && (t == null || t.map((
|
|
14
|
-
const { key:
|
|
22
|
+
return t != null && t.length && (t == null || t.map((r) => {
|
|
23
|
+
const { key: o, dataIndex: l, ...m } = r, a = w(r, [o || l].join("-")), n = c[a || "null"];
|
|
15
24
|
return e.push({
|
|
16
25
|
key: a,
|
|
17
26
|
...W(m, ["className"]),
|
|
@@ -19,29 +28,59 @@ const U = ({ placement: h, dataList: t, keys: d, columnsMap: c, onLeftClick: u,
|
|
|
19
28
|
disabled: (n == null ? void 0 : n.disabled) === !0,
|
|
20
29
|
show: n == null ? void 0 : n.show
|
|
21
30
|
}), n;
|
|
22
|
-
})), e.sort(
|
|
23
|
-
}, [c, t]), [i, f] = V(-1),
|
|
24
|
-
const { active:
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
const { over:
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
i !==
|
|
31
|
+
})), e.sort(S(c));
|
|
32
|
+
}, [c, t]), [i, f] = V(-1), y = (e) => {
|
|
33
|
+
const { active: r } = e;
|
|
34
|
+
r && f(r.data.current.sortable.index);
|
|
35
|
+
}, D = (e) => {
|
|
36
|
+
const { over: r } = e;
|
|
37
|
+
if (r) {
|
|
38
|
+
const o = r.data.current.sortable.index;
|
|
39
|
+
i !== o && (C(i, o), f(-1));
|
|
31
40
|
}
|
|
32
|
-
},
|
|
33
|
-
const
|
|
41
|
+
}, C = (e, r) => {
|
|
42
|
+
const o = {}, l = T(d, e, r);
|
|
34
43
|
l.forEach((m, a) => {
|
|
35
|
-
|
|
36
|
-
}),
|
|
37
|
-
}, b = (e,
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
o[m] = { ...c[m], order: a };
|
|
45
|
+
}), v(o, l);
|
|
46
|
+
}, b = (e, r) => {
|
|
47
|
+
const o = { ...c };
|
|
48
|
+
o[e] = { ...o[e], show: r }, j(
|
|
49
|
+
o
|
|
41
50
|
/*, newCheckedKeys*/
|
|
42
51
|
);
|
|
43
52
|
};
|
|
44
|
-
return
|
|
53
|
+
return /* @__PURE__ */ s.jsx(
|
|
54
|
+
I,
|
|
55
|
+
{
|
|
56
|
+
modifiers: [k, A],
|
|
57
|
+
collisionDetection: E,
|
|
58
|
+
onDragStart: y,
|
|
59
|
+
onDragEnd: D,
|
|
60
|
+
onDragCancel: () => f(-1),
|
|
61
|
+
children: /* @__PURE__ */ s.jsx(N, { items: d, strategy: O, children: /* @__PURE__ */ s.jsxs(F, { vertical: !0, className: "sortList", children: [
|
|
62
|
+
x.map((e) => /* @__PURE__ */ s.jsx(
|
|
63
|
+
u,
|
|
64
|
+
{
|
|
65
|
+
item: e,
|
|
66
|
+
placement: g,
|
|
67
|
+
onLeftClick: h,
|
|
68
|
+
onRightClick: p,
|
|
69
|
+
onCheckboxChange: b
|
|
70
|
+
},
|
|
71
|
+
e.key
|
|
72
|
+
)),
|
|
73
|
+
/* @__PURE__ */ s.jsx(K, { children: i !== -1 && /* @__PURE__ */ s.jsx(
|
|
74
|
+
u,
|
|
75
|
+
{
|
|
76
|
+
item: x[i],
|
|
77
|
+
isDragOverlay: !0
|
|
78
|
+
},
|
|
79
|
+
x[i].key
|
|
80
|
+
) })
|
|
81
|
+
] }) })
|
|
82
|
+
}
|
|
83
|
+
);
|
|
45
84
|
};
|
|
46
85
|
export {
|
|
47
86
|
U as default
|