@cloud-app-dev/vidc 3.2.11 → 3.2.13
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/.dumi/tmp/core/EmptyRoute.tsx +9 -0
- package/.dumi/tmp/core/defineApp.ts +16 -0
- package/.dumi/tmp/core/history.ts +61 -0
- package/.dumi/tmp/core/plugin.ts +42 -0
- package/.dumi/tmp/core/pluginConfig.d.ts +276 -0
- package/.dumi/tmp/core/polyfill.ts +202 -0
- package/.dumi/tmp/core/route.tsx +38 -0
- package/.dumi/tmp/core/terminal.ts +38 -0
- package/.dumi/tmp/dumi/exports.ts +5 -0
- package/.dumi/tmp/dumi/locales/config.ts +56 -0
- package/.dumi/tmp/dumi/locales/runtime.tsx +38 -0
- package/.dumi/tmp/dumi/meta/atoms.ts +4 -0
- package/.dumi/tmp/dumi/meta/index.ts +186 -0
- package/.dumi/tmp/dumi/meta/runtime.ts +18 -0
- package/.dumi/tmp/dumi/meta/tabs.ts +8 -0
- package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +41 -0
- package/.dumi/tmp/dumi/theme/builtins/API.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Badge.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Container.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +4 -0
- package/.dumi/tmp/dumi/theme/builtins/Table.ts +4 -0
- package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Content.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Features.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Footer.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Header.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Hero.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Logo.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Navbar.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/NotFound.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +4 -0
- package/.dumi/tmp/dumi/theme/slots/Toc.ts +4 -0
- package/.dumi/tmp/exports.ts +15 -0
- package/.dumi/tmp/testBrowser.tsx +82 -0
- package/.dumi/tmp/tsconfig.json +35 -0
- package/.dumi/tmp/typings.d.ts +136 -0
- package/.dumi/tmp/umi.ts +77 -0
- package/.dumi/tmp-production/core/EmptyRoute.tsx +9 -0
- package/.dumi/tmp-production/core/defineApp.ts +16 -0
- package/.dumi/tmp-production/core/history.ts +61 -0
- package/.dumi/tmp-production/core/plugin.ts +42 -0
- package/.dumi/tmp-production/core/pluginConfig.d.ts +276 -0
- package/.dumi/tmp-production/core/polyfill.ts +202 -0
- package/.dumi/tmp-production/core/route.tsx +38 -0
- package/.dumi/tmp-production/core/terminal.ts +38 -0
- package/.dumi/tmp-production/dumi/exports.ts +5 -0
- package/.dumi/tmp-production/dumi/locales/config.ts +56 -0
- package/.dumi/tmp-production/dumi/locales/runtime.tsx +38 -0
- package/.dumi/tmp-production/dumi/meta/atoms.ts +4 -0
- package/.dumi/tmp-production/dumi/meta/index.ts +178 -0
- package/.dumi/tmp-production/dumi/meta/runtime.ts +18 -0
- package/.dumi/tmp-production/dumi/meta/tabs.ts +5 -0
- package/.dumi/tmp-production/dumi/theme/ContextWrapper.tsx +41 -0
- package/.dumi/tmp-production/dumi/theme/builtins/API.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/Badge.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/Container.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/Previewer.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/SourceCode.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/builtins/Table.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/layouts/DocLayout.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Content.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/ContentTabs.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Features.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Footer.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Header.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Hero.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/HeroTitle.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/LangSwitch.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Logo.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Navbar.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/NotFound.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/PreviewerActions.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/PreviewerActionsExtra.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/RtlSwitch.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/SearchBar.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/SearchResult.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Sidebar.ts +4 -0
- package/.dumi/tmp-production/dumi/theme/slots/Toc.ts +4 -0
- package/.dumi/tmp-production/exports.ts +14 -0
- package/.dumi/tmp-production/testBrowser.tsx +82 -0
- package/.dumi/tmp-production/tsconfig.json +35 -0
- package/.dumi/tmp-production/typings.d.ts +136 -0
- package/.dumi/tmp-production/umi.ts +77 -0
- package/.dumirc.ts +71 -0
- package/.editorconfig +0 -3
- package/.eslintrc.js +3 -0
- package/.fatherrc.ts +19 -0
- package/.husky/commit-msg +5 -0
- package/.husky/pre-commit +4 -0
- package/.prettierrc.js +16 -0
- package/.stylelintrc +3 -0
- package/README.md +14 -26
- package/es/Api/index.js +100 -30
- package/es/AppContext/Sync.js +19 -3
- package/es/AppContext/index.js +86 -42
- package/es/AppContext/static.js +7 -0
- package/es/Auth/index.js +11 -4
- package/es/AutoExit/index.js +11 -3
- package/es/Box/BetweenBox/index.js +19 -10
- package/es/Box/BetweenBox/{index.css → index.less} +0 -0
- package/es/Box/InfoBox/index.js +24 -18
- package/es/Box/InfoBox/index.less +22 -0
- package/es/Box/TwoColumnBox/index.js +42 -25
- package/es/Box/TwoColumnBox/index.less +70 -0
- package/es/Box/deps/grid-factory.d.ts +2 -2
- package/es/Box/deps/grid-factory.js +12 -0
- package/es/Box/index.js +29 -16
- package/es/Box/{index.css → index.less} +5 -4
- package/es/CheckGroupFixed/demo.d.ts +3 -0
- package/es/CheckGroupFixed/demo.js +28 -0
- package/es/CheckGroupFixed/index.js +117 -82
- package/es/CheckGroupFixed/index.less +50 -0
- package/es/Config/index.js +5 -1
- package/es/Config/utils.js +18 -3
- package/es/ConfigContext/index.js +8 -4
- package/es/CustomRenderSelect/index.js +71 -36
- package/es/CustomRenderSelect/index.less +25 -0
- package/es/DisableMark/index.js +14 -11
- package/es/DisableMark/{index.css → index.less} +0 -0
- package/es/DomMove/demo.js +14 -10
- package/es/DomMove/index.js +52 -30
- package/es/DomMove/utils.js +8 -3
- package/es/Drag/DragAndDropItem.js +44 -20
- package/es/Drag/DropItem.js +22 -6
- package/es/Drag/index.js +2 -2
- package/es/Drag/{index.css → index.less} +0 -0
- package/es/Drawer/Footer.js +22 -15
- package/es/Drawer/{Demo.d.ts → demo.d.ts} +0 -0
- package/es/Drawer/demo.js +109 -0
- package/es/Drawer/index.js +98 -60
- package/es/Drawer/index.less +42 -0
- package/es/ErrorFallback/index.js +23 -14
- package/es/FrontendPlayer/index.js +1 -1
- package/es/FullScreen/index.js +30 -17
- package/es/FullScreen/index.less +16 -0
- package/es/HightLevel/index.js +11 -4
- package/es/HightLevel/{index.css → index.less} +0 -0
- package/es/IconFont/index.js +39 -18
- package/es/ImageView/index.js +37 -13
- package/es/ImageView/index.less +10 -0
- package/es/Input/demo.d.ts +3 -0
- package/es/Input/demo.js +16 -0
- package/es/Input/index.js +46 -22
- package/es/Input/index.less +12 -0
- package/es/InstanceHistory/index.js +2 -0
- package/es/LabelValue/index.js +25 -18
- package/es/LabelValue/index.less +20 -0
- package/es/List/DynamicGridList/Demo.d.ts +1 -0
- package/es/List/DynamicGridList/Demo.js +52 -32
- package/es/List/DynamicGridList/index.js +37 -22
- package/es/List/DynamicList/index.js +76 -56
- package/es/List/DynamicList/index.less +15 -0
- package/es/List/GridList/Demo.d.ts +1 -0
- package/es/List/GridList/Demo.js +60 -38
- package/es/List/GridList/hook.d.ts +1 -1
- package/es/List/GridList/hook.js +66 -35
- package/es/List/GridList/index.js +33 -29
- package/es/List/GridList/{index.css → index.less} +0 -0
- package/es/List/GridList/utils.d.ts +2 -2
- package/es/List/GridList/utils.js +1 -0
- package/es/List/VList/index.d.ts +1 -1
- package/es/List/VList/index.js +32 -19
- package/es/List/VList/{index.css → index.less} +0 -0
- package/es/List/VList/utils.d.ts +2 -2
- package/es/List/VList/utils.js +8 -6
- package/es/List/demo.d.ts +3 -0
- package/es/List/demo.js +26 -0
- package/es/List/index.d.ts +1 -1
- package/es/List/index.js +31 -23
- package/es/List/{index.css → index.less} +5 -4
- package/es/LoaderApp/index.js +59 -25
- package/es/LoaderApp/{index.css → index.less} +0 -0
- package/es/LoaderApp/loader.js +40 -23
- package/es/LoaderApp/sandbox.back.js +101 -24
- package/es/LoaderApp/sandbox.js +26 -9
- package/es/LoaderApp/utils.d.ts +1 -1
- package/es/LoaderApp/utils.js +68 -25
- package/es/LoaderScript/index.js +25 -10
- package/es/LoaderScript/utils.js +151 -87
- package/es/Map/BasicMap/AMapInstance.d.ts +1 -1
- package/es/Map/BasicMap/AMapInstance.js +25 -3
- package/es/Map/BasicMap/LeafletInstance.js +28 -11
- package/es/Map/BasicMap/index.js +67 -27
- package/es/Map/BasicMap/index.less +24 -0
- package/es/Map/ClusterLayer/hook.d.ts +2 -2
- package/es/Map/ClusterLayer/hook.js +51 -23
- package/es/Map/ClusterLayer/index.d.ts +1 -1
- package/es/Map/ClusterLayer/index.js +14 -6
- package/es/Map/ClusterLayer/index.less +27 -0
- package/es/Map/Config/index.js +44 -16
- package/es/Map/Config/utils.js +17 -3
- package/es/Map/Context/index.js +43 -9
- package/es/Map/FindPio/index.js +5 -2
- package/es/Map/FindPio/{index.css → index.less} +0 -0
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +1 -1
- package/es/Map/InfoWindow/MakerLikeWindow.js +41 -18
- package/es/Map/InfoWindow/demo.d.ts +1 -0
- package/es/Map/InfoWindow/demo.js +51 -29
- package/es/Map/InfoWindow/index.d.ts +1 -1
- package/es/Map/InfoWindow/index.js +39 -18
- package/es/Map/LevelCenter/DragMarker/index.js +16 -10
- package/es/Map/LevelCenter/demo.d.ts +1 -0
- package/es/Map/LevelCenter/demo.js +41 -22
- package/es/Map/LevelCenter/index.js +41 -29
- package/es/Map/LevelCenter/index.less +2 -0
- package/es/Map/LoaderMap/index.js +38 -22
- package/es/Map/MapDrawSelect/demo.d.ts +1 -0
- package/es/Map/MapDrawSelect/demo.js +65 -46
- package/es/Map/MapDrawSelect/index.js +43 -31
- package/es/Map/MapDrawSelect/index.less +2 -0
- package/es/Map/MouseTool/index.js +32 -18
- package/es/Map/MouseTool/useMouseTools.js +37 -8
- package/es/Map/ResetTools/index.js +58 -44
- package/es/Map/ResetTools/index.less +35 -0
- package/es/Map/SinglePoint/index.js +39 -27
- package/es/Map/SinglePoint/index.less +41 -0
- package/es/Map/hook/useMapEvent.js +8 -4
- package/es/Map/hook/useMapType.js +3 -2
- package/es/Map/index.d.ts +1 -0
- package/es/Map/index.js +11 -11
- package/es/Map/useMarker/index.d.ts +1 -1
- package/es/Map/useMarker/index.js +33 -13
- package/es/Map/{LevelCenter/index.css → useMarker/index.less} +0 -0
- package/es/Map/withMap/index.d.ts +1 -0
- package/es/Map/withMap/index.js +14 -4
- package/es/Modal/demo.d.ts +3 -0
- package/es/Modal/demo.js +106 -0
- package/es/Modal/index.js +94 -57
- package/es/Modal/index.less +45 -0
- package/es/Picture/component/DefaultRects/RectInfo.js +59 -37
- package/es/Picture/component/DefaultRects/index.js +46 -32
- package/es/Picture/component/DefaultRects/index.less +188 -0
- package/es/Picture/component/DrawRect/index.js +37 -24
- package/es/Picture/component/DrawRect/{index.css → index.less} +0 -0
- package/es/Picture/component/RectMenu/index.js +35 -26
- package/es/Picture/component/RectMenu/index.less +31 -0
- package/es/Picture/component/RectMenu/utils.js +6 -3
- package/es/Picture/component/Tools/index.js +91 -69
- package/es/Picture/component/Tools/index.less +43 -0
- package/es/Picture/component/WheelScale/index.js +9 -4
- package/es/Picture/demo.js +14 -11
- package/es/Picture/dragBound.d.ts +1 -1
- package/es/Picture/dragBound.js +17 -4
- package/es/Picture/index.d.ts +2 -2
- package/es/Picture/index.js +201 -137
- package/es/Picture/index.less +14 -0
- package/es/Picture/loadCaptureRectImage.d.ts +1 -1
- package/es/Picture/loadCaptureRectImage.js +39 -14
- package/es/Picture/useDraw.js +40 -20
- package/es/Picture/utils.d.ts +9 -9
- package/es/Picture/utils.js +18 -3
- package/es/Player/api/index.d.ts +3 -3
- package/es/Player/api/index.js +117 -82
- package/es/Player/context.js +21 -7
- package/es/Player/contraller_bar/bar.d.ts +1 -1
- package/es/Player/contraller_bar/bar.js +28 -10
- package/es/Player/contraller_bar/contraller_event.js +34 -12
- package/es/Player/contraller_bar/index.js +30 -22
- package/es/Player/contraller_bar/left_bar.js +62 -39
- package/es/Player/contraller_bar/right_bar.js +34 -18
- package/es/Player/contraller_bar/time.js +19 -8
- package/es/Player/contraller_bar/useBarStatus.js +29 -11
- package/es/Player/contraller_bar/volume.js +43 -21
- package/es/Player/demo.d.ts +1 -0
- package/es/Player/demo.js +258 -215
- package/es/Player/event/errorEvent.js +41 -16
- package/es/Player/event/eventName.js +12 -1
- package/es/Player/event/index.js +66 -24
- package/es/Player/fps_play.js +33 -15
- package/es/Player/frontend_player.js +42 -20
- package/es/Player/frontend_timeline.js +95 -55
- package/es/Player/iconfont.js +23 -8
- package/es/Player/index.js +1 -1
- package/es/Player/live_heart.js +15 -3
- package/es/Player/message.js +68 -37
- package/es/Player/segment_player.js +113 -62
- package/es/Player/segment_timeline.js +145 -97
- package/es/Player/single_player.js +153 -111
- package/es/Player/style/bar.less +39 -0
- package/es/Player/style/iconfont.js +17 -10
- package/es/Player/style/index.less +30 -0
- package/es/Player/style/message.less +50 -0
- package/es/Player/style/slider.less +103 -0
- package/es/Player/style/timeline.less +106 -0
- package/es/Player/style/volume.less +21 -0
- package/es/Player/timeline.d.ts +1 -1
- package/es/Player/timeline.js +59 -32
- package/es/Player/util.js +46 -7
- package/es/PlayerExt/demo.d.ts +1 -0
- package/es/PlayerExt/demo.js +145 -112
- package/es/PlayerExt/index.d.ts +1 -1
- package/es/PlayerExt/index.js +135 -82
- package/es/PlayerExt/{index.css → index.less} +0 -0
- package/es/Progress/index.js +18 -5
- package/es/Progress/index.less +20 -0
- package/es/ROI/demo.d.ts +1 -0
- package/es/ROI/demo.js +12 -8
- package/es/ROI/index.js +45 -35
- package/es/ROI/index.less +29 -0
- package/es/ScreenPlayer/Live.d.ts +1 -1
- package/es/ScreenPlayer/Live.js +159 -103
- package/es/ScreenPlayer/LiveTools.js +153 -116
- package/es/ScreenPlayer/PlayerWithExt.js +168 -113
- package/es/ScreenPlayer/RatePick.js +35 -22
- package/es/ScreenPlayer/Record.js +291 -185
- package/es/ScreenPlayer/RecordTools.js +192 -148
- package/es/ScreenPlayer/ScreenSelect.js +33 -26
- package/es/ScreenPlayer/SegmentTimeLine.js +23 -16
- package/es/ScreenPlayer/TimeMode.js +22 -16
- package/es/ScreenPlayer/TimeSelect.js +84 -63
- package/es/ScreenPlayer/demo.js +16 -18
- package/es/ScreenPlayer/demo2.js +192 -177
- package/es/ScreenPlayer/index.d.ts +1 -0
- package/es/ScreenPlayer/index.js +3 -3
- package/es/ScreenPlayer/index.less +178 -0
- package/es/ScreenPlayer/useTimeSlider.js +148 -49
- package/es/ScreenPlayer/useVideoFit.js +18 -5
- package/es/ScreenPlayer/utils.js +6 -0
- package/es/SegmentPlayer/index.js +1 -1
- package/es/Service/fetch-adapter.d.ts +1 -1
- package/es/Service/fetch-adapter.js +48 -5
- package/es/Service/http.js +46 -16
- package/es/Service/index.js +2 -2
- package/es/TableLayout/index.js +18 -12
- package/es/TableLayout/{index.css → index.less} +0 -0
- package/es/ThemeAntd/demo.d.ts +1 -0
- package/es/ThemeAntd/demo.js +126 -76
- package/es/ThemeAntd/{demo.css → demo.less} +4 -3
- package/es/ThemeAntd/index.js +6 -2
- package/es/ThemeAntd/index.less +16 -0
- package/es/ThemeAntd/style/button.less +67 -0
- package/es/ThemeAntd/style/checkbox.less +72 -0
- package/es/ThemeAntd/style/form.less +12 -0
- package/es/ThemeAntd/style/input.less +83 -0
- package/es/ThemeAntd/style/pagination.less +95 -0
- package/es/ThemeAntd/style/picker.less +106 -0
- package/es/ThemeAntd/style/popover.less +5 -0
- package/es/ThemeAntd/style/radio.less +87 -0
- package/es/ThemeAntd/style/{scrollbar.css → scrollbar.less} +4 -2
- package/es/ThemeAntd/style/select.less +81 -0
- package/es/ThemeAntd/style/table.less +57 -0
- package/es/ThemeAntd/style/tree.less +18 -0
- package/es/Timeout/index.js +36 -12
- package/es/Tree/demo.js +26 -21
- package/es/Tree/index.js +51 -30
- package/es/Tree/index.less +59 -0
- package/es/index.js +47 -47
- package/es/useDrawROI/index.js +130 -65
- package/es/useEventEmitterHandle/index.js +6 -2
- package/es/useFullscreen/demo.js +44 -27
- package/es/useFullscreen/index.js +30 -8
- package/es/useHistory/index.js +3 -1
- package/es/useInfiniteScroll/index.js +50 -19
- package/es/useRafInterval/index.js +28 -4
- package/es/useSimpleState/index.js +23 -6
- package/es/useVirtualList/index.js +58 -20
- package/es/utils.d.ts +1 -1
- package/es/utils.js +53 -14
- package/package.json +42 -32
- package/tsconfig.json +8 -32
- package/.eslintrc +0 -4
- package/.fatherrc.js +0 -25
- package/.prettierrc +0 -11
- package/.umirc.ts +0 -55
- package/es/Box/InfoBox/index.css +0 -22
- package/es/Box/TwoColumnBox/index.css +0 -70
- package/es/CheckGroupFixed/index.css +0 -49
- package/es/CustomRenderSelect/index.css +0 -20
- package/es/Drawer/Demo.js +0 -59
- package/es/Drawer/index.css +0 -40
- package/es/FullScreen/index.css +0 -16
- package/es/ImageView/index.css +0 -10
- package/es/Input/index.css +0 -8
- package/es/LabelValue/index.css +0 -18
- package/es/List/DynamicList/index.css +0 -15
- package/es/Map/BasicMap/index.css +0 -24
- package/es/Map/ClusterLayer/index.css +0 -26
- package/es/Map/MapDrawSelect/index.css +0 -0
- package/es/Map/ResetTools/index.css +0 -32
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Hover.svg +0 -15
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Normal.svg +0 -15
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Hover.svg +0 -15
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Normal.svg +0 -15
- package/es/Map/SinglePoint/index.css +0 -29
- package/es/Map/useMarker/index.css +0 -0
- package/es/Modal/index.css +0 -43
- package/es/Picture/component/DefaultRects/index.css +0 -247
- package/es/Picture/component/RectMenu/index.css +0 -31
- package/es/Picture/component/Tools/index.css +0 -42
- package/es/Picture/index.css +0 -12
- package/es/Player/style/bar.css +0 -38
- package/es/Player/style/index.css +0 -30
- package/es/Player/style/message.css +0 -49
- package/es/Player/style/slider.css +0 -96
- package/es/Player/style/timeline.css +0 -99
- package/es/Player/style/volume.css +0 -19
- package/es/Progress/index.css +0 -20
- package/es/ROI/index.css +0 -29
- package/es/ScreenPlayer/index.css +0 -166
- package/es/ThemeAntd/index.css +0 -620
- package/es/ThemeAntd/style/button.css +0 -55
- package/es/ThemeAntd/style/checkbox.css +0 -64
- package/es/ThemeAntd/style/form.css +0 -10
- package/es/ThemeAntd/style/input.css +0 -68
- package/es/ThemeAntd/style/pagination.css +0 -82
- package/es/ThemeAntd/style/picker.css +0 -98
- package/es/ThemeAntd/style/popover.css +0 -3
- package/es/ThemeAntd/style/radio.css +0 -80
- package/es/ThemeAntd/style/select.css +0 -76
- package/es/ThemeAntd/style/table.css +0 -46
- package/es/ThemeAntd/style/tree.css +0 -16
- package/es/Tree/index.css +0 -64
package/es/DomMove/index.js
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import _useEventListener from "ahooks/es/useEventListener";
|
|
2
2
|
import _useUpdate from "ahooks/es/useUpdate";
|
|
3
3
|
import _useSize from "ahooks/es/useSize";
|
|
4
|
+
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
+
|
|
9
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
|
|
4
11
|
import React, { useEffect, useImperativeHandle, useRef } from 'react';
|
|
5
|
-
import { getPosition, getMouseXY } from
|
|
12
|
+
import { getPosition, getMouseXY } from "./utils";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
|
|
6
15
|
function DomMove(_ref) {
|
|
7
16
|
var onDrag = _ref.onDrag,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
position = _ref.position,
|
|
18
|
+
className = _ref.className,
|
|
19
|
+
size = _ref.size,
|
|
20
|
+
children = _ref.children,
|
|
21
|
+
onDragChange = _ref.onDragChange,
|
|
22
|
+
onDragEnd = _ref.onDragEnd,
|
|
23
|
+
forwordRef = _ref.forwordRef,
|
|
24
|
+
disabled = _ref.disabled;
|
|
16
25
|
var dragRef = useRef(null);
|
|
17
26
|
var ref = useRef({
|
|
18
27
|
position: {
|
|
@@ -32,10 +41,12 @@ function DomMove(_ref) {
|
|
|
32
41
|
}
|
|
33
42
|
});
|
|
34
43
|
var reSize = _useSize(dragRef) || {};
|
|
44
|
+
|
|
35
45
|
var update = _useUpdate();
|
|
46
|
+
|
|
36
47
|
var updatePosition = function updatePosition(_ref2) {
|
|
37
48
|
var x = _ref2.x,
|
|
38
|
-
|
|
49
|
+
y = _ref2.y;
|
|
39
50
|
ref.current.position = {
|
|
40
51
|
x: x,
|
|
41
52
|
y: y
|
|
@@ -46,6 +57,7 @@ function DomMove(_ref) {
|
|
|
46
57
|
y: y
|
|
47
58
|
});
|
|
48
59
|
};
|
|
60
|
+
|
|
49
61
|
useEffect(function () {
|
|
50
62
|
var offset = getPosition(dragRef === null || dragRef === void 0 ? void 0 : dragRef.current);
|
|
51
63
|
ref.current.deviation = {
|
|
@@ -54,28 +66,31 @@ function DomMove(_ref) {
|
|
|
54
66
|
width: reSize.width,
|
|
55
67
|
height: reSize.height
|
|
56
68
|
};
|
|
57
|
-
}, [reSize.width, reSize.height]);
|
|
58
|
-
|
|
69
|
+
}, [reSize.width, reSize.height]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
70
|
+
|
|
59
71
|
useImperativeHandle(forwordRef, function () {
|
|
60
72
|
return {
|
|
61
73
|
updatePosition: updatePosition
|
|
62
74
|
};
|
|
63
75
|
}, []);
|
|
76
|
+
|
|
64
77
|
_useEventListener('mousemove', function (event) {
|
|
65
78
|
if (ref.current.isDrag) {
|
|
66
79
|
// let maxX, maxY;
|
|
67
80
|
var moveX, moveY;
|
|
81
|
+
|
|
68
82
|
var _getMouseXY = getMouseXY(event),
|
|
69
|
-
|
|
70
|
-
|
|
83
|
+
_x = _getMouseXY.x,
|
|
84
|
+
_y = _getMouseXY.y;
|
|
85
|
+
|
|
71
86
|
moveX = _x - ref.current.deviation.offsetX;
|
|
72
|
-
moveY = _y - ref.current.deviation.offsetY;
|
|
73
|
-
// 计算可移动位置的大小, 保证元素不会超过可移动范围
|
|
87
|
+
moveY = _y - ref.current.deviation.offsetY; // 计算可移动位置的大小, 保证元素不会超过可移动范围
|
|
74
88
|
// maxX = document.documentElement.clientWidth - this.deviation.width;
|
|
75
89
|
// maxY = document.documentElement.clientHeight - this.deviation.height;
|
|
76
90
|
// min方法保证不会超过右边界,max保证不会超过左边界
|
|
77
91
|
// moveX = Math.min(Math.max(0, moveX), maxX);
|
|
78
92
|
// moveY = Math.min(Math.max(0, moveY), maxY);
|
|
93
|
+
|
|
79
94
|
var _position = {
|
|
80
95
|
x: moveX,
|
|
81
96
|
y: moveY
|
|
@@ -85,17 +100,20 @@ function DomMove(_ref) {
|
|
|
85
100
|
}, {
|
|
86
101
|
target: document.body
|
|
87
102
|
});
|
|
103
|
+
|
|
88
104
|
_useEventListener('mouseup', function (event) {
|
|
89
105
|
ref.current.isDrag = false;
|
|
90
106
|
onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, ref.current.position);
|
|
91
107
|
}, {
|
|
92
108
|
target: document.body
|
|
93
109
|
});
|
|
110
|
+
|
|
94
111
|
_useEventListener('mousedown', function (event) {
|
|
95
112
|
if (!disabled) {
|
|
96
113
|
var _getMouseXY2 = getMouseXY(event),
|
|
97
|
-
|
|
98
|
-
|
|
114
|
+
_x2 = _getMouseXY2.x,
|
|
115
|
+
_y2 = _getMouseXY2.y;
|
|
116
|
+
|
|
99
117
|
ref.current.deviation.offsetX = _x2 - ref.current.position.x;
|
|
100
118
|
ref.current.deviation.offsetY = _y2 - ref.current.position.y;
|
|
101
119
|
ref.current.isDrag = true;
|
|
@@ -103,25 +121,29 @@ function DomMove(_ref) {
|
|
|
103
121
|
}, {
|
|
104
122
|
target: dragRef
|
|
105
123
|
});
|
|
124
|
+
|
|
106
125
|
var _ref3 = onDrag ? {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
126
|
+
x: position.x,
|
|
127
|
+
y: position.y
|
|
128
|
+
} : {
|
|
129
|
+
x: ref.current.position.x,
|
|
130
|
+
y: ref.current.position.y
|
|
131
|
+
},
|
|
132
|
+
x = _ref3.x,
|
|
133
|
+
y = _ref3.y;
|
|
134
|
+
|
|
135
|
+
return /*#__PURE__*/_jsx("div", {
|
|
116
136
|
ref: dragRef,
|
|
117
137
|
className: "drag-move-Content ".concat(className),
|
|
118
138
|
style: {
|
|
119
139
|
transform: "translate(".concat(x, "px,").concat(y, "px)"),
|
|
120
140
|
width: size.width,
|
|
121
141
|
height: size.height
|
|
122
|
-
}
|
|
123
|
-
|
|
142
|
+
},
|
|
143
|
+
children: children
|
|
144
|
+
});
|
|
124
145
|
}
|
|
146
|
+
|
|
125
147
|
DomMove.defaultProps = {
|
|
126
148
|
className: '',
|
|
127
149
|
size: {
|
|
@@ -130,7 +152,7 @@ DomMove.defaultProps = {
|
|
|
130
152
|
}
|
|
131
153
|
};
|
|
132
154
|
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
133
|
-
return /*#__PURE__*/
|
|
155
|
+
return /*#__PURE__*/_jsx(DomMove, _objectSpread(_objectSpread({}, props), {}, {
|
|
134
156
|
forwordRef: ref
|
|
135
157
|
}));
|
|
136
158
|
});
|
package/es/DomMove/utils.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
export function getPosition(obj) {
|
|
2
2
|
//获取某元素以浏览器左上角为原点的坐标
|
|
3
3
|
var t = obj.offsetTop; //获取该元素对应父容器的上边距
|
|
4
|
+
|
|
4
5
|
var l = obj.offsetLeft; //对应父容器的上边距
|
|
5
6
|
//判断是否有父容器,如果存在则累加其边距
|
|
7
|
+
|
|
6
8
|
while (obj = obj.offsetParent) {
|
|
7
9
|
//等效 obj = obj.offsetParent;while (obj != undefined)
|
|
8
10
|
t += obj.offsetTop; //叠加父容器的上边距
|
|
11
|
+
|
|
9
12
|
l += obj.offsetLeft; //叠加父容器的左边距
|
|
10
13
|
}
|
|
11
14
|
|
|
@@ -13,12 +16,13 @@ export function getPosition(obj) {
|
|
|
13
16
|
left: l,
|
|
14
17
|
top: t
|
|
15
18
|
};
|
|
16
|
-
}
|
|
17
|
-
|
|
19
|
+
} // 函数用于获取鼠标的位置
|
|
20
|
+
|
|
18
21
|
export function getMouseXY(e) {
|
|
19
22
|
var x = 0,
|
|
20
|
-
|
|
23
|
+
y = 0;
|
|
21
24
|
e = e || window.event;
|
|
25
|
+
|
|
22
26
|
if (e.pageX) {
|
|
23
27
|
x = e.pageX;
|
|
24
28
|
y = e.pageY;
|
|
@@ -26,6 +30,7 @@ export function getMouseXY(e) {
|
|
|
26
30
|
x = e.clientX + document.body.scrollLeft - document.body.clientLeft;
|
|
27
31
|
y = e.clientY + document.body.scrollTop - document.body.clientTop;
|
|
28
32
|
}
|
|
33
|
+
|
|
29
34
|
return {
|
|
30
35
|
x: x,
|
|
31
36
|
y: y
|
|
@@ -1,31 +1,48 @@
|
|
|
1
1
|
import _uuid from "@cloud-app-dev/utils/es/uuid";
|
|
2
|
+
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
|
|
7
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
|
|
2
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
|
|
3
11
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
|
|
4
13
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
+
|
|
5
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16
|
+
|
|
6
17
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
18
|
+
|
|
7
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
|
|
8
21
|
import React, { useState, useCallback } from 'react';
|
|
9
22
|
import { useRef, useMemo } from 'react';
|
|
23
|
+
|
|
10
24
|
function DragAndDropItem(_ref) {
|
|
11
25
|
var children = _ref.children,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
26
|
+
dragData = _ref.dragData,
|
|
27
|
+
dragId = _ref.dragId,
|
|
28
|
+
style = _ref.style,
|
|
29
|
+
onDropEnd = _ref.onDropEnd,
|
|
30
|
+
_ref$disabledCopyElem = _ref.disabledCopyElement,
|
|
31
|
+
disabledCopyElement = _ref$disabledCopyElem === void 0 ? true : _ref$disabledCopyElem;
|
|
18
32
|
var id = useMemo(function () {
|
|
19
33
|
return dragId || "dragId-".concat(_uuid());
|
|
20
34
|
}, [dragId]);
|
|
35
|
+
|
|
21
36
|
var _useState = useState(['', '']),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
+
status = _useState2[0],
|
|
39
|
+
setStatus = _useState2[1];
|
|
40
|
+
|
|
25
41
|
var _useState3 = useState([0, 0]),
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
43
|
+
offset = _useState4[0],
|
|
44
|
+
setOffset = _useState4[1];
|
|
45
|
+
|
|
29
46
|
var domRef = useRef(null);
|
|
30
47
|
var dragDomTemp = useRef(null);
|
|
31
48
|
var onDrop = useCallback(function (event) {
|
|
@@ -55,19 +72,22 @@ function DragAndDropItem(_ref) {
|
|
|
55
72
|
if (!domRef.current) {
|
|
56
73
|
return;
|
|
57
74
|
}
|
|
75
|
+
|
|
58
76
|
if (!disabledCopyElement) {
|
|
59
77
|
var pageX = event.pageX,
|
|
60
|
-
|
|
78
|
+
pageY = event.pageY;
|
|
79
|
+
|
|
61
80
|
var _domRef$current$getBo = domRef.current.getBoundingClientRect(),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
81
|
+
x = _domRef$current$getBo.x,
|
|
82
|
+
y = _domRef$current$getBo.y,
|
|
83
|
+
width = _domRef$current$getBo.width,
|
|
84
|
+
height = _domRef$current$getBo.height;
|
|
85
|
+
|
|
66
86
|
var offsetX = pageX - x;
|
|
67
87
|
var offsetY = pageY - y;
|
|
68
88
|
dragDomTemp.current = domRef.current.cloneNode(true);
|
|
69
|
-
domRef.current.after(dragDomTemp.current);
|
|
70
|
-
|
|
89
|
+
domRef.current.after(dragDomTemp.current); //初始化缓存dom位置
|
|
90
|
+
|
|
71
91
|
dragDomTemp.current.style.position = 'fixed';
|
|
72
92
|
dragDomTemp.current.style.left = "".concat(event.pageX - offsetX, "px");
|
|
73
93
|
dragDomTemp.current.style.top = "".concat(event.pageY - offsetY, "px");
|
|
@@ -80,6 +100,7 @@ function DragAndDropItem(_ref) {
|
|
|
80
100
|
setOffset([offsetX, offsetY]);
|
|
81
101
|
event.dataTransfer.setDragImage(new Image(), 0, 0);
|
|
82
102
|
}
|
|
103
|
+
|
|
83
104
|
setStatus(function (old) {
|
|
84
105
|
return ['draging', old[1]];
|
|
85
106
|
});
|
|
@@ -100,9 +121,11 @@ function DragAndDropItem(_ref) {
|
|
|
100
121
|
if (e.pageX === 0 && e.pageY === 0) {
|
|
101
122
|
return;
|
|
102
123
|
}
|
|
124
|
+
|
|
103
125
|
if (e.pageX < offset[2] || e.pageY < offset[3]) {
|
|
104
126
|
return;
|
|
105
127
|
}
|
|
128
|
+
|
|
106
129
|
dragDomTemp.current.style.position = 'fixed';
|
|
107
130
|
dragDomTemp.current.style.left = "".concat(e.pageX - offset[0], "px");
|
|
108
131
|
dragDomTemp.current.style.top = "".concat(e.pageY - offset[1], "px");
|
|
@@ -119,9 +142,10 @@ function DragAndDropItem(_ref) {
|
|
|
119
142
|
onDragOver: allowDrop,
|
|
120
143
|
onDragEnter: onDragEnter,
|
|
121
144
|
onDragLeave: onDragLeave,
|
|
122
|
-
style:
|
|
145
|
+
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
123
146
|
opacity: status[0] === 'draging' || status[1] === 'dragenter' ? 0.5 : 1
|
|
124
147
|
})
|
|
125
148
|
});
|
|
126
149
|
}
|
|
150
|
+
|
|
127
151
|
export default DragAndDropItem;
|
package/es/Drag/DropItem.js
CHANGED
|
@@ -1,19 +1,34 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
1
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
|
|
2
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
|
|
3
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
+
|
|
4
13
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
14
|
+
|
|
5
15
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16
|
+
|
|
6
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
|
|
7
19
|
import React, { useState, useCallback } from 'react';
|
|
8
20
|
import { useRef } from 'react';
|
|
21
|
+
|
|
9
22
|
function DropItem(_ref) {
|
|
10
23
|
var children = _ref.children,
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
style = _ref.style,
|
|
25
|
+
onDropEnd = _ref.onDropEnd;
|
|
26
|
+
|
|
13
27
|
var _useState = useState(''),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
status = _useState2[0],
|
|
30
|
+
setStatus = _useState2[1];
|
|
31
|
+
|
|
17
32
|
var domRef = useRef(null);
|
|
18
33
|
var onDrop = useCallback(function (event) {
|
|
19
34
|
event.stopPropagation();
|
|
@@ -38,7 +53,8 @@ function DropItem(_ref) {
|
|
|
38
53
|
onDragOver: allowDrop,
|
|
39
54
|
onDragEnter: onDragEnter,
|
|
40
55
|
onDragLeave: onDragLeave,
|
|
41
|
-
style: status === 'dragenter' ?
|
|
56
|
+
style: status === 'dragenter' ? _objectSpread({}, style) : undefined
|
|
42
57
|
});
|
|
43
58
|
}
|
|
59
|
+
|
|
44
60
|
export default DropItem;
|
package/es/Drag/index.js
CHANGED
|
File without changes
|
package/es/Drawer/Footer.js
CHANGED
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
import "antd/lib/button/style";
|
|
2
2
|
import _Button from "antd/lib/button";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import "./index.
|
|
4
|
+
import "./index.less";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
5
8
|
function Footer(_ref) {
|
|
6
9
|
var onClose = _ref.onClose,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return /*#__PURE__*/
|
|
10
|
+
cancelText = _ref.cancelText,
|
|
11
|
+
okText = _ref.okText,
|
|
12
|
+
onOk = _ref.onOk;
|
|
13
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
11
14
|
style: {
|
|
12
15
|
textAlign: 'right'
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
},
|
|
17
|
+
children: [/*#__PURE__*/_jsx(_Button, {
|
|
18
|
+
onClick: onClose,
|
|
19
|
+
style: {
|
|
20
|
+
marginRight: 8
|
|
21
|
+
},
|
|
22
|
+
children: cancelText
|
|
23
|
+
}), /*#__PURE__*/_jsx(_Button, {
|
|
24
|
+
onClick: onOk,
|
|
25
|
+
type: "primary",
|
|
26
|
+
children: okText
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
23
29
|
}
|
|
30
|
+
|
|
24
31
|
export default Footer;
|
|
File without changes
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import "antd/lib/config-provider/style";
|
|
2
|
+
import _ConfigProvider from "antd/lib/config-provider";
|
|
3
|
+
import "antd/lib/button/style";
|
|
4
|
+
import _Button from "antd/lib/button";
|
|
5
|
+
|
|
6
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
|
+
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
+
|
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
13
|
+
|
|
14
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
15
|
+
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
|
|
18
|
+
import React, { useRef, useState } from 'react';
|
|
19
|
+
import Drawer from "./index";
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
|
+
|
|
24
|
+
var App = function App() {
|
|
25
|
+
var drawer = Drawer.useDrawer();
|
|
26
|
+
var ref = useRef();
|
|
27
|
+
|
|
28
|
+
var _useState = useState(false),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
visible = _useState2[0],
|
|
31
|
+
setVisible = _useState2[1];
|
|
32
|
+
|
|
33
|
+
var showDrawer = function showDrawer() {
|
|
34
|
+
setVisible(true);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var onClose = function onClose() {
|
|
38
|
+
setVisible(false);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return /*#__PURE__*/_jsxs(_ConfigProvider, {
|
|
42
|
+
prefixCls: "cloudapp",
|
|
43
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
44
|
+
children: [/*#__PURE__*/_jsx(_Button, {
|
|
45
|
+
type: "primary",
|
|
46
|
+
onClick: showDrawer,
|
|
47
|
+
children: "Open"
|
|
48
|
+
}), /*#__PURE__*/_jsxs(Drawer, {
|
|
49
|
+
title: "Basic Drawer",
|
|
50
|
+
placement: "right",
|
|
51
|
+
onClose: onClose,
|
|
52
|
+
visible: visible,
|
|
53
|
+
onOk: function onOk() {
|
|
54
|
+
alert('确定!');
|
|
55
|
+
onClose();
|
|
56
|
+
},
|
|
57
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
58
|
+
children: "Some contents..."
|
|
59
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
60
|
+
children: "Some contents..."
|
|
61
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
62
|
+
children: "Some contents..."
|
|
63
|
+
})]
|
|
64
|
+
})]
|
|
65
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
66
|
+
children: /*#__PURE__*/_jsx(_Button, {
|
|
67
|
+
type: "primary",
|
|
68
|
+
onClick: function onClick() {
|
|
69
|
+
return drawer.open({
|
|
70
|
+
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
71
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
72
|
+
children: "Some contents..."
|
|
73
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
74
|
+
children: "Some contents..."
|
|
75
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
76
|
+
children: "Some contents..."
|
|
77
|
+
})]
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
children: "useDrawer"
|
|
82
|
+
})
|
|
83
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
84
|
+
children: [/*#__PURE__*/_jsx(_Button, {
|
|
85
|
+
type: "primary",
|
|
86
|
+
onClick: function onClick() {
|
|
87
|
+
var _ref$current;
|
|
88
|
+
|
|
89
|
+
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.open({
|
|
90
|
+
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
91
|
+
children: [/*#__PURE__*/_jsx("p", {
|
|
92
|
+
children: "Some contents..."
|
|
93
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
94
|
+
children: "Some contents..."
|
|
95
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
96
|
+
children: "Some contents..."
|
|
97
|
+
})]
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
children: "RefDrawer"
|
|
102
|
+
}), /*#__PURE__*/_jsx(Drawer.RefDrawer, {
|
|
103
|
+
ref: ref
|
|
104
|
+
})]
|
|
105
|
+
})]
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export default App;
|