@cloud-app-dev/vidc 4.0.14 → 4.0.17
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/.dumirc.ts +2 -18
- package/.fatherrc.ts +0 -1
- package/.prettierrc.js +1 -1
- package/package.json +41 -33
- package/release-build.sh +1 -2
- package/es/AppContext/Sync.d.ts +0 -8
- package/es/AppContext/Sync.js +0 -44
- package/es/AppContext/index.d.ts +0 -10
- package/es/AppContext/index.js +0 -144
- package/es/AppContext/interface.d.ts +0 -41
- package/es/AppContext/static.d.ts +0 -8
- package/es/AppContext/static.js +0 -9
- package/es/Auth/index.d.ts +0 -8
- package/es/Auth/index.js +0 -18
- package/es/AutoExit/index.d.ts +0 -6
- package/es/AutoExit/index.js +0 -23
- package/es/CheckGroupFixed/demo.d.ts +0 -3
- package/es/CheckGroupFixed/demo.js +0 -25
- package/es/CheckGroupFixed/index.d.ts +0 -18
- package/es/CheckGroupFixed/index.js +0 -150
- package/es/CheckGroupFixed/index.less +0 -53
- package/es/Config/index.d.ts +0 -4
- package/es/Config/index.js +0 -77
- package/es/Config/interface.d.ts +0 -65
- package/es/Config/utils.d.ts +0 -4
- package/es/Config/utils.js +0 -33
- package/es/ConfigContext/index.d.ts +0 -22
- package/es/ConfigContext/index.js +0 -25
- package/es/CustomRenderSelect/index.d.ts +0 -12
- package/es/CustomRenderSelect/index.js +0 -83
- package/es/CustomRenderSelect/index.less +0 -25
- package/es/DBTools/index.d.ts +0 -25
- package/es/DBTools/index.js +0 -337
- package/es/DisableMark/index.d.ts +0 -9
- package/es/DisableMark/index.js +0 -22
- package/es/DisableMark/index.less +0 -9
- package/es/DomMove/demo.d.ts +0 -2
- package/es/DomMove/demo.js +0 -20
- package/es/DomMove/index.d.ts +0 -16
- package/es/DomMove/index.js +0 -149
- package/es/DomMove/utils.d.ts +0 -8
- package/es/DomMove/utils.js +0 -33
- package/es/Drag/DragAndDropItem.d.ts +0 -4
- package/es/Drag/DragAndDropItem.js +0 -133
- package/es/Drag/DropItem.d.ts +0 -4
- package/es/Drag/DropItem.js +0 -50
- package/es/Drag/index.d.ts +0 -7
- package/es/Drag/index.js +0 -7
- package/es/Drag/interface.d.ts +0 -16
- package/es/DynamicGridList/Demo.d.ts +0 -3
- package/es/DynamicGridList/Demo.js +0 -86
- package/es/DynamicGridList/index.d.ts +0 -27
- package/es/DynamicGridList/index.js +0 -71
- package/es/DynamicList/demo.d.ts +0 -2
- package/es/DynamicList/demo.js +0 -50
- package/es/DynamicList/index.d.ts +0 -31
- package/es/DynamicList/index.js +0 -96
- package/es/DynamicList/index.less +0 -17
- package/es/DynamicList/interface.d.ts +0 -19
- package/es/DynamicList/utils.d.ts +0 -4
- package/es/DynamicList/utils.js +0 -6
- package/es/ErrorFallback/index.d.ts +0 -9
- package/es/ErrorFallback/index.js +0 -38
- package/es/ErrorFallback/inerface.d.ts +0 -48
- package/es/EventTools/index.d.ts +0 -3
- package/es/EventTools/index.js +0 -12
- package/es/FrontendPlayer/index.d.ts +0 -4
- package/es/FrontendPlayer/index.js +0 -2
- package/es/FullScreen/index.d.ts +0 -22
- package/es/FullScreen/index.js +0 -36
- package/es/FullScreen/index.less +0 -18
- package/es/GridList/Demo.d.ts +0 -3
- package/es/GridList/Demo.js +0 -89
- package/es/GridList/data.d.ts +0 -16
- package/es/GridList/data.js +0 -609
- package/es/GridList/hook.d.ts +0 -13
- package/es/GridList/hook.js +0 -270
- package/es/GridList/index.d.ts +0 -15
- package/es/GridList/index.js +0 -48
- package/es/GridList/index.less +0 -8
- package/es/GridList/interface.d.ts +0 -59
- package/es/GridList/utils.d.ts +0 -9
- package/es/GridList/utils.js +0 -42
- package/es/HightLevel/index.d.ts +0 -9
- package/es/HightLevel/index.js +0 -21
- package/es/HightLevel/index.less +0 -3
- package/es/IconFont/index.d.ts +0 -12
- package/es/IconFont/index.js +0 -63
- package/es/ImageView/index.d.ts +0 -17
- package/es/ImageView/index.js +0 -58
- package/es/ImageView/index.less +0 -11
- package/es/InstanceHistory/index.d.ts +0 -3
- package/es/InstanceHistory/index.js +0 -7
- package/es/LabelPlayer/111.png +0 -0
- package/es/LabelPlayer/demo.d.ts +0 -2
- package/es/LabelPlayer/demo.js +0 -123
- package/es/LabelPlayer/index.d.ts +0 -21
- package/es/LabelPlayer/index.js +0 -169
- package/es/LabelPlayer/index.less +0 -24
- package/es/LabelValue/index.d.ts +0 -15
- package/es/LabelValue/index.js +0 -32
- package/es/LabelValue/index.less +0 -23
- package/es/List/demo.d.ts +0 -3
- package/es/List/demo.js +0 -26
- package/es/List/index.d.ts +0 -28
- package/es/List/index.js +0 -30
- package/es/List/index.less +0 -13
- package/es/ListWithSizeAnimate/demo.d.ts +0 -2
- package/es/ListWithSizeAnimate/demo.js +0 -128
- package/es/ListWithSizeAnimate/index.d.ts +0 -14
- package/es/ListWithSizeAnimate/index.js +0 -97
- package/es/ListWithSizeAnimate/index.less +0 -23
- package/es/LoaderScript/index.d.ts +0 -47
- package/es/LoaderScript/index.js +0 -38
- package/es/LoaderScript/utils.d.ts +0 -13
- package/es/LoaderScript/utils.js +0 -179
- package/es/Map/AMap.d.ts +0 -7109
- package/es/Map/BasicMap/AMapInstance.d.ts +0 -19
- package/es/Map/BasicMap/AMapInstance.js +0 -98
- package/es/Map/BasicMap/LeafletInstance.d.ts +0 -18
- package/es/Map/BasicMap/LeafletInstance.js +0 -111
- package/es/Map/BasicMap/index.d.ts +0 -9
- package/es/Map/BasicMap/index.js +0 -98
- package/es/Map/BasicMap/index.less +0 -29
- package/es/Map/ClusterLayer/demo.d.ts +0 -3
- package/es/Map/ClusterLayer/demo.js +0 -22
- package/es/Map/ClusterLayer/hook.d.ts +0 -5
- package/es/Map/ClusterLayer/hook.js +0 -124
- package/es/Map/ClusterLayer/index.d.ts +0 -6
- package/es/Map/ClusterLayer/index.js +0 -32
- package/es/Map/ClusterLayer/index.less +0 -29
- package/es/Map/ClusterLayer/props.d.ts +0 -8
- package/es/Map/Config/index.d.ts +0 -9
- package/es/Map/Config/index.js +0 -52
- package/es/Map/Config/utils.d.ts +0 -2
- package/es/Map/Config/utils.js +0 -65
- package/es/Map/Context/index.d.ts +0 -11
- package/es/Map/Context/index.js +0 -56
- package/es/Map/FindPio/index.d.ts +0 -4
- package/es/Map/FindPio/index.js +0 -14
- package/es/Map/FindPio/index.less +0 -7
- package/es/Map/InfoWindow/MakerLikeWindow.d.ts +0 -4
- package/es/Map/InfoWindow/MakerLikeWindow.js +0 -113
- package/es/Map/InfoWindow/demo.d.ts +0 -3
- package/es/Map/InfoWindow/demo.js +0 -76
- package/es/Map/InfoWindow/index.d.ts +0 -11
- package/es/Map/InfoWindow/index.js +0 -67
- package/es/Map/LevelCenter/DragMarker/index.d.ts +0 -10
- package/es/Map/LevelCenter/DragMarker/index.js +0 -44
- package/es/Map/LevelCenter/demo.d.ts +0 -3
- package/es/Map/LevelCenter/demo.js +0 -46
- package/es/Map/LevelCenter/index.d.ts +0 -15
- package/es/Map/LevelCenter/index.js +0 -71
- package/es/Map/LoaderMap/index.d.ts +0 -12
- package/es/Map/LoaderMap/index.js +0 -71
- package/es/Map/MapDrawSelect/demo.d.ts +0 -3
- package/es/Map/MapDrawSelect/demo.js +0 -79
- package/es/Map/MapDrawSelect/index.d.ts +0 -15
- package/es/Map/MapDrawSelect/index.js +0 -62
- package/es/Map/MouseTool/index.d.ts +0 -10
- package/es/Map/MouseTool/index.js +0 -44
- package/es/Map/MouseTool/useMouseTools.d.ts +0 -7
- package/es/Map/MouseTool/useMouseTools.js +0 -83
- package/es/Map/ResetTools/index.d.ts +0 -10
- package/es/Map/ResetTools/index.js +0 -67
- package/es/Map/ResetTools/index.less +0 -39
- package/es/Map/SinglePoint/demo.d.ts +0 -3
- package/es/Map/SinglePoint/demo.js +0 -16
- package/es/Map/SinglePoint/index.d.ts +0 -27
- package/es/Map/SinglePoint/index.js +0 -57
- package/es/Map/SinglePoint/index.less +0 -41
- package/es/Map/hook/useMapEvent.d.ts +0 -2
- package/es/Map/hook/useMapEvent.js +0 -19
- package/es/Map/hook/useMapType.d.ts +0 -4
- package/es/Map/hook/useMapType.js +0 -12
- package/es/Map/icon.d.ts +0 -2
- package/es/Map/icon.js +0 -10
- package/es/Map/index.d.ts +0 -24
- package/es/Map/index.js +0 -25
- package/es/Map/interface.d.ts +0 -74
- package/es/Map/points.d.ts +0 -74
- package/es/Map/points.js +0 -1
- package/es/Map/useMarker/index.d.ts +0 -10
- package/es/Map/useMarker/index.js +0 -71
- package/es/Map/withMap/index.d.ts +0 -3
- package/es/Map/withMap/index.js +0 -18
- package/es/Map3D/demo.d.ts +0 -3
- package/es/Map3D/demo.js +0 -13
- package/es/Map3D/index.d.ts +0 -4
- package/es/Map3D/index.js +0 -84
- package/es/Map3D/index.less +0 -4
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +0 -8
- package/es/Picture/component/DefaultRects/RectInfo.js +0 -88
- package/es/Picture/component/DefaultRects/index.d.ts +0 -13
- package/es/Picture/component/DefaultRects/index.js +0 -58
- package/es/Picture/component/DefaultRects/index.less +0 -211
- package/es/Picture/component/DefaultRects/utils.d.ts +0 -2
- package/es/Picture/component/DefaultRects/utils.js +0 -11
- package/es/Picture/component/DrawRect/index.d.ts +0 -13
- package/es/Picture/component/DrawRect/index.js +0 -51
- package/es/Picture/component/DrawRect/index.less +0 -8
- package/es/Picture/component/RectMenu/index.d.ts +0 -12
- package/es/Picture/component/RectMenu/index.js +0 -79
- package/es/Picture/component/RectMenu/index.less +0 -36
- package/es/Picture/component/RectMenu/utils.d.ts +0 -12
- package/es/Picture/component/RectMenu/utils.js +0 -19
- package/es/Picture/component/Tools/index.d.ts +0 -12
- package/es/Picture/component/Tools/index.js +0 -93
- package/es/Picture/component/Tools/index.less +0 -49
- package/es/Picture/component/WheelScale/index.d.ts +0 -7
- package/es/Picture/component/WheelScale/index.js +0 -29
- package/es/Picture/demo.d.ts +0 -2
- package/es/Picture/demo.js +0 -113
- package/es/Picture/index.d.ts +0 -19
- package/es/Picture/index.js +0 -354
- package/es/Picture/index.less +0 -20
- package/es/Picture/interface.d.ts +0 -196
- package/es/Picture/loadCaptureRectImage.d.ts +0 -3
- package/es/Picture/loadCaptureRectImage.js +0 -99
- package/es/Picture/useDraw.d.ts +0 -1
- package/es/Picture/useDraw.js +0 -103
- package/es/Picture/utils.d.ts +0 -26
- package/es/Picture/utils.js +0 -143
- package/es/Player/api/index.d.ts +0 -68
- package/es/Player/api/index.js +0 -283
- package/es/Player/context.d.ts +0 -21
- package/es/Player/context.js +0 -25
- package/es/Player/contraller_bar/bar.d.ts +0 -8
- package/es/Player/contraller_bar/bar.js +0 -28
- package/es/Player/contraller_bar/contraller_event.d.ts +0 -6
- package/es/Player/contraller_bar/contraller_event.js +0 -53
- package/es/Player/contraller_bar/index.d.ts +0 -14
- package/es/Player/contraller_bar/index.js +0 -33
- package/es/Player/contraller_bar/left_bar.d.ts +0 -10
- package/es/Player/contraller_bar/left_bar.js +0 -88
- package/es/Player/contraller_bar/right_bar.d.ts +0 -8
- package/es/Player/contraller_bar/right_bar.js +0 -37
- package/es/Player/contraller_bar/time.d.ts +0 -3
- package/es/Player/contraller_bar/time.js +0 -21
- package/es/Player/contraller_bar/useBarStatus.d.ts +0 -2
- package/es/Player/contraller_bar/useBarStatus.js +0 -43
- package/es/Player/contraller_bar/volume.d.ts +0 -9
- package/es/Player/contraller_bar/volume.js +0 -65
- package/es/Player/demo.d.ts +0 -3
- package/es/Player/demo.js +0 -277
- package/es/Player/empty.d.ts +0 -2
- package/es/Player/empty.js +0 -6
- package/es/Player/event/errorEvent.d.ts +0 -14
- package/es/Player/event/errorEvent.js +0 -88
- package/es/Player/event/eventName.d.ts +0 -18
- package/es/Player/event/eventName.js +0 -30
- package/es/Player/event/index.d.ts +0 -24
- package/es/Player/event/index.js +0 -204
- package/es/Player/fps_play.d.ts +0 -11
- package/es/Player/fps_play.js +0 -84
- package/es/Player/frontend_player.d.ts +0 -8
- package/es/Player/frontend_player.js +0 -72
- package/es/Player/frontend_timeline.d.ts +0 -10
- package/es/Player/frontend_timeline.js +0 -145
- package/es/Player/iconfont.d.ts +0 -5
- package/es/Player/iconfont.js +0 -22
- package/es/Player/index.d.ts +0 -2
- package/es/Player/index.js +0 -2
- package/es/Player/live_heart.d.ts +0 -8
- package/es/Player/live_heart.js +0 -46
- package/es/Player/message.d.ts +0 -5
- package/es/Player/message.js +0 -138
- package/es/Player/player.d.ts +0 -231
- package/es/Player/segment_player.d.ts +0 -9
- package/es/Player/segment_player.js +0 -230
- package/es/Player/segment_timeline.d.ts +0 -12
- package/es/Player/segment_timeline.js +0 -190
- package/es/Player/single_player.d.ts +0 -5
- package/es/Player/single_player.js +0 -290
- package/es/Player/style/bar.less +0 -43
- package/es/Player/style/iconfont.js +0 -43
- package/es/Player/style/index.less +0 -34
- package/es/Player/style/message.less +0 -56
- package/es/Player/style/slider.less +0 -106
- package/es/Player/style/timeline.less +0 -116
- package/es/Player/style/volume.less +0 -24
- package/es/Player/timeline.d.ts +0 -5
- package/es/Player/timeline.js +0 -98
- package/es/Player/util.d.ts +0 -42
- package/es/Player/util.js +0 -172
- package/es/PlayerExt/demo.d.ts +0 -3
- package/es/PlayerExt/demo.js +0 -170
- package/es/PlayerExt/index.d.ts +0 -48
- package/es/PlayerExt/index.js +0 -207
- package/es/PlayerExt/index.less +0 -10
- package/es/Progress/index.d.ts +0 -12
- package/es/Progress/index.js +0 -56
- package/es/Progress/index.less +0 -21
- package/es/ROI/demo.d.ts +0 -3
- package/es/ROI/demo.js +0 -18
- package/es/ROI/index.d.ts +0 -33
- package/es/ROI/index.js +0 -57
- package/es/ROI/index.less +0 -33
- package/es/RefDrawer/Footer.d.ts +0 -9
- package/es/RefDrawer/Footer.js +0 -27
- package/es/RefDrawer/demo.d.ts +0 -3
- package/es/RefDrawer/demo.js +0 -32
- package/es/RefDrawer/index.d.ts +0 -26
- package/es/RefDrawer/index.js +0 -73
- package/es/RefModal/demo.d.ts +0 -3
- package/es/RefModal/demo.js +0 -32
- package/es/RefModal/index.d.ts +0 -17
- package/es/RefModal/index.js +0 -71
- package/es/ScreenPlayer/Live.d.ts +0 -10
- package/es/ScreenPlayer/Live.js +0 -220
- package/es/ScreenPlayer/LiveTools.d.ts +0 -29
- package/es/ScreenPlayer/LiveTools.js +0 -167
- package/es/ScreenPlayer/PlayerWithExt.d.ts +0 -34
- package/es/ScreenPlayer/PlayerWithExt.js +0 -240
- package/es/ScreenPlayer/RatePick.d.ts +0 -8
- package/es/ScreenPlayer/RatePick.js +0 -30
- package/es/ScreenPlayer/Record.d.ts +0 -10
- package/es/ScreenPlayer/Record.js +0 -447
- package/es/ScreenPlayer/RecordTools.d.ts +0 -38
- package/es/ScreenPlayer/RecordTools.js +0 -216
- package/es/ScreenPlayer/ScreenSelect.d.ts +0 -7
- package/es/ScreenPlayer/ScreenSelect.js +0 -51
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +0 -17
- package/es/ScreenPlayer/SegmentTimeLine.js +0 -38
- package/es/ScreenPlayer/TimeMode.d.ts +0 -7
- package/es/ScreenPlayer/TimeMode.js +0 -30
- package/es/ScreenPlayer/TimeSelect.d.ts +0 -7
- package/es/ScreenPlayer/TimeSelect.js +0 -94
- package/es/ScreenPlayer/demo.d.ts +0 -2
- package/es/ScreenPlayer/demo.js +0 -24
- package/es/ScreenPlayer/demo2.d.ts +0 -2
- package/es/ScreenPlayer/demo2.js +0 -200
- package/es/ScreenPlayer/index.d.ts +0 -6
- package/es/ScreenPlayer/index.js +0 -9
- package/es/ScreenPlayer/index.less +0 -335
- package/es/ScreenPlayer/interface.d.ts +0 -216
- package/es/ScreenPlayer/useTimeSlider.d.ts +0 -25
- package/es/ScreenPlayer/useTimeSlider.js +0 -450
- package/es/ScreenPlayer/useVideoFit.d.ts +0 -5
- package/es/ScreenPlayer/useVideoFit.js +0 -35
- package/es/ScreenPlayer/utils.d.ts +0 -17
- package/es/ScreenPlayer/utils.js +0 -85
- package/es/SegmentPlayer/index.d.ts +0 -2
- package/es/SegmentPlayer/index.js +0 -2
- package/es/Service/http.d.ts +0 -6
- package/es/Service/http.js +0 -125
- package/es/Service/index.d.ts +0 -3
- package/es/Service/index.js +0 -10
- package/es/Service/interface.d.ts +0 -22
- package/es/Service/middleware.d.ts +0 -5
- package/es/Service/middleware.js +0 -15
- package/es/SocketEmitter/eventEmitter.d.ts +0 -27
- package/es/SocketEmitter/eventEmitter.js +0 -88
- package/es/SocketEmitter/index.d.ts +0 -24
- package/es/SocketEmitter/index.js +0 -125
- package/es/SocketEmitter/interface.d.ts +0 -4
- package/es/TableLayout/index.d.ts +0 -10
- package/es/TableLayout/index.js +0 -29
- package/es/TableLayout/index.less +0 -4
- package/es/ThemeAntd/demo.d.ts +0 -4
- package/es/ThemeAntd/demo.js +0 -129
- package/es/ThemeAntd/demo.less +0 -20
- package/es/ThemeAntd/index.d.ts +0 -7
- package/es/ThemeAntd/index.js +0 -23
- package/es/ThemeAntd/index.less +0 -4
- package/es/Timeout/index.d.ts +0 -32
- package/es/Timeout/index.js +0 -70
- package/es/VList/index.d.ts +0 -11
- package/es/VList/index.js +0 -42
- package/es/VList/index.less +0 -6
- package/es/VList/utils.d.ts +0 -14
- package/es/VList/utils.js +0 -17
- package/es/bigNumberTransformCN/index.d.ts +0 -5
- package/es/bigNumberTransformCN/index.js +0 -60
- package/es/cache/index.d.ts +0 -34
- package/es/cache/index.js +0 -94
- package/es/copy/index.d.ts +0 -1
- package/es/copy/index.js +0 -9
- package/es/core.d.ts +0 -0
- package/es/getThemeStyle/index.d.ts +0 -2
- package/es/getThemeStyle/index.js +0 -5
- package/es/index.d.ts +0 -61
- package/es/index.js +0 -61
- package/es/logger/index.d.ts +0 -7
- package/es/logger/index.js +0 -30
- package/es/nextTick/index.d.ts +0 -1
- package/es/nextTick/index.js +0 -7
- package/es/submidstr/index.d.ts +0 -5
- package/es/submidstr/index.js +0 -14
- package/es/treeHelper/index.d.ts +0 -11
- package/es/treeHelper/index.js +0 -189
- package/es/typings.d.ts +0 -2
- package/es/useDrawROI/index.d.ts +0 -16
- package/es/useDrawROI/index.js +0 -322
- package/es/useEventEmitterHandle/index.d.ts +0 -2
- package/es/useEventEmitterHandle/index.js +0 -17
- package/es/useFullscreen/demo.d.ts +0 -2
- package/es/useFullscreen/demo.js +0 -48
- package/es/useFullscreen/index.d.ts +0 -12
- package/es/useFullscreen/index.js +0 -76
- package/es/useHistory/index.d.ts +0 -3
- package/es/useHistory/index.js +0 -9
- package/es/useHistory/interface.d.ts +0 -3
- package/es/useInfiniteScroll/index.d.ts +0 -16
- package/es/useInfiniteScroll/index.js +0 -101
- package/es/useRafInterval/index.d.ts +0 -5
- package/es/useRafInterval/index.js +0 -70
- package/es/useSimpleState/index.d.ts +0 -3
- package/es/useSimpleState/index.js +0 -36
- package/es/useVirtualList/index.d.ts +0 -13
- package/es/useVirtualList/index.js +0 -139
- package/es/utils.d.ts +0 -14
- package/es/utils.js +0 -75
- package/es/uuid/index.d.ts +0 -4
- package/es/uuid/index.js +0 -15
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference path="../AMap.d.ts" />
|
|
2
|
-
import { Map } from '../interface';
|
|
3
|
-
export interface IUseMarkerProps {
|
|
4
|
-
map: Map;
|
|
5
|
-
center: [number, number];
|
|
6
|
-
createIcon: (options?: any) => any;
|
|
7
|
-
options?: AMap.MarkerOptions;
|
|
8
|
-
}
|
|
9
|
-
declare function useMarker({ map, center, createIcon, options }: IUseMarkerProps): any;
|
|
10
|
-
export default useMarker;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
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; }
|
|
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
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
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
|
-
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); }
|
|
10
|
-
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; }
|
|
11
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
14
|
-
/// <reference path="../AMap.d.ts" />
|
|
15
|
-
|
|
16
|
-
import { useEffect, useRef, useState } from 'react';
|
|
17
|
-
import useMapType from "../hook/useMapType";
|
|
18
|
-
function useMarker(_ref) {
|
|
19
|
-
var map = _ref.map,
|
|
20
|
-
center = _ref.center,
|
|
21
|
-
createIcon = _ref.createIcon,
|
|
22
|
-
options = _ref.options;
|
|
23
|
-
var _useState = useState({
|
|
24
|
-
marker: null
|
|
25
|
-
}),
|
|
26
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
-
state = _useState2[0],
|
|
28
|
-
setState = _useState2[1];
|
|
29
|
-
var inMap = useRef(false);
|
|
30
|
-
var type = useMapType();
|
|
31
|
-
useEffect(function () {
|
|
32
|
-
if (!(center && center.length === 2) || !map) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (type.leaflet) {
|
|
36
|
-
var L = window.L;
|
|
37
|
-
var latlng = L.latLng(center);
|
|
38
|
-
if (inMap.current) {
|
|
39
|
-
state.marker.setLatLng(latlng);
|
|
40
|
-
} else {
|
|
41
|
-
var marker = L.marker(latlng, {
|
|
42
|
-
icon: createIcon(),
|
|
43
|
-
draggable: true,
|
|
44
|
-
zIndexOffset: 10
|
|
45
|
-
});
|
|
46
|
-
map.addLayer(marker);
|
|
47
|
-
setState({
|
|
48
|
-
marker: marker
|
|
49
|
-
});
|
|
50
|
-
inMap.current = true;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (type.AMap) {
|
|
54
|
-
if (inMap.current) {
|
|
55
|
-
state.marker.setPosition(center);
|
|
56
|
-
} else {
|
|
57
|
-
var _marker = new AMap.Marker(_objectSpread({
|
|
58
|
-
position: center
|
|
59
|
-
}, options));
|
|
60
|
-
map.add(_marker);
|
|
61
|
-
setState({
|
|
62
|
-
marker: _marker
|
|
63
|
-
});
|
|
64
|
-
inMap.current = true;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
-
}, [center, map, options]);
|
|
69
|
-
return state.marker;
|
|
70
|
-
}
|
|
71
|
-
export default useMarker;
|
package/es/Map/withMap/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
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; }
|
|
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
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import Map from "../BasicMap";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
function withMap(Component, className) {
|
|
11
|
-
return function withMapComponent(props) {
|
|
12
|
-
return /*#__PURE__*/_jsx(Map, {
|
|
13
|
-
className: className,
|
|
14
|
-
children: /*#__PURE__*/_jsx(Component, _objectSpread({}, props))
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export default withMap;
|
package/es/Map3D/demo.d.ts
DELETED
package/es/Map3D/demo.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Map3D from '.';
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
var App = function App() {
|
|
5
|
-
return /*#__PURE__*/_jsx("div", {
|
|
6
|
-
style: {
|
|
7
|
-
width: 1000,
|
|
8
|
-
height: 400
|
|
9
|
-
},
|
|
10
|
-
children: /*#__PURE__*/_jsx(Map3D, {})
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
export default App;
|
package/es/Map3D/index.d.ts
DELETED
package/es/Map3D/index.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import LoaderScript from "../LoaderScript";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
|
|
5
|
-
// const options: IOptionsLoader[] = [
|
|
6
|
-
// { scripts: ['http://192.168.101.38:8888/twinmap/resources/TwinMap3D/lib/Cesium/Cesium.js'] },
|
|
7
|
-
// { scripts: ['http://192.168.101.38:8888/twinmap/resources/TwinMap3D/TwinMap3D.js'] },
|
|
8
|
-
// ];
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
var options = [{
|
|
11
|
-
scripts: []
|
|
12
|
-
}, {
|
|
13
|
-
scripts: []
|
|
14
|
-
}];
|
|
15
|
-
var _this = window;
|
|
16
|
-
function Map3D() {
|
|
17
|
-
var ref = useRef(null);
|
|
18
|
-
useEffect(function () {
|
|
19
|
-
var viewer = new _this.Cesium.Viewer(ref.current, {
|
|
20
|
-
infoBox: false,
|
|
21
|
-
selectionIndicator: false,
|
|
22
|
-
navigation: false,
|
|
23
|
-
animation: false,
|
|
24
|
-
shouldAnimate: false,
|
|
25
|
-
timeline: false,
|
|
26
|
-
baseLayerPicker: false,
|
|
27
|
-
geocoder: false,
|
|
28
|
-
homeButton: false,
|
|
29
|
-
sceneModePicker: false,
|
|
30
|
-
navigationHelpButton: false,
|
|
31
|
-
fullscreenButton: !1
|
|
32
|
-
});
|
|
33
|
-
var url = 'http://192.168.101.38:8888/twinmap/twin3dMap/model/b3dms/tileset.json';
|
|
34
|
-
var tileset = new _this.Cesium.Cesium3DTileset({
|
|
35
|
-
url: url
|
|
36
|
-
});
|
|
37
|
-
viewer.scene.primitives.add(tileset).readyPromise.then(function (t) {
|
|
38
|
-
console.log(t);
|
|
39
|
-
viewer.zoomTo(t);
|
|
40
|
-
tileset.maximumScreenSpaceError = 1;
|
|
41
|
-
var plotDraw = new _this.TwinMap3D.Tools.GeoPlotDraw(viewer);
|
|
42
|
-
plotDraw.activate('marker');
|
|
43
|
-
|
|
44
|
-
// const params = {
|
|
45
|
-
// tx: 116.044332, //模型中心X轴坐标(经度,单位:十进制度)
|
|
46
|
-
// ty: 30.110653, //模型中心Y轴坐标(纬度,单位:十进制度)
|
|
47
|
-
// tz: 0, //模型中心Z轴坐标(高程,单位:米)
|
|
48
|
-
// rx: 0, //X轴(经度)方向旋转角度(单位:度)
|
|
49
|
-
// ry: 0, //Y轴(纬度)方向旋转角度(单位:度)
|
|
50
|
-
// rz: 0, //Z轴(高程)方向旋转角度(单位:度)
|
|
51
|
-
// };
|
|
52
|
-
//平移、贴地、旋转模型
|
|
53
|
-
//旋转
|
|
54
|
-
// const mx = _this.Cesium.Matrix3.fromRotationX(_this.Cesium.Math.toRadians(params.rx));
|
|
55
|
-
// const my = _this.Cesium.Matrix3.fromRotationY(_this.Cesium.Math.toRadians(params.ry));
|
|
56
|
-
// const mz = _this.Cesium.Matrix3.fromRotationZ(_this.Cesium.Math.toRadians(params.rz));
|
|
57
|
-
// const rotationX = _this.Cesium.Matrix4.fromRotationTranslation(mx);
|
|
58
|
-
// const rotationY = _this.Cesium.Matrix4.fromRotationTranslation(my);
|
|
59
|
-
// const rotationZ = _this.Cesium.Matrix4.fromRotationTranslation(mz);
|
|
60
|
-
//平移
|
|
61
|
-
// const position = _this.Cesium.Cartesian3.fromDegrees(params.tx, params.ty, params.tz);
|
|
62
|
-
// const m = _this.Cesium.Transforms.eastNorthUpToFixedFrame(position);
|
|
63
|
-
//旋转、平移矩阵相乘
|
|
64
|
-
// _this.Cesium.Matrix4.multiply(m, rotationX, m);
|
|
65
|
-
// _this.Cesium.Matrix4.multiply(m, rotationY, m);
|
|
66
|
-
// _this.Cesium.Matrix4.multiply(m, rotationZ, m);
|
|
67
|
-
//赋值给tileset
|
|
68
|
-
// tileset._root.transform = m;
|
|
69
|
-
}).otherwise(function (e) {
|
|
70
|
-
console.log(e);
|
|
71
|
-
});
|
|
72
|
-
}, []);
|
|
73
|
-
return /*#__PURE__*/_jsx("div", {
|
|
74
|
-
className: "map-3d-container",
|
|
75
|
-
ref: ref
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
function withLoadMap() {
|
|
79
|
-
return /*#__PURE__*/_jsx(LoaderScript, {
|
|
80
|
-
options: options,
|
|
81
|
-
children: /*#__PURE__*/_jsx(Map3D, {})
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
export default withLoadMap;
|
package/es/Map3D/index.less
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RectType } from '../../interface';
|
|
3
|
-
interface IRectInfoProps {
|
|
4
|
-
item: RectType;
|
|
5
|
-
containerDom: HTMLDivElement;
|
|
6
|
-
}
|
|
7
|
-
declare function RectInfo({ item, containerDom }: IRectInfoProps): JSX.Element;
|
|
8
|
-
export default RectInfo;
|
|
@@ -1,88 +0,0 @@
|
|
|
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(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useMemo } from 'react';
|
|
8
|
-
import IconFont from "../../../IconFont";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
var RECT_INFO_WIDTH = 150;
|
|
12
|
-
var RECT_INFO_HEIGHT = 24;
|
|
13
|
-
var RECT_WINDOW_MARGIN = 6;
|
|
14
|
-
function RectInfo(_ref) {
|
|
15
|
-
var item = _ref.item,
|
|
16
|
-
containerDom = _ref.containerDom;
|
|
17
|
-
var position = useMemo(function () {
|
|
18
|
-
var _containerDom$getBoun = containerDom.getBoundingClientRect(),
|
|
19
|
-
width = _containerDom$getBoun.width,
|
|
20
|
-
height = _containerDom$getBoun.height;
|
|
21
|
-
var _rectInfoWidth$rectIn = {
|
|
22
|
-
rectInfoWidth: RECT_INFO_WIDTH,
|
|
23
|
-
rectInfoHeight: item.tags.length * RECT_INFO_HEIGHT + 6 + 30
|
|
24
|
-
},
|
|
25
|
-
rectInfoWidth = _rectInfoWidth$rectIn.rectInfoWidth,
|
|
26
|
-
rectInfoHeight = _rectInfoWidth$rectIn.rectInfoHeight;
|
|
27
|
-
var _item$rect = _slicedToArray(item.rect, 3),
|
|
28
|
-
rectLeft = _item$rect[0],
|
|
29
|
-
rectTop = _item$rect[1],
|
|
30
|
-
rectWidth = _item$rect[2];
|
|
31
|
-
var x, y;
|
|
32
|
-
if (rectWidth + rectLeft + rectInfoWidth < width) {
|
|
33
|
-
x = rectWidth + rectLeft + RECT_WINDOW_MARGIN;
|
|
34
|
-
} else {
|
|
35
|
-
x = rectLeft - RECT_WINDOW_MARGIN - rectInfoWidth;
|
|
36
|
-
}
|
|
37
|
-
if (rectTop + rectInfoHeight < height) {
|
|
38
|
-
y = rectTop;
|
|
39
|
-
y = y < 0 ? RECT_WINDOW_MARGIN : y;
|
|
40
|
-
} else {
|
|
41
|
-
y = height - rectInfoHeight;
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
x: x,
|
|
45
|
-
y: y,
|
|
46
|
-
width: rectInfoWidth,
|
|
47
|
-
height: rectInfoHeight
|
|
48
|
-
};
|
|
49
|
-
}, [containerDom, item.rect, item.tags.length]);
|
|
50
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
51
|
-
className: "rect-info-list-wrapper",
|
|
52
|
-
style: {
|
|
53
|
-
left: position.x,
|
|
54
|
-
top: position.y,
|
|
55
|
-
width: position.width,
|
|
56
|
-
height: position.height
|
|
57
|
-
},
|
|
58
|
-
children: [/*#__PURE__*/_jsxs("div", {
|
|
59
|
-
className: "data-type",
|
|
60
|
-
children: [item.hasOwnProperty('lowQuality') && /*#__PURE__*/_jsxs("span", {
|
|
61
|
-
className: "data-tag low",
|
|
62
|
-
children: [/*#__PURE__*/_jsx(IconFont, {
|
|
63
|
-
type: 'lm-player_View_Cluster'
|
|
64
|
-
}), item.lowQuality ? '低质量' : '高质量']
|
|
65
|
-
}), item.hasOwnProperty('dupId') && item.dupId && /*#__PURE__*/_jsxs("span", {
|
|
66
|
-
className: "data-tag repeat",
|
|
67
|
-
children: [/*#__PURE__*/_jsx(IconFont, {
|
|
68
|
-
type: 'lm-player_Photo_repeatingdata'
|
|
69
|
-
}), "\u91CD\u590D"]
|
|
70
|
-
})]
|
|
71
|
-
}), /*#__PURE__*/_jsx("ul", {
|
|
72
|
-
className: "rect-info-list",
|
|
73
|
-
children: item.tags.map(function (v, index) {
|
|
74
|
-
return /*#__PURE__*/_jsxs("li", {
|
|
75
|
-
className: "info-item",
|
|
76
|
-
title: v.titleAttr,
|
|
77
|
-
children: [/*#__PURE__*/_jsx(IconFont, {
|
|
78
|
-
type: v.icon
|
|
79
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
80
|
-
className: "item-value",
|
|
81
|
-
children: v.label
|
|
82
|
-
})]
|
|
83
|
-
}, index);
|
|
84
|
-
})
|
|
85
|
-
})]
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
export default RectInfo;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RectType } from '../../interface';
|
|
3
|
-
import './index.less';
|
|
4
|
-
interface IDefaultRectsProps {
|
|
5
|
-
rects: RectType[];
|
|
6
|
-
containerDom: HTMLDivElement;
|
|
7
|
-
onClickRect?: (item: RectType & {
|
|
8
|
-
base64: string;
|
|
9
|
-
}) => void;
|
|
10
|
-
getRectImage: (rect: number[]) => string | null;
|
|
11
|
-
}
|
|
12
|
-
declare function DefaultRects({ rects, containerDom, onClickRect, getRectImage }: IDefaultRectsProps): JSX.Element;
|
|
13
|
-
export default DefaultRects;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
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; }
|
|
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
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import React, { useCallback, useMemo } from 'react';
|
|
8
|
-
import RectInfo from "./RectInfo";
|
|
9
|
-
import { computedZIndex } from "./utils";
|
|
10
|
-
import "./index.less";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
-
function DefaultRects(_ref) {
|
|
15
|
-
var rects = _ref.rects,
|
|
16
|
-
containerDom = _ref.containerDom,
|
|
17
|
-
onClickRect = _ref.onClickRect,
|
|
18
|
-
getRectImage = _ref.getRectImage;
|
|
19
|
-
var renderRects = useMemo(function () {
|
|
20
|
-
return computedZIndex(rects);
|
|
21
|
-
}, [rects]);
|
|
22
|
-
var rectClick = useCallback(function (e, item) {
|
|
23
|
-
var _getRectImage;
|
|
24
|
-
e.stopPropagation();
|
|
25
|
-
onClickRect === null || onClickRect === void 0 ? void 0 : onClickRect(_objectSpread(_objectSpread({}, item), {}, {
|
|
26
|
-
base64: (_getRectImage = getRectImage(item.rect)) !== null && _getRectImage !== void 0 ? _getRectImage : ''
|
|
27
|
-
}));
|
|
28
|
-
}, [getRectImage, onClickRect]);
|
|
29
|
-
return /*#__PURE__*/_jsx(_Fragment, {
|
|
30
|
-
children: renderRects.map(function (v, k) {
|
|
31
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
32
|
-
className: "rect-item-wrapper rect-item-".concat(v.type, "-wrapper"),
|
|
33
|
-
children: [/*#__PURE__*/_jsxs("div", {
|
|
34
|
-
className: 'rect-item',
|
|
35
|
-
onClick: function onClick(e) {
|
|
36
|
-
return rectClick(e, v);
|
|
37
|
-
},
|
|
38
|
-
style: {
|
|
39
|
-
left: v.rect[0],
|
|
40
|
-
top: v.rect[1],
|
|
41
|
-
width: v.rect[2],
|
|
42
|
-
height: v.rect[3],
|
|
43
|
-
zIndex: k
|
|
44
|
-
},
|
|
45
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
46
|
-
className: "border-top-decorator"
|
|
47
|
-
}), /*#__PURE__*/_jsx("div", {
|
|
48
|
-
className: "border-bottom-decorator"
|
|
49
|
-
})]
|
|
50
|
-
}), Array.isArray(v.tags) && v.tags.length > 0 && /*#__PURE__*/_jsx(RectInfo, {
|
|
51
|
-
item: v,
|
|
52
|
-
containerDom: containerDom
|
|
53
|
-
})]
|
|
54
|
-
}, k);
|
|
55
|
-
})
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
export default DefaultRects;
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
.border-decorator-color-mixin(@color) {
|
|
2
|
-
.border-top-decorator {
|
|
3
|
-
&::before {
|
|
4
|
-
border-top-color: @color;
|
|
5
|
-
border-left-color: @color;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
&::after {
|
|
9
|
-
border-top-color: @color;
|
|
10
|
-
border-right-color: @color;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.border-bottom-decorator {
|
|
15
|
-
&::before {
|
|
16
|
-
border-bottom-color: @color;
|
|
17
|
-
border-left-color: @color;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&::after {
|
|
21
|
-
border-bottom-color: @color;
|
|
22
|
-
border-right-color: @color;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.rect-item-style-mixin(@color, @lightColor, @shadowColor) {
|
|
28
|
-
.rect-item {
|
|
29
|
-
border-color: @lightColor;
|
|
30
|
-
.border-decorator-color-mixin(@color);
|
|
31
|
-
|
|
32
|
-
&:hover {
|
|
33
|
-
border-color: @color;
|
|
34
|
-
box-shadow: inset 0 0 24px 0 @shadowColor;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.rect-info-list-mixin(@color, @bgColor, @shadowColor) {
|
|
40
|
-
.rect-info-list-wrapper {
|
|
41
|
-
.data-type {
|
|
42
|
-
.data-tag {
|
|
43
|
-
background: @bgColor;
|
|
44
|
-
border: 1px solid @color;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// border-color: @color;
|
|
48
|
-
// .rect-card-corner {
|
|
49
|
-
// color: @color;
|
|
50
|
-
// }
|
|
51
|
-
// .rect-info-list {
|
|
52
|
-
// display: block;
|
|
53
|
-
// background: @bgColor;
|
|
54
|
-
// box-shadow: inset 0 0 8px 0 @shadowColor;
|
|
55
|
-
// }
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.rect-item-face-wrapper {
|
|
60
|
-
.rect-item-style-mixin(#ff5f57, rgba(255, 95, 87, .6), rgba(255, 95, 87, .4));
|
|
61
|
-
.rect-info-list-mixin(#FF5F57, rgba(255,95,87,.6), rgba(179,49,43,.6));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.rect-item-body-wrapper {
|
|
65
|
-
.rect-item-style-mixin(#ffbb22, rgba(255, 187, 34, .6), rgba(255, 187, 34, .4));
|
|
66
|
-
.rect-info-list-mixin(#FFBB22, rgba(255,187,34,.6), rgba(176,94,0,.6));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.rect-item-vehicle-wrapper {
|
|
70
|
-
.rect-item-style-mixin(#44aaff, rgba(68, 170, 255, .6), rgba(68, 170, 255, .4));
|
|
71
|
-
.rect-info-list-mixin(#44aaff, rgba(68,170,255,.6), rgba(31,114,183,.6));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.rect-item-nonVehicle-wrapper {
|
|
75
|
-
.rect-item-style-mixin(#50e9b2, rgba(80, 233, 178, .6), rgba(80, 233, 178, .4));
|
|
76
|
-
.rect-info-list-mixin(#50e9b2, rgba(80,233,178,.6), rgba(15,196,132,.6));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.rect-item-thing-wrapper {
|
|
80
|
-
.rect-item-style-mixin(#b946d2, rgba(185, 70, 210, .6), rgba(185, 70, 210, .4));
|
|
81
|
-
.rect-info-list-mixin(#b946d2, rgba(185, 70, 210, .6), rgba(155, 58, 177, .4));
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.rect-item {
|
|
85
|
-
position: absolute;
|
|
86
|
-
border-width: 1px;
|
|
87
|
-
border-style: solid;
|
|
88
|
-
cursor: pointer;
|
|
89
|
-
|
|
90
|
-
.border-top-decorator,
|
|
91
|
-
.border-bottom-decorator {
|
|
92
|
-
position: absolute;
|
|
93
|
-
width: 100%;
|
|
94
|
-
pointer-events: none;
|
|
95
|
-
|
|
96
|
-
&::before,
|
|
97
|
-
&::after {
|
|
98
|
-
display: block;
|
|
99
|
-
width: 8px;
|
|
100
|
-
height: 8px;
|
|
101
|
-
border: 2px solid transparent;
|
|
102
|
-
content: '';
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&::before {
|
|
106
|
-
float: left;
|
|
107
|
-
margin-left: -1px;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&::after {
|
|
111
|
-
float: right;
|
|
112
|
-
margin-right: -1px;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.border-top-decorator {
|
|
117
|
-
top: 0;
|
|
118
|
-
|
|
119
|
-
&::before,
|
|
120
|
-
&::after {
|
|
121
|
-
margin-top: -1px;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.border-bottom-decorator {
|
|
126
|
-
bottom: 0;
|
|
127
|
-
|
|
128
|
-
&::before,
|
|
129
|
-
&::after {
|
|
130
|
-
margin-bottom: -1px;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&:hover + .rect-info-list-wrapper {
|
|
135
|
-
display: block;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// 结构化窗体
|
|
140
|
-
.rect-info-list-wrapper {
|
|
141
|
-
position: absolute;
|
|
142
|
-
z-index: 11;
|
|
143
|
-
display: none;
|
|
144
|
-
padding-top: 5px;
|
|
145
|
-
background: rgb(16 21 36 / 80%);
|
|
146
|
-
border: 1px solid transparent;
|
|
147
|
-
|
|
148
|
-
/* 高低质量 */
|
|
149
|
-
.data-type {
|
|
150
|
-
padding: 0 5px;
|
|
151
|
-
color: #fff;
|
|
152
|
-
|
|
153
|
-
.data-tag {
|
|
154
|
-
padding: 4px;
|
|
155
|
-
margin-right: 4px;
|
|
156
|
-
font-size: 12px;
|
|
157
|
-
|
|
158
|
-
.anticon {
|
|
159
|
-
margin-right: 4px;
|
|
160
|
-
color: #fff;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.rect-card-corner {
|
|
166
|
-
position: absolute;
|
|
167
|
-
top: -9px;
|
|
168
|
-
left: -1px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.rect-info-arrow {
|
|
172
|
-
position: absolute;
|
|
173
|
-
top: 6px;
|
|
174
|
-
left: -4px;
|
|
175
|
-
display: block;
|
|
176
|
-
background: transparent;
|
|
177
|
-
transform: rotate(45deg);
|
|
178
|
-
border-style: solid;
|
|
179
|
-
border-width: 4px;
|
|
180
|
-
border-color: rgb(16 21 36 / 80%);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.rect-info-list {
|
|
184
|
-
height: 100%;
|
|
185
|
-
padding: 3px 10px;
|
|
186
|
-
border-radius: 2px;
|
|
187
|
-
|
|
188
|
-
.info-item {
|
|
189
|
-
padding: 3px 0;
|
|
190
|
-
overflow: hidden;
|
|
191
|
-
font-size: var(--fs-small);
|
|
192
|
-
line-height: 18px;
|
|
193
|
-
color: #fff;
|
|
194
|
-
text-overflow: ellipsis;
|
|
195
|
-
white-space: nowrap;
|
|
196
|
-
|
|
197
|
-
.anticon {
|
|
198
|
-
position: relative;
|
|
199
|
-
top: 1px;
|
|
200
|
-
padding-right: 4px;
|
|
201
|
-
font-size: 16px;
|
|
202
|
-
color: #fff;
|
|
203
|
-
cursor: default;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.item-label {
|
|
207
|
-
margin: 0 4px;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MenuRectType } from '../../interface';
|
|
3
|
-
import './index.less';
|
|
4
|
-
interface IDrawRectProps {
|
|
5
|
-
rect: number[];
|
|
6
|
-
canRenderMenu?: boolean;
|
|
7
|
-
containerDom: HTMLDivElement;
|
|
8
|
-
onMenuClick?: (options: MenuRectType) => void;
|
|
9
|
-
menus: MenuRectType[];
|
|
10
|
-
getRectImage: (rect: number[]) => string | null;
|
|
11
|
-
}
|
|
12
|
-
declare function DrawRect({ rect, canRenderMenu, containerDom, onMenuClick, menus, getRectImage }: IDrawRectProps): JSX.Element;
|
|
13
|
-
export default DrawRect;
|