@cloud-app-dev/vidc 2.3.0 → 3.0.0
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/.umirc.ts +2 -2
- package/es/Config/interface.d.ts +2 -1
- package/es/DomMove/demo.d.ts +2 -0
- package/es/DomMove/demo.js +16 -0
- package/es/DomMove/index.d.ts +16 -0
- package/es/DomMove/index.js +145 -0
- package/es/DomMove/utils.d.ts +8 -0
- package/es/{Picture/component/MoveContent → DomMove}/utils.js +19 -0
- package/es/Drawer/index.d.ts +2 -2
- package/es/Drawer/interface.d.ts +4 -174
- package/es/ErrorBoundary/index.d.ts +18 -0
- package/es/ErrorBoundary/index.js +84 -0
- package/es/List/DynamicGridList/Demo.js +40 -27
- package/es/List/DynamicGridList/index.d.ts +20 -29
- package/es/List/DynamicGridList/index.js +40 -63
- package/es/List/DynamicList/index.css +15 -0
- package/es/List/DynamicList/index.d.ts +14 -0
- package/es/List/DynamicList/index.js +105 -0
- package/es/List/DynamicList/interface.d.ts +19 -0
- package/es/List/DynamicList/utils.d.ts +4 -0
- package/es/List/DynamicList/utils.js +6 -0
- package/es/List/GridList/Demo.js +27 -4
- package/es/List/GridList/index.css +1 -0
- package/es/List/GridList/index.d.ts +2 -2
- package/es/List/GridList/index.js +8 -12
- package/es/List/GridList/interface.d.ts +1 -1
- package/es/List/VList/index.js +2 -3
- package/es/List/index.css +2 -54
- package/es/List/index.d.ts +6 -7
- package/es/List/index.js +14 -153
- package/es/List/interface.d.ts +3 -61
- package/es/LoaderApp/index.d.ts +1 -1
- package/es/LoaderApp/index.js +27 -46
- package/es/LoaderApp/interface.d.ts +3 -0
- package/es/LoaderApp/loader.d.ts +6 -7
- package/es/LoaderApp/loader.js +20 -30
- package/es/LoaderApp/sandbox.back.d.ts +18 -0
- package/es/LoaderApp/sandbox.back.js +356 -0
- package/es/LoaderApp/sandbox.d.ts +12 -0
- package/es/LoaderApp/sandbox.js +110 -0
- package/es/LoaderApp/utils.d.ts +5 -1
- package/es/LoaderApp/utils.js +98 -2
- package/es/Map/AMap.d.ts +1572 -0
- package/es/Map/BasicMap/AMapInstance.d.ts +15 -0
- package/es/Map/BasicMap/AMapInstance.js +66 -0
- package/es/Map/BasicMap/LeafletInstance.d.ts +15 -0
- package/es/Map/BasicMap/LeafletInstance.js +98 -0
- package/es/Map/BasicMap/index.css +24 -0
- package/es/Map/BasicMap/index.d.ts +9 -0
- package/es/Map/BasicMap/index.js +108 -0
- package/es/Map/ClusterLayer/hook.d.ts +5 -0
- package/es/Map/ClusterLayer/hook.js +144 -0
- package/es/Map/ClusterLayer/index.css +26 -0
- package/es/Map/ClusterLayer/index.d.ts +5 -0
- package/es/Map/ClusterLayer/index.js +31 -0
- package/es/Map/ClusterLayer/props.d.ts +8 -0
- package/es/Map/Config/index.d.ts +7 -0
- package/es/{InitialConfig → Map/Config}/index.js +35 -36
- package/es/Map/Config/utils.d.ts +2 -0
- package/es/{List/DynamicDeviceList → Map/Config}/utils.js +48 -45
- package/es/Map/Context/index.d.ts +11 -0
- package/es/Map/Context/index.js +66 -0
- package/es/Map/FindPio/index.css +7 -0
- package/es/Map/FindPio/index.d.ts +4 -0
- package/es/Map/FindPio/index.js +16 -0
- package/es/{WorkerFlow/Demo.d.ts → Map/InfoWindow/demo.d.ts} +0 -0
- package/es/{List/DynamicDeviceList/Demo.js → Map/InfoWindow/demo.js} +27 -25
- package/es/Map/InfoWindow/index.d.ts +8 -0
- package/es/Map/InfoWindow/index.js +74 -0
- package/es/Map/LevelCenter/DragMarker/index.d.ts +12 -0
- package/es/Map/LevelCenter/DragMarker/index.js +48 -0
- package/es/{List/DeviceList → Map/LevelCenter}/index.css +0 -0
- package/es/Map/LevelCenter/index.d.ts +13 -0
- package/es/Map/LevelCenter/index.js +42 -0
- package/es/Map/LoaderMap/index.d.ts +12 -0
- package/es/Map/LoaderMap/index.js +58 -0
- package/es/Map/ResetTools/index.css +32 -0
- package/es/Map/ResetTools/index.d.ts +9 -0
- package/es/Map/ResetTools/index.js +61 -0
- package/es/Map/SinglePoint/Marker/index.d.ts +7 -0
- package/es/Map/SinglePoint/Marker/index.js +29 -0
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Hover.svg +15 -0
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Normal.svg +15 -0
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Hover.svg +15 -0
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Normal.svg +15 -0
- package/es/Map/SinglePoint/index.css +29 -0
- package/es/Map/SinglePoint/index.d.ts +7 -0
- package/es/Map/SinglePoint/index.js +32 -0
- package/es/Map/hook/useMapType.d.ts +4 -0
- package/es/Map/hook/useMapType.js +13 -0
- package/es/Map/icon.d.ts +2 -0
- package/es/Map/icon.js +10 -0
- package/es/Map/index.d.ts +23 -0
- package/es/Map/index.js +25 -0
- package/es/Map/interface.d.ts +55 -0
- package/es/Map/points.json +61247 -0
- package/es/{Picture/component/MoveContent → Map/useMarker}/index.css +0 -0
- package/es/Map/useMarker/index.d.ts +11 -0
- package/es/{WorkerFlow/Form/FormAuth.js → Map/useMarker/index.js} +57 -80
- package/es/Map/withMap/index.d.ts +2 -0
- package/es/Map/withMap/index.js +12 -0
- package/es/Picture/index.d.ts +1 -1
- package/es/Picture/index.js +2 -2
- package/es/Player/api/index.d.ts +1 -0
- package/es/Player/api/index.js +7 -1
- package/es/Player/demo.js +13 -21
- package/es/Player/event/index.js +5 -1
- package/es/Player/frontend_player.d.ts +1 -1
- package/es/Player/frontend_player.js +20 -13
- package/es/Player/frontend_timeline.d.ts +1 -1
- package/es/Player/live_heart.js +45 -12
- package/es/Player/message.js +23 -12
- package/es/Player/player.d.ts +31 -7
- package/es/Player/segment_player.d.ts +1 -1
- package/es/Player/segment_player.js +30 -18
- package/es/Player/segment_timeline.js +6 -6
- package/es/Player/single_player.js +50 -9
- package/es/Player/timeline.js +8 -6
- package/es/Player/util.d.ts +2 -1
- package/es/Player/util.js +4 -1
- package/es/PlayerExt/index.css +2 -2
- package/es/PlayerExt/index.d.ts +3 -1
- package/es/PlayerExt/index.js +19 -5
- package/es/ScreenPlayer/Live.d.ts +5 -0
- package/es/ScreenPlayer/Live.js +109 -0
- package/es/ScreenPlayer/LiveTools.d.ts +15 -0
- package/es/ScreenPlayer/LiveTools.js +95 -0
- package/es/ScreenPlayer/PlayerWithExt.d.ts +22 -0
- package/es/ScreenPlayer/PlayerWithExt.js +169 -0
- package/es/ScreenPlayer/Record.d.ts +5 -0
- package/es/{WorkerFlow/index.js → ScreenPlayer/Record.js} +290 -273
- package/es/ScreenPlayer/RecordTools.d.ts +17 -0
- package/es/ScreenPlayer/RecordTools.js +102 -0
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +10 -0
- package/es/ScreenPlayer/SegmentTimeLine.js +40 -0
- package/es/ScreenPlayer/TimeSlider.d.ts +127 -0
- package/es/ScreenPlayer/TimeSlider.js +528 -0
- package/es/ScreenPlayer/demo.d.ts +2 -0
- package/es/ScreenPlayer/demo.js +25 -0
- package/es/ScreenPlayer/demo2.d.ts +2 -0
- package/es/ScreenPlayer/demo2.js +153 -0
- package/es/ScreenPlayer/index.css +50 -0
- package/es/ScreenPlayer/index.d.ts +6 -0
- package/es/ScreenPlayer/index.js +7 -0
- package/es/ScreenPlayer/interface.d.ts +81 -0
- package/es/ScreenPlayer/useRecordList.d.ts +3 -0
- package/es/{WorkerFlow/Form/UserAndGroupSelect.js → ScreenPlayer/useRecordList.js} +173 -176
- package/es/ScreenPlayer/useVideoFit.d.ts +5 -0
- package/es/ScreenPlayer/useVideoFit.js +46 -0
- package/es/ScreenPlayer/utils.d.ts +25 -0
- package/es/ScreenPlayer/utils.js +84 -0
- package/es/Tree/demo.js +9 -12
- package/es/Tree/index.css +55 -29
- package/es/Tree/index.d.ts +20 -19
- package/es/Tree/index.js +70 -185
- package/es/index.d.ts +7 -9
- package/es/index.js +7 -9
- package/es/useInfiniteScroll/index.d.ts +16 -0
- package/es/{useHttp → useInfiniteScroll}/index.js +79 -43
- package/es/useVirtualList/index.d.ts +13 -0
- package/es/useVirtualList/index.js +175 -0
- package/es/withErrorBoundary/index.d.ts +8 -0
- package/es/withErrorBoundary/index.js +43 -0
- package/package.json +18 -21
- package/test.js +48 -0
- package/es/DeviceIcon/icon.d.ts +0 -9
- package/es/DeviceIcon/icon.js +0 -138
- package/es/DeviceIcon/index.css +0 -8
- package/es/DeviceIcon/index.d.ts +0 -14
- package/es/DeviceIcon/index.js +0 -37
- package/es/DeviceSelect/TreeType.d.ts +0 -7
- package/es/DeviceSelect/TreeType.js +0 -36
- package/es/DeviceSelect/demo.d.ts +0 -3
- package/es/DeviceSelect/demo.js +0 -22
- package/es/DeviceSelect/index.css +0 -11
- package/es/DeviceSelect/index.d.ts +0 -13
- package/es/DeviceSelect/index.js +0 -191
- package/es/Dict/cache.d.ts +0 -3
- package/es/Dict/cache.js +0 -21
- package/es/Dict/device.d.ts +0 -28
- package/es/Dict/device.js +0 -117
- package/es/Dict/hook.d.ts +0 -3
- package/es/Dict/hook.js +0 -98
- package/es/Dict/index.d.ts +0 -9
- package/es/Dict/index.js +0 -10
- package/es/Dict/interface.d.ts +0 -16
- package/es/Dict/utils.d.ts +0 -10
- package/es/Dict/utils.js +0 -44
- package/es/InitialConfig/index.d.ts +0 -8
- package/es/InitialConfig/utils.d.ts +0 -20
- package/es/InitialConfig/utils.js +0 -110
- package/es/InitialRequest/index.d.ts +0 -9
- package/es/InitialRequest/index.js +0 -97
- package/es/InitialRequest/utils.d.ts +0 -10
- package/es/InitialRequest/utils.js +0 -116
- package/es/List/CheckExt.d.ts +0 -9
- package/es/List/CheckExt.js +0 -36
- package/es/List/DeviceList/index.d.ts +0 -11
- package/es/List/DeviceList/index.js +0 -50
- package/es/List/DynamicDeviceList/Demo.d.ts +0 -3
- package/es/List/DynamicDeviceList/index.css +0 -39
- package/es/List/DynamicDeviceList/index.d.ts +0 -12
- package/es/List/DynamicDeviceList/index.js +0 -205
- package/es/List/DynamicDeviceList/interface.d.ts +0 -37
- package/es/List/DynamicDeviceList/utils.d.ts +0 -16
- package/es/List/ListExt/index.css +0 -3
- package/es/List/ListExt/index.d.ts +0 -19
- package/es/List/ListExt/index.js +0 -44
- package/es/Picture/component/MoveContent/index.d.ts +0 -39
- package/es/Picture/component/MoveContent/index.js +0 -244
- package/es/Picture/component/MoveContent/utils.d.ts +0 -4
- package/es/Title/index.css +0 -25
- package/es/Title/index.d.ts +0 -12
- package/es/Title/index.js +0 -30
- package/es/Tree/BaseTree/index.css +0 -64
- package/es/Tree/BaseTree/index.d.ts +0 -24
- package/es/Tree/BaseTree/index.js +0 -83
- package/es/UserSelect/demo.d.ts +0 -3
- package/es/UserSelect/demo.js +0 -21
- package/es/UserSelect/index.css +0 -16
- package/es/UserSelect/index.d.ts +0 -18
- package/es/UserSelect/index.js +0 -194
- package/es/WorkerFlow/Demo.js +0 -57
- package/es/WorkerFlow/Form/Approver.d.ts +0 -10
- package/es/WorkerFlow/Form/Approver.js +0 -33
- package/es/WorkerFlow/Form/Condition.d.ts +0 -11
- package/es/WorkerFlow/Form/Condition.js +0 -235
- package/es/WorkerFlow/Form/EmptyUserSet.d.ts +0 -8
- package/es/WorkerFlow/Form/EmptyUserSet.js +0 -137
- package/es/WorkerFlow/Form/FormAuth.d.ts +0 -8
- package/es/WorkerFlow/Form/GroupList.d.ts +0 -12
- package/es/WorkerFlow/Form/GroupList.js +0 -44
- package/es/WorkerFlow/Form/GroupSelect.d.ts +0 -8
- package/es/WorkerFlow/Form/GroupSelect.js +0 -167
- package/es/WorkerFlow/Form/GroupSelectModalContent.d.ts +0 -6
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +0 -177
- package/es/WorkerFlow/Form/Handle.d.ts +0 -10
- package/es/WorkerFlow/Form/Handle.js +0 -33
- package/es/WorkerFlow/Form/LevelGroupSelect.d.ts +0 -12
- package/es/WorkerFlow/Form/LevelGroupSelect.js +0 -208
- package/es/WorkerFlow/Form/Notifier.d.ts +0 -8
- package/es/WorkerFlow/Form/Notifier.js +0 -16
- package/es/WorkerFlow/Form/UserAndGroupSelect.d.ts +0 -8
- package/es/WorkerFlow/Form/UserSelect.d.ts +0 -8
- package/es/WorkerFlow/Form/UserSelect.js +0 -150
- package/es/WorkerFlow/Form/UserSelectModalContent.d.ts +0 -6
- package/es/WorkerFlow/Form/UserSelectModalContent.js +0 -166
- package/es/WorkerFlow/Form/UserSet.d.ts +0 -14
- package/es/WorkerFlow/Form/UserSet.js +0 -308
- package/es/WorkerFlow/Form/UsersHandleType.d.ts +0 -7
- package/es/WorkerFlow/Form/UsersHandleType.js +0 -32
- package/es/WorkerFlow/Form/utils.d.ts +0 -3
- package/es/WorkerFlow/Form/utils.js +0 -47
- package/es/WorkerFlow/Nodes/Add.d.ts +0 -7
- package/es/WorkerFlow/Nodes/Add.js +0 -98
- package/es/WorkerFlow/Nodes/AddOption.d.ts +0 -10
- package/es/WorkerFlow/Nodes/AddOption.js +0 -23
- package/es/WorkerFlow/Nodes/AddOptionList.d.ts +0 -8
- package/es/WorkerFlow/Nodes/AddOptionList.js +0 -46
- package/es/WorkerFlow/Nodes/Approver.d.ts +0 -11
- package/es/WorkerFlow/Nodes/Approver.js +0 -53
- package/es/WorkerFlow/Nodes/Condition.d.ts +0 -10
- package/es/WorkerFlow/Nodes/Condition.js +0 -140
- package/es/WorkerFlow/Nodes/Constants.d.ts +0 -35
- package/es/WorkerFlow/Nodes/Constants.js +0 -150
- package/es/WorkerFlow/Nodes/End.d.ts +0 -7
- package/es/WorkerFlow/Nodes/End.js +0 -16
- package/es/WorkerFlow/Nodes/Handle.d.ts +0 -11
- package/es/WorkerFlow/Nodes/Handle.js +0 -52
- package/es/WorkerFlow/Nodes/Node.d.ts +0 -8
- package/es/WorkerFlow/Nodes/Node.js +0 -26
- package/es/WorkerFlow/Nodes/Notifier.d.ts +0 -11
- package/es/WorkerFlow/Nodes/Notifier.js +0 -52
- package/es/WorkerFlow/Nodes/Render.d.ts +0 -8
- package/es/WorkerFlow/Nodes/Render.js +0 -16
- package/es/WorkerFlow/Nodes/Start.d.ts +0 -12
- package/es/WorkerFlow/Nodes/Start.js +0 -26
- package/es/WorkerFlow/Nodes/TitleElement.d.ts +0 -10
- package/es/WorkerFlow/Nodes/TitleElement.js +0 -127
- package/es/WorkerFlow/Nodes/Wrap.d.ts +0 -13
- package/es/WorkerFlow/Nodes/Wrap.js +0 -35
- package/es/WorkerFlow/OperatorContext.d.ts +0 -4
- package/es/WorkerFlow/OperatorContext.js +0 -3
- package/es/WorkerFlow/Tools.d.ts +0 -8
- package/es/WorkerFlow/Tools.js +0 -78
- package/es/WorkerFlow/XML/CanvasTag.d.ts +0 -3
- package/es/WorkerFlow/XML/CanvasTag.js +0 -142
- package/es/WorkerFlow/XML/EndEvent.d.ts +0 -1
- package/es/WorkerFlow/XML/EndEvent.js +0 -14
- package/es/WorkerFlow/XML/ExclusiveGateway.d.ts +0 -9
- package/es/WorkerFlow/XML/ExclusiveGateway.js +0 -101
- package/es/WorkerFlow/XML/Root.d.ts +0 -1
- package/es/WorkerFlow/XML/Root.js +0 -5
- package/es/WorkerFlow/XML/StartEvent.d.ts +0 -5
- package/es/WorkerFlow/XML/StartEvent.js +0 -28
- package/es/WorkerFlow/XML/UserTask.d.ts +0 -5
- package/es/WorkerFlow/XML/UserTask.js +0 -93
- package/es/WorkerFlow/XML/index.d.ts +0 -4
- package/es/WorkerFlow/XML/index.js +0 -100
- package/es/WorkerFlow/XML/utils.d.ts +0 -6
- package/es/WorkerFlow/XML/utils.js +0 -97
- package/es/WorkerFlow/data.json +0 -83
- package/es/WorkerFlow/index.css +0 -779
- package/es/WorkerFlow/index.d.ts +0 -13
- package/es/WorkerFlow/interface.d.ts +0 -93
- package/es/WorkerFlow/template.d.ts +0 -2
- package/es/WorkerFlow/template.js +0 -17
- package/es/WorkerFlow/utils.d.ts +0 -14
- package/es/WorkerFlow/utils.js +0 -212
- package/es/useHttp/index.d.ts +0 -8
|
@@ -1,16 +1,18 @@
|
|
|
1
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
2
|
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
import "antd/lib/button/style";
|
|
6
|
-
import _Button from "antd/lib/button";
|
|
7
|
-
import "antd/lib/select/style";
|
|
8
|
-
import _Select from "antd/lib/select";
|
|
9
|
-
import "antd/lib/message/style";
|
|
10
|
-
import _message from "antd/lib/message";
|
|
3
|
+
import _useAsyncEffect from "ahooks/es/useAsyncEffect";
|
|
4
|
+
import _usePrevious from "ahooks/es/usePrevious";
|
|
11
5
|
|
|
12
6
|
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, $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 generator._invoke = function (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); } }; }(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; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return 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, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), 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 (object) { var 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; }
|
|
13
7
|
|
|
8
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
|
|
10
|
+
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."); }
|
|
11
|
+
|
|
12
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
13
|
+
|
|
14
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
15
|
+
|
|
14
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
17
|
|
|
16
18
|
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."); }
|
|
@@ -24,186 +26,181 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
24
26
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
27
|
|
|
26
28
|
import { __awaiter } from "tslib";
|
|
27
|
-
import
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
|
|
31
|
-
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
32
|
-
import { formatRenderGroup } from './utils';
|
|
33
|
-
import IconFont from '../../IconFont';
|
|
34
|
-
import Modal from '../../Modal';
|
|
35
|
-
var RefModal = Modal.RefModal;
|
|
36
|
-
|
|
37
|
-
function UserAndGroupSelect(_ref) {
|
|
29
|
+
import { differenceBy, orderBy, uniqBy } from 'lodash-es';
|
|
30
|
+
import { useMemo, useState } from 'react';
|
|
31
|
+
import { differenceWithIndexs, FILTER_KEY } from './utils';
|
|
32
|
+
export default function useRecordList(list, queryRecord) {
|
|
38
33
|
var _this = this;
|
|
39
34
|
|
|
40
|
-
var _ref$userList = _ref.userList,
|
|
41
|
-
userList = _ref$userList === void 0 ? [] : _ref$userList,
|
|
42
|
-
onChange = _ref.onChange;
|
|
43
|
-
|
|
44
|
-
var _a;
|
|
45
|
-
|
|
46
35
|
var _useState = useState({
|
|
47
|
-
|
|
48
|
-
type: ((_a = userList.find(function (v) {
|
|
49
|
-
return v.key;
|
|
50
|
-
})) === null || _a === void 0 ? void 0 : _a.key) || 'userId'
|
|
36
|
+
cidSegments: []
|
|
51
37
|
}),
|
|
52
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
53
39
|
state = _useState2[0],
|
|
54
40
|
setState = _useState2[1];
|
|
55
41
|
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}, []);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
42
|
+
var listKey = useMemo(function () {
|
|
43
|
+
return list.map(function (v) {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
|
|
46
|
+
return v ? "".concat(v.cid, "|").concat(v.date, "|").concat((_b = (_a = v.segments) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) : FILTER_KEY;
|
|
47
|
+
}).join('-');
|
|
48
|
+
}, [list]);
|
|
49
|
+
|
|
50
|
+
var prevListKey = _usePrevious(listKey);
|
|
51
|
+
|
|
52
|
+
_useAsyncEffect(function () {
|
|
53
|
+
return __awaiter(_this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
54
|
+
var diffIndexs, index, item, record, segments, type;
|
|
55
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
56
|
+
while (1) {
|
|
57
|
+
switch (_context.prev = _context.next) {
|
|
58
|
+
case 0:
|
|
59
|
+
diffIndexs = differenceWithIndexs(listKey ? listKey.split('-') : [], prevListKey ? prevListKey.split('-') : []).filter(function (v) {
|
|
60
|
+
return v.value !== FILTER_KEY;
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
if (!(diffIndexs.length === 0)) {
|
|
64
|
+
_context.next = 3;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
83
67
|
|
|
84
|
-
|
|
68
|
+
return _context.abrupt("return");
|
|
85
69
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
70
|
+
case 3:
|
|
71
|
+
index = diffIndexs[0].idx; // 一次变化理论上只有一个
|
|
72
|
+
|
|
73
|
+
item = list[index];
|
|
74
|
+
record = state.cidSegments[index];
|
|
75
|
+
|
|
76
|
+
if (!(item.cid && item.date)) {
|
|
77
|
+
_context.next = 30;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
93
80
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
if (record) {
|
|
82
|
+
_context.next = 14;
|
|
83
|
+
break;
|
|
97
84
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
85
|
+
|
|
86
|
+
// 首次直接查询
|
|
87
|
+
type = 'add';
|
|
88
|
+
_context.next = 11;
|
|
89
|
+
return queryRecord({
|
|
90
|
+
cid: item.cid,
|
|
91
|
+
date: item.date,
|
|
92
|
+
recordType: item.recordType
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
case 11:
|
|
96
|
+
segments = _context.sent;
|
|
97
|
+
_context.next = 29;
|
|
98
|
+
break;
|
|
99
|
+
|
|
100
|
+
case 14:
|
|
101
|
+
if (!(record.cid !== item.cid || record.recordType !== item.recordType)) {
|
|
102
|
+
_context.next = 21;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// cid变化,录像类型变化重新请求
|
|
107
|
+
type = 'add';
|
|
108
|
+
_context.next = 18;
|
|
109
|
+
return queryRecord({
|
|
110
|
+
cid: item.cid,
|
|
111
|
+
date: item.date,
|
|
112
|
+
recordType: item.recordType
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
case 18:
|
|
116
|
+
segments = _context.sent;
|
|
117
|
+
_context.next = 29;
|
|
118
|
+
break;
|
|
119
|
+
|
|
120
|
+
case 21:
|
|
121
|
+
if (!(record.date !== item.date)) {
|
|
122
|
+
_context.next = 28;
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// 上层日期变化更新,追加
|
|
127
|
+
type = 'modify';
|
|
128
|
+
_context.next = 25;
|
|
129
|
+
return queryRecord({
|
|
130
|
+
cid: item.cid,
|
|
131
|
+
date: item.date,
|
|
132
|
+
recordType: item.recordType
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
case 25:
|
|
136
|
+
segments = _context.sent;
|
|
137
|
+
_context.next = 29;
|
|
138
|
+
break;
|
|
139
|
+
|
|
140
|
+
case 28:
|
|
141
|
+
if (Array.isArray(item.segments) && item.segments.length > 0) {
|
|
142
|
+
// 时间轴更新
|
|
143
|
+
type = 'modify';
|
|
144
|
+
segments = item.segments;
|
|
145
|
+
} else {
|
|
146
|
+
console.debug('无变化!跳过~');
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
case 29:
|
|
150
|
+
setState(function (old) {
|
|
151
|
+
var flag = false; //标记是否更新
|
|
152
|
+
|
|
153
|
+
var cidSegments = state.cidSegments;
|
|
154
|
+
|
|
155
|
+
switch (type) {
|
|
156
|
+
case 'add':
|
|
157
|
+
flag = true;
|
|
158
|
+
var arr1 = item.segments ? [].concat(item.segments, segments) : segments;
|
|
159
|
+
arr1 = arr1.map(function (v) {
|
|
160
|
+
return Object.assign(Object.assign({}, v), {
|
|
161
|
+
id: "".concat(v.beginTime, "-").concat(v.endTime)
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
cidSegments[index] = Object.assign(Object.assign({}, item), {
|
|
165
|
+
segments: orderBy(uniqBy(arr1, 'id'), 'beginTime', 'asc')
|
|
166
|
+
});
|
|
167
|
+
break;
|
|
168
|
+
|
|
169
|
+
case 'modify':
|
|
170
|
+
flag = true;
|
|
171
|
+
cidSegments[index].date = item.date;
|
|
172
|
+
cidSegments[index].recordType = item.recordType;
|
|
173
|
+
var dif = differenceBy(cidSegments[index].segments, segments, 'beginTime');
|
|
174
|
+
|
|
175
|
+
if (dif.length === 0) {
|
|
176
|
+
flag = false;
|
|
177
|
+
} else {
|
|
178
|
+
var arr2 = [].concat(cidSegments[index].segments, segments);
|
|
179
|
+
arr2 = arr2.map(function (v) {
|
|
180
|
+
return Object.assign(Object.assign({}, v), {
|
|
181
|
+
id: "".concat(v.beginTime, "-").concat(v.endTime)
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
arr2 = uniqBy(arr2, 'id');
|
|
185
|
+
cidSegments[index].segments = orderBy(arr2, 'beginTime', 'asc');
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return Object.assign(Object.assign({}, old), {
|
|
192
|
+
cidSegments: flag ? _toConsumableArray(cidSegments) : cidSegments
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
case 30:
|
|
197
|
+
case "end":
|
|
198
|
+
return _context.stop();
|
|
199
|
+
}
|
|
201
200
|
}
|
|
202
|
-
},
|
|
201
|
+
}, _callee);
|
|
203
202
|
}));
|
|
204
|
-
}
|
|
205
|
-
ref: modalRef
|
|
206
|
-
}));
|
|
207
|
-
}
|
|
203
|
+
}, [list, listKey, prevListKey]);
|
|
208
204
|
|
|
209
|
-
|
|
205
|
+
return state.cidSegments;
|
|
206
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _useToggle3 from "ahooks/es/useToggle";
|
|
2
|
+
|
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
|
|
5
|
+
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."); }
|
|
6
|
+
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
|
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
+
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
|
|
13
|
+
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."); }
|
|
14
|
+
|
|
15
|
+
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); }
|
|
16
|
+
|
|
17
|
+
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; }
|
|
18
|
+
|
|
19
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
20
|
+
|
|
21
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
+
|
|
23
|
+
import { useEffect, useMemo } from 'react';
|
|
24
|
+
export default function useVideoFit(containerRef, deps) {
|
|
25
|
+
var _useToggle = _useToggle3('contain', 'fill'),
|
|
26
|
+
_useToggle2 = _slicedToArray(_useToggle, 2),
|
|
27
|
+
fit = _useToggle2[0],
|
|
28
|
+
toggle = _useToggle2[1].toggle;
|
|
29
|
+
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
if (!containerRef.current) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var videos = containerRef.current.querySelectorAll('video');
|
|
36
|
+
Array.from(videos).forEach(function (item) {
|
|
37
|
+
item.style.objectFit = fit;
|
|
38
|
+
});
|
|
39
|
+
}, [].concat(_toConsumableArray(deps), [fit]));
|
|
40
|
+
return useMemo(function () {
|
|
41
|
+
return {
|
|
42
|
+
fit: fit,
|
|
43
|
+
toggleFit: toggle
|
|
44
|
+
};
|
|
45
|
+
}, [fit, toggle]);
|
|
46
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ISegmentType } from 'src/Player/player';
|
|
2
|
+
export declare const ScreenType: {
|
|
3
|
+
name: number;
|
|
4
|
+
width: string;
|
|
5
|
+
height: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare function mergeFill<T, S>(len: number, mergeArr: T[], fillItem: S): (T | S)[];
|
|
8
|
+
export declare const FILTER_KEY = "00|11|00";
|
|
9
|
+
/**
|
|
10
|
+
* 找出两个数组不等的索引
|
|
11
|
+
* @param arr1
|
|
12
|
+
* @param arr2
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function differenceWithIndexs(arr1: any[], arr2: any[]): {
|
|
16
|
+
idx: number;
|
|
17
|
+
value: string;
|
|
18
|
+
}[];
|
|
19
|
+
/**
|
|
20
|
+
* unix时间戳
|
|
21
|
+
* @param start
|
|
22
|
+
* @param end
|
|
23
|
+
* @param segments
|
|
24
|
+
*/
|
|
25
|
+
export declare function completionSegments(start: number, end: number, segments: ISegmentType[]): ISegmentType[];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export var ScreenType = [{
|
|
2
|
+
name: 1,
|
|
3
|
+
width: '100%',
|
|
4
|
+
height: '100%'
|
|
5
|
+
}, {
|
|
6
|
+
name: 4,
|
|
7
|
+
width: '50%',
|
|
8
|
+
height: '50%'
|
|
9
|
+
}, {
|
|
10
|
+
name: 9,
|
|
11
|
+
width: '33.33333333%',
|
|
12
|
+
height: '33.33333333%'
|
|
13
|
+
}, {
|
|
14
|
+
name: 16,
|
|
15
|
+
width: '25%',
|
|
16
|
+
height: '25%'
|
|
17
|
+
}];
|
|
18
|
+
export function mergeFill(len, mergeArr, fillItem) {
|
|
19
|
+
return new Array(len).fill(fillItem).map(function (v, i) {
|
|
20
|
+
return mergeArr[i] ? mergeArr[i] : v;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export var FILTER_KEY = '00|11|00'; // 需要忽略的key值
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 找出两个数组不等的索引
|
|
27
|
+
* @param arr1
|
|
28
|
+
* @param arr2
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
export function differenceWithIndexs(arr1, arr2) {
|
|
33
|
+
var idxs = [];
|
|
34
|
+
arr1.forEach(function (item, index) {
|
|
35
|
+
if (item && item !== arr2[index]) {
|
|
36
|
+
idxs.push({
|
|
37
|
+
idx: index,
|
|
38
|
+
value: item
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return idxs;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* unix时间戳
|
|
46
|
+
* @param start
|
|
47
|
+
* @param end
|
|
48
|
+
* @param segments
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
export function completionSegments(start, end, segments) {
|
|
52
|
+
var arr = [];
|
|
53
|
+
|
|
54
|
+
if (segments.length > 0 && start < +segments[0].beginTime) {
|
|
55
|
+
arr.push({
|
|
56
|
+
beginTime: start,
|
|
57
|
+
endTime: +segments[0].beginTime - start
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
segments.reduce(function (prev, current, idx) {
|
|
62
|
+
if (arr.length === 0) {
|
|
63
|
+
prev.push(current);
|
|
64
|
+
} else if (segments[idx - 1].endTime !== current.beginTime) {
|
|
65
|
+
prev.push({
|
|
66
|
+
beginTime: segments[idx - 1].endTime,
|
|
67
|
+
endTime: current.beginTime
|
|
68
|
+
}, current);
|
|
69
|
+
} else {
|
|
70
|
+
prev.push(current);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return prev;
|
|
74
|
+
}, arr);
|
|
75
|
+
|
|
76
|
+
if (end > +segments[segments.length - 1].endTime) {
|
|
77
|
+
arr.push({
|
|
78
|
+
beginTime: segments[segments.length - 1].endTime,
|
|
79
|
+
endTime: end
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return arr;
|
|
84
|
+
}
|
package/es/Tree/demo.js
CHANGED
|
@@ -13,19 +13,16 @@ function App() {
|
|
|
13
13
|
display: 'flex'
|
|
14
14
|
}
|
|
15
15
|
}, /*#__PURE__*/React.createElement(BsTree, {
|
|
16
|
-
title: "\u8BBE\u5907\u4E1A\u52A1\u6811",
|
|
17
|
-
mode: "Bz"
|
|
18
|
-
}), /*#__PURE__*/React.createElement(BsTree, {
|
|
19
|
-
title: "\u81EA\u5B9A\u4E49\u5206\u7EC4",
|
|
20
|
-
mode: "Custom"
|
|
21
|
-
}), /*#__PURE__*/React.createElement(BsTree, {
|
|
22
|
-
title: "\u884C\u653F\u533A\u5212",
|
|
23
|
-
mode: "Place",
|
|
24
16
|
checkable: true,
|
|
25
|
-
checkStrictly: true
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
checkStrictly: true,
|
|
18
|
+
treeData: [{
|
|
19
|
+
id: 1,
|
|
20
|
+
name: 'aaa',
|
|
21
|
+
children: [{
|
|
22
|
+
id: 2,
|
|
23
|
+
name: 'bbb'
|
|
24
|
+
}]
|
|
25
|
+
}]
|
|
29
26
|
})));
|
|
30
27
|
}
|
|
31
28
|
|