@cloud-app-dev/vidc 4.0.15 → 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/package.json +35 -31
- 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/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 -114
- 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 -275
- 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 -43
- package/es/Player/util.js +0 -189
- 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 -60
- package/es/index.js +0 -60
- 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
package/es/Progress/index.js
DELETED
|
@@ -1,56 +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 { Progress } from 'antd';
|
|
8
|
-
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
9
|
-
import "./index.less";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
function ProgressComponent(_ref) {
|
|
12
|
-
var status = _ref.status;
|
|
13
|
-
var timer = useRef();
|
|
14
|
-
var currentStatus = useRef('loading');
|
|
15
|
-
var _useState = useState(0),
|
|
16
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
-
percent = _useState2[0],
|
|
18
|
-
setPersent = _useState2[1];
|
|
19
|
-
var isHide = useMemo(function () {
|
|
20
|
-
return percent === 100;
|
|
21
|
-
}, [percent]);
|
|
22
|
-
useEffect(function () {
|
|
23
|
-
if ((status === 'over' || status === 'error') && percent === 0) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (percent <= 90 && currentStatus.current === 'loading') {
|
|
27
|
-
var num = percent + 20;
|
|
28
|
-
timer.current = setTimeout(function () {
|
|
29
|
-
return setPersent(num);
|
|
30
|
-
}, 10);
|
|
31
|
-
} else {
|
|
32
|
-
clearTimeout(timer.current);
|
|
33
|
-
setPersent(100);
|
|
34
|
-
timer.current = setTimeout(function () {
|
|
35
|
-
return setPersent(0);
|
|
36
|
-
}, 1000);
|
|
37
|
-
}
|
|
38
|
-
}, [percent, status]);
|
|
39
|
-
useEffect(function () {
|
|
40
|
-
return function () {
|
|
41
|
-
return clearTimeout(timer.current);
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
return /*#__PURE__*/_jsx(Progress, {
|
|
45
|
-
status: status === 'error' ? 'exception' : 'active',
|
|
46
|
-
percent: percent,
|
|
47
|
-
showInfo: false,
|
|
48
|
-
strokeWidth: 2,
|
|
49
|
-
strokeColor: status !== 'error' ? 'var(--primary)' : ' var(--danger)',
|
|
50
|
-
className: "lm-c-loading-progress ".concat(isHide ? 'lm-c-loading-progress-over' : '')
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
ProgressComponent.defaultProps = {
|
|
54
|
-
status: 'loading'
|
|
55
|
-
};
|
|
56
|
-
export default ProgressComponent;
|
package/es/Progress/index.less
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.@{ant-prefix}-progress.lm-c-loading-progress {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
z-index: 99;
|
|
6
|
-
height: 2px;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
opacity: 1;
|
|
9
|
-
transition: opacity 1s linear;
|
|
10
|
-
|
|
11
|
-
&.lm-c-loading-progress-over {
|
|
12
|
-
opacity: 0;
|
|
13
|
-
}
|
|
14
|
-
.@{ant-prefix}-progress-outer {
|
|
15
|
-
display: block;
|
|
16
|
-
.@{ant-prefix}-progress-inner {
|
|
17
|
-
display: block;
|
|
18
|
-
background-color: transparent;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
package/es/ROI/demo.d.ts
DELETED
package/es/ROI/demo.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ROI from "./index";
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
var App = function App() {
|
|
5
|
-
return /*#__PURE__*/_jsx("div", {
|
|
6
|
-
style: {
|
|
7
|
-
width: "100%",
|
|
8
|
-
height: 400,
|
|
9
|
-
background: '#999'
|
|
10
|
-
},
|
|
11
|
-
children: /*#__PURE__*/_jsx(ROI, {
|
|
12
|
-
debug: true,
|
|
13
|
-
isOpen: true,
|
|
14
|
-
onChange: console.log
|
|
15
|
-
})
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
export default App;
|
package/es/ROI/index.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface IRIOProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
* 调试模式,开启回绘制具体网格
|
|
7
|
-
*/
|
|
8
|
-
debug?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* 绘制数据变化
|
|
11
|
-
*/
|
|
12
|
-
onChange?: (rio: number[][], areas: [number, number][][]) => void;
|
|
13
|
-
/**
|
|
14
|
-
* 开启/关闭 标识
|
|
15
|
-
*/
|
|
16
|
-
isOpen?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* key变化回清楚画布
|
|
19
|
-
*/
|
|
20
|
-
renderKey?: React.Key;
|
|
21
|
-
/**
|
|
22
|
-
* rio共多少行
|
|
23
|
-
* @default 18
|
|
24
|
-
*/
|
|
25
|
-
row?: number;
|
|
26
|
-
/**
|
|
27
|
-
* rio 一行有多少个位置
|
|
28
|
-
* @default 32
|
|
29
|
-
*/
|
|
30
|
-
rowItems?: number;
|
|
31
|
-
}
|
|
32
|
-
declare function RIO({ children, debug, renderKey, onChange, isOpen, row, rowItems }: IRIOProps): JSX.Element;
|
|
33
|
-
export default RIO;
|
package/es/ROI/index.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
2
|
-
import React, { useEffect, useRef } from 'react';
|
|
3
|
-
import useDrawROI from "../useDrawROI";
|
|
4
|
-
import "./index.less";
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
function RIO(_ref) {
|
|
8
|
-
var children = _ref.children,
|
|
9
|
-
debug = _ref.debug,
|
|
10
|
-
renderKey = _ref.renderKey,
|
|
11
|
-
onChange = _ref.onChange,
|
|
12
|
-
isOpen = _ref.isOpen,
|
|
13
|
-
_ref$row = _ref.row,
|
|
14
|
-
row = _ref$row === void 0 ? 18 : _ref$row,
|
|
15
|
-
_ref$rowItems = _ref.rowItems,
|
|
16
|
-
rowItems = _ref$rowItems === void 0 ? 32 : _ref$rowItems;
|
|
17
|
-
var ref = useRef(null);
|
|
18
|
-
var _useDrawROI = useDrawROI(ref, {
|
|
19
|
-
row: row,
|
|
20
|
-
rowItems: rowItems
|
|
21
|
-
}),
|
|
22
|
-
open = _useDrawROI.open,
|
|
23
|
-
close = _useDrawROI.close,
|
|
24
|
-
clear = _useDrawROI.clear,
|
|
25
|
-
rio = _useDrawROI.rio,
|
|
26
|
-
areas = _useDrawROI.areas;
|
|
27
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
|
-
useEffect(function () {
|
|
29
|
-
return isOpen ? open() : close();
|
|
30
|
-
}, [isOpen]);
|
|
31
|
-
_useUpdateEffect(function () {
|
|
32
|
-
return clear();
|
|
33
|
-
}, [renderKey]);
|
|
34
|
-
_useUpdateEffect(function () {
|
|
35
|
-
return onChange === null || onChange === void 0 ? void 0 : onChange(rio, areas);
|
|
36
|
-
}, [rio]);
|
|
37
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
38
|
-
className: "rio-layout",
|
|
39
|
-
children: [children, debug && /*#__PURE__*/_jsx("div", {
|
|
40
|
-
className: "rio-debug-box",
|
|
41
|
-
children: rio.map(function (item, index) {
|
|
42
|
-
return /*#__PURE__*/_jsx("div", {
|
|
43
|
-
children: item.map(function (n, i) {
|
|
44
|
-
return /*#__PURE__*/_jsx("span", {
|
|
45
|
-
style: {
|
|
46
|
-
backgroundColor: n === 1 ? 'rgba(0,0,0,0.5)' : 'transparent'
|
|
47
|
-
}
|
|
48
|
-
}, "item-".concat(i));
|
|
49
|
-
})
|
|
50
|
-
}, "row-".concat(index));
|
|
51
|
-
})
|
|
52
|
-
}), /*#__PURE__*/_jsx("canvas", {
|
|
53
|
-
ref: ref
|
|
54
|
-
})]
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
export default RIO;
|
package/es/ROI/index.less
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
.rio-layout {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
|
|
6
|
-
canvas {
|
|
7
|
-
position: absolute;
|
|
8
|
-
top: 0;
|
|
9
|
-
left: 0;
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100%;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.rio-debug-box {
|
|
15
|
-
position: absolute;
|
|
16
|
-
top: 0;
|
|
17
|
-
left: 0;
|
|
18
|
-
display: flex;
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
|
|
23
|
-
& > div {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex: 1;
|
|
26
|
-
|
|
27
|
-
span {
|
|
28
|
-
flex: 1;
|
|
29
|
-
border: 1px solid #eee;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
package/es/RefDrawer/Footer.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface IFooterProps {
|
|
3
|
-
onClose?: (e: React.MouseEvent) => void;
|
|
4
|
-
cancelText: string;
|
|
5
|
-
okText: string;
|
|
6
|
-
onOk?: (e: React.MouseEvent) => void;
|
|
7
|
-
}
|
|
8
|
-
declare function Footer({ onClose, cancelText, okText, onOk }: IFooterProps): JSX.Element;
|
|
9
|
-
export default Footer;
|
package/es/RefDrawer/Footer.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Button } from 'antd';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
function Footer(_ref) {
|
|
6
|
-
var onClose = _ref.onClose,
|
|
7
|
-
cancelText = _ref.cancelText,
|
|
8
|
-
okText = _ref.okText,
|
|
9
|
-
onOk = _ref.onOk;
|
|
10
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
11
|
-
style: {
|
|
12
|
-
textAlign: 'right'
|
|
13
|
-
},
|
|
14
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
15
|
-
onClick: onClose,
|
|
16
|
-
style: {
|
|
17
|
-
marginRight: 8
|
|
18
|
-
},
|
|
19
|
-
children: cancelText
|
|
20
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
21
|
-
onClick: onOk,
|
|
22
|
-
type: "primary",
|
|
23
|
-
children: okText
|
|
24
|
-
})]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
export default Footer;
|
package/es/RefDrawer/demo.d.ts
DELETED
package/es/RefDrawer/demo.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Button } from 'antd';
|
|
2
|
-
import React, { useRef } from 'react';
|
|
3
|
-
import RefDrawer from "./index";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
var App = function App() {
|
|
8
|
-
var ref = useRef(null);
|
|
9
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
10
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
11
|
-
type: "primary",
|
|
12
|
-
onClick: function onClick() {
|
|
13
|
-
var _ref$current;
|
|
14
|
-
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.open({
|
|
15
|
-
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
16
|
-
children: [/*#__PURE__*/_jsx("p", {
|
|
17
|
-
children: "Some contents..."
|
|
18
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
19
|
-
children: "Some contents..."
|
|
20
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
21
|
-
children: "Some contents..."
|
|
22
|
-
})]
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
},
|
|
26
|
-
children: "RefDrawer"
|
|
27
|
-
}), /*#__PURE__*/_jsx(RefDrawer, {
|
|
28
|
-
ref: ref
|
|
29
|
-
})]
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
export default App;
|
package/es/RefDrawer/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { DrawerProps } from 'antd';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface IUseDrawerHookState {
|
|
4
|
-
content?: React.ReactNode;
|
|
5
|
-
visible?: boolean;
|
|
6
|
-
title?: React.ReactNode;
|
|
7
|
-
onOk?: (e: React.MouseEvent) => void;
|
|
8
|
-
width?: number | string;
|
|
9
|
-
className?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IRefDrawerMethodsProps {
|
|
12
|
-
open: (options: IUseDrawerHookState) => void;
|
|
13
|
-
close: () => void;
|
|
14
|
-
}
|
|
15
|
-
export interface IDrawerProps extends DrawerProps {
|
|
16
|
-
cancelText?: string;
|
|
17
|
-
onOk?: (e: React.MouseEvent) => void;
|
|
18
|
-
/**
|
|
19
|
-
* @description 确认按钮文本
|
|
20
|
-
* @default 确定
|
|
21
|
-
* @type string
|
|
22
|
-
*/
|
|
23
|
-
okText?: string;
|
|
24
|
-
}
|
|
25
|
-
declare const RefDrawer: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<IRefDrawerMethodsProps>>;
|
|
26
|
-
export default RefDrawer;
|
package/es/RefDrawer/index.js
DELETED
|
@@ -1,73 +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
|
-
import { Drawer } from 'antd';
|
|
14
|
-
import React, { useContext, useImperativeHandle, useMemo, useState } from 'react';
|
|
15
|
-
import ConfigContext from "../ConfigContext";
|
|
16
|
-
import Footer from "./Footer";
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
var RefDrawer = /*#__PURE__*/React.forwardRef(function RefDrawer(_, ref) {
|
|
19
|
-
var context = useContext(ConfigContext.Context);
|
|
20
|
-
var root = useMemo(function () {
|
|
21
|
-
return (context === null || context === void 0 ? void 0 : context.root) || document.body;
|
|
22
|
-
}, [context === null || context === void 0 ? void 0 : context.root]);
|
|
23
|
-
var _useState = useState({
|
|
24
|
-
content: null,
|
|
25
|
-
visible: false,
|
|
26
|
-
title: '',
|
|
27
|
-
onOk: undefined,
|
|
28
|
-
width: undefined,
|
|
29
|
-
className: undefined
|
|
30
|
-
}),
|
|
31
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
-
state = _useState2[0],
|
|
33
|
-
setState = _useState2[1];
|
|
34
|
-
var open = function open(options) {
|
|
35
|
-
setState(function (old) {
|
|
36
|
-
return _objectSpread(_objectSpread(_objectSpread({}, old), options), {}, {
|
|
37
|
-
visible: true
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
var close = function close() {
|
|
42
|
-
setState(function (old) {
|
|
43
|
-
return _objectSpread(_objectSpread({}, old), {}, {
|
|
44
|
-
visible: false
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
useImperativeHandle(ref, function () {
|
|
49
|
-
return {
|
|
50
|
-
open: open,
|
|
51
|
-
close: close
|
|
52
|
-
};
|
|
53
|
-
}, [state]);
|
|
54
|
-
return /*#__PURE__*/_jsx(Drawer, {
|
|
55
|
-
footer: /*#__PURE__*/_jsx(Footer, {
|
|
56
|
-
onClose: close,
|
|
57
|
-
onOk: state.onOk,
|
|
58
|
-
okText: "\u786E\u5B9A",
|
|
59
|
-
cancelText: "\u53D6\u6D88"
|
|
60
|
-
}),
|
|
61
|
-
open: state.visible,
|
|
62
|
-
onClose: close,
|
|
63
|
-
destroyOnClose: true,
|
|
64
|
-
title: state.title,
|
|
65
|
-
width: state.width,
|
|
66
|
-
className: state.className,
|
|
67
|
-
getContainer: function getContainer() {
|
|
68
|
-
return root;
|
|
69
|
-
},
|
|
70
|
-
children: state.content
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
export default RefDrawer;
|
package/es/RefModal/demo.d.ts
DELETED
package/es/RefModal/demo.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Button } from 'antd';
|
|
2
|
-
import React, { useRef } from 'react';
|
|
3
|
-
import RefModal from "./index";
|
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
var App = function App() {
|
|
8
|
-
var ref = useRef(null);
|
|
9
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
10
|
-
children: [/*#__PURE__*/_jsx(Button, {
|
|
11
|
-
type: "primary",
|
|
12
|
-
onClick: function onClick() {
|
|
13
|
-
var _ref$current;
|
|
14
|
-
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.open({
|
|
15
|
-
content: /*#__PURE__*/_jsxs(_Fragment, {
|
|
16
|
-
children: [/*#__PURE__*/_jsx("p", {
|
|
17
|
-
children: "some contents..."
|
|
18
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
19
|
-
children: "some contents..."
|
|
20
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
21
|
-
children: "some contents..."
|
|
22
|
-
})]
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
},
|
|
26
|
-
children: "RefModal"
|
|
27
|
-
}), /*#__PURE__*/_jsx(RefModal, {
|
|
28
|
-
ref: ref
|
|
29
|
-
})]
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
export default App;
|
package/es/RefModal/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ModalProps } from 'antd';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export interface IUseModalHookState {
|
|
4
|
-
content?: React.ReactNode;
|
|
5
|
-
visible?: boolean;
|
|
6
|
-
title?: React.ReactNode;
|
|
7
|
-
onOk?: () => void;
|
|
8
|
-
width?: number | string;
|
|
9
|
-
className?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IRefModalMethodsProps {
|
|
12
|
-
open: (options: IUseModalHookState) => void;
|
|
13
|
-
close: () => void;
|
|
14
|
-
}
|
|
15
|
-
export declare type IModalProps = ModalProps;
|
|
16
|
-
declare const RefModal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<IRefModalMethodsProps>>;
|
|
17
|
-
export default RefModal;
|
package/es/RefModal/index.js
DELETED
|
@@ -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
|
-
import { Modal } from 'antd';
|
|
14
|
-
import React, { useContext, useImperativeHandle, useMemo, useState } from 'react';
|
|
15
|
-
import ConfigContext from "../ConfigContext";
|
|
16
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
-
var RefModal = /*#__PURE__*/React.forwardRef(function RefModal(props, ref) {
|
|
18
|
-
var context = useContext(ConfigContext.Context);
|
|
19
|
-
var root = useMemo(function () {
|
|
20
|
-
return (context === null || context === void 0 ? void 0 : context.root) || document.body;
|
|
21
|
-
}, [context === null || context === void 0 ? void 0 : context.root]);
|
|
22
|
-
var _useState = useState({
|
|
23
|
-
content: null,
|
|
24
|
-
visible: false,
|
|
25
|
-
title: '',
|
|
26
|
-
onOk: undefined,
|
|
27
|
-
width: undefined,
|
|
28
|
-
className: undefined
|
|
29
|
-
}),
|
|
30
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
-
state = _useState2[0],
|
|
32
|
-
setState = _useState2[1];
|
|
33
|
-
var open = function open(options) {
|
|
34
|
-
setState(function (old) {
|
|
35
|
-
return _objectSpread(_objectSpread(_objectSpread({}, old), options), {}, {
|
|
36
|
-
visible: true
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
var close = function close() {
|
|
41
|
-
setState(function (old) {
|
|
42
|
-
return _objectSpread(_objectSpread({}, old), {}, {
|
|
43
|
-
visible: false
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49
|
-
useImperativeHandle(ref, function () {
|
|
50
|
-
return {
|
|
51
|
-
open: open,
|
|
52
|
-
close: close
|
|
53
|
-
};
|
|
54
|
-
}, [state]);
|
|
55
|
-
return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({}, props), {}, {
|
|
56
|
-
okText: "\u786E\u5B9A",
|
|
57
|
-
cancelText: "\u53D6\u6D88",
|
|
58
|
-
open: state.visible,
|
|
59
|
-
onOk: state.onOk,
|
|
60
|
-
onCancel: close,
|
|
61
|
-
destroyOnClose: true,
|
|
62
|
-
title: state.title,
|
|
63
|
-
width: state.width,
|
|
64
|
-
className: state.className,
|
|
65
|
-
getContainer: function getContainer() {
|
|
66
|
-
return root;
|
|
67
|
-
},
|
|
68
|
-
children: state.content
|
|
69
|
-
}));
|
|
70
|
-
});
|
|
71
|
-
export default RefModal;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { ILivePlayerProps } from './interface';
|
|
3
|
-
import './index.less';
|
|
4
|
-
declare function LivePlayer({ list, children, oneWinExtTools, allWinExtTools, ...props }: ILivePlayerProps): JSX.Element;
|
|
5
|
-
declare namespace LivePlayer {
|
|
6
|
-
var defaultProps: {
|
|
7
|
-
list: never[];
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export default LivePlayer;
|