@cloud-app-dev/vidc 4.0.15 → 4.0.19
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 +54 -70
- package/.editorconfig +13 -13
- package/.eslintignore +6 -6
- package/.eslintrc.js +3 -3
- package/.fatherrc.ts +14 -15
- package/.hintrc +8 -8
- package/.husky/commit-msg +5 -5
- package/.husky/pre-commit +4 -4
- package/.prettierignore +8 -8
- package/.prettierrc.js +16 -16
- package/.stylelintrc.js +113 -113
- package/README.md +19 -19
- package/{icon-fix.js → icon-fix.mjs} +31 -31
- package/package.json +97 -96
- package/release-build.sh +48 -47
- package/scripts/entry.js +20 -20
- package/theme-config.ts +125 -125
- package/tsconfig.json +16 -16
- package/typings/global.d.ts +4 -4
- 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
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
-
/* eslint-disable react/button-has-type */
|
|
8
|
-
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
9
|
-
import React, { useRef } from 'react';
|
|
10
|
-
import ListWithSizeAnimate from "./index";
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
function random(low, high) {
|
|
14
|
-
return Math.floor(Math.random() * high) + low;
|
|
15
|
-
}
|
|
16
|
-
var IMAGES = function IMAGES() {
|
|
17
|
-
return Array.from({
|
|
18
|
-
length: 20
|
|
19
|
-
}, function (_, index) {
|
|
20
|
-
var width = 300;
|
|
21
|
-
var height = random(200, 300);
|
|
22
|
-
return {
|
|
23
|
-
url: "https://picsum.photos/id/".concat(index + 1, "/").concat(width, "/").concat(height, ".jpg"),
|
|
24
|
-
width: width,
|
|
25
|
-
height: height
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
function loadPage(d) {
|
|
30
|
-
console.log(d);
|
|
31
|
-
if (!d) {
|
|
32
|
-
// eslint-disable-next-line no-param-reassign
|
|
33
|
-
d = {};
|
|
34
|
-
}
|
|
35
|
-
var resultData = IMAGES();
|
|
36
|
-
d.page ? d.page++ : d.page = 1;
|
|
37
|
-
d.list ? d.list = [].concat(_toConsumableArray(d.list), _toConsumableArray(resultData)) : d.list = resultData;
|
|
38
|
-
return new Promise(function (resolve) {
|
|
39
|
-
console.log(d.page);
|
|
40
|
-
setTimeout(function () {
|
|
41
|
-
return resolve(d);
|
|
42
|
-
}, 5000);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
export default function App() {
|
|
46
|
-
var ref = useRef(null);
|
|
47
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
48
|
-
style: {
|
|
49
|
-
width: '100%',
|
|
50
|
-
height: 800,
|
|
51
|
-
position: 'relative'
|
|
52
|
-
},
|
|
53
|
-
children: [/*#__PURE__*/_jsx(ListWithSizeAnimate, {
|
|
54
|
-
ref: ref,
|
|
55
|
-
header: /*#__PURE__*/_jsx("div", {
|
|
56
|
-
children: /*#__PURE__*/_jsxs("ul", {
|
|
57
|
-
children: [/*#__PURE__*/_jsx("li", {
|
|
58
|
-
children: "\u6761\u4EF61"
|
|
59
|
-
}), /*#__PURE__*/_jsx("li", {
|
|
60
|
-
children: "\u6761\u4EF62"
|
|
61
|
-
}), /*#__PURE__*/_jsx("li", {
|
|
62
|
-
children: "\u6761\u4EF63"
|
|
63
|
-
}), /*#__PURE__*/_jsx("li", {
|
|
64
|
-
children: "\u6761\u4EF63"
|
|
65
|
-
}), /*#__PURE__*/_jsx("li", {
|
|
66
|
-
children: "\u6761\u4EF63"
|
|
67
|
-
}), /*#__PURE__*/_jsx("li", {
|
|
68
|
-
children: "\u6761\u4EF63"
|
|
69
|
-
}), /*#__PURE__*/_jsx("li", {
|
|
70
|
-
children: "\u6761\u4EF63"
|
|
71
|
-
})]
|
|
72
|
-
})
|
|
73
|
-
}),
|
|
74
|
-
itemKey: "url",
|
|
75
|
-
itemHeight: 300,
|
|
76
|
-
itemWidth: 250,
|
|
77
|
-
renderItem: function renderItem(image) {
|
|
78
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
79
|
-
style: {
|
|
80
|
-
border: '1px solid gray',
|
|
81
|
-
height: '100%',
|
|
82
|
-
display: 'flex',
|
|
83
|
-
flexDirection: 'column'
|
|
84
|
-
},
|
|
85
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
86
|
-
style: {
|
|
87
|
-
flex: 1,
|
|
88
|
-
overflow: 'hidden'
|
|
89
|
-
},
|
|
90
|
-
children: /*#__PURE__*/_jsx("img", {
|
|
91
|
-
src: image.url,
|
|
92
|
-
alt: "",
|
|
93
|
-
style: {
|
|
94
|
-
objectFit: 'cover',
|
|
95
|
-
display: 'block',
|
|
96
|
-
width: '100%',
|
|
97
|
-
height: '100%'
|
|
98
|
-
}
|
|
99
|
-
})
|
|
100
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
101
|
-
children: "\u6807\u9898"
|
|
102
|
-
}), /*#__PURE__*/_jsx("p", {
|
|
103
|
-
children: "\u63CF\u8FF0"
|
|
104
|
-
})]
|
|
105
|
-
});
|
|
106
|
-
},
|
|
107
|
-
loadPage: loadPage,
|
|
108
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
109
|
-
style: {
|
|
110
|
-
height: 100,
|
|
111
|
-
backgroundColor: 'green'
|
|
112
|
-
},
|
|
113
|
-
children: "\u68C0\u7D22\u6761\u4EF6"
|
|
114
|
-
})
|
|
115
|
-
}), /*#__PURE__*/_jsx("button", {
|
|
116
|
-
style: {
|
|
117
|
-
position: 'absolute',
|
|
118
|
-
bottom: 30,
|
|
119
|
-
right: 30
|
|
120
|
-
},
|
|
121
|
-
onClick: function onClick() {
|
|
122
|
-
var _ref$current;
|
|
123
|
-
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.backTop();
|
|
124
|
-
},
|
|
125
|
-
children: "\u8FD4\u56DE\u9876\u90E8"
|
|
126
|
-
})]
|
|
127
|
-
});
|
|
128
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IDynamicGridListProps } from '../DynamicGridList';
|
|
3
|
-
import './index.less';
|
|
4
|
-
interface IListWithSizeAnimateProps<T> extends IDynamicGridListProps<T> {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
header?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export interface IListWithSizeAnimateRef {
|
|
9
|
-
open: () => void;
|
|
10
|
-
close: () => void;
|
|
11
|
-
backTop: () => void;
|
|
12
|
-
}
|
|
13
|
-
declare const ListWithSizeAnimate: React.ForwardRefExoticComponent<IListWithSizeAnimateProps<unknown> & React.RefAttributes<IListWithSizeAnimateRef>>;
|
|
14
|
-
export default ListWithSizeAnimate;
|
|
@@ -1,97 +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
|
-
import _useEventListener from "ahooks/es/useEventListener";
|
|
3
|
-
var _excluded = ["header", "children"];
|
|
4
|
-
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; }
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
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; }
|
|
7
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
-
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); }
|
|
9
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
-
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."); }
|
|
11
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
-
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; } }
|
|
14
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
|
-
import React, { useImperativeHandle, useMemo, useRef } from 'react';
|
|
18
|
-
import DynamicGridList from "../DynamicGridList";
|
|
19
|
-
import useSimpleState from "../useSimpleState";
|
|
20
|
-
import "./index.less";
|
|
21
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
-
var ListWithSizeAnimate = /*#__PURE__*/React.forwardRef(function ListWithSizeAnimate(_ref, forwardRef) {
|
|
24
|
-
var _ref$current2;
|
|
25
|
-
var header = _ref.header,
|
|
26
|
-
children = _ref.children,
|
|
27
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
var _useSimpleState = useSimpleState({
|
|
29
|
-
open: true
|
|
30
|
-
}),
|
|
31
|
-
_useSimpleState2 = _slicedToArray(_useSimpleState, 2),
|
|
32
|
-
state = _useSimpleState2[0],
|
|
33
|
-
updateState = _useSimpleState2[1];
|
|
34
|
-
var ref = useRef(null);
|
|
35
|
-
var headerHeight = useMemo(function () {
|
|
36
|
-
return state.open ? 1000 : 0;
|
|
37
|
-
}, [state.open]);
|
|
38
|
-
_useEventListener('scroll', function () {
|
|
39
|
-
var _ref$current;
|
|
40
|
-
var ele = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.querySelector('.cloudapp-dynamic-grid-list');
|
|
41
|
-
if ((ele === null || ele === void 0 ? void 0 : ele.scrollTop) === 0) {
|
|
42
|
-
updateState({
|
|
43
|
-
open: true
|
|
44
|
-
});
|
|
45
|
-
} else {
|
|
46
|
-
state.open && updateState({
|
|
47
|
-
open: false
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}, {
|
|
51
|
-
target: (_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.querySelector('.cloudapp-dynamic-grid-list')
|
|
52
|
-
});
|
|
53
|
-
useImperativeHandle(forwardRef, function () {
|
|
54
|
-
return {
|
|
55
|
-
open: function open() {
|
|
56
|
-
return updateState({
|
|
57
|
-
open: true
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
close: function close() {
|
|
61
|
-
return updateState({
|
|
62
|
-
open: false
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
backTop: function backTop() {
|
|
66
|
-
var _ref$current3, _ref$current3$querySe;
|
|
67
|
-
return (_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : (_ref$current3$querySe = _ref$current3.querySelector('.cloudapp-dynamic-grid-list')) === null || _ref$current3$querySe === void 0 ? void 0 : _ref$current3$querySe.scrollTo({
|
|
68
|
-
top: 0
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
},
|
|
73
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
|
-
[]);
|
|
75
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
76
|
-
className: "list-with-size-animate-layout",
|
|
77
|
-
ref: ref,
|
|
78
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
79
|
-
className: "list-animate-header",
|
|
80
|
-
style: {
|
|
81
|
-
maxHeight: headerHeight,
|
|
82
|
-
overflow: !state.open ? 'hidden' : undefined
|
|
83
|
-
},
|
|
84
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
85
|
-
className: "list-animate-header-content",
|
|
86
|
-
children: header
|
|
87
|
-
})
|
|
88
|
-
}), /*#__PURE__*/_jsxs("div", {
|
|
89
|
-
className: "list-animate-content",
|
|
90
|
-
children: [/*#__PURE__*/_jsx("div", {
|
|
91
|
-
className: "list-animate-content-ext",
|
|
92
|
-
children: children
|
|
93
|
-
}), /*#__PURE__*/_jsx(DynamicGridList, _objectSpread({}, props))]
|
|
94
|
-
})]
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
export default ListWithSizeAnimate;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.list-with-size-animate-layout {
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
|
|
8
|
-
.list-animate-header {
|
|
9
|
-
transition: max-height .2s;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.list-animate-content {
|
|
13
|
-
flex: 1;
|
|
14
|
-
display: flex;
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
transition: height .2s;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
|
|
19
|
-
.cloudapp-dynamic-grid-list {
|
|
20
|
-
flex: 1;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface IOptionsLoader {
|
|
3
|
-
scripts?: string[];
|
|
4
|
-
styles?: string[];
|
|
5
|
-
}
|
|
6
|
-
export interface ILoaderProps {
|
|
7
|
-
/**
|
|
8
|
-
* @description 脚本加载数据源
|
|
9
|
-
* @default []
|
|
10
|
-
* @type {scripts?:string[],styles?:string[]}
|
|
11
|
-
*/
|
|
12
|
-
options: IOptionsLoader[];
|
|
13
|
-
/**
|
|
14
|
-
* @description 加载后初始化组件
|
|
15
|
-
* @default null
|
|
16
|
-
*/
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* @description 加载后初始化组件
|
|
20
|
-
* @default null
|
|
21
|
-
*/
|
|
22
|
-
Spin?: React.ReactNode | null;
|
|
23
|
-
}
|
|
24
|
-
export interface ILoaderProps {
|
|
25
|
-
/**
|
|
26
|
-
* @description 脚本加载数据源
|
|
27
|
-
* @default []
|
|
28
|
-
*/
|
|
29
|
-
options: IOptionsLoader[];
|
|
30
|
-
/**
|
|
31
|
-
* @description 加载后初始化组件
|
|
32
|
-
* @default null
|
|
33
|
-
*/
|
|
34
|
-
children?: React.ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* @description 加载后初始化组件
|
|
37
|
-
* @default null
|
|
38
|
-
*/
|
|
39
|
-
Spin?: React.ReactNode | null;
|
|
40
|
-
/**
|
|
41
|
-
* @description 加载完成触发事件
|
|
42
|
-
* @default -
|
|
43
|
-
*/
|
|
44
|
-
onLoadEnd?: () => Promise<null>;
|
|
45
|
-
}
|
|
46
|
-
declare function LoaderScripts({ options, children, Spin, onLoadEnd }: ILoaderProps): JSX.Element;
|
|
47
|
-
export default LoaderScripts;
|
package/es/LoaderScript/index.js
DELETED
|
@@ -1,38 +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, { useEffect, useState } from 'react';
|
|
8
|
-
import { createAsyncIterable, runAsyncIterable } from "./utils";
|
|
9
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
function LoaderScripts(_ref) {
|
|
12
|
-
var _ref$options = _ref.options,
|
|
13
|
-
options = _ref$options === void 0 ? [] : _ref$options,
|
|
14
|
-
children = _ref.children,
|
|
15
|
-
_ref$Spin = _ref.Spin,
|
|
16
|
-
Spin = _ref$Spin === void 0 ? null : _ref$Spin,
|
|
17
|
-
onLoadEnd = _ref.onLoadEnd;
|
|
18
|
-
var _useState = useState(false),
|
|
19
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
-
initStatus = _useState2[0],
|
|
21
|
-
setInitStatus = _useState2[1];
|
|
22
|
-
useEffect(function () {
|
|
23
|
-
if (options.length === 0) {
|
|
24
|
-
return setInitStatus(true);
|
|
25
|
-
}
|
|
26
|
-
runAsyncIterable(createAsyncIterable(options), function (index) {
|
|
27
|
-
return console.debug('LoaderScript -> Iterable加载完成!', options[index]);
|
|
28
|
-
}, function () {
|
|
29
|
-
return onLoadEnd ? onLoadEnd().then(function () {
|
|
30
|
-
return setInitStatus(true);
|
|
31
|
-
}) : setInitStatus(true);
|
|
32
|
-
});
|
|
33
|
-
}, [onLoadEnd, options]);
|
|
34
|
-
return /*#__PURE__*/_jsx(_Fragment, {
|
|
35
|
-
children: !initStatus ? Spin : children
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
export default LoaderScripts;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IOptionsLoader } from '.';
|
|
2
|
-
export declare const loadScript: (url: string) => Promise<unknown>;
|
|
3
|
-
export declare const loaderCss: (href: string) => Promise<unknown>;
|
|
4
|
-
export declare function createAsyncIterable(options: IOptionsLoader[]): {
|
|
5
|
-
[Symbol.asyncIterator](): {
|
|
6
|
-
i: number;
|
|
7
|
-
next(): Promise<{
|
|
8
|
-
value: number;
|
|
9
|
-
done: boolean;
|
|
10
|
-
}>;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export declare function runAsyncIterable(Iterables: any, runtime?: (conf: any) => void, callback?: () => void): void;
|
package/es/LoaderScript/utils.js
DELETED
|
@@ -1,179 +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 _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; }
|
|
3
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
|
-
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); }
|
|
5
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
6
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
7
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
-
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); }
|
|
9
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
11
|
-
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; }
|
|
12
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14
|
-
function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
|
|
15
|
-
function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(value) { var ret = this.s.return; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, throw: function _throw(value) { var thr = this.s.return; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
|
|
16
|
-
import nextTick from "../nextTick";
|
|
17
|
-
import { likeGo } from "../utils";
|
|
18
|
-
var global = window;
|
|
19
|
-
if (!global._LOADER_SCRIPT_URL) {
|
|
20
|
-
global._LOADER_SCRIPT_URL = {};
|
|
21
|
-
}
|
|
22
|
-
export var loadScript = function loadScript(url) {
|
|
23
|
-
return new Promise(function (resolve, reject) {
|
|
24
|
-
if (global._LOADER_SCRIPT_URL[url]) {
|
|
25
|
-
resolve(null);
|
|
26
|
-
}
|
|
27
|
-
var script = document.createElement('script');
|
|
28
|
-
script.crossOrigin = 'anonymous';
|
|
29
|
-
script.type = 'text/javascript';
|
|
30
|
-
script.onload = function () {
|
|
31
|
-
global._LOADER_SCRIPT_URL[url] = true;
|
|
32
|
-
resolve(null);
|
|
33
|
-
};
|
|
34
|
-
script.onerror = function (err) {
|
|
35
|
-
reject(err);
|
|
36
|
-
};
|
|
37
|
-
script.src = url;
|
|
38
|
-
document.head.appendChild(script);
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
export var loaderCss = function loaderCss(href) {
|
|
42
|
-
return new Promise(function (resolve, reject) {
|
|
43
|
-
if (global._LOADER_SCRIPT_URL[href]) {
|
|
44
|
-
resolve(null);
|
|
45
|
-
}
|
|
46
|
-
var link = document.createElement('link');
|
|
47
|
-
link.rel = 'stylesheet';
|
|
48
|
-
link.href = href;
|
|
49
|
-
link.onload = function () {
|
|
50
|
-
global._LOADER_SCRIPT_URL[href] = true;
|
|
51
|
-
resolve(null);
|
|
52
|
-
};
|
|
53
|
-
link.onerror = function (err) {
|
|
54
|
-
reject(err);
|
|
55
|
-
};
|
|
56
|
-
document.head.appendChild(link);
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
export function createAsyncIterable(options) {
|
|
60
|
-
return _defineProperty({}, Symbol.asyncIterator, function () {
|
|
61
|
-
return {
|
|
62
|
-
i: 0,
|
|
63
|
-
next: function next() {
|
|
64
|
-
var _this = this;
|
|
65
|
-
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
66
|
-
var param, arr;
|
|
67
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
68
|
-
while (1) switch (_context.prev = _context.next) {
|
|
69
|
-
case 0:
|
|
70
|
-
if (!(_this.i < options.length)) {
|
|
71
|
-
_context.next = 12;
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
param = options[_this.i];
|
|
75
|
-
arr = [];
|
|
76
|
-
if (param.scripts && param.scripts.length > 0) {
|
|
77
|
-
arr.push.apply(arr, _toConsumableArray(param.scripts.map(function (v) {
|
|
78
|
-
return loadScript(v);
|
|
79
|
-
})));
|
|
80
|
-
}
|
|
81
|
-
if (param.styles && param.styles.length > 0) {
|
|
82
|
-
arr.push.apply(arr, _toConsumableArray(param.styles.map(function (v) {
|
|
83
|
-
return loaderCss(v);
|
|
84
|
-
})));
|
|
85
|
-
}
|
|
86
|
-
if (!(arr.length > 0)) {
|
|
87
|
-
_context.next = 11;
|
|
88
|
-
break;
|
|
89
|
-
}
|
|
90
|
-
_context.next = 8;
|
|
91
|
-
return Promise.all(arr);
|
|
92
|
-
case 8:
|
|
93
|
-
return _context.abrupt("return", {
|
|
94
|
-
value: _this.i++,
|
|
95
|
-
done: false
|
|
96
|
-
});
|
|
97
|
-
case 11:
|
|
98
|
-
return _context.abrupt("return", Promise.resolve({
|
|
99
|
-
value: _this.i++,
|
|
100
|
-
done: false
|
|
101
|
-
}));
|
|
102
|
-
case 12:
|
|
103
|
-
return _context.abrupt("return", Promise.resolve({
|
|
104
|
-
value: _this.i,
|
|
105
|
-
done: true
|
|
106
|
-
}));
|
|
107
|
-
case 13:
|
|
108
|
-
case "end":
|
|
109
|
-
return _context.stop();
|
|
110
|
-
}
|
|
111
|
-
}, _callee);
|
|
112
|
-
}))();
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
export function runAsyncIterable(Iterables, runtime, callback) {
|
|
118
|
-
likeGo( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
119
|
-
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, x;
|
|
120
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
121
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
122
|
-
case 0:
|
|
123
|
-
_iteratorAbruptCompletion = false;
|
|
124
|
-
_didIteratorError = false;
|
|
125
|
-
_context2.prev = 2;
|
|
126
|
-
_iterator = _asyncIterator(Iterables);
|
|
127
|
-
case 4:
|
|
128
|
-
_context2.next = 6;
|
|
129
|
-
return _iterator.next();
|
|
130
|
-
case 6:
|
|
131
|
-
if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
|
|
132
|
-
_context2.next = 12;
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
x = _step.value;
|
|
136
|
-
runtime === null || runtime === void 0 ? void 0 : runtime(x);
|
|
137
|
-
case 9:
|
|
138
|
-
_iteratorAbruptCompletion = false;
|
|
139
|
-
_context2.next = 4;
|
|
140
|
-
break;
|
|
141
|
-
case 12:
|
|
142
|
-
_context2.next = 18;
|
|
143
|
-
break;
|
|
144
|
-
case 14:
|
|
145
|
-
_context2.prev = 14;
|
|
146
|
-
_context2.t0 = _context2["catch"](2);
|
|
147
|
-
_didIteratorError = true;
|
|
148
|
-
_iteratorError = _context2.t0;
|
|
149
|
-
case 18:
|
|
150
|
-
_context2.prev = 18;
|
|
151
|
-
_context2.prev = 19;
|
|
152
|
-
if (!(_iteratorAbruptCompletion && _iterator.return != null)) {
|
|
153
|
-
_context2.next = 23;
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
_context2.next = 23;
|
|
157
|
-
return _iterator.return();
|
|
158
|
-
case 23:
|
|
159
|
-
_context2.prev = 23;
|
|
160
|
-
if (!_didIteratorError) {
|
|
161
|
-
_context2.next = 26;
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
|
-
throw _iteratorError;
|
|
165
|
-
case 26:
|
|
166
|
-
return _context2.finish(23);
|
|
167
|
-
case 27:
|
|
168
|
-
return _context2.finish(18);
|
|
169
|
-
case 28:
|
|
170
|
-
nextTick(function () {
|
|
171
|
-
return callback === null || callback === void 0 ? void 0 : callback();
|
|
172
|
-
});
|
|
173
|
-
case 29:
|
|
174
|
-
case "end":
|
|
175
|
-
return _context2.stop();
|
|
176
|
-
}
|
|
177
|
-
}, _callee2, null, [[2, 14, 18, 28], [19,, 23, 27]]);
|
|
178
|
-
})));
|
|
179
|
-
}
|