@unicom-cloud/ui 0.8.113 → 0.8.115
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/Affix.js +2 -2
- package/Alert.js +2 -2
- package/AutoComplete.js +1 -1
- package/BackTop.js +3 -3
- package/Badge.js +2 -2
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +1 -1
- package/Countdown.js +4 -4
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +4 -4
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +2 -2
- package/Empty.js +1 -1
- package/Flex.js +4 -4
- package/Form.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/LiquidFill.js +4 -4
- package/List.js +6 -5
- package/Loading.js +4 -4
- package/Marquee.js +7 -6
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +2 -2
- package/Modal.js +1 -1
- package/Notice.js +4 -4
- package/Notification.js +2 -2
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Pagination.js +4 -2
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/QrCode.js +7 -7
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +2 -2
- package/Result.js +1 -1
- package/RichText.js +1 -1
- package/Segmented.js +4 -4
- package/Skeleton.js +1 -1
- package/Slider.js +2 -2
- package/Space.js +4 -4
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +2 -2
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Tour.js +4 -4
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +3 -3
- package/affix/index.js +2 -2
- package/alert/index.js +2 -2
- package/anchor/Anchor.js +2 -2
- package/anchor/Link.js +1 -1
- package/app/App.js +2 -2
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +3 -3
- package/badge/Count.js +1 -1
- package/badge/index.js +2 -2
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +2 -2
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +1 -1
- package/cascader/Cascader.js +2 -2
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{C6A94b7f.js → BcWPf1id.js} +1 -1
- package/chunk/BcdTSJks.js +48 -0
- package/chunk/{RjJoagzL.js → CEAeR6xB.js} +1 -1
- package/chunk/{yWKJUe_w.js → CKojyqln.js} +4 -4
- package/chunk/{DrYaod6k.js → CRgtPpMG.js} +1 -1
- package/chunk/{3t4FwEoB.js → CVjWKHBo.js} +1 -1
- package/chunk/{DB0hUIM1.js → CYPFoLks.js} +4 -4
- package/chunk/{D0dVE1v1.js → CcH9qbbg.js} +418 -416
- package/chunk/{Bzx5BueA.js → Ch4iApRQ.js} +2 -2
- package/chunk/{CbXCgtzv.js → Cs9GrNJa.js} +5 -5
- package/chunk/CxbF1opI.js +231 -0
- package/chunk/{CRdegvoa.js → D3F0iWPu.js} +1 -1
- package/chunk/{DzlfiVe2.js → D6I1_o6O.js} +1 -1
- package/chunk/{DA5AMZwY.js → DPDyV8yt.js} +3 -3
- package/chunk/{B--6x-RL.js → DQ8_XXrH.js} +1 -1
- package/chunk/{hc_ufgVf.js → DmHIX8hU.js} +166 -121
- package/chunk/{CYDaUML7.js → DstheLSK.js} +4 -4
- package/chunk/{BHAu6wbC.js → HFPyZ48d.js} +37 -35
- package/chunk/{Bcl7dWlJ.js → efH9HX0H.js} +3 -3
- package/chunk/exc7v_Hl.js +53 -0
- package/collapse/Collapse.js +2 -2
- package/collapse/Item.js +2 -2
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +1 -1
- package/countdown/index.js +4 -4
- package/date-picker/Picker.js +1 -1
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +1 -1
- package/details/index.js +4 -4
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +89 -93
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +2 -2
- package/empty/index.js +1 -1
- package/flex/index.js +4 -4
- package/form/Control.js +115 -103
- package/form/Form.js +2 -2
- package/form/FormItem.js +2 -2
- package/form/index.js +1 -1
- package/form/promisify.js +10 -19
- package/form/store.js +3 -3
- package/form/util.js +62 -52
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/hooks/index.js +3 -3
- package/hooks/useInView.js +1 -1
- package/hooks/useIntersectionObserver.js +1 -1
- package/hooks/useOverrideRef.js +1 -1
- package/hooks/useWatermark.js +1 -1
- package/icon/addFromIconFontCn.js +1 -1
- package/icon/index.js +2 -2
- package/icon-hover/index.js +1 -1
- package/icons/file.js +1 -1
- package/image/Image.js +3 -3
- package/image/ImagePreview.js +6 -6
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +739 -726
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +2 -2
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input/autoSizeTextAreaHeight.js +29 -20
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +2 -2
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/liquid-fill/index.js +4 -4
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +2 -1
- package/loading/index.js +4 -4
- package/locale/en-US.js +5 -3
- package/locale/tr-TR.js +5 -3
- package/marquee/index.js +7 -6
- package/marquee-/index.js +7 -6
- package/mentions/index.js +1 -1
- package/menu/Menu.js +2 -2
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +2 -2
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +5 -5
- package/modal/index.js +2 -2
- package/notice/index.js +4 -4
- package/notification/index.js +2 -2
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +1 -1
- package/overflow-ellipsis/index.js +1 -1
- package/package.json +1 -1
- package/page-header/index.js +1 -1
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +103 -31
- package/pagination/Pagination.js +38 -35
- package/pagination/index.js +2 -0
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/index.js +1 -1
- package/qr-code/index.js +1233 -45
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +1 -1
- package/resize-box/Split.js +2 -2
- package/resize-box/SplitGroup.js +2 -2
- package/resize-box/index.js +2 -2
- package/result/index.js +1 -1
- package/rich-text/index.js +1 -1
- package/row-col/Col-.js +1 -1
- package/row-col/Col.js +1 -1
- package/row-col/Row.js +1 -1
- package/segmented/index.js +21 -21
- package/select/Option.js +1 -1
- package/select/Select.js +2 -2
- package/select-view/Core.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +2 -2
- package/slider/index.js +2 -2
- package/space/index.js +4 -4
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/splitter/Panel.js +1 -1
- package/splitter/SplitBar.js +2 -2
- package/splitter/Splitter.js +2 -2
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style.css +1 -1
- package/switch/index.js +2 -2
- package/table/Table.js +5 -4
- package/table/index.js +4 -4
- package/tabs/Tab.js +2 -2
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +1 -1
- package/tour/index.js +4 -4
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +1 -1
- package/tree/Animation.js +3 -3
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +2 -2
- package/tree-select/index.js +1 -1
- package/trigger/getPopupStyle.js +1 -1
- package/trigger/index.js +145 -145
- package/types/common/hooks/useWindowSize.d.ts +4 -4
- package/types/common/utils/dom.d.ts +1 -1
- package/types/common/utils/lodash.d.ts +2 -1
- package/types/common/utils/reactDOM.d.ts +10 -1
- package/types/common/utils/validate.d.ts +2 -0
- package/types/pc/form/interface.d.ts +6 -1
- package/types/pc/form/promisify.d.ts +5 -0
- package/types/pc/form/store.d.ts +1 -1
- package/types/pc/form/util.d.ts +1 -1
- package/types/pc/input/autoSizeTextAreaHeight.d.ts +4 -2
- package/types/pc/pagination/PageOption.d.ts +3 -0
- package/types/pc/pagination/index.d.ts +2 -0
- package/types/pc/pagination/interface.d.ts +5 -0
- package/types/pc/qr-code/examples/demo.d.ts +1 -0
- package/types/pc/qr-code/examples/download.d.ts +2 -0
- package/types/pc/qr-code/examples/full.d.ts +2 -0
- package/types/pc/qr-code/examples/image.d.ts +2 -0
- package/types/pc/qr-code/index.d.ts +2 -0
- package/types/pc/qr-code/src/index.d.ts +116 -0
- package/types/pc/qr-code/src/qrcodegen.d.ts +95 -0
- package/types/pc/qr-code/src/qrcodegen2.d.ts +325 -0
- package/types/pc/utils/validate.d.ts +1 -1
- package/typography/Base.js +1 -1
- package/typography/Ellipsis.js +2 -2
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +2 -2
- package/upload/Uploader.js +1 -1
- package/upload/request_.js +1972 -41
- package/utils/PqbCSSTransition.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/dom.js +1 -1
- package/utils/index.js +247 -235
- package/utils/lodash.js +33 -32
- package/utils/react19Adapter.js +1 -1
- package/utils/reactDOM.js +1 -1
- package/utils/validate.js +15 -5
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +1 -1
- package/watermark/Watermark.js +1 -1
- package/chunk/CXrVhA6-.js +0 -54
- package/chunk/De8RLlOK.js +0 -231
- package/chunk/d1c9z8T1.js +0 -49
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as o, jsxs as le, Fragment as gt } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import Xe, { useMemo as ie, useCallback as Ze, useState as he, useRef as se, useContext as
|
|
4
|
-
import { a as nt } from "./
|
|
5
|
-
import { u as
|
|
2
|
+
import Ln from "lodash/throttle";
|
|
3
|
+
import Xe, { useMemo as ie, useCallback as Ze, useState as he, useRef as se, useContext as Le, useEffect as et, forwardRef as Kt, createElement as tt, createContext as An, useImperativeHandle as Wn } from "react";
|
|
4
|
+
import { a as nt } from "./DstheLSK.js";
|
|
5
|
+
import { u as zn } from "./CAA93JLq.js";
|
|
6
6
|
import { u as Gt } from "./FgWHhRFz.js";
|
|
7
7
|
import "./DsaQZE4X.js";
|
|
8
8
|
import "@unicom-cloud/utils/constant/platform";
|
|
@@ -17,15 +17,16 @@ import Te from "lodash/isPlainObject";
|
|
|
17
17
|
import { u as Mn } from "./Bl3hZtxi.js";
|
|
18
18
|
import "@unicom-cloud/utils/query-string";
|
|
19
19
|
import "react-router";
|
|
20
|
-
import { u as
|
|
20
|
+
import { u as _n } from "./CVMFAeSw.js";
|
|
21
|
+
import "../pagination/PageOption.js";
|
|
21
22
|
import Jt from "../pagination/Pagination.js";
|
|
22
23
|
import Vn from "../spin/index.js";
|
|
23
24
|
import G from "@unicom-cloud/utils/class-name";
|
|
24
|
-
import { b as Tt, o as Et } from "./
|
|
25
|
+
import { b as Tt, o as Et } from "./BcdTSJks.js";
|
|
25
26
|
import { p as jn, a as Un } from "./ClqoGc3r.js";
|
|
26
27
|
import { r as Yn } from "./CHQ8c547.js";
|
|
27
28
|
import ht from "../table/ColGroup.js";
|
|
28
|
-
import { TableContext as
|
|
29
|
+
import { TableContext as Bt } from "../table/context.js";
|
|
29
30
|
import Ee from "lodash/isArray";
|
|
30
31
|
import { defaultComponent as Qt, INTERNAL_EXPAND_KEY as xt, INTERNAL_SELECTION_KEY as Ct } from "../table/constant.js";
|
|
31
32
|
import Xn from "lodash/merge";
|
|
@@ -35,8 +36,8 @@ import eo from "../virtual-list/VirtualList.js";
|
|
|
35
36
|
import to from "@unicom-cloud/icons/IconUiMinus";
|
|
36
37
|
import no from "@unicom-cloud/icons/IconUiPlus";
|
|
37
38
|
import Ye from "lodash/isString";
|
|
38
|
-
import { C as
|
|
39
|
-
import { R as sn } from "./
|
|
39
|
+
import { C as Ht } from "./CRgtPpMG.js";
|
|
40
|
+
import { R as sn } from "./CxbF1opI.js";
|
|
40
41
|
import Zt from "lodash/get";
|
|
41
42
|
import Qe from "lodash/isFunction";
|
|
42
43
|
import { u as oo } from "./BJeTDXdz.js";
|
|
@@ -49,11 +50,11 @@ import en from "../button/index.js";
|
|
|
49
50
|
import { u as ao } from "./2vdCeheu.js";
|
|
50
51
|
import co from "../space/index.js";
|
|
51
52
|
import fo from "../trigger/index.js";
|
|
52
|
-
import { isArray as Ue, isPlainObject as we, isFunction as
|
|
53
|
-
function
|
|
53
|
+
import { isArray as Ue, isPlainObject as we, isFunction as He, isNumber as tn } from "@unicom-cloud/utils/is";
|
|
54
|
+
function Ae(l) {
|
|
54
55
|
const a = ie(
|
|
55
|
-
() => Te(
|
|
56
|
-
[
|
|
56
|
+
() => Te(l) ? Xn({}, Qt, l) : Qt,
|
|
57
|
+
[l]
|
|
57
58
|
);
|
|
58
59
|
return {
|
|
59
60
|
getHeaderComponentOperations: a.header.operations,
|
|
@@ -71,23 +72,23 @@ function Le(i) {
|
|
|
71
72
|
ComponentBodyCell: a.body.cell
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
|
-
function nn(
|
|
75
|
+
function nn(l, a) {
|
|
75
76
|
const f = [];
|
|
76
77
|
function w(t) {
|
|
77
78
|
t && t.length > 0 && t.forEach((T) => {
|
|
78
79
|
T[a] ? w(T[a]) : f.push({ ...T, key: T.dataIndex || T.key });
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
return w(
|
|
82
|
+
return w(l), f;
|
|
82
83
|
}
|
|
83
|
-
function an(
|
|
84
|
+
function an(l, a) {
|
|
84
85
|
let f = 0;
|
|
85
|
-
return
|
|
86
|
+
return l && l.length > 0 && l.forEach((w) => {
|
|
86
87
|
const t = an(w[a], a) + 1;
|
|
87
88
|
f = Math.max(t, f);
|
|
88
89
|
}), f;
|
|
89
90
|
}
|
|
90
|
-
function po(
|
|
91
|
+
function po(l) {
|
|
91
92
|
const {
|
|
92
93
|
component: a,
|
|
93
94
|
rowSelection: f,
|
|
@@ -95,10 +96,10 @@ function po(i) {
|
|
|
95
96
|
expandProps: t = {},
|
|
96
97
|
columns: T = [],
|
|
97
98
|
childrenColumnName: r
|
|
98
|
-
} =
|
|
99
|
+
} = l, S = ie(() => T || [], [T]), c = ie(
|
|
99
100
|
() => nn(S, r),
|
|
100
101
|
[S, r]
|
|
101
|
-
), N = f && f.type === "checkbox" || f && !("type" in f), E = f && f.type === "radio", { width: p } = t, y = !!w, h = N || E, { getHeaderComponentOperations: v, getBodyComponentOperations: O } =
|
|
102
|
+
), N = f && f.type === "checkbox" || f && !("type" in f), E = f && f.type === "radio", { width: p } = t, y = !!w, h = N || E, { getHeaderComponentOperations: v, getBodyComponentOperations: O } = Ae(a), g = ie(
|
|
102
103
|
() => v({
|
|
103
104
|
selectionNode: h ? "holder_node" : "",
|
|
104
105
|
expandNode: y ? "holder_node" : ""
|
|
@@ -118,83 +119,83 @@ function po(i) {
|
|
|
118
119
|
y,
|
|
119
120
|
O
|
|
120
121
|
]
|
|
121
|
-
), m = f && f.fixed,
|
|
122
|
-
(
|
|
123
|
-
const K = {},
|
|
124
|
-
|
|
125
|
-
const b = { ...
|
|
126
|
-
(!("key" in
|
|
122
|
+
), m = f && f.fixed, B = f && f.columnWidth, W = Ze(
|
|
123
|
+
(Y, I, R) => {
|
|
124
|
+
const K = {}, z = [];
|
|
125
|
+
Y.forEach((i, x) => {
|
|
126
|
+
const b = { ...i };
|
|
127
|
+
(!("key" in i) || typeof i.key > "u") && (b.key = b.dataIndex || x), x === 0 ? (b.$$isFirstColumn = !0, b.fixed === "left" && (K.fixed = b.fixed)) : b.$$isFirstColumn = !1, z.push(b);
|
|
127
128
|
});
|
|
128
|
-
const
|
|
129
|
+
const L = y && {
|
|
129
130
|
key: xt,
|
|
130
131
|
title: xt,
|
|
131
132
|
width: p,
|
|
132
133
|
$$isOperation: !0
|
|
133
|
-
},
|
|
134
|
+
}, X = h && {
|
|
134
135
|
key: Ct,
|
|
135
136
|
title: Ct,
|
|
136
|
-
width:
|
|
137
|
+
width: B,
|
|
137
138
|
$$isOperation: !0
|
|
138
139
|
};
|
|
139
|
-
return m && (K.fixed = "left"), (typeof R != "number" || R === 0) && [...I].reverse().forEach((
|
|
140
|
-
if (
|
|
141
|
-
const b = g.filter((
|
|
142
|
-
|
|
143
|
-
...
|
|
140
|
+
return m && (K.fixed = "left"), (typeof R != "number" || R === 0) && [...I].reverse().forEach((i, x) => {
|
|
141
|
+
if (i.node) {
|
|
142
|
+
const b = g.filter((A) => A.node).length - x - 1;
|
|
143
|
+
i.name === "expandNode" ? z.unshift({
|
|
144
|
+
...L,
|
|
144
145
|
...K,
|
|
145
146
|
$$columnIndex: b
|
|
146
|
-
}) :
|
|
147
|
-
...
|
|
147
|
+
}) : i.name === "selectionNode" ? z.unshift({
|
|
148
|
+
...X,
|
|
148
149
|
...K,
|
|
149
150
|
$$columnIndex: b
|
|
150
|
-
}) :
|
|
151
|
-
...
|
|
151
|
+
}) : z.unshift({
|
|
152
|
+
...i,
|
|
152
153
|
...K,
|
|
153
|
-
title:
|
|
154
|
-
key:
|
|
154
|
+
title: i.name,
|
|
155
|
+
key: i.name,
|
|
155
156
|
$$isOperation: !0,
|
|
156
|
-
width:
|
|
157
|
+
width: i.width || 40,
|
|
157
158
|
$$columnIndex: b
|
|
158
159
|
});
|
|
159
160
|
}
|
|
160
|
-
}),
|
|
161
|
+
}), z;
|
|
161
162
|
},
|
|
162
163
|
[
|
|
163
164
|
p,
|
|
164
165
|
y,
|
|
165
166
|
h,
|
|
166
|
-
|
|
167
|
+
B,
|
|
167
168
|
m,
|
|
168
169
|
g
|
|
169
170
|
]
|
|
170
171
|
), F = ie(
|
|
171
|
-
() =>
|
|
172
|
-
[c,
|
|
172
|
+
() => W(c, u),
|
|
173
|
+
[c, W, u]
|
|
173
174
|
), ee = ie(
|
|
174
175
|
() => an(S, r),
|
|
175
176
|
[S, r]
|
|
176
177
|
);
|
|
177
178
|
return [ie(() => {
|
|
178
|
-
const
|
|
179
|
+
const Y = Ee(g) ? g.filter((z) => z.node).length : 0;
|
|
179
180
|
if (ee === 1) {
|
|
180
|
-
const
|
|
181
|
-
...
|
|
182
|
-
$$columnIndex:
|
|
181
|
+
const z = S.map((L, X) => ({
|
|
182
|
+
...L,
|
|
183
|
+
$$columnIndex: X + Y
|
|
183
184
|
}));
|
|
184
|
-
return [
|
|
185
|
+
return [W(z, g, 0)];
|
|
185
186
|
}
|
|
186
|
-
let I =
|
|
187
|
-
const R = [], K = (
|
|
188
|
-
R[
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
let I = Y;
|
|
188
|
+
const R = [], K = (z, L = 0) => {
|
|
189
|
+
R[L] = R[L] || [], z.forEach((X) => {
|
|
190
|
+
const i = { ...X };
|
|
191
|
+
i[r] ? (i.colSpan = nn(
|
|
192
|
+
X[r],
|
|
192
193
|
r
|
|
193
|
-
).length,
|
|
194
|
-
}), R[
|
|
195
|
-
R[
|
|
194
|
+
).length, i.$$columnIndex = [I], R[L].push(i), K(i[r], L + 1), i.$$columnIndex.push(I - 1)) : (i.rowSpan = ee - L, i.$$columnIndex = I++, R[L].push(i));
|
|
195
|
+
}), R[L] = W(
|
|
196
|
+
R[L],
|
|
196
197
|
g,
|
|
197
|
-
|
|
198
|
+
L
|
|
198
199
|
);
|
|
199
200
|
};
|
|
200
201
|
return K(S), R;
|
|
@@ -202,11 +203,11 @@ function po(i) {
|
|
|
202
203
|
S,
|
|
203
204
|
r,
|
|
204
205
|
ee,
|
|
205
|
-
|
|
206
|
+
W,
|
|
206
207
|
g
|
|
207
208
|
]), F];
|
|
208
209
|
}
|
|
209
|
-
function uo(
|
|
210
|
+
function uo(l, a, f) {
|
|
210
211
|
const {
|
|
211
212
|
defaultExpandedRowKeys: w,
|
|
212
213
|
defaultExpandAllRows: t,
|
|
@@ -215,19 +216,19 @@ function uo(i, a, f) {
|
|
|
215
216
|
onExpandedRowsChange: S,
|
|
216
217
|
childrenColumnName: c = "children",
|
|
217
218
|
expandProps: N
|
|
218
|
-
} =
|
|
219
|
+
} = l, [E, p] = he(
|
|
219
220
|
h()
|
|
220
|
-
), y =
|
|
221
|
+
), y = l.expandedRowKeys || E;
|
|
221
222
|
function h() {
|
|
222
223
|
let g = [];
|
|
223
|
-
return
|
|
224
|
-
const
|
|
225
|
-
return N && "rowExpandable" in N && typeof N.rowExpandable == "function" ? N.rowExpandable(
|
|
224
|
+
return l.expandedRowKeys ? g = l.expandedRowKeys : w ? g = w : t && (g = a.map((u, m) => {
|
|
225
|
+
const B = Z(u);
|
|
226
|
+
return N && "rowExpandable" in N && typeof N.rowExpandable == "function" ? N.rowExpandable(B) && f(u) : typeof T == "function" ? T(B, m) && f(u) : It(u, c) && f(u);
|
|
226
227
|
}).filter((u) => u)), g;
|
|
227
228
|
}
|
|
228
229
|
function v(g) {
|
|
229
|
-
const u = y.indexOf(g) === -1, m = u ? y.concat(g) : y.filter((
|
|
230
|
-
p(
|
|
230
|
+
const u = y.indexOf(g) === -1, m = u ? y.concat(g) : y.filter((W) => g !== W), B = a.filter((W) => m.indexOf(f(W)) !== -1).map((W) => f(W));
|
|
231
|
+
p(B), O(g, u), S?.(B);
|
|
231
232
|
}
|
|
232
233
|
function O(g, u) {
|
|
233
234
|
r?.(
|
|
@@ -237,54 +238,54 @@ function uo(i, a, f) {
|
|
|
237
238
|
}
|
|
238
239
|
return [y, v];
|
|
239
240
|
}
|
|
240
|
-
function on(
|
|
241
|
-
return [...new Set(
|
|
241
|
+
function on(l) {
|
|
242
|
+
return [...new Set(l)];
|
|
242
243
|
}
|
|
243
|
-
function mo(
|
|
244
|
-
const { rowSelection: t, childrenColumnName: T } =
|
|
244
|
+
function mo(l, a, f, w) {
|
|
245
|
+
const { rowSelection: t, childrenColumnName: T } = l, r = t?.selectedRowKeys, S = t?.onSelectAll, c = t?.onSelect, N = t?.onChange, E = t?.pureKeys, p = typeof t?.checkStrictly == "boolean" ? !t.checkStrictly : !1, y = t?.preserveSelectedRowKeys;
|
|
245
246
|
function h() {
|
|
246
|
-
const
|
|
247
|
+
const i = [], x = [], b = (D) => {
|
|
247
248
|
Ee(D) && D.length && D.forEach((C) => {
|
|
248
249
|
const $ = w(C);
|
|
249
|
-
(t && typeof t.checkboxProps == "function" ? t.checkboxProps(Z(C)) : {}).disabled ||
|
|
250
|
+
(t && typeof t.checkboxProps == "function" ? t.checkboxProps(Z(C)) : {}).disabled || i.push($), It(C, l.childrenColumnName) && b(C[l.childrenColumnName]);
|
|
250
251
|
});
|
|
251
252
|
};
|
|
252
253
|
b(a);
|
|
253
|
-
const
|
|
254
|
+
const A = (D, C) => {
|
|
254
255
|
Ee(D) && D.length && D.forEach(($) => {
|
|
255
|
-
if (C && p && ($.__INTERNAL_PARENT = C), x.push($), It($,
|
|
256
|
+
if (C && p && ($.__INTERNAL_PARENT = C), x.push($), It($, l.childrenColumnName)) {
|
|
256
257
|
const J = { ...$ };
|
|
257
|
-
|
|
258
|
+
A($[l.childrenColumnName], J);
|
|
258
259
|
}
|
|
259
260
|
});
|
|
260
261
|
};
|
|
261
|
-
return
|
|
262
|
-
allSelectedRowKeys:
|
|
262
|
+
return A(f, void 0), {
|
|
263
|
+
allSelectedRowKeys: i,
|
|
263
264
|
flattenData: x
|
|
264
265
|
};
|
|
265
266
|
}
|
|
266
|
-
const { allSelectedRowKeys: v, flattenData: O } = h(), [g, u] = he([]), [m,
|
|
267
|
+
const { allSelectedRowKeys: v, flattenData: O } = h(), [g, u] = he([]), [m, B] = he([]), W = qn(
|
|
267
268
|
O,
|
|
268
269
|
on(r || g),
|
|
269
270
|
w,
|
|
270
271
|
T,
|
|
271
272
|
p
|
|
272
|
-
), F = p && !r ? g :
|
|
273
|
+
), F = p && !r ? g : W.selectedRowKeys, ee = p && !r ? m : W.indeterminateKeys, [q, Y] = he(
|
|
273
274
|
E ? [] : I(F)
|
|
274
275
|
);
|
|
275
|
-
function I(
|
|
276
|
-
const b = x ?
|
|
276
|
+
function I(i, x) {
|
|
277
|
+
const b = x ? q.concat(O) : O, A = new Map(
|
|
277
278
|
b.map((D, C, $) => [w(D), D])
|
|
278
279
|
);
|
|
279
|
-
return
|
|
280
|
+
return i.map((D) => A.get(D)).filter((D) => D);
|
|
280
281
|
}
|
|
281
|
-
const R = new Set(O.map((
|
|
282
|
-
function K(
|
|
283
|
-
return y ?
|
|
282
|
+
const R = new Set(O.map((i) => w(i)));
|
|
283
|
+
function K(i) {
|
|
284
|
+
return y ? i : i.filter((x) => R.has(x));
|
|
284
285
|
}
|
|
285
|
-
function
|
|
286
|
+
function z(i) {
|
|
286
287
|
let x = [], b = [];
|
|
287
|
-
if (
|
|
288
|
+
if (i)
|
|
288
289
|
x = K(
|
|
289
290
|
on(F.concat(v))
|
|
290
291
|
);
|
|
@@ -295,38 +296,38 @@ function mo(i, a, f, w) {
|
|
|
295
296
|
);
|
|
296
297
|
}
|
|
297
298
|
E || (b = I(x, !0));
|
|
298
|
-
const
|
|
299
|
-
u(x),
|
|
299
|
+
const A = Z(b);
|
|
300
|
+
u(x), Y(b), B([]), N?.(x, A), S?.(i, A);
|
|
300
301
|
}
|
|
301
|
-
function
|
|
302
|
-
const { selectedRowKeys: b, indeterminateKeys:
|
|
302
|
+
function L(i, x) {
|
|
303
|
+
const { selectedRowKeys: b, indeterminateKeys: A } = Gn(
|
|
303
304
|
x,
|
|
304
|
-
|
|
305
|
+
i,
|
|
305
306
|
F,
|
|
306
307
|
m,
|
|
307
308
|
w,
|
|
308
309
|
T,
|
|
309
310
|
p
|
|
310
311
|
), D = K(b), C = I(D, !0), $ = Z(C);
|
|
311
|
-
u(D),
|
|
312
|
+
u(D), Y(C), B(A), c?.(i, Z(x), $), N?.(D, $);
|
|
312
313
|
}
|
|
313
|
-
function
|
|
314
|
-
const b = [O.find((D) => w(D) ===
|
|
315
|
-
u([
|
|
314
|
+
function X(i, x) {
|
|
315
|
+
const b = [O.find((D) => w(D) === i)], A = Z(b);
|
|
316
|
+
u([i]), c?.(!0, Z(x), A), N?.([i], A);
|
|
316
317
|
}
|
|
317
318
|
return {
|
|
318
319
|
selectedRowKeys: F,
|
|
319
320
|
indeterminateKeys: ee,
|
|
320
|
-
onCheckAll:
|
|
321
|
-
onCheck:
|
|
322
|
-
onCheckRadio:
|
|
321
|
+
onCheckAll: z,
|
|
322
|
+
onCheck: L,
|
|
323
|
+
onCheckRadio: X,
|
|
323
324
|
setSelectedRowKeys: u,
|
|
324
325
|
allSelectedRowKeys: v,
|
|
325
326
|
flattenData: O
|
|
326
327
|
};
|
|
327
328
|
}
|
|
328
|
-
function ho(
|
|
329
|
-
const [f, w] = he(a), [t, T] = he({}), r = se(
|
|
329
|
+
function ho(l, a) {
|
|
330
|
+
const [f, w] = he(a), [t, T] = he({}), r = se(l), S = Ze(
|
|
330
331
|
(E) => {
|
|
331
332
|
const { field: p, direction: y } = E;
|
|
332
333
|
return f.find((h) => h.field === p) ? y ? f.map(
|
|
@@ -348,19 +349,19 @@ function ho(i, a) {
|
|
|
348
349
|
}), y;
|
|
349
350
|
}, []), N = Ze(
|
|
350
351
|
(E, p) => {
|
|
351
|
-
c(
|
|
352
|
+
c(l).length || (w(p), T(E));
|
|
352
353
|
},
|
|
353
|
-
[
|
|
354
|
+
[l, c, w, T]
|
|
354
355
|
);
|
|
355
356
|
return Ft(() => {
|
|
356
|
-
const E = r.current, p = c(E), y = c(
|
|
357
|
+
const E = r.current, p = c(E), y = c(l), h = p.map(
|
|
357
358
|
(O) => O.field
|
|
358
359
|
), v = y.filter((O) => p.find(
|
|
359
360
|
({ field: u, direction: m }) => O.field === u && O.direction !== m
|
|
360
361
|
) ? !0 : !h.includes(O.field));
|
|
361
|
-
v && v.length && (w(y), T({})), r.current =
|
|
362
|
+
v && v.length && (w(y), T({})), r.current = l;
|
|
362
363
|
}, [
|
|
363
|
-
|
|
364
|
+
l,
|
|
364
365
|
c,
|
|
365
366
|
S,
|
|
366
367
|
T,
|
|
@@ -372,7 +373,7 @@ function ho(i, a) {
|
|
|
372
373
|
updateStateSorters: N
|
|
373
374
|
};
|
|
374
375
|
}
|
|
375
|
-
function yo(
|
|
376
|
+
function yo(l, a, f) {
|
|
376
377
|
const w = a.map((S) => S.fixed);
|
|
377
378
|
function t(S, c) {
|
|
378
379
|
return G({
|
|
@@ -386,21 +387,21 @@ function yo(i, a, f) {
|
|
|
386
387
|
(S, c) => t(S, c)
|
|
387
388
|
), [w.join("-")]);
|
|
388
389
|
return [ie(
|
|
389
|
-
() =>
|
|
390
|
+
() => l.map((S) => S.map((c, N) => {
|
|
390
391
|
let E = N;
|
|
391
392
|
const p = c.$$columnIndex;
|
|
392
393
|
return Ee(p) && p.length === 2 ? E = c.fixed === "right" ? p[0] : p[1] : typeof p == "number" && (E = p), t(c, E);
|
|
393
394
|
})),
|
|
394
395
|
[
|
|
395
|
-
|
|
396
|
+
l.map((S) => `|${S.map((c) => c.fixed || "undefined").join("-")}|`).join("_")
|
|
396
397
|
]
|
|
397
398
|
), T];
|
|
398
399
|
}
|
|
399
|
-
function go(
|
|
400
|
-
const a =
|
|
401
|
-
return ie(() =>
|
|
400
|
+
function go(l) {
|
|
401
|
+
const a = l.map((t) => Pt(t.width)), f = l.map((t) => t.fixed);
|
|
402
|
+
return ie(() => l.map((t) => {
|
|
402
403
|
let T = 0;
|
|
403
|
-
return t.fixed === "left" &&
|
|
404
|
+
return t.fixed === "left" && l.some((r) => {
|
|
404
405
|
if (r.fixed === "left") {
|
|
405
406
|
if (r.key === t.key)
|
|
406
407
|
return !0;
|
|
@@ -408,7 +409,7 @@ function go(i) {
|
|
|
408
409
|
return T += c, !1;
|
|
409
410
|
}
|
|
410
411
|
return !1;
|
|
411
|
-
}), t.fixed === "right" && [...
|
|
412
|
+
}), t.fixed === "right" && [...l].reverse().some((r) => {
|
|
412
413
|
if (r.fixed === "right") {
|
|
413
414
|
if (r.key === t.key)
|
|
414
415
|
return !0;
|
|
@@ -419,10 +420,10 @@ function go(i) {
|
|
|
419
420
|
}), T;
|
|
420
421
|
}), [a.join("-"), f.join("-")]);
|
|
421
422
|
}
|
|
422
|
-
function xo(
|
|
423
|
-
return
|
|
423
|
+
function xo(l) {
|
|
424
|
+
return l && !Xe.isValidElement(l) && Te(l);
|
|
424
425
|
}
|
|
425
|
-
function Co(
|
|
426
|
+
function Co(l) {
|
|
426
427
|
const a = oo(), {
|
|
427
428
|
component: f,
|
|
428
429
|
InnerComponentTd: w,
|
|
@@ -441,18 +442,18 @@ function Co(i) {
|
|
|
441
442
|
renderExpandIcon: g,
|
|
442
443
|
rowKey: u,
|
|
443
444
|
recordHaveChildren: m,
|
|
444
|
-
haveTreeData:
|
|
445
|
-
} =
|
|
445
|
+
haveTreeData: B
|
|
446
|
+
} = l, { rtl: W } = Le(nt), F = Le(Bt), { ComponentBodyCell: ee } = Ae(f), q = se(null), Y = se(null), I = se(null), R = se(null), K = t?.tooltip?.show !== !1 && t?.ellipsis, z = G(
|
|
446
447
|
`${r}-td`,
|
|
447
448
|
S,
|
|
448
449
|
{
|
|
449
450
|
[`${r}-col-sorted`]: N && N.direction && N.field === t?.dataIndex
|
|
450
451
|
},
|
|
451
452
|
t?.className,
|
|
452
|
-
Qe(t?.bodyClassName) ? t
|
|
453
|
+
Qe(t?.bodyClassName) ? t?.bodyClassName(p, y) : t?.bodyClassName
|
|
453
454
|
);
|
|
454
|
-
let
|
|
455
|
-
t?.fixed === "left" && (x[
|
|
455
|
+
let L = {}, X, i, x = {};
|
|
456
|
+
if (t?.fixed === "left" && (x[W ? "right" : "left"] = c), t?.fixed === "right" && (x[W ? "left" : "right"] = c), Te(t?.cellStyle) && (x = {
|
|
456
457
|
...x,
|
|
457
458
|
...t?.cellStyle
|
|
458
459
|
}), Te(t?.bodyCellStyle) && (x = {
|
|
@@ -461,8 +462,11 @@ function Co(i) {
|
|
|
461
462
|
}), Qe(t?.bodyCellStyle) && (x = {
|
|
462
463
|
...x,
|
|
463
464
|
...t?.bodyCellStyle?.(p, y) ?? {}
|
|
464
|
-
}), t?.align && (x.textAlign = t?.align), E && t
|
|
465
|
-
|
|
465
|
+
}), t?.align && (x.textAlign = t?.align), E && t?.width) {
|
|
466
|
+
const V = t?.width;
|
|
467
|
+
x.width = V, x.minWidth = V, x.maxWidth = V;
|
|
468
|
+
}
|
|
469
|
+
const { onHandleSave: b, ...A } = t?.onCell ? t?.onCell(
|
|
466
470
|
p,
|
|
467
471
|
y,
|
|
468
472
|
t,
|
|
@@ -479,22 +483,22 @@ function Co(i) {
|
|
|
479
483
|
{ rowKey: u }
|
|
480
484
|
// 潘启宝添加
|
|
481
485
|
), [p, t, y]);
|
|
482
|
-
if (Qe(D) || (C = Zt(p, t?.dataIndex ?? "")), xo(C) && (
|
|
483
|
-
}), [
|
|
486
|
+
if (Qe(D) || (C = Zt(p, t?.dataIndex ?? "")), xo(C) && (L = C?.props, X = L?.rowSpan, i = L?.colSpan, C = C?.children), et(() => (a(), () => {
|
|
487
|
+
}), [q.current, Y.current]), X === 0 || i === 0)
|
|
484
488
|
return null;
|
|
485
489
|
Ye(C) && (C = C.trim()), !C && C !== 0 && (C = t?.placeholder ?? v ?? "-");
|
|
486
490
|
const $ = t?.ellipsis && Ye(C) && !K ? {
|
|
487
491
|
title: C
|
|
488
|
-
} : {}, J =
|
|
492
|
+
} : {}, J = B && t?.$$isFirstColumn, d = J && m;
|
|
489
493
|
let te = J && h > 0 ? O * h : 0;
|
|
490
494
|
J && !m && (te += 20);
|
|
491
|
-
function re(
|
|
495
|
+
function re(V) {
|
|
492
496
|
a();
|
|
493
497
|
}
|
|
494
498
|
const Q = `${T}-${y}-${te}-${d}`, ue = /* @__PURE__ */ o(
|
|
495
499
|
"div",
|
|
496
500
|
{
|
|
497
|
-
ref:
|
|
501
|
+
ref: q,
|
|
498
502
|
className: G(`${r}-cell`, {
|
|
499
503
|
[`${r}-cell-text-ellipsis`]: t?.ellipsis
|
|
500
504
|
}),
|
|
@@ -503,13 +507,13 @@ function Co(i) {
|
|
|
503
507
|
children: /* @__PURE__ */ le(
|
|
504
508
|
ee,
|
|
505
509
|
{
|
|
506
|
-
ref:
|
|
510
|
+
ref: Y,
|
|
507
511
|
className: `${r}-cell-wrap-value`,
|
|
508
512
|
...Ye(ee) ? {} : {
|
|
509
513
|
rowData: Z(p),
|
|
510
514
|
column: t,
|
|
511
515
|
onHandleSave: b,
|
|
512
|
-
...
|
|
516
|
+
...A
|
|
513
517
|
},
|
|
514
518
|
children: [
|
|
515
519
|
!!te && /* @__PURE__ */ o(
|
|
@@ -528,7 +532,7 @@ function Co(i) {
|
|
|
528
532
|
children: g(p, u)
|
|
529
533
|
}
|
|
530
534
|
),
|
|
531
|
-
|
|
535
|
+
t?.dangerouslySetInnerHTML && Ye(C) ? /* @__PURE__ */ o(
|
|
532
536
|
"span",
|
|
533
537
|
{
|
|
534
538
|
dangerouslySetInnerHTML: {
|
|
@@ -543,12 +547,12 @@ function Co(i) {
|
|
|
543
547
|
},
|
|
544
548
|
Q
|
|
545
549
|
);
|
|
546
|
-
let
|
|
550
|
+
let j = /* @__PURE__ */ o(
|
|
547
551
|
w,
|
|
548
552
|
{
|
|
549
|
-
className:
|
|
553
|
+
className: z,
|
|
550
554
|
style: x,
|
|
551
|
-
...jn(
|
|
555
|
+
...jn(A, [
|
|
552
556
|
"onClick",
|
|
553
557
|
"onDoubleClick",
|
|
554
558
|
"onContextMenu",
|
|
@@ -559,16 +563,16 @@ function Co(i) {
|
|
|
559
563
|
"onMouseDown",
|
|
560
564
|
"onMouseUp"
|
|
561
565
|
]),
|
|
562
|
-
...
|
|
566
|
+
...L,
|
|
563
567
|
children: ue
|
|
564
568
|
},
|
|
565
569
|
t?.key || t?.dataIndex || T
|
|
566
570
|
);
|
|
567
571
|
if (K) {
|
|
568
|
-
let
|
|
569
|
-
if (
|
|
570
|
-
const xe = t?.tooltip?.render, Ce = Qe(xe) ? xe(p, y, t) : t?.tooltip?.content ?? ro(
|
|
571
|
-
|
|
572
|
+
let V = 0, fe = 0, ae = 0, me = 0;
|
|
573
|
+
if (q.current instanceof Element && (V = q.current.getBoundingClientRect().width), Y.current instanceof Element && (fe = Y.current.getBoundingClientRect().width), I.current instanceof Element && (ae = I.current.getBoundingClientRect().width), R.current instanceof Element && (me = R.current.getBoundingClientRect().width), V < fe + ae + me) {
|
|
574
|
+
const xe = t?.tooltip?.render, Ce = Qe(xe) ? xe(p, y, t) : t?.tooltip?.content ?? ro(j);
|
|
575
|
+
j = /* @__PURE__ */ o(
|
|
572
576
|
ln,
|
|
573
577
|
{
|
|
574
578
|
...t?.tooltip,
|
|
@@ -578,15 +582,15 @@ function Co(i) {
|
|
|
578
582
|
),
|
|
579
583
|
content: Ce,
|
|
580
584
|
triggerProps: F.triggerProps,
|
|
581
|
-
children:
|
|
585
|
+
children: j
|
|
582
586
|
}
|
|
583
587
|
);
|
|
584
588
|
}
|
|
585
589
|
}
|
|
586
|
-
return
|
|
590
|
+
return j;
|
|
587
591
|
}
|
|
588
592
|
const wo = Xe.memo(Co);
|
|
589
|
-
function So(
|
|
593
|
+
function So(l, a) {
|
|
590
594
|
const {
|
|
591
595
|
expandedRowRender: f,
|
|
592
596
|
onClickExpandBtn: w,
|
|
@@ -605,56 +609,56 @@ function So(i, a) {
|
|
|
605
609
|
virtualized: g,
|
|
606
610
|
stickyOffsets: u,
|
|
607
611
|
stickyClassNames: m,
|
|
608
|
-
getRowKey:
|
|
609
|
-
placeholder:
|
|
612
|
+
getRowKey: B,
|
|
613
|
+
placeholder: W,
|
|
610
614
|
expandProps: F = { strictTreeData: !0 },
|
|
611
615
|
data: ee,
|
|
612
|
-
expandedRowKeys:
|
|
613
|
-
childrenColumnName:
|
|
616
|
+
expandedRowKeys: q,
|
|
617
|
+
childrenColumnName: Y,
|
|
614
618
|
record: I,
|
|
615
619
|
index: R,
|
|
616
620
|
type: K,
|
|
617
|
-
shouldRowExpand:
|
|
618
|
-
level:
|
|
619
|
-
} =
|
|
621
|
+
shouldRowExpand: z,
|
|
622
|
+
level: L
|
|
623
|
+
} = l, { rtl: X } = Le(nt), i = Z(I), { ...x } = y?.(i, R) || {}, b = B(I), A = K === "radio" ? N.slice(0, 1) : N, D = b || R, C = A.indexOf(b) > -1, $ = q.indexOf(b) > -1, J = E.indexOf(b) > -1, d = G(
|
|
620
624
|
`${c}-tr`,
|
|
621
625
|
{
|
|
622
626
|
[`${c}-row-checked`]: C,
|
|
623
627
|
[`${c}-row-expanded`]: $
|
|
624
628
|
},
|
|
625
|
-
p?.(
|
|
626
|
-
), te = h && typeof h.checkboxProps == "function" ? h.checkboxProps(
|
|
629
|
+
p?.(i, R)
|
|
630
|
+
), te = h && typeof h.checkboxProps == "function" ? h.checkboxProps(i) : {}, re = G(`${c}-td`, `${c}-operation`), Q = (P) => G(re, `${c}-${P}`, {
|
|
627
631
|
[`${c}-selection-col`]: g && K === "checkbox" || K === "radio",
|
|
628
632
|
[`${c}-expand-icon-col`]: g && f
|
|
629
633
|
});
|
|
630
634
|
function ue(P) {
|
|
631
|
-
return F.strictTreeData ? Ee(P[
|
|
635
|
+
return F.strictTreeData ? Ee(P[Y]) && P[Y].length : P[Y] !== void 0;
|
|
632
636
|
}
|
|
633
|
-
function
|
|
637
|
+
function j() {
|
|
634
638
|
return ee.find((P) => ue(P));
|
|
635
639
|
}
|
|
636
|
-
const
|
|
640
|
+
const V = z(I, R), fe = ue(I), ae = j() && !f, me = ae && fe, Ce = F.expandRowByClick && (V || me) ? {
|
|
637
641
|
onClick: (P) => {
|
|
638
642
|
w(b), x?.onClick?.(P);
|
|
639
643
|
}
|
|
640
|
-
} : {}, { ComponentBodyRow: be, ComponentTd: Ie, getBodyComponentOperations: Oe } =
|
|
644
|
+
} : {}, { ComponentBodyRow: be, ComponentTd: Ie, getBodyComponentOperations: Oe } = Ae(T), ne = g ? "div" : be, ce = g ? "div" : Ie, $e = {
|
|
641
645
|
className: d,
|
|
642
646
|
key: D,
|
|
643
647
|
...x,
|
|
644
648
|
...Ce
|
|
645
649
|
}, Se = Ye(be) ? $e : { ...$e, record: I, index: R };
|
|
646
650
|
function Ne(P, ye) {
|
|
647
|
-
const { icon: ke } = F, Ke = !!~
|
|
651
|
+
const { icon: ke } = F, Ke = !!~q.indexOf(ye), Fe = {
|
|
648
652
|
onClick: (de) => {
|
|
649
653
|
de.stopPropagation(), w(ye);
|
|
650
654
|
}
|
|
651
655
|
};
|
|
652
656
|
return typeof ke == "function" ? ke({ expanded: Ke, record: P, ...Fe }) : /* @__PURE__ */ o("button", { ...Fe, type: "button", children: Ke ? /* @__PURE__ */ o(to, {}) : /* @__PURE__ */ o(no, {}) });
|
|
653
657
|
}
|
|
654
|
-
const
|
|
658
|
+
const We = f && /* @__PURE__ */ o(ce, { className: Q("expand-icon-cell"), children: V && Ne(I, b) }), Re = h && h.renderCell;
|
|
655
659
|
let Pe;
|
|
656
660
|
const De = /* @__PURE__ */ o(
|
|
657
|
-
|
|
661
|
+
Ht,
|
|
658
662
|
{
|
|
659
663
|
value: b,
|
|
660
664
|
onChange: (P) => r(P, I),
|
|
@@ -662,7 +666,7 @@ function So(i, a) {
|
|
|
662
666
|
indeterminate: J,
|
|
663
667
|
...te
|
|
664
668
|
}
|
|
665
|
-
),
|
|
669
|
+
), _ = /* @__PURE__ */ o(
|
|
666
670
|
sn,
|
|
667
671
|
{
|
|
668
672
|
onChange: () => S(b, I),
|
|
@@ -671,29 +675,29 @@ function So(i, a) {
|
|
|
671
675
|
...te
|
|
672
676
|
}
|
|
673
677
|
);
|
|
674
|
-
K === "checkbox" && (Pe = /* @__PURE__ */ o(ce, { className: Q("checkbox"), children: Re ? Re(De, C,
|
|
678
|
+
K === "checkbox" && (Pe = /* @__PURE__ */ o(ce, { className: Q("checkbox"), children: Re ? Re(De, C, i) : De })), K === "radio" && (Pe = /* @__PURE__ */ o(ce, { className: Q("radio"), children: Re ? Re(_, C, i) : _ }));
|
|
675
679
|
const pe = Oe({
|
|
676
680
|
selectionNode: Pe,
|
|
677
|
-
expandNode:
|
|
681
|
+
expandNode: We
|
|
678
682
|
});
|
|
679
683
|
return /* @__PURE__ */ tt(ne, { ...Se, key: Se.key, ref: a }, t.map((P, ye) => {
|
|
680
684
|
const ke = `${P.key}-${P.dataIndex}-${P.title}-${ye}`, Ke = u[ye], Fe = m[ye];
|
|
681
685
|
if (P.$$isOperation) {
|
|
682
686
|
let de = P.node, oe = !0;
|
|
683
687
|
P.title === Ct && (de = pe.find((qe) => qe.name === "selectionNode")?.node, oe = !1), P.title === xt && (de = pe.find((qe) => qe.name === "expandNode")?.node, oe = !1);
|
|
684
|
-
const
|
|
685
|
-
return Xe.cloneElement(
|
|
688
|
+
const ze = typeof de == "function" ? de(I) : de;
|
|
689
|
+
return Xe.cloneElement(ze, {
|
|
686
690
|
key: ke || ye,
|
|
687
|
-
...
|
|
691
|
+
...ze.props,
|
|
688
692
|
className: G(
|
|
689
693
|
oe ? re : "",
|
|
690
|
-
|
|
694
|
+
ze?.props?.className,
|
|
691
695
|
Fe
|
|
692
696
|
),
|
|
693
697
|
style: {
|
|
694
|
-
...
|
|
698
|
+
...ze?.props?.style,
|
|
695
699
|
...P.fixed === "left" ? {
|
|
696
|
-
[
|
|
700
|
+
[X ? "right" : "left"]: Ke
|
|
697
701
|
} : {},
|
|
698
702
|
width: P.width,
|
|
699
703
|
minWidth: P.width
|
|
@@ -709,7 +713,7 @@ function So(i, a) {
|
|
|
709
713
|
currentSorter: O.find(
|
|
710
714
|
(de) => de.field === (P.dataIndex || P.key)
|
|
711
715
|
),
|
|
712
|
-
placeholder:
|
|
716
|
+
placeholder: W,
|
|
713
717
|
indentSize: v,
|
|
714
718
|
stickyClassName: Fe,
|
|
715
719
|
stickyOffset: Ke,
|
|
@@ -718,12 +722,11 @@ function So(i, a) {
|
|
|
718
722
|
columnIndex: ye,
|
|
719
723
|
record: I,
|
|
720
724
|
trIndex: R,
|
|
721
|
-
level:
|
|
725
|
+
level: L,
|
|
722
726
|
haveTreeData: ae,
|
|
723
727
|
recordHaveChildren: fe,
|
|
724
728
|
rowKey: b,
|
|
725
|
-
renderExpandIcon: Ne
|
|
726
|
-
___dangerouslySetInnerHTML___: i.___dangerouslySetInnerHTML___
|
|
729
|
+
renderExpandIcon: Ne
|
|
727
730
|
},
|
|
728
731
|
ke
|
|
729
732
|
);
|
|
@@ -750,18 +753,18 @@ const rn = Kt(So), bo = Kt(function({
|
|
|
750
753
|
} = t;
|
|
751
754
|
let u;
|
|
752
755
|
p && "type" in p ? u = p.type : p && !("type" in p) && (u = "checkbox");
|
|
753
|
-
const m = g && ((R, K) => g(Z(R), K)),
|
|
754
|
-
const
|
|
756
|
+
const m = g && ((R, K) => g(Z(R), K)), B = (R) => Ee(R[N]) && R[N].length, W = (R, K) => "rowExpandable" in E && typeof E.rowExpandable == "function" ? E.rowExpandable(R) : m?.(R, K) !== null, F = (R, K) => {
|
|
757
|
+
const z = [], L = {
|
|
755
758
|
...t,
|
|
756
759
|
type: u,
|
|
757
|
-
shouldRowExpand:
|
|
760
|
+
shouldRowExpand: W
|
|
758
761
|
};
|
|
759
|
-
|
|
762
|
+
z.push(
|
|
760
763
|
/* @__PURE__ */ o(
|
|
761
764
|
rn,
|
|
762
765
|
{
|
|
763
766
|
ref: T,
|
|
764
|
-
...
|
|
767
|
+
...L,
|
|
765
768
|
record: R,
|
|
766
769
|
level: 0,
|
|
767
770
|
index: K
|
|
@@ -769,28 +772,28 @@ const rn = Kt(So), bo = Kt(function({
|
|
|
769
772
|
v(R)
|
|
770
773
|
)
|
|
771
774
|
);
|
|
772
|
-
const
|
|
773
|
-
Ee(
|
|
774
|
-
O.indexOf(x) !== -1 && (
|
|
775
|
+
const X = (i, x, b = 0) => {
|
|
776
|
+
Ee(i) && i.length && i.forEach((A, D) => {
|
|
777
|
+
O.indexOf(x) !== -1 && (z.push(
|
|
775
778
|
/* @__PURE__ */ tt(
|
|
776
779
|
rn,
|
|
777
780
|
{
|
|
778
|
-
...
|
|
779
|
-
key: v(
|
|
780
|
-
record:
|
|
781
|
+
...L,
|
|
782
|
+
key: v(A),
|
|
783
|
+
record: A,
|
|
781
784
|
level: b + 1,
|
|
782
785
|
index: D
|
|
783
786
|
}
|
|
784
787
|
)
|
|
785
|
-
),
|
|
788
|
+
), B(A) && X(A[N], v(A), b + 1));
|
|
786
789
|
});
|
|
787
790
|
};
|
|
788
|
-
return m ||
|
|
789
|
-
}, ee = v(a),
|
|
791
|
+
return m || X(R[N], v(R)), z;
|
|
792
|
+
}, ee = v(a), q = W(a, f) && O.indexOf(ee) !== -1, Y = w ? "div" : "tr", I = w ? "div" : "td";
|
|
790
793
|
return /* @__PURE__ */ le(Xe.Fragment, { children: [
|
|
791
794
|
F(a, f),
|
|
792
|
-
|
|
793
|
-
|
|
795
|
+
q && /* @__PURE__ */ o(
|
|
796
|
+
Y,
|
|
794
797
|
{
|
|
795
798
|
className: G(`${r}-tr`, `${r}-expand-content`),
|
|
796
799
|
children: /* @__PURE__ */ o(
|
|
@@ -814,7 +817,7 @@ const rn = Kt(So), bo = Kt(function({
|
|
|
814
817
|
)
|
|
815
818
|
] }, ee);
|
|
816
819
|
});
|
|
817
|
-
function $o(
|
|
820
|
+
function $o(l) {
|
|
818
821
|
const {
|
|
819
822
|
data: a,
|
|
820
823
|
columns: f,
|
|
@@ -827,9 +830,9 @@ function $o(i) {
|
|
|
827
830
|
virtualListProps: N,
|
|
828
831
|
getRowKey: E,
|
|
829
832
|
saveVirtualListRef: p
|
|
830
|
-
} =
|
|
831
|
-
|
|
832
|
-
}, { ComponentTbody: h } =
|
|
833
|
+
} = l, y = (B) => {
|
|
834
|
+
l.saveRef?.(B);
|
|
835
|
+
}, { ComponentTbody: h } = Ae(t);
|
|
833
836
|
let v = {}, O = {};
|
|
834
837
|
r && (r.x && (typeof r.x == "number" || typeof r.x == "string") && (v = {
|
|
835
838
|
width: r.x
|
|
@@ -840,15 +843,15 @@ function $o(i) {
|
|
|
840
843
|
className: `${w}-no-data`
|
|
841
844
|
};
|
|
842
845
|
S && (g.className = `${w}-no-data ${w}-expand-fixed-row`, g.style = { width: S });
|
|
843
|
-
const u = /* @__PURE__ */ o("tr", { className: G(`${w}-tr`, `${w}-empty-row`), children: /* @__PURE__ */ o("td", { className: `${w}-td`, colSpan: f.length, children: /* @__PURE__ */ o("div", { ...g, children: T }) }) }), m = (
|
|
844
|
-
const F = E(
|
|
846
|
+
const u = /* @__PURE__ */ o("tr", { className: G(`${w}-tr`, `${w}-empty-row`), children: /* @__PURE__ */ o("td", { className: `${w}-td`, colSpan: f.length, children: /* @__PURE__ */ o("div", { ...g, children: T }) }) }), m = (B, W) => {
|
|
847
|
+
const F = E(B) ?? W;
|
|
845
848
|
return /* @__PURE__ */ o(
|
|
846
849
|
bo,
|
|
847
850
|
{
|
|
848
|
-
record:
|
|
849
|
-
index:
|
|
851
|
+
record: B,
|
|
852
|
+
index: W,
|
|
850
853
|
virtualized: c,
|
|
851
|
-
tbodyProps:
|
|
854
|
+
tbodyProps: l
|
|
852
855
|
},
|
|
853
856
|
F
|
|
854
857
|
);
|
|
@@ -862,8 +865,8 @@ function $o(i) {
|
|
|
862
865
|
outerStyle: { ...v, minWidth: "100%", overflow: "visible" },
|
|
863
866
|
innerStyle: { right: "auto", minWidth: "100%" },
|
|
864
867
|
className: `${w}-body`,
|
|
865
|
-
ref: (
|
|
866
|
-
p(
|
|
868
|
+
ref: (B) => {
|
|
869
|
+
p(B), y(B?.dom);
|
|
867
870
|
},
|
|
868
871
|
itemKey: E,
|
|
869
872
|
...N,
|
|
@@ -871,9 +874,9 @@ function $o(i) {
|
|
|
871
874
|
}
|
|
872
875
|
) : /* @__PURE__ */ o("div", { className: `${w}-body`, ref: y, children: /* @__PURE__ */ o("table", { children: /* @__PURE__ */ o("tbody", { children: u }) }) }) : /* @__PURE__ */ o(h, { ref: y, children: a.length > 0 ? a.map(m) : u });
|
|
873
876
|
}
|
|
874
|
-
const No =
|
|
875
|
-
function Ro(
|
|
876
|
-
const { summary: a, data: f, prefixCls: w, columns: t, stickyOffsets: T, stickyClassNames: r } =
|
|
877
|
+
const No = An({});
|
|
878
|
+
function Ro(l) {
|
|
879
|
+
const { summary: a, data: f, prefixCls: w, columns: t, stickyOffsets: T, stickyClassNames: r } = l;
|
|
877
880
|
return /* @__PURE__ */ o("tfoot", { className: `${w}-tfoot`, children: /* @__PURE__ */ o(
|
|
878
881
|
No.Provider,
|
|
879
882
|
{
|
|
@@ -882,11 +885,11 @@ function Ro(i) {
|
|
|
882
885
|
}
|
|
883
886
|
) });
|
|
884
887
|
}
|
|
885
|
-
function ko(
|
|
886
|
-
return
|
|
888
|
+
function ko(l, a) {
|
|
889
|
+
return l === "ascend" ? a?.Table.sortAscend : l === "descend" ? a?.Table.sortDescend : a?.Table.cancelSort;
|
|
887
890
|
}
|
|
888
891
|
const vo = { bottom: 0 };
|
|
889
|
-
function To(
|
|
892
|
+
function To(l) {
|
|
890
893
|
const {
|
|
891
894
|
onSort: a,
|
|
892
895
|
onFilter: f,
|
|
@@ -906,33 +909,33 @@ function To(i) {
|
|
|
906
909
|
cellStyle: g,
|
|
907
910
|
headerCellStyle: u,
|
|
908
911
|
rowSpan: m,
|
|
909
|
-
colSpan:
|
|
910
|
-
headerCellProps:
|
|
912
|
+
colSpan: B,
|
|
913
|
+
headerCellProps: W,
|
|
911
914
|
prefixCls: F,
|
|
912
915
|
align: ee = "left",
|
|
913
|
-
component:
|
|
914
|
-
filterIcon:
|
|
916
|
+
component: q,
|
|
917
|
+
filterIcon: Y,
|
|
915
918
|
filterDropdown: I,
|
|
916
919
|
filterMultiple: R = !0,
|
|
917
920
|
ellipsis: K,
|
|
918
|
-
filterDropdownProps:
|
|
919
|
-
onFilterDropdownVisibleChange:
|
|
920
|
-
column:
|
|
921
|
-
showSorterTooltip:
|
|
921
|
+
filterDropdownProps: z,
|
|
922
|
+
onFilterDropdownVisibleChange: L,
|
|
923
|
+
column: X,
|
|
924
|
+
showSorterTooltip: i,
|
|
922
925
|
index: x
|
|
923
|
-
} =
|
|
926
|
+
} = l, { locale: b, rtl: A } = Le(nt), D = Le(Bt), C = S || c || x, [$, J, d] = ao([], {
|
|
924
927
|
value: T[C] || []
|
|
925
|
-
}), [te, re] = he(!1), [Q, ue] = he(!1),
|
|
928
|
+
}), [te, re] = he(!1), [Q, ue] = he(!1), j = E && Ee(p) && p.length, V = j ? fe() : void 0;
|
|
926
929
|
et(() => {
|
|
927
930
|
J(T[C] || []);
|
|
928
931
|
}, [T, C]), et(() => {
|
|
929
932
|
$ && $ !== d && J($);
|
|
930
933
|
}, [te]);
|
|
931
934
|
function fe() {
|
|
932
|
-
const
|
|
933
|
-
if (!
|
|
935
|
+
const _ = r && r.direction;
|
|
936
|
+
if (!_ || r && r.field !== C)
|
|
934
937
|
return p[0];
|
|
935
|
-
const pe = p.indexOf(
|
|
938
|
+
const pe = p.indexOf(_);
|
|
936
939
|
if (pe < p.length)
|
|
937
940
|
return p[pe + 1];
|
|
938
941
|
}
|
|
@@ -945,56 +948,56 @@ function To(i) {
|
|
|
945
948
|
function me() {
|
|
946
949
|
t({ dataIndex: C }), xe(!1);
|
|
947
950
|
}
|
|
948
|
-
function xe(
|
|
949
|
-
re(
|
|
951
|
+
function xe(_) {
|
|
952
|
+
re(_), L?.(_);
|
|
950
953
|
}
|
|
951
|
-
function Ce(
|
|
954
|
+
function Ce(_, pe) {
|
|
952
955
|
let P = [...d];
|
|
953
956
|
if (R)
|
|
954
|
-
pe ? P = P.concat(
|
|
955
|
-
P.findIndex((ye) => ye ===
|
|
957
|
+
pe ? P = P.concat(_) : P.splice(
|
|
958
|
+
P.findIndex((ye) => ye === _),
|
|
956
959
|
1
|
|
957
960
|
);
|
|
958
961
|
else if (P.length > 0)
|
|
959
|
-
if (P[0] !==
|
|
960
|
-
P = [
|
|
962
|
+
if (P[0] !== _)
|
|
963
|
+
P = [_];
|
|
961
964
|
else
|
|
962
965
|
return;
|
|
963
966
|
else
|
|
964
|
-
P = [
|
|
967
|
+
P = [_];
|
|
965
968
|
J(P);
|
|
966
969
|
}
|
|
967
|
-
function be(
|
|
968
|
-
J(
|
|
970
|
+
function be(_) {
|
|
971
|
+
J(_ || d), re(!1), w?.(
|
|
969
972
|
{ filters: y, onFilter: f, dataIndex: C },
|
|
970
|
-
|
|
973
|
+
_ || d
|
|
971
974
|
);
|
|
972
975
|
}
|
|
973
976
|
function Ie() {
|
|
974
977
|
return typeof I == "function" ? I({
|
|
975
978
|
filterKeys: d,
|
|
976
|
-
setFilterKeys: (
|
|
977
|
-
J(
|
|
979
|
+
setFilterKeys: (_, pe) => {
|
|
980
|
+
J(_), pe?.();
|
|
978
981
|
},
|
|
979
982
|
confirm: be
|
|
980
983
|
}) : /* @__PURE__ */ le("div", { className: `${F}-filters-popup`, children: [
|
|
981
|
-
/* @__PURE__ */ o("div", { className: `${F}-filters-list`, children: y.map((
|
|
982
|
-
const pe = d.findIndex((P) => P ===
|
|
984
|
+
/* @__PURE__ */ o("div", { className: `${F}-filters-list`, children: y.map((_) => {
|
|
985
|
+
const pe = d.findIndex((P) => P === _.value) !== -1;
|
|
983
986
|
return /* @__PURE__ */ o("div", { className: `${F}-filters-item`, children: R ? /* @__PURE__ */ o(
|
|
984
|
-
|
|
987
|
+
Ht,
|
|
985
988
|
{
|
|
986
989
|
checked: pe,
|
|
987
|
-
onChange: (P) => Ce(
|
|
988
|
-
children:
|
|
990
|
+
onChange: (P) => Ce(_.value, P),
|
|
991
|
+
children: _.text
|
|
989
992
|
}
|
|
990
993
|
) : /* @__PURE__ */ o(
|
|
991
994
|
sn,
|
|
992
995
|
{
|
|
993
996
|
checked: pe,
|
|
994
|
-
onChange: (P) => Ce(
|
|
995
|
-
children:
|
|
997
|
+
onChange: (P) => Ce(_.value, P),
|
|
998
|
+
children: _.text
|
|
996
999
|
}
|
|
997
|
-
) },
|
|
1000
|
+
) }, _.value);
|
|
998
1001
|
}) }),
|
|
999
1002
|
/* @__PURE__ */ le(co, { className: `${F}-filters-btn`, children: [
|
|
1000
1003
|
/* @__PURE__ */ o(en, { onClick: me, size: "mini", children: b?.Table.resetText }),
|
|
@@ -1002,8 +1005,8 @@ function To(i) {
|
|
|
1002
1005
|
] })
|
|
1003
1006
|
] });
|
|
1004
1007
|
}
|
|
1005
|
-
const Oe = (
|
|
1006
|
-
[`${F}-sorter-icon-active`]: r && r.direction ===
|
|
1008
|
+
const Oe = (_) => G(`${F}-sorter-icon`, {
|
|
1009
|
+
[`${F}-sorter-icon-active`]: r && r.direction === _ && r.field === C
|
|
1007
1010
|
}), ne = G(`${F}-filters`, {
|
|
1008
1011
|
[`${F}-filters-open`]: te,
|
|
1009
1012
|
[`${F}-filters-active`]: $ && $.length
|
|
@@ -1025,15 +1028,15 @@ function To(i) {
|
|
|
1025
1028
|
style: ce,
|
|
1026
1029
|
key: S || C
|
|
1027
1030
|
};
|
|
1028
|
-
|
|
1029
|
-
const { ComponentTh: Se, ComponentHeaderCell: Ne } =
|
|
1030
|
-
|
|
1031
|
+
B && B > 1 && ($e.colSpan = B), m && m > 1 && ($e.rowSpan = m);
|
|
1032
|
+
const { ComponentTh: Se, ComponentHeaderCell: Ne } = Ae(q), We = Ee(y) && y.length > 0 || typeof I == "function", Re = K && typeof N == "string" ? { title: N } : {}, Pe = /* @__PURE__ */ le(gt, { children: [
|
|
1033
|
+
j ? /* @__PURE__ */ o(
|
|
1031
1034
|
ln,
|
|
1032
1035
|
{
|
|
1033
|
-
content: ko(
|
|
1034
|
-
disabled: !
|
|
1036
|
+
content: ko(V, b),
|
|
1037
|
+
disabled: !i,
|
|
1035
1038
|
triggerProps: D.triggerProps,
|
|
1036
|
-
...Te(
|
|
1039
|
+
...Te(i) ? i : {},
|
|
1037
1040
|
children: /* @__PURE__ */ le(
|
|
1038
1041
|
"div",
|
|
1039
1042
|
{
|
|
@@ -1044,10 +1047,10 @@ function To(i) {
|
|
|
1044
1047
|
onMouseLeave: () => {
|
|
1045
1048
|
ue(!1);
|
|
1046
1049
|
},
|
|
1047
|
-
onClick: () => a(
|
|
1050
|
+
onClick: () => a(V, C),
|
|
1048
1051
|
children: [
|
|
1049
1052
|
/* @__PURE__ */ o("span", { className: `${F}-th-item-title`, ...Re, children: N }),
|
|
1050
|
-
|
|
1053
|
+
j && /* @__PURE__ */ le(
|
|
1051
1054
|
"div",
|
|
1052
1055
|
{
|
|
1053
1056
|
className: G(`${F}-sorter`, {
|
|
@@ -1064,29 +1067,29 @@ function To(i) {
|
|
|
1064
1067
|
)
|
|
1065
1068
|
}
|
|
1066
1069
|
) : /* @__PURE__ */ o("span", { className: `${F}-th-item-title`, ...Re, children: N }),
|
|
1067
|
-
|
|
1070
|
+
We && /* @__PURE__ */ o(
|
|
1068
1071
|
fo,
|
|
1069
1072
|
{
|
|
1070
1073
|
popup: Ie,
|
|
1071
1074
|
trigger: "click",
|
|
1072
1075
|
classNames: "slideDynamicOrigin",
|
|
1073
|
-
position:
|
|
1076
|
+
position: A ? "bl" : "br",
|
|
1074
1077
|
popupAlign: vo,
|
|
1075
1078
|
popupVisible: te,
|
|
1076
1079
|
onVisibleChange: xe,
|
|
1077
1080
|
...D.triggerProps,
|
|
1078
|
-
...
|
|
1079
|
-
children: /* @__PURE__ */ o("div", { className: ne, children:
|
|
1081
|
+
...z?.triggerProps,
|
|
1082
|
+
children: /* @__PURE__ */ o("div", { className: ne, children: Y || /* @__PURE__ */ o(lo, {}) })
|
|
1080
1083
|
}
|
|
1081
1084
|
)
|
|
1082
1085
|
] }), De = G(`${F}-th-item`, {
|
|
1083
1086
|
[`${F}-cell-text-ellipsis`]: K,
|
|
1084
1087
|
[`${F}-cell-mouseenter`]: Q,
|
|
1085
|
-
[`${F}-cell-next-${
|
|
1086
|
-
[`${F}-col-has-sorter`]:
|
|
1087
|
-
[`${F}-col-has-filter`]:
|
|
1088
|
+
[`${F}-cell-next-${V}`]: Q && V,
|
|
1089
|
+
[`${F}-col-has-sorter`]: j,
|
|
1090
|
+
[`${F}-col-has-filter`]: We
|
|
1088
1091
|
});
|
|
1089
|
-
return
|
|
1092
|
+
return B !== 0 && /* @__PURE__ */ tt(
|
|
1090
1093
|
Se,
|
|
1091
1094
|
{
|
|
1092
1095
|
className: G(
|
|
@@ -1100,19 +1103,19 @@ function To(i) {
|
|
|
1100
1103
|
index: x,
|
|
1101
1104
|
...$e,
|
|
1102
1105
|
key: $e.key,
|
|
1103
|
-
...
|
|
1106
|
+
...W
|
|
1104
1107
|
},
|
|
1105
1108
|
/* @__PURE__ */ o(
|
|
1106
1109
|
Ne,
|
|
1107
1110
|
{
|
|
1108
1111
|
className: De,
|
|
1109
|
-
column: Ye(Ne) ? void 0 :
|
|
1112
|
+
column: Ye(Ne) ? void 0 : X,
|
|
1110
1113
|
children: Pe
|
|
1111
1114
|
}
|
|
1112
1115
|
)
|
|
1113
1116
|
);
|
|
1114
1117
|
}
|
|
1115
|
-
function Eo(
|
|
1118
|
+
function Eo(l) {
|
|
1116
1119
|
const {
|
|
1117
1120
|
activeSorters: a,
|
|
1118
1121
|
expandedRowRender: f,
|
|
@@ -1132,76 +1135,76 @@ function Eo(i) {
|
|
|
1132
1135
|
stickyOffsets: g,
|
|
1133
1136
|
groupStickyClassNames: u,
|
|
1134
1137
|
showSorterTooltip: m
|
|
1135
|
-
} =
|
|
1136
|
-
const
|
|
1137
|
-
return y.filter((
|
|
1138
|
-
}, [y, v]),
|
|
1139
|
-
return /* @__PURE__ */ o(
|
|
1140
|
-
const x = S?.(
|
|
1138
|
+
} = l, { rtl: B } = Le(nt), { ComponentThead: W, ComponentHeaderRow: F, getHeaderComponentOperations: ee } = Ae(E), q = h && (h.type === "checkbox" || !("type" in h)), Y = h && "checkAll" in h ? h.checkAll : !0, I = h && h.type === "radio", { columnTitle: R } = w, K = ie(() => {
|
|
1139
|
+
const X = new Set(v);
|
|
1140
|
+
return y.filter((i, x, b) => X.has(i));
|
|
1141
|
+
}, [y, v]), z = O.length > 1 ? { rowSpan: O.length } : {}, L = G(`${c}-th`, `${c}-operation`);
|
|
1142
|
+
return /* @__PURE__ */ o(W, { children: O.map((X, i) => {
|
|
1143
|
+
const x = S?.(X, i), b = (q || I) && i === 0 && /* @__PURE__ */ o(
|
|
1141
1144
|
"th",
|
|
1142
1145
|
{
|
|
1143
1146
|
className: G(
|
|
1144
|
-
|
|
1147
|
+
L,
|
|
1145
1148
|
`${c}-${I ? "radio" : "checkbox"}`
|
|
1146
1149
|
),
|
|
1147
1150
|
children: /* @__PURE__ */ le("div", { className: `${c}-th-item`, children: [
|
|
1148
|
-
|
|
1149
|
-
|
|
1151
|
+
Y && !I ? /* @__PURE__ */ o(
|
|
1152
|
+
Ht,
|
|
1150
1153
|
{
|
|
1151
1154
|
indeterminate: p && K.length > 0 && K.length !== v.length,
|
|
1152
1155
|
checked: p && K.length !== 0 && K.length === v.length,
|
|
1153
1156
|
disabled: !v.length,
|
|
1154
|
-
onChange:
|
|
1157
|
+
onChange: l.onCheckAll
|
|
1155
1158
|
}
|
|
1156
1159
|
) : null,
|
|
1157
1160
|
h && h.columnTitle
|
|
1158
1161
|
] })
|
|
1159
1162
|
}
|
|
1160
|
-
),
|
|
1163
|
+
), A = f && /* @__PURE__ */ o("th", { className: G(L, `${c}-expand`), children: R && /* @__PURE__ */ o("div", { className: `${c}-th-item`, children: R }) }), D = u[i], C = ee({
|
|
1161
1164
|
selectionNode: b,
|
|
1162
|
-
expandNode:
|
|
1165
|
+
expandNode: A
|
|
1163
1166
|
});
|
|
1164
1167
|
return /* @__PURE__ */ tt(
|
|
1165
1168
|
F,
|
|
1166
1169
|
{
|
|
1167
1170
|
...x,
|
|
1168
|
-
key:
|
|
1171
|
+
key: i,
|
|
1169
1172
|
className: `${c}-tr`
|
|
1170
1173
|
},
|
|
1171
|
-
|
|
1174
|
+
X.map(($, J) => {
|
|
1172
1175
|
const d = $.$$columnIndex;
|
|
1173
1176
|
let te = 0;
|
|
1174
1177
|
Ue(d) && d.length === 2 ? te = $.fixed === "right" ? g[d[1]] : g[d[0]] : typeof d == "number" && (te = g[d] || 0);
|
|
1175
1178
|
const re = D[J];
|
|
1176
1179
|
if ($.$$isOperation) {
|
|
1177
|
-
let
|
|
1178
|
-
$.title === Ct && (
|
|
1180
|
+
let V = $.node, fe = !0;
|
|
1181
|
+
$.title === Ct && (V = C.find(
|
|
1179
1182
|
(me) => me.name === "selectionNode"
|
|
1180
|
-
)?.node, fe = !1), $.title === xt && (
|
|
1183
|
+
)?.node, fe = !1), $.title === xt && (V = C.find(
|
|
1181
1184
|
(me) => me.name === "expandNode"
|
|
1182
1185
|
)?.node, fe = !1);
|
|
1183
|
-
const ae =
|
|
1186
|
+
const ae = V;
|
|
1184
1187
|
return Xe.cloneElement(ae, {
|
|
1185
1188
|
key: $.key || J,
|
|
1186
1189
|
...ae.props,
|
|
1187
|
-
...
|
|
1190
|
+
...z,
|
|
1188
1191
|
className: G(
|
|
1189
|
-
fe ?
|
|
1192
|
+
fe ? L : "",
|
|
1190
1193
|
ae?.props?.className,
|
|
1191
1194
|
re
|
|
1192
1195
|
),
|
|
1193
1196
|
style: {
|
|
1194
1197
|
...ae?.props?.style,
|
|
1195
1198
|
...$.fixed === "left" ? {
|
|
1196
|
-
[
|
|
1199
|
+
[B ? "right" : "left"]: te
|
|
1197
1200
|
} : {},
|
|
1198
1201
|
width: $.width,
|
|
1199
1202
|
minWidth: $.width
|
|
1200
1203
|
}
|
|
1201
1204
|
});
|
|
1202
1205
|
}
|
|
1203
|
-
const Q = $?.onHeaderCell?.($, J), ue = G(re, $.className),
|
|
1204
|
-
return $.fixed === "left" && (
|
|
1206
|
+
const Q = $?.onHeaderCell?.($, J), ue = G(re, $.className), j = {};
|
|
1207
|
+
return $.fixed === "left" && (j[B ? "right" : "left"] = te), $.fixed === "right" && (j[B ? "left" : "right"] = te), /* @__PURE__ */ tt(
|
|
1205
1208
|
To,
|
|
1206
1209
|
{
|
|
1207
1210
|
index: J,
|
|
@@ -1209,7 +1212,7 @@ function Eo(i) {
|
|
|
1209
1212
|
onHandleFilter: T,
|
|
1210
1213
|
onHandleFilterReset: r,
|
|
1211
1214
|
currentSorter: a.find(
|
|
1212
|
-
(
|
|
1215
|
+
(V) => V.field === ($.dataIndex || $.key)
|
|
1213
1216
|
),
|
|
1214
1217
|
currentFilters: N,
|
|
1215
1218
|
_key: $.key || $.dataIndex || J,
|
|
@@ -1220,7 +1223,7 @@ function Eo(i) {
|
|
|
1220
1223
|
prefixCls: c,
|
|
1221
1224
|
component: E,
|
|
1222
1225
|
className: ue,
|
|
1223
|
-
columnFixedStyle:
|
|
1226
|
+
columnFixedStyle: j,
|
|
1224
1227
|
showSorterTooltip: m
|
|
1225
1228
|
}
|
|
1226
1229
|
);
|
|
@@ -1238,7 +1241,7 @@ const Po = [], Fo = [], Io = {
|
|
|
1238
1241
|
indentSize: 15,
|
|
1239
1242
|
showSorterTooltip: !0
|
|
1240
1243
|
};
|
|
1241
|
-
function Oo(
|
|
1244
|
+
function Oo(l, a) {
|
|
1242
1245
|
const {
|
|
1243
1246
|
getPrefixCls: f,
|
|
1244
1247
|
loadingElement: w,
|
|
@@ -1247,12 +1250,12 @@ function Oo(i, a) {
|
|
|
1247
1250
|
renderEmpty: r,
|
|
1248
1251
|
componentConfig: S,
|
|
1249
1252
|
rtl: c
|
|
1250
|
-
} =
|
|
1251
|
-
|
|
1253
|
+
} = Le(nt), N = Gt(
|
|
1254
|
+
l,
|
|
1252
1255
|
Io,
|
|
1253
1256
|
S?.Table
|
|
1254
1257
|
), E = Gt(
|
|
1255
|
-
we(
|
|
1258
|
+
we(l?.pagination) ? l?.pagination : {},
|
|
1256
1259
|
we(S?.Table?.pagination) ? S?.Table?.pagination : {},
|
|
1257
1260
|
T || {}
|
|
1258
1261
|
), {
|
|
@@ -1264,53 +1267,53 @@ function Oo(i, a) {
|
|
|
1264
1267
|
columns: g = Fo,
|
|
1265
1268
|
data: u = Po,
|
|
1266
1269
|
scroll: m,
|
|
1267
|
-
noDataElement:
|
|
1268
|
-
showHeader:
|
|
1270
|
+
noDataElement: B,
|
|
1271
|
+
showHeader: W,
|
|
1269
1272
|
stripe: F,
|
|
1270
1273
|
hover: ee,
|
|
1271
|
-
pagination:
|
|
1272
|
-
onChange:
|
|
1274
|
+
pagination: q,
|
|
1275
|
+
onChange: Y,
|
|
1273
1276
|
pagePosition: I,
|
|
1274
1277
|
childrenColumnName: R,
|
|
1275
1278
|
indentSize: K,
|
|
1276
|
-
rowSelection:
|
|
1277
|
-
tableLayoutFixed:
|
|
1278
|
-
header:
|
|
1279
|
+
rowSelection: z,
|
|
1280
|
+
tableLayoutFixed: L,
|
|
1281
|
+
header: X,
|
|
1279
1282
|
// 潘启宝添加
|
|
1280
|
-
footer:
|
|
1283
|
+
footer: i,
|
|
1281
1284
|
virtualized: x,
|
|
1282
1285
|
renderPagination: b,
|
|
1283
|
-
summary:
|
|
1286
|
+
summary: A,
|
|
1284
1287
|
rowKey: D,
|
|
1285
1288
|
triggerProps: C
|
|
1286
1289
|
} = N, $ = m && we(m) && m.x, J = ie(
|
|
1287
1290
|
() => Jn(u, R),
|
|
1288
1291
|
[u, R]
|
|
1289
|
-
), d = f?.("table"), te = N.size || (["default", "middle", "small", "mini"].indexOf(t) > -1 ? t : "default"), re = se(null), Q = se(null), ue = se(null),
|
|
1292
|
+
), d = f?.("table"), te = N.size || (["default", "middle", "small", "mini"].indexOf(t) > -1 ? t : "default"), re = se(null), Q = se(null), ue = se(null), j = se(null), V = se(null), fe = se(null), ae = se(null), me = se(null), xe = se(null), Ce = se(null), be = se(0), Ie = se(!1), [Oe, ne] = po(N), { currentFilters: ce, defaultSorters: $e } = fn(), [Se, Ne] = he(1), [We, Re] = he(
|
|
1290
1293
|
E.pageSize || E.defaultPageSize || 10
|
|
1291
|
-
), [Pe, De] = he(ce), [
|
|
1294
|
+
), [Pe, De] = he(ce), [_, pe] = he(0), [P, ye] = he([]), ke = go(ne), [Ke, Fe] = yo(
|
|
1292
1295
|
Oe,
|
|
1293
1296
|
ne,
|
|
1294
1297
|
d
|
|
1295
1298
|
), {
|
|
1296
1299
|
currentSorter: de,
|
|
1297
1300
|
activeSorters: oe,
|
|
1298
|
-
getNextActiveSorters:
|
|
1301
|
+
getNextActiveSorters: ze,
|
|
1299
1302
|
updateStateSorters: qe
|
|
1300
|
-
} = ho(ne, $e), { ComponentTable: ot, ComponentBodyWrapper: cn, ComponentHeaderWrapper: dn } =
|
|
1303
|
+
} = ho(ne, $e), { ComponentTable: ot, ComponentBodyWrapper: cn, ComponentHeaderWrapper: dn } = Ae(h), wt = ie(() => He(D) ? (e) => D(Z(e)) : (e) => e[D], [D]);
|
|
1301
1304
|
function fn() {
|
|
1302
1305
|
const e = {};
|
|
1303
1306
|
let n = [];
|
|
1304
1307
|
return ne.forEach((s) => {
|
|
1305
1308
|
const k = s.dataIndex || s.key;
|
|
1306
1309
|
if (s.defaultFilters && (e[k] = s.defaultFilters), s.filteredValue && (e[k] = s.filteredValue), "defaultSortOrder" in s || "sortOrder" in s) {
|
|
1307
|
-
const
|
|
1310
|
+
const H = Ot(s.sorter), U = "sortOrder" in s ? s.sortOrder : s.defaultSortOrder, M = {
|
|
1308
1311
|
field: k,
|
|
1309
|
-
direction:
|
|
1312
|
+
direction: U,
|
|
1310
1313
|
sorterFn: Dt(s.sorter),
|
|
1311
|
-
priority:
|
|
1314
|
+
priority: H
|
|
1312
1315
|
};
|
|
1313
|
-
|
|
1316
|
+
U ? tn(H) ? n.every(
|
|
1314
1317
|
(ge) => tn(ge.priority) || !ge.direction
|
|
1315
1318
|
) && n.push(M) : n.every((ge) => !ge.direction) ? n.push(M) : n = [M] : n.push(M);
|
|
1316
1319
|
}
|
|
@@ -1321,43 +1324,43 @@ function Oo(i, a) {
|
|
|
1321
1324
|
(s) => "filteredValue" in s
|
|
1322
1325
|
), n = {};
|
|
1323
1326
|
return e.length && e.forEach((s, k) => {
|
|
1324
|
-
const
|
|
1325
|
-
|
|
1327
|
+
const H = s.key || s.dataIndex || k;
|
|
1328
|
+
H !== void 0 && (n[H] = s.filteredValue);
|
|
1326
1329
|
}), n;
|
|
1327
|
-
}, [ne]),
|
|
1330
|
+
}, [ne]), Be = ie(() => Object.keys(rt).length ? rt : Pe, [Pe, rt]);
|
|
1328
1331
|
function pn(e, n) {
|
|
1329
|
-
const s =
|
|
1332
|
+
const s = _t(n);
|
|
1330
1333
|
if (!s) return;
|
|
1331
1334
|
const k = {
|
|
1332
1335
|
direction: e,
|
|
1333
1336
|
field: n,
|
|
1334
1337
|
sorterFn: Dt(s.sorter),
|
|
1335
1338
|
priority: Ot(s.sorter)
|
|
1336
|
-
},
|
|
1337
|
-
qe(k,
|
|
1338
|
-
const
|
|
1339
|
+
}, H = ze(k);
|
|
1340
|
+
qe(k, H);
|
|
1341
|
+
const U = at(
|
|
1339
1342
|
k,
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
), M = Ge(
|
|
1343
|
-
|
|
1343
|
+
H,
|
|
1344
|
+
Be
|
|
1345
|
+
), M = Ge(U);
|
|
1346
|
+
Y?.(_e(U), k, Be, {
|
|
1344
1347
|
currentData: Z(M),
|
|
1345
|
-
currentAllData: Z(
|
|
1348
|
+
currentAllData: Z(U),
|
|
1346
1349
|
action: "sort"
|
|
1347
1350
|
});
|
|
1348
1351
|
}
|
|
1349
1352
|
function un(e) {
|
|
1350
|
-
const n = function(k,
|
|
1351
|
-
return (
|
|
1352
|
-
const ge = k(
|
|
1353
|
-
return
|
|
1353
|
+
const n = function(k, H) {
|
|
1354
|
+
return (U, M) => {
|
|
1355
|
+
const ge = k(U, M);
|
|
1356
|
+
return H === "descend" ? -ge : ge;
|
|
1354
1357
|
};
|
|
1355
1358
|
}, s = [...e];
|
|
1356
|
-
return s.sort((k,
|
|
1357
|
-
for (let
|
|
1358
|
-
const { sorterFn: ge, direction: vt } = s[
|
|
1359
|
-
if (!
|
|
1360
|
-
const mt = n(ge, vt)(k,
|
|
1359
|
+
return s.sort((k, H) => H.priority - k.priority), (k, H) => {
|
|
1360
|
+
for (let U = 0, M = s.length; U < M; U++) {
|
|
1361
|
+
const { sorterFn: ge, direction: vt } = s[U];
|
|
1362
|
+
if (!He(ge)) continue;
|
|
1363
|
+
const mt = n(ge, vt)(k, H);
|
|
1361
1364
|
if (mt !== 0)
|
|
1362
1365
|
return mt;
|
|
1363
1366
|
}
|
|
@@ -1366,7 +1369,7 @@ function Oo(i, a) {
|
|
|
1366
1369
|
}
|
|
1367
1370
|
function mn(e, n) {
|
|
1368
1371
|
const s = {
|
|
1369
|
-
...
|
|
1372
|
+
...Be,
|
|
1370
1373
|
[e.dataIndex]: n
|
|
1371
1374
|
}, k = {
|
|
1372
1375
|
...s,
|
|
@@ -1374,26 +1377,26 @@ function Oo(i, a) {
|
|
|
1374
1377
|
};
|
|
1375
1378
|
if (Ue(n) && n.length) {
|
|
1376
1379
|
De(k);
|
|
1377
|
-
const
|
|
1380
|
+
const H = at(
|
|
1378
1381
|
de,
|
|
1379
1382
|
oe,
|
|
1380
1383
|
s
|
|
1381
|
-
),
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
+
), U = Ge(H);
|
|
1385
|
+
Y?.(
|
|
1386
|
+
_e(H),
|
|
1384
1387
|
oe.length === 1 ? oe[0] : oe,
|
|
1385
1388
|
s,
|
|
1386
1389
|
{
|
|
1387
|
-
currentData: Z(
|
|
1388
|
-
currentAllData: Z(
|
|
1390
|
+
currentData: Z(U),
|
|
1391
|
+
currentAllData: Z(H),
|
|
1389
1392
|
action: "filter"
|
|
1390
1393
|
}
|
|
1391
1394
|
);
|
|
1392
|
-
} else Ue(n) && !n.length &&
|
|
1395
|
+
} else Ue(n) && !n.length && Lt(e);
|
|
1393
1396
|
}
|
|
1394
|
-
function
|
|
1397
|
+
function Lt({ dataIndex: e }) {
|
|
1395
1398
|
const n = {
|
|
1396
|
-
...
|
|
1399
|
+
...Be
|
|
1397
1400
|
};
|
|
1398
1401
|
delete n[e], De(n);
|
|
1399
1402
|
const s = at(
|
|
@@ -1401,8 +1404,8 @@ function Oo(i, a) {
|
|
|
1401
1404
|
oe,
|
|
1402
1405
|
n
|
|
1403
1406
|
), k = Ge(s);
|
|
1404
|
-
|
|
1405
|
-
|
|
1407
|
+
Y?.(
|
|
1408
|
+
_e(s),
|
|
1406
1409
|
oe.length === 1 ? oe[0] : oe,
|
|
1407
1410
|
n,
|
|
1408
1411
|
{
|
|
@@ -1415,37 +1418,37 @@ function Oo(i, a) {
|
|
|
1415
1418
|
const st = !!ne.find((e) => e.fixed === "left"), it = !!ne.find((e) => e.fixed === "right"), lt = st || it;
|
|
1416
1419
|
function at(e, n, s) {
|
|
1417
1420
|
let k = (J || []).slice();
|
|
1418
|
-
Object.keys(s).forEach((
|
|
1419
|
-
if (s[
|
|
1420
|
-
const M =
|
|
1421
|
-
M &&
|
|
1421
|
+
Object.keys(s).forEach((U) => {
|
|
1422
|
+
if (s[U] && s[U].length) {
|
|
1423
|
+
const M = _t(U);
|
|
1424
|
+
M && He(M.onFilter) && (k = k.filter((ge) => s[U].reduce(
|
|
1422
1425
|
(vt, mt) => vt || M.onFilter(mt, ge),
|
|
1423
1426
|
!1
|
|
1424
1427
|
)));
|
|
1425
1428
|
}
|
|
1426
1429
|
});
|
|
1427
|
-
const
|
|
1430
|
+
const H = (U) => U.slice().sort(un(n)).map((M) => Ue(M[R]) ? {
|
|
1428
1431
|
...M,
|
|
1429
|
-
[R]:
|
|
1432
|
+
[R]: H(M[R])
|
|
1430
1433
|
} : M);
|
|
1431
|
-
return e.direction &&
|
|
1434
|
+
return e.direction && He(e.sorterFn) || n.length ? H(k) : k;
|
|
1432
1435
|
}
|
|
1433
1436
|
const Me = at(
|
|
1434
1437
|
de,
|
|
1435
1438
|
oe,
|
|
1436
|
-
|
|
1439
|
+
Be
|
|
1437
1440
|
);
|
|
1438
|
-
function
|
|
1439
|
-
const n = E.pageSize ||
|
|
1441
|
+
function _e(e = Me) {
|
|
1442
|
+
const n = E.pageSize || We || 10, s = te === "middle" ? "default" : te;
|
|
1440
1443
|
let k = "top";
|
|
1441
1444
|
I === "tl" || I === "bl" ? k = "bottom" : k = "top";
|
|
1442
|
-
const
|
|
1443
|
-
|
|
1445
|
+
const H = Ue(e) ? e.length : 0, U = Math.ceil(H / n) < Se ? 1 : Se;
|
|
1446
|
+
U !== Se && Ne(U);
|
|
1444
1447
|
let M = {
|
|
1445
1448
|
size: s,
|
|
1446
|
-
total:
|
|
1449
|
+
total: H,
|
|
1447
1450
|
pageSize: n,
|
|
1448
|
-
current:
|
|
1451
|
+
current: U,
|
|
1449
1452
|
selectProps: {
|
|
1450
1453
|
triggerProps: {
|
|
1451
1454
|
...C,
|
|
@@ -1453,26 +1456,26 @@ function Oo(i, a) {
|
|
|
1453
1456
|
}
|
|
1454
1457
|
}
|
|
1455
1458
|
};
|
|
1456
|
-
return typeof
|
|
1459
|
+
return typeof q == "object" && q.selectProps && (M.selectProps = {
|
|
1457
1460
|
...M.selectProps,
|
|
1458
|
-
...
|
|
1459
|
-
}), we(
|
|
1461
|
+
...q.selectProps
|
|
1462
|
+
}), we(q) && (M = {
|
|
1460
1463
|
...M,
|
|
1461
|
-
...
|
|
1464
|
+
...q
|
|
1462
1465
|
}), we(E) && (M = {
|
|
1463
1466
|
...M,
|
|
1464
1467
|
...E
|
|
1465
1468
|
}), M.onChange = Nn, M;
|
|
1466
1469
|
}
|
|
1467
|
-
const ct =
|
|
1470
|
+
const ct = _e(), Ve = Ge();
|
|
1468
1471
|
function Ge(e = Me, n = ct) {
|
|
1469
1472
|
const { current: s = 0, pageSize: k = 10 } = n;
|
|
1470
|
-
return
|
|
1473
|
+
return q === !1 || we(q) && u.length <= k ? e : e.slice((s - 1) * k, s * k);
|
|
1471
1474
|
}
|
|
1472
|
-
const ve = !!(m && m.y), Je =
|
|
1473
|
-
|
|
1475
|
+
const ve = !!(m && m.y), Je = A?.(Z(Me)), St = A && Xe.isValidElement(Je) && Je.props.fixed, hn = ve && St;
|
|
1476
|
+
zn(() => {
|
|
1474
1477
|
bt();
|
|
1475
|
-
const e = re.current, n = Q.current, s =
|
|
1478
|
+
const e = re.current, n = Q.current, s = j.current;
|
|
1476
1479
|
n && Tt(n, "scroll", je);
|
|
1477
1480
|
const k = e && e.parentNode;
|
|
1478
1481
|
return e && k && Tt(k, "scroll", je), s && Tt(s, "scroll", je), () => {
|
|
@@ -1486,48 +1489,48 @@ function Oo(i, a) {
|
|
|
1486
1489
|
ne.length,
|
|
1487
1490
|
u
|
|
1488
1491
|
]), Ft(() => {
|
|
1489
|
-
const { total: e, pageSize: n } =
|
|
1492
|
+
const { total: e, pageSize: n } = _e(u);
|
|
1490
1493
|
Math.ceil(e / n) < Se && Ne(1);
|
|
1491
1494
|
}, [u?.length]), Ft(() => {
|
|
1492
1495
|
dt();
|
|
1493
|
-
}, [u, st, it, c]),
|
|
1494
|
-
getRootDomElement:
|
|
1496
|
+
}, [u, st, it, c]), Wn(a, () => ({
|
|
1497
|
+
getRootDomElement: At,
|
|
1495
1498
|
scrollIntoView: (e) => {
|
|
1496
1499
|
xe.current && xe.current.scrollTo({ key: e });
|
|
1497
1500
|
},
|
|
1498
|
-
getRootDOMNode:
|
|
1501
|
+
getRootDOMNode: At
|
|
1499
1502
|
}));
|
|
1500
|
-
function
|
|
1501
|
-
return
|
|
1503
|
+
function At() {
|
|
1504
|
+
return V.current;
|
|
1502
1505
|
}
|
|
1503
|
-
Mn(
|
|
1506
|
+
Mn(Wt(), (e) => {
|
|
1504
1507
|
bt();
|
|
1505
|
-
}),
|
|
1508
|
+
}), _n(!0, bt);
|
|
1506
1509
|
function bt() {
|
|
1507
1510
|
if (lt || $) {
|
|
1508
1511
|
dt();
|
|
1509
|
-
const e =
|
|
1512
|
+
const e = Wt();
|
|
1510
1513
|
if (e) {
|
|
1511
1514
|
const n = e?.clientWidth ?? e?.getBoundingClientRect?.()?.width;
|
|
1512
1515
|
pe(n);
|
|
1513
1516
|
}
|
|
1514
1517
|
}
|
|
1515
1518
|
}
|
|
1516
|
-
function
|
|
1517
|
-
return Q.current || me.current || ae.current || fe.current ||
|
|
1519
|
+
function Wt() {
|
|
1520
|
+
return Q.current || me.current || ae.current || fe.current || V.current;
|
|
1518
1521
|
}
|
|
1519
1522
|
const yn = Ze(
|
|
1520
|
-
|
|
1521
|
-
const e =
|
|
1523
|
+
Ln(() => {
|
|
1524
|
+
const e = V.current, n = ve ? Q.current : Ce.current && Ce.current.parentNode;
|
|
1522
1525
|
if (n) {
|
|
1523
|
-
const s = c ? -n.scrollLeft : n.scrollLeft, k = s === 0,
|
|
1524
|
-
k &&
|
|
1526
|
+
const s = c ? -n.scrollLeft : n.scrollLeft, k = s === 0, H = s + 1 >= n.children[0].getBoundingClientRect().width - n.getBoundingClientRect().width;
|
|
1527
|
+
k && H ? ft(
|
|
1525
1528
|
e.classList,
|
|
1526
1529
|
`${d}-scroll-position-both`
|
|
1527
1530
|
) : k ? ft(
|
|
1528
1531
|
e.classList,
|
|
1529
1532
|
`${d}-scroll-position-${c ? "right" : "left"}`
|
|
1530
|
-
) :
|
|
1533
|
+
) : H ? ft(
|
|
1531
1534
|
e.classList,
|
|
1532
1535
|
`${d}-scroll-position-${c ? "left" : "right"}`
|
|
1533
1536
|
) : ft(
|
|
@@ -1537,21 +1540,21 @@ function Oo(i, a) {
|
|
|
1537
1540
|
} else
|
|
1538
1541
|
e && Mt(e.classList);
|
|
1539
1542
|
}, 100),
|
|
1540
|
-
[
|
|
1543
|
+
[V.current, Q.current, ve, c]
|
|
1541
1544
|
);
|
|
1542
1545
|
function dt() {
|
|
1543
1546
|
if (lt || $) {
|
|
1544
|
-
const e =
|
|
1545
|
-
e && (st &&
|
|
1547
|
+
const e = V.current;
|
|
1548
|
+
e && (st && zt(
|
|
1546
1549
|
e.classList,
|
|
1547
1550
|
`${d}-has-fixed-col-left`
|
|
1548
|
-
), it &&
|
|
1551
|
+
), it && zt(
|
|
1549
1552
|
e.classList,
|
|
1550
1553
|
`${d}-has-fixed-col-right`
|
|
1551
1554
|
)), yn();
|
|
1552
1555
|
}
|
|
1553
1556
|
}
|
|
1554
|
-
function
|
|
1557
|
+
function zt(e, n) {
|
|
1555
1558
|
e.contains(n) || e.add(n);
|
|
1556
1559
|
}
|
|
1557
1560
|
function Mt(e) {
|
|
@@ -1570,16 +1573,16 @@ function Oo(i, a) {
|
|
|
1570
1573
|
allSelectedRowKeys: bn,
|
|
1571
1574
|
flattenData: $n
|
|
1572
1575
|
} = mo(N, Ve, J, wt);
|
|
1573
|
-
function
|
|
1576
|
+
function _t(e) {
|
|
1574
1577
|
return ne.find((n, s) => typeof n.key < "u" ? typeof n.key == "number" && typeof e == "string" ? n.key.toString() === e : n.key === e : typeof n.dataIndex < "u" ? n.dataIndex === e : typeof e == "number" ? s === e : !1);
|
|
1575
1578
|
}
|
|
1576
1579
|
function Nn(e, n) {
|
|
1577
|
-
Ne(e), Re(n), e !== Se && Rn(),
|
|
1578
|
-
const s = { ...
|
|
1579
|
-
|
|
1580
|
+
Ne(e), Re(n), e !== Se && Rn(), z && !z.checkCrossPage && $t.length && (Sn([]), z.onChange?.([], []));
|
|
1581
|
+
const s = { ..._e(), current: e, pageSize: n };
|
|
1582
|
+
Y?.(
|
|
1580
1583
|
s,
|
|
1581
1584
|
oe.length === 1 ? oe[0] : oe,
|
|
1582
|
-
|
|
1585
|
+
Be,
|
|
1583
1586
|
{
|
|
1584
1587
|
currentData: Z(
|
|
1585
1588
|
Ge(Me, s)
|
|
@@ -1594,8 +1597,8 @@ function Oo(i, a) {
|
|
|
1594
1597
|
e && e.scrollTo({ top: 0, behavior: "smooth" });
|
|
1595
1598
|
}
|
|
1596
1599
|
function je(e) {
|
|
1597
|
-
const { target: n } = e, s = Q.current, k = re.current && re.current.parentNode,
|
|
1598
|
-
n.scrollLeft !== be.current && (k && (k.scrollLeft = n.scrollLeft), s && (s.scrollLeft = n.scrollLeft),
|
|
1600
|
+
const { target: n } = e, s = Q.current, k = re.current && re.current.parentNode, H = j.current;
|
|
1601
|
+
n.scrollLeft !== be.current && (k && (k.scrollLeft = n.scrollLeft), s && (s.scrollLeft = n.scrollLeft), H && (H.scrollLeft = n.scrollLeft), dt()), be.current = e.target.scrollLeft;
|
|
1599
1602
|
}
|
|
1600
1603
|
function kn(e) {
|
|
1601
1604
|
const { target: n } = e, s = Ce.current;
|
|
@@ -1615,9 +1618,9 @@ function Oo(i, a) {
|
|
|
1615
1618
|
function Tn() {
|
|
1616
1619
|
requestAnimationFrame((e) => {
|
|
1617
1620
|
const n = re.current && re.current.parentNode, s = Qn(n);
|
|
1618
|
-
s && s > 0 && (n.style.marginBottom = `-${s}px`, n.style.paddingBottom = "0px",
|
|
1621
|
+
s && s > 0 && (n.style.marginBottom = `-${s}px`, n.style.paddingBottom = "0px", j.current && (j.current.style.marginBottom = `-${s}px`, j.current.style.paddingBottom = "0px")), setTimeout(() => {
|
|
1619
1622
|
const k = Q.current;
|
|
1620
|
-
Zn(k) ? (Ie.current = !0, n && (n.style.overflowY = "scroll", n.style.scrollSnapType = "y mandatory"),
|
|
1623
|
+
Zn(k) ? (Ie.current = !0, n && (n.style.overflowY = "scroll", n.style.scrollSnapType = "y mandatory"), j.current && (j.current.style.overflowY = "scroll", j.current.style.overflowY = "y mandatory")) : n && Ie.current && (Ie.current = !1, n.style.overflowY = "auto", n.style.overflowY = "y mandatory", j.current && (j.current.style.overflowY = "auto", j.current.style.overflowY = "y mandatory"));
|
|
1621
1624
|
}, 0);
|
|
1622
1625
|
});
|
|
1623
1626
|
}
|
|
@@ -1628,12 +1631,12 @@ function Oo(i, a) {
|
|
|
1628
1631
|
activeSorters: oe,
|
|
1629
1632
|
currentSorter: de,
|
|
1630
1633
|
selectedRowKeys: $t,
|
|
1631
|
-
currentFilters:
|
|
1634
|
+
currentFilters: Be,
|
|
1632
1635
|
onCheckAll: xn,
|
|
1633
1636
|
onSort: pn,
|
|
1634
1637
|
data: Ve,
|
|
1635
1638
|
onHandleFilter: mn,
|
|
1636
|
-
onHandleFilterReset:
|
|
1639
|
+
onHandleFilterReset: Lt,
|
|
1637
1640
|
prefixCls: d,
|
|
1638
1641
|
allSelectedRowKeys: bn,
|
|
1639
1642
|
groupColumns: Oe,
|
|
@@ -1667,7 +1670,7 @@ function Oo(i, a) {
|
|
|
1667
1670
|
Ro,
|
|
1668
1671
|
{
|
|
1669
1672
|
prefixCls: d,
|
|
1670
|
-
summary:
|
|
1673
|
+
summary: A,
|
|
1671
1674
|
data: Ve,
|
|
1672
1675
|
columns: ne,
|
|
1673
1676
|
stickyOffsets: ke,
|
|
@@ -1688,9 +1691,9 @@ function Oo(i, a) {
|
|
|
1688
1691
|
data: Ve,
|
|
1689
1692
|
prefixCls: d,
|
|
1690
1693
|
hasFixedColumn: lt,
|
|
1691
|
-
tableViewWidth:
|
|
1694
|
+
tableViewWidth: _,
|
|
1692
1695
|
indentSize: K,
|
|
1693
|
-
noDataElement:
|
|
1696
|
+
noDataElement: B || r("Table"),
|
|
1694
1697
|
activeSorters: oe,
|
|
1695
1698
|
currentSorter: de,
|
|
1696
1699
|
stickyOffsets: ke,
|
|
@@ -1698,8 +1701,7 @@ function Oo(i, a) {
|
|
|
1698
1701
|
getRowKey: wt,
|
|
1699
1702
|
saveVirtualListRef: (e) => {
|
|
1700
1703
|
x && (xe.current = e, Q.current = e?.dom);
|
|
1701
|
-
}
|
|
1702
|
-
___dangerouslySetInnerHTML___: N.___dangerouslySetInnerHTML___
|
|
1704
|
+
}
|
|
1703
1705
|
}
|
|
1704
1706
|
), qt = !x && !hn ? /* @__PURE__ */ le(gt, { children: [
|
|
1705
1707
|
Xt,
|
|
@@ -1742,17 +1744,17 @@ function Oo(i, a) {
|
|
|
1742
1744
|
$ && (e = {
|
|
1743
1745
|
width: m.x
|
|
1744
1746
|
});
|
|
1745
|
-
const n = /* @__PURE__ */ o("div", { className: `${d}-tfoot`, ref:
|
|
1747
|
+
const n = /* @__PURE__ */ o("div", { className: `${d}-tfoot`, ref: j, children: /* @__PURE__ */ le(ot, { style: e, children: [
|
|
1746
1748
|
/* @__PURE__ */ o(ht, { columns: ne, prefixCls: d }),
|
|
1747
1749
|
Yt
|
|
1748
|
-
] }) }), s = Je && ve && St === "top", k = Je && ve && St === "bottom",
|
|
1749
|
-
|
|
1750
|
+
] }) }), s = Je && ve && St === "top", k = Je && ve && St === "bottom", H = /* @__PURE__ */ le(gt, { children: [
|
|
1751
|
+
W ? En() : null,
|
|
1750
1752
|
s && n,
|
|
1751
1753
|
Pn(),
|
|
1752
1754
|
k && n
|
|
1753
|
-
] }),
|
|
1755
|
+
] }), U = He(X) && X(Ve), M = He(i) && i(Ve);
|
|
1754
1756
|
return /* @__PURE__ */ le(gt, { children: [
|
|
1755
|
-
!!
|
|
1757
|
+
!!U && /* @__PURE__ */ o("div", { className: `${d}-header-`, children: U }),
|
|
1756
1758
|
/* @__PURE__ */ o("div", { ref: fe, className: `${d}-container`, children: /* @__PURE__ */ o(
|
|
1757
1759
|
"div",
|
|
1758
1760
|
{
|
|
@@ -1764,9 +1766,9 @@ function Oo(i, a) {
|
|
|
1764
1766
|
ref: me,
|
|
1765
1767
|
className: `${d}-content-inner`,
|
|
1766
1768
|
onScroll: ve ? void 0 : kn,
|
|
1767
|
-
children: ve || x ?
|
|
1769
|
+
children: ve || x ? H : /* @__PURE__ */ le(ot, { ref: Ce, style: e, children: [
|
|
1768
1770
|
/* @__PURE__ */ o(ht, { prefixCls: d, columns: ne }),
|
|
1769
|
-
|
|
1771
|
+
H
|
|
1770
1772
|
] })
|
|
1771
1773
|
}
|
|
1772
1774
|
)
|
|
@@ -1785,26 +1787,26 @@ function Oo(i, a) {
|
|
|
1785
1787
|
[`${d}-border-body-cell`]: !Rt && Dn,
|
|
1786
1788
|
[`${d}-stripe`]: F,
|
|
1787
1789
|
[`${d}-hover`]: ee,
|
|
1788
|
-
[`${d}-type-radio`]:
|
|
1789
|
-
[`${d}-layout-fixed`]:
|
|
1790
|
+
[`${d}-type-radio`]: z && z.type === "radio",
|
|
1791
|
+
[`${d}-layout-fixed`]: L || m && (m.x || m.y) || g.find((e) => e.ellipsis),
|
|
1790
1792
|
[`${d}-fixed-column`]: lt,
|
|
1791
1793
|
[`${d}-virtualized`]: x,
|
|
1792
1794
|
[`${d}-rtl`]: c
|
|
1793
1795
|
},
|
|
1794
1796
|
y
|
|
1795
|
-
), kt = I === "tl" || I === "tr" || I === "topCenter",
|
|
1797
|
+
), kt = I === "tl" || I === "tr" || I === "topCenter", Bn = G(`${d}-pagination`, {
|
|
1796
1798
|
[`${d}-pagination-left`]: I === "tl" || I === "bl",
|
|
1797
1799
|
[`${d}-pagination-center`]: I === "topCenter" || I === "bottomCenter",
|
|
1798
1800
|
[`${d}-pagination-top`]: kt
|
|
1799
1801
|
});
|
|
1800
1802
|
let pt = N.loading;
|
|
1801
1803
|
typeof pt == "boolean" && (pt = { loading: pt });
|
|
1802
|
-
const
|
|
1804
|
+
const Hn = q !== !1 && (Me.length !== 0 || ct?.total > 0);
|
|
1803
1805
|
let ut;
|
|
1804
|
-
return
|
|
1806
|
+
return Hn && (He(b) ? ut = b(/* @__PURE__ */ o(Jt, { ...ct })) : ut = /* @__PURE__ */ o("div", { className: Bn, children: /* @__PURE__ */ o(Jt, { ...ct }) })), /* @__PURE__ */ o(Bt.Provider, { value: N, children: /* @__PURE__ */ o(
|
|
1805
1807
|
"div",
|
|
1806
1808
|
{
|
|
1807
|
-
ref:
|
|
1809
|
+
ref: V,
|
|
1808
1810
|
style: p,
|
|
1809
1811
|
className: Kn,
|
|
1810
1812
|
...Un(N),
|
|
@@ -1829,7 +1831,7 @@ Do.displayName = "Table";
|
|
|
1829
1831
|
export {
|
|
1830
1832
|
No as S,
|
|
1831
1833
|
Do as T,
|
|
1832
|
-
|
|
1834
|
+
Ae as a,
|
|
1833
1835
|
uo as b,
|
|
1834
1836
|
mo as c,
|
|
1835
1837
|
ho as d,
|