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