@unicom-cloud/ui 0.8.44 → 0.8.46
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 +54 -51
- package/Alert.js +46 -43
- package/Anchor.js +5 -4
- package/AutoComplete.js +60 -55
- package/Avatar.js +10 -155
- package/BackTop.js +41 -38
- package/Badge.js +63 -93
- package/Breadcrumb.js +63 -118
- package/Button.js +105 -109
- package/Calendar.js +139 -536
- package/Card.js +65 -101
- package/Carousel.js +169 -270
- package/Cascader.js +9 -8
- package/Checkbox.js +4 -3
- package/Collapse.js +4 -3
- package/ColorPicker.js +95 -546
- package/Comment.js +14 -12
- package/ConfigProvider.js +6 -5
- package/Copy.js +33 -31
- package/DatePicker.js +35 -1993
- package/Descriptions.js +30 -28
- package/Divider.js +8 -6
- package/Draggable.js +28 -85
- package/Drawer.js +5 -4
- package/Dropdown.js +107 -167
- package/Empty.js +28 -8
- package/Form.js +30 -1418
- package/Grid.js +13 -250
- package/Icon.js +19 -45
- package/IconHover.js +39 -6
- package/Image.js +3 -3
- package/Input.js +4 -4
- package/InputNumber.js +213 -17
- package/InputTag.js +5 -4
- package/Layout.js +35 -48
- package/Link.js +16 -14
- package/List.js +191 -228
- package/Loading.js +18 -17
- package/Mentions.js +99 -115
- package/Menu.js +8 -7
- package/Message.js +147 -10
- package/Modal.js +5 -4
- package/Notice.js +196 -13
- package/Notification.js +136 -11
- package/NotificationBase.js +5 -4
- package/OverflowEllipsis.js +48 -71
- package/PageHeader.js +52 -52
- package/Pagination.js +12 -11
- package/Picker.js +6 -4
- package/Popconfirm.js +47 -44
- package/Popover.js +25 -23
- package/Portal.js +12 -32
- package/Progress.js +65 -328
- package/Radio.js +6 -5
- package/Rate.js +48 -45
- package/ResizeBox.js +127 -505
- package/Result.js +60 -1417
- package/Select.js +9 -8
- package/SelectView.js +49 -328
- package/Skeleton.js +41 -78
- package/Slider.js +228 -702
- package/Space.js +53 -57
- package/Spin.js +57 -72
- package/Statistic.js +84 -153
- package/Steps.js +64 -123
- package/SuspenseFallbackTest.js +4 -3
- package/Switch.js +41 -38
- package/Table.js +20 -1999
- package/Tabs.js +9 -8
- package/Tag.js +24 -21
- package/TimePicker.js +19 -272
- package/Timeline.js +4 -3
- package/Tooltip.js +79 -72
- package/Transfer.js +138 -402
- package/Tree.js +5 -4
- package/TreeSelect.js +8 -7
- package/Trigger.js +407 -571
- package/Typography.js +11 -722
- package/Upload.js +9 -8
- package/VerificationCode.js +6 -5
- package/Version.js +1 -1
- package/VirtualList.js +4 -3
- package/Watermark.js +3 -2
- package/anchor/Anchor.js +193 -0
- package/anchor/Link.js +54 -0
- package/anchor/context.js +14 -0
- package/anchor/util.js +41 -0
- package/avatar/Avatar.js +85 -0
- package/avatar/Group.js +84 -0
- package/avatar/context.js +5 -0
- package/badge/Count.js +35 -0
- package/breadcrumb/Item.js +67 -0
- package/button/Group.js +15 -0
- package/calendar/Month.js +142 -0
- package/calendar/WeekList.js +24 -0
- package/calendar/Year.js +75 -0
- package/calendar/header/Panel.js +57 -0
- package/calendar/header/index.js +118 -0
- package/calendar/hook/useCellClassName.js +41 -0
- package/card/Grid.js +27 -0
- package/card/Meta.js +32 -0
- package/carousel/Arrow.js +57 -0
- package/carousel/Indicator.js +68 -0
- package/cascader/Cascader.js +300 -0
- package/cascader/base/node.js +142 -0
- package/cascader/base/store.js +93 -0
- package/cascader/hook/useRefCurrent.js +12 -0
- package/cascader/panel/List.js +275 -0
- package/cascader/panel/Option.js +35 -0
- package/cascader/panel/Search.js +171 -0
- package/cascader/util.js +66 -0
- package/checkbox/Checkbox.js +111 -0
- package/checkbox/Group.js +97 -0
- package/checkbox/useCheckbox.js +45 -0
- package/collapse/Collapse.js +90 -0
- package/collapse/Item.js +165 -0
- package/color-picker/ControlBar.js +64 -0
- package/color-picker/InputAlpha.js +24 -0
- package/color-picker/InputHex.js +59 -0
- package/color-picker/InputRgb.js +66 -0
- package/color-picker/Palette.js +36 -0
- package/color-picker/Panel.js +165 -0
- package/color-picker/colors.js +37 -0
- package/color-picker/hooks/useColorPicker.js +63 -0
- package/color-picker/hooks/useControlBlock.js +40 -0
- package/config-provider/ConfigProvider.js +94 -0
- package/config-provider/context.js +24 -0
- package/date-picker/Picker.js +399 -0
- package/date-picker/PickerRange.js +568 -0
- package/date-picker/context.js +5 -0
- package/date-picker/hook/useCellClassName.js +58 -0
- package/date-picker/panel/Body.js +78 -0
- package/date-picker/panel/Footer.js +71 -0
- package/date-picker/panel/Header.js +74 -0
- package/date-picker/panel/Shortcut.js +45 -0
- package/date-picker/panel/WeekList.js +19 -0
- package/date-picker/panel/date/index.js +194 -0
- package/date-picker/panel/month/index.js +113 -0
- package/date-picker/panel/quarter/index.js +93 -0
- package/date-picker/panel/range/index.js +251 -0
- package/date-picker/panel/week/index.js +35 -0
- package/date-picker/panel/year/index.js +74 -0
- package/date-picker/util.js +69 -0
- package/draggable/Item.js +66 -0
- package/drawer/Drawer.js +226 -0
- package/dropdown/Button.js +91 -0
- package/form/Control.js +264 -0
- package/form/Form.js +156 -0
- package/form/FormItem.js +241 -0
- package/form/FormLabel.js +54 -0
- package/form/FormList.js +96 -0
- package/form/FormProvider.js +48 -0
- package/form/IconSymbol.js +20 -0
- package/form/context.js +43 -0
- package/form/hook/useContext.js +32 -0
- package/form/hook/useState.js +31 -0
- package/form/hook/useWatch.js +36 -0
- package/form/interface.js +11 -0
- package/form/promisify.js +23 -0
- package/form/store.js +354 -0
- package/form/useForm.js +53 -0
- package/form/util.js +72 -0
- package/grid/Col.js +87 -0
- package/grid/Row.js +88 -0
- package/grid/context.js +9 -0
- package/grid/grid-item.js +77 -0
- package/grid/grid.js +104 -0
- package/grid/hook/useResponsiveState.js +38 -0
- package/grid/util.js +51 -0
- package/{chunk/I4RV9SKZ.js → hooks/factory/createHTMLMediaHook.js} +35 -43
- package/hooks/index.js +246 -4
- package/{chunk/BdYAMaw9.js → hooks/misc/hookState.js} +1 -1
- package/hooks/misc/parseTimeRanges.js +12 -0
- package/{chunk/TXCrI0jN.js → hooks/misc/util.js} +6 -6
- package/hooks/use-watermark/utils.js +8 -0
- package/hooks/use-watermark.js +71 -76
- package/hooks/useAudio.js +3 -3
- package/hooks/useBeforeUnload.js +2 -2
- package/hooks/useClickAway.js +10 -10
- package/hooks/useCounter.js +1 -1
- package/hooks/useCreation.js +2 -4
- package/hooks/useDrop.js +12 -12
- package/hooks/useDropArea.js +5 -5
- package/hooks/useEvent.js +6 -6
- package/hooks/useEventListener.js +2 -4
- package/hooks/useFavicon.js +1 -2
- package/hooks/useFullscreen.js +11 -13
- package/hooks/useGetSet.js +5 -5
- package/hooks/useHash.js +6 -6
- package/hooks/useHover.js +6 -6
- package/hooks/useHoverDirty.js +7 -7
- package/hooks/useIdle.js +17 -17
- package/hooks/useIsomorphicLayoutEffect2.js +3 -3
- package/hooks/useKey.js +5 -5
- package/hooks/useList.js +1 -1
- package/hooks/useLocalStorage.js +2 -3
- package/hooks/useLocation.js +1 -1
- package/hooks/useLockBodyScroll.js +13 -14
- package/hooks/useLongPress.js +7 -7
- package/hooks/useMeasure.js +3 -3
- package/hooks/useMedia.js +4 -4
- package/hooks/useMediaDevices.js +10 -10
- package/hooks/useMotion.js +11 -11
- package/hooks/useMouse.js +9 -9
- package/hooks/useMouseWheel.js +7 -7
- package/hooks/useNetworkState.js +7 -7
- package/hooks/useOrientation.js +10 -11
- package/hooks/useOverrideRef.js +14 -0
- package/hooks/usePageLeave.js +4 -4
- package/hooks/usePermission.js +9 -9
- package/hooks/usePersistCallback.js +15 -0
- package/hooks/useScroll.js +6 -6
- package/hooks/useScrolling.js +7 -7
- package/hooks/useSearchParam.js +5 -5
- package/hooks/useSessionStorage.js +9 -9
- package/hooks/useSize.js +1 -1
- package/hooks/useSlider.js +6 -6
- package/hooks/useStartTyping.js +4 -4
- package/hooks/useStateList.js +4 -5
- package/hooks/useStateWithHistory.js +1 -1
- package/hooks/useTimeout.js +1 -2
- package/hooks/useVibrate.js +5 -5
- package/hooks/useVideo.js +3 -3
- package/hooks/useWindowScroll.js +13 -13
- package/hooks/useWindowSize.js +6 -6
- package/icon/addFromIconFontCn.js +33 -0
- package/image/Image.js +189 -0
- package/image/ImageFooter.js +45 -0
- package/image/ImagePreview.js +473 -0
- package/image/ImagePreviewArrow.js +40 -0
- package/image/ImagePreviewGroup.js +125 -0
- package/image/ImagePreviewToolbar.js +98 -0
- package/image/TriggerForToolbar.js +10 -0
- package/image/previewGroupContext.js +17 -0
- package/image/util/getFixTranslate.js +7 -0
- package/image/util/getScale.js +72 -0
- package/image/util/hook/useImageStatus.js +16 -0
- package/image/util/hook/useShowFooter.js +7 -0
- package/index.js +440 -398
- package/input/Group.js +20 -0
- package/input/Input.js +185 -0
- package/input/InputElement.js +233 -0
- package/input/Number.js +4 -0
- package/input/Password.js +72 -0
- package/input/Search.js +80 -0
- package/input/Tag.js +7 -0
- package/input/Textarea.js +168 -0
- package/input/autoSizeTextAreaHeight.js +65 -0
- package/input/useComposition.js +39 -0
- package/input-number/decimal.js +154 -0
- package/input-number/useSelectionRange.js +26 -0
- package/input-number/util.js +57 -0
- package/input-tag/InputTag.js +381 -0
- package/layout/Content.js +15 -0
- package/layout/Footer.js +15 -0
- package/layout/Header.js +15 -0
- package/{chunk/B9asjXwm.js → layout/Sider.js} +23 -22
- package/list/Item.js +46 -0
- package/list/Meta.js +21 -0
- package/loading/style/index.module.less.js +4 -0
- package/mentions/util.js +26 -0
- package/menu/Indent.js +17 -0
- package/menu/Item.js +125 -0
- package/menu/ItemGroup.js +39 -0
- package/menu/Menu.js +181 -0
- package/menu/OverflowWrap.js +85 -0
- package/menu/context.js +5 -0
- package/menu/sub-menu/Inline.js +111 -0
- package/menu/sub-menu/Pop.js +126 -0
- package/menu/sub-menu/index.js +17 -0
- package/menu/util.js +80 -0
- package/message/useMessage.js +53 -0
- package/modal/Confirm.js +98 -0
- package/modal/Modal.js +419 -0
- package/modal/config.js +25 -0
- package/modal/use-modal/Hook.js +55 -0
- package/modal/use-modal/index.js +68 -0
- package/notification/useNotification.js +55 -0
- package/overflow-ellipsis/OverflowItem.js +34 -0
- package/package.json +1 -1
- package/pagination/PageItem.js +121 -0
- package/pagination/PageJumper.js +64 -0
- package/pagination/PageOption.js +55 -0
- package/pagination/Pagination.js +245 -0
- package/picker/Input.js +124 -0
- package/picker/InputRange.js +155 -0
- package/portal/Portal.js +25 -0
- package/progress/CircleProgress.js +117 -0
- package/progress/LineProgess.js +103 -0
- package/progress/StepProgress.js +74 -0
- package/radio/Group.js +91 -0
- package/radio/Radio.js +90 -0
- package/resize-box/ResizeTrigger.js +78 -0
- package/resize-box/Split.js +132 -0
- package/resize-box/SplitGroup.js +204 -0
- package/result/403.js +695 -0
- package/result/404.js +513 -0
- package/result/500.js +166 -0
- package/select/OptGroup.js +20 -0
- package/select/Option.js +97 -0
- package/select/Select.js +544 -0
- package/select/util.js +140 -0
- package/select-view/Core.js +309 -0
- package/skeleton/Image.js +24 -0
- package/skeleton/Text.js +27 -0
- package/slider/Button.js +159 -0
- package/slider/Dot.js +43 -0
- package/slider/Input.js +75 -0
- package/slider/Mark.js +28 -0
- package/slider/Tick.js +44 -0
- package/slider/hook/useInterval.js +73 -0
- package/slider/hook/useLegalValue.js +70 -0
- package/slider/util.js +63 -0
- package/space/toArray.js +11 -0
- package/spin/DotLoading.js +26 -0
- package/statistic/Countdown.js +57 -0
- package/statistic/util.js +33 -0
- package/steps/Step.js +68 -0
- package/style.css +1 -1
- package/table/ColGroup.js +59 -0
- package/table/Table.js +634 -0
- package/table/constant.js +5 -0
- package/table/hook/useColumns.js +141 -0
- package/table/hook/useComponent.js +64 -0
- package/table/hook/useExpand.js +36 -0
- package/table/hook/useRowSelection.js +92 -0
- package/table/hook/useSorter.js +54 -0
- package/table/hook/useStickyClassNames.js +30 -0
- package/table/hook/useStickyOffsets.js +30 -0
- package/table/summary/Cell.js +10 -0
- package/table/summary/Row.js +26 -0
- package/table/summary/context.js +5 -0
- package/table/summary/index.js +10 -0
- package/table/tbody/Td.js +168 -0
- package/table/tbody/Tr.js +168 -0
- package/table/tbody/index.js +156 -0
- package/table/tfoot/index.js +16 -0
- package/table/thead/Column.js +250 -0
- package/table/thead/index.js +131 -0
- package/table/util.js +121 -0
- package/tabs/Tab.js +170 -0
- package/tabs/TabContent.js +54 -0
- package/tabs/TabPane.js +26 -0
- package/tabs/hook/useDomSize.js +17 -0
- package/tabs/hook/useHeaderScroll.js +64 -0
- package/tabs/tab-header/DropdownIcon.js +71 -0
- package/tabs/tab-header/TabInk.js +65 -0
- package/tabs/tab-header/TabNavIcon.js +65 -0
- package/tabs/tab-header/TabTitle.js +78 -0
- package/tabs/tab-header/index.js +335 -0
- package/tabs/util.js +22 -0
- package/time-picker/Picker.js +221 -0
- package/time-picker/RangePicker.js +56 -0
- package/time-picker/TimeColumn.js +65 -0
- package/time-picker/TimePicker.js +242 -0
- package/time-picker/context.js +5 -0
- package/time-picker/util.js +43 -0
- package/timeline/Item.js +94 -0
- package/timeline/Timeline.js +80 -0
- package/transfer/Item.js +107 -0
- package/transfer/List.js +192 -0
- package/tree/Animation.js +104 -0
- package/tree/Context.js +5 -0
- package/tree/Node.js +215 -0
- package/tree/NodeList.js +84 -0
- package/tree/Tree.js +549 -0
- package/tree/util.js +76 -0
- package/tree-select/List.js +127 -0
- package/tree-select/Select.js +260 -0
- package/tree-select/hook/useKeyCache.js +56 -0
- package/tree-select/hook/useStateValue.js +98 -0
- package/tree-select/hook/useTreeData.js +13 -0
- package/tree-select/interface.js +13 -0
- package/tree-select/util.js +9 -0
- package/trigger/Portal.js +14 -0
- package/trigger/getPopupStyle.js +190 -0
- package/types/badge/Count.d.ts +2 -1
- package/types/badge/index.d.ts +2 -2
- package/types/button/index.d.ts +2 -2
- package/types/carousel/index.d.ts +1 -1
- package/types/color-picker/colors.d.ts +1 -1
- package/types/color-picker/style/index.d.ts +1 -1
- package/types/drawer/Drawer.d.ts +1 -1
- package/types/dropdown/interface.d.ts +1 -0
- package/types/hooks/index.d.ts +122 -0
- package/types/hooks/use-verification-code/interface.d.ts +1 -1
- package/types/hooks/useAsync.d.ts +1 -1
- package/types/hooks/useDropArea.d.ts +1 -0
- package/types/hooks/useOverrideRef.d.ts +5 -0
- package/types/hooks/usePersistCallback.d.ts +1 -0
- package/types/hooks/useUpsert.d.ts +1 -1
- package/types/icon-hover/index.d.ts +5 -3
- package/types/index.d.ts +2 -120
- package/types/input-tag/InputTag.d.ts +1 -1
- package/types/link/interface.d.ts +1 -1
- package/types/list/index.d.ts +1 -1
- package/types/modal/interface.d.ts +1 -0
- package/types/notice/index.d.ts +3 -0
- package/types/notification/index.d.ts +1 -1
- package/types/page-header/index.d.ts +1 -1
- package/types/select/Select.d.ts +1 -1
- package/types/select-view/Core.d.ts +3 -2
- package/types/select-view/index.d.ts +1 -0
- package/types/statistic/index.d.ts +1 -1
- package/types/switch/index.d.ts +1 -1
- package/types/switch/interface.d.ts +1 -1
- package/types/table/interface.d.ts +2 -1
- package/types/tooltip/index.d.ts +1 -1
- package/types/trigger/index.d.ts +12 -8
- package/types/trigger/interface.d.ts +1 -0
- package/types/typography/Base.d.ts +8 -7
- package/types/typography/EditContent.d.ts +3 -2
- package/types/typography/Paragraph.d.ts +2 -5
- package/types/typography/Text.d.ts +1 -5
- package/types/typography/Title.d.ts +2 -5
- package/types/upload/TriggerNode.d.ts +5 -3
- package/types/upload/list/PictureItem.d.ts +3 -3
- package/types/upload/list/TextItem.d.ts +3 -3
- package/types/utils/CSSTransition.d.ts +2 -0
- package/types/utils/constant.d.ts +1 -1
- package/types/utils/is.d.ts +4 -0
- package/types/utils/reactDOM.d.ts +3 -1
- package/types/utils/warning.d.ts +1 -1
- package/types/version/index.d.ts +1 -1
- package/typography/Base.js +184 -0
- package/typography/EditContent.js +49 -0
- package/typography/Ellipsis.js +293 -0
- package/typography/Operations.js +78 -0
- package/typography/Paragraph.js +26 -0
- package/typography/Text.js +11 -0
- package/typography/Title.js +12 -0
- package/typography/Typography.js +15 -0
- package/typography/useCssEllipsis.js +37 -0
- package/typography/useEllipsis.js +150 -0
- package/upload/TriggerNode.js +118 -0
- package/upload/Upload.js +205 -0
- package/upload/Uploader.js +205 -0
- package/upload/interface.js +9 -0
- package/upload/list/PictureItem.js +91 -0
- package/upload/list/TextItem.js +99 -0
- package/upload/list/UploadProgress.js +97 -0
- package/upload/list/index.js +120 -0
- package/upload/request.js +51 -0
- package/upload/util.js +61 -0
- package/utils/CSSTransition.js +27 -0
- package/utils/contextHolder.js +29 -4
- package/utils/getHighlightText.js +1 -2
- package/utils/is.js +81 -68
- package/utils/reactDOM.js +33 -22
- package/utils/style.js +1 -2
- package/utils/warning.js +7 -3
- package/verification-code/VerificationCode.js +83 -0
- package/virtual-list/Filler.js +31 -0
- package/virtual-list/VirtualList.js +378 -0
- package/virtual-list/util/algorithm.js +32 -0
- package/virtual-list/util/item.js +99 -0
- package/{chunk/BCEX3Acw.js → watermark/Watermark.js} +13 -11
- package/chunk/B1P8u7kB.js +0 -798
- package/chunk/B2ufZjjd.js +0 -1000
- package/chunk/B7QOJqps.js +0 -162
- package/chunk/BBz3S3zo.js +0 -966
- package/chunk/BGzBxiWE.js +0 -517
- package/chunk/BNRfcEHj.js +0 -984
- package/chunk/BSs6uXmc.js +0 -946
- package/chunk/BTjUAV8T.js +0 -277
- package/chunk/BYQeEcKe.js +0 -375
- package/chunk/Ba4UXIST.js +0 -605
- package/chunk/BfaXVcik.js +0 -271
- package/chunk/Bs11tCU6.js +0 -240
- package/chunk/C7FC7dzS.js +0 -516
- package/chunk/CLzbve11.js +0 -694
- package/chunk/CN4zXU4b.js +0 -877
- package/chunk/CYTPZUHD.js +0 -769
- package/chunk/CcCo_dK0.js +0 -335
- package/chunk/CoCXcpQd.js +0 -261
- package/chunk/D4yH4UKK.js +0 -80
- package/chunk/DiSLYN2-.js +0 -167
- package/chunk/Dr0iXIXO.js +0 -736
- package/chunk/G3-2uJao.js +0 -229
- package/chunk/RnTpOC5-.js +0 -1
- package/chunk/Z-mtdHUQ.js +0 -226
- package/chunk/ZISxNnaR.js +0 -165
- package/chunk/aPJXnDSb.js +0 -450
- package/chunk/i605JRmI.js +0 -232
- package/chunk/l0sNRNKZ.js +0 -1
- package/types/form/FormItemTip.d.ts +0 -8
- /package/{chunk/C6Kfwj0f.js → loading/style/index.less.js} +0 -0
- /package/{chunk/DP2rzg_V.js → suspense-fallback-test/style/index.less.js} +0 -0
- /package/{chunk/K6Dvbx-E.js → virtual-list/style/index.less.js} +0 -0
package/Table.js
CHANGED
|
@@ -1,2001 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import q from "lodash/isPlainObject";
|
|
21
|
-
import Hn from "lodash/throttle";
|
|
22
|
-
import Pe, { useRef as xe, useEffect as nt, useMemo as de, useCallback as tt, useState as we, useContext as We, forwardRef as Pt, createElement as ln, createContext as Wn, useImperativeHandle as Mn } from "react";
|
|
23
|
-
import zn from "./hooks/useIsomorphicLayoutEffect.js";
|
|
24
|
-
import Jt from "./hooks/useMergeProps.js";
|
|
25
|
-
import Tt from "./hooks/useUpdateEffect.js";
|
|
26
|
-
import ne from "@unicom-cloud/utils/class-name";
|
|
27
|
-
import { on as ut, off as ht } from "./utils/dom.js";
|
|
28
|
-
import Un, { pickDataAttributes as Vn } from "./utils/pick.js";
|
|
29
|
-
import jn from "lodash/merge";
|
|
30
|
-
import Yn from "lodash/isNull";
|
|
31
|
-
import Ye from "lodash/isString";
|
|
32
|
-
import qn from "lodash/isUndefined";
|
|
33
|
-
import { V as Gn } from "./chunk/BGzBxiWE.js";
|
|
34
|
-
import Xn from "@unicom-cloud/icons/IconUiMinus";
|
|
35
|
-
import Qn from "@unicom-cloud/icons/IconUiPlus";
|
|
36
|
-
import xt from "lodash/get";
|
|
37
|
-
import kt from "lodash/isFunction";
|
|
38
|
-
import Jn from "./hooks/useForceUpdate.js";
|
|
39
|
-
import Zn from "./utils/mergedToString.js";
|
|
40
|
-
import eo from "@unicom-cloud/icons/IconUiCaretDown";
|
|
41
|
-
import to from "@unicom-cloud/icons/IconUiCaretUp";
|
|
42
|
-
import no from "@unicom-cloud/icons/IconUiFilter";
|
|
43
|
-
import Zt from "./Button.js";
|
|
44
|
-
import oo from "./hooks/useMergeValue.js";
|
|
45
|
-
import ro from "./utils/omit.js";
|
|
46
|
-
const qe = "table_internal_selection_key", Ge = "table_internal_expand_key";
|
|
47
|
-
function St(t) {
|
|
48
|
-
return typeof t == "number" || typeof t == "string" ? {
|
|
49
|
-
width: t
|
|
50
|
-
} : {};
|
|
51
|
-
}
|
|
52
|
-
function mt(t) {
|
|
53
|
-
var y;
|
|
54
|
-
const o = xe(), {
|
|
55
|
-
prefixCls: r,
|
|
56
|
-
columns: h,
|
|
57
|
-
columnWidths: e,
|
|
58
|
-
producer: d,
|
|
59
|
-
expandedRowKeys: c,
|
|
60
|
-
data: l,
|
|
61
|
-
onSetColumnWidths: s
|
|
62
|
-
} = t;
|
|
63
|
-
nt(() => {
|
|
64
|
-
if (d && o.current) {
|
|
65
|
-
const N = Array.from(
|
|
66
|
-
o.current.querySelectorAll("col") || []
|
|
67
|
-
).filter(
|
|
68
|
-
(g) => !g.classList.contains(`${r}-expand-icon-col`) && !g.classList.contains(`${r}-selection-col`)
|
|
69
|
-
).map((g) => {
|
|
70
|
-
const { width: T } = g.getBoundingClientRect();
|
|
71
|
-
return T;
|
|
72
|
-
});
|
|
73
|
-
s == null || s(N);
|
|
74
|
-
}
|
|
75
|
-
}, [d, s, r, c, l, h]);
|
|
76
|
-
let C = 0;
|
|
77
|
-
return /* @__PURE__ */ a("colgroup", { ref: o, children: (y = h == null ? void 0 : h.map) == null ? void 0 : y.call(h, (m, N) => {
|
|
78
|
-
if (m.title === Ge)
|
|
79
|
-
return /* @__PURE__ */ a(
|
|
80
|
-
"col",
|
|
81
|
-
{
|
|
82
|
-
className: `${r}-expand-icon-col`,
|
|
83
|
-
style: St(m.width)
|
|
84
|
-
},
|
|
85
|
-
Ge
|
|
86
|
-
);
|
|
87
|
-
if (m.title === qe)
|
|
88
|
-
return /* @__PURE__ */ a(
|
|
89
|
-
"col",
|
|
90
|
-
{
|
|
91
|
-
className: `${r}-selection-col`,
|
|
92
|
-
style: St(m.width)
|
|
93
|
-
},
|
|
94
|
-
qe
|
|
95
|
-
);
|
|
96
|
-
let g;
|
|
97
|
-
return m.width ? g = m.width : !d && e && (g = e[C]), C++, /* @__PURE__ */ a("col", { style: St(g) }, m.key ?? N);
|
|
98
|
-
}) });
|
|
99
|
-
}
|
|
100
|
-
const en = {
|
|
101
|
-
table: "table",
|
|
102
|
-
header: {
|
|
103
|
-
operations: ({ selectionNode: t, expandNode: o }) => [
|
|
104
|
-
{
|
|
105
|
-
name: "expandNode",
|
|
106
|
-
node: o
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
name: "selectionNode",
|
|
110
|
-
node: t
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
wrapper: "div",
|
|
114
|
-
thead: "thead",
|
|
115
|
-
row: "tr",
|
|
116
|
-
th: "th",
|
|
117
|
-
cell: "div"
|
|
118
|
-
},
|
|
119
|
-
body: {
|
|
120
|
-
operations: ({ selectionNode: t, expandNode: o }) => [
|
|
121
|
-
{
|
|
122
|
-
name: "expandNode",
|
|
123
|
-
node: o
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
name: "selectionNode",
|
|
127
|
-
node: t
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
wrapper: "div",
|
|
131
|
-
tbody: "tbody",
|
|
132
|
-
row: "tr",
|
|
133
|
-
td: "td",
|
|
134
|
-
cell: "span"
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
function Me(t) {
|
|
138
|
-
const o = de(
|
|
139
|
-
() => q(t) ? jn({}, en, t) : en,
|
|
140
|
-
[t]
|
|
141
|
-
);
|
|
142
|
-
return {
|
|
143
|
-
getHeaderComponentOperations: o.header.operations,
|
|
144
|
-
getBodyComponentOperations: o.body.operations,
|
|
145
|
-
ComponentTable: o.table,
|
|
146
|
-
ComponentHeaderWrapper: o.header.wrapper,
|
|
147
|
-
ComponentThead: o.header.thead,
|
|
148
|
-
ComponentHeaderRow: o.header.row,
|
|
149
|
-
ComponentTh: o.header.th,
|
|
150
|
-
ComponentHeaderCell: o.header.cell,
|
|
151
|
-
ComponentBodyWrapper: o.body.wrapper,
|
|
152
|
-
ComponentTbody: o.body.tbody,
|
|
153
|
-
ComponentBodyRow: o.body.row,
|
|
154
|
-
ComponentTd: o.body.td,
|
|
155
|
-
ComponentBodyCell: o.body.cell
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
function tn(t, o) {
|
|
159
|
-
const r = [];
|
|
160
|
-
function h(e) {
|
|
161
|
-
e && e.length > 0 && e.forEach((d) => {
|
|
162
|
-
d[o] ? h(d[o]) : r.push({ ...d, key: d.dataIndex || d.key });
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
return h(t), r;
|
|
166
|
-
}
|
|
167
|
-
function cn(t, o) {
|
|
168
|
-
let r = 0;
|
|
169
|
-
return t && t.length > 0 && t.forEach((h) => {
|
|
170
|
-
const e = cn(h[o], o) + 1;
|
|
171
|
-
r = Math.max(e, r);
|
|
172
|
-
}), r;
|
|
173
|
-
}
|
|
174
|
-
function so(t) {
|
|
175
|
-
const {
|
|
176
|
-
component: o,
|
|
177
|
-
rowSelection: r,
|
|
178
|
-
expandedRowRender: h,
|
|
179
|
-
expandProps: e = {},
|
|
180
|
-
columns: d = [],
|
|
181
|
-
childrenColumnName: c
|
|
182
|
-
} = t, l = de(() => d || [], [d]), s = de(
|
|
183
|
-
() => tn(l, c),
|
|
184
|
-
[l, c]
|
|
185
|
-
), C = r && r.type === "checkbox" || r && !("type" in r), y = r && r.type === "radio", { width: m } = e, N = !!h, g = C || y, { getHeaderComponentOperations: T, getBodyComponentOperations: _ } = Me(o), S = de(
|
|
186
|
-
() => T({
|
|
187
|
-
selectionNode: g ? "holder_node" : "",
|
|
188
|
-
expandNode: N ? "holder_node" : ""
|
|
189
|
-
}),
|
|
190
|
-
[
|
|
191
|
-
g,
|
|
192
|
-
N,
|
|
193
|
-
T
|
|
194
|
-
]
|
|
195
|
-
), w = de(
|
|
196
|
-
() => _({
|
|
197
|
-
selectionNode: g ? "holder_node" : "",
|
|
198
|
-
expandNode: N ? "holder_node" : ""
|
|
199
|
-
}),
|
|
200
|
-
[
|
|
201
|
-
g,
|
|
202
|
-
N,
|
|
203
|
-
_
|
|
204
|
-
]
|
|
205
|
-
), p = r && r.fixed, k = r && r.columnWidth, B = tt(
|
|
206
|
-
(K, P, E) => {
|
|
207
|
-
const I = {}, D = [];
|
|
208
|
-
K.forEach((x, A) => {
|
|
209
|
-
const $ = { ...x };
|
|
210
|
-
(!("key" in x) || typeof x.key > "u") && ($.key = $.dataIndex || A), A === 0 ? ($.$$isFirstColumn = !0, $.fixed === "left" && (I.fixed = $.fixed)) : $.$$isFirstColumn = !1, D.push($);
|
|
211
|
-
});
|
|
212
|
-
const H = N && {
|
|
213
|
-
key: Ge,
|
|
214
|
-
title: Ge,
|
|
215
|
-
width: m,
|
|
216
|
-
$$isOperation: !0
|
|
217
|
-
}, O = g && {
|
|
218
|
-
key: qe,
|
|
219
|
-
title: qe,
|
|
220
|
-
width: k,
|
|
221
|
-
$$isOperation: !0
|
|
222
|
-
};
|
|
223
|
-
return p && (I.fixed = "left"), (typeof E != "number" || E === 0) && [...P].reverse().forEach((x, A) => {
|
|
224
|
-
if (x.node) {
|
|
225
|
-
const $ = S.filter((R) => R.node).length - A - 1;
|
|
226
|
-
x.name === "expandNode" ? D.unshift({
|
|
227
|
-
...H,
|
|
228
|
-
...I,
|
|
229
|
-
$$columnIndex: $
|
|
230
|
-
}) : x.name === "selectionNode" ? D.unshift({
|
|
231
|
-
...O,
|
|
232
|
-
...I,
|
|
233
|
-
$$columnIndex: $
|
|
234
|
-
}) : D.unshift({
|
|
235
|
-
...x,
|
|
236
|
-
...I,
|
|
237
|
-
title: x.name,
|
|
238
|
-
key: x.name,
|
|
239
|
-
$$isOperation: !0,
|
|
240
|
-
width: x.width || 40,
|
|
241
|
-
$$columnIndex: $
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
}), D;
|
|
245
|
-
},
|
|
246
|
-
[
|
|
247
|
-
m,
|
|
248
|
-
N,
|
|
249
|
-
g,
|
|
250
|
-
k,
|
|
251
|
-
p,
|
|
252
|
-
S
|
|
253
|
-
]
|
|
254
|
-
), G = de(
|
|
255
|
-
() => B(s, w),
|
|
256
|
-
[s, B, w]
|
|
257
|
-
), ee = de(
|
|
258
|
-
() => cn(l, c),
|
|
259
|
-
[l, c]
|
|
260
|
-
);
|
|
261
|
-
return [de(() => {
|
|
262
|
-
const K = Array.isArray(S) ? S.filter((D) => D.node).length : 0;
|
|
263
|
-
if (ee === 1) {
|
|
264
|
-
const D = l.map((H, O) => ({
|
|
265
|
-
...H,
|
|
266
|
-
$$columnIndex: O + K
|
|
267
|
-
}));
|
|
268
|
-
return [B(D, S, 0)];
|
|
269
|
-
}
|
|
270
|
-
let P = K;
|
|
271
|
-
const E = [], I = (D, H = 0) => {
|
|
272
|
-
E[H] = E[H] || [], D.forEach((O) => {
|
|
273
|
-
const x = { ...O };
|
|
274
|
-
x[c] ? (x.colSpan = tn(
|
|
275
|
-
O[c],
|
|
276
|
-
c
|
|
277
|
-
).length, x.$$columnIndex = [P], E[H].push(x), I(x[c], H + 1), x.$$columnIndex.push(P - 1)) : (x.rowSpan = ee - H, x.$$columnIndex = P++, E[H].push(x));
|
|
278
|
-
}), E[H] = B(
|
|
279
|
-
E[H],
|
|
280
|
-
S,
|
|
281
|
-
H
|
|
282
|
-
);
|
|
283
|
-
};
|
|
284
|
-
return I(l), E;
|
|
285
|
-
}, [
|
|
286
|
-
l,
|
|
287
|
-
c,
|
|
288
|
-
ee,
|
|
289
|
-
B,
|
|
290
|
-
S
|
|
291
|
-
]), G];
|
|
292
|
-
}
|
|
293
|
-
function Rt(t) {
|
|
294
|
-
return He(t) ? t : Ye(t) && t.includes("px") ? +t.replace("px", "") : t;
|
|
295
|
-
}
|
|
296
|
-
function io(t) {
|
|
297
|
-
return t ? t.offsetHeight - t.clientHeight : 0;
|
|
298
|
-
}
|
|
299
|
-
function lo(t) {
|
|
300
|
-
return t ? t.offsetWidth - t.clientWidth : 0;
|
|
301
|
-
}
|
|
302
|
-
function vt(t, o) {
|
|
303
|
-
return ie(t[o]) && t[o].length;
|
|
304
|
-
}
|
|
305
|
-
function co(t, o) {
|
|
306
|
-
function r(h) {
|
|
307
|
-
if (!h)
|
|
308
|
-
return [];
|
|
309
|
-
const e = [];
|
|
310
|
-
return h.forEach((d) => {
|
|
311
|
-
if (!q(d))
|
|
312
|
-
e.push(d);
|
|
313
|
-
else {
|
|
314
|
-
const c = { ...d };
|
|
315
|
-
c.__ORIGIN_DATA = d;
|
|
316
|
-
const l = c[o];
|
|
317
|
-
q(c) && l && ie(l) && (c[o] = r(l)), e.push(c);
|
|
318
|
-
}
|
|
319
|
-
}), e;
|
|
320
|
-
}
|
|
321
|
-
return r(t);
|
|
322
|
-
}
|
|
323
|
-
function te(t) {
|
|
324
|
-
return q(t) ? t.__ORIGIN_DATA : !t || !ie(t) ? t : t.map((o) => !q(o) || !("__ORIGIN_DATA" in o) ? o : o.__ORIGIN_DATA);
|
|
325
|
-
}
|
|
326
|
-
function ao(t, o, r = [], h = [], e, d, c) {
|
|
327
|
-
const l = new Set(r), s = new Set(h);
|
|
328
|
-
function C(y) {
|
|
329
|
-
o ? (l.add(e(y)), s.delete(e(y))) : l.delete(e(y)), ie(y[d]) && y[d].forEach((m) => {
|
|
330
|
-
C(m);
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
return c ? (C(t), At(
|
|
334
|
-
t,
|
|
335
|
-
l,
|
|
336
|
-
s,
|
|
337
|
-
e,
|
|
338
|
-
d
|
|
339
|
-
)) : o ? l.add(e(t)) : l.delete(e(t)), {
|
|
340
|
-
selectedRowKeys: [...l],
|
|
341
|
-
indeterminateKeys: [...s]
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
function fo(t, o = [], r, h, e) {
|
|
345
|
-
if (!e)
|
|
346
|
-
return {
|
|
347
|
-
selectedRowKeys: o,
|
|
348
|
-
indeterminateKeys: []
|
|
349
|
-
};
|
|
350
|
-
const d = new Set(o), c = /* @__PURE__ */ new Set([]);
|
|
351
|
-
function l(s) {
|
|
352
|
-
d.add(r(s)), c.delete(r(s)), ie(s[h]) && s[h].forEach((C) => {
|
|
353
|
-
l(C);
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
return o.forEach((s) => {
|
|
357
|
-
const C = t.find((y) => r(y) === s);
|
|
358
|
-
!qn(C) && !Yn(C) && (l(C), At(
|
|
359
|
-
C,
|
|
360
|
-
d,
|
|
361
|
-
c,
|
|
362
|
-
r,
|
|
363
|
-
h
|
|
364
|
-
));
|
|
365
|
-
}), {
|
|
366
|
-
selectedRowKeys: [...d],
|
|
367
|
-
indeterminateKeys: [...c]
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
function At(t, o, r, h, e) {
|
|
371
|
-
if (t.__INTERNAL_PARENT) {
|
|
372
|
-
const d = h(t.__INTERNAL_PARENT);
|
|
373
|
-
if (ie(t.__INTERNAL_PARENT[e])) {
|
|
374
|
-
const c = t.__INTERNAL_PARENT[e].length;
|
|
375
|
-
let l = 0, s = !1;
|
|
376
|
-
t.__INTERNAL_PARENT[e].forEach((C) => {
|
|
377
|
-
o.has(h(C)) && (l += 1), r.has(h(C)) && (r.add(d), s = !0);
|
|
378
|
-
}), c === l ? (o.add(d), r.delete(d)) : l > 0 && c > l ? (o.delete(d), r.add(d)) : l === 0 && (o.delete(d), s || r.delete(d));
|
|
379
|
-
}
|
|
380
|
-
At(
|
|
381
|
-
t.__INTERNAL_PARENT,
|
|
382
|
-
o,
|
|
383
|
-
r,
|
|
384
|
-
h,
|
|
385
|
-
e
|
|
386
|
-
);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
function _t(t) {
|
|
390
|
-
return typeof t == "function" ? t : typeof t == "object" && typeof t.compare == "function" ? t.compare : null;
|
|
391
|
-
}
|
|
392
|
-
function Et(t) {
|
|
393
|
-
if (typeof t == "object" && typeof t.multiple == "number")
|
|
394
|
-
return t.multiple;
|
|
395
|
-
}
|
|
396
|
-
function po(t, o, r) {
|
|
397
|
-
const {
|
|
398
|
-
defaultExpandedRowKeys: h,
|
|
399
|
-
defaultExpandAllRows: e,
|
|
400
|
-
expandedRowRender: d,
|
|
401
|
-
onExpand: c,
|
|
402
|
-
onExpandedRowsChange: l,
|
|
403
|
-
childrenColumnName: s = "children",
|
|
404
|
-
expandProps: C
|
|
405
|
-
} = t, [y, m] = we(
|
|
406
|
-
g()
|
|
407
|
-
), N = t.expandedRowKeys || y;
|
|
408
|
-
function g() {
|
|
409
|
-
let S = [];
|
|
410
|
-
return t.expandedRowKeys ? S = t.expandedRowKeys : h ? S = h : e && (S = o.map((w, p) => {
|
|
411
|
-
const k = te(w);
|
|
412
|
-
return C && "rowExpandable" in C && typeof C.rowExpandable == "function" ? C.rowExpandable(k) && r(w) : typeof d == "function" ? d(k, p) && r(w) : vt(w, s) && r(w);
|
|
413
|
-
}).filter((w) => w)), S;
|
|
414
|
-
}
|
|
415
|
-
function T(S) {
|
|
416
|
-
const w = N.indexOf(S) === -1, p = w ? N.concat(S) : N.filter((B) => S !== B), k = o.filter((B) => p.indexOf(r(B)) !== -1).map((B) => r(B));
|
|
417
|
-
m(k), _(S, w), l == null || l(k);
|
|
418
|
-
}
|
|
419
|
-
function _(S, w) {
|
|
420
|
-
c == null || c(
|
|
421
|
-
te(o.find((p) => r(p) === S)),
|
|
422
|
-
w
|
|
423
|
-
);
|
|
424
|
-
}
|
|
425
|
-
return [N, T];
|
|
426
|
-
}
|
|
427
|
-
function nn(t) {
|
|
428
|
-
return [...new Set(t)];
|
|
429
|
-
}
|
|
430
|
-
function uo(t, o, r, h) {
|
|
431
|
-
const { rowSelection: e, childrenColumnName: d } = t, c = e == null ? void 0 : e.selectedRowKeys, l = e == null ? void 0 : e.onSelectAll, s = e == null ? void 0 : e.onSelect, C = e == null ? void 0 : e.onChange, y = e == null ? void 0 : e.pureKeys, m = typeof (e == null ? void 0 : e.checkStrictly) == "boolean" ? !e.checkStrictly : !1, N = e == null ? void 0 : e.preserveSelectedRowKeys;
|
|
432
|
-
function g() {
|
|
433
|
-
const x = [], A = [], $ = (F) => {
|
|
434
|
-
ie(F) && F.length && F.forEach((f) => {
|
|
435
|
-
const v = h(f);
|
|
436
|
-
(e && typeof e.checkboxProps == "function" ? e.checkboxProps(te(f)) : {}).disabled || x.push(v), vt(f, t.childrenColumnName) && $(f[t.childrenColumnName]);
|
|
437
|
-
});
|
|
438
|
-
};
|
|
439
|
-
$(o);
|
|
440
|
-
const R = (F, f) => {
|
|
441
|
-
ie(F) && F.length && F.forEach((v) => {
|
|
442
|
-
if (f && m && (v.__INTERNAL_PARENT = f), A.push(v), vt(v, t.childrenColumnName)) {
|
|
443
|
-
const Y = { ...v };
|
|
444
|
-
R(v[t.childrenColumnName], Y);
|
|
445
|
-
}
|
|
446
|
-
});
|
|
447
|
-
};
|
|
448
|
-
return R(r, void 0), {
|
|
449
|
-
allSelectedRowKeys: x,
|
|
450
|
-
flattenData: A
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
const { allSelectedRowKeys: T, flattenData: _ } = g(), [S, w] = we([]), [p, k] = we([]), B = fo(
|
|
454
|
-
_,
|
|
455
|
-
nn(c || S),
|
|
456
|
-
h,
|
|
457
|
-
d,
|
|
458
|
-
m
|
|
459
|
-
), G = m && !c ? S : B.selectedRowKeys, ee = m && !c ? p : B.indeterminateKeys, [V, K] = we(
|
|
460
|
-
y ? [] : P(G)
|
|
461
|
-
);
|
|
462
|
-
function P(x, A) {
|
|
463
|
-
const $ = A ? V.concat(_) : _, R = new Map($.map((F) => [h(F), F]));
|
|
464
|
-
return x.map((F) => R.get(F)).filter((F) => F);
|
|
465
|
-
}
|
|
466
|
-
const E = new Set(_.map((x) => h(x)));
|
|
467
|
-
function I(x) {
|
|
468
|
-
return N ? x : x.filter((A) => E.has(A));
|
|
469
|
-
}
|
|
470
|
-
function D(x) {
|
|
471
|
-
let A = [], $ = [];
|
|
472
|
-
if (x)
|
|
473
|
-
A = I(
|
|
474
|
-
nn(G.concat(T))
|
|
475
|
-
);
|
|
476
|
-
else {
|
|
477
|
-
const F = new Set(T);
|
|
478
|
-
A = I(
|
|
479
|
-
G.filter((f) => !F.has(f))
|
|
480
|
-
);
|
|
481
|
-
}
|
|
482
|
-
y || ($ = P(A, !0));
|
|
483
|
-
const R = te($);
|
|
484
|
-
w(A), K($), k([]), C == null || C(A, R), l == null || l(x, R);
|
|
485
|
-
}
|
|
486
|
-
function H(x, A) {
|
|
487
|
-
const { selectedRowKeys: $, indeterminateKeys: R } = ao(
|
|
488
|
-
A,
|
|
489
|
-
x,
|
|
490
|
-
G,
|
|
491
|
-
p,
|
|
492
|
-
h,
|
|
493
|
-
d,
|
|
494
|
-
m
|
|
495
|
-
), F = I($), f = P(F, !0), v = te(f);
|
|
496
|
-
w(F), K(f), k(R), s == null || s(x, te(A), v), C == null || C(F, v);
|
|
497
|
-
}
|
|
498
|
-
function O(x, A) {
|
|
499
|
-
const $ = [_.find((F) => h(F) === x)], R = te($);
|
|
500
|
-
w([x]), s == null || s(!0, te(A), R), C == null || C([x], R);
|
|
501
|
-
}
|
|
502
|
-
return {
|
|
503
|
-
selectedRowKeys: G,
|
|
504
|
-
indeterminateKeys: ee,
|
|
505
|
-
onCheckAll: D,
|
|
506
|
-
onCheck: H,
|
|
507
|
-
onCheckRadio: O,
|
|
508
|
-
setSelectedRowKeys: w,
|
|
509
|
-
allSelectedRowKeys: T,
|
|
510
|
-
flattenData: _
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
|
-
function ho(t, o) {
|
|
514
|
-
const [r, h] = we(o), [e, d] = we({}), c = xe(t), l = tt(
|
|
515
|
-
(y) => {
|
|
516
|
-
const { field: m, direction: N } = y;
|
|
517
|
-
return r.find((g) => g.field === m) ? N ? r.map(
|
|
518
|
-
(g) => g.field === m ? y : g
|
|
519
|
-
) : r.filter((g) => g.field !== m) : N ? !He(y.priority) || r.find((g) => !He(g.priority)) ? [y] : [...r, y] : [...r];
|
|
520
|
-
},
|
|
521
|
-
[r]
|
|
522
|
-
), s = tt((y) => {
|
|
523
|
-
const m = y.filter((g) => "sortOrder" in g);
|
|
524
|
-
let N = [];
|
|
525
|
-
return m.forEach((g) => {
|
|
526
|
-
const T = Et(g.sorter), _ = g.sortOrder, S = {
|
|
527
|
-
field: g.dataIndex || g.key,
|
|
528
|
-
direction: _,
|
|
529
|
-
sorterFn: _t(g.sorter),
|
|
530
|
-
priority: T
|
|
531
|
-
};
|
|
532
|
-
_ ? He(T) ? N.every((w) => He(w.priority) || !w.direction) && N.push(S) : N.every((w) => !w.direction) ? N.push(S) : N = [S] : N.push(S);
|
|
533
|
-
}), N;
|
|
534
|
-
}, []), C = tt(
|
|
535
|
-
(y, m) => {
|
|
536
|
-
s(t).length || (h(m), d(y));
|
|
537
|
-
},
|
|
538
|
-
[t, s, h, d]
|
|
539
|
-
);
|
|
540
|
-
return Tt(() => {
|
|
541
|
-
const y = c.current, m = s(y), N = s(t), g = m.map(
|
|
542
|
-
(_) => _.field
|
|
543
|
-
), T = N.filter((_) => m.find(
|
|
544
|
-
({ field: w, direction: p }) => _.field === w && _.direction !== p
|
|
545
|
-
) ? !0 : !g.includes(_.field));
|
|
546
|
-
T && T.length && (h(N), d({})), c.current = t;
|
|
547
|
-
}, [
|
|
548
|
-
t,
|
|
549
|
-
s,
|
|
550
|
-
l,
|
|
551
|
-
d,
|
|
552
|
-
h
|
|
553
|
-
]), {
|
|
554
|
-
currentSorter: e,
|
|
555
|
-
activeSorters: r,
|
|
556
|
-
getNextActiveSorters: l,
|
|
557
|
-
updateStateSorters: C
|
|
558
|
-
};
|
|
559
|
-
}
|
|
560
|
-
function mo(t, o, r) {
|
|
561
|
-
const h = o.map((l) => l.fixed);
|
|
562
|
-
function e(l, s) {
|
|
563
|
-
return ne({
|
|
564
|
-
[`${r}-col-fixed-left`]: l.fixed === "left",
|
|
565
|
-
[`${r}-col-fixed-right`]: l.fixed === "right",
|
|
566
|
-
[`${r}-col-fixed-left-last`]: l.fixed === "left" && (q(o[s + 1]) ? o[s + 1].fixed !== "left" : !0),
|
|
567
|
-
[`${r}-col-fixed-right-first`]: l.fixed === "right" && (q(o[s - 1]) ? o[s - 1].fixed !== "right" : !0)
|
|
568
|
-
});
|
|
569
|
-
}
|
|
570
|
-
const d = de(() => o.map(
|
|
571
|
-
(l, s) => e(l, s)
|
|
572
|
-
), [h.join("-")]);
|
|
573
|
-
return [de(
|
|
574
|
-
() => t.map((l) => l.map((s, C) => {
|
|
575
|
-
let y = C;
|
|
576
|
-
const m = s.$$columnIndex;
|
|
577
|
-
return Array.isArray(m) && m.length === 2 ? y = s.fixed === "right" ? m[0] : m[1] : typeof m == "number" && (y = m), e(s, y);
|
|
578
|
-
})),
|
|
579
|
-
[
|
|
580
|
-
t.map((l) => `|${l.map((s) => s.fixed || "undefined").join("-")}|`).join("_")
|
|
581
|
-
]
|
|
582
|
-
), d];
|
|
583
|
-
}
|
|
584
|
-
function yo(t) {
|
|
585
|
-
const o = t.map((e) => Rt(e.width)), r = t.map((e) => e.fixed);
|
|
586
|
-
return de(() => t.map((e) => {
|
|
587
|
-
let d = 0;
|
|
588
|
-
return e.fixed === "left" && t.some((c) => {
|
|
589
|
-
if (c.fixed === "left") {
|
|
590
|
-
if (c.key === e.key)
|
|
591
|
-
return !0;
|
|
592
|
-
let l = Rt(c.width);
|
|
593
|
-
const s = c.$$isOperation ? l || 40 : l;
|
|
594
|
-
return d += s, !1;
|
|
595
|
-
}
|
|
596
|
-
return !1;
|
|
597
|
-
}), e.fixed === "right" && [...t].reverse().some((c) => {
|
|
598
|
-
if (c.fixed === "right") {
|
|
599
|
-
if (c.key === e.key)
|
|
600
|
-
return !0;
|
|
601
|
-
let l = Rt(c.width);
|
|
602
|
-
const s = c.$$isOperation ? l || 40 : l;
|
|
603
|
-
return d += s, !1;
|
|
604
|
-
}
|
|
605
|
-
return !1;
|
|
606
|
-
}), d;
|
|
607
|
-
}), [o.join("-"), r.join("-")]);
|
|
608
|
-
}
|
|
609
|
-
function xo(t) {
|
|
610
|
-
return t && !Pe.isValidElement(t) && q(t);
|
|
611
|
-
}
|
|
612
|
-
function go(t) {
|
|
613
|
-
var le, fe, he, pe, me, z, be, Ne, re;
|
|
614
|
-
const o = Jn(), {
|
|
615
|
-
component: r,
|
|
616
|
-
InnerComponentTd: h,
|
|
617
|
-
column: e,
|
|
618
|
-
columnIndex: d,
|
|
619
|
-
prefixCls: c,
|
|
620
|
-
stickyClassName: l,
|
|
621
|
-
stickyOffset: s,
|
|
622
|
-
currentSorter: C,
|
|
623
|
-
virtualized: y,
|
|
624
|
-
record: m,
|
|
625
|
-
trIndex: N,
|
|
626
|
-
level: g,
|
|
627
|
-
placeholder: T = "-",
|
|
628
|
-
indentSize: _,
|
|
629
|
-
renderExpandIcon: S,
|
|
630
|
-
rowKey: w,
|
|
631
|
-
recordHaveChildren: p,
|
|
632
|
-
haveTreeData: k
|
|
633
|
-
} = t, { rtl: B } = We(Xe), { ComponentBodyCell: G } = Me(r), ee = xe(null), V = xe(null), K = xe(null), P = xe(null), E = ne(
|
|
634
|
-
`${c}-td`,
|
|
635
|
-
l,
|
|
636
|
-
{
|
|
637
|
-
[`${c}-col-sorted`]: C && C.direction && C.field === (e == null ? void 0 : e.dataIndex)
|
|
638
|
-
},
|
|
639
|
-
e == null ? void 0 : e.className
|
|
640
|
-
);
|
|
641
|
-
let I = {}, D, H, O = {};
|
|
642
|
-
(e == null ? void 0 : e.fixed) === "left" && (O[B ? "right" : "left"] = s), (e == null ? void 0 : e.fixed) === "right" && (O[B ? "left" : "right"] = s), q(e == null ? void 0 : e.cellStyle) && (O = {
|
|
643
|
-
...O,
|
|
644
|
-
...e == null ? void 0 : e.cellStyle
|
|
645
|
-
}), q(e == null ? void 0 : e.bodyCellStyle) && (O = {
|
|
646
|
-
...O,
|
|
647
|
-
...e == null ? void 0 : e.bodyCellStyle
|
|
648
|
-
}), kt(e == null ? void 0 : e.bodyCellStyle) && (O = {
|
|
649
|
-
...O,
|
|
650
|
-
...((le = e == null ? void 0 : e.bodyCellStyle) == null ? void 0 : le.call(e, m, N)) ?? {}
|
|
651
|
-
}), e != null && e.align && (O.textAlign = e == null ? void 0 : e.align), y && e.width && (O.width = e.width, O.minWidth = e.width, O.maxWidth = e.width);
|
|
652
|
-
const { onHandleSave: x, ...A } = e != null && e.onCell ? (e == null ? void 0 : e.onCell(m, N, e)) ?? {} : { onHandleSave: () => {
|
|
653
|
-
} }, $ = e == null ? void 0 : e.render;
|
|
654
|
-
let R = de(() => $ == null ? void 0 : $(
|
|
655
|
-
xt(m, e == null ? void 0 : e.dataIndex),
|
|
656
|
-
te(m),
|
|
657
|
-
N
|
|
658
|
-
), [m, e, N]);
|
|
659
|
-
if (kt($) || (R = xt(m, (e == null ? void 0 : e.dataIndex) ?? "")), xo(R) && (I = R == null ? void 0 : R.props, D = I == null ? void 0 : I.rowSpan, H = I == null ? void 0 : I.colSpan, R = R == null ? void 0 : R.children), D === 0 || H === 0)
|
|
660
|
-
return null;
|
|
661
|
-
Ye(R) && (R = R.trim()), !R && R !== 0 && (R = (e == null ? void 0 : e.placeholder) ?? T ?? "-");
|
|
662
|
-
const F = e != null && e.ellipsis && Ye(R) ? {
|
|
663
|
-
// title: cellChildren // 暂时不需要title属性了,因为单独加了tooltip组件,潘启宝2023年4月1日于广东省惠州市
|
|
664
|
-
} : {}, f = k && (e == null ? void 0 : e.$$isFirstColumn), v = f && p;
|
|
665
|
-
let Y = f && g > 0 ? _ * g : 0;
|
|
666
|
-
f && !p && (Y += 20);
|
|
667
|
-
const W = `${d}-${N}-${Y}-${v}`, J = /* @__PURE__ */ a(
|
|
668
|
-
"div",
|
|
669
|
-
{
|
|
670
|
-
ref: ee,
|
|
671
|
-
className: ne(`${c}-cell`, {
|
|
672
|
-
[`${c}-cell-text-ellipsis`]: e == null ? void 0 : e.ellipsis
|
|
673
|
-
}),
|
|
674
|
-
...F,
|
|
675
|
-
children: /* @__PURE__ */ ue(
|
|
676
|
-
G,
|
|
677
|
-
{
|
|
678
|
-
ref: V,
|
|
679
|
-
className: `${c}-cell-wrap-value`,
|
|
680
|
-
...Ye(G) ? {} : {
|
|
681
|
-
rowData: te(m),
|
|
682
|
-
column: e,
|
|
683
|
-
onHandleSave: x,
|
|
684
|
-
...A
|
|
685
|
-
},
|
|
686
|
-
children: [
|
|
687
|
-
!!Y && /* @__PURE__ */ a(
|
|
688
|
-
"span",
|
|
689
|
-
{
|
|
690
|
-
ref: K,
|
|
691
|
-
className: `${c}-cell-indent`,
|
|
692
|
-
style: { paddingLeft: Y }
|
|
693
|
-
}
|
|
694
|
-
),
|
|
695
|
-
!!v && /* @__PURE__ */ a(
|
|
696
|
-
"span",
|
|
697
|
-
{
|
|
698
|
-
ref: P,
|
|
699
|
-
className: `${c}-cell-expand-icon`,
|
|
700
|
-
children: S(m, w)
|
|
701
|
-
}
|
|
702
|
-
),
|
|
703
|
-
t.___dangerouslySetInnerHTML___ ? /* @__PURE__ */ a(
|
|
704
|
-
"span",
|
|
705
|
-
{
|
|
706
|
-
dangerouslySetInnerHTML: {
|
|
707
|
-
__html: R
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
) : R
|
|
711
|
-
]
|
|
712
|
-
},
|
|
713
|
-
W
|
|
714
|
-
)
|
|
715
|
-
},
|
|
716
|
-
W
|
|
717
|
-
);
|
|
718
|
-
let oe = /* @__PURE__ */ a(
|
|
719
|
-
h,
|
|
720
|
-
{
|
|
721
|
-
className: E,
|
|
722
|
-
style: O,
|
|
723
|
-
...Un(A, [
|
|
724
|
-
"onClick",
|
|
725
|
-
"onDoubleClick",
|
|
726
|
-
"onContextMenu",
|
|
727
|
-
"onMouseOver",
|
|
728
|
-
"onMouseEnter",
|
|
729
|
-
"onMouseLeave",
|
|
730
|
-
"onMouseMove",
|
|
731
|
-
"onMouseDown",
|
|
732
|
-
"onMouseUp"
|
|
733
|
-
]),
|
|
734
|
-
...I,
|
|
735
|
-
children: J
|
|
736
|
-
},
|
|
737
|
-
(e == null ? void 0 : e.key) || (e == null ? void 0 : e.dataIndex) || d
|
|
738
|
-
);
|
|
739
|
-
if ((e == null ? void 0 : e.showTooltip) !== !1 && (e != null && e.ellipsis)) {
|
|
740
|
-
const ce = (he = (fe = ee.current) == null ? void 0 : fe.getBoundingClientRect) == null ? void 0 : he.call(fe), X = (me = (pe = V.current) == null ? void 0 : pe.getBoundingClientRect) == null ? void 0 : me.call(pe), ye = (be = (z = K.current) == null ? void 0 : z.getBoundingClientRect) == null ? void 0 : be.call(z), Re = (re = (Ne = P.current) == null ? void 0 : Ne.getBoundingClientRect) == null ? void 0 : re.call(Ne), ge = (ce == null ? void 0 : ce.width) ?? 0, _e = (X == null ? void 0 : X.width) ?? 0, Ae = (ye == null ? void 0 : ye.width) ?? 0, Fe = (Re == null ? void 0 : Re.width) ?? 0;
|
|
741
|
-
_e + (Ae ?? Y) + Fe > ge && (oe = /* @__PURE__ */ a(sn, { content: Zn(oe), children: oe }));
|
|
742
|
-
}
|
|
743
|
-
return nt(() => (o(), () => {
|
|
744
|
-
}), [ee.current, V.current]), oe;
|
|
745
|
-
}
|
|
746
|
-
const Co = Pe.memo(go);
|
|
747
|
-
function wo(t, o) {
|
|
748
|
-
const {
|
|
749
|
-
expandedRowRender: r,
|
|
750
|
-
onClickExpandBtn: h,
|
|
751
|
-
columns: e,
|
|
752
|
-
component: d,
|
|
753
|
-
onCheck: c,
|
|
754
|
-
onCheckRadio: l,
|
|
755
|
-
prefixCls: s,
|
|
756
|
-
selectedRowKeys: C,
|
|
757
|
-
indeterminateKeys: y,
|
|
758
|
-
rowClassName: m,
|
|
759
|
-
onRow: N,
|
|
760
|
-
rowSelection: g,
|
|
761
|
-
indentSize: T = 16,
|
|
762
|
-
activeSorters: _,
|
|
763
|
-
virtualized: S,
|
|
764
|
-
stickyOffsets: w,
|
|
765
|
-
stickyClassNames: p,
|
|
766
|
-
getRowKey: k,
|
|
767
|
-
placeholder: B,
|
|
768
|
-
expandProps: G = { strictTreeData: !0 },
|
|
769
|
-
data: ee,
|
|
770
|
-
expandedRowKeys: V,
|
|
771
|
-
childrenColumnName: K,
|
|
772
|
-
record: P,
|
|
773
|
-
index: E,
|
|
774
|
-
type: I,
|
|
775
|
-
shouldRowExpand: D,
|
|
776
|
-
level: H
|
|
777
|
-
} = t, { rtl: O } = We(Xe), x = te(P), { ...A } = (N == null ? void 0 : N(x, E)) || {}, $ = k(P), R = I === "radio" ? C.slice(0, 1) : C, F = $ || E, f = R.indexOf($) > -1, v = V.indexOf($) > -1, Y = y.indexOf($) > -1, W = ne(
|
|
778
|
-
`${s}-tr`,
|
|
779
|
-
{
|
|
780
|
-
[`${s}-row-checked`]: f,
|
|
781
|
-
[`${s}-row-expanded`]: v
|
|
782
|
-
},
|
|
783
|
-
m == null ? void 0 : m(x, E)
|
|
784
|
-
), J = g && typeof g.checkboxProps == "function" ? g.checkboxProps(x) : {}, oe = ne(`${s}-td`, `${s}-operation`), le = (U) => ne(oe, `${s}-${U}`, {
|
|
785
|
-
[`${s}-selection-col`]: S && I === "checkbox" || I === "radio",
|
|
786
|
-
[`${s}-expand-icon-col`]: S && r
|
|
787
|
-
});
|
|
788
|
-
function fe(U) {
|
|
789
|
-
return G.strictTreeData ? ie(U[K]) && U[K].length : U[K] !== void 0;
|
|
790
|
-
}
|
|
791
|
-
function he() {
|
|
792
|
-
return ee.find((U) => fe(U));
|
|
793
|
-
}
|
|
794
|
-
const pe = D(P, E), me = fe(P), z = he() && !r, be = z && me, re = G.expandRowByClick && (pe || be) ? {
|
|
795
|
-
onClick: (U) => {
|
|
796
|
-
var Ce;
|
|
797
|
-
h($), (Ce = A == null ? void 0 : A.onClick) == null || Ce.call(A, U);
|
|
798
|
-
}
|
|
799
|
-
} : {}, { ComponentBodyRow: ce, ComponentTd: X, getBodyComponentOperations: ye } = Me(d), Re = S ? "div" : ce, ge = S ? "div" : X, _e = {
|
|
800
|
-
className: W,
|
|
801
|
-
key: F,
|
|
802
|
-
...A,
|
|
803
|
-
...re
|
|
804
|
-
}, Ae = Ye(ce) ? _e : { ..._e, record: P, index: E };
|
|
805
|
-
function Fe(U, Ce) {
|
|
806
|
-
const { icon: Te } = G, Be = !!~V.indexOf(Ce), Ke = {
|
|
807
|
-
onClick: (Le) => {
|
|
808
|
-
Le.stopPropagation(), h(Ce);
|
|
809
|
-
}
|
|
810
|
-
};
|
|
811
|
-
return typeof Te == "function" ? Te({ expanded: Be, record: U, ...Ke }) : /* @__PURE__ */ a("button", { ...Ke, type: "button", children: Be ? /* @__PURE__ */ a(Xn, {}) : /* @__PURE__ */ a(Qn, {}) });
|
|
812
|
-
}
|
|
813
|
-
const Oe = r && /* @__PURE__ */ a(ge, { className: le("expand-icon-cell"), children: pe && Fe(P, $) }), Se = g && g.renderCell;
|
|
814
|
-
let M;
|
|
815
|
-
const ae = /* @__PURE__ */ a(
|
|
816
|
-
It,
|
|
817
|
-
{
|
|
818
|
-
value: $,
|
|
819
|
-
onChange: (U) => c(U, P),
|
|
820
|
-
checked: f,
|
|
821
|
-
indeterminate: Y,
|
|
822
|
-
...J
|
|
823
|
-
}
|
|
824
|
-
), Z = /* @__PURE__ */ a(
|
|
825
|
-
rn,
|
|
826
|
-
{
|
|
827
|
-
onChange: () => l($, P),
|
|
828
|
-
value: $,
|
|
829
|
-
checked: f,
|
|
830
|
-
...J
|
|
831
|
-
}
|
|
832
|
-
);
|
|
833
|
-
I === "checkbox" && (M = /* @__PURE__ */ a(ge, { className: le("checkbox"), children: Se ? Se(ae, f, x) : ae })), I === "radio" && (M = /* @__PURE__ */ a(ge, { className: le("radio"), children: Se ? Se(Z, f, x) : Z }));
|
|
834
|
-
const se = ye({
|
|
835
|
-
selectionNode: M,
|
|
836
|
-
expandNode: Oe
|
|
837
|
-
});
|
|
838
|
-
return /* @__PURE__ */ a(Re, { ...Ae, ref: o, children: e.map((U, Ce) => {
|
|
839
|
-
var Le, ot, De, ke;
|
|
840
|
-
const Te = `${U.key}-${U.dataIndex}-${U.title}-${Ce}`, Be = w[Ce], Ke = p[Ce];
|
|
841
|
-
if (U.$$isOperation) {
|
|
842
|
-
let Ee = U.node, Qe = !0;
|
|
843
|
-
U.title === qe && (Ee = (Le = se.find((ze) => ze.name === "selectionNode")) == null ? void 0 : Le.node, Qe = !1), U.title === Ge && (Ee = (ot = se.find((ze) => ze.name === "expandNode")) == null ? void 0 : ot.node, Qe = !1);
|
|
844
|
-
const ve = typeof Ee == "function" ? Ee(P) : Ee;
|
|
845
|
-
return Pe.cloneElement(ve, {
|
|
846
|
-
key: Te || Ce,
|
|
847
|
-
...ve.props,
|
|
848
|
-
className: ne(
|
|
849
|
-
Qe ? oe : "",
|
|
850
|
-
(De = ve == null ? void 0 : ve.props) == null ? void 0 : De.className,
|
|
851
|
-
Ke
|
|
852
|
-
),
|
|
853
|
-
style: {
|
|
854
|
-
...(ke = ve == null ? void 0 : ve.props) == null ? void 0 : ke.style,
|
|
855
|
-
...U.fixed === "left" ? {
|
|
856
|
-
[O ? "right" : "left"]: Be
|
|
857
|
-
} : {},
|
|
858
|
-
width: U.width,
|
|
859
|
-
minWidth: U.width
|
|
860
|
-
}
|
|
861
|
-
});
|
|
862
|
-
}
|
|
863
|
-
return /* @__PURE__ */ a(
|
|
864
|
-
Co,
|
|
865
|
-
{
|
|
866
|
-
prefixCls: s,
|
|
867
|
-
virtualized: S,
|
|
868
|
-
component: d,
|
|
869
|
-
currentSorter: _.find(
|
|
870
|
-
(Ee) => Ee.field === (U.dataIndex || U.key)
|
|
871
|
-
),
|
|
872
|
-
placeholder: B,
|
|
873
|
-
indentSize: T,
|
|
874
|
-
stickyClassName: Ke,
|
|
875
|
-
stickyOffset: Be,
|
|
876
|
-
InnerComponentTd: ge,
|
|
877
|
-
column: U,
|
|
878
|
-
columnIndex: Ce,
|
|
879
|
-
record: P,
|
|
880
|
-
trIndex: E,
|
|
881
|
-
level: H,
|
|
882
|
-
haveTreeData: z,
|
|
883
|
-
recordHaveChildren: me,
|
|
884
|
-
rowKey: $,
|
|
885
|
-
renderExpandIcon: Fe,
|
|
886
|
-
___dangerouslySetInnerHTML___: t.___dangerouslySetInnerHTML___
|
|
887
|
-
},
|
|
888
|
-
Te
|
|
889
|
-
);
|
|
890
|
-
}) });
|
|
891
|
-
}
|
|
892
|
-
const on = Pt(wo), No = Pt(function({
|
|
893
|
-
record: o,
|
|
894
|
-
index: r,
|
|
895
|
-
virtualized: h,
|
|
896
|
-
tbodyProps: e
|
|
897
|
-
}, d) {
|
|
898
|
-
const {
|
|
899
|
-
prefixCls: c,
|
|
900
|
-
columns: l,
|
|
901
|
-
indentSize: s = 16,
|
|
902
|
-
childrenColumnName: C = "children",
|
|
903
|
-
expandProps: y = {},
|
|
904
|
-
rowSelection: m,
|
|
905
|
-
hasFixedColumn: N,
|
|
906
|
-
tableViewWidth: g,
|
|
907
|
-
getRowKey: T,
|
|
908
|
-
expandedRowKeys: _,
|
|
909
|
-
expandedRowRender: S
|
|
910
|
-
} = e;
|
|
911
|
-
let w;
|
|
912
|
-
m && "type" in m ? w = m.type : m && !("type" in m) && (w = "checkbox");
|
|
913
|
-
const p = S && ((E, I) => S(te(E), I)), k = (E) => ie(E[C]) && E[C].length, B = (E, I) => "rowExpandable" in y && typeof y.rowExpandable == "function" ? y.rowExpandable(E) : (p == null ? void 0 : p(E, I)) !== null, G = (E, I) => {
|
|
914
|
-
const D = [], H = {
|
|
915
|
-
...e,
|
|
916
|
-
type: w,
|
|
917
|
-
shouldRowExpand: B
|
|
918
|
-
};
|
|
919
|
-
D.push(
|
|
920
|
-
/* @__PURE__ */ a(
|
|
921
|
-
on,
|
|
922
|
-
{
|
|
923
|
-
ref: d,
|
|
924
|
-
...H,
|
|
925
|
-
record: E,
|
|
926
|
-
level: 0,
|
|
927
|
-
index: I
|
|
928
|
-
},
|
|
929
|
-
T(E)
|
|
930
|
-
)
|
|
931
|
-
);
|
|
932
|
-
const O = (x, A, $ = 0) => {
|
|
933
|
-
ie(x) && x.length && x.forEach((R, F) => {
|
|
934
|
-
_.indexOf(A) !== -1 && (D.push(
|
|
935
|
-
/* @__PURE__ */ ln(
|
|
936
|
-
on,
|
|
937
|
-
{
|
|
938
|
-
...H,
|
|
939
|
-
key: T(R),
|
|
940
|
-
record: R,
|
|
941
|
-
level: $ + 1,
|
|
942
|
-
index: F
|
|
943
|
-
}
|
|
944
|
-
)
|
|
945
|
-
), k(R) && O(R[C], T(R), $ + 1));
|
|
946
|
-
});
|
|
947
|
-
};
|
|
948
|
-
return p || O(E[C], T(E)), D;
|
|
949
|
-
}, ee = T(o), V = B(o, r) && _.indexOf(ee) !== -1, K = h ? "div" : "tr", P = h ? "div" : "td";
|
|
950
|
-
return /* @__PURE__ */ ue(Pe.Fragment, { children: [
|
|
951
|
-
G(o, r),
|
|
952
|
-
V && /* @__PURE__ */ a(
|
|
953
|
-
K,
|
|
954
|
-
{
|
|
955
|
-
className: ne(`${c}-tr`, `${c}-expand-content`),
|
|
956
|
-
children: /* @__PURE__ */ a(
|
|
957
|
-
P,
|
|
958
|
-
{
|
|
959
|
-
className: ne(`${c}-td`),
|
|
960
|
-
style: { paddingLeft: s },
|
|
961
|
-
colSpan: l.length,
|
|
962
|
-
children: N ? /* @__PURE__ */ a(
|
|
963
|
-
"div",
|
|
964
|
-
{
|
|
965
|
-
className: `${c}-expand-fixed-row`,
|
|
966
|
-
style: { width: g },
|
|
967
|
-
children: p == null ? void 0 : p(o, r)
|
|
968
|
-
}
|
|
969
|
-
) : p == null ? void 0 : p(o, r)
|
|
970
|
-
}
|
|
971
|
-
)
|
|
972
|
-
},
|
|
973
|
-
`${ee}-expanded`
|
|
974
|
-
)
|
|
975
|
-
] }, ee);
|
|
976
|
-
});
|
|
977
|
-
function $o(t) {
|
|
978
|
-
const {
|
|
979
|
-
data: o,
|
|
980
|
-
columns: r,
|
|
981
|
-
prefixCls: h,
|
|
982
|
-
component: e,
|
|
983
|
-
noDataElement: d,
|
|
984
|
-
scroll: c,
|
|
985
|
-
tableViewWidth: l,
|
|
986
|
-
virtualized: s,
|
|
987
|
-
virtualListProps: C,
|
|
988
|
-
getRowKey: y,
|
|
989
|
-
saveVirtualListRef: m
|
|
990
|
-
} = t, { ComponentTbody: N } = Me(e);
|
|
991
|
-
let g = {}, T = {};
|
|
992
|
-
c && (c.x && (typeof c.x == "number" || typeof c.x == "string") && (g = {
|
|
993
|
-
width: c.x
|
|
994
|
-
}), c.y && (typeof c.y == "number" || typeof c.y == "string") && (T = {
|
|
995
|
-
maxHeight: c.y
|
|
996
|
-
}));
|
|
997
|
-
const _ = {
|
|
998
|
-
className: `${h}-no-data`
|
|
999
|
-
};
|
|
1000
|
-
l && (_.className = `${h}-no-data ${h}-expand-fixed-row`, _.style = { width: l });
|
|
1001
|
-
const S = /* @__PURE__ */ a("tr", { className: ne(`${h}-tr`, `${h}-empty-row`), children: /* @__PURE__ */ a("td", { className: `${h}-td`, colSpan: r.length, children: /* @__PURE__ */ a("div", { ..._, children: d }) }) }), w = (p, k) => {
|
|
1002
|
-
const B = y(p) || k;
|
|
1003
|
-
return /* @__PURE__ */ a(
|
|
1004
|
-
No,
|
|
1005
|
-
{
|
|
1006
|
-
record: p,
|
|
1007
|
-
index: k,
|
|
1008
|
-
virtualized: s,
|
|
1009
|
-
tbodyProps: t
|
|
1010
|
-
},
|
|
1011
|
-
B
|
|
1012
|
-
);
|
|
1013
|
-
};
|
|
1014
|
-
return s ? o.length > 0 ? /* @__PURE__ */ a(
|
|
1015
|
-
Gn,
|
|
1016
|
-
{
|
|
1017
|
-
data: o,
|
|
1018
|
-
height: T.maxHeight,
|
|
1019
|
-
isStaticItemHeight: !1,
|
|
1020
|
-
outerStyle: { ...g, minWidth: "100%", overflow: "visible" },
|
|
1021
|
-
innerStyle: { right: "auto", minWidth: "100%" },
|
|
1022
|
-
className: `${h}-body`,
|
|
1023
|
-
ref: (p) => m(p),
|
|
1024
|
-
itemKey: y,
|
|
1025
|
-
...C,
|
|
1026
|
-
children: w
|
|
1027
|
-
}
|
|
1028
|
-
) : /* @__PURE__ */ a("div", { className: `${h}-body`, children: /* @__PURE__ */ a("table", { children: /* @__PURE__ */ a("tbody", { children: S }) }) }) : /* @__PURE__ */ a(N, { children: o.length > 0 ? o.map(w) : S });
|
|
1029
|
-
}
|
|
1030
|
-
const an = Wn({});
|
|
1031
|
-
function bo(t) {
|
|
1032
|
-
const { summary: o, data: r, prefixCls: h, columns: e, stickyOffsets: d, stickyClassNames: c } = t;
|
|
1033
|
-
return /* @__PURE__ */ a("tfoot", { className: `${h}-tfoot`, children: /* @__PURE__ */ a(
|
|
1034
|
-
an.Provider,
|
|
1035
|
-
{
|
|
1036
|
-
value: { columns: e, stickyOffsets: d, stickyClassNames: c, prefixCls: h },
|
|
1037
|
-
children: o(te(r))
|
|
1038
|
-
}
|
|
1039
|
-
) });
|
|
1040
|
-
}
|
|
1041
|
-
function So(t, o) {
|
|
1042
|
-
return t === "ascend" ? o.Table.sortAscend : t === "descend" ? o.Table.sortDescend : o.Table.cancelSort;
|
|
1043
|
-
}
|
|
1044
|
-
const Ro = { bottom: 0 };
|
|
1045
|
-
function To({
|
|
1046
|
-
onSort: t,
|
|
1047
|
-
onFilter: o,
|
|
1048
|
-
onHandleFilter: r,
|
|
1049
|
-
onHandleFilterReset: h,
|
|
1050
|
-
currentFilters: e = {},
|
|
1051
|
-
currentSorter: d,
|
|
1052
|
-
_key: c,
|
|
1053
|
-
dataIndex: l,
|
|
1054
|
-
title: s,
|
|
1055
|
-
sorter: C,
|
|
1056
|
-
sortDirections: y = ["ascend", "descend"],
|
|
1057
|
-
filters: m = [],
|
|
1058
|
-
columnFixedStyle: N,
|
|
1059
|
-
className: g,
|
|
1060
|
-
cellStyle: T,
|
|
1061
|
-
headerCellStyle: _,
|
|
1062
|
-
rowSpan: S,
|
|
1063
|
-
colSpan: w,
|
|
1064
|
-
headerCellProps: p,
|
|
1065
|
-
prefixCls: k,
|
|
1066
|
-
align: B = "left",
|
|
1067
|
-
component: G,
|
|
1068
|
-
filterIcon: ee,
|
|
1069
|
-
filterDropdown: V,
|
|
1070
|
-
filterMultiple: K = !0,
|
|
1071
|
-
ellipsis: P,
|
|
1072
|
-
filterDropdownProps: E,
|
|
1073
|
-
onFilterDropdownVisibleChange: I,
|
|
1074
|
-
column: D,
|
|
1075
|
-
showSorterTooltip: H,
|
|
1076
|
-
index: O
|
|
1077
|
-
}) {
|
|
1078
|
-
const { locale: x, rtl: A } = We(Xe), $ = c || l || O, [R, F, f] = oo([], {
|
|
1079
|
-
value: e[$] || []
|
|
1080
|
-
}), [v, Y] = we(!1), [W, J] = we(!1), oe = C && ie(y) && y.length, le = oe ? fe() : void 0;
|
|
1081
|
-
nt(() => {
|
|
1082
|
-
F(e[$] || []);
|
|
1083
|
-
}, [e, $]), nt(() => {
|
|
1084
|
-
R && R !== f && F(R);
|
|
1085
|
-
}, [v]);
|
|
1086
|
-
function fe() {
|
|
1087
|
-
const M = d && d.direction;
|
|
1088
|
-
if (!M || d && d.field !== $)
|
|
1089
|
-
return y[0];
|
|
1090
|
-
const ae = y.indexOf(M);
|
|
1091
|
-
if (ae < y.length)
|
|
1092
|
-
return y[ae + 1];
|
|
1093
|
-
}
|
|
1094
|
-
function he() {
|
|
1095
|
-
R && (r == null || r(
|
|
1096
|
-
{ onFilter: o, filters: m, dataIndex: $ },
|
|
1097
|
-
f
|
|
1098
|
-
), me(!1));
|
|
1099
|
-
}
|
|
1100
|
-
function pe() {
|
|
1101
|
-
h({ dataIndex: $ }), me(!1);
|
|
1102
|
-
}
|
|
1103
|
-
function me(M) {
|
|
1104
|
-
Y(M), I == null || I(M);
|
|
1105
|
-
}
|
|
1106
|
-
function z(M, ae) {
|
|
1107
|
-
let Z = [...f];
|
|
1108
|
-
if (K)
|
|
1109
|
-
ae ? Z = Z.concat(M) : Z.splice(
|
|
1110
|
-
Z.findIndex((se) => se === M),
|
|
1111
|
-
1
|
|
1112
|
-
);
|
|
1113
|
-
else if (Z.length > 0)
|
|
1114
|
-
if (Z[0] !== M)
|
|
1115
|
-
Z = [M];
|
|
1116
|
-
else
|
|
1117
|
-
return;
|
|
1118
|
-
else
|
|
1119
|
-
Z = [M];
|
|
1120
|
-
F(Z);
|
|
1121
|
-
}
|
|
1122
|
-
function be(M) {
|
|
1123
|
-
F(M || f), Y(!1), r == null || r(
|
|
1124
|
-
{ filters: m, onFilter: o, dataIndex: $ },
|
|
1125
|
-
M || f
|
|
1126
|
-
);
|
|
1127
|
-
}
|
|
1128
|
-
function Ne() {
|
|
1129
|
-
return typeof V == "function" ? V({
|
|
1130
|
-
filterKeys: f,
|
|
1131
|
-
setFilterKeys: (M, ae) => {
|
|
1132
|
-
F(M), ae == null || ae();
|
|
1133
|
-
},
|
|
1134
|
-
confirm: be
|
|
1135
|
-
}) : /* @__PURE__ */ ue("div", { className: `${k}-filters-popup`, children: [
|
|
1136
|
-
/* @__PURE__ */ a("div", { className: `${k}-filters-list`, children: m.map((M) => {
|
|
1137
|
-
const ae = f.findIndex((Z) => Z === M.value) !== -1;
|
|
1138
|
-
return /* @__PURE__ */ a("div", { className: `${k}-filters-item`, children: K ? /* @__PURE__ */ a(
|
|
1139
|
-
It,
|
|
1140
|
-
{
|
|
1141
|
-
checked: ae,
|
|
1142
|
-
onChange: (Z) => z(M.value, Z),
|
|
1143
|
-
children: M.text
|
|
1144
|
-
}
|
|
1145
|
-
) : /* @__PURE__ */ a(
|
|
1146
|
-
rn,
|
|
1147
|
-
{
|
|
1148
|
-
checked: ae,
|
|
1149
|
-
onChange: (Z) => z(M.value, Z),
|
|
1150
|
-
children: M.text
|
|
1151
|
-
}
|
|
1152
|
-
) }, M.value);
|
|
1153
|
-
}) }),
|
|
1154
|
-
/* @__PURE__ */ ue(Ln, { className: `${k}-filters-btn`, children: [
|
|
1155
|
-
/* @__PURE__ */ a(Zt, { onClick: pe, size: "mini", children: x.Table.resetText }),
|
|
1156
|
-
/* @__PURE__ */ a(Zt, { onClick: he, type: "primary", size: "mini", children: x.Table.okText })
|
|
1157
|
-
] })
|
|
1158
|
-
] });
|
|
1159
|
-
}
|
|
1160
|
-
const re = (M) => ne(`${k}-sorter-icon`, {
|
|
1161
|
-
[`${k}-sorter-icon-active`]: d && d.direction === M && d.field === $
|
|
1162
|
-
}), ce = ne(`${k}-filters`, {
|
|
1163
|
-
[`${k}-filters-open`]: v,
|
|
1164
|
-
[`${k}-filters-active`]: R && R.length
|
|
1165
|
-
});
|
|
1166
|
-
let X = {
|
|
1167
|
-
...N
|
|
1168
|
-
};
|
|
1169
|
-
q(T) && (X = {
|
|
1170
|
-
...X,
|
|
1171
|
-
...T
|
|
1172
|
-
}), q(_) && (X = {
|
|
1173
|
-
...X,
|
|
1174
|
-
..._
|
|
1175
|
-
}), kt(_) && (X = {
|
|
1176
|
-
...X,
|
|
1177
|
-
..._()
|
|
1178
|
-
}), B && B !== "left" && (X.textAlign = B);
|
|
1179
|
-
const ye = {
|
|
1180
|
-
style: X,
|
|
1181
|
-
key: c || $
|
|
1182
|
-
};
|
|
1183
|
-
w && w > 1 && (ye.colSpan = w), S && S > 1 && (ye.rowSpan = S);
|
|
1184
|
-
const { ComponentTh: Re, ComponentHeaderCell: ge } = Me(G), _e = ie(m) && m.length > 0 || typeof V == "function", Ae = P && typeof s == "string" ? { title: s } : {}, Fe = E && E.triggerProps, Oe = /* @__PURE__ */ ue(yt, { children: [
|
|
1185
|
-
oe ? /* @__PURE__ */ a(
|
|
1186
|
-
sn,
|
|
1187
|
-
{
|
|
1188
|
-
content: So(le, x),
|
|
1189
|
-
disabled: !H,
|
|
1190
|
-
...q(H) ? H : {},
|
|
1191
|
-
children: /* @__PURE__ */ ue(
|
|
1192
|
-
"div",
|
|
1193
|
-
{
|
|
1194
|
-
className: `${k}-cell-with-sorter`,
|
|
1195
|
-
onMouseEnter: () => {
|
|
1196
|
-
J(!0);
|
|
1197
|
-
},
|
|
1198
|
-
onMouseLeave: () => {
|
|
1199
|
-
J(!1);
|
|
1200
|
-
},
|
|
1201
|
-
onClick: () => t(le, $),
|
|
1202
|
-
children: [
|
|
1203
|
-
/* @__PURE__ */ a("span", { className: `${k}-th-item-title`, ...Ae, children: s }),
|
|
1204
|
-
oe && /* @__PURE__ */ ue(
|
|
1205
|
-
"div",
|
|
1206
|
-
{
|
|
1207
|
-
className: ne(`${k}-sorter`, {
|
|
1208
|
-
[`${k}-sorter-direction-one`]: y.length === 1
|
|
1209
|
-
}),
|
|
1210
|
-
children: [
|
|
1211
|
-
y.indexOf("ascend") !== -1 && /* @__PURE__ */ a("div", { className: re("ascend"), children: /* @__PURE__ */ a(to, {}) }),
|
|
1212
|
-
y.indexOf("descend") !== -1 && /* @__PURE__ */ a("div", { className: re("descend"), children: /* @__PURE__ */ a(eo, {}) })
|
|
1213
|
-
]
|
|
1214
|
-
}
|
|
1215
|
-
)
|
|
1216
|
-
]
|
|
1217
|
-
}
|
|
1218
|
-
)
|
|
1219
|
-
}
|
|
1220
|
-
) : /* @__PURE__ */ a("span", { className: `${k}-th-item-title`, ...Ae, children: s }),
|
|
1221
|
-
_e && /* @__PURE__ */ a(
|
|
1222
|
-
Fn,
|
|
1223
|
-
{
|
|
1224
|
-
popup: Ne,
|
|
1225
|
-
trigger: "click",
|
|
1226
|
-
classNames: "slideDynamicOrigin",
|
|
1227
|
-
position: A ? "bl" : "br",
|
|
1228
|
-
popupAlign: Ro,
|
|
1229
|
-
popupVisible: v,
|
|
1230
|
-
onVisibleChange: me,
|
|
1231
|
-
...Fe,
|
|
1232
|
-
children: /* @__PURE__ */ a("div", { className: ce, children: ee || /* @__PURE__ */ a(no, {}) })
|
|
1233
|
-
}
|
|
1234
|
-
)
|
|
1235
|
-
] }), Se = ne(`${k}-th-item`, {
|
|
1236
|
-
[`${k}-cell-text-ellipsis`]: P,
|
|
1237
|
-
[`${k}-cell-mouseenter`]: W,
|
|
1238
|
-
[`${k}-cell-next-${le}`]: W && le,
|
|
1239
|
-
[`${k}-col-has-sorter`]: oe,
|
|
1240
|
-
[`${k}-col-has-filter`]: _e
|
|
1241
|
-
});
|
|
1242
|
-
return w !== 0 && /* @__PURE__ */ a(
|
|
1243
|
-
Re,
|
|
1244
|
-
{
|
|
1245
|
-
className: ne(
|
|
1246
|
-
`${k}-th`,
|
|
1247
|
-
{
|
|
1248
|
-
[`${k}-col-sorted`]: d && d.direction && d.field === $
|
|
1249
|
-
},
|
|
1250
|
-
g
|
|
1251
|
-
),
|
|
1252
|
-
...ye,
|
|
1253
|
-
...p,
|
|
1254
|
-
children: Ye(ge) ? /* @__PURE__ */ a(ge, { className: Se, children: Oe }) : /* @__PURE__ */ a(
|
|
1255
|
-
ge,
|
|
1256
|
-
{
|
|
1257
|
-
className: Se,
|
|
1258
|
-
column: D,
|
|
1259
|
-
children: Oe
|
|
1260
|
-
}
|
|
1261
|
-
)
|
|
1262
|
-
}
|
|
1263
|
-
);
|
|
1264
|
-
}
|
|
1265
|
-
function ko(t) {
|
|
1266
|
-
const {
|
|
1267
|
-
activeSorters: o,
|
|
1268
|
-
expandedRowRender: r,
|
|
1269
|
-
expandProps: h = {},
|
|
1270
|
-
onSort: e,
|
|
1271
|
-
onHandleFilter: d,
|
|
1272
|
-
onHandleFilterReset: c,
|
|
1273
|
-
onHeaderRow: l,
|
|
1274
|
-
prefixCls: s,
|
|
1275
|
-
currentFilters: C,
|
|
1276
|
-
component: y,
|
|
1277
|
-
data: m,
|
|
1278
|
-
selectedRowKeys: N,
|
|
1279
|
-
rowSelection: g,
|
|
1280
|
-
allSelectedRowKeys: T = [],
|
|
1281
|
-
groupColumns: _,
|
|
1282
|
-
stickyOffsets: S,
|
|
1283
|
-
groupStickyClassNames: w,
|
|
1284
|
-
showSorterTooltip: p
|
|
1285
|
-
} = t, { rtl: k } = We(Xe), { ComponentThead: B, ComponentHeaderRow: G, getHeaderComponentOperations: ee } = Me(y), V = g && (g.type === "checkbox" || !("type" in g)), K = g && "checkAll" in g ? g.checkAll : !0, P = g && g.type === "radio", { columnTitle: E } = h, I = de(() => {
|
|
1286
|
-
const O = new Set(T);
|
|
1287
|
-
return N.filter((x) => O.has(x));
|
|
1288
|
-
}, [N, T]), D = _.length > 1 ? { rowSpan: _.length } : {}, H = ne(`${s}-th`, `${s}-operation`);
|
|
1289
|
-
return /* @__PURE__ */ a(B, { children: _.map((O, x) => {
|
|
1290
|
-
const A = l == null ? void 0 : l(O, x), $ = (V || P) && x === 0 && /* @__PURE__ */ a(
|
|
1291
|
-
"th",
|
|
1292
|
-
{
|
|
1293
|
-
className: ne(
|
|
1294
|
-
H,
|
|
1295
|
-
`${s}-${P ? "radio" : "checkbox"}`
|
|
1296
|
-
),
|
|
1297
|
-
children: /* @__PURE__ */ ue("div", { className: `${s}-th-item`, children: [
|
|
1298
|
-
K && !P ? /* @__PURE__ */ a(
|
|
1299
|
-
It,
|
|
1300
|
-
{
|
|
1301
|
-
indeterminate: m && I.length > 0 && I.length !== T.length,
|
|
1302
|
-
checked: m && I.length !== 0 && I.length === T.length,
|
|
1303
|
-
disabled: !T.length,
|
|
1304
|
-
onChange: t.onCheckAll
|
|
1305
|
-
}
|
|
1306
|
-
) : null,
|
|
1307
|
-
g && g.columnTitle
|
|
1308
|
-
] })
|
|
1309
|
-
}
|
|
1310
|
-
), R = r && /* @__PURE__ */ a("th", { className: ne(H, `${s}-expand`), children: E && /* @__PURE__ */ a("div", { className: `${s}-th-item`, children: E }) }), F = w[x], f = ee({
|
|
1311
|
-
selectionNode: $,
|
|
1312
|
-
expandNode: R
|
|
1313
|
-
});
|
|
1314
|
-
return /* @__PURE__ */ ln(
|
|
1315
|
-
G,
|
|
1316
|
-
{
|
|
1317
|
-
...A,
|
|
1318
|
-
key: x,
|
|
1319
|
-
className: `${s}-tr`
|
|
1320
|
-
},
|
|
1321
|
-
O.map((v, Y) => {
|
|
1322
|
-
var pe, me, z, be, Ne;
|
|
1323
|
-
const W = v.$$columnIndex;
|
|
1324
|
-
let J = 0;
|
|
1325
|
-
Array.isArray(W) && W.length === 2 ? J = v.fixed === "right" ? S[W[1]] : S[W[0]] : typeof W == "number" && (J = S[W] || 0);
|
|
1326
|
-
const oe = F[Y];
|
|
1327
|
-
if (v.$$isOperation) {
|
|
1328
|
-
let re = v.node, ce = !0;
|
|
1329
|
-
v.title === qe && (re = (pe = f.find(
|
|
1330
|
-
(ye) => ye.name === "selectionNode"
|
|
1331
|
-
)) == null ? void 0 : pe.node, ce = !1), v.title === Ge && (re = (me = f.find(
|
|
1332
|
-
(ye) => ye.name === "expandNode"
|
|
1333
|
-
)) == null ? void 0 : me.node, ce = !1);
|
|
1334
|
-
const X = re;
|
|
1335
|
-
return Pe.cloneElement(X, {
|
|
1336
|
-
key: v.key || Y,
|
|
1337
|
-
...X.props,
|
|
1338
|
-
...D,
|
|
1339
|
-
className: ne(
|
|
1340
|
-
ce ? H : "",
|
|
1341
|
-
(z = X == null ? void 0 : X.props) == null ? void 0 : z.className,
|
|
1342
|
-
oe
|
|
1343
|
-
),
|
|
1344
|
-
style: {
|
|
1345
|
-
...(be = X == null ? void 0 : X.props) == null ? void 0 : be.style,
|
|
1346
|
-
...v.fixed === "left" ? {
|
|
1347
|
-
[k ? "right" : "left"]: J
|
|
1348
|
-
} : {},
|
|
1349
|
-
width: v.width,
|
|
1350
|
-
minWidth: v.width
|
|
1351
|
-
}
|
|
1352
|
-
});
|
|
1353
|
-
}
|
|
1354
|
-
const le = (Ne = v == null ? void 0 : v.onHeaderCell) == null ? void 0 : Ne.call(v, v, Y), fe = ne(oe, v.className), he = {};
|
|
1355
|
-
return v.fixed === "left" && (he[k ? "right" : "left"] = J), v.fixed === "right" && (he[k ? "left" : "right"] = J), /* @__PURE__ */ a(
|
|
1356
|
-
To,
|
|
1357
|
-
{
|
|
1358
|
-
index: Y,
|
|
1359
|
-
onSort: e,
|
|
1360
|
-
onHandleFilter: d,
|
|
1361
|
-
onHandleFilterReset: c,
|
|
1362
|
-
currentSorter: o.find(
|
|
1363
|
-
(re) => re.field === (v.dataIndex || v.key)
|
|
1364
|
-
),
|
|
1365
|
-
currentFilters: C,
|
|
1366
|
-
_key: v.key || v.dataIndex || Y,
|
|
1367
|
-
...v,
|
|
1368
|
-
column: v,
|
|
1369
|
-
headerCellProps: le,
|
|
1370
|
-
prefixCls: s,
|
|
1371
|
-
component: y,
|
|
1372
|
-
className: fe,
|
|
1373
|
-
columnFixedStyle: he,
|
|
1374
|
-
showSorterTooltip: p
|
|
1375
|
-
},
|
|
1376
|
-
v.key
|
|
1377
|
-
);
|
|
1378
|
-
})
|
|
1379
|
-
);
|
|
1380
|
-
}) });
|
|
1381
|
-
}
|
|
1382
|
-
const vo = [], _o = [], Eo = {
|
|
1383
|
-
showHeader: !0,
|
|
1384
|
-
border: !0,
|
|
1385
|
-
hover: !0,
|
|
1386
|
-
rowKey: "key",
|
|
1387
|
-
pagePosition: "br",
|
|
1388
|
-
childrenColumnName: "children",
|
|
1389
|
-
indentSize: 15,
|
|
1390
|
-
showSorterTooltip: !0
|
|
1391
|
-
};
|
|
1392
|
-
function Io(t, o) {
|
|
1393
|
-
var Gt, Xt;
|
|
1394
|
-
const {
|
|
1395
|
-
getPrefixCls: r,
|
|
1396
|
-
loadingElement: h,
|
|
1397
|
-
size: e,
|
|
1398
|
-
tablePagination: d,
|
|
1399
|
-
renderEmpty: c,
|
|
1400
|
-
componentConfig: l,
|
|
1401
|
-
rtl: s
|
|
1402
|
-
} = We(Xe), C = Jt(
|
|
1403
|
-
t,
|
|
1404
|
-
Eo,
|
|
1405
|
-
l == null ? void 0 : l.Table
|
|
1406
|
-
), y = Jt(
|
|
1407
|
-
q(t == null ? void 0 : t.pagination) ? t == null ? void 0 : t.pagination : {},
|
|
1408
|
-
q((Gt = l == null ? void 0 : l.Table) == null ? void 0 : Gt.pagination) ? (Xt = l == null ? void 0 : l.Table) == null ? void 0 : Xt.pagination : {},
|
|
1409
|
-
d || {}
|
|
1410
|
-
), {
|
|
1411
|
-
style: m,
|
|
1412
|
-
className: N,
|
|
1413
|
-
component: g,
|
|
1414
|
-
border: T,
|
|
1415
|
-
borderCell: _,
|
|
1416
|
-
columns: S = _o,
|
|
1417
|
-
data: w = vo,
|
|
1418
|
-
scroll: p,
|
|
1419
|
-
noDataElement: k,
|
|
1420
|
-
showHeader: B,
|
|
1421
|
-
stripe: G,
|
|
1422
|
-
hover: ee,
|
|
1423
|
-
pagination: V,
|
|
1424
|
-
onChange: K,
|
|
1425
|
-
pagePosition: P,
|
|
1426
|
-
childrenColumnName: E,
|
|
1427
|
-
indentSize: I,
|
|
1428
|
-
rowSelection: D,
|
|
1429
|
-
tableLayoutFixed: H,
|
|
1430
|
-
footer: O,
|
|
1431
|
-
virtualized: x,
|
|
1432
|
-
renderPagination: A,
|
|
1433
|
-
summary: $,
|
|
1434
|
-
rowKey: R
|
|
1435
|
-
} = C, F = de(
|
|
1436
|
-
() => co(w, E),
|
|
1437
|
-
[w, E]
|
|
1438
|
-
), f = r("table"), v = C.size || (["default", "middle", "small"].indexOf(e) > -1 ? e : "default"), Y = xe(null), W = xe(null), J = xe(null), oe = xe(null), le = xe(null), fe = xe(null), he = xe(0), pe = xe(!1), [me, z] = so(C), { currentFilters: be, defaultSorters: Ne } = ot(), [re, ce] = we(1), [X, ye] = we(
|
|
1439
|
-
y.pageSize || y.defaultPageSize || 10
|
|
1440
|
-
), [Re, ge] = we(be), [_e, Ae] = we(0), [Fe, Oe] = we([]), Se = yo(z), [M, ae] = mo(
|
|
1441
|
-
me,
|
|
1442
|
-
z,
|
|
1443
|
-
f
|
|
1444
|
-
), {
|
|
1445
|
-
currentSorter: Z,
|
|
1446
|
-
activeSorters: se,
|
|
1447
|
-
getNextActiveSorters: U,
|
|
1448
|
-
updateStateSorters: Ce
|
|
1449
|
-
} = ho(z, Ne), { ComponentTable: Te, ComponentBodyWrapper: Be, ComponentHeaderWrapper: Ke } = Me(g), Le = de(() => typeof R == "function" ? (n) => R(te(n)) : (n) => n[R], [R]);
|
|
1450
|
-
function ot() {
|
|
1451
|
-
const n = {};
|
|
1452
|
-
let i = [];
|
|
1453
|
-
return z.forEach((u) => {
|
|
1454
|
-
const b = u.dataIndex || u.key;
|
|
1455
|
-
if (u.defaultFilters && (n[b] = u.defaultFilters), u.filteredValue && (n[b] = u.filteredValue), "defaultSortOrder" in u || "sortOrder" in u) {
|
|
1456
|
-
const L = Et(u.sorter), Q = "sortOrder" in u ? u.sortOrder : u.defaultSortOrder, j = {
|
|
1457
|
-
field: b,
|
|
1458
|
-
direction: Q,
|
|
1459
|
-
sorterFn: _t(u.sorter),
|
|
1460
|
-
priority: L
|
|
1461
|
-
};
|
|
1462
|
-
Q ? He(L) ? i.every(
|
|
1463
|
-
($e) => He($e.priority) || !$e.direction
|
|
1464
|
-
) && i.push(j) : i.every(($e) => !$e.direction) ? i.push(j) : i = [j] : i.push(j);
|
|
1465
|
-
}
|
|
1466
|
-
}), { currentFilters: n, defaultSorters: i };
|
|
1467
|
-
}
|
|
1468
|
-
const De = de(() => {
|
|
1469
|
-
const n = z.filter(
|
|
1470
|
-
(u) => "filteredValue" in u
|
|
1471
|
-
), i = {};
|
|
1472
|
-
return n.length && n.forEach((u, b) => {
|
|
1473
|
-
const L = u.key || u.dataIndex || b;
|
|
1474
|
-
L !== void 0 && (i[L] = u.filteredValue);
|
|
1475
|
-
}), i;
|
|
1476
|
-
}, [z]), ke = de(() => Object.keys(De).length ? De : Re, [Re, De]);
|
|
1477
|
-
function Ee(n, i) {
|
|
1478
|
-
const u = Ht(i);
|
|
1479
|
-
if (!u)
|
|
1480
|
-
return;
|
|
1481
|
-
const b = {
|
|
1482
|
-
direction: n,
|
|
1483
|
-
field: i,
|
|
1484
|
-
sorterFn: _t(u.sorter),
|
|
1485
|
-
priority: Et(u.sorter)
|
|
1486
|
-
}, L = U(b);
|
|
1487
|
-
Ce(b, L);
|
|
1488
|
-
const Q = lt(
|
|
1489
|
-
b,
|
|
1490
|
-
L,
|
|
1491
|
-
ke
|
|
1492
|
-
), j = Ze(Q);
|
|
1493
|
-
K == null || K(Ve(Q), b, ke, {
|
|
1494
|
-
currentData: te(j),
|
|
1495
|
-
currentAllData: te(Q),
|
|
1496
|
-
action: "sort"
|
|
1497
|
-
});
|
|
1498
|
-
}
|
|
1499
|
-
function Qe(n) {
|
|
1500
|
-
const i = function(b, L) {
|
|
1501
|
-
return (Q, j) => {
|
|
1502
|
-
const $e = b(Q, j);
|
|
1503
|
-
return L === "descend" ? -$e : $e;
|
|
1504
|
-
};
|
|
1505
|
-
}, u = [...n];
|
|
1506
|
-
return u.sort((b, L) => L.priority - b.priority), (b, L) => {
|
|
1507
|
-
for (let Q = 0, j = u.length; Q < j; Q++) {
|
|
1508
|
-
const { sorterFn: $e, direction: bt } = u[Q];
|
|
1509
|
-
if (typeof $e != "function")
|
|
1510
|
-
continue;
|
|
1511
|
-
const pt = i($e, bt)(b, L);
|
|
1512
|
-
if (pt !== 0)
|
|
1513
|
-
return pt;
|
|
1514
|
-
}
|
|
1515
|
-
return 0;
|
|
1516
|
-
};
|
|
1517
|
-
}
|
|
1518
|
-
function ve(n, i) {
|
|
1519
|
-
const u = {
|
|
1520
|
-
...ke,
|
|
1521
|
-
[n.dataIndex]: i
|
|
1522
|
-
}, b = {
|
|
1523
|
-
...u,
|
|
1524
|
-
...De
|
|
1525
|
-
};
|
|
1526
|
-
if (ie(i) && i.length) {
|
|
1527
|
-
ge(b);
|
|
1528
|
-
const L = lt(
|
|
1529
|
-
Z,
|
|
1530
|
-
se,
|
|
1531
|
-
u
|
|
1532
|
-
), Q = Ze(L);
|
|
1533
|
-
K == null || K(
|
|
1534
|
-
Ve(L),
|
|
1535
|
-
se.length === 1 ? se[0] : se,
|
|
1536
|
-
u,
|
|
1537
|
-
{
|
|
1538
|
-
currentData: te(Q),
|
|
1539
|
-
currentAllData: te(L),
|
|
1540
|
-
action: "filter"
|
|
1541
|
-
}
|
|
1542
|
-
);
|
|
1543
|
-
} else
|
|
1544
|
-
ie(i) && !i.length && ze(n);
|
|
1545
|
-
}
|
|
1546
|
-
function ze({ dataIndex: n }) {
|
|
1547
|
-
const i = {
|
|
1548
|
-
...ke
|
|
1549
|
-
};
|
|
1550
|
-
delete i[n], ge(i);
|
|
1551
|
-
const u = lt(
|
|
1552
|
-
Z,
|
|
1553
|
-
se,
|
|
1554
|
-
i
|
|
1555
|
-
), b = Ze(u);
|
|
1556
|
-
K == null || K(
|
|
1557
|
-
Ve(u),
|
|
1558
|
-
se.length === 1 ? se[0] : se,
|
|
1559
|
-
i,
|
|
1560
|
-
{
|
|
1561
|
-
currentData: te(b),
|
|
1562
|
-
currentAllData: te(u),
|
|
1563
|
-
action: "filter"
|
|
1564
|
-
}
|
|
1565
|
-
);
|
|
1566
|
-
}
|
|
1567
|
-
const rt = !!z.find((n) => n.fixed === "left"), st = !!z.find((n) => n.fixed === "right"), it = rt || st;
|
|
1568
|
-
function lt(n, i, u) {
|
|
1569
|
-
let b = (F || []).slice();
|
|
1570
|
-
Object.keys(u).forEach((Q) => {
|
|
1571
|
-
if (u[Q] && u[Q].length) {
|
|
1572
|
-
const j = Ht(Q);
|
|
1573
|
-
j && typeof j.onFilter == "function" && (b = b.filter(($e) => u[Q].reduce(
|
|
1574
|
-
(bt, pt) => bt || j.onFilter(pt, $e),
|
|
1575
|
-
!1
|
|
1576
|
-
)));
|
|
1577
|
-
}
|
|
1578
|
-
});
|
|
1579
|
-
const L = (Q) => Q.slice().sort(Qe(i)).map((j) => ie(j[E]) ? {
|
|
1580
|
-
...j,
|
|
1581
|
-
[E]: L(j[E])
|
|
1582
|
-
} : j);
|
|
1583
|
-
return n.direction && typeof n.sorterFn == "function" || i.length ? L(b) : b;
|
|
1584
|
-
}
|
|
1585
|
-
const Ue = lt(
|
|
1586
|
-
Z,
|
|
1587
|
-
se,
|
|
1588
|
-
ke
|
|
1589
|
-
);
|
|
1590
|
-
function Ve(n = Ue) {
|
|
1591
|
-
const i = y.pageSize || X || 10, u = v === "middle" ? "default" : v;
|
|
1592
|
-
let b = "top";
|
|
1593
|
-
P === "tl" || P === "bl" ? b = "bottom" : b = "top";
|
|
1594
|
-
const L = ie(n) ? n.length : 0, Q = Math.ceil(L / i) < re ? 1 : re;
|
|
1595
|
-
Q !== re && ce(Q);
|
|
1596
|
-
let j = {
|
|
1597
|
-
size: u,
|
|
1598
|
-
total: L,
|
|
1599
|
-
pageSize: i,
|
|
1600
|
-
current: Q,
|
|
1601
|
-
selectProps: {
|
|
1602
|
-
triggerProps: {
|
|
1603
|
-
position: b
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
};
|
|
1607
|
-
return typeof V == "object" && V.selectProps && (j.selectProps = {
|
|
1608
|
-
...j.selectProps,
|
|
1609
|
-
...V.selectProps
|
|
1610
|
-
}), q(V) && (j = {
|
|
1611
|
-
...j,
|
|
1612
|
-
...V
|
|
1613
|
-
}), q(y) && (j = {
|
|
1614
|
-
...j,
|
|
1615
|
-
...y
|
|
1616
|
-
}), j.onChange = Nn, j;
|
|
1617
|
-
}
|
|
1618
|
-
const ct = Ve(), Je = Ze();
|
|
1619
|
-
function Ze(n = Ue, i = ct) {
|
|
1620
|
-
const { current: u = 0, pageSize: b = 10 } = i;
|
|
1621
|
-
return V === !1 || q(V) && w.length <= b ? n : n.slice((u - 1) * b, u * b);
|
|
1622
|
-
}
|
|
1623
|
-
const Lt = Dn(Bt, 100), Ie = !!(p && p.y), et = $ == null ? void 0 : $(te(Ue)), gt = $ && Pe.isValidElement(et) && et.props.fixed, pn = Ie && gt;
|
|
1624
|
-
zn(() => {
|
|
1625
|
-
Bt(), ut(window, "resize", Lt);
|
|
1626
|
-
const n = Y.current, i = W.current, u = J.current;
|
|
1627
|
-
i && ut(i, "scroll", je);
|
|
1628
|
-
const b = n && n.parentNode;
|
|
1629
|
-
return n && b && ut(b, "scroll", je), u && ut(u, "scroll", je), () => {
|
|
1630
|
-
ht(window, "resize", Lt), i && ht(i, "scroll", je), b && ht(b, "scroll", je), u && ht(u, "scroll", je);
|
|
1631
|
-
};
|
|
1632
|
-
}, [
|
|
1633
|
-
rt,
|
|
1634
|
-
st,
|
|
1635
|
-
p == null ? void 0 : p.x,
|
|
1636
|
-
p == null ? void 0 : p.y,
|
|
1637
|
-
z.length,
|
|
1638
|
-
w
|
|
1639
|
-
]), Tt(() => {
|
|
1640
|
-
const { total: n, pageSize: i } = Ve(w);
|
|
1641
|
-
Math.ceil(n / i) < re && ce(1);
|
|
1642
|
-
}, [w == null ? void 0 : w.length]), Tt(() => {
|
|
1643
|
-
at();
|
|
1644
|
-
}, [w, rt, st, s]), Mn(o, () => ({
|
|
1645
|
-
getRootDomElement: Ot,
|
|
1646
|
-
scrollIntoView: (n) => {
|
|
1647
|
-
le.current && le.current.scrollTo({ key: n });
|
|
1648
|
-
}
|
|
1649
|
-
}));
|
|
1650
|
-
function Ot() {
|
|
1651
|
-
return oe.current;
|
|
1652
|
-
}
|
|
1653
|
-
function Bt() {
|
|
1654
|
-
var i, u;
|
|
1655
|
-
at();
|
|
1656
|
-
const n = Ot();
|
|
1657
|
-
if (n && (it || p && p.x)) {
|
|
1658
|
-
const b = n.querySelector(`.${f}-body`) || n.querySelector(`.${f}-content-inner`), L = (u = (i = b == null ? void 0 : b.getBoundingClientRect) == null ? void 0 : i.call(b)) == null ? void 0 : u.width;
|
|
1659
|
-
Ae(L);
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
const un = tt(
|
|
1663
|
-
Hn(() => {
|
|
1664
|
-
const n = oe.current, i = Ie ? W.current : fe.current && fe.current.parentNode;
|
|
1665
|
-
if (i) {
|
|
1666
|
-
const u = s ? -i.scrollLeft : i.scrollLeft, b = u === 0, L = u + 1 >= i.children[0].getBoundingClientRect().width - i.getBoundingClientRect().width;
|
|
1667
|
-
b && L ? dt(
|
|
1668
|
-
n.classList,
|
|
1669
|
-
`${f}-scroll-position-both`
|
|
1670
|
-
) : b ? dt(
|
|
1671
|
-
n.classList,
|
|
1672
|
-
`${f}-scroll-position-${s ? "right" : "left"}`
|
|
1673
|
-
) : L ? dt(
|
|
1674
|
-
n.classList,
|
|
1675
|
-
`${f}-scroll-position-${s ? "left" : "right"}`
|
|
1676
|
-
) : dt(
|
|
1677
|
-
n.classList,
|
|
1678
|
-
`${f}-scroll-position-middle`
|
|
1679
|
-
);
|
|
1680
|
-
} else
|
|
1681
|
-
n && Dt(n.classList);
|
|
1682
|
-
}, 100),
|
|
1683
|
-
[oe.current, W.current, Ie, s]
|
|
1684
|
-
);
|
|
1685
|
-
function at() {
|
|
1686
|
-
if (it || p && q(p) && p.x) {
|
|
1687
|
-
const n = oe.current;
|
|
1688
|
-
n && (rt && Kt(
|
|
1689
|
-
n.classList,
|
|
1690
|
-
`${f}-has-fixed-col-left`
|
|
1691
|
-
), st && Kt(
|
|
1692
|
-
n.classList,
|
|
1693
|
-
`${f}-has-fixed-col-right`
|
|
1694
|
-
)), un();
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
function Kt(n, i) {
|
|
1698
|
-
n.contains(i) || n.add(i);
|
|
1699
|
-
}
|
|
1700
|
-
function Dt(n) {
|
|
1701
|
-
n.remove(`${f}-scroll-position-both`), n.remove(`${f}-scroll-position-left`), n.remove(`${f}-scroll-position-right`), n.remove(`${f}-scroll-position-middle`);
|
|
1702
|
-
}
|
|
1703
|
-
function dt(n, i) {
|
|
1704
|
-
n.contains(i) || (Dt(n), n.add(i));
|
|
1705
|
-
}
|
|
1706
|
-
const {
|
|
1707
|
-
selectedRowKeys: Ct,
|
|
1708
|
-
indeterminateKeys: hn,
|
|
1709
|
-
onCheckAll: mn,
|
|
1710
|
-
onCheck: yn,
|
|
1711
|
-
onCheckRadio: xn,
|
|
1712
|
-
setSelectedRowKeys: gn,
|
|
1713
|
-
allSelectedRowKeys: Cn,
|
|
1714
|
-
flattenData: wn
|
|
1715
|
-
} = uo(C, Je, F, Le);
|
|
1716
|
-
function Ht(n) {
|
|
1717
|
-
return z.find((i, u) => typeof i.key < "u" ? typeof i.key == "number" && typeof n == "string" ? i.key.toString() === n : i.key === n : typeof i.dataIndex < "u" ? i.dataIndex === n : typeof n == "number" ? u === n : !1);
|
|
1718
|
-
}
|
|
1719
|
-
function Nn(n, i) {
|
|
1720
|
-
var b, L;
|
|
1721
|
-
ce(n), ye(i), n !== re && $n(), D && !D.checkCrossPage && Ct.length && (gn([]), (b = D.onChange) == null || b.call(D, [], []));
|
|
1722
|
-
const u = { ...Ve(), current: n, pageSize: i };
|
|
1723
|
-
K == null || K(
|
|
1724
|
-
u,
|
|
1725
|
-
se.length === 1 ? se[0] : se,
|
|
1726
|
-
ke,
|
|
1727
|
-
{
|
|
1728
|
-
currentData: te(
|
|
1729
|
-
Ze(Ue, u)
|
|
1730
|
-
),
|
|
1731
|
-
currentAllData: te(Ue),
|
|
1732
|
-
action: "paginate"
|
|
1733
|
-
}
|
|
1734
|
-
), (L = y.onChange) == null || L.call(y, n, i);
|
|
1735
|
-
}
|
|
1736
|
-
function $n() {
|
|
1737
|
-
if (!W.current)
|
|
1738
|
-
return;
|
|
1739
|
-
const i = W.current.scrollTop;
|
|
1740
|
-
new Bn({
|
|
1741
|
-
from: { scrollTop: i },
|
|
1742
|
-
to: { scrollTop: 0 },
|
|
1743
|
-
easing: Kn,
|
|
1744
|
-
duration: 300,
|
|
1745
|
-
onUpdate: (b) => {
|
|
1746
|
-
W.current && (W.current.scrollTop = b.scrollTop);
|
|
1747
|
-
}
|
|
1748
|
-
}).start();
|
|
1749
|
-
}
|
|
1750
|
-
function je(n) {
|
|
1751
|
-
const { target: i } = n, u = W.current, b = Y.current && Y.current.parentNode, L = J.current;
|
|
1752
|
-
i.scrollLeft !== he.current && (b && (b.scrollLeft = i.scrollLeft), u && (u.scrollLeft = i.scrollLeft), L && (L.scrollLeft = i.scrollLeft), at()), he.current = n.target.scrollLeft;
|
|
1753
|
-
}
|
|
1754
|
-
function bn(n) {
|
|
1755
|
-
const { target: i } = n, u = fe.current;
|
|
1756
|
-
i.scrollLeft !== he.current && (u.scrollLeft = i.scrollLeft, at()), he.current = n.target.scrollLeft;
|
|
1757
|
-
}
|
|
1758
|
-
const [Wt, Sn] = po(
|
|
1759
|
-
C,
|
|
1760
|
-
wn,
|
|
1761
|
-
Le
|
|
1762
|
-
);
|
|
1763
|
-
let Mt = {}, wt = {};
|
|
1764
|
-
p && (p.x && (typeof p.x == "number" || typeof p.x == "string") && (wt = {
|
|
1765
|
-
width: p.x
|
|
1766
|
-
}), p.y && (typeof p.y == "number" || typeof p.y == "string") && (Mt = {
|
|
1767
|
-
maxHeight: p.y
|
|
1768
|
-
}));
|
|
1769
|
-
function Rn() {
|
|
1770
|
-
const n = Y.current && Y.current.parentNode, i = io(n);
|
|
1771
|
-
i && i > 0 && (n.style.marginBottom = `-${i}px`, n.style.paddingBottom = "0px", J.current && (J.current.style.marginBottom = `-${i}px`, J.current.style.paddingBottom = "0px")), setTimeout(() => {
|
|
1772
|
-
const u = W.current;
|
|
1773
|
-
lo(u) ? (pe.current = !0, n && (n.style.overflowY = "scroll"), J.current && (J.current.style.overflowY = "scroll")) : n && pe.current && (pe.current = !1, n.style.overflowY = "auto", J.current && (J.current.style.overflowY = "auto"));
|
|
1774
|
-
});
|
|
1775
|
-
}
|
|
1776
|
-
const zt = /* @__PURE__ */ a(
|
|
1777
|
-
ko,
|
|
1778
|
-
{
|
|
1779
|
-
...C,
|
|
1780
|
-
activeSorters: se,
|
|
1781
|
-
currentSorter: Z,
|
|
1782
|
-
selectedRowKeys: Ct,
|
|
1783
|
-
currentFilters: ke,
|
|
1784
|
-
onCheckAll: mn,
|
|
1785
|
-
onSort: Ee,
|
|
1786
|
-
data: Je,
|
|
1787
|
-
onHandleFilter: ve,
|
|
1788
|
-
onHandleFilterReset: ze,
|
|
1789
|
-
prefixCls: f,
|
|
1790
|
-
allSelectedRowKeys: Cn,
|
|
1791
|
-
groupColumns: me,
|
|
1792
|
-
stickyOffsets: Se,
|
|
1793
|
-
groupStickyClassNames: M
|
|
1794
|
-
}
|
|
1795
|
-
);
|
|
1796
|
-
function Tn() {
|
|
1797
|
-
const n = q(p) && p.x === "max-content";
|
|
1798
|
-
return Ie || x ? /* @__PURE__ */ a(Ke, { className: `${f}-header`, children: /* @__PURE__ */ ue(
|
|
1799
|
-
Te,
|
|
1800
|
-
{
|
|
1801
|
-
ref: Y,
|
|
1802
|
-
style: n ? {} : wt,
|
|
1803
|
-
children: [
|
|
1804
|
-
/* @__PURE__ */ a(
|
|
1805
|
-
mt,
|
|
1806
|
-
{
|
|
1807
|
-
columns: z,
|
|
1808
|
-
prefixCls: f,
|
|
1809
|
-
producer: !1,
|
|
1810
|
-
columnWidths: n && p.y ? Fe : null
|
|
1811
|
-
}
|
|
1812
|
-
),
|
|
1813
|
-
zt
|
|
1814
|
-
]
|
|
1815
|
-
}
|
|
1816
|
-
) }) : zt;
|
|
1817
|
-
}
|
|
1818
|
-
const Ut = et && /* @__PURE__ */ a(
|
|
1819
|
-
bo,
|
|
1820
|
-
{
|
|
1821
|
-
prefixCls: f,
|
|
1822
|
-
summary: $,
|
|
1823
|
-
data: Je,
|
|
1824
|
-
columns: z,
|
|
1825
|
-
stickyOffsets: Se,
|
|
1826
|
-
stickyClassNames: ae
|
|
1827
|
-
}
|
|
1828
|
-
), Vt = /* @__PURE__ */ a(
|
|
1829
|
-
$o,
|
|
1830
|
-
{
|
|
1831
|
-
...C,
|
|
1832
|
-
selectedRowKeys: Ct,
|
|
1833
|
-
indeterminateKeys: hn,
|
|
1834
|
-
expandedRowKeys: Wt,
|
|
1835
|
-
onCheck: yn,
|
|
1836
|
-
onCheckRadio: xn,
|
|
1837
|
-
onClickExpandBtn: Sn,
|
|
1838
|
-
columns: z,
|
|
1839
|
-
data: Je,
|
|
1840
|
-
prefixCls: f,
|
|
1841
|
-
hasFixedColumn: it,
|
|
1842
|
-
tableViewWidth: _e,
|
|
1843
|
-
indentSize: I,
|
|
1844
|
-
noDataElement: k || c("Table"),
|
|
1845
|
-
activeSorters: se,
|
|
1846
|
-
currentSorter: Z,
|
|
1847
|
-
stickyOffsets: Se,
|
|
1848
|
-
stickyClassNames: ae,
|
|
1849
|
-
getRowKey: Le,
|
|
1850
|
-
saveVirtualListRef: (n) => {
|
|
1851
|
-
x && (le.current = n, W.current = n == null ? void 0 : n.dom);
|
|
1852
|
-
},
|
|
1853
|
-
___dangerouslySetInnerHTML___: C.___dangerouslySetInnerHTML___
|
|
1854
|
-
}
|
|
1855
|
-
), jt = !x && !pn ? /* @__PURE__ */ ue(yt, { children: [
|
|
1856
|
-
Vt,
|
|
1857
|
-
Ut
|
|
1858
|
-
] }) : Vt;
|
|
1859
|
-
nt(() => {
|
|
1860
|
-
let n;
|
|
1861
|
-
return W.current && (n = new ResizeObserver(Rn), n.observe(W.current)), () => {
|
|
1862
|
-
var i, u;
|
|
1863
|
-
W.current && ((i = n == null ? void 0 : n.unobserve) == null || i.call(n, W.current)), (u = n == null ? void 0 : n.disconnect) == null || u.call(n), n = null;
|
|
1864
|
-
};
|
|
1865
|
-
}, [W.current]);
|
|
1866
|
-
function kn() {
|
|
1867
|
-
const n = q(p) && p.x === "max-content" && !!p.y && ie(w) && w.length > 0;
|
|
1868
|
-
return Ie && !x ? /* @__PURE__ */ a(
|
|
1869
|
-
Be,
|
|
1870
|
-
{
|
|
1871
|
-
ref: W,
|
|
1872
|
-
className: `${f}-body`,
|
|
1873
|
-
style: Mt,
|
|
1874
|
-
children: /* @__PURE__ */ ue(Te, { style: wt, children: [
|
|
1875
|
-
/* @__PURE__ */ a(
|
|
1876
|
-
mt,
|
|
1877
|
-
{
|
|
1878
|
-
columns: z,
|
|
1879
|
-
prefixCls: f,
|
|
1880
|
-
producer: n,
|
|
1881
|
-
onSetColumnWidths: Oe,
|
|
1882
|
-
expandedRowKeys: Wt,
|
|
1883
|
-
data: w
|
|
1884
|
-
}
|
|
1885
|
-
),
|
|
1886
|
-
jt
|
|
1887
|
-
] })
|
|
1888
|
-
}
|
|
1889
|
-
) : jt;
|
|
1890
|
-
}
|
|
1891
|
-
function vn() {
|
|
1892
|
-
let n = {};
|
|
1893
|
-
p && q(p) && p.x && (n = {
|
|
1894
|
-
width: p.x
|
|
1895
|
-
});
|
|
1896
|
-
const i = /* @__PURE__ */ a("div", { className: `${f}-tfoot`, ref: J, children: /* @__PURE__ */ ue(Te, { style: n, children: [
|
|
1897
|
-
/* @__PURE__ */ a(mt, { columns: z, prefixCls: f }),
|
|
1898
|
-
Ut
|
|
1899
|
-
] }) }), u = et && Ie && gt === "top", b = et && Ie && gt === "bottom", L = /* @__PURE__ */ ue(yt, { children: [
|
|
1900
|
-
B ? Tn() : null,
|
|
1901
|
-
u && i,
|
|
1902
|
-
kn(),
|
|
1903
|
-
b && i
|
|
1904
|
-
] });
|
|
1905
|
-
return /* @__PURE__ */ ue(yt, { children: [
|
|
1906
|
-
/* @__PURE__ */ a("div", { className: `${f}-container`, children: /* @__PURE__ */ a("div", { className: `${f}-content-scroll`, children: /* @__PURE__ */ a(
|
|
1907
|
-
"div",
|
|
1908
|
-
{
|
|
1909
|
-
className: `${f}-content-inner`,
|
|
1910
|
-
onScroll: Ie ? void 0 : bn,
|
|
1911
|
-
children: Ie || x ? L : /* @__PURE__ */ ue(Te, { ref: fe, style: n, children: [
|
|
1912
|
-
/* @__PURE__ */ a(mt, { prefixCls: f, columns: z }),
|
|
1913
|
-
L
|
|
1914
|
-
] })
|
|
1915
|
-
}
|
|
1916
|
-
) }) }),
|
|
1917
|
-
typeof O == "function" && /* @__PURE__ */ a("div", { className: `${f}-footer`, children: O(Je) })
|
|
1918
|
-
] });
|
|
1919
|
-
}
|
|
1920
|
-
if (!S.length)
|
|
1921
|
-
return null;
|
|
1922
|
-
const _n = q(T) ? T.wrapper : T, Nt = q(T) ? T.cell : _, En = q(T) ? T.cell || T.headerCell : _, In = q(T) ? T.cell || T.bodyCell : _, Pn = ne(
|
|
1923
|
-
f,
|
|
1924
|
-
`${f}-size-${v}`,
|
|
1925
|
-
{
|
|
1926
|
-
[`${f}-border`]: _n,
|
|
1927
|
-
[`${f}-border-cell`]: Nt,
|
|
1928
|
-
[`${f}-border-header-cell`]: !Nt && En,
|
|
1929
|
-
[`${f}-border-body-cell`]: !Nt && In,
|
|
1930
|
-
[`${f}-stripe`]: G,
|
|
1931
|
-
[`${f}-hover`]: ee,
|
|
1932
|
-
[`${f}-type-radio`]: D && D.type === "radio",
|
|
1933
|
-
[`${f}-layout-fixed`]: H || p && (p.x || p.y) || S.find((n) => n.ellipsis),
|
|
1934
|
-
[`${f}-fixed-column`]: it,
|
|
1935
|
-
[`${f}-virtualized`]: x,
|
|
1936
|
-
[`${f}-rtl`]: s
|
|
1937
|
-
},
|
|
1938
|
-
N
|
|
1939
|
-
), $t = P === "tl" || P === "tr" || P === "topCenter", An = ne(`${f}-pagination`, {
|
|
1940
|
-
[`${f}-pagination-left`]: P === "tl" || P === "bl",
|
|
1941
|
-
[`${f}-pagination-center`]: P === "topCenter" || P === "bottomCenter",
|
|
1942
|
-
[`${f}-pagination-top`]: $t
|
|
1943
|
-
});
|
|
1944
|
-
let ft = C.loading;
|
|
1945
|
-
typeof ft == "boolean" && (ft = { loading: ft });
|
|
1946
|
-
const Yt = typeof A == "function" ? A(/* @__PURE__ */ a(Qt, { ...ct })) : /* @__PURE__ */ a("div", { className: An, children: /* @__PURE__ */ a(Qt, { ...ct }) }), qt = V !== !1 && (Ue.length !== 0 || ct.total > 0);
|
|
1947
|
-
return /* @__PURE__ */ a(
|
|
1948
|
-
"div",
|
|
1949
|
-
{
|
|
1950
|
-
ref: oe,
|
|
1951
|
-
style: m,
|
|
1952
|
-
className: Pn,
|
|
1953
|
-
...Vn(C),
|
|
1954
|
-
children: /* @__PURE__ */ ue(
|
|
1955
|
-
On,
|
|
1956
|
-
{
|
|
1957
|
-
className: `${f}-spin`,
|
|
1958
|
-
element: h,
|
|
1959
|
-
...ft,
|
|
1960
|
-
children: [
|
|
1961
|
-
qt && $t && Yt,
|
|
1962
|
-
vn(),
|
|
1963
|
-
qt && !$t && Yt
|
|
1964
|
-
]
|
|
1965
|
-
}
|
|
1966
|
-
)
|
|
1967
|
-
}
|
|
1968
|
-
);
|
|
1969
|
-
}
|
|
1970
|
-
const dn = Pt(Io);
|
|
1971
|
-
dn.displayName = "Table";
|
|
1972
|
-
function fn(t) {
|
|
1973
|
-
const { children: o, ...r } = t;
|
|
1974
|
-
return /* @__PURE__ */ a("td", { ...ro(r, ["$$PqbTableSummaryCell"]), children: o });
|
|
1975
|
-
}
|
|
1976
|
-
fn.__PQB_TABLE_SUMMARY_CELL__ = !0;
|
|
1977
|
-
function Po(t) {
|
|
1978
|
-
const { rtl: o } = We(Xe), { columns: r, stickyOffsets: h, stickyClassNames: e, prefixCls: d } = We(an), { children: c, ...l } = t, s = Pe.Children.map(
|
|
1979
|
-
c,
|
|
1980
|
-
(y) => y.props.colSpan || 1
|
|
1981
|
-
), C = Pe.Children.map(c, (y, m) => {
|
|
1982
|
-
var B, G;
|
|
1983
|
-
const N = y, g = xt(N, "type.__PQB_TABLE_SUMMARY_CELL__") || xt(N, "props.$$PqbTableSummaryCell"), T = (B = N == null ? void 0 : N.props) == null ? void 0 : B.style, _ = (G = N == null ? void 0 : N.props) == null ? void 0 : G.className, w = s.slice(0, m).reduce((ee, V) => ee + V, 0), p = r[w].fixed === "left" ? { [o ? "right" : "left"]: h[w] } : r[w].fixed === "right" ? { [o ? "left" : "right"]: h[w] } : {}, k = r[w].fixed === "left" || r[w].fixed === "right" ? e[w] : "";
|
|
1984
|
-
return g ? Pe.cloneElement(N, {
|
|
1985
|
-
...N.props,
|
|
1986
|
-
className: ne(`${d}-td`, k, _),
|
|
1987
|
-
style: { ...T, ...p }
|
|
1988
|
-
}) : y;
|
|
1989
|
-
});
|
|
1990
|
-
return /* @__PURE__ */ a("tr", { ...l, children: C });
|
|
1991
|
-
}
|
|
1992
|
-
function Ft(t) {
|
|
1993
|
-
return t.children;
|
|
1994
|
-
}
|
|
1995
|
-
Ft.Row = Po;
|
|
1996
|
-
Ft.Cell = fn;
|
|
1997
|
-
const Ao = dn;
|
|
1998
|
-
Ao.Summary = Ft;
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
/* empty css */
|
|
14
|
+
/* empty css */
|
|
15
|
+
/* empty css */
|
|
16
|
+
import m from "./table/Table.js";
|
|
17
|
+
import o from "./table/summary/index.js";
|
|
18
|
+
const r = m;
|
|
19
|
+
r.Summary = o;
|
|
1999
20
|
export {
|
|
2000
|
-
|
|
21
|
+
r as default
|
|
2001
22
|
};
|