@unicom-cloud/ui 0.8.112 → 0.8.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Affix.js +1 -1
- package/Alert.js +1 -1
- package/AutoComplete.js +1 -1
- package/BackTop.js +1 -1
- package/Badge.js +1 -1
- package/Breadcrumb.js +2 -2
- package/Button.js +1 -1
- package/Calendar.js +1 -1
- package/Card.js +1 -1
- package/Carousel.js +1 -1
- package/Cascader.js +1 -1
- package/Checkbox.js +1 -1
- package/ColorPicker.js +1 -1
- package/Comment.js +1 -1
- package/ConfigProvider.js +1 -1
- package/Copy.js +3 -47
- package/Countdown.js +16 -50
- package/DatePicker.js +1 -1
- package/Descriptions.js +1 -1
- package/Details.js +14 -50
- package/Development.js +1 -1
- package/Divider.js +1 -1
- package/Draggable.js +1 -1
- package/Dropdown.js +1 -1
- package/Empty.js +1 -1
- package/Flex.js +15 -51
- package/Form.js +1 -1
- package/Icon.js +1 -1
- package/IconHover.js +1 -1
- package/Image.js +1 -1
- package/InputNumber.js +1 -1
- package/Layout.js +1 -1
- package/Link.js +1 -1
- package/LiquidFill.js +16 -51
- package/List.js +1 -1
- package/Loading.js +14 -50
- package/Marquee.js +23 -46
- package/Mentions.js +1 -1
- package/Menu.js +1 -1
- package/Message.js +1 -1
- package/Modal.js +1 -1
- package/Notice.js +13 -49
- package/Notification.js +1 -1
- package/OverflowEllipsis.js +1 -1
- package/PageHeader.js +1 -1
- package/Popconfirm.js +1 -1
- package/Popover.js +1 -1
- package/Progress.js +1 -1
- package/QrCode.js +14 -51
- package/Radio.js +1 -1
- package/Rate.js +1 -1
- package/ResizeBox.js +1 -1
- package/Result.js +1 -1
- package/RichText.js +12 -13
- package/Segmented.js +15 -50
- package/Skeleton.js +1 -1
- package/Slider.js +1 -1
- package/Space.js +15 -51
- package/Spin.js +1 -1
- package/Statistic.js +1 -1
- package/Steps.js +1 -1
- package/Switch.js +1 -1
- package/Table.js +1 -1
- package/Tabs.js +1 -1
- package/Tag.js +1 -1
- package/Tooltip.js +1 -1
- package/Tour.js +17 -53
- package/Transfer.js +1 -1
- package/Tree.js +1 -1
- package/TreeSelect.js +1 -1
- package/Trigger.js +1 -1
- package/affix/index.js +1 -1
- package/alert/index.js +1 -1
- package/anchor/Anchor.js +2 -2
- package/anchor/Link.js +1 -1
- package/app/App.js +2 -2
- package/auto-complete/index.js +1 -1
- package/avatar/Avatar.js +1 -1
- package/avatar/Group.js +1 -1
- package/back-top/index.js +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb/index.js +2 -2
- package/button/Group.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +2 -2
- package/card/Grid.js +1 -1
- package/card/Meta.js +1 -1
- package/card/index.js +1 -1
- package/carousel/Arrow.js +1 -1
- package/carousel/Indicator.js +1 -1
- package/carousel/index.js +1 -1
- package/cascader/Cascader.js +3 -3
- package/cascader/index.js +1 -1
- package/cascader/util.js +1 -1
- package/checkbox/Checkbox.js +2 -2
- package/checkbox/Group.js +2 -2
- package/checkbox/GroupBlock.js +2 -2
- package/checkbox/index.js +2 -2
- package/chunk/{0BhDjhcd.js → 3t4FwEoB.js} +1 -1
- package/chunk/{KPBMJlOB.js → BHAu6wbC.js} +1 -1
- package/chunk/{DhAvt6tJ.js → Bcl7dWlJ.js} +2 -2
- package/chunk/{CrOzsnI0.js → Bl3hZtxi.js} +1 -1
- package/chunk/{BfVlSL8A.js → Bzx5BueA.js} +3 -3
- package/chunk/CVMFAeSw.js +39 -0
- package/chunk/{C1vY8016.js → CYDaUML7.js} +77 -108
- package/chunk/{CYssV-zz.js → CbXCgtzv.js} +65 -99
- package/chunk/ClNkxEcR.js +154 -0
- package/chunk/{DfUcAhyT.js → CwLSam2p.js} +2 -2
- package/chunk/Cy26_CKq.js +33 -0
- package/chunk/{BiZSULcr.js → D0dVE1v1.js} +317 -350
- package/chunk/{CtCFA4ht.js → DA5AMZwY.js} +3 -3
- package/chunk/{DfbO4QTS.js → DB0hUIM1.js} +1 -1
- package/chunk/{DMv8Hn4u.js → De8RLlOK.js} +1 -1
- package/chunk/{C3kH2ES3.js → DrYaod6k.js} +1 -1
- package/chunk/{CylbdYce.js → DzlfiVe2.js} +1 -1
- package/chunk/gJsdBcpG.js +10 -0
- package/chunk/{Cx92e1S8.js → yWKJUe_w.js} +3 -3
- package/collapse/Collapse.js +1 -1
- package/collapse/Item.js +1 -1
- package/color-picker/ControlBar.js +1 -1
- package/color-picker/InputAlpha.js +1 -1
- package/color-picker/InputHex.js +1 -1
- package/color-picker/InputRgb.js +1 -1
- package/color-picker/Palette.js +1 -1
- package/color-picker/Panel.js +2 -2
- package/color-picker/index.js +1 -1
- package/comment/index.js +1 -1
- package/config-provider/ConfigProvider.js +1 -1
- package/config-provider/context.js +1 -1
- package/config-provider/index.js +2 -2
- package/copy/index.js +22 -66
- package/countdown/index.js +41 -75
- package/date-picker/Picker.js +1 -1
- package/date-picker/RangePicker.js +2 -2
- package/date-picker/index.js +1 -1
- package/descriptions/index.js +1 -1
- package/details/index.js +46 -82
- package/development/index.js +1 -1
- package/divider/index.js +1 -1
- package/draggable/index.js +1 -1
- package/drawer/Drawer.js +1 -1
- package/dropdown/Button.js +1 -1
- package/dropdown/index.js +1 -1
- package/empty/index.js +1 -1
- package/flex/index.js +37 -71
- package/form/Form.js +2 -2
- package/form/FormItem.js +1 -1
- package/form/index.js +1 -1
- package/grid/Grid.js +1 -1
- package/grid/Item.js +1 -1
- package/hooks/index.js +6 -6
- package/hooks/useId.js +1 -1
- package/hooks/useResizeObserver.js +7 -50
- package/hooks/useStateWithPromise.js +1 -1
- package/hooks/useWindowSize.js +1 -1
- package/icon/index.js +1 -1
- package/icon-hover/index.js +1 -1
- package/icons/file.js +1 -1
- package/image/Image.js +2 -2
- package/image/ImagePreview.js +17 -52
- package/image/ImagePreviewArrow.js +1 -1
- package/image/ImagePreviewGroup.js +1 -1
- package/image/index.js +1 -1
- package/index.js +379 -378
- package/input/Button.js +1 -1
- package/input/Group.js +1 -1
- package/input/Input.js +1 -1
- package/input/InputElement.js +1 -1
- package/input/Password.js +1 -1
- package/input/Search.js +1 -1
- package/input/Textarea.js +1 -1
- package/input-number/index.js +1 -1
- package/input-tag/InputTag.js +1 -1
- package/layout/Content.js +1 -1
- package/layout/Footer.js +1 -1
- package/layout/Header.js +1 -1
- package/layout/Sider.js +1 -1
- package/layout/index.js +1 -1
- package/link/index.js +1 -1
- package/liquid-fill/index.js +56 -91
- package/list/Item.js +1 -1
- package/list/Meta.js +1 -1
- package/list/index.js +1 -1
- package/loading/index.js +26 -62
- package/marquee/index.js +70 -93
- package/marquee-/index.js +73 -96
- package/mentions/index.js +1 -1
- package/menu/Menu.js +3 -3
- package/menu/OverflowWrap.js +1 -1
- package/menu/index.js +2 -2
- package/message/index.js +1 -1
- package/message/useMessage.js +1 -1
- package/modal/Confirm.js +2 -2
- package/modal/Modal.js +2 -2
- package/modal/index.js +2 -2
- package/notice/index.js +13 -49
- package/notification/index.js +1 -1
- package/notification/useNotification.js +1 -1
- package/overflow-ellipsis/OverflowItem.js +1 -1
- package/overflow-ellipsis/index.js +1 -1
- package/package.json +1 -1
- package/page-header/index.js +1 -1
- package/pagination/PageItem.js +1 -1
- package/pagination/PageJumper.js +1 -1
- package/pagination/PageOption.js +1 -1
- package/pagination/Pagination.js +1 -1
- package/picker/Input.js +1 -1
- package/picker/InputRange.js +1 -1
- package/popconfirm/index.js +1 -1
- package/popover/index.js +1 -1
- package/progress/CircleProgress.js +1 -1
- package/progress/index.js +1 -1
- package/qr-code/index.js +26 -63
- package/radio/Group.js +2 -2
- package/radio/GroupBlock.js +2 -2
- package/radio/Radio.js +2 -2
- package/radio/index.js +2 -2
- package/rate/index.js +1 -1
- package/resize-box/ResizeTrigger.js +1 -1
- package/resize-box/Split.js +1 -1
- package/resize-box/SplitGroup.js +1 -1
- package/resize-box/index.js +1 -1
- package/result/index.js +1 -1
- package/rich-text/index.js +6332 -77
- package/rich-text/lib/diff/index.d.ts +21 -0
- package/row-col/Col-.js +1 -1
- package/row-col/Col.js +1 -1
- package/row-col/Row.js +1 -1
- package/segmented/index.js +118 -153
- package/select/Option.js +44 -41
- package/select/Select.js +10 -12
- package/select-view/Core.js +1 -1
- package/skeleton/index.js +1 -1
- package/slider/Button.js +1 -1
- package/slider/index.js +1 -1
- package/space/index.js +23 -59
- package/spin/DotLoading.js +1 -1
- package/spin/index.js +1 -1
- package/splitter/Panel.js +1 -1
- package/splitter/SplitBar.js +2 -2
- package/splitter/Splitter.js +2 -2
- package/statistic/index.js +1 -1
- package/steps/index.js +1 -1
- package/style.css +1 -1
- package/switch/index.js +1 -1
- package/table/Table.js +14 -53
- package/table/index.js +77 -120
- package/tabs/Tab.js +3 -3
- package/tabs/TabContent.js +2 -2
- package/tabs/TabPane.js +1 -1
- package/tabs/index.js +2 -2
- package/tag/index.js +1 -1
- package/time-picker/Picker.js +1 -1
- package/time-picker/TimePicker.js +1 -1
- package/timeline/Item.js +1 -1
- package/timeline/Timeline.js +1 -1
- package/tooltip/index.js +1 -1
- package/tour/index.js +80 -116
- package/transfer/Item.js +2 -2
- package/transfer/List.js +2 -2
- package/transfer/index.js +1 -1
- package/tree/Animation.js +2 -2
- package/tree/Node.js +3 -3
- package/tree/NodeList.js +1 -1
- package/tree/Tree.js +2 -2
- package/tree/index.js +1 -1
- package/tree-select/Select.js +3 -3
- package/tree-select/index.js +1 -1
- package/trigger/index.js +1 -1
- package/types/common/hooks/src/use-theme/index.d.ts +2 -2
- package/types/common/hooks/useStateWithPromise.d.ts +1 -1
- package/types/common/utils/dom.d.ts +12 -0
- package/types/pc/carousel/interface.d.ts +2 -2
- package/types/pc/color-picker/Panel.d.ts +1 -1
- package/types/pc/date-picker/RangePicker.d.ts +1 -1
- package/types/pc/index.d.ts +1 -1
- package/types/pc/list/interface.d.ts +2 -2
- package/types/pc/menu/context.d.ts +1 -1
- package/types/pc/rich-text/index.d.ts +7 -4
- package/types/pc/rich-text/interface.d.ts +3 -2
- package/types/pc/rich-text/{core → lib/core}/editor.d.ts +1 -1
- package/types/pc/rich-text/{core → lib/core}/rich.d.ts +3 -7
- package/types/pc/rich-text/{core → lib/core}/selection.d.ts +1 -0
- package/types/pc/rich-text/{core.d.ts → lib/core.d.ts} +1 -1
- package/types/pc/rich-text/lib/delta/AttributeMap.d.ts +15 -0
- package/types/pc/rich-text/lib/delta/Op.d.ts +13 -0
- package/types/pc/rich-text/lib/delta/OpIterator.d.ts +14 -0
- package/types/pc/rich-text/lib/delta/index.d.ts +53 -0
- package/types/pc/rich-text/lib/diff/index.d.ts +40 -0
- package/types/pc/rich-text/{formats → lib/formats}/bold.d.ts +1 -1
- package/types/pc/rich-text/{formats → lib/formats}/font.d.ts +1 -1
- package/types/pc/rich-text/lib/formats/hr.d.ts +5 -0
- package/types/pc/rich-text/lib/formats/image-resize/index.d.ts +27 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/BaseModule.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/DisplaySize.d.ts +5 -0
- package/types/pc/rich-text/lib/formats/image-resize/modules/Resize.d.ts +13 -0
- package/types/pc/rich-text/lib/formats/image-resize/options.d.ts +7 -0
- package/types/pc/rich-text/lib/formats/liOl.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/liUl.d.ts +10 -0
- package/types/pc/rich-text/lib/formats/lineHeight.d.ts +3 -0
- package/types/pc/rich-text/{formats → lib/formats}/list.d.ts +1 -0
- package/types/pc/rich-text/{formats → lib/formats}/table.d.ts +3 -3
- package/types/pc/rich-text/{modules → lib/modules}/clipboard.d.ts +2 -2
- package/types/pc/rich-text/{modules → lib/modules}/history.d.ts +1 -1
- package/types/pc/rich-text/{modules → lib/modules}/keyboard.d.ts +1 -1
- package/types/pc/rich-text/{modules → lib/modules}/syntax.d.ts +2 -2
- package/types/pc/rich-text/{modules → lib/modules}/tableEmbed.d.ts +3 -3
- package/types/pc/rich-text/{modules → lib/modules}/toolbar.d.ts +1 -1
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/attributor.d.ts +3 -3
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/style.d.ts +2 -2
- package/types/pc/rich-text/{ui → lib/ui}/icons.d.ts +5 -1
- package/types/pc/rich-text/{ui → lib/ui}/picker.d.ts +1 -0
- package/types/pc/tabs/hook/useDomSize.d.ts +2 -2
- package/types/pc/tabs/hook/useHeaderScroll.d.ts +2 -2
- package/types/pc/tree-select/hook/useStateValue.d.ts +2 -2
- package/types/pc/utils/date.d.ts +1 -0
- package/types/pc/utils/index.d.ts +2 -2
- package/typography/Base.js +1 -1
- package/typography/Ellipsis.js +70 -114
- package/typography/Operations.js +29 -74
- package/typography/Paragraph.js +1 -1
- package/typography/Typography.js +1 -1
- package/upload/TriggerNode.js +1 -1
- package/upload/Upload.js +1 -1
- package/utils/contextHolder.js +1 -1
- package/utils/date.js +1 -0
- package/utils/index.js +70 -70
- package/verification-code/VerificationCode.js +1 -1
- package/version/index.js +1 -1
- package/virtual-list/VirtualList.js +218 -217
- package/watermark/Watermark.js +1 -1
- package/chunk/BCmfDFV4.js +0 -4237
- package/chunk/BG6j6Ct7.js +0 -30
- package/chunk/C5CbL5ku.js +0 -56
- package/chunk/DsuIQH0F.js +0 -200
- package/chunk/vP3qfmKM.js +0 -84
- package/rich-text/core.js +0 -11
- package/rich-text/rich.js +0 -1347
- package/types/common/utils/index.d.ts +0 -47
- package/types/common/utils/keyboardCode.d.ts +0 -4
- package/types/common/utils/math.d.ts +0 -1
- package/types/common/utils/reactTransitionGroup.d.ts +0 -1
- package/types/common/utils/uuid.d.ts +0 -1
- package/types/common/utils/validate.d.ts +0 -1
- package/types/pc/rich-text/delta/AttributeMap.d.ts +0 -10
- package/types/pc/rich-text/delta/Op.d.ts +0 -11
- package/types/pc/rich-text/delta/OpIterator.d.ts +0 -13
- package/types/pc/rich-text/delta/index.d.ts +0 -45
- package/types/common/hooks/src/utils/{index.d.ts → is.d.ts} +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/block.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/break.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/container.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/cursor.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/embed.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/inline.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/scroll.d.ts +0 -0
- package/types/pc/rich-text/{blots → lib/blots}/text.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/composition.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/emitter.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/instances.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/logger.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/module.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/theme.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/utils/createRegistryWithFormats.d.ts +0 -0
- package/types/pc/rich-text/{core → lib/core}/utils/scrollRectIntoView.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/align.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/background.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/blockquote.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/code.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/color.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/direction.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/formula.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/header.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/image.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/indent.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/italic.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/link.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/script.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/size.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/strike.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/underline.d.ts +0 -0
- package/types/pc/rich-text/{formats → lib/formats}/video.d.ts +0 -0
- package/types/pc/rich-text/{rich.d.ts → lib/index.d.ts} +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/input.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/index.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/googleDocs.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/normalizeExternalHTML/normalizers/msWord.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/table.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/uiNode.d.ts +0 -0
- package/types/pc/rich-text/{modules → lib/modules}/uploader.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/class.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/attributor/store.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/blot.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/container.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/leaf.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/parent.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/abstract/shadow.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/block.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/embed.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/inline.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/scroll.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/blot/text.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-list.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/collection/linked-node.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/error.d.ts +0 -0
- package/types/pc/rich-text/{parchment → lib/parchment}/index.d.ts +1 -1
- /package/types/pc/rich-text/{parchment → lib/parchment}/registry.d.ts +0 -0
- /package/types/pc/rich-text/{parchment → lib/parchment}/scope.d.ts +0 -0
- /package/types/pc/rich-text/{themes → lib/themes}/base.d.ts +0 -0
- /package/types/pc/rich-text/{themes → lib/themes}/pqb.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/color-picker.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/icon-picker.d.ts +0 -0
- /package/types/pc/rich-text/{ui → lib/ui}/tooltip.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s, jsxs as M } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import pe from "@unicom-cloud/icons/IconUiClose";
|
|
3
|
+
import pt from "@unicom-cloud/icons/IconUiCopy";
|
|
4
4
|
import gt from "@unicom-cloud/icons/IconUiFullscreen";
|
|
5
5
|
import ht from "@unicom-cloud/icons/IconUiLeft";
|
|
6
6
|
import vt from "@unicom-cloud/icons/IconUiLoading";
|
|
@@ -11,75 +11,41 @@ import kt from "@unicom-cloud/icons/IconUiRotateRight";
|
|
|
11
11
|
import Ct from "@unicom-cloud/icons/IconUiZoomIn";
|
|
12
12
|
import It from "@unicom-cloud/icons/IconUiZoomOut";
|
|
13
13
|
import St from "lodash/isUndefined";
|
|
14
|
-
import { useState as
|
|
15
|
-
import { a as Nt, b as zt } from "./
|
|
14
|
+
import { useState as p, forwardRef as wt, useContext as ge, useRef as x, useMemo as he, useImperativeHandle as Pt, useCallback as Lt, useEffect as v } from "react";
|
|
15
|
+
import { a as Nt, b as zt } from "./CYDaUML7.js";
|
|
16
16
|
import "./DsaQZE4X.js";
|
|
17
|
-
import "@unicom-cloud/utils/date";
|
|
18
|
-
import "@unicom-cloud/utils/case-name";
|
|
19
|
-
import ve from "@unicom-cloud/utils/class-name";
|
|
20
|
-
import "@unicom-cloud/utils/constant/ui";
|
|
21
|
-
import Mt from "@unicom-cloud/utils/clipboard-copy";
|
|
22
|
-
import "./DS_deHpN.js";
|
|
23
|
-
import { a as At, b as j, o as H } from "./d1c9z8T1.js";
|
|
24
|
-
import "@unicom-cloud/utils/emitter";
|
|
25
|
-
import "@unicom-cloud/utils/file/fileToURL";
|
|
26
|
-
import "lodash/escapeRegExp";
|
|
27
|
-
import Tt from "lodash/isArray";
|
|
28
|
-
import "lodash/isNumber";
|
|
29
|
-
import "lodash/isString";
|
|
30
|
-
import "lodash/isFunction";
|
|
31
|
-
import "lodash/throttle";
|
|
32
|
-
import "lodash/camelCase";
|
|
33
|
-
import "lodash/capitalize";
|
|
34
|
-
import "lodash/cloneDeep";
|
|
35
|
-
import "lodash/debounce";
|
|
36
|
-
import "lodash/get";
|
|
37
|
-
import "lodash/has";
|
|
38
|
-
import "lodash/kebabCase";
|
|
39
|
-
import "lodash/merge";
|
|
40
|
-
import "lodash/mergeWith";
|
|
41
|
-
import "lodash/set";
|
|
42
|
-
import "lodash/setWith";
|
|
43
|
-
import "lodash/snakeCase";
|
|
44
|
-
import "lodash/startCase";
|
|
45
|
-
import "lodash/uniq";
|
|
46
|
-
import "lodash/upperFirst";
|
|
47
|
-
import "@unicom-cloud/utils/math";
|
|
48
|
-
import "lodash/isPlainObject";
|
|
49
|
-
import "@unicom-cloud/utils/pinyin";
|
|
50
|
-
import { P as be } from "./B--6x-RL.js";
|
|
51
|
-
import { f as Et } from "./CXrVhA6-.js";
|
|
52
|
-
import "./BJ9_azwQ.js";
|
|
53
|
-
import { r as Ot } from "./CHQ8c547.js";
|
|
54
|
-
import "@unicom-cloud/utils/file/saveAs";
|
|
55
|
-
import "@unicom-cloud/utils/screenfull";
|
|
56
|
-
import "@unicom-cloud/utils/constant/ui.js";
|
|
57
|
-
import "@unicom-cloud/utils/tinycolor";
|
|
58
|
-
import "@unicom-cloud/utils/ui-color";
|
|
59
|
-
import "react-is";
|
|
60
|
-
import "@unicom-cloud/utils/tree";
|
|
61
|
-
import "@unicom-cloud/utils/is";
|
|
62
|
-
import "uuid";
|
|
63
|
-
import "./hc_ufgVf.js";
|
|
64
|
-
import { ArrowDown as $t, ArrowUp as Rt, ArrowLeft as Ut, ArrowRight as Dt, Esc as Vt } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
65
17
|
import "@unicom-cloud/utils/constant/platform";
|
|
66
18
|
import "./CdXR6dj7.js";
|
|
67
19
|
import "@unicom-cloud/utils/js-cookie";
|
|
68
20
|
import "dayjs";
|
|
69
|
-
import
|
|
70
|
-
import "./
|
|
21
|
+
import "lodash/debounce";
|
|
22
|
+
import { u as Mt } from "./DfChiMIE.js";
|
|
23
|
+
import "@unicom-cloud/utils/screenfull";
|
|
24
|
+
import "./ClNkxEcR.js";
|
|
25
|
+
import "lodash/throttle";
|
|
26
|
+
import "lodash/isPlainObject";
|
|
71
27
|
import "@unicom-cloud/utils/query-string";
|
|
72
28
|
import "react-router";
|
|
73
29
|
import "lodash/isEqualWith";
|
|
74
|
-
import { u as
|
|
30
|
+
import { u as At } from "./2vdCeheu.js";
|
|
31
|
+
import { ArrowDown as Tt, ArrowUp as Et, ArrowLeft as Ot, ArrowRight as $t, Esc as Rt } from "@unicom-cloud/utils/constant/keyboardCode";
|
|
32
|
+
import "lodash/isNumber";
|
|
33
|
+
import "lodash/merge";
|
|
34
|
+
import { a as Ut, b as j, o as H } from "./d1c9z8T1.js";
|
|
75
35
|
import "./RjJoagzL.js";
|
|
76
|
-
import { u as
|
|
77
|
-
import { u as
|
|
36
|
+
import { u as Dt } from "./FgWHhRFz.js";
|
|
37
|
+
import { u as Vt } from "./BqWBaRtM.js";
|
|
38
|
+
import { f as Yt } from "./CXrVhA6-.js";
|
|
78
39
|
import "@unicom-cloud/utils/constant";
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
40
|
+
import Xt from "../portal/index.js";
|
|
41
|
+
import { P as ve } from "./B--6x-RL.js";
|
|
42
|
+
import be from "@unicom-cloud/utils/class-name";
|
|
43
|
+
import Bt from "@unicom-cloud/utils/clipboard-copy";
|
|
44
|
+
import { r as Ft } from "./CHQ8c547.js";
|
|
45
|
+
import Wt from "../image/ImagePreviewArrow.js";
|
|
46
|
+
import Zt from "../image/ImagePreviewToolbar.js";
|
|
47
|
+
import { PreviewGroupContext as jt } from "../image/previewGroupContext.js";
|
|
48
|
+
import Ht from "lodash/isArray";
|
|
83
49
|
function Gt(c, t, n, o, r) {
|
|
84
50
|
let m = n, f = o;
|
|
85
51
|
return n && (c.width > t.width ? m = 0 : (t.left > c.left && (m -= Math.abs(c.left - t.left) / r), t.right < c.right && (m += Math.abs(c.right - t.right) / r))), o && (c.height > t.height ? f = 0 : (t.top > c.top && (f -= Math.abs(c.top - t.top) / r), t.bottom < c.bottom && (f += Math.abs(c.bottom - t.bottom) / r))), [m, f];
|
|
@@ -118,7 +84,7 @@ class _t {
|
|
|
118
84
|
}
|
|
119
85
|
updateScale(t) {
|
|
120
86
|
let n = ye;
|
|
121
|
-
if (
|
|
87
|
+
if (Ht(t) && t.filter((o) => o > 0).length && (n = t.filter((o) => o > 0)), n = n.map((o) => +(o / 100).toFixed(2)), !n.includes(1)) {
|
|
122
88
|
const o = this.findClosestIndex(1, n), m = n[o] < 1 ? o + 1 : o;
|
|
123
89
|
n.splice(m, 0, 1);
|
|
124
90
|
}
|
|
@@ -150,7 +116,7 @@ class _t {
|
|
|
150
116
|
}
|
|
151
117
|
}
|
|
152
118
|
function qt(c) {
|
|
153
|
-
const [t, n] =
|
|
119
|
+
const [t, n] = p(c);
|
|
154
120
|
return {
|
|
155
121
|
status: t,
|
|
156
122
|
isBeforeLoad: t === "beforeLoad",
|
|
@@ -193,7 +159,7 @@ function Jt(c, t) {
|
|
|
193
159
|
setCurrentIndex: m,
|
|
194
160
|
infinite: f,
|
|
195
161
|
previewPropsMap: _
|
|
196
|
-
} = ge(
|
|
162
|
+
} = ge(jt), xe = n ? _.get(r) : {}, A = Dt(
|
|
197
163
|
c,
|
|
198
164
|
Kt,
|
|
199
165
|
xe
|
|
@@ -215,10 +181,10 @@ function Jt(c, t) {
|
|
|
215
181
|
imageRender: Te,
|
|
216
182
|
extra: Ee = null,
|
|
217
183
|
resetTranslate: J
|
|
218
|
-
} = A, S = n ? o.get(r) : Ie, [E, Oe] =
|
|
184
|
+
} = A, S = n ? o.get(r) : Ie, [E, Oe] = p(S), [l, $e] = At(!1, {
|
|
219
185
|
defaultValue: Se,
|
|
220
186
|
value: A.visible
|
|
221
|
-
}), Q = ge(Nt), { getPrefixCls: Re, locale: C, rtl: Ue } = Q, ee = Re?.("image"), u = `${ee}-preview`, De =
|
|
187
|
+
}), Q = ge(Nt), { getPrefixCls: Re, locale: C, rtl: Ue } = Q, ee = Re?.("image"), u = `${ee}-preview`, De = be(
|
|
222
188
|
u,
|
|
223
189
|
{
|
|
224
190
|
[`${u}-hide`]: !l,
|
|
@@ -230,7 +196,7 @@ function Jt(c, t) {
|
|
|
230
196
|
pageY: 0,
|
|
231
197
|
originX: 0,
|
|
232
198
|
originY: 0
|
|
233
|
-
}), { isLoading: Ye, isLoaded: Xe, setStatus: $ } = qt("loading"), [Be, Fe] =
|
|
199
|
+
}), { isLoading: Ye, isLoaded: Xe, setStatus: $ } = qt("loading"), [Be, Fe] = p(!1), [d, R] = p({ x: 0, y: 0 }), [a, U] = p(1), [oe, ne] = p(!1), [P, D] = p(0), [g, re] = p(!1), y = he(() => new _t(T), []), {
|
|
234
200
|
onLoad: We,
|
|
235
201
|
onError: Ze,
|
|
236
202
|
onMouseDown: je,
|
|
@@ -245,13 +211,13 @@ function Jt(c, t) {
|
|
|
245
211
|
reset: V,
|
|
246
212
|
getRootDOMNode: () => te.current
|
|
247
213
|
}));
|
|
248
|
-
const [L, qe] =
|
|
214
|
+
const [L, qe] = p(), ae = Lt(() => L, [L]);
|
|
249
215
|
v(() => {
|
|
250
|
-
const e = q?.(), i =
|
|
216
|
+
const e = q?.(), i = Yt(e) || document.body;
|
|
251
217
|
qe(i);
|
|
252
|
-
}, [q]),
|
|
218
|
+
}, [q]), Vt(ae, { hidden: l });
|
|
253
219
|
const Ke = he(
|
|
254
|
-
() => !
|
|
220
|
+
() => !Ut && L === document.body,
|
|
255
221
|
[L]
|
|
256
222
|
);
|
|
257
223
|
function ce(e) {
|
|
@@ -299,7 +265,7 @@ function Jt(c, t) {
|
|
|
299
265
|
e.target === e.currentTarget && we && z();
|
|
300
266
|
}
|
|
301
267
|
function rt() {
|
|
302
|
-
|
|
268
|
+
Bt(E);
|
|
303
269
|
}
|
|
304
270
|
function me() {
|
|
305
271
|
z();
|
|
@@ -322,24 +288,24 @@ function Jt(c, t) {
|
|
|
322
288
|
const e = b.current.getBoundingClientRect(), i = w.current.getBoundingClientRect(), [h, k] = Gt(
|
|
323
289
|
e,
|
|
324
290
|
i,
|
|
325
|
-
|
|
326
|
-
|
|
291
|
+
d.x,
|
|
292
|
+
d.y,
|
|
327
293
|
a
|
|
328
294
|
);
|
|
329
|
-
(h !==
|
|
295
|
+
(h !== d.x || k !== d.y) && R({
|
|
330
296
|
x: h,
|
|
331
297
|
y: k
|
|
332
298
|
});
|
|
333
299
|
}, ue = (e) => {
|
|
334
300
|
if (l && g) {
|
|
335
301
|
e.preventDefault?.();
|
|
336
|
-
const { originX: i, originY: h, pageX: k, pageY: Z } = I.current, ut = i + (e.pageX - k) / a,
|
|
302
|
+
const { originX: i, originY: h, pageX: k, pageY: Z } = I.current, ut = i + (e.pageX - k) / a, dt = h + (e.pageY - Z) / a;
|
|
337
303
|
R({
|
|
338
304
|
x: ut,
|
|
339
|
-
y:
|
|
305
|
+
y: dt
|
|
340
306
|
});
|
|
341
307
|
}
|
|
342
|
-
},
|
|
308
|
+
}, de = (e) => {
|
|
343
309
|
e.preventDefault?.(), re(!1);
|
|
344
310
|
};
|
|
345
311
|
function at(e) {
|
|
@@ -351,37 +317,37 @@ function Jt(c, t) {
|
|
|
351
317
|
const lt = (e) => {
|
|
352
318
|
e.preventDefault?.(), re(!0);
|
|
353
319
|
const i = e.type === "touchstart" ? e.touches[0] : e;
|
|
354
|
-
I.current.pageX = i.pageX, I.current.pageY = i.pageY, I.current.originX =
|
|
320
|
+
I.current.pageX = i.pageX, I.current.pageY = i.pageY, I.current.originX = d.x, I.current.originY = d.y, je?.(e);
|
|
355
321
|
};
|
|
356
|
-
v(() => (l && g && (j(document, "mousemove", ue, !1), j(document, "mouseup",
|
|
357
|
-
H(document, "mousemove", ue, !1), H(document, "mouseup",
|
|
322
|
+
v(() => (l && g && (j(document, "mousemove", ue, !1), j(document, "mouseup", de, !1)), () => {
|
|
323
|
+
H(document, "mousemove", ue, !1), H(document, "mouseup", de, !1);
|
|
358
324
|
}), [l, g]), v(() => {
|
|
359
325
|
J && !g && fe();
|
|
360
|
-
}, [g,
|
|
326
|
+
}, [g, d]), v(() => {
|
|
361
327
|
J && fe();
|
|
362
328
|
}, [a]), v(() => {
|
|
363
329
|
l && V();
|
|
364
330
|
}, [l]), v(() => {
|
|
365
331
|
Oe(S), $(S ? "loading" : "loaded"), V();
|
|
366
|
-
}, [S]),
|
|
332
|
+
}, [S]), Mt(() => {
|
|
367
333
|
y.updateScale(T), U(1);
|
|
368
334
|
}, [T]), v(() => {
|
|
369
335
|
const e = (i) => {
|
|
370
336
|
if (i)
|
|
371
337
|
switch (i.key) {
|
|
372
|
-
case
|
|
338
|
+
case Rt.key:
|
|
373
339
|
K && z();
|
|
374
340
|
break;
|
|
375
|
-
case
|
|
341
|
+
case $t.key:
|
|
376
342
|
X();
|
|
377
343
|
break;
|
|
378
|
-
case
|
|
344
|
+
case Ot.key:
|
|
379
345
|
Y();
|
|
380
346
|
break;
|
|
381
|
-
case
|
|
347
|
+
case Et.key:
|
|
382
348
|
F();
|
|
383
349
|
break;
|
|
384
|
-
case
|
|
350
|
+
case Tt.key:
|
|
385
351
|
W();
|
|
386
352
|
break;
|
|
387
353
|
}
|
|
@@ -447,18 +413,18 @@ function Jt(c, t) {
|
|
|
447
413
|
{
|
|
448
414
|
key: "copy",
|
|
449
415
|
name: "复制",
|
|
450
|
-
content: /* @__PURE__ */ s(
|
|
416
|
+
content: /* @__PURE__ */ s(pt, {}),
|
|
451
417
|
onClick: rt
|
|
452
418
|
},
|
|
453
419
|
{
|
|
454
420
|
key: "close",
|
|
455
421
|
name: "关闭",
|
|
456
|
-
content: /* @__PURE__ */ s(
|
|
422
|
+
content: /* @__PURE__ */ s(pe, {}),
|
|
457
423
|
onClick: me
|
|
458
424
|
}
|
|
459
425
|
].filter(Boolean);
|
|
460
426
|
v(() => {
|
|
461
|
-
const e =
|
|
427
|
+
const e = Ft([b.current], st);
|
|
462
428
|
return () => {
|
|
463
429
|
e();
|
|
464
430
|
};
|
|
@@ -469,12 +435,12 @@ function Jt(c, t) {
|
|
|
469
435
|
{
|
|
470
436
|
onWheel: tt,
|
|
471
437
|
ref: w,
|
|
472
|
-
className:
|
|
438
|
+
className: be(Ge, `${u}-img`, {
|
|
473
439
|
[`${u}-img-moving`]: g
|
|
474
440
|
}),
|
|
475
441
|
style: {
|
|
476
442
|
...He,
|
|
477
|
-
transform: `translate(${
|
|
443
|
+
transform: `translate(${d.x}px, ${d.y}px) rotate(${P}deg)`
|
|
478
444
|
},
|
|
479
445
|
src: E,
|
|
480
446
|
..._e,
|
|
@@ -488,7 +454,7 @@ function Jt(c, t) {
|
|
|
488
454
|
);
|
|
489
455
|
return Te?.(e) ?? e;
|
|
490
456
|
};
|
|
491
|
-
return /* @__PURE__ */ s(
|
|
457
|
+
return /* @__PURE__ */ s(Xt, { visible: l, forceRender: !1, getContainer: ae, children: /* @__PURE__ */ s(
|
|
492
458
|
zt,
|
|
493
459
|
{
|
|
494
460
|
...Q,
|
|
@@ -505,7 +471,7 @@ function Jt(c, t) {
|
|
|
505
471
|
ref: te,
|
|
506
472
|
children: [
|
|
507
473
|
/* @__PURE__ */ s(
|
|
508
|
-
|
|
474
|
+
ve,
|
|
509
475
|
{
|
|
510
476
|
in: l,
|
|
511
477
|
timeout: 400,
|
|
@@ -543,7 +509,7 @@ function Jt(c, t) {
|
|
|
543
509
|
}
|
|
544
510
|
),
|
|
545
511
|
/* @__PURE__ */ s(
|
|
546
|
-
|
|
512
|
+
ve,
|
|
547
513
|
{
|
|
548
514
|
in: oe,
|
|
549
515
|
timeout: 400,
|
|
@@ -557,7 +523,7 @@ function Jt(c, t) {
|
|
|
557
523
|
}
|
|
558
524
|
),
|
|
559
525
|
Xe && /* @__PURE__ */ s(
|
|
560
|
-
|
|
526
|
+
Zt,
|
|
561
527
|
{
|
|
562
528
|
prefixCls: ee,
|
|
563
529
|
previewPrefixCls: u,
|
|
@@ -572,11 +538,11 @@ function Jt(c, t) {
|
|
|
572
538
|
{
|
|
573
539
|
className: `${u}-close-btn`,
|
|
574
540
|
onClick: me,
|
|
575
|
-
children: /* @__PURE__ */ s(
|
|
541
|
+
children: /* @__PURE__ */ s(pe, {})
|
|
576
542
|
}
|
|
577
543
|
),
|
|
578
544
|
n && /* @__PURE__ */ s(
|
|
579
|
-
|
|
545
|
+
Wt,
|
|
580
546
|
{
|
|
581
547
|
previewCount: o.size,
|
|
582
548
|
current: r,
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { useRef as f, useEffect as b, useState as L } from "react";
|
|
2
|
+
import { u as h } from "./DfChiMIE.js";
|
|
3
|
+
import { isBrowser as d } from "@unicom-cloud/utils/constant/platform";
|
|
4
|
+
import "./DsaQZE4X.js";
|
|
5
|
+
import { isFunction as E } from "@unicom-cloud/utils/is";
|
|
6
|
+
import { i as x } from "./CdXR6dj7.js";
|
|
7
|
+
import { d as p } from "./CN7NKv_2.js";
|
|
8
|
+
function A(e) {
|
|
9
|
+
const t = f(e);
|
|
10
|
+
return t.current = e, t;
|
|
11
|
+
}
|
|
12
|
+
function R(e, t) {
|
|
13
|
+
if (!d)
|
|
14
|
+
return;
|
|
15
|
+
if (!e)
|
|
16
|
+
return t;
|
|
17
|
+
let n;
|
|
18
|
+
return E(e) ? n = e() : "current" in e ? n = e.current : n = e, n;
|
|
19
|
+
}
|
|
20
|
+
const T = (e) => {
|
|
21
|
+
x && (E(e) || console.error(
|
|
22
|
+
`useUnmount expected parameter is a function, got ${typeof e}`
|
|
23
|
+
));
|
|
24
|
+
const t = A(e);
|
|
25
|
+
b(
|
|
26
|
+
() => () => {
|
|
27
|
+
t.current();
|
|
28
|
+
},
|
|
29
|
+
[]
|
|
30
|
+
);
|
|
31
|
+
}, y = (e) => (n, s, u) => {
|
|
32
|
+
const i = f(!1), r = f([]), c = f([]), o = f(void 0);
|
|
33
|
+
e(() => {
|
|
34
|
+
const l = (Array.isArray(u) ? u : [u]).map((N) => R(N));
|
|
35
|
+
if (!i.current) {
|
|
36
|
+
i.current = !0, r.current = l, c.current = s, o.current = n();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
(l.length !== r.current.length || !p(r.current, l) || !p(c.current, s)) && (o.current?.(), r.current = l, c.current = s, o.current = n());
|
|
40
|
+
}), T(() => {
|
|
41
|
+
o.current?.(), i.current = !1;
|
|
42
|
+
});
|
|
43
|
+
}, W = y(b), B = (e, {
|
|
44
|
+
manual: t,
|
|
45
|
+
ready: n = !0,
|
|
46
|
+
defaultParams: s = [],
|
|
47
|
+
refreshDeps: u = [],
|
|
48
|
+
refreshDepsAction: i
|
|
49
|
+
}) => {
|
|
50
|
+
const r = f(!1);
|
|
51
|
+
return r.current = !1, h(() => {
|
|
52
|
+
!t && n && (r.current = !0, e.run(...s));
|
|
53
|
+
}, [n]), h(() => {
|
|
54
|
+
r.current || t || (r.current = !0, i ? i() : e.refresh());
|
|
55
|
+
}, [...u]), {
|
|
56
|
+
onBefore: () => {
|
|
57
|
+
if (!n)
|
|
58
|
+
return {
|
|
59
|
+
stopNow: !0
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
B.onInit = ({ ready: e = !0, manual: t }) => ({
|
|
65
|
+
loading: !t && e
|
|
66
|
+
});
|
|
67
|
+
function S() {
|
|
68
|
+
return d ? document.visibilityState !== "hidden" : !0;
|
|
69
|
+
}
|
|
70
|
+
const m = /* @__PURE__ */ new Set();
|
|
71
|
+
function P(e) {
|
|
72
|
+
return m.add(e), function() {
|
|
73
|
+
m.has(e) && m.delete(e);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (d) {
|
|
77
|
+
const e = () => {
|
|
78
|
+
S() && m.forEach((t) => t());
|
|
79
|
+
};
|
|
80
|
+
window.addEventListener("visibilitychange", e, !1);
|
|
81
|
+
}
|
|
82
|
+
const O = () => d && typeof navigator.onLine < "u" ? navigator.onLine : !0, g = /* @__PURE__ */ new Set();
|
|
83
|
+
function V(e) {
|
|
84
|
+
return g.add(e), function() {
|
|
85
|
+
g.has(e) && g.delete(e);
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (d) {
|
|
89
|
+
const e = () => {
|
|
90
|
+
!S() || !O() || g.forEach((t) => t());
|
|
91
|
+
};
|
|
92
|
+
window.addEventListener("visibilitychange", e, !1), window.addEventListener("focus", e, !1);
|
|
93
|
+
}
|
|
94
|
+
const w = {
|
|
95
|
+
top: NaN,
|
|
96
|
+
left: NaN,
|
|
97
|
+
bottom: NaN,
|
|
98
|
+
right: NaN,
|
|
99
|
+
height: NaN,
|
|
100
|
+
width: NaN
|
|
101
|
+
}, v = {
|
|
102
|
+
text: "",
|
|
103
|
+
...w
|
|
104
|
+
};
|
|
105
|
+
function U(e) {
|
|
106
|
+
if (!e || e.rangeCount < 1)
|
|
107
|
+
return w;
|
|
108
|
+
const t = e.getRangeAt(0), { height: n, width: s, top: u, left: i, right: r, bottom: c } = t.getBoundingClientRect();
|
|
109
|
+
return {
|
|
110
|
+
height: n,
|
|
111
|
+
width: s,
|
|
112
|
+
top: u,
|
|
113
|
+
left: i,
|
|
114
|
+
right: r,
|
|
115
|
+
bottom: c
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function k(e) {
|
|
119
|
+
const [t, n] = L(v), s = f(t), u = f(!1);
|
|
120
|
+
return s.current = t, W(
|
|
121
|
+
() => {
|
|
122
|
+
const i = R(e, document);
|
|
123
|
+
if (!i)
|
|
124
|
+
return;
|
|
125
|
+
const r = () => {
|
|
126
|
+
let o = null, a = "", l = w;
|
|
127
|
+
window.getSelection && (o = window.getSelection(), a = o ? o.toString() : "", a && u.current && (l = U(o), n({ ...t, text: a, ...l })));
|
|
128
|
+
}, c = (o) => {
|
|
129
|
+
if (o.button === 2 || !window.getSelection)
|
|
130
|
+
return;
|
|
131
|
+
s.current.text && n({ ...v }), u.current = !1;
|
|
132
|
+
const a = window.getSelection();
|
|
133
|
+
a && (a.removeAllRanges(), u.current = i.contains(o.target));
|
|
134
|
+
};
|
|
135
|
+
return i.addEventListener("mouseup", r), document.addEventListener("mousedown", c), () => {
|
|
136
|
+
i.removeEventListener("mouseup", r), document.removeEventListener("mousedown", c);
|
|
137
|
+
};
|
|
138
|
+
},
|
|
139
|
+
[],
|
|
140
|
+
e
|
|
141
|
+
), t;
|
|
142
|
+
}
|
|
143
|
+
export {
|
|
144
|
+
k as a,
|
|
145
|
+
T as b,
|
|
146
|
+
y as c,
|
|
147
|
+
W as d,
|
|
148
|
+
V as e,
|
|
149
|
+
B as f,
|
|
150
|
+
R as g,
|
|
151
|
+
S as i,
|
|
152
|
+
P as s,
|
|
153
|
+
A as u
|
|
154
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect as C, useState as b, useMemo as x, useRef as E, useLayoutEffect as Pe, useCallback as q } from "react";
|
|
2
2
|
import "./DsaQZE4X.js";
|
|
3
3
|
import { isFunction as k, isString as te, isNumber as F, isEqual as qe, isBoolean as Ve, isUndefined as Ue, isObject as $e } from "@unicom-cloud/utils/is";
|
|
4
|
-
import { g as D, u as L, d as U, b as W, i as We, s as Ge, e as Ke, f as Je } from "./
|
|
4
|
+
import { g as D, u as L, d as U, b as W, i as We, s as Ge, e as Ke, f as Je } from "./ClNkxEcR.js";
|
|
5
5
|
import { a as y } from "./D1iEYgh3.js";
|
|
6
6
|
import { u as ne } from "./BJeTDXdz.js";
|
|
7
7
|
import ce from "@unicom-cloud/utils/js-cookie";
|
|
@@ -11,7 +11,7 @@ import { i as re } from "./CdXR6dj7.js";
|
|
|
11
11
|
import { u as K, c as Ze } from "./DfChiMIE.js";
|
|
12
12
|
import { isBrowser as V, isAppleDevice as et } from "@unicom-cloud/utils/constant/platform";
|
|
13
13
|
import X from "@unicom-cloud/utils/screenfull";
|
|
14
|
-
import { a as De, u as tt } from "./
|
|
14
|
+
import { a as De, u as tt } from "./Bl3hZtxi.js";
|
|
15
15
|
import { u as se } from "./BO_5qdS_.js";
|
|
16
16
|
import Me from "lodash/throttle";
|
|
17
17
|
import de from "lodash/isPlainObject";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useState as l, useEffect as a } from "react";
|
|
2
|
+
function v(u, o) {
|
|
3
|
+
const [t, i] = l({
|
|
4
|
+
value: u,
|
|
5
|
+
resolve: (e) => {
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
return a(() => {
|
|
9
|
+
let e = -1;
|
|
10
|
+
const n = window.requestAnimationFrame(() => {
|
|
11
|
+
o ? e = setTimeout(() => {
|
|
12
|
+
t.resolve(t.value);
|
|
13
|
+
}, o) : t.resolve(t.value);
|
|
14
|
+
});
|
|
15
|
+
return () => {
|
|
16
|
+
window.cancelAnimationFrame(n), window.clearTimeout(e);
|
|
17
|
+
};
|
|
18
|
+
}, [t, o]), [
|
|
19
|
+
t.value,
|
|
20
|
+
(e) => new Promise((n, m) => {
|
|
21
|
+
i((s) => {
|
|
22
|
+
let r = e;
|
|
23
|
+
return typeof e == "function" && (r = e(s.value)), {
|
|
24
|
+
value: r,
|
|
25
|
+
resolve: n
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
})
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
v as u
|
|
33
|
+
};
|