@cloud-app-dev/vidc 4.0.20 → 4.0.21
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/es/AppContext/Sync.d.ts +8 -0
- package/es/AppContext/Sync.js +42 -0
- package/es/AppContext/index.d.ts +10 -0
- package/es/AppContext/index.js +141 -0
- package/es/AppContext/interface.d.ts +41 -0
- package/es/AppContext/static.d.ts +8 -0
- package/es/AppContext/static.js +9 -0
- package/es/Auth/index.d.ts +8 -0
- package/es/Auth/index.js +14 -0
- package/es/AutoExit/index.d.ts +6 -0
- package/es/AutoExit/index.js +19 -0
- package/es/CheckGroupFixed/demo.d.ts +3 -0
- package/es/CheckGroupFixed/demo.js +22 -0
- package/es/CheckGroupFixed/index.d.ts +24 -0
- package/es/CheckGroupFixed/index.js +140 -0
- package/es/CheckGroupFixed/index.less +56 -0
- package/es/Config/index.d.ts +4 -0
- package/es/Config/index.js +77 -0
- package/es/Config/interface.d.ts +65 -0
- package/es/Config/utils.d.ts +4 -0
- package/es/Config/utils.js +33 -0
- package/es/ConfigContext/index.d.ts +17 -0
- package/es/ConfigContext/index.js +21 -0
- package/es/CustomRenderSelect/index.d.ts +12 -0
- package/es/CustomRenderSelect/index.js +73 -0
- package/es/CustomRenderSelect/index.less +25 -0
- package/es/DBTools/index.d.ts +25 -0
- package/es/DBTools/index.js +336 -0
- package/es/DisableMark/index.d.ts +9 -0
- package/es/DisableMark/index.js +19 -0
- package/es/DisableMark/index.less +9 -0
- package/es/DomMove/demo.d.ts +2 -0
- package/es/DomMove/demo.js +16 -0
- package/es/DomMove/index.d.ts +16 -0
- package/es/DomMove/index.js +139 -0
- package/es/DomMove/utils.d.ts +8 -0
- package/es/DomMove/utils.js +32 -0
- package/es/Drag/DragAndDropItem.d.ts +4 -0
- package/es/Drag/DragAndDropItem.js +134 -0
- package/es/Drag/DropItem.d.ts +4 -0
- package/es/Drag/DropItem.js +50 -0
- package/es/Drag/index.d.ts +7 -0
- package/es/Drag/index.js +7 -0
- package/es/Drag/interface.d.ts +16 -0
- package/es/DynamicGridList/Demo.d.ts +3 -0
- package/es/DynamicGridList/Demo.js +77 -0
- package/es/DynamicGridList/index.d.ts +24 -0
- package/es/DynamicGridList/index.js +67 -0
- package/es/DynamicList/demo.d.ts +2 -0
- package/es/DynamicList/demo.js +44 -0
- package/es/DynamicList/index.d.ts +22 -0
- package/es/DynamicList/index.js +86 -0
- package/es/DynamicList/index.less +17 -0
- package/es/DynamicList/interface.d.ts +19 -0
- package/es/DynamicList/utils.d.ts +4 -0
- package/es/DynamicList/utils.js +6 -0
- package/es/ErrorFallback/index.d.ts +9 -0
- package/es/ErrorFallback/index.js +31 -0
- package/es/ErrorFallback/inerface.d.ts +48 -0
- package/es/EventTools/index.d.ts +3 -0
- package/es/EventTools/index.js +12 -0
- package/es/FrontendPlayer/index.d.ts +4 -0
- package/es/FrontendPlayer/index.js +2 -0
- package/es/FullScreen/index.d.ts +22 -0
- package/es/FullScreen/index.js +33 -0
- package/es/FullScreen/index.less +18 -0
- package/es/GridList/Demo.d.ts +3 -0
- package/es/GridList/Demo.js +80 -0
- package/es/GridList/data.d.ts +16 -0
- package/es/GridList/data.js +609 -0
- package/es/GridList/hook.d.ts +13 -0
- package/es/GridList/hook.js +270 -0
- package/es/GridList/index.d.ts +15 -0
- package/es/GridList/index.js +44 -0
- package/es/GridList/index.less +8 -0
- package/es/GridList/interface.d.ts +59 -0
- package/es/GridList/utils.d.ts +9 -0
- package/es/GridList/utils.js +42 -0
- package/es/HightLevel/index.d.ts +9 -0
- package/es/HightLevel/index.js +18 -0
- package/es/HightLevel/index.less +3 -0
- package/es/IconFont/index.d.ts +12 -0
- package/es/IconFont/index.js +54 -0
- package/es/ImageView/index.d.ts +20 -0
- package/es/ImageView/index.js +51 -0
- package/es/ImageView/index.less +11 -0
- package/es/InstanceHistory/index.d.ts +3 -0
- package/es/InstanceHistory/index.js +7 -0
- package/es/LabelPlayer/111.png +0 -0
- package/es/LabelPlayer/demo.d.ts +2 -0
- package/es/LabelPlayer/demo.js +115 -0
- package/es/LabelPlayer/index.d.ts +21 -0
- package/es/LabelPlayer/index.js +160 -0
- package/es/LabelPlayer/index.less +24 -0
- package/es/LabelValue/index.d.ts +15 -0
- package/es/LabelValue/index.js +27 -0
- package/es/LabelValue/index.less +23 -0
- package/es/List/demo.d.ts +3 -0
- package/es/List/demo.js +23 -0
- package/es/List/index.d.ts +28 -0
- package/es/List/index.js +28 -0
- package/es/List/index.less +20 -0
- package/es/ListWithSizeAnimate/demo.d.ts +2 -0
- package/es/ListWithSizeAnimate/demo.js +98 -0
- package/es/ListWithSizeAnimate/index.d.ts +14 -0
- package/es/ListWithSizeAnimate/index.js +85 -0
- package/es/ListWithSizeAnimate/index.less +23 -0
- package/es/LoaderScript/index.d.ts +47 -0
- package/es/LoaderScript/index.js +34 -0
- package/es/LoaderScript/utils.d.ts +13 -0
- package/es/LoaderScript/utils.js +179 -0
- package/es/Map/AMap.d.ts +7109 -0
- package/es/Map/BasicMap/AMapInstance.d.ts +19 -0
- package/es/Map/BasicMap/AMapInstance.js +98 -0
- package/es/Map/BasicMap/LeafletInstance.d.ts +18 -0
- package/es/Map/BasicMap/LeafletInstance.js +111 -0
- package/es/Map/BasicMap/index.d.ts +9 -0
- package/es/Map/BasicMap/index.js +90 -0
- package/es/Map/BasicMap/index.less +29 -0
- package/es/Map/ClusterLayer/demo.d.ts +3 -0
- package/es/Map/ClusterLayer/demo.js +18 -0
- package/es/Map/ClusterLayer/hook.d.ts +5 -0
- package/es/Map/ClusterLayer/hook.js +123 -0
- package/es/Map/ClusterLayer/index.d.ts +6 -0
- package/es/Map/ClusterLayer/index.js +28 -0
- package/es/Map/ClusterLayer/index.less +29 -0
- package/es/Map/ClusterLayer/props.d.ts +8 -0
- package/es/Map/Config/index.d.ts +9 -0
- package/es/Map/Config/index.js +48 -0
- package/es/Map/Config/utils.d.ts +2 -0
- package/es/Map/Config/utils.js +65 -0
- package/es/Map/Context/index.d.ts +11 -0
- package/es/Map/Context/index.js +51 -0
- package/es/Map/FindPio/index.d.ts +4 -0
- package/es/Map/FindPio/index.js +13 -0
- package/es/Map/FindPio/index.less +7 -0
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +4 -0
- package/es/Map/InfoWindow/MakerLikeWindow.js +112 -0
- package/es/Map/InfoWindow/demo.d.ts +3 -0
- package/es/Map/InfoWindow/demo.js +70 -0
- package/es/Map/InfoWindow/index.d.ts +11 -0
- package/es/Map/InfoWindow/index.js +66 -0
- package/es/Map/LevelCenter/DragMarker/index.d.ts +10 -0
- package/es/Map/LevelCenter/DragMarker/index.js +42 -0
- package/es/Map/LevelCenter/demo.d.ts +3 -0
- package/es/Map/LevelCenter/demo.js +38 -0
- package/es/Map/LevelCenter/index.d.ts +15 -0
- package/es/Map/LevelCenter/index.js +66 -0
- package/es/Map/LoaderMap/index.d.ts +7 -0
- package/es/Map/LoaderMap/index.js +62 -0
- package/es/Map/MapDrawSelect/demo.d.ts +3 -0
- package/es/Map/MapDrawSelect/demo.js +71 -0
- package/es/Map/MapDrawSelect/index.d.ts +15 -0
- package/es/Map/MapDrawSelect/index.js +56 -0
- package/es/Map/MouseTool/index.d.ts +10 -0
- package/es/Map/MouseTool/index.js +40 -0
- package/es/Map/MouseTool/useMouseTools.d.ts +7 -0
- package/es/Map/MouseTool/useMouseTools.js +83 -0
- package/es/Map/ResetTools/index.d.ts +10 -0
- package/es/Map/ResetTools/index.js +57 -0
- package/es/Map/ResetTools/index.less +39 -0
- package/es/Map/SinglePoint/demo.d.ts +3 -0
- package/es/Map/SinglePoint/demo.js +14 -0
- package/es/Map/SinglePoint/index.d.ts +27 -0
- package/es/Map/SinglePoint/index.js +52 -0
- package/es/Map/SinglePoint/index.less +41 -0
- package/es/Map/hook/useMapEvent.d.ts +2 -0
- package/es/Map/hook/useMapEvent.js +19 -0
- package/es/Map/hook/useMapType.d.ts +4 -0
- package/es/Map/hook/useMapType.js +12 -0
- package/es/Map/icon.d.ts +2 -0
- package/es/Map/icon.js +10 -0
- package/es/Map/index.d.ts +24 -0
- package/es/Map/index.js +25 -0
- package/es/Map/interface.d.ts +74 -0
- package/es/Map/points.d.ts +50 -0
- package/es/Map/points.js +1 -0
- package/es/Map/useMarker/index.d.ts +10 -0
- package/es/Map/useMarker/index.js +71 -0
- package/es/Map/withMap/index.d.ts +3 -0
- package/es/Map/withMap/index.js +10 -0
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +8 -0
- package/es/Picture/component/DefaultRects/RectInfo.js +80 -0
- package/es/Picture/component/DefaultRects/index.d.ts +13 -0
- package/es/Picture/component/DefaultRects/index.js +52 -0
- package/es/Picture/component/DefaultRects/index.less +211 -0
- package/es/Picture/component/DefaultRects/utils.d.ts +2 -0
- package/es/Picture/component/DefaultRects/utils.js +11 -0
- package/es/Picture/component/DrawRect/index.d.ts +13 -0
- package/es/Picture/component/DrawRect/index.js +46 -0
- package/es/Picture/component/DrawRect/index.less +8 -0
- package/es/Picture/component/RectMenu/index.d.ts +12 -0
- package/es/Picture/component/RectMenu/index.js +76 -0
- package/es/Picture/component/RectMenu/index.less +36 -0
- package/es/Picture/component/RectMenu/utils.d.ts +12 -0
- package/es/Picture/component/RectMenu/utils.js +19 -0
- package/es/Picture/component/Tools/index.d.ts +12 -0
- package/es/Picture/component/Tools/index.js +73 -0
- package/es/Picture/component/Tools/index.less +49 -0
- package/es/Picture/component/WheelScale/index.d.ts +7 -0
- package/es/Picture/component/WheelScale/index.js +27 -0
- package/es/Picture/demo.d.ts +2 -0
- package/es/Picture/demo.js +105 -0
- package/es/Picture/index.d.ts +5 -0
- package/es/Picture/index.js +341 -0
- package/es/Picture/index.less +20 -0
- package/es/Picture/interface.d.ts +196 -0
- package/es/Picture/loadCaptureRectImage.d.ts +3 -0
- package/es/Picture/loadCaptureRectImage.js +99 -0
- package/es/Picture/useDraw.d.ts +1 -0
- package/es/Picture/useDraw.js +103 -0
- package/es/Picture/utils.d.ts +26 -0
- package/es/Picture/utils.js +143 -0
- package/es/Player/api/index.d.ts +68 -0
- package/es/Player/api/index.js +309 -0
- package/es/Player/context.d.ts +17 -0
- package/es/Player/context.js +24 -0
- package/es/Player/contraller_bar/bar.d.ts +8 -0
- package/es/Player/contraller_bar/bar.js +20 -0
- package/es/Player/contraller_bar/contraller_event.d.ts +6 -0
- package/es/Player/contraller_bar/contraller_event.js +50 -0
- package/es/Player/contraller_bar/index.d.ts +14 -0
- package/es/Player/contraller_bar/index.js +27 -0
- package/es/Player/contraller_bar/left_bar.d.ts +10 -0
- package/es/Player/contraller_bar/left_bar.js +83 -0
- package/es/Player/contraller_bar/right_bar.d.ts +8 -0
- package/es/Player/contraller_bar/right_bar.js +32 -0
- package/es/Player/contraller_bar/time.d.ts +3 -0
- package/es/Player/contraller_bar/time.js +19 -0
- package/es/Player/contraller_bar/useBarStatus.d.ts +2 -0
- package/es/Player/contraller_bar/useBarStatus.js +43 -0
- package/es/Player/contraller_bar/volume.d.ts +9 -0
- package/es/Player/contraller_bar/volume.js +62 -0
- package/es/Player/demo.d.ts +3 -0
- package/es/Player/demo.js +266 -0
- package/es/Player/empty.d.ts +2 -0
- package/es/Player/empty.js +4 -0
- package/es/Player/event/errorEvent.d.ts +14 -0
- package/es/Player/event/errorEvent.js +88 -0
- package/es/Player/event/eventName.d.ts +18 -0
- package/es/Player/event/eventName.js +29 -0
- package/es/Player/event/index.d.ts +24 -0
- package/es/Player/event/index.js +205 -0
- package/es/Player/fps_play.d.ts +11 -0
- package/es/Player/fps_play.js +83 -0
- package/es/Player/frontend_player.d.ts +8 -0
- package/es/Player/frontend_player.js +64 -0
- package/es/Player/frontend_timeline.d.ts +10 -0
- package/es/Player/frontend_timeline.js +132 -0
- package/es/Player/iconfont.d.ts +5 -0
- package/es/Player/iconfont.js +16 -0
- package/es/Player/index.d.ts +2 -0
- package/es/Player/index.js +2 -0
- package/es/Player/live_heart.d.ts +8 -0
- package/es/Player/live_heart.js +45 -0
- package/es/Player/message.d.ts +5 -0
- package/es/Player/message.js +137 -0
- package/es/Player/player.d.ts +233 -0
- package/es/Player/segment_player.d.ts +9 -0
- package/es/Player/segment_player.js +228 -0
- package/es/Player/segment_timeline.d.ts +12 -0
- package/es/Player/segment_timeline.js +173 -0
- package/es/Player/single_player.d.ts +5 -0
- package/es/Player/single_player.js +262 -0
- package/es/Player/style/bar.less +43 -0
- package/es/Player/style/iconfont.js +43 -0
- package/es/Player/style/index.less +34 -0
- package/es/Player/style/message.less +56 -0
- package/es/Player/style/slider.less +106 -0
- package/es/Player/style/timeline.less +117 -0
- package/es/Player/style/volume.less +24 -0
- package/es/Player/timeline.d.ts +5 -0
- package/es/Player/timeline.js +95 -0
- package/es/Player/util.d.ts +43 -0
- package/es/Player/util.js +189 -0
- package/es/PlayerExt/demo.d.ts +3 -0
- package/es/PlayerExt/demo.js +154 -0
- package/es/PlayerExt/index.d.ts +48 -0
- package/es/PlayerExt/index.js +188 -0
- package/es/PlayerExt/index.less +10 -0
- package/es/Progress/index.d.ts +7 -0
- package/es/Progress/index.js +53 -0
- package/es/Progress/index.less +21 -0
- package/es/ROI/demo.d.ts +3 -0
- package/es/ROI/demo.js +16 -0
- package/es/ROI/index.d.ts +33 -0
- package/es/ROI/index.js +54 -0
- package/es/ROI/index.less +33 -0
- package/es/RefDrawer/Footer.d.ts +9 -0
- package/es/RefDrawer/Footer.js +22 -0
- package/es/RefDrawer/demo.d.ts +3 -0
- package/es/RefDrawer/demo.js +18 -0
- package/es/RefDrawer/index.d.ts +26 -0
- package/es/RefDrawer/index.js +71 -0
- package/es/RefModal/demo.d.ts +3 -0
- package/es/RefModal/demo.js +18 -0
- package/es/RefModal/index.d.ts +17 -0
- package/es/RefModal/index.js +70 -0
- package/es/ScreenPlayer/Live.d.ts +5 -0
- package/es/ScreenPlayer/Live.js +212 -0
- package/es/ScreenPlayer/LiveTools.d.ts +29 -0
- package/es/ScreenPlayer/LiveTools.js +151 -0
- package/es/ScreenPlayer/PlayerWithExt.d.ts +34 -0
- package/es/ScreenPlayer/PlayerWithExt.js +231 -0
- package/es/ScreenPlayer/RatePick.d.ts +8 -0
- package/es/ScreenPlayer/RatePick.js +29 -0
- package/es/ScreenPlayer/Record.d.ts +10 -0
- package/es/ScreenPlayer/Record.js +442 -0
- package/es/ScreenPlayer/RecordTools.d.ts +38 -0
- package/es/ScreenPlayer/RecordTools.js +197 -0
- package/es/ScreenPlayer/ScreenSelect.d.ts +7 -0
- package/es/ScreenPlayer/ScreenSelect.js +46 -0
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +17 -0
- package/es/ScreenPlayer/SegmentTimeLine.js +36 -0
- package/es/ScreenPlayer/TimeMode.d.ts +7 -0
- package/es/ScreenPlayer/TimeMode.js +26 -0
- package/es/ScreenPlayer/TimeSelect.d.ts +7 -0
- package/es/ScreenPlayer/TimeSelect.js +88 -0
- package/es/ScreenPlayer/demo.d.ts +2 -0
- package/es/ScreenPlayer/demo.js +21 -0
- package/es/ScreenPlayer/demo2.d.ts +2 -0
- package/es/ScreenPlayer/demo2.js +194 -0
- package/es/ScreenPlayer/index.d.ts +6 -0
- package/es/ScreenPlayer/index.js +9 -0
- package/es/ScreenPlayer/index.less +335 -0
- package/es/ScreenPlayer/interface.d.ts +216 -0
- package/es/ScreenPlayer/useTimeSlider.d.ts +25 -0
- package/es/ScreenPlayer/useTimeSlider.js +451 -0
- package/es/ScreenPlayer/useVideoFit.d.ts +5 -0
- package/es/ScreenPlayer/useVideoFit.js +35 -0
- package/es/ScreenPlayer/utils.d.ts +17 -0
- package/es/ScreenPlayer/utils.js +85 -0
- package/es/SegmentPlayer/index.d.ts +2 -0
- package/es/SegmentPlayer/index.js +2 -0
- package/es/Service/http.d.ts +6 -0
- package/es/Service/http.js +133 -0
- package/es/Service/index.d.ts +3 -0
- package/es/Service/index.js +11 -0
- package/es/Service/interface.d.ts +23 -0
- package/es/Service/middleware.d.ts +8 -0
- package/es/Service/middleware.js +22 -0
- package/es/SocketEmitter/eventEmitter.d.ts +27 -0
- package/es/SocketEmitter/eventEmitter.js +88 -0
- package/es/SocketEmitter/index.d.ts +24 -0
- package/es/SocketEmitter/index.js +125 -0
- package/es/SocketEmitter/interface.d.ts +4 -0
- package/es/TableLayout/index.d.ts +10 -0
- package/es/TableLayout/index.js +27 -0
- package/es/TableLayout/index.less +4 -0
- package/es/ThemeAntd/demo.d.ts +4 -0
- package/es/ThemeAntd/demo.js +81 -0
- package/es/ThemeAntd/demo.less +20 -0
- package/es/ThemeAntd/index.d.ts +7 -0
- package/es/ThemeAntd/index.js +21 -0
- package/es/ThemeAntd/index.less +4 -0
- package/es/Timeout/index.d.ts +26 -0
- package/es/Timeout/index.js +65 -0
- package/es/bigNumberTransformCN/index.d.ts +5 -0
- package/es/bigNumberTransformCN/index.js +58 -0
- package/es/cache/index.d.ts +34 -0
- package/es/cache/index.js +94 -0
- package/es/copy/index.d.ts +1 -0
- package/es/copy/index.js +9 -0
- package/es/core.d.ts +0 -0
- package/es/getThemeStyle/index.d.ts +2 -0
- package/es/getThemeStyle/index.js +5 -0
- package/es/index.d.ts +62 -0
- package/es/index.js +62 -0
- package/es/likeGo/index.d.ts +2 -0
- package/es/likeGo/index.js +31 -0
- package/es/likeGoSync/index.d.ts +2 -0
- package/es/likeGoSync/index.js +10 -0
- package/es/logger/index.d.ts +7 -0
- package/es/logger/index.js +30 -0
- package/es/nextTick/index.d.ts +1 -0
- package/es/nextTick/index.js +3 -0
- package/es/recorder/demo.d.ts +3 -0
- package/es/recorder/demo.js +181 -0
- package/es/recorder/index.d.ts +294 -0
- package/es/recorder/index.js +992 -0
- package/es/submidstr/index.d.ts +5 -0
- package/es/submidstr/index.js +14 -0
- package/es/treeHelper/index.d.ts +11 -0
- package/es/treeHelper/index.js +188 -0
- package/es/typings.d.ts +2 -0
- package/es/useDrawROI/index.d.ts +16 -0
- package/es/useDrawROI/index.js +318 -0
- package/es/useEventEmitterHandle/index.d.ts +2 -0
- package/es/useEventEmitterHandle/index.js +17 -0
- package/es/useFullscreen/demo.d.ts +2 -0
- package/es/useFullscreen/demo.js +43 -0
- package/es/useFullscreen/index.d.ts +12 -0
- package/es/useFullscreen/index.js +76 -0
- package/es/useHistory/index.d.ts +3 -0
- package/es/useHistory/index.js +9 -0
- package/es/useHistory/interface.d.ts +3 -0
- package/es/useInfiniteScroll/index.d.ts +16 -0
- package/es/useInfiniteScroll/index.js +102 -0
- package/es/useRafInterval/index.d.ts +5 -0
- package/es/useRafInterval/index.js +71 -0
- package/es/useSimpleState/index.d.ts +3 -0
- package/es/useSimpleState/index.js +35 -0
- package/es/useVirtualList/index.d.ts +13 -0
- package/es/useVirtualList/index.js +136 -0
- package/es/utils.d.ts +14 -0
- package/es/utils.js +46 -0
- package/es/uuid/index.d.ts +5 -0
- package/es/uuid/index.js +6 -0
- package/package.json +1 -1
- package/tsconfig.json +1 -1
|
Binary file
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import { useFullscreen } from 'ahooks';
|
|
12
|
+
import React, { useRef, useState } from 'react';
|
|
13
|
+
import LabelPlayer from '.';
|
|
14
|
+
var base64 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAAIABJREFUeF7tfQmUXVWV9nfu+F6NqcrAoGFM8l5VQpKqekkA0WZQEQQREPT/UfpvRCAGNQG0W1sFlb/9tYHgEEYbBCcEsW3t/ruhlbYXLYMkLYGkXmUeKkWGml/Vm++9p9d5lcJKpareHd8d3j1rZVjr7rP3Pnuf751pn30IwmKbBTrRcioBPkdALwTIyQBmARAnCaAEZJiC7iSgr3DATxei62XblAgZ2WoBYiu3KmTWjcXNo9C+T4DzAZxk0gQFCuwkIK9QaP/Qgq6XTPIJq9lsgRAgJg26DYviGvjvEeA9ACSTbKaqRgFsB/BYHMlv28g3ZGXCAiFATBgtiZafEuAjU0yfTHCbscowgF/HkbzebsYh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sKFImCgaYaCgNDacQoEFDjuex+vy5RvCCodgo0QMyCpORsMgYUQURgT+PZ+kIpjoGjlDDYeAk0OAI9xZro6/UbxR8DuM64/8dqsFGFhayUwCJQ305M2RSKgUItAopiarR424SEkn9bu6JwiVmb+qVe4EeQcUfct1H8NAE22OEYYcLI4vX1SgkUhbGRgoHDjkKBh25LFFfbwcvrPOyxmNdbeVS/9Zuk60Dp9wDY9sgk2wVjaxWOw9i/PC39343Crrtq6tgCe/z/E+9n2KDTIAW+dFui+JANvHzBoqoAwjxy30bpLALKnil2NFZoIljGAHR0d4ygtEtWMrxe69OxJcLYPe+xfzXtWCAY23Uy1TefpiB335YovGmqtk8r6XWRT5s3vdrrN4o3AmBAOdXNxpXAwrww/u8kIJRA4W7ZB+DudYniD9xVwx3pVQsQZu5v/xEnikS4nhLylwRodccFnpW6FZQ+WaTKk19YiUOe1dJhxaoaIOO2fXgjxCwVr6cE7BmFdztsc6+zf5FQPBElxSdvTqDodWWd1i8EyCQLr98ofRhg742QDzttfG/xp78CuCfWJQq/8pZe7moTAmQa+9+3SXg3aGnqxYAy2103OSSd4Ail+A0IfeK2DuVFh6T4mm0IkDLu++4raNBE6RKAXgxKL6YgJ/va48B+QvBrSsnvpGjht2sWY9Tn7XFU/RAgBs17/ybhYo2SDxHgUgCnGazuFvl2AvJLjWj/PxwpjLkgBIgxex1DvX6j2A5CLqcajYMgRoAYgBoLLC1XJQB7cH0bKLYRjnSpFL+strMLy0acwCAEiJ3WBHDvm9H5NFeMcyAxcIgRihiliBOC+baKougmBF0g2AYN2wC6TYyIXWvOynbbKqfKmYUAqVAHeJqC73kd9ZIQrc9n1Qaq0Xqep/WUcvWUo/UcRT0ltJ6pQygZ0QhGiEZGVKKNEJWMiBJJFUV+hFOyI+9YjpFrCQzd2KhQMwMn5n8A4A6Ufbch3XkAAAAASUVORK5CYII=';
|
|
15
|
+
export default function App() {
|
|
16
|
+
var ref = useRef(null);
|
|
17
|
+
var _useFullscreen = useFullscreen(ref),
|
|
18
|
+
_useFullscreen2 = _slicedToArray(_useFullscreen, 2),
|
|
19
|
+
flag = _useFullscreen2[0],
|
|
20
|
+
toggleFullscreen = _useFullscreen2[1].toggleFullscreen;
|
|
21
|
+
var _useState = useState([{
|
|
22
|
+
id: '132132122',
|
|
23
|
+
x: 1000,
|
|
24
|
+
y: 200
|
|
25
|
+
}, {
|
|
26
|
+
id: '453254323',
|
|
27
|
+
x: 800,
|
|
28
|
+
y: 400
|
|
29
|
+
}, {
|
|
30
|
+
id: '321432143',
|
|
31
|
+
x: 900,
|
|
32
|
+
y: 500
|
|
33
|
+
}, {
|
|
34
|
+
id: '543254345',
|
|
35
|
+
x: 1000,
|
|
36
|
+
y: 600
|
|
37
|
+
}, {
|
|
38
|
+
id: '5434354345',
|
|
39
|
+
x: 1100,
|
|
40
|
+
y: 600
|
|
41
|
+
}, {
|
|
42
|
+
id: '5454325345',
|
|
43
|
+
x: 1200,
|
|
44
|
+
y: 550
|
|
45
|
+
}, {
|
|
46
|
+
id: '543245354345',
|
|
47
|
+
x: 1000,
|
|
48
|
+
y: 450
|
|
49
|
+
}]),
|
|
50
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
51
|
+
state = _useState2[0],
|
|
52
|
+
updateState = _useState2[1];
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
|
|
54
|
+
type: "button",
|
|
55
|
+
onClick: toggleFullscreen
|
|
56
|
+
}, flag + ''), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("img", {
|
|
57
|
+
style: {
|
|
58
|
+
cursor: 'pointer'
|
|
59
|
+
},
|
|
60
|
+
width: 40,
|
|
61
|
+
src: base64,
|
|
62
|
+
draggable: true,
|
|
63
|
+
onDragStart: function onDragStart(e) {
|
|
64
|
+
e.dataTransfer.setData('DATA', JSON.stringify({
|
|
65
|
+
id: Math.random() + ''
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
style: {
|
|
70
|
+
width: 1000,
|
|
71
|
+
height: 300
|
|
72
|
+
},
|
|
73
|
+
ref: ref
|
|
74
|
+
}, /*#__PURE__*/React.createElement(LabelPlayer, {
|
|
75
|
+
labels: state,
|
|
76
|
+
openDrop: true,
|
|
77
|
+
renderLabel: function renderLabel(item) {
|
|
78
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
79
|
+
style: {
|
|
80
|
+
cursor: 'pointer'
|
|
81
|
+
},
|
|
82
|
+
width: 40,
|
|
83
|
+
src: base64,
|
|
84
|
+
onClick: function onClick() {
|
|
85
|
+
return alert(item.id);
|
|
86
|
+
},
|
|
87
|
+
onDragStart: function onDragStart(e) {
|
|
88
|
+
e.dataTransfer.setData('DATA', JSON.stringify({
|
|
89
|
+
id: item.id
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
onLabelMoveChange: function onLabelMoveChange(res) {
|
|
95
|
+
var data = JSON.parse(res.data);
|
|
96
|
+
updateState(function (old) {
|
|
97
|
+
var indx = old.findIndex(function (v) {
|
|
98
|
+
return v.id === data.id;
|
|
99
|
+
});
|
|
100
|
+
if (indx > -1 && old[indx]) {
|
|
101
|
+
old[indx].x = res.x - 20;
|
|
102
|
+
old[indx].y = res.y - 20;
|
|
103
|
+
} else {
|
|
104
|
+
old.push({
|
|
105
|
+
x: res.x - 20,
|
|
106
|
+
y: res.y - 20,
|
|
107
|
+
id: data.id
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return _toConsumableArray(old);
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
url: "http://192.168.101.252:22094/fmp4/live/2b9d2390500c02c65_2/1.mp4?origin_url=sdk%3A%2F%2Fadmin%3Ahpg12345%40192.168.14.64%3A8000%2Fcam%2Frealmonitor%3Ffactory%3Dhikvision%26channel%3D2%26subType%3D0"
|
|
114
|
+
})));
|
|
115
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export type PositionType = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
export interface LabelType {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
id?: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
interface ILabelPlayerProps {
|
|
14
|
+
url?: string;
|
|
15
|
+
labels?: LabelType[];
|
|
16
|
+
renderLabel?: (item: LabelType) => JSX.Element;
|
|
17
|
+
onLabelMoveChange?: (item: LabelType) => void;
|
|
18
|
+
openDrop?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare function LabelPlayer({ url, labels, renderLabel, onLabelMoveChange, openDrop }: ILabelPlayerProps): React.JSX.Element;
|
|
21
|
+
export default LabelPlayer;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { useEventListener, useMemoizedFn, useSize } from 'ahooks';
|
|
8
|
+
import React, { useEffect, useMemo, useRef } from 'react';
|
|
9
|
+
import DomMove from "../DomMove";
|
|
10
|
+
import useSimpleState from "../useSimpleState";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
function LabelItem(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
style = _ref.style;
|
|
15
|
+
var ref = useRef(null);
|
|
16
|
+
useEventListener('mousedown', function (event) {
|
|
17
|
+
return event.stopPropagation();
|
|
18
|
+
}, {
|
|
19
|
+
target: ref
|
|
20
|
+
});
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: "video-label",
|
|
23
|
+
ref: ref,
|
|
24
|
+
style: style,
|
|
25
|
+
onMouseDown: function onMouseDown(event) {
|
|
26
|
+
return event.stopPropagation();
|
|
27
|
+
}
|
|
28
|
+
}, children);
|
|
29
|
+
}
|
|
30
|
+
function LabelPlayer(_ref2) {
|
|
31
|
+
var url = _ref2.url,
|
|
32
|
+
_ref2$labels = _ref2.labels,
|
|
33
|
+
labels = _ref2$labels === void 0 ? [] : _ref2$labels,
|
|
34
|
+
renderLabel = _ref2.renderLabel,
|
|
35
|
+
onLabelMoveChange = _ref2.onLabelMoveChange,
|
|
36
|
+
openDrop = _ref2.openDrop;
|
|
37
|
+
var _useSimpleState = useSimpleState({
|
|
38
|
+
x: 0,
|
|
39
|
+
y: 0
|
|
40
|
+
}),
|
|
41
|
+
_useSimpleState2 = _slicedToArray(_useSimpleState, 2),
|
|
42
|
+
state = _useSimpleState2[0],
|
|
43
|
+
setState = _useSimpleState2[1];
|
|
44
|
+
var containerRef = useRef(null);
|
|
45
|
+
var videoRef = useRef(null);
|
|
46
|
+
var videoSize = useSize(videoRef);
|
|
47
|
+
var containerSize = useSize(containerRef);
|
|
48
|
+
var moveActionRef = useRef();
|
|
49
|
+
var _useMemo = useMemo(function () {
|
|
50
|
+
var _videoSize$width, _containerSize$width, _videoSize$height, _containerSize$height;
|
|
51
|
+
return {
|
|
52
|
+
videoWidth: (_videoSize$width = videoSize === null || videoSize === void 0 ? void 0 : videoSize.width) !== null && _videoSize$width !== void 0 ? _videoSize$width : 0,
|
|
53
|
+
containerWidth: (_containerSize$width = containerSize === null || containerSize === void 0 ? void 0 : containerSize.width) !== null && _containerSize$width !== void 0 ? _containerSize$width : 0,
|
|
54
|
+
videoHeight: (_videoSize$height = videoSize === null || videoSize === void 0 ? void 0 : videoSize.height) !== null && _videoSize$height !== void 0 ? _videoSize$height : 0,
|
|
55
|
+
containerHeight: (_containerSize$height = containerSize === null || containerSize === void 0 ? void 0 : containerSize.height) !== null && _containerSize$height !== void 0 ? _containerSize$height : 0
|
|
56
|
+
};
|
|
57
|
+
}, [containerSize, videoSize]),
|
|
58
|
+
videoWidth = _useMemo.videoWidth,
|
|
59
|
+
containerWidth = _useMemo.containerWidth,
|
|
60
|
+
videoHeight = _useMemo.videoHeight,
|
|
61
|
+
containerHeight = _useMemo.containerHeight;
|
|
62
|
+
var onDragChange = useMemoizedFn(function (_ref3) {
|
|
63
|
+
var x = _ref3.x,
|
|
64
|
+
y = _ref3.y;
|
|
65
|
+
return setState({
|
|
66
|
+
x: x,
|
|
67
|
+
y: y
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
var onDragEnd = function onDragEnd(_, position) {
|
|
71
|
+
var _moveActionRef$curren;
|
|
72
|
+
var diffWidth = videoWidth - containerWidth;
|
|
73
|
+
var diffHeight = videoHeight - containerHeight;
|
|
74
|
+
var x = position.x;
|
|
75
|
+
var y = position.y;
|
|
76
|
+
if (position.x > 0) {
|
|
77
|
+
x = 0;
|
|
78
|
+
}
|
|
79
|
+
if (position.x < -diffWidth) {
|
|
80
|
+
x = -diffWidth;
|
|
81
|
+
}
|
|
82
|
+
if (position.y > 0) {
|
|
83
|
+
y = 0;
|
|
84
|
+
}
|
|
85
|
+
if (position.y < -diffHeight) {
|
|
86
|
+
y = -diffHeight;
|
|
87
|
+
}
|
|
88
|
+
if (containerWidth > videoWidth) {
|
|
89
|
+
x = (containerWidth - videoWidth) / 2;
|
|
90
|
+
}
|
|
91
|
+
if (containerHeight > videoHeight) {
|
|
92
|
+
y = (containerHeight - videoHeight) / 2;
|
|
93
|
+
}
|
|
94
|
+
(_moveActionRef$curren = moveActionRef.current) === null || _moveActionRef$curren === void 0 || _moveActionRef$curren.updatePosition({
|
|
95
|
+
x: x,
|
|
96
|
+
y: y
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
var onDrop = function onDrop(event) {
|
|
100
|
+
var _containerRef$current;
|
|
101
|
+
if (!openDrop) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
var rect = ((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.getBoundingClientRect()) || {};
|
|
105
|
+
var left = event.clientX - rect.x;
|
|
106
|
+
var top = event.clientY - rect.y;
|
|
107
|
+
var data = event.dataTransfer.getData('DATA');
|
|
108
|
+
var flag1 = videoWidth > containerWidth;
|
|
109
|
+
var flag2 = videoHeight > containerHeight;
|
|
110
|
+
var diffHeight = videoHeight - containerHeight;
|
|
111
|
+
var diffWidth = videoWidth - containerWidth;
|
|
112
|
+
onLabelMoveChange === null || onLabelMoveChange === void 0 || onLabelMoveChange({
|
|
113
|
+
x: left + Math.abs(state.x) + (flag1 ? 0 : diffWidth),
|
|
114
|
+
y: top + Math.abs(state.y) + (flag2 ? 0 : diffHeight),
|
|
115
|
+
data: data
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
useEffect(function () {
|
|
119
|
+
var _moveActionRef$curren2;
|
|
120
|
+
if (!videoSize || !containerSize) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
var diffWidth = videoWidth - containerWidth;
|
|
124
|
+
var diffHeight = videoHeight - containerHeight;
|
|
125
|
+
(_moveActionRef$curren2 = moveActionRef.current) === null || _moveActionRef$curren2 === void 0 || _moveActionRef$curren2.updatePosition({
|
|
126
|
+
x: -diffWidth / 2,
|
|
127
|
+
y: -diffHeight / 2
|
|
128
|
+
});
|
|
129
|
+
}, [videoSize, containerSize]);
|
|
130
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
className: "label-player-container",
|
|
132
|
+
ref: containerRef,
|
|
133
|
+
onDrop: onDrop,
|
|
134
|
+
onDragOver: function onDragOver(e) {
|
|
135
|
+
return e.preventDefault();
|
|
136
|
+
}
|
|
137
|
+
}, /*#__PURE__*/React.createElement(DomMove, {
|
|
138
|
+
ref: moveActionRef,
|
|
139
|
+
onDragChange: onDragChange,
|
|
140
|
+
onDragEnd: onDragEnd
|
|
141
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
className: "video-container"
|
|
143
|
+
}, /*#__PURE__*/React.createElement("video", {
|
|
144
|
+
src: url,
|
|
145
|
+
autoPlay: true,
|
|
146
|
+
ref: videoRef,
|
|
147
|
+
muted: true
|
|
148
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
className: "video-label-box"
|
|
150
|
+
}, labels.map(function (label) {
|
|
151
|
+
return /*#__PURE__*/React.createElement(LabelItem, {
|
|
152
|
+
key: label.id,
|
|
153
|
+
style: {
|
|
154
|
+
left: label.x,
|
|
155
|
+
top: label.y
|
|
156
|
+
}
|
|
157
|
+
}, renderLabel === null || renderLabel === void 0 ? void 0 : renderLabel(label));
|
|
158
|
+
})))));
|
|
159
|
+
}
|
|
160
|
+
export default LabelPlayer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.label-player-container {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
background-color: #000;
|
|
6
|
+
user-select: none;
|
|
7
|
+
|
|
8
|
+
.video-container {
|
|
9
|
+
position: relative;
|
|
10
|
+
width: max-content;
|
|
11
|
+
height: max-content;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
video {
|
|
15
|
+
width: 2048px;
|
|
16
|
+
min-height: 300px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.video-label-box {
|
|
20
|
+
.video-label {
|
|
21
|
+
position: absolute;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ILabelValueProps {
|
|
4
|
+
label?: any;
|
|
5
|
+
value?: any;
|
|
6
|
+
emptyValue?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
noWrap?: boolean;
|
|
9
|
+
noColon?: boolean;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
labelStyle?: React.CSSProperties;
|
|
12
|
+
valueStyle?: React.CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
declare function LabelValue({ label, value, emptyValue, className, style, labelStyle, valueStyle, noWrap, noColon }: ILabelValueProps): React.JSX.Element;
|
|
15
|
+
export default LabelValue;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "./index.less";
|
|
3
|
+
function LabelValue(_ref) {
|
|
4
|
+
var label = _ref.label,
|
|
5
|
+
value = _ref.value,
|
|
6
|
+
_ref$emptyValue = _ref.emptyValue,
|
|
7
|
+
emptyValue = _ref$emptyValue === void 0 ? '-' : _ref$emptyValue,
|
|
8
|
+
_ref$className = _ref.className,
|
|
9
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
10
|
+
style = _ref.style,
|
|
11
|
+
labelStyle = _ref.labelStyle,
|
|
12
|
+
valueStyle = _ref.valueStyle,
|
|
13
|
+
_ref$noWrap = _ref.noWrap,
|
|
14
|
+
noWrap = _ref$noWrap === void 0 ? false : _ref$noWrap,
|
|
15
|
+
noColon = _ref.noColon;
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "lm-c-label-value-layout ".concat(className),
|
|
18
|
+
style: style
|
|
19
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
20
|
+
style: labelStyle
|
|
21
|
+
}, label, noColon ? '' : ':'), /*#__PURE__*/React.createElement("span", {
|
|
22
|
+
title: value,
|
|
23
|
+
className: "".concat(noWrap ? 'no-wrap' : ''),
|
|
24
|
+
style: valueStyle
|
|
25
|
+
}, value || emptyValue));
|
|
26
|
+
}
|
|
27
|
+
export default LabelValue;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.lm-c-label-value-layout {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
font-size: var(--fs-small);
|
|
4
|
+
|
|
5
|
+
span {
|
|
6
|
+
&:first-child {
|
|
7
|
+
padding-right: 4px;
|
|
8
|
+
color: var(--color4);
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:last-child {
|
|
13
|
+
flex: 1;
|
|
14
|
+
color: var(--color6);
|
|
15
|
+
|
|
16
|
+
&.no-wrap {
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
package/es/List/demo.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import List from "./index";
|
|
3
|
+
var defaultList = Array.from(new Array(10000)).map(function (_, i) {
|
|
4
|
+
return {
|
|
5
|
+
name: "\u6211\u662F\u5217\u8868".concat(i),
|
|
6
|
+
id: i
|
|
7
|
+
};
|
|
8
|
+
});
|
|
9
|
+
export default (function () {
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
style: {
|
|
12
|
+
width: 300,
|
|
13
|
+
height: 600
|
|
14
|
+
}
|
|
15
|
+
}, /*#__PURE__*/React.createElement(List, {
|
|
16
|
+
list: defaultList,
|
|
17
|
+
renderItem: function renderItem(item) {
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
key: item.id
|
|
20
|
+
}, item.name);
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface ListProps<T> {
|
|
4
|
+
/**
|
|
5
|
+
* @description 列表数据
|
|
6
|
+
* @default []
|
|
7
|
+
*/
|
|
8
|
+
list: Array<T>;
|
|
9
|
+
/**
|
|
10
|
+
* @description 列表类名
|
|
11
|
+
* @default ''
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @description 列表样式
|
|
16
|
+
* @default -
|
|
17
|
+
*/
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/**
|
|
20
|
+
* @description 列表自定义渲染
|
|
21
|
+
* @default -
|
|
22
|
+
*/
|
|
23
|
+
renderItem: (item: T, index: number) => JSX.Element;
|
|
24
|
+
rowHeight?: number;
|
|
25
|
+
renderHeaderExt?: () => JSX.Element;
|
|
26
|
+
}
|
|
27
|
+
declare function List<T>({ className, style, renderItem, list, rowHeight, renderHeaderExt }: ListProps<T>): React.JSX.Element;
|
|
28
|
+
export default List;
|
package/es/List/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import "./index.less";
|
|
3
|
+
function List(_ref) {
|
|
4
|
+
var className = _ref.className,
|
|
5
|
+
style = _ref.style,
|
|
6
|
+
renderItem = _ref.renderItem,
|
|
7
|
+
list = _ref.list,
|
|
8
|
+
_ref$rowHeight = _ref.rowHeight,
|
|
9
|
+
rowHeight = _ref$rowHeight === void 0 ? 30 : _ref$rowHeight,
|
|
10
|
+
renderHeaderExt = _ref.renderHeaderExt;
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: "lm-c-list-wrapper ".concat(className),
|
|
13
|
+
style: style
|
|
14
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: "lm-c-list-header"
|
|
16
|
+
}, renderHeaderExt === null || renderHeaderExt === void 0 ? void 0 : renderHeaderExt()), /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "lm-c-base-list-layout"
|
|
18
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "vidc-simple-list-layout",
|
|
20
|
+
style: {
|
|
21
|
+
contentVisibility: 'auto',
|
|
22
|
+
containIntrinsicSize: list.length * rowHeight
|
|
23
|
+
}
|
|
24
|
+
}, list.map(function (ele, index) {
|
|
25
|
+
return renderItem(ele, index);
|
|
26
|
+
}))));
|
|
27
|
+
}
|
|
28
|
+
export default List;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.lm-c-list-wrapper {
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100%;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
cursor: auto;
|
|
6
|
+
border: 1px solid var(--gray2);
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
|
|
9
|
+
.lm-c-base-list-layout {
|
|
10
|
+
flex: 1;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.vidc-simple-list-layout {
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
overflow: auto;
|
|
18
|
+
contain: strict;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
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); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
7
|
+
/* eslint-disable react/button-has-type */
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
9
|
+
import React, { useRef } from 'react';
|
|
10
|
+
import ListWithSizeAnimate from "./index";
|
|
11
|
+
function random(low, high) {
|
|
12
|
+
return Math.floor(Math.random() * high) + low;
|
|
13
|
+
}
|
|
14
|
+
var IMAGES = function IMAGES() {
|
|
15
|
+
return Array.from({
|
|
16
|
+
length: 20
|
|
17
|
+
}, function (_, index) {
|
|
18
|
+
var width = 300;
|
|
19
|
+
var height = random(200, 300);
|
|
20
|
+
return {
|
|
21
|
+
url: "https://picsum.photos/id/".concat(index + 1, "/").concat(width, "/").concat(height, ".jpg"),
|
|
22
|
+
width: width,
|
|
23
|
+
height: height
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
function loadPage(d) {
|
|
28
|
+
console.log(d);
|
|
29
|
+
if (!d) {
|
|
30
|
+
// eslint-disable-next-line no-param-reassign
|
|
31
|
+
d = {};
|
|
32
|
+
}
|
|
33
|
+
var resultData = IMAGES();
|
|
34
|
+
d.page ? d.page++ : d.page = 1;
|
|
35
|
+
d.list ? d.list = [].concat(_toConsumableArray(d.list), _toConsumableArray(resultData)) : d.list = resultData;
|
|
36
|
+
return new Promise(function (resolve) {
|
|
37
|
+
console.log(d.page);
|
|
38
|
+
setTimeout(function () {
|
|
39
|
+
return resolve(d);
|
|
40
|
+
}, 5000);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export default function App() {
|
|
44
|
+
var ref = useRef(null);
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
style: {
|
|
47
|
+
width: '100%',
|
|
48
|
+
height: 800,
|
|
49
|
+
position: 'relative'
|
|
50
|
+
}
|
|
51
|
+
}, /*#__PURE__*/React.createElement(ListWithSizeAnimate, {
|
|
52
|
+
ref: ref,
|
|
53
|
+
header: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "\u6761\u4EF61"), /*#__PURE__*/React.createElement("li", null, "\u6761\u4EF62"), /*#__PURE__*/React.createElement("li", null, "\u6761\u4EF63"), /*#__PURE__*/React.createElement("li", null, "\u6761\u4EF63"), /*#__PURE__*/React.createElement("li", null, "\u6761\u4EF63"), /*#__PURE__*/React.createElement("li", null, "\u6761\u4EF63"), /*#__PURE__*/React.createElement("li", null, "\u6761\u4EF63"))),
|
|
54
|
+
itemKey: "url",
|
|
55
|
+
itemHeight: 300,
|
|
56
|
+
itemWidth: 250,
|
|
57
|
+
renderItem: function renderItem(image) {
|
|
58
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
style: {
|
|
60
|
+
border: '1px solid gray',
|
|
61
|
+
height: '100%',
|
|
62
|
+
display: 'flex',
|
|
63
|
+
flexDirection: 'column'
|
|
64
|
+
}
|
|
65
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
style: {
|
|
67
|
+
flex: 1,
|
|
68
|
+
overflow: 'hidden'
|
|
69
|
+
}
|
|
70
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
71
|
+
src: image.url,
|
|
72
|
+
alt: "",
|
|
73
|
+
style: {
|
|
74
|
+
objectFit: 'cover',
|
|
75
|
+
display: 'block',
|
|
76
|
+
width: '100%',
|
|
77
|
+
height: '100%'
|
|
78
|
+
}
|
|
79
|
+
})), /*#__PURE__*/React.createElement("p", null, "\u6807\u9898"), /*#__PURE__*/React.createElement("p", null, "\u63CF\u8FF0"));
|
|
80
|
+
},
|
|
81
|
+
loadPage: loadPage
|
|
82
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
style: {
|
|
84
|
+
height: 100,
|
|
85
|
+
backgroundColor: 'green'
|
|
86
|
+
}
|
|
87
|
+
}, "\u68C0\u7D22\u6761\u4EF6")), /*#__PURE__*/React.createElement("button", {
|
|
88
|
+
style: {
|
|
89
|
+
position: 'absolute',
|
|
90
|
+
bottom: 30,
|
|
91
|
+
right: 30
|
|
92
|
+
},
|
|
93
|
+
onClick: function onClick() {
|
|
94
|
+
var _ref$current;
|
|
95
|
+
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.backTop();
|
|
96
|
+
}
|
|
97
|
+
}, "\u8FD4\u56DE\u9876\u90E8"));
|
|
98
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IDynamicGridListProps } from '../DynamicGridList';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface IListWithSizeAnimateProps<T> extends IDynamicGridListProps<T> {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
header?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface IListWithSizeAnimateRef {
|
|
9
|
+
open: () => void;
|
|
10
|
+
close: () => void;
|
|
11
|
+
backTop: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare const ListWithSizeAnimate: React.ForwardRefExoticComponent<IListWithSizeAnimateProps<unknown> & React.RefAttributes<IListWithSizeAnimateRef>>;
|
|
14
|
+
export default ListWithSizeAnimate;
|