@cloud-app-dev/vidc 4.0.1 → 4.0.2

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.
Files changed (67) hide show
  1. package/es/AppContext/index.js +20 -61
  2. package/es/AutoExit/index.js +5 -9
  3. package/es/Config/index.js +0 -5
  4. package/es/Config/utils.js +7 -27
  5. package/es/ConfigContext/index.d.ts +1 -1
  6. package/es/ConfigContext/index.js +1 -3
  7. package/es/CustomRenderSelect/index.js +19 -39
  8. package/es/DynamicGridList/index.js +16 -28
  9. package/es/FullScreen/index.js +10 -21
  10. package/es/GridList/hook.js +36 -67
  11. package/es/GridList/index.d.ts +1 -1
  12. package/es/GridList/index.js +1 -1
  13. package/es/ImageView/index.js +16 -31
  14. package/es/LabelValue/index.d.ts +0 -8
  15. package/es/LabelValue/index.js +11 -16
  16. package/es/List/index.js +5 -7
  17. package/es/ListWithSizeAnimate/demo.js +3 -15
  18. package/es/LoaderScript/utils.js +100 -153
  19. package/es/Map/InfoWindow/MakerLikeWindow.js +35 -29
  20. package/es/Map/InfoWindow/demo.js +17 -29
  21. package/es/Picture/component/Tools/index.js +5 -7
  22. package/es/Picture/demo.js +15 -19
  23. package/es/Picture/index.js +70 -104
  24. package/es/Picture/utils.js +14 -28
  25. package/es/Player/api/index.js +26 -94
  26. package/es/Player/contraller_bar/right_bar.js +12 -23
  27. package/es/Player/demo.js +47 -62
  28. package/es/Player/event/errorEvent.js +15 -40
  29. package/es/Player/fps_play.js +12 -28
  30. package/es/Player/frontend_timeline.js +28 -48
  31. package/es/Player/player.d.ts +2 -1
  32. package/es/Player/segment_timeline.js +45 -69
  33. package/es/Player/single_player.js +101 -109
  34. package/es/Player/util.js +8 -27
  35. package/es/Progress/index.js +5 -16
  36. package/es/ROI/index.d.ts +0 -6
  37. package/es/ROI/index.js +17 -26
  38. package/es/RefDrawer/Footer.js +3 -5
  39. package/es/RefDrawer/demo.js +0 -3
  40. package/es/RefDrawer/index.js +17 -27
  41. package/es/RefModal/demo.js +0 -3
  42. package/es/RefModal/index.js +27 -27
  43. package/es/ScreenPlayer/Live.d.ts +1 -1
  44. package/es/ScreenPlayer/Live.js +36 -70
  45. package/es/ScreenPlayer/LiveTools.js +20 -39
  46. package/es/ScreenPlayer/PlayerWithExt.js +48 -85
  47. package/es/ScreenPlayer/RecordTools.d.ts +1 -1
  48. package/es/ScreenPlayer/RecordTools.js +27 -53
  49. package/es/ScreenPlayer/SegmentTimeLine.js +8 -13
  50. package/es/ScreenPlayer/TimeSelect.js +9 -24
  51. package/es/ScreenPlayer/demo.js +1 -1
  52. package/es/ScreenPlayer/demo2.js +76 -108
  53. package/es/ScreenPlayer/useTimeSlider.js +63 -141
  54. package/es/Service/http.js +14 -34
  55. package/es/TableLayout/index.js +6 -10
  56. package/es/ThemeAntd/index.js +0 -1
  57. package/es/Timeout/index.js +16 -31
  58. package/es/VList/index.d.ts +1 -9
  59. package/es/VList/index.js +18 -30
  60. package/es/typings.d.ts +1 -0
  61. package/es/useDrawROI/index.js +61 -115
  62. package/es/useInfiniteScroll/index.js +24 -45
  63. package/es/utils.js +18 -42
  64. package/package.json +4 -5
  65. package/es/ROI/utils.d.ts +0 -1
  66. package/es/ROI/utils.js +0 -1
  67. package/es/ThemeAntd/demo.html +0 -32
@@ -1,56 +1,46 @@
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); }
1
2
  import _useUpdateEffect from "ahooks/es/useUpdateEffect";
2
3
  import _useEventListener from "ahooks/es/useEventListener";
3
-
4
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
-
6
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; }
7
-
8
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
-
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); }
10
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
-
12
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."); }
13
-
14
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); }
15
-
16
- 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; }
17
-
18
- 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; }
19
-
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; } }
20
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
-
22
- import { useEffect, useMemo, useState } from 'react';
23
15
  import { getTargetElement } from 'ahooks/es/utils/domTarget';
24
16
  import { getClientHeight, getScrollHeight, getScrollTop } from 'ahooks/es/utils/rect';
25
-
17
+ import { useEffect, useMemo, useState } from 'react';
26
18
  function useInfiniteScroll(fetcher, options) {
27
19
  var target = options.target,
28
- isNoMore = options.isNoMore,
29
- threshold = options.threshold,
30
- reloadDeps = options.reloadDeps;
31
-
20
+ isNoMore = options.isNoMore,
21
+ threshold = options.threshold,
22
+ reloadDeps = options.reloadDeps;
32
23
  var _useState = useState({
33
- data: {
34
- list: []
35
- },
36
- loadding: false
37
- }),
38
- _useState2 = _slicedToArray(_useState, 2),
39
- state = _useState2[0],
40
- setState = _useState2[1]; // eslint-disable-next-line react-hooks/exhaustive-deps
41
-
42
-
24
+ data: {
25
+ list: []
26
+ },
27
+ loadding: false
28
+ }),
29
+ _useState2 = _slicedToArray(_useState, 2),
30
+ state = _useState2[0],
31
+ setState = _useState2[1];
32
+ // eslint-disable-next-line react-hooks/exhaustive-deps
43
33
  var noMore = useMemo(function () {
44
34
  return !isNoMore ? false : isNoMore(state.data);
45
35
  }, [state.data]);
46
-
47
36
  var loadMore = function loadMore(flag) {
48
37
  var _isNoMore;
49
-
50
38
  if (!flag && ((_isNoMore = isNoMore === null || isNoMore === void 0 ? void 0 : isNoMore(state.data)) !== null && _isNoMore !== void 0 ? _isNoMore : false)) {
51
39
  return;
52
40
  }
53
-
41
+ if (state.loadding) {
42
+ return;
43
+ }
54
44
  setState(function (old) {
55
45
  return _objectSpread(_objectSpread({}, old), {}, {
56
46
  loadding: true
@@ -66,57 +56,46 @@ function useInfiniteScroll(fetcher, options) {
66
56
  });
67
57
  });
68
58
  });
69
- }; // eslint-disable-next-line react-hooks/exhaustive-deps
70
-
59
+ };
71
60
 
61
+ // eslint-disable-next-line react-hooks/exhaustive-deps
72
62
  useEffect(function () {
73
63
  return loadMore(true);
74
64
  }, reloadDeps ? reloadDeps : [reloadDeps]);
75
-
76
65
  var scrollMethod = function scrollMethod() {
77
66
  var el = getTargetElement(target);
78
-
79
67
  if (!el) {
80
68
  return;
81
69
  }
82
-
83
70
  var scrollTop = getScrollTop(el);
84
71
  var scrollHeight = getScrollHeight(el);
85
72
  var clientHeight = getClientHeight(el);
86
-
87
73
  if (scrollHeight - scrollTop <= clientHeight + (threshold || 50)) {
88
74
  loadMore();
89
75
  }
90
76
  };
91
-
92
77
  _useEventListener('scroll', function () {
93
78
  if (state.loadding) {
94
79
  return;
95
80
  }
96
-
97
81
  scrollMethod();
98
82
  }, {
99
83
  target: target
100
84
  });
101
-
102
85
  _useUpdateEffect(function () {
103
86
  var el = getTargetElement(target);
104
-
105
87
  if (!el) {
106
88
  return;
107
89
  }
108
-
109
90
  el.scrollTo({
110
91
  left: 0,
111
92
  top: 0
112
93
  });
113
94
  }, reloadDeps ? reloadDeps : []);
114
-
115
95
  return {
116
96
  noMore: noMore,
117
97
  data: state.data,
118
98
  loading: state.loadding
119
99
  };
120
100
  }
121
-
122
101
  export default useInfiniteScroll;
package/es/utils.js CHANGED
@@ -1,13 +1,8 @@
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
-
3
2
  import _cache from "@cloud-app-dev/utils/es/cache";
4
-
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, $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; }
6
-
3
+ 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; }
7
4
  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); } }
8
-
9
5
  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); }); }; }
10
-
11
6
  export var getHeader = function getHeader() {
12
7
  return {
13
8
  Authorization: _cache.getCache('token', 'session')
@@ -16,46 +11,37 @@ export var getHeader = function getHeader() {
16
11
  export function tryCatch(_x) {
17
12
  return _tryCatch.apply(this, arguments);
18
13
  }
19
-
20
14
  function _tryCatch() {
21
15
  _tryCatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolveFn) {
22
16
  var rejectFn,
23
- _args = arguments;
17
+ _args = arguments;
24
18
  return _regeneratorRuntime().wrap(function _callee$(_context) {
25
- while (1) {
26
- switch (_context.prev = _context.next) {
27
- case 0:
28
- rejectFn = _args.length > 1 && _args[1] !== undefined ? _args[1] : console.error;
29
- _context.prev = 1;
30
- _context.next = 4;
31
- return resolveFn();
32
-
33
- case 4:
34
- _context.next = 9;
35
- break;
36
-
37
- case 6:
38
- _context.prev = 6;
39
- _context.t0 = _context["catch"](1);
40
- rejectFn(_context.t0);
41
-
42
- case 9:
43
- case "end":
44
- return _context.stop();
45
- }
19
+ while (1) switch (_context.prev = _context.next) {
20
+ case 0:
21
+ rejectFn = _args.length > 1 && _args[1] !== undefined ? _args[1] : console.error;
22
+ _context.prev = 1;
23
+ _context.next = 4;
24
+ return resolveFn();
25
+ case 4:
26
+ _context.next = 9;
27
+ break;
28
+ case 6:
29
+ _context.prev = 6;
30
+ _context.t0 = _context["catch"](1);
31
+ rejectFn(_context.t0);
32
+ case 9:
33
+ case "end":
34
+ return _context.stop();
46
35
  }
47
36
  }, _callee, null, [[1, 6]]);
48
37
  }));
49
38
  return _tryCatch.apply(this, arguments);
50
39
  }
51
-
52
40
  export function getTargetElement(target, defaultElement) {
53
41
  if (!target) {
54
42
  return defaultElement;
55
43
  }
56
-
57
44
  var targetElement;
58
-
59
45
  if (typeof target === 'function') {
60
46
  targetElement = target();
61
47
  } else if ('current' in target) {
@@ -63,40 +49,30 @@ export function getTargetElement(target, defaultElement) {
63
49
  } else {
64
50
  targetElement = target;
65
51
  }
66
-
67
52
  return targetElement;
68
53
  }
69
-
70
54
  var getScrollTop = function getScrollTop(el) {
71
55
  if (el === document || el === document.body) {
72
56
  return Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop);
73
57
  }
74
-
75
58
  return el.scrollTop;
76
59
  };
77
-
78
60
  var getScrollHeight = function getScrollHeight(el) {
79
61
  return el.scrollHeight || Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
80
62
  };
81
-
82
63
  var getClientHeight = function getClientHeight(el) {
83
64
  return el.clientHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
84
65
  };
85
-
86
66
  var getEleScrollHeight = function getEleScrollHeight(el) {
87
67
  if (el === document || el === document.body) {
88
68
  return Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop);
89
69
  }
90
-
91
70
  var top = 0;
92
71
  var dom = el;
93
-
94
72
  while (dom) {
95
73
  top += dom.scrollTop;
96
74
  dom = dom.parentElement;
97
75
  }
98
-
99
76
  return top;
100
77
  };
101
-
102
78
  export { getScrollTop, getScrollHeight, getClientHeight, getEleScrollHeight };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "@cloud-app-dev/vidc",
4
4
  "description": "Video Image Data Componennts",
5
- "version": "4.0.1",
5
+ "version": "4.0.2",
6
6
  "scripts": {
7
7
  "docs:deploy": "gh-pages -d docs-dist",
8
8
  "build": "npm run entry && father build",
@@ -67,11 +67,11 @@
67
67
  "@types/react": "^18.0.26",
68
68
  "@types/react-dom": "^18.0.9",
69
69
  "@umijs/lint": "^4.0.36",
70
- "antd": "^5.0.4",
70
+ "antd": "^5.1.7",
71
71
  "babel-plugin-import": "^1.13.5",
72
- "dumi": "^2.0.16",
72
+ "dumi": "^2.1.5",
73
73
  "eslint": "^8.28.0",
74
- "father": "^4.1.2",
74
+ "father": "^4.1.3",
75
75
  "gh-pages": "^4.0.0",
76
76
  "husky": "^8.0.1",
77
77
  "lint-staged": "^13.0.3",
@@ -81,7 +81,6 @@
81
81
  "prettier-plugin-packagejson": "^2.2.18",
82
82
  "react": "^18.2.0",
83
83
  "react-dom": "^18.2.0",
84
- "react-router-dom": "^6.3.0",
85
84
  "stylelint": "^14.15.0",
86
85
  "stylelint-config-prettier": "^9.0.4",
87
86
  "stylelint-config-standard": "^29.0.0",
package/es/ROI/utils.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function drawMark(ctx: CanvasRenderingContext2D, x: number, y: number): void;
package/es/ROI/utils.js DELETED
@@ -1 +0,0 @@
1
- export function drawMark(ctx, x, y) {}
@@ -1,32 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>Document</title>
8
- <style>
9
- .div1{
10
- width: 500px;
11
- height: 300px;
12
- position: relative;
13
- margin:0 auto;
14
- border:1px solid #000
15
- }
16
-
17
- .div2{
18
- width: 600px;
19
- height: 400px;
20
- position: absolute;
21
- border:1px solid red;
22
- transform-origin: left top;
23
- transform: scale(1);
24
- }
25
- </style>
26
- </head>
27
- <body>
28
- <div class="div1">
29
- <div class="div2"></div>
30
- </div>
31
- </body>
32
- </html>