@unicom-cloud/ui 0.8.96 → 0.8.98
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 +1 -1
- package/Carousel.js +1 -1
- package/LiquidFill.js +4 -0
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/QrCode.js +57 -0
- package/Tour.js +63 -0
- package/Trigger.js +1 -1
- package/_virtual/_commonjsHelpers.js +6 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +4 -0
- package/affix/index.js +70 -72
- package/alert/index.js +56 -56
- package/anchor/Anchor.js +55 -55
- package/anchor/Link.js +34 -34
- package/anchor/util.js +5 -5
- package/auto-complete/index.js +116 -122
- package/avatar/Avatar.js +33 -33
- package/avatar/Group.js +26 -26
- package/back-top/index.js +58 -61
- package/badge/index.js +46 -46
- package/breadcrumb/Item.js +42 -43
- package/breadcrumb/index.js +47 -47
- package/button/Group.js +6 -6
- package/button/index.js +91 -91
- package/calendar/Month.js +75 -75
- package/calendar/Year.js +35 -35
- package/calendar/header/index.js +25 -25
- package/calendar/index.js +103 -103
- package/card/Grid.js +8 -8
- package/card/Meta.js +16 -16
- package/card/index.js +49 -49
- package/carousel/Arrow.js +19 -19
- package/carousel/Indicator.js +26 -26
- package/carousel/index.js +108 -108
- package/cascader/Cascader.js +178 -191
- package/cascader/base/node.js +133 -136
- package/cascader/base/store.js +82 -85
- package/cascader/panel/List.js +125 -129
- package/cascader/panel/Search.js +79 -81
- package/cascader/util.js +13 -13
- package/checkbox/Checkbox.js +94 -96
- package/checkbox/Group.js +54 -56
- package/checkbox/GroupBlock.js +28 -29
- package/collapse/Collapse.js +45 -45
- package/collapse/Item.js +53 -55
- package/color-picker/ControlBar.js +43 -43
- package/color-picker/InputAlpha.js +12 -12
- package/color-picker/InputHex.js +30 -31
- package/color-picker/InputRgb.js +24 -24
- package/color-picker/Palette.js +18 -18
- package/color-picker/Panel.js +122 -125
- package/color-picker/hooks/useColorPicker.js +85 -88
- package/color-picker/hooks/useControlBlock.js +38 -40
- package/color-picker/index.js +47 -47
- package/comment/index.js +29 -29
- package/components/common/higher-order/with-speech-synthesis/index.js +37 -40
- package/components/common/hooks/useId.js +8 -8
- package/components/common/hooks/useInView.js +16 -16
- package/components/common/hooks/useIntersectionObserver.js +1 -1
- package/components/common/hooks/useKeyboardEvent.js +9 -10
- package/components/common/hooks/useOverflowHidden.js +1 -4
- package/components/common/hooks/usePersistCallback.js +7 -7
- package/components/common/hooks/useStateCallback.js +9 -10
- package/components/common/hooks/useWindowSize.js +8 -8
- package/components/common/space/index.js +9 -7
- package/components/common/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/components/common/utils/dom.js +27 -29
- package/components/common/utils/findScrollParent.js +17 -0
- package/components/common/utils/intersectionObserver.js +21 -0
- package/components/common/utils/is.js +99 -109
- package/components/common/utils/mutationObserver.js +19 -0
- package/components/common/utils/reactDOM.js +34 -34
- package/components/common/utils/resizeObserver.js +21 -0
- package/copy/index.js +38 -40
- package/date-picker/Picker.js +290 -295
- package/date-picker/RangePicker.js +367 -372
- package/date-picker/index.js +33 -35
- package/date-picker/panel/Body.js +46 -47
- package/date-picker/panel/Header.js +33 -33
- package/date-picker/panel/Shortcut.js +31 -31
- package/date-picker/panel/date/index.js +85 -85
- package/date-picker/panel/month/index.js +59 -59
- package/date-picker/panel/quarter/index.js +67 -70
- package/date-picker/panel/range/index.js +101 -101
- package/date-picker/panel/year/index.js +39 -39
- package/date-picker/util.js +17 -18
- package/descriptions/index.js +62 -62
- package/details/index.js +53 -55
- package/development/index.js +9 -9
- package/dist/tinycolor/chunk/BOzCVdr0.js +1 -1
- package/dist/validate/src/index.js +5 -5
- package/dist/validate/src/util.js +1 -1
- package/divider/index.js +21 -21
- package/draggable/Item.js +35 -35
- package/draggable/index.js +22 -22
- package/drawer/Drawer.js +142 -147
- package/dropdown/Button.js +48 -48
- package/dropdown/index.js +88 -92
- package/empty/index.js +16 -16
- package/form/Control.js +211 -225
- package/form/Form.js +109 -113
- package/form/FormItem.js +118 -120
- package/form/FormList.js +60 -66
- package/form/FormProvider.js +31 -34
- package/form/hook/useContext.js +17 -19
- package/form/hook/useState.js +22 -23
- package/form/hook/useWatch.js +26 -27
- package/form/promisify.js +14 -18
- package/form/store.js +304 -316
- package/form/util.js +14 -15
- package/grid/Col.js +64 -64
- package/grid/Grid.js +51 -51
- package/grid/GridItem.js +48 -48
- package/grid/Row.js +39 -39
- package/hooks/useVerificationCode.js +41 -43
- package/hooks/useWatermark.js +89 -92
- package/icon/index.js +23 -24
- package/icon-hover/index.js +16 -16
- package/icons/file.js +11 -11
- package/image/Image.js +140 -141
- package/image/ImagePreview.js +252 -255
- package/image/ImagePreviewArrow.js +25 -25
- package/image/ImagePreviewGroup.js +62 -62
- package/image/util/getScale.js +25 -28
- package/index.js +684 -675
- package/input/Button.js +48 -50
- package/input/Group.js +9 -9
- package/input/Input.js +145 -154
- package/input/InputElement.js +108 -115
- package/input/Password.js +38 -38
- package/input/Search.js +51 -55
- package/input/Textarea.js +80 -81
- package/input/useComposition.js +23 -23
- package/input-number/decimal.js +59 -62
- package/input-number/index.js +139 -141
- package/input-tag/InputTag.js +222 -230
- package/layout/Content.js +6 -6
- package/layout/Footer.js +8 -8
- package/layout/Header.js +7 -7
- package/layout/Sider.js +88 -90
- package/layout/index.js +30 -30
- package/link/index.js +45 -46
- package/liquid-fill/LiquidFill.js +226 -0
- package/liquid-fill/LiquidFill2.js +3 -0
- package/liquid-fill/index.js +4 -0
- package/list/Item.js +28 -28
- package/list/Meta.js +12 -12
- package/list/index.js +146 -148
- package/mentions/index.js +75 -76
- package/menu/Item.js +58 -58
- package/menu/Menu.js +125 -127
- package/menu/OverflowWrap.js +39 -40
- package/menu/sub-menu/Inline.js +45 -45
- package/menu/util.js +26 -28
- package/message/index.js +96 -99
- package/message/useMessage.js +26 -27
- package/modal/Confirm.js +47 -49
- package/modal/Modal.js +250 -257
- package/modal/use-modal/Hook.js +26 -28
- package/modal/use-modal/index.js +46 -49
- package/notice/index.js +89 -90
- package/notification/index.js +60 -65
- package/notification/withNotification.js +35 -35
- package/overflow-ellipsis/OverflowItem.js +19 -20
- package/overflow-ellipsis/index.js +45 -46
- package/package.json +1 -1
- package/page-header/index.js +45 -45
- package/pagination/PageItem.js +87 -91
- package/pagination/PageJumper.js +40 -41
- package/pagination/PageOption.js +31 -35
- package/pagination/Pagination.js +162 -163
- package/picker/Input.js +90 -96
- package/picker/InputRange.js +115 -122
- package/popconfirm/index.js +98 -100
- package/popover/index.js +28 -28
- package/portal/Portal.js +10 -11
- package/progress/index.js +36 -36
- package/qr-code/index.js +99 -0
- package/qr-code/interface.js +1 -0
- package/radio/Group.js +48 -48
- package/radio/GroupBlock.js +32 -33
- package/radio/Radio.js +62 -64
- package/rate/index.js +88 -88
- package/resize-box/ResizeTrigger.js +39 -39
- package/resize-box/Split.js +92 -96
- package/resize-box/SplitGroup.js +116 -122
- package/resize-box/index.js +112 -115
- package/result/index.js +44 -44
- package/select/Option.js +53 -56
- package/select/Select.js +365 -381
- package/select/util.js +95 -99
- package/select-view/Core.js +159 -160
- package/skeleton/index.js +23 -23
- package/slider/Button.js +84 -92
- package/slider/Input.js +47 -49
- package/slider/Tick.js +28 -31
- package/slider/index.js +107 -107
- package/space/index.js +26 -26
- package/space-/index.js +51 -51
- package/spin/DotLoading.js +8 -8
- package/spin/index.js +47 -47
- package/statistic/Countdown.js +37 -37
- package/statistic/index.js +58 -58
- package/steps/Step.js +42 -42
- package/steps/index.js +54 -54
- package/style.css +1 -1
- package/switch/index.js +77 -78
- package/table/ColGroup.js +36 -37
- package/table/Table.js +447 -450
- package/table/hook/useExpand.js +24 -24
- package/table/hook/useRowSelection.js +62 -62
- package/table/summary/Row.js +16 -17
- package/table/tbody/Td.js +119 -118
- package/table/tbody/Tr.js +119 -121
- package/table/tbody/index.js +62 -63
- package/table/th-resizable/index.js +30 -30
- package/table/thead/Column.js +148 -148
- package/table/thead/index.js +87 -88
- package/tabs/Tab.js +55 -55
- package/tabs/TabContent.js +8 -8
- package/tabs/TabPane.js +15 -15
- package/tabs/hook/useHeaderScroll.js +36 -36
- package/tabs/tab-header/TabInk.js +31 -33
- package/tabs/tab-header/TabNavIcon.js +34 -35
- package/tabs/tab-header/index.js +192 -195
- package/tag/index.js +94 -97
- package/time-picker/Picker.js +167 -172
- package/time-picker/RangePicker.js +28 -28
- package/time-picker/TimePicker.js +146 -146
- package/timeline/Item.js +46 -46
- package/timeline/Timeline.js +52 -52
- package/tooltip/index.js +89 -95
- package/tour/index.js +289 -0
- package/transfer/Item.js +54 -54
- package/transfer/List.js +134 -136
- package/transfer/index.js +91 -91
- package/tree/Animation.js +49 -52
- package/tree/Node.js +114 -122
- package/tree/NodeList.js +51 -51
- package/tree/Tree.js +386 -393
- package/tree-select/List.js +71 -72
- package/tree-select/Select.js +135 -143
- package/tree-select/hook/useKeyCache.js +39 -39
- package/tree-select/hook/useStateValue.js +12 -12
- package/trigger/getPopupStyle.js +60 -61
- package/trigger/index.js +337 -346
- package/types/common/space/interface.d.ts +1 -1
- package/types/common/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/common/utils/findScrollParent.d.ts +2 -0
- package/types/common/utils/index.d.ts +5 -0
- package/types/common/utils/intersectionObserver.d.ts +2 -0
- package/types/common/utils/mutationObserver.d.ts +2 -0
- package/types/common/utils/resizeObserver.d.ts +2 -0
- package/types/pc/config-provider/interface.d.ts +6 -0
- package/types/pc/index.d.ts +3 -0
- package/types/pc/liquid-fill/LiquidFill.d.ts +115 -0
- package/types/pc/liquid-fill/LiquidFill2.d.ts +1 -0
- package/types/pc/liquid-fill/index.d.ts +2 -0
- package/types/pc/qr-code/index.d.ts +34 -0
- package/types/pc/qr-code/interface.d.ts +39 -0
- package/types/pc/table/interface.d.ts +2 -2
- package/types/pc/tour/index.d.ts +42 -0
- package/types/pc/utils/convertToDurationBasedOnTimeUnits.d.ts +3 -0
- package/types/pc/utils/findScrollParent.d.ts +2 -0
- package/types/pc/utils/index.d.ts +5 -0
- package/types/pc/utils/intersectionObserver.d.ts +2 -0
- package/types/pc/utils/mutationObserver.d.ts +2 -0
- package/types/pc/utils/names.d.ts +18 -0
- package/types/pc/utils/resizeObserver.d.ts +2 -0
- package/typography/Base.js +79 -81
- package/typography/EditContent.js +30 -33
- package/typography/Ellipsis.js +77 -73
- package/typography/Operations.js +50 -52
- package/typography/Paragraph.js +7 -7
- package/typography/Typography.js +7 -7
- package/typography/useEllipsis.js +105 -106
- package/upload/TriggerNode.js +69 -76
- package/upload/Upload.js +84 -87
- package/upload/Uploader.js +115 -118
- package/upload/list/PictureItem.js +61 -71
- package/upload/list/TextItem.js +61 -67
- package/upload/list/UploadProgress.js +42 -49
- package/upload/list/index.js +48 -49
- package/upload/request_.js +37 -38
- package/upload/util.js +39 -39
- package/utils/convertToDurationBasedOnTimeUnits.js +6 -0
- package/utils/findScrollParent.js +4 -0
- package/utils/index.js +281 -278
- package/utils/intersectionObserver.js +4 -0
- package/utils/mutationObserver.js +4 -0
- package/utils/names.js +12 -0
- package/utils/resizeObserver.js +4 -0
- package/verification-code/VerificationCode.js +50 -51
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +243 -244
- package/virtual-list/util/item.js +3 -4
- package/watermark/Watermark.js +27 -31
- package/components/common/utils/resizeObserverEffect.js +0 -23
- package/types/common/utils/resizeObserverEffect.d.ts +0 -2
- package/types/pc/utils/resizeObserverEffect.d.ts +0 -2
- package/utils/resizeObserverEffect.js +0 -4
package/table/Table.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { Tween as
|
|
3
|
-
import { quintInOut as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import { jsx as a, jsxs as T, Fragment as Fe } from "react/jsx-runtime";
|
|
2
|
+
import { Tween as no } from "../dist/tween/src/tween.js";
|
|
3
|
+
import { quintInOut as so } from "../dist/tween/src/easing.js";
|
|
4
|
+
import io from "lodash/debounce";
|
|
5
|
+
import A from "lodash/isArray";
|
|
6
|
+
import Je from "lodash/isNumber";
|
|
7
|
+
import p from "lodash/isPlainObject";
|
|
8
|
+
import lo from "lodash/throttle";
|
|
9
|
+
import co, { forwardRef as ao, useContext as fo, useMemo as ne, useRef as w, useState as V, useImperativeHandle as uo, useCallback as po, useEffect as Qe } from "react";
|
|
10
10
|
import "../config-provider/ConfigProvider.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { on as
|
|
18
|
-
import { pickDataAttributes as
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import { deepCloneData as
|
|
32
|
-
import
|
|
33
|
-
const
|
|
11
|
+
import mo from "../components/common/hooks/useIsomorphicLayoutEffect.js";
|
|
12
|
+
import Ze from "../components/common/hooks/useMergeProps.js";
|
|
13
|
+
import et from "../components/common/hooks/useUpdateEffect.js";
|
|
14
|
+
import tt from "../pagination/Pagination.js";
|
|
15
|
+
import go from "../spin/index.js";
|
|
16
|
+
import ot from "@unicom-cloud/utils/class-name";
|
|
17
|
+
import { on as se, off as ie } from "../components/common/utils/dom.js";
|
|
18
|
+
import { pickDataAttributes as yo } from "../components/common/utils/pick.js";
|
|
19
|
+
import { resizeObserver as ho } from "../components/common/utils/resizeObserver.js";
|
|
20
|
+
import le from "./ColGroup.js";
|
|
21
|
+
import bo from "./hook/useColumns.js";
|
|
22
|
+
import Co from "./hook/useComponent.js";
|
|
23
|
+
import xo from "./hook/useExpand.js";
|
|
24
|
+
import So from "./hook/useRowSelection.js";
|
|
25
|
+
import wo from "./hook/useSorter.js";
|
|
26
|
+
import Po from "./hook/useStickyClassNames.js";
|
|
27
|
+
import To from "./hook/useStickyOffsets.js";
|
|
28
|
+
import $o from "./tbody/index.js";
|
|
29
|
+
import Fo from "./tfoot/index.js";
|
|
30
|
+
import No from "./thead/index.js";
|
|
31
|
+
import { deepCloneData as vo, getOriginData as C, getSorterPriority as rt, getSorterFn as nt, getScrollBarHeight as Do, getScrollBarWidth as Bo } from "./util.js";
|
|
32
|
+
import Lo from "../config-provider/context.js";
|
|
33
|
+
const zo = [], Ro = [], Ho = {
|
|
34
34
|
showHeader: !0,
|
|
35
35
|
border: !0,
|
|
36
36
|
hover: !0,
|
|
@@ -40,590 +40,587 @@ const Rr = [], Hr = [], Er = {
|
|
|
40
40
|
indentSize: 15,
|
|
41
41
|
showSorterTooltip: !0
|
|
42
42
|
};
|
|
43
|
-
function
|
|
44
|
-
var Qt, Zt;
|
|
43
|
+
function ko(ce, st) {
|
|
45
44
|
const {
|
|
46
|
-
getPrefixCls:
|
|
47
|
-
loadingElement:
|
|
48
|
-
size:
|
|
49
|
-
tablePagination:
|
|
50
|
-
renderEmpty:
|
|
51
|
-
componentConfig:
|
|
52
|
-
rtl:
|
|
53
|
-
} =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
45
|
+
getPrefixCls: it,
|
|
46
|
+
loadingElement: lt,
|
|
47
|
+
size: Ne,
|
|
48
|
+
tablePagination: ct,
|
|
49
|
+
renderEmpty: at,
|
|
50
|
+
componentConfig: ae,
|
|
51
|
+
rtl: F
|
|
52
|
+
} = fo(Lo), b = Ze(
|
|
53
|
+
ce,
|
|
54
|
+
Ho,
|
|
55
|
+
ae?.Table
|
|
56
|
+
), N = Ze(
|
|
57
|
+
p(ce?.pagination) ? ce?.pagination : {},
|
|
58
|
+
p(ae?.Table?.pagination) ? ae?.Table?.pagination : {},
|
|
59
|
+
ct || {}
|
|
61
60
|
), {
|
|
62
|
-
style:
|
|
63
|
-
className:
|
|
64
|
-
component:
|
|
65
|
-
border:
|
|
66
|
-
borderCell:
|
|
67
|
-
columns:
|
|
68
|
-
data:
|
|
61
|
+
style: ft,
|
|
62
|
+
className: dt,
|
|
63
|
+
component: ut,
|
|
64
|
+
border: h,
|
|
65
|
+
borderCell: fe,
|
|
66
|
+
columns: ve = Ro,
|
|
67
|
+
data: m = zo,
|
|
69
68
|
scroll: i,
|
|
70
|
-
noDataElement:
|
|
71
|
-
showHeader:
|
|
72
|
-
stripe:
|
|
73
|
-
hover:
|
|
74
|
-
pagination:
|
|
75
|
-
onChange:
|
|
76
|
-
pagePosition:
|
|
77
|
-
childrenColumnName:
|
|
78
|
-
indentSize:
|
|
79
|
-
rowSelection:
|
|
80
|
-
tableLayoutFixed:
|
|
81
|
-
header:
|
|
69
|
+
noDataElement: pt,
|
|
70
|
+
showHeader: mt,
|
|
71
|
+
stripe: gt,
|
|
72
|
+
hover: yt,
|
|
73
|
+
pagination: P,
|
|
74
|
+
onChange: M,
|
|
75
|
+
pagePosition: x,
|
|
76
|
+
childrenColumnName: H,
|
|
77
|
+
indentSize: ht,
|
|
78
|
+
rowSelection: k,
|
|
79
|
+
tableLayoutFixed: bt,
|
|
80
|
+
header: De,
|
|
82
81
|
// 潘启宝添加
|
|
83
|
-
footer:
|
|
84
|
-
virtualized:
|
|
85
|
-
renderPagination:
|
|
86
|
-
summary:
|
|
87
|
-
rowKey:
|
|
88
|
-
} =
|
|
89
|
-
() =>
|
|
90
|
-
[
|
|
91
|
-
), n =
|
|
92
|
-
|
|
93
|
-
), [
|
|
94
|
-
|
|
82
|
+
footer: Be,
|
|
83
|
+
virtualized: v,
|
|
84
|
+
renderPagination: Le,
|
|
85
|
+
summary: de,
|
|
86
|
+
rowKey: Y
|
|
87
|
+
} = b, ze = ne(
|
|
88
|
+
() => vo(m, H),
|
|
89
|
+
[m, H]
|
|
90
|
+
), n = it?.("table"), ue = b.size || (["default", "middle", "small"].indexOf(Ne) > -1 ? Ne : "default"), D = w(null), u = w(null), pe = w(null), g = w(null), E = w(null), me = w(null), K = w(null), j = w(0), ge = w(!1), [Re, f] = bo(b), { currentFilters: Ct, defaultSorters: xt } = zt(), [O, ye] = V(1), [St, wt] = V(
|
|
91
|
+
N.pageSize || N.defaultPageSize || 10
|
|
92
|
+
), [He, ke] = V(Ct), [Pt, Tt] = V(0), [$t, Ft] = V([]), he = To(f), [Nt, Ee] = Po(
|
|
93
|
+
Re,
|
|
95
94
|
f,
|
|
96
95
|
n
|
|
97
96
|
), {
|
|
98
|
-
currentSorter:
|
|
99
|
-
activeSorters:
|
|
100
|
-
getNextActiveSorters:
|
|
101
|
-
updateStateSorters:
|
|
102
|
-
} =
|
|
103
|
-
function
|
|
104
|
-
const
|
|
105
|
-
let
|
|
106
|
-
return f.forEach((
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
const s =
|
|
110
|
-
field:
|
|
97
|
+
currentSorter: W,
|
|
98
|
+
activeSorters: d,
|
|
99
|
+
getNextActiveSorters: vt,
|
|
100
|
+
updateStateSorters: Dt
|
|
101
|
+
} = wo(f, xt), { ComponentTable: q, ComponentBodyWrapper: Bt, ComponentHeaderWrapper: Lt } = Co(ut), be = ne(() => typeof Y == "function" ? (e) => Y(C(e)) : (e) => e[Y], [Y]);
|
|
102
|
+
function zt() {
|
|
103
|
+
const e = {};
|
|
104
|
+
let t = [];
|
|
105
|
+
return f.forEach((o) => {
|
|
106
|
+
const r = o.dataIndex || o.key;
|
|
107
|
+
if (o.defaultFilters && (e[r] = o.defaultFilters), o.filteredValue && (e[r] = o.filteredValue), "defaultSortOrder" in o || "sortOrder" in o) {
|
|
108
|
+
const s = rt(o.sorter), c = "sortOrder" in o ? o.sortOrder : o.defaultSortOrder, l = {
|
|
109
|
+
field: r,
|
|
111
110
|
direction: c,
|
|
112
|
-
sorterFn:
|
|
111
|
+
sorterFn: nt(o.sorter),
|
|
113
112
|
priority: s
|
|
114
113
|
};
|
|
115
|
-
c ?
|
|
116
|
-
(
|
|
117
|
-
) &&
|
|
114
|
+
c ? Je(s) ? t.every(
|
|
115
|
+
(y) => Je(y.priority) || !y.direction
|
|
116
|
+
) && t.push(l) : t.every((y) => !y.direction) ? t.push(l) : t = [l] : t.push(l);
|
|
118
117
|
}
|
|
119
|
-
}), { currentFilters:
|
|
118
|
+
}), { currentFilters: e, defaultSorters: t };
|
|
120
119
|
}
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
(
|
|
124
|
-
),
|
|
125
|
-
return
|
|
126
|
-
const s =
|
|
127
|
-
s !== void 0 && (
|
|
128
|
-
}),
|
|
129
|
-
}, [f]),
|
|
130
|
-
function
|
|
131
|
-
const
|
|
132
|
-
if (!
|
|
120
|
+
const U = ne(() => {
|
|
121
|
+
const e = f.filter(
|
|
122
|
+
(o) => "filteredValue" in o
|
|
123
|
+
), t = {};
|
|
124
|
+
return e.length && e.forEach((o, r) => {
|
|
125
|
+
const s = o.key || o.dataIndex || r;
|
|
126
|
+
s !== void 0 && (t[s] = o.filteredValue);
|
|
127
|
+
}), t;
|
|
128
|
+
}, [f]), $ = ne(() => Object.keys(U).length ? U : He, [He, U]);
|
|
129
|
+
function Rt(e, t) {
|
|
130
|
+
const o = Ve(t);
|
|
131
|
+
if (!o)
|
|
133
132
|
return;
|
|
134
|
-
const
|
|
135
|
-
direction:
|
|
136
|
-
field:
|
|
137
|
-
sorterFn:
|
|
138
|
-
priority:
|
|
139
|
-
}, s =
|
|
140
|
-
|
|
141
|
-
const c =
|
|
142
|
-
|
|
133
|
+
const r = {
|
|
134
|
+
direction: e,
|
|
135
|
+
field: t,
|
|
136
|
+
sorterFn: nt(o.sorter),
|
|
137
|
+
priority: rt(o.sorter)
|
|
138
|
+
}, s = vt(r);
|
|
139
|
+
Dt(r, s);
|
|
140
|
+
const c = Q(
|
|
141
|
+
r,
|
|
143
142
|
s,
|
|
144
|
-
|
|
145
|
-
), l =
|
|
146
|
-
|
|
147
|
-
currentData:
|
|
148
|
-
currentAllData:
|
|
143
|
+
$
|
|
144
|
+
), l = I(c);
|
|
145
|
+
M?.(L(c), r, $, {
|
|
146
|
+
currentData: C(l),
|
|
147
|
+
currentAllData: C(c),
|
|
149
148
|
action: "sort"
|
|
150
149
|
});
|
|
151
150
|
}
|
|
152
|
-
function
|
|
153
|
-
const
|
|
151
|
+
function Ht(e) {
|
|
152
|
+
const t = function(r, s) {
|
|
154
153
|
return (c, l) => {
|
|
155
|
-
const
|
|
156
|
-
return s === "descend" ? -
|
|
154
|
+
const y = r(c, l);
|
|
155
|
+
return s === "descend" ? -y : y;
|
|
157
156
|
};
|
|
158
|
-
},
|
|
159
|
-
return
|
|
160
|
-
for (let c = 0, l =
|
|
161
|
-
const { sorterFn:
|
|
162
|
-
if (typeof
|
|
157
|
+
}, o = [...e];
|
|
158
|
+
return o.sort((r, s) => s.priority - r.priority), (r, s) => {
|
|
159
|
+
for (let c = 0, l = o.length; c < l; c++) {
|
|
160
|
+
const { sorterFn: y, direction: $e } = o[c];
|
|
161
|
+
if (typeof y != "function")
|
|
163
162
|
continue;
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
166
|
-
return
|
|
163
|
+
const re = t(y, $e)(r, s);
|
|
164
|
+
if (re !== 0)
|
|
165
|
+
return re;
|
|
167
166
|
}
|
|
168
167
|
return 0;
|
|
169
168
|
};
|
|
170
169
|
}
|
|
171
|
-
function
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
[
|
|
175
|
-
},
|
|
176
|
-
...
|
|
177
|
-
...
|
|
170
|
+
function kt(e, t) {
|
|
171
|
+
const o = {
|
|
172
|
+
...$,
|
|
173
|
+
[e.dataIndex]: t
|
|
174
|
+
}, r = {
|
|
175
|
+
...o,
|
|
176
|
+
...U
|
|
178
177
|
};
|
|
179
|
-
if (
|
|
180
|
-
|
|
181
|
-
const s =
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
), c =
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
178
|
+
if (A(t) && t.length) {
|
|
179
|
+
ke(r);
|
|
180
|
+
const s = Q(
|
|
181
|
+
W,
|
|
182
|
+
d,
|
|
183
|
+
o
|
|
184
|
+
), c = I(s);
|
|
185
|
+
M?.(
|
|
186
|
+
L(s),
|
|
187
|
+
d.length === 1 ? d[0] : d,
|
|
188
|
+
o,
|
|
190
189
|
{
|
|
191
|
-
currentData:
|
|
192
|
-
currentAllData:
|
|
190
|
+
currentData: C(c),
|
|
191
|
+
currentAllData: C(s),
|
|
193
192
|
action: "filter"
|
|
194
193
|
}
|
|
195
194
|
);
|
|
196
|
-
} else
|
|
195
|
+
} else A(t) && !t.length && Oe(e);
|
|
197
196
|
}
|
|
198
|
-
function
|
|
199
|
-
const
|
|
200
|
-
|
|
197
|
+
function Oe({ dataIndex: e }) {
|
|
198
|
+
const t = {
|
|
199
|
+
...$
|
|
201
200
|
};
|
|
202
|
-
delete e
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
),
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
201
|
+
delete t[e], ke(t);
|
|
202
|
+
const o = Q(
|
|
203
|
+
W,
|
|
204
|
+
d,
|
|
205
|
+
t
|
|
206
|
+
), r = I(o);
|
|
207
|
+
M?.(
|
|
208
|
+
L(o),
|
|
209
|
+
d.length === 1 ? d[0] : d,
|
|
210
|
+
t,
|
|
212
211
|
{
|
|
213
|
-
currentData:
|
|
214
|
-
currentAllData:
|
|
212
|
+
currentData: C(r),
|
|
213
|
+
currentAllData: C(o),
|
|
215
214
|
action: "filter"
|
|
216
215
|
}
|
|
217
216
|
);
|
|
218
217
|
}
|
|
219
|
-
const
|
|
220
|
-
function
|
|
221
|
-
let
|
|
222
|
-
Object.keys(
|
|
223
|
-
if (
|
|
224
|
-
const l =
|
|
225
|
-
l && typeof l.onFilter == "function" && (
|
|
226
|
-
(
|
|
218
|
+
const G = !!f.find((e) => e.fixed === "left"), X = !!f.find((e) => e.fixed === "right"), J = G || X;
|
|
219
|
+
function Q(e, t, o) {
|
|
220
|
+
let r = (ze || []).slice();
|
|
221
|
+
Object.keys(o).forEach((c) => {
|
|
222
|
+
if (o[c] && o[c].length) {
|
|
223
|
+
const l = Ve(c);
|
|
224
|
+
l && typeof l.onFilter == "function" && (r = r.filter((y) => o[c].reduce(
|
|
225
|
+
($e, re) => $e || l.onFilter(re, y),
|
|
227
226
|
!1
|
|
228
227
|
)));
|
|
229
228
|
}
|
|
230
229
|
});
|
|
231
|
-
const s = (c) => c.slice().sort(
|
|
230
|
+
const s = (c) => c.slice().sort(Ht(t)).map((l) => A(l[H]) ? {
|
|
232
231
|
...l,
|
|
233
|
-
[
|
|
232
|
+
[H]: s(l[H])
|
|
234
233
|
} : l);
|
|
235
|
-
return
|
|
234
|
+
return e.direction && typeof e.sorterFn == "function" || t.length ? s(r) : r;
|
|
236
235
|
}
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
const B = Q(
|
|
237
|
+
W,
|
|
238
|
+
d,
|
|
239
|
+
$
|
|
241
240
|
);
|
|
242
|
-
function
|
|
243
|
-
const
|
|
244
|
-
let
|
|
245
|
-
|
|
246
|
-
const s =
|
|
247
|
-
c !==
|
|
241
|
+
function L(e = B) {
|
|
242
|
+
const t = N.pageSize || St || 10, o = ue === "middle" ? "default" : ue;
|
|
243
|
+
let r = "top";
|
|
244
|
+
x === "tl" || x === "bl" ? r = "bottom" : r = "top";
|
|
245
|
+
const s = A(e) ? e.length : 0, c = Math.ceil(s / t) < O ? 1 : O;
|
|
246
|
+
c !== O && ye(c);
|
|
248
247
|
let l = {
|
|
249
|
-
size:
|
|
248
|
+
size: o,
|
|
250
249
|
total: s,
|
|
251
|
-
pageSize:
|
|
250
|
+
pageSize: t,
|
|
252
251
|
current: c,
|
|
253
252
|
selectProps: {
|
|
254
253
|
triggerProps: {
|
|
255
|
-
position:
|
|
254
|
+
position: r
|
|
256
255
|
}
|
|
257
256
|
}
|
|
258
257
|
};
|
|
259
|
-
return typeof
|
|
258
|
+
return typeof P == "object" && P.selectProps && (l.selectProps = {
|
|
260
259
|
...l.selectProps,
|
|
261
|
-
...
|
|
262
|
-
}),
|
|
260
|
+
...P.selectProps
|
|
261
|
+
}), p(P) && (l = {
|
|
263
262
|
...l,
|
|
264
|
-
...
|
|
265
|
-
}),
|
|
263
|
+
...P
|
|
264
|
+
}), p(N) && (l = {
|
|
266
265
|
...l,
|
|
267
|
-
...
|
|
268
|
-
}), l.onChange =
|
|
266
|
+
...N
|
|
267
|
+
}), l.onChange = Kt, l;
|
|
269
268
|
}
|
|
270
|
-
const
|
|
271
|
-
function
|
|
272
|
-
const { current:
|
|
273
|
-
return
|
|
269
|
+
const Z = L(), z = I();
|
|
270
|
+
function I(e = B, t = Z) {
|
|
271
|
+
const { current: o = 0, pageSize: r = 10 } = t;
|
|
272
|
+
return P === !1 || p(P) && m.length <= r ? e : e.slice((o - 1) * r, o * r);
|
|
274
273
|
}
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
|
|
280
|
-
const
|
|
281
|
-
return
|
|
282
|
-
|
|
274
|
+
const We = io(Ie, 100), S = !!(i && i.y), _ = de?.(C(B)), Ce = de && co.isValidElement(_) && _.props.fixed, Et = S && Ce;
|
|
275
|
+
mo(() => {
|
|
276
|
+
Ie(), se(window, "resize", We);
|
|
277
|
+
const e = D.current, t = u.current, o = g.current;
|
|
278
|
+
t && se(t, "scroll", R);
|
|
279
|
+
const r = e && e.parentNode;
|
|
280
|
+
return e && r && se(r, "scroll", R), o && se(o, "scroll", R), () => {
|
|
281
|
+
ie(window, "resize", We), t && ie(t, "scroll", R), r && ie(r, "scroll", R), o && ie(o, "scroll", R);
|
|
283
282
|
};
|
|
284
283
|
}, [
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
i
|
|
288
|
-
i
|
|
284
|
+
G,
|
|
285
|
+
X,
|
|
286
|
+
i?.x,
|
|
287
|
+
i?.y,
|
|
289
288
|
f.length,
|
|
290
|
-
|
|
291
|
-
]),
|
|
292
|
-
const { total:
|
|
293
|
-
Math.ceil(
|
|
294
|
-
}, [
|
|
295
|
-
|
|
296
|
-
}, [
|
|
297
|
-
getRootDomElement:
|
|
298
|
-
scrollIntoView: (
|
|
299
|
-
|
|
289
|
+
m
|
|
290
|
+
]), et(() => {
|
|
291
|
+
const { total: e, pageSize: t } = L(m);
|
|
292
|
+
Math.ceil(e / t) < O && ye(1);
|
|
293
|
+
}, [m?.length]), et(() => {
|
|
294
|
+
ee();
|
|
295
|
+
}, [m, G, X, F]), uo(st, () => ({
|
|
296
|
+
getRootDomElement: xe,
|
|
297
|
+
scrollIntoView: (e) => {
|
|
298
|
+
me.current && me.current.scrollTo({ key: e });
|
|
300
299
|
},
|
|
301
|
-
getRootDOMNode:
|
|
300
|
+
getRootDOMNode: xe
|
|
302
301
|
}));
|
|
303
|
-
function
|
|
304
|
-
return
|
|
302
|
+
function xe() {
|
|
303
|
+
return E.current;
|
|
305
304
|
}
|
|
306
|
-
function
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
Ne(s);
|
|
305
|
+
function Ie() {
|
|
306
|
+
ee();
|
|
307
|
+
const e = xe();
|
|
308
|
+
if (e && (J || i && i.x)) {
|
|
309
|
+
const o = (e.querySelector(`.${n}-body`) || e.querySelector(`.${n}-content-inner`))?.getBoundingClientRect?.()?.width;
|
|
310
|
+
Tt(o);
|
|
313
311
|
}
|
|
314
312
|
}
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
if (
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
313
|
+
const Ot = po(
|
|
314
|
+
lo(() => {
|
|
315
|
+
const e = E.current, t = S ? u.current : K.current && K.current.parentNode;
|
|
316
|
+
if (t) {
|
|
317
|
+
const o = F ? -t.scrollLeft : t.scrollLeft, r = o === 0, s = o + 1 >= t.children[0].getBoundingClientRect().width - t.getBoundingClientRect().width;
|
|
318
|
+
r && s ? te(
|
|
319
|
+
e.classList,
|
|
322
320
|
`${n}-scroll-position-both`
|
|
323
|
-
) :
|
|
324
|
-
|
|
325
|
-
`${n}-scroll-position-${
|
|
326
|
-
) : s ?
|
|
327
|
-
|
|
328
|
-
`${n}-scroll-position-${
|
|
329
|
-
) :
|
|
330
|
-
|
|
321
|
+
) : r ? te(
|
|
322
|
+
e.classList,
|
|
323
|
+
`${n}-scroll-position-${F ? "right" : "left"}`
|
|
324
|
+
) : s ? te(
|
|
325
|
+
e.classList,
|
|
326
|
+
`${n}-scroll-position-${F ? "left" : "right"}`
|
|
327
|
+
) : te(
|
|
328
|
+
e.classList,
|
|
331
329
|
`${n}-scroll-position-middle`
|
|
332
330
|
);
|
|
333
331
|
} else
|
|
334
|
-
|
|
332
|
+
e && Ae(e.classList);
|
|
335
333
|
}, 100),
|
|
336
|
-
[
|
|
334
|
+
[E.current, u.current, S, F]
|
|
337
335
|
);
|
|
338
|
-
function
|
|
339
|
-
if (
|
|
340
|
-
const
|
|
341
|
-
|
|
342
|
-
|
|
336
|
+
function ee() {
|
|
337
|
+
if (J || i && p(i) && i.x) {
|
|
338
|
+
const e = E.current;
|
|
339
|
+
e && (G && _e(
|
|
340
|
+
e.classList,
|
|
343
341
|
`${n}-has-fixed-col-left`
|
|
344
|
-
),
|
|
345
|
-
|
|
342
|
+
), X && _e(
|
|
343
|
+
e.classList,
|
|
346
344
|
`${n}-has-fixed-col-right`
|
|
347
|
-
)),
|
|
345
|
+
)), Ot();
|
|
348
346
|
}
|
|
349
347
|
}
|
|
350
|
-
function
|
|
351
|
-
|
|
348
|
+
function _e(e, t) {
|
|
349
|
+
e.contains(t) || e.add(t);
|
|
352
350
|
}
|
|
353
|
-
function
|
|
354
|
-
|
|
351
|
+
function Ae(e) {
|
|
352
|
+
e.remove(`${n}-scroll-position-both`), e.remove(`${n}-scroll-position-left`), e.remove(`${n}-scroll-position-right`), e.remove(`${n}-scroll-position-middle`);
|
|
355
353
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
354
|
+
function te(e, t) {
|
|
355
|
+
e.contains(t) || (Ae(e), e.add(t));
|
|
358
356
|
}
|
|
359
357
|
const {
|
|
360
|
-
selectedRowKeys:
|
|
361
|
-
indeterminateKeys:
|
|
362
|
-
onCheckAll:
|
|
363
|
-
onCheck:
|
|
364
|
-
onCheckRadio:
|
|
365
|
-
setSelectedRowKeys:
|
|
366
|
-
allSelectedRowKeys:
|
|
367
|
-
flattenData:
|
|
368
|
-
} =
|
|
369
|
-
function
|
|
370
|
-
return f.find((
|
|
358
|
+
selectedRowKeys: Se,
|
|
359
|
+
indeterminateKeys: Wt,
|
|
360
|
+
onCheckAll: It,
|
|
361
|
+
onCheck: _t,
|
|
362
|
+
onCheckRadio: At,
|
|
363
|
+
setSelectedRowKeys: Vt,
|
|
364
|
+
allSelectedRowKeys: Mt,
|
|
365
|
+
flattenData: Yt
|
|
366
|
+
} = So(b, z, ze, be);
|
|
367
|
+
function Ve(e) {
|
|
368
|
+
return f.find((t, o) => typeof t.key < "u" ? typeof t.key == "number" && typeof e == "string" ? t.key.toString() === e : t.key === e : typeof t.dataIndex < "u" ? t.dataIndex === e : typeof e == "number" ? o === e : !1);
|
|
371
369
|
}
|
|
372
|
-
function
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
B,
|
|
370
|
+
function Kt(e, t) {
|
|
371
|
+
ye(e), wt(t), e !== O && jt(), k && !k.checkCrossPage && Se.length && (Vt([]), k.onChange?.([], []));
|
|
372
|
+
const o = { ...L(), current: e, pageSize: t };
|
|
373
|
+
M?.(
|
|
374
|
+
o,
|
|
375
|
+
d.length === 1 ? d[0] : d,
|
|
376
|
+
$,
|
|
380
377
|
{
|
|
381
|
-
currentData:
|
|
382
|
-
|
|
378
|
+
currentData: C(
|
|
379
|
+
I(B, o)
|
|
383
380
|
),
|
|
384
|
-
currentAllData:
|
|
381
|
+
currentAllData: C(B),
|
|
385
382
|
action: "paginate"
|
|
386
383
|
}
|
|
387
|
-
),
|
|
384
|
+
), N.onChange?.(e, t);
|
|
388
385
|
}
|
|
389
|
-
function
|
|
390
|
-
if (!
|
|
386
|
+
function jt() {
|
|
387
|
+
if (!u.current)
|
|
391
388
|
return;
|
|
392
|
-
const
|
|
393
|
-
new
|
|
394
|
-
from: { scrollTop:
|
|
389
|
+
const t = u.current.scrollTop;
|
|
390
|
+
new no({
|
|
391
|
+
from: { scrollTop: t },
|
|
395
392
|
to: { scrollTop: 0 },
|
|
396
|
-
easing:
|
|
393
|
+
easing: so,
|
|
397
394
|
duration: 300,
|
|
398
|
-
onUpdate: (
|
|
399
|
-
|
|
395
|
+
onUpdate: (r) => {
|
|
396
|
+
u.current && (u.current.scrollTop = r.scrollTop);
|
|
400
397
|
}
|
|
401
398
|
}).start();
|
|
402
399
|
}
|
|
403
|
-
function
|
|
404
|
-
const { target:
|
|
405
|
-
|
|
400
|
+
function R(e) {
|
|
401
|
+
const { target: t } = e, o = u.current, r = D.current && D.current.parentNode, s = g.current;
|
|
402
|
+
t.scrollLeft !== j.current && (r && (r.scrollLeft = t.scrollLeft), o && (o.scrollLeft = t.scrollLeft), s && (s.scrollLeft = t.scrollLeft), ee()), j.current = e.target.scrollLeft;
|
|
406
403
|
}
|
|
407
|
-
function
|
|
408
|
-
const { target:
|
|
409
|
-
|
|
404
|
+
function qt(e) {
|
|
405
|
+
const { target: t } = e, o = K.current;
|
|
406
|
+
t.scrollLeft !== j.current && (o.scrollLeft = t.scrollLeft, ee()), j.current = e.target.scrollLeft;
|
|
410
407
|
}
|
|
411
|
-
const [
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
408
|
+
const [Me, Ut] = xo(
|
|
409
|
+
b,
|
|
410
|
+
Yt,
|
|
411
|
+
be
|
|
415
412
|
);
|
|
416
|
-
let
|
|
417
|
-
i && (i.x && (typeof i.x == "number" || typeof i.x == "string") && (
|
|
413
|
+
let Ye = {}, we = {};
|
|
414
|
+
i && (i.x && (typeof i.x == "number" || typeof i.x == "string") && (we = {
|
|
418
415
|
width: i.x
|
|
419
|
-
}), i.y && (typeof i.y == "number" || typeof i.y == "string") && (
|
|
416
|
+
}), i.y && (typeof i.y == "number" || typeof i.y == "string") && (Ye = {
|
|
420
417
|
maxHeight: i.y
|
|
421
418
|
}));
|
|
422
|
-
function
|
|
423
|
-
requestAnimationFrame((
|
|
424
|
-
const
|
|
425
|
-
|
|
426
|
-
const
|
|
427
|
-
|
|
419
|
+
function Gt() {
|
|
420
|
+
requestAnimationFrame((e) => {
|
|
421
|
+
const t = D.current && D.current.parentNode, o = Do(t);
|
|
422
|
+
o && o > 0 && (t.style.marginBottom = `-${o}px`, t.style.paddingBottom = "0px", g.current && (g.current.style.marginBottom = `-${o}px`, g.current.style.paddingBottom = "0px")), setTimeout(() => {
|
|
423
|
+
const r = u.current;
|
|
424
|
+
Bo(r) ? (ge.current = !0, t && (t.style.overflowY = "scroll", t.style.scrollSnapType = "y mandatory"), g.current && (g.current.style.overflowY = "scroll", g.current.style.overflowY = "y mandatory")) : t && ge.current && (ge.current = !1, t.style.overflowY = "auto", t.style.overflowY = "y mandatory", g.current && (g.current.style.overflowY = "auto", g.current.style.overflowY = "y mandatory"));
|
|
428
425
|
}, 0);
|
|
429
426
|
});
|
|
430
427
|
}
|
|
431
|
-
const
|
|
432
|
-
|
|
428
|
+
const Ke = /* @__PURE__ */ a(
|
|
429
|
+
No,
|
|
433
430
|
{
|
|
434
|
-
...
|
|
435
|
-
activeSorters:
|
|
436
|
-
currentSorter:
|
|
437
|
-
selectedRowKeys:
|
|
438
|
-
currentFilters:
|
|
439
|
-
onCheckAll:
|
|
440
|
-
onSort:
|
|
441
|
-
data:
|
|
442
|
-
onHandleFilter:
|
|
443
|
-
onHandleFilterReset:
|
|
431
|
+
...b,
|
|
432
|
+
activeSorters: d,
|
|
433
|
+
currentSorter: W,
|
|
434
|
+
selectedRowKeys: Se,
|
|
435
|
+
currentFilters: $,
|
|
436
|
+
onCheckAll: It,
|
|
437
|
+
onSort: Rt,
|
|
438
|
+
data: z,
|
|
439
|
+
onHandleFilter: kt,
|
|
440
|
+
onHandleFilterReset: Oe,
|
|
444
441
|
prefixCls: n,
|
|
445
|
-
allSelectedRowKeys:
|
|
446
|
-
groupColumns:
|
|
447
|
-
stickyOffsets:
|
|
448
|
-
groupStickyClassNames:
|
|
442
|
+
allSelectedRowKeys: Mt,
|
|
443
|
+
groupColumns: Re,
|
|
444
|
+
stickyOffsets: he,
|
|
445
|
+
groupStickyClassNames: Nt
|
|
449
446
|
}
|
|
450
447
|
);
|
|
451
|
-
function
|
|
452
|
-
const
|
|
453
|
-
return
|
|
454
|
-
|
|
448
|
+
function Xt() {
|
|
449
|
+
const e = p(i) && i.x === "max-content";
|
|
450
|
+
return S || v ? /* @__PURE__ */ a(Lt, { className: `${n}-header`, children: /* @__PURE__ */ T(
|
|
451
|
+
q,
|
|
455
452
|
{
|
|
456
|
-
ref:
|
|
457
|
-
style:
|
|
453
|
+
ref: D,
|
|
454
|
+
style: e ? {} : we,
|
|
458
455
|
children: [
|
|
459
456
|
/* @__PURE__ */ a(
|
|
460
|
-
|
|
457
|
+
le,
|
|
461
458
|
{
|
|
462
459
|
columns: f,
|
|
463
460
|
prefixCls: n,
|
|
464
461
|
producer: !1,
|
|
465
|
-
columnWidths:
|
|
462
|
+
columnWidths: e && i.y ? $t : null
|
|
466
463
|
}
|
|
467
464
|
),
|
|
468
|
-
|
|
465
|
+
Ke
|
|
469
466
|
]
|
|
470
467
|
}
|
|
471
|
-
) }) :
|
|
468
|
+
) }) : Ke;
|
|
472
469
|
}
|
|
473
|
-
const
|
|
474
|
-
|
|
470
|
+
const je = _ && /* @__PURE__ */ a(
|
|
471
|
+
Fo,
|
|
475
472
|
{
|
|
476
473
|
prefixCls: n,
|
|
477
|
-
summary:
|
|
478
|
-
data:
|
|
474
|
+
summary: de,
|
|
475
|
+
data: z,
|
|
479
476
|
columns: f,
|
|
480
|
-
stickyOffsets:
|
|
481
|
-
stickyClassNames:
|
|
477
|
+
stickyOffsets: he,
|
|
478
|
+
stickyClassNames: Ee
|
|
482
479
|
}
|
|
483
|
-
),
|
|
484
|
-
|
|
480
|
+
), qe = /* @__PURE__ */ a(
|
|
481
|
+
$o,
|
|
485
482
|
{
|
|
486
|
-
...
|
|
487
|
-
saveRef: (
|
|
488
|
-
selectedRowKeys:
|
|
489
|
-
indeterminateKeys:
|
|
490
|
-
expandedRowKeys:
|
|
491
|
-
onCheck:
|
|
492
|
-
onCheckRadio:
|
|
493
|
-
onClickExpandBtn:
|
|
483
|
+
...b,
|
|
484
|
+
saveRef: (e) => pe.current = e,
|
|
485
|
+
selectedRowKeys: Se,
|
|
486
|
+
indeterminateKeys: Wt,
|
|
487
|
+
expandedRowKeys: Me,
|
|
488
|
+
onCheck: _t,
|
|
489
|
+
onCheckRadio: At,
|
|
490
|
+
onClickExpandBtn: Ut,
|
|
494
491
|
columns: f,
|
|
495
|
-
data:
|
|
492
|
+
data: z,
|
|
496
493
|
prefixCls: n,
|
|
497
|
-
hasFixedColumn:
|
|
498
|
-
tableViewWidth:
|
|
499
|
-
indentSize:
|
|
500
|
-
noDataElement:
|
|
501
|
-
activeSorters:
|
|
502
|
-
currentSorter:
|
|
503
|
-
stickyOffsets:
|
|
504
|
-
stickyClassNames:
|
|
505
|
-
getRowKey:
|
|
506
|
-
saveVirtualListRef: (
|
|
507
|
-
|
|
494
|
+
hasFixedColumn: J,
|
|
495
|
+
tableViewWidth: Pt,
|
|
496
|
+
indentSize: ht,
|
|
497
|
+
noDataElement: pt || at("Table"),
|
|
498
|
+
activeSorters: d,
|
|
499
|
+
currentSorter: W,
|
|
500
|
+
stickyOffsets: he,
|
|
501
|
+
stickyClassNames: Ee,
|
|
502
|
+
getRowKey: be,
|
|
503
|
+
saveVirtualListRef: (e) => {
|
|
504
|
+
v && (me.current = e, u.current = e?.dom);
|
|
508
505
|
},
|
|
509
|
-
___dangerouslySetInnerHTML___:
|
|
506
|
+
___dangerouslySetInnerHTML___: b.___dangerouslySetInnerHTML___
|
|
510
507
|
}
|
|
511
|
-
),
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
] }) :
|
|
515
|
-
if (
|
|
516
|
-
const
|
|
508
|
+
), Ue = !v && !Et ? /* @__PURE__ */ T(Fe, { children: [
|
|
509
|
+
qe,
|
|
510
|
+
je
|
|
511
|
+
] }) : qe;
|
|
512
|
+
if (Qe(() => {
|
|
513
|
+
const e = u.current || pe.current, t = ho([e], Gt);
|
|
517
514
|
return () => {
|
|
518
|
-
|
|
515
|
+
t();
|
|
519
516
|
};
|
|
520
|
-
}, [
|
|
521
|
-
}), [
|
|
522
|
-
function
|
|
523
|
-
const
|
|
524
|
-
return
|
|
525
|
-
|
|
517
|
+
}, [u.current, pe.current]), Qe(() => (console.table(m), () => {
|
|
518
|
+
}), [m]), !ve.length) return null;
|
|
519
|
+
function Jt() {
|
|
520
|
+
const e = p(i) && i.x === "max-content" && !!i.y && A(m) && m.length > 0;
|
|
521
|
+
return S && !v ? /* @__PURE__ */ a(
|
|
522
|
+
Bt,
|
|
526
523
|
{
|
|
527
|
-
ref:
|
|
524
|
+
ref: u,
|
|
528
525
|
className: `${n}-body`,
|
|
529
|
-
style:
|
|
530
|
-
children: /* @__PURE__ */
|
|
526
|
+
style: Ye,
|
|
527
|
+
children: /* @__PURE__ */ T(q, { style: we, children: [
|
|
531
528
|
/* @__PURE__ */ a(
|
|
532
|
-
|
|
529
|
+
le,
|
|
533
530
|
{
|
|
534
531
|
columns: f,
|
|
535
532
|
prefixCls: n,
|
|
536
|
-
producer:
|
|
537
|
-
onSetColumnWidths:
|
|
538
|
-
expandedRowKeys:
|
|
539
|
-
data:
|
|
533
|
+
producer: e,
|
|
534
|
+
onSetColumnWidths: Ft,
|
|
535
|
+
expandedRowKeys: Me,
|
|
536
|
+
data: m
|
|
540
537
|
}
|
|
541
538
|
),
|
|
542
|
-
|
|
539
|
+
Ue
|
|
543
540
|
] })
|
|
544
541
|
}
|
|
545
|
-
) :
|
|
542
|
+
) : Ue;
|
|
546
543
|
}
|
|
547
|
-
function
|
|
548
|
-
let
|
|
549
|
-
i &&
|
|
544
|
+
function Qt() {
|
|
545
|
+
let e = {};
|
|
546
|
+
i && p(i) && i.x && (e = {
|
|
550
547
|
width: i.x
|
|
551
548
|
});
|
|
552
|
-
const
|
|
553
|
-
/* @__PURE__ */ a(
|
|
554
|
-
|
|
555
|
-
] }) }),
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
549
|
+
const t = /* @__PURE__ */ a("div", { className: `${n}-tfoot`, ref: g, children: /* @__PURE__ */ T(q, { style: e, children: [
|
|
550
|
+
/* @__PURE__ */ a(le, { columns: f, prefixCls: n }),
|
|
551
|
+
je
|
|
552
|
+
] }) }), o = _ && S && Ce === "top", r = _ && S && Ce === "bottom", s = /* @__PURE__ */ T(Fe, { children: [
|
|
553
|
+
mt ? Xt() : null,
|
|
554
|
+
o && t,
|
|
555
|
+
Jt(),
|
|
556
|
+
r && t
|
|
560
557
|
] });
|
|
561
|
-
return /* @__PURE__ */
|
|
562
|
-
typeof
|
|
558
|
+
return /* @__PURE__ */ T(Fe, { children: [
|
|
559
|
+
typeof De == "function" && /* @__PURE__ */ a("div", { className: `${n}-header-`, children: De(z) }),
|
|
563
560
|
/* @__PURE__ */ a("div", { className: `${n}-container`, children: /* @__PURE__ */ a("div", { className: `${n}-content-scroll`, children: /* @__PURE__ */ a(
|
|
564
561
|
"div",
|
|
565
562
|
{
|
|
566
563
|
className: `${n}-content-inner`,
|
|
567
|
-
onScroll:
|
|
568
|
-
children:
|
|
569
|
-
/* @__PURE__ */ a(
|
|
564
|
+
onScroll: S ? void 0 : qt,
|
|
565
|
+
children: S || v ? s : /* @__PURE__ */ T(q, { ref: K, style: e, children: [
|
|
566
|
+
/* @__PURE__ */ a(le, { prefixCls: n, columns: f }),
|
|
570
567
|
s
|
|
571
568
|
] })
|
|
572
569
|
}
|
|
573
570
|
) }) }),
|
|
574
|
-
typeof
|
|
571
|
+
typeof Be == "function" && /* @__PURE__ */ a("div", { className: `${n}-footer`, children: Be(z) })
|
|
575
572
|
] });
|
|
576
573
|
}
|
|
577
|
-
const
|
|
574
|
+
const Zt = p(h) ? h.wrapper : h, Pe = p(h) ? h.cell : fe, eo = p(h) ? h.cell || h.headerCell : fe, to = p(h) ? h.cell || h.bodyCell : fe, oo = ot(
|
|
578
575
|
n,
|
|
579
|
-
`${n}-size-${
|
|
576
|
+
`${n}-size-${ue}`,
|
|
580
577
|
{
|
|
581
|
-
[`${n}-border`]:
|
|
582
|
-
[`${n}-border-cell`]:
|
|
583
|
-
[`${n}-border-header-cell`]:
|
|
584
|
-
[`${n}-border-body-cell`]:
|
|
585
|
-
[`${n}-stripe`]:
|
|
586
|
-
[`${n}-hover`]:
|
|
587
|
-
[`${n}-type-radio`]:
|
|
588
|
-
[`${n}-layout-fixed`]:
|
|
589
|
-
[`${n}-fixed-column`]:
|
|
590
|
-
[`${n}-virtualized`]:
|
|
591
|
-
[`${n}-rtl`]:
|
|
578
|
+
[`${n}-border`]: Zt,
|
|
579
|
+
[`${n}-border-cell`]: Pe,
|
|
580
|
+
[`${n}-border-header-cell`]: !Pe && eo,
|
|
581
|
+
[`${n}-border-body-cell`]: !Pe && to,
|
|
582
|
+
[`${n}-stripe`]: gt,
|
|
583
|
+
[`${n}-hover`]: yt,
|
|
584
|
+
[`${n}-type-radio`]: k && k.type === "radio",
|
|
585
|
+
[`${n}-layout-fixed`]: bt || i && (i.x || i.y) || ve.find((e) => e.ellipsis),
|
|
586
|
+
[`${n}-fixed-column`]: J,
|
|
587
|
+
[`${n}-virtualized`]: v,
|
|
588
|
+
[`${n}-rtl`]: F
|
|
592
589
|
},
|
|
593
|
-
|
|
594
|
-
),
|
|
595
|
-
[`${n}-pagination-left`]:
|
|
596
|
-
[`${n}-pagination-center`]:
|
|
597
|
-
[`${n}-pagination-top`]:
|
|
590
|
+
dt
|
|
591
|
+
), Te = x === "tl" || x === "tr" || x === "topCenter", ro = ot(`${n}-pagination`, {
|
|
592
|
+
[`${n}-pagination-left`]: x === "tl" || x === "bl",
|
|
593
|
+
[`${n}-pagination-center`]: x === "topCenter" || x === "bottomCenter",
|
|
594
|
+
[`${n}-pagination-top`]: Te
|
|
598
595
|
});
|
|
599
|
-
let
|
|
600
|
-
typeof
|
|
601
|
-
const
|
|
596
|
+
let oe = b.loading;
|
|
597
|
+
typeof oe == "boolean" && (oe = { loading: oe });
|
|
598
|
+
const Ge = typeof Le == "function" ? Le(/* @__PURE__ */ a(tt, { ...Z })) : /* @__PURE__ */ a("div", { className: ro, children: /* @__PURE__ */ a(tt, { ...Z }) }), Xe = P !== !1 && (B.length !== 0 || Z.total > 0);
|
|
602
599
|
return /* @__PURE__ */ a(
|
|
603
600
|
"div",
|
|
604
601
|
{
|
|
605
|
-
ref:
|
|
606
|
-
style:
|
|
607
|
-
className:
|
|
608
|
-
...
|
|
609
|
-
children: /* @__PURE__ */
|
|
610
|
-
|
|
602
|
+
ref: E,
|
|
603
|
+
style: ft,
|
|
604
|
+
className: oo,
|
|
605
|
+
...yo(b),
|
|
606
|
+
children: /* @__PURE__ */ T(
|
|
607
|
+
go,
|
|
611
608
|
{
|
|
612
609
|
className: `${n}-spin`,
|
|
613
|
-
element:
|
|
614
|
-
...
|
|
610
|
+
element: lt,
|
|
611
|
+
...oe,
|
|
615
612
|
children: [
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
613
|
+
Xe && Te && Ge,
|
|
614
|
+
Qt(),
|
|
615
|
+
Xe && !Te && Ge
|
|
619
616
|
]
|
|
620
617
|
}
|
|
621
618
|
)
|
|
622
619
|
}
|
|
623
620
|
);
|
|
624
621
|
}
|
|
625
|
-
const
|
|
626
|
-
|
|
622
|
+
const Eo = ao(ko);
|
|
623
|
+
Eo.displayName = "Table";
|
|
627
624
|
export {
|
|
628
|
-
|
|
625
|
+
Eo as default
|
|
629
626
|
};
|