@unicom-cloud/ui 0.8.43 → 0.8.45
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 -248
- 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 -721
- 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 -395
- 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/locale/de-DE.js +1 -1
- 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 +27 -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 +160 -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/grid/index.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 +4 -120
- package/types/input-tag/InputTag.d.ts +1 -1
- package/types/input-tag/interface.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/types/{Popover → popover}/index.d.ts +0 -0
- /package/types/{Popover → popover}/interface.d.ts +0 -0
- /package/types/{Popover → popover}/style/index.d.ts +0 -0
- /package/{chunk/K6Dvbx-E.js → virtual-list/style/index.less.js} +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import _e, { forwardRef as ge, useContext as $e, createElement as be } from "react";
|
|
3
|
+
import Oe from "@unicom-cloud/icons/IconUiMinus";
|
|
4
|
+
import ve from "@unicom-cloud/icons/IconUiPlus";
|
|
5
|
+
import Ie from "lodash/isArray";
|
|
6
|
+
import Se from "lodash/isString";
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
import Ke from "../../checkbox/Checkbox.js";
|
|
10
|
+
import "../../config-provider/ConfigProvider.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
import Pe from "../../radio/Radio.js";
|
|
13
|
+
import "../../radio/Group.js";
|
|
14
|
+
import { INTERNAL_SELECTION_KEY as Be, INTERNAL_EXPAND_KEY as De } from "../constant.js";
|
|
15
|
+
import Le from "../hook/useComponent.js";
|
|
16
|
+
import { getOriginData as Ae } from "../util.js";
|
|
17
|
+
import N from "@unicom-cloud/utils/class-name";
|
|
18
|
+
import He from "./Td.js";
|
|
19
|
+
import { ConfigContext as Me } from "../../config-provider/context.js";
|
|
20
|
+
function ze(I, V) {
|
|
21
|
+
const {
|
|
22
|
+
expandedRowRender: w,
|
|
23
|
+
onClickExpandBtn: S,
|
|
24
|
+
columns: Z,
|
|
25
|
+
component: K,
|
|
26
|
+
onCheck: ee,
|
|
27
|
+
onCheckRadio: ne,
|
|
28
|
+
prefixCls: r,
|
|
29
|
+
selectedRowKeys: P,
|
|
30
|
+
indeterminateKeys: oe,
|
|
31
|
+
rowClassName: E,
|
|
32
|
+
onRow: T,
|
|
33
|
+
rowSelection: p,
|
|
34
|
+
indentSize: te = 16,
|
|
35
|
+
activeSorters: re,
|
|
36
|
+
virtualized: l,
|
|
37
|
+
stickyOffsets: ie,
|
|
38
|
+
stickyClassNames: se,
|
|
39
|
+
getRowKey: ce,
|
|
40
|
+
placeholder: de,
|
|
41
|
+
expandProps: _ = { strictTreeData: !0 },
|
|
42
|
+
data: ae,
|
|
43
|
+
expandedRowKeys: B,
|
|
44
|
+
childrenColumnName: g,
|
|
45
|
+
record: o,
|
|
46
|
+
index: d,
|
|
47
|
+
type: m,
|
|
48
|
+
shouldRowExpand: pe,
|
|
49
|
+
level: le
|
|
50
|
+
} = I, { rtl: me } = $e(Me), f = Ae(o), { ...a } = (T == null ? void 0 : T(f, d)) || {}, t = ce(o), fe = m === "radio" ? P.slice(0, 1) : P, xe = t || d, x = fe.indexOf(t) > -1, ue = B.indexOf(t) > -1, ye = oe.indexOf(t) > -1, Ce = N(
|
|
51
|
+
`${r}-tr`,
|
|
52
|
+
{
|
|
53
|
+
[`${r}-row-checked`]: x,
|
|
54
|
+
[`${r}-row-expanded`]: ue
|
|
55
|
+
},
|
|
56
|
+
E == null ? void 0 : E(f, d)
|
|
57
|
+
), D = p && typeof p.checkboxProps == "function" ? p.checkboxProps(f) : {}, L = N(`${r}-td`, `${r}-operation`), $ = (e) => N(L, `${r}-${e}`, {
|
|
58
|
+
[`${r}-selection-col`]: l && m === "checkbox" || m === "radio",
|
|
59
|
+
[`${r}-expand-icon-col`]: l && w
|
|
60
|
+
});
|
|
61
|
+
function A(e) {
|
|
62
|
+
return _.strictTreeData ? Ie(e[g]) && e[g].length : e[g] !== void 0;
|
|
63
|
+
}
|
|
64
|
+
function he() {
|
|
65
|
+
return ae.find((e) => A(e));
|
|
66
|
+
}
|
|
67
|
+
const H = pe(o, d), M = A(o), z = he() && !w, ke = z && M, Re = _.expandRowByClick && (H || ke) ? {
|
|
68
|
+
onClick: (e) => {
|
|
69
|
+
var n;
|
|
70
|
+
S(t), (n = a == null ? void 0 : a.onClick) == null || n.call(a, e);
|
|
71
|
+
}
|
|
72
|
+
} : {}, { ComponentBodyRow: U, ComponentTd: Ne, getBodyComponentOperations: we } = Le(K), Ee = l ? "div" : U, h = l ? "div" : Ne, Y = {
|
|
73
|
+
className: Ce,
|
|
74
|
+
key: xe,
|
|
75
|
+
...a,
|
|
76
|
+
...Re
|
|
77
|
+
}, j = Se(U) ? Y : { ...Y, record: o, index: d };
|
|
78
|
+
function F(e, n) {
|
|
79
|
+
const { icon: u } = _, y = !!~B.indexOf(n), C = {
|
|
80
|
+
onClick: (R) => {
|
|
81
|
+
R.stopPropagation(), S(n);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
return typeof u == "function" ? u({ expanded: y, record: e, ...C }) : /* @__PURE__ */ i("button", { ...C, type: "button", children: y ? /* @__PURE__ */ i(Oe, {}) : /* @__PURE__ */ i(ve, {}) });
|
|
85
|
+
}
|
|
86
|
+
const Te = w && /* @__PURE__ */ i(h, { className: $("expand-icon-cell"), children: H && F(o, t) }), k = p && p.renderCell;
|
|
87
|
+
let b;
|
|
88
|
+
const W = /* @__PURE__ */ i(
|
|
89
|
+
Ke,
|
|
90
|
+
{
|
|
91
|
+
value: t,
|
|
92
|
+
onChange: (e) => ee(e, o),
|
|
93
|
+
checked: x,
|
|
94
|
+
indeterminate: ye,
|
|
95
|
+
...D
|
|
96
|
+
}
|
|
97
|
+
), X = /* @__PURE__ */ i(
|
|
98
|
+
Pe,
|
|
99
|
+
{
|
|
100
|
+
onChange: () => ne(t, o),
|
|
101
|
+
value: t,
|
|
102
|
+
checked: x,
|
|
103
|
+
...D
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
m === "checkbox" && (b = /* @__PURE__ */ i(h, { className: $("checkbox"), children: k ? k(W, x, f) : W })), m === "radio" && (b = /* @__PURE__ */ i(h, { className: $("radio"), children: k ? k(X, x, f) : X }));
|
|
107
|
+
const q = we({
|
|
108
|
+
selectionNode: b,
|
|
109
|
+
expandNode: Te
|
|
110
|
+
});
|
|
111
|
+
return /* @__PURE__ */ be(Ee, { ...j, key: j.key, ref: V }, Z.map((e, n) => {
|
|
112
|
+
var R, G, J, Q;
|
|
113
|
+
const u = `${e.key}-${e.dataIndex}-${e.title}-${n}`, y = ie[n], C = se[n];
|
|
114
|
+
if (e.$$isOperation) {
|
|
115
|
+
let c = e.node, O = !0;
|
|
116
|
+
e.title === Be && (c = (R = q.find((v) => v.name === "selectionNode")) == null ? void 0 : R.node, O = !1), e.title === De && (c = (G = q.find((v) => v.name === "expandNode")) == null ? void 0 : G.node, O = !1);
|
|
117
|
+
const s = typeof c == "function" ? c(o) : c;
|
|
118
|
+
return _e.cloneElement(s, {
|
|
119
|
+
key: u || n,
|
|
120
|
+
...s.props,
|
|
121
|
+
className: N(
|
|
122
|
+
O ? L : "",
|
|
123
|
+
(J = s == null ? void 0 : s.props) == null ? void 0 : J.className,
|
|
124
|
+
C
|
|
125
|
+
),
|
|
126
|
+
style: {
|
|
127
|
+
...(Q = s == null ? void 0 : s.props) == null ? void 0 : Q.style,
|
|
128
|
+
...e.fixed === "left" ? {
|
|
129
|
+
[me ? "right" : "left"]: y
|
|
130
|
+
} : {},
|
|
131
|
+
width: e.width,
|
|
132
|
+
minWidth: e.width
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return /* @__PURE__ */ i(
|
|
137
|
+
He,
|
|
138
|
+
{
|
|
139
|
+
prefixCls: r,
|
|
140
|
+
virtualized: l,
|
|
141
|
+
component: K,
|
|
142
|
+
currentSorter: re.find(
|
|
143
|
+
(c) => c.field === (e.dataIndex || e.key)
|
|
144
|
+
),
|
|
145
|
+
placeholder: de,
|
|
146
|
+
indentSize: te,
|
|
147
|
+
stickyClassName: C,
|
|
148
|
+
stickyOffset: y,
|
|
149
|
+
InnerComponentTd: h,
|
|
150
|
+
column: e,
|
|
151
|
+
columnIndex: n,
|
|
152
|
+
record: o,
|
|
153
|
+
trIndex: d,
|
|
154
|
+
level: le,
|
|
155
|
+
haveTreeData: z,
|
|
156
|
+
recordHaveChildren: M,
|
|
157
|
+
rowKey: t,
|
|
158
|
+
renderExpandIcon: F,
|
|
159
|
+
___dangerouslySetInnerHTML___: I.___dangerouslySetInnerHTML___
|
|
160
|
+
},
|
|
161
|
+
u
|
|
162
|
+
);
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
const an = ge(ze);
|
|
166
|
+
export {
|
|
167
|
+
an as default
|
|
168
|
+
};
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { jsxs as I, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import z, { forwardRef as A, createElement as B } from "react";
|
|
3
|
+
import V from "lodash/isArray";
|
|
4
|
+
import X from "../hook/useComponent.js";
|
|
5
|
+
import { getOriginData as Y } from "../util.js";
|
|
6
|
+
import D from "@unicom-cloud/utils/class-name";
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
import q from "../../virtual-list/VirtualList.js";
|
|
10
|
+
import W from "./Tr.js";
|
|
11
|
+
const G = A(function({
|
|
12
|
+
record: r,
|
|
13
|
+
index: f,
|
|
14
|
+
virtualized: a,
|
|
15
|
+
tbodyProps: R
|
|
16
|
+
}, v) {
|
|
17
|
+
const {
|
|
18
|
+
prefixCls: e,
|
|
19
|
+
columns: b,
|
|
20
|
+
indentSize: N = 16,
|
|
21
|
+
childrenColumnName: p = "children",
|
|
22
|
+
expandProps: h = {},
|
|
23
|
+
rowSelection: d,
|
|
24
|
+
hasFixedColumn: u,
|
|
25
|
+
tableViewWidth: $,
|
|
26
|
+
getRowKey: s,
|
|
27
|
+
expandedRowKeys: x,
|
|
28
|
+
expandedRowRender: m
|
|
29
|
+
} = R;
|
|
30
|
+
let y;
|
|
31
|
+
d && "type" in d ? y = d.type : d && !("type" in d) && (y = "checkbox");
|
|
32
|
+
const t = m && ((o, w) => m(Y(o), w)), i = (o) => V(o[p]) && o[p].length, l = (o, w) => "rowExpandable" in h && typeof h.rowExpandable == "function" ? h.rowExpandable(o) : (t == null ? void 0 : t(o, w)) !== null, E = (o, w) => {
|
|
33
|
+
const S = [], K = {
|
|
34
|
+
...R,
|
|
35
|
+
type: y,
|
|
36
|
+
shouldRowExpand: l
|
|
37
|
+
};
|
|
38
|
+
S.push(
|
|
39
|
+
/* @__PURE__ */ n(
|
|
40
|
+
W,
|
|
41
|
+
{
|
|
42
|
+
ref: v,
|
|
43
|
+
...K,
|
|
44
|
+
record: o,
|
|
45
|
+
level: 0,
|
|
46
|
+
index: w
|
|
47
|
+
},
|
|
48
|
+
s(o)
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
const L = (C, j, P = 0) => {
|
|
52
|
+
V(C) && C.length && C.forEach((g, k) => {
|
|
53
|
+
x.indexOf(j) !== -1 && (S.push(
|
|
54
|
+
/* @__PURE__ */ B(
|
|
55
|
+
W,
|
|
56
|
+
{
|
|
57
|
+
...K,
|
|
58
|
+
key: s(g),
|
|
59
|
+
record: g,
|
|
60
|
+
level: P + 1,
|
|
61
|
+
index: k
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
), i(g) && L(g[p], s(g), P + 1));
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
return t || L(o[p], s(o)), S;
|
|
68
|
+
}, T = s(r), F = l(r, f) && x.indexOf(T) !== -1, H = a ? "div" : "tr", O = a ? "div" : "td";
|
|
69
|
+
return /* @__PURE__ */ I(z.Fragment, { children: [
|
|
70
|
+
E(r, f),
|
|
71
|
+
F && /* @__PURE__ */ n(
|
|
72
|
+
H,
|
|
73
|
+
{
|
|
74
|
+
className: D(`${e}-tr`, `${e}-expand-content`),
|
|
75
|
+
children: /* @__PURE__ */ n(
|
|
76
|
+
O,
|
|
77
|
+
{
|
|
78
|
+
className: D(`${e}-td`),
|
|
79
|
+
style: { paddingLeft: N },
|
|
80
|
+
colSpan: b.length,
|
|
81
|
+
children: u ? /* @__PURE__ */ n(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
className: `${e}-expand-fixed-row`,
|
|
85
|
+
style: { width: $ },
|
|
86
|
+
children: t == null ? void 0 : t(r, f)
|
|
87
|
+
}
|
|
88
|
+
) : t == null ? void 0 : t(r, f)
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
},
|
|
92
|
+
`${T}-expanded`
|
|
93
|
+
)
|
|
94
|
+
] }, T);
|
|
95
|
+
});
|
|
96
|
+
function ae(c) {
|
|
97
|
+
const {
|
|
98
|
+
data: r,
|
|
99
|
+
columns: f,
|
|
100
|
+
prefixCls: a,
|
|
101
|
+
component: R,
|
|
102
|
+
noDataElement: v,
|
|
103
|
+
scroll: e,
|
|
104
|
+
tableViewWidth: b,
|
|
105
|
+
virtualized: N,
|
|
106
|
+
virtualListProps: p,
|
|
107
|
+
getRowKey: h,
|
|
108
|
+
saveVirtualListRef: d
|
|
109
|
+
} = c, u = (i) => {
|
|
110
|
+
var l;
|
|
111
|
+
(l = c.saveRef) == null || l.call(c, i);
|
|
112
|
+
}, { ComponentTbody: $ } = X(R);
|
|
113
|
+
let s = {}, x = {};
|
|
114
|
+
e && (e.x && (typeof e.x == "number" || typeof e.x == "string") && (s = {
|
|
115
|
+
width: e.x
|
|
116
|
+
}), e.y && (typeof e.y == "number" || typeof e.y == "string") && (x = {
|
|
117
|
+
maxHeight: e.y
|
|
118
|
+
}));
|
|
119
|
+
const m = {
|
|
120
|
+
className: `${a}-no-data`
|
|
121
|
+
};
|
|
122
|
+
b && (m.className = `${a}-no-data ${a}-expand-fixed-row`, m.style = { width: b });
|
|
123
|
+
const y = /* @__PURE__ */ n("tr", { className: D(`${a}-tr`, `${a}-empty-row`), children: /* @__PURE__ */ n("td", { className: `${a}-td`, colSpan: f.length, children: /* @__PURE__ */ n("div", { ...m, children: v }) }) }), t = (i, l) => {
|
|
124
|
+
const E = h(i) || l;
|
|
125
|
+
return /* @__PURE__ */ n(
|
|
126
|
+
G,
|
|
127
|
+
{
|
|
128
|
+
record: i,
|
|
129
|
+
index: l,
|
|
130
|
+
virtualized: N,
|
|
131
|
+
tbodyProps: c
|
|
132
|
+
},
|
|
133
|
+
E
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
return N ? r.length > 0 ? /* @__PURE__ */ n(
|
|
137
|
+
q,
|
|
138
|
+
{
|
|
139
|
+
data: r,
|
|
140
|
+
height: x.maxHeight,
|
|
141
|
+
isStaticItemHeight: !1,
|
|
142
|
+
outerStyle: { ...s, minWidth: "100%", overflow: "visible" },
|
|
143
|
+
innerStyle: { right: "auto", minWidth: "100%" },
|
|
144
|
+
className: `${a}-body`,
|
|
145
|
+
ref: (i) => {
|
|
146
|
+
d(i), u(i == null ? void 0 : i.dom);
|
|
147
|
+
},
|
|
148
|
+
itemKey: h,
|
|
149
|
+
...p,
|
|
150
|
+
children: t
|
|
151
|
+
}
|
|
152
|
+
) : /* @__PURE__ */ n("div", { className: `${a}-body`, ref: u, children: /* @__PURE__ */ n("table", { children: /* @__PURE__ */ n("tbody", { children: y }) }) }) : /* @__PURE__ */ n($, { ref: u, children: r.length > 0 ? r.map(t) : y });
|
|
153
|
+
}
|
|
154
|
+
export {
|
|
155
|
+
ae as default
|
|
156
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { SummaryContext as f } from "../summary/context.js";
|
|
3
|
+
import { getOriginData as n } from "../util.js";
|
|
4
|
+
function d(r) {
|
|
5
|
+
const { summary: s, data: a, prefixCls: t, columns: e, stickyOffsets: m, stickyClassNames: i } = r;
|
|
6
|
+
return /* @__PURE__ */ o("tfoot", { className: `${t}-tfoot`, children: /* @__PURE__ */ o(
|
|
7
|
+
f.Provider,
|
|
8
|
+
{
|
|
9
|
+
value: { columns: e, stickyOffsets: m, stickyClassNames: i, prefixCls: t },
|
|
10
|
+
children: s(n(a))
|
|
11
|
+
}
|
|
12
|
+
) });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
d as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { jsxs as p, Fragment as ve, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as Ie, useState as V, useEffect as w, createElement as Te } from "react";
|
|
3
|
+
import be from "@unicom-cloud/icons/IconUiCaretDown";
|
|
4
|
+
import ye from "@unicom-cloud/icons/IconUiCaretUp";
|
|
5
|
+
import ke from "@unicom-cloud/icons/IconUiFilter";
|
|
6
|
+
import D from "lodash/isArray";
|
|
7
|
+
import Ae from "lodash/isFunction";
|
|
8
|
+
import M from "lodash/isPlainObject";
|
|
9
|
+
import Ee from "lodash/isString";
|
|
10
|
+
import H from "../../Button.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
import Oe from "../../checkbox/Checkbox.js";
|
|
14
|
+
import "../../config-provider/ConfigProvider.js";
|
|
15
|
+
import Pe from "../../hooks/useMergeValue.js";
|
|
16
|
+
import Ue from "../../radio/Radio.js";
|
|
17
|
+
import je from "../../Space.js";
|
|
18
|
+
import xe from "../hook/useComponent.js";
|
|
19
|
+
import Re from "../../Tooltip.js";
|
|
20
|
+
import ze from "../../Trigger.js";
|
|
21
|
+
import g from "@unicom-cloud/utils/class-name";
|
|
22
|
+
import { ConfigContext as Me } from "../../config-provider/context.js";
|
|
23
|
+
function Be($, d) {
|
|
24
|
+
return $ === "ascend" ? d.Table.sortAscend : $ === "descend" ? d.Table.sortDescend : d.Table.cancelSort;
|
|
25
|
+
}
|
|
26
|
+
const Ke = { bottom: 0 };
|
|
27
|
+
function st({
|
|
28
|
+
onSort: $,
|
|
29
|
+
onFilter: d,
|
|
30
|
+
onHandleFilter: f,
|
|
31
|
+
onHandleFilterReset: S,
|
|
32
|
+
currentFilters: k = {},
|
|
33
|
+
currentSorter: c,
|
|
34
|
+
_key: B,
|
|
35
|
+
dataIndex: ee,
|
|
36
|
+
title: N,
|
|
37
|
+
sorter: te,
|
|
38
|
+
sortDirections: m = ["ascend", "descend"],
|
|
39
|
+
filters: h = [],
|
|
40
|
+
columnFixedStyle: ne,
|
|
41
|
+
className: ie,
|
|
42
|
+
cellStyle: K,
|
|
43
|
+
headerCellStyle: v,
|
|
44
|
+
rowSpan: A,
|
|
45
|
+
colSpan: I,
|
|
46
|
+
headerCellProps: oe,
|
|
47
|
+
prefixCls: t,
|
|
48
|
+
align: E = "left",
|
|
49
|
+
component: se,
|
|
50
|
+
filterIcon: ce,
|
|
51
|
+
filterDropdown: O,
|
|
52
|
+
filterMultiple: L = !0,
|
|
53
|
+
ellipsis: q,
|
|
54
|
+
filterDropdownProps: C,
|
|
55
|
+
onFilterDropdownVisibleChange: P,
|
|
56
|
+
column: me,
|
|
57
|
+
showSorterTooltip: U,
|
|
58
|
+
index: ae
|
|
59
|
+
}) {
|
|
60
|
+
const { locale: j, rtl: re } = Ie(Me), o = B || ee || ae, [l, u, r] = Pe([], {
|
|
61
|
+
value: k[o] || []
|
|
62
|
+
}), [x, G] = V(!1), [J, Q] = V(!1), T = te && D(m) && m.length, b = T ? de() : void 0;
|
|
63
|
+
w(() => {
|
|
64
|
+
u(k[o] || []);
|
|
65
|
+
}, [k, o]), w(() => {
|
|
66
|
+
l && l !== r && u(l);
|
|
67
|
+
}, [x]);
|
|
68
|
+
function de() {
|
|
69
|
+
const e = c && c.direction;
|
|
70
|
+
if (!e || c && c.field !== o)
|
|
71
|
+
return m[0];
|
|
72
|
+
const s = m.indexOf(e);
|
|
73
|
+
if (s < m.length)
|
|
74
|
+
return m[s + 1];
|
|
75
|
+
}
|
|
76
|
+
function fe() {
|
|
77
|
+
l && (f == null || f(
|
|
78
|
+
{ onFilter: d, filters: h, dataIndex: o },
|
|
79
|
+
r
|
|
80
|
+
), R(!1));
|
|
81
|
+
}
|
|
82
|
+
function le() {
|
|
83
|
+
S({ dataIndex: o }), R(!1);
|
|
84
|
+
}
|
|
85
|
+
function R(e) {
|
|
86
|
+
G(e), P == null || P(e);
|
|
87
|
+
}
|
|
88
|
+
function W(e, s) {
|
|
89
|
+
let i = [...r];
|
|
90
|
+
if (L)
|
|
91
|
+
s ? i = i.concat(e) : i.splice(
|
|
92
|
+
i.findIndex((Ne) => Ne === e),
|
|
93
|
+
1
|
|
94
|
+
);
|
|
95
|
+
else if (i.length > 0)
|
|
96
|
+
if (i[0] !== e)
|
|
97
|
+
i = [e];
|
|
98
|
+
else
|
|
99
|
+
return;
|
|
100
|
+
else
|
|
101
|
+
i = [e];
|
|
102
|
+
u(i);
|
|
103
|
+
}
|
|
104
|
+
function he(e) {
|
|
105
|
+
u(e || r), G(!1), f == null || f(
|
|
106
|
+
{ filters: h, onFilter: d, dataIndex: o },
|
|
107
|
+
e || r
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
function ue() {
|
|
111
|
+
return typeof O == "function" ? O({
|
|
112
|
+
filterKeys: r,
|
|
113
|
+
setFilterKeys: (e, s) => {
|
|
114
|
+
u(e), s == null || s();
|
|
115
|
+
},
|
|
116
|
+
confirm: he
|
|
117
|
+
}) : /* @__PURE__ */ p("div", { className: `${t}-filters-popup`, children: [
|
|
118
|
+
/* @__PURE__ */ n("div", { className: `${t}-filters-list`, children: h.map((e) => {
|
|
119
|
+
const s = r.findIndex((i) => i === e.value) !== -1;
|
|
120
|
+
return /* @__PURE__ */ n("div", { className: `${t}-filters-item`, children: L ? /* @__PURE__ */ n(
|
|
121
|
+
Oe,
|
|
122
|
+
{
|
|
123
|
+
checked: s,
|
|
124
|
+
onChange: (i) => W(e.value, i),
|
|
125
|
+
children: e.text
|
|
126
|
+
}
|
|
127
|
+
) : /* @__PURE__ */ n(
|
|
128
|
+
Ue,
|
|
129
|
+
{
|
|
130
|
+
checked: s,
|
|
131
|
+
onChange: (i) => W(e.value, i),
|
|
132
|
+
children: e.text
|
|
133
|
+
}
|
|
134
|
+
) }, e.value);
|
|
135
|
+
}) }),
|
|
136
|
+
/* @__PURE__ */ p(je, { className: `${t}-filters-btn`, children: [
|
|
137
|
+
/* @__PURE__ */ n(H, { onClick: le, size: "mini", children: j.Table.resetText }),
|
|
138
|
+
/* @__PURE__ */ n(H, { onClick: fe, type: "primary", size: "mini", children: j.Table.okText })
|
|
139
|
+
] })
|
|
140
|
+
] });
|
|
141
|
+
}
|
|
142
|
+
const X = (e) => g(`${t}-sorter-icon`, {
|
|
143
|
+
[`${t}-sorter-icon-active`]: c && c.direction === e && c.field === o
|
|
144
|
+
}), pe = g(`${t}-filters`, {
|
|
145
|
+
[`${t}-filters-open`]: x,
|
|
146
|
+
[`${t}-filters-active`]: l && l.length
|
|
147
|
+
});
|
|
148
|
+
let a = {
|
|
149
|
+
...ne
|
|
150
|
+
};
|
|
151
|
+
M(K) && (a = {
|
|
152
|
+
...a,
|
|
153
|
+
...K
|
|
154
|
+
}), M(v) && (a = {
|
|
155
|
+
...a,
|
|
156
|
+
...v
|
|
157
|
+
}), Ae(v) && (a = {
|
|
158
|
+
...a,
|
|
159
|
+
...v()
|
|
160
|
+
}), E && E !== "left" && (a.textAlign = E);
|
|
161
|
+
const y = {
|
|
162
|
+
style: a,
|
|
163
|
+
key: B || o
|
|
164
|
+
};
|
|
165
|
+
I && I > 1 && (y.colSpan = I), A && A > 1 && (y.rowSpan = A);
|
|
166
|
+
const { ComponentTh: ge, ComponentHeaderCell: z } = xe(se), Y = D(h) && h.length > 0 || typeof O == "function", Z = q && typeof N == "string" ? { title: N } : {}, $e = C && C.triggerProps, F = /* @__PURE__ */ p(ve, { children: [
|
|
167
|
+
T ? /* @__PURE__ */ n(
|
|
168
|
+
Re,
|
|
169
|
+
{
|
|
170
|
+
content: Be(b, j),
|
|
171
|
+
disabled: !U,
|
|
172
|
+
...M(U) ? U : {},
|
|
173
|
+
children: /* @__PURE__ */ p(
|
|
174
|
+
"div",
|
|
175
|
+
{
|
|
176
|
+
className: `${t}-cell-with-sorter`,
|
|
177
|
+
onMouseEnter: () => {
|
|
178
|
+
Q(!0);
|
|
179
|
+
},
|
|
180
|
+
onMouseLeave: () => {
|
|
181
|
+
Q(!1);
|
|
182
|
+
},
|
|
183
|
+
onClick: () => $(b, o),
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ n("span", { className: `${t}-th-item-title`, ...Z, children: N }),
|
|
186
|
+
T && /* @__PURE__ */ p(
|
|
187
|
+
"div",
|
|
188
|
+
{
|
|
189
|
+
className: g(`${t}-sorter`, {
|
|
190
|
+
[`${t}-sorter-direction-one`]: m.length === 1
|
|
191
|
+
}),
|
|
192
|
+
children: [
|
|
193
|
+
m.indexOf("ascend") !== -1 && /* @__PURE__ */ n("div", { className: X("ascend"), children: /* @__PURE__ */ n(ye, {}) }),
|
|
194
|
+
m.indexOf("descend") !== -1 && /* @__PURE__ */ n("div", { className: X("descend"), children: /* @__PURE__ */ n(be, {}) })
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
}
|
|
202
|
+
) : /* @__PURE__ */ n("span", { className: `${t}-th-item-title`, ...Z, children: N }),
|
|
203
|
+
Y && /* @__PURE__ */ n(
|
|
204
|
+
ze,
|
|
205
|
+
{
|
|
206
|
+
popup: ue,
|
|
207
|
+
trigger: "click",
|
|
208
|
+
classNames: "slideDynamicOrigin",
|
|
209
|
+
position: re ? "bl" : "br",
|
|
210
|
+
popupAlign: Ke,
|
|
211
|
+
popupVisible: x,
|
|
212
|
+
onVisibleChange: R,
|
|
213
|
+
...$e,
|
|
214
|
+
children: /* @__PURE__ */ n("div", { className: pe, children: ce || /* @__PURE__ */ n(ke, {}) })
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
] }), _ = g(`${t}-th-item`, {
|
|
218
|
+
[`${t}-cell-text-ellipsis`]: q,
|
|
219
|
+
[`${t}-cell-mouseenter`]: J,
|
|
220
|
+
[`${t}-cell-next-${b}`]: J && b,
|
|
221
|
+
[`${t}-col-has-sorter`]: T,
|
|
222
|
+
[`${t}-col-has-filter`]: Y
|
|
223
|
+
});
|
|
224
|
+
return I !== 0 && /* @__PURE__ */ Te(
|
|
225
|
+
ge,
|
|
226
|
+
{
|
|
227
|
+
className: g(
|
|
228
|
+
`${t}-th`,
|
|
229
|
+
{
|
|
230
|
+
[`${t}-col-sorted`]: c && c.direction && c.field === o
|
|
231
|
+
},
|
|
232
|
+
ie
|
|
233
|
+
),
|
|
234
|
+
...y,
|
|
235
|
+
key: y.key,
|
|
236
|
+
...oe
|
|
237
|
+
},
|
|
238
|
+
Ee(z) ? /* @__PURE__ */ n(z, { className: _, children: F }) : /* @__PURE__ */ n(
|
|
239
|
+
z,
|
|
240
|
+
{
|
|
241
|
+
className: _,
|
|
242
|
+
column: me,
|
|
243
|
+
children: F
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
export {
|
|
249
|
+
st as default
|
|
250
|
+
};
|