@cloud-app-dev/vidc 3.2.38 → 4.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/.dumirc.ts +7 -11
- package/.fatherrc.ts +0 -1
- package/es/CheckGroupFixed/demo.js +2 -3
- package/es/CheckGroupFixed/index.js +4 -7
- package/es/Config/index.js +10 -9
- package/es/Config/interface.d.ts +2 -3
- package/es/CustomRenderSelect/index.js +2 -3
- package/es/DynamicList/demo.js +3 -4
- package/es/DynamicList/index.js +2 -3
- package/es/ErrorFallback/index.js +3 -6
- package/es/FrontendPlayer/index.d.ts +4 -2
- package/es/List/index.d.ts +0 -13
- package/es/List/index.js +1 -19
- package/es/LoaderScript/utils.d.ts +0 -1
- package/es/LoaderScript/utils.js +1 -36
- package/es/Map/FindPio/index.js +2 -3
- package/es/Map/LevelCenter/demo.js +2 -4
- package/es/Map/ResetTools/index.js +4 -5
- package/es/Picture/component/Tools/index.js +6 -7
- package/es/Picture/demo.js +9 -13
- package/es/Picture/index.js +55 -64
- package/es/Picture/utils.js +0 -1
- package/es/Player/api/index.js +2 -1
- package/es/Player/contraller_bar/volume.js +3 -6
- package/es/Player/demo.js +28 -58
- package/es/Player/frontend_timeline.js +1 -1
- package/es/Player/segment_timeline.js +3 -5
- package/es/Player/single_player.js +1 -1
- package/es/Player/util.d.ts +0 -1
- package/es/Player/util.js +2 -40
- package/es/PlayerExt/demo.js +12 -20
- package/es/Progress/index.js +4 -6
- package/es/RefDrawer/Footer.d.ts +9 -0
- package/es/{Drawer → RefDrawer}/Footer.js +3 -5
- package/es/{Drawer/Demo.d.ts → RefDrawer/demo.d.ts} +0 -0
- package/es/RefDrawer/demo.js +35 -0
- package/es/RefDrawer/index.d.ts +26 -0
- package/es/{Input → RefDrawer}/index.js +54 -58
- package/es/{Input → RefModal}/demo.d.ts +0 -0
- package/es/RefModal/demo.js +35 -0
- package/es/RefModal/index.d.ts +17 -0
- package/es/RefModal/index.js +71 -0
- package/es/ScreenPlayer/PlayerWithExt.js +1 -1
- package/es/ScreenPlayer/RatePick.js +8 -9
- package/es/ScreenPlayer/ScreenSelect.js +2 -3
- package/es/ScreenPlayer/SegmentTimeLine.js +3 -11
- package/es/ScreenPlayer/TimeMode.js +3 -4
- package/es/ScreenPlayer/TimeSelect.js +14 -39
- package/es/ScreenPlayer/demo.js +2 -3
- package/es/ScreenPlayer/demo2.js +8 -28
- package/es/ScreenPlayer/useTimeSlider.js +1 -1
- package/es/Service/http.js +6 -8
- package/es/TableLayout/index.d.ts +0 -3
- package/es/TableLayout/index.js +8 -10
- package/es/ThemeAntd/demo.js +21 -40
- package/es/ThemeAntd/index.js +16 -2
- package/es/ThemeAntd/index.less +0 -12
- package/es/Timeout/index.js +2 -2
- package/es/core.d.ts +0 -149
- package/es/index.d.ts +2 -6
- package/es/index.js +2 -6
- package/es/useDrawROI/index.js +4 -4
- package/es/utils.d.ts +1 -12
- package/es/utils.js +0 -56
- package/package.json +24 -24
- package/theme-config.ts +3 -1
- package/typings/global.d.ts +4 -4
- package/es/Api/index.d.ts +0 -12
- package/es/Api/index.js +0 -267
- package/es/Box/BetweenBox/index.d.ts +0 -12
- package/es/Box/BetweenBox/index.js +0 -31
- package/es/Box/BetweenBox/index.less +0 -5
- package/es/Box/InfoBox/index.d.ts +0 -12
- package/es/Box/InfoBox/index.js +0 -30
- package/es/Box/InfoBox/index.less +0 -24
- package/es/Box/TwoColumnBox/index.d.ts +0 -10
- package/es/Box/TwoColumnBox/index.js +0 -54
- package/es/Box/TwoColumnBox/index.less +0 -80
- package/es/Box/deps/content-grid.d.ts +0 -9
- package/es/Box/deps/content-grid.js +0 -9
- package/es/Box/deps/grid-factory.d.ts +0 -10
- package/es/Box/deps/grid-factory.js +0 -72
- package/es/Box/deps/simple-grid.d.ts +0 -9
- package/es/Box/deps/simple-grid.js +0 -8
- package/es/Box/index.d.ts +0 -14
- package/es/Box/index.js +0 -39
- package/es/Box/index.less +0 -10
- package/es/Drawer/Demo.js +0 -109
- package/es/Drawer/Footer.d.ts +0 -5
- package/es/Drawer/index.d.ts +0 -38
- package/es/Drawer/index.js +0 -207
- package/es/Drawer/index.less +0 -42
- package/es/Drawer/interface.d.ts +0 -22
- package/es/Input/demo.js +0 -16
- package/es/Input/index.d.ts +0 -19
- package/es/Input/index.less +0 -12
- package/es/Modal/demo.d.ts +0 -3
- package/es/Modal/demo.js +0 -106
- package/es/Modal/index.d.ts +0 -44
- package/es/Modal/index.js +0 -197
- package/es/Modal/index.less +0 -44
- package/es/Modal/interface.d.ts +0 -23
- package/es/Service/fetch-adapter.d.ts +0 -12
- package/es/Service/fetch-adapter.js +0 -203
- package/es/ThemeAntd/style/button.less +0 -67
- package/es/ThemeAntd/style/checkbox.less +0 -72
- package/es/ThemeAntd/style/form.less +0 -12
- package/es/ThemeAntd/style/input.less +0 -83
- package/es/ThemeAntd/style/pagination.less +0 -96
- package/es/ThemeAntd/style/picker.less +0 -106
- package/es/ThemeAntd/style/popover.less +0 -5
- package/es/ThemeAntd/style/radio.less +0 -87
- package/es/ThemeAntd/style/scrollbar.less +0 -23
- package/es/ThemeAntd/style/select.less +0 -81
- package/es/ThemeAntd/style/table.less +0 -57
- package/es/ThemeAntd/style/tree.less +0 -18
- package/es/Tree/demo.d.ts +0 -3
- package/es/Tree/demo.js +0 -32
- package/es/Tree/index.d.ts +0 -24
- package/es/Tree/index.js +0 -100
- package/es/Tree/index.less +0 -60
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import "antd/lib/popover/style";
|
|
2
|
-
import _Popover from "antd/lib/popover";
|
|
3
|
-
import "antd/lib/button/style";
|
|
4
|
-
import _Button from "antd/lib/button";
|
|
5
|
-
import "antd/lib/input-number/style";
|
|
6
|
-
import _InputNumber from "antd/lib/input-number";
|
|
7
1
|
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
8
2
|
|
|
9
3
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -18,7 +12,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
18
12
|
|
|
19
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
14
|
|
|
21
|
-
import
|
|
15
|
+
import { Button, InputNumber, Popover } from 'antd';
|
|
16
|
+
import moment from 'dayjs';
|
|
22
17
|
import React, { useMemo, useState } from 'react';
|
|
23
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
19
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -28,57 +23,37 @@ function TimeSelect(_ref) {
|
|
|
28
23
|
onChange = _ref.onChange;
|
|
29
24
|
|
|
30
25
|
var _useState = useState(function () {
|
|
31
|
-
var m = time ? moment(time) : moment().set(
|
|
32
|
-
|
|
33
|
-
minutes: 0,
|
|
34
|
-
seconds: 0
|
|
35
|
-
});
|
|
36
|
-
return [m.hours(), m.minutes(), m.seconds()];
|
|
26
|
+
var m = time ? moment(time) : moment().set('hours', 0).set('minutes', 0).set('seconds', 0);
|
|
27
|
+
return [m.hour(), m.minute(), m.second()];
|
|
37
28
|
}),
|
|
38
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
39
30
|
values = _useState2[0],
|
|
40
31
|
setValues = _useState2[1];
|
|
41
32
|
|
|
42
33
|
var timeStr = useMemo(function () {
|
|
43
|
-
var m = time ? moment(time) : moment().set(
|
|
44
|
-
hours: 0,
|
|
45
|
-
minutes: 0,
|
|
46
|
-
seconds: 0
|
|
47
|
-
});
|
|
34
|
+
var m = time ? moment(time) : moment().set('hours', 0).set('minutes', 0).set('seconds', 0);
|
|
48
35
|
return m.format('HH:mm:ss');
|
|
49
36
|
}, [time]);
|
|
50
37
|
|
|
51
38
|
var onChangeTime = function onChangeTime() {
|
|
52
|
-
var m = time ? moment(time) : moment().set(
|
|
53
|
-
|
|
54
|
-
minutes: 0,
|
|
55
|
-
seconds: 0
|
|
56
|
-
});
|
|
57
|
-
var newTime = m.set({
|
|
58
|
-
hours: values[0],
|
|
59
|
-
minutes: values[1],
|
|
60
|
-
seconds: values[2]
|
|
61
|
-
}).valueOf();
|
|
39
|
+
var m = time ? moment(time) : moment().set('hours', 0).set('minutes', 0).set('seconds', 0);
|
|
40
|
+
var newTime = m.set('hours', values[0]).set('minutes', values[1]).set('seconds', values[2]).valueOf();
|
|
62
41
|
onChange === null || onChange === void 0 ? void 0 : onChange(newTime);
|
|
63
42
|
};
|
|
64
43
|
|
|
65
44
|
_useUpdateEffect(function () {
|
|
66
|
-
var m = time ? moment(time) : moment().set(
|
|
67
|
-
|
|
68
|
-
minutes: 0,
|
|
69
|
-
seconds: 0
|
|
70
|
-
});
|
|
71
|
-
setValues([m.hours(), m.minutes(), m.seconds()]);
|
|
45
|
+
var m = time ? moment(time) : moment().set('hours', 0).set('minutes', 0).set('seconds', 0);
|
|
46
|
+
setValues([m.hour(), m.minute(), m.second()]);
|
|
72
47
|
}, [time]);
|
|
73
48
|
|
|
74
49
|
var formatter = function formatter(value) {
|
|
75
50
|
return String(value).length === 1 ? "0".concat(value) : value + '';
|
|
76
51
|
};
|
|
77
52
|
|
|
78
|
-
return /*#__PURE__*/_jsx(
|
|
53
|
+
return /*#__PURE__*/_jsx(Popover, {
|
|
79
54
|
content: /*#__PURE__*/_jsxs("div", {
|
|
80
55
|
className: "player-time-select",
|
|
81
|
-
children: [/*#__PURE__*/_jsx(
|
|
56
|
+
children: [/*#__PURE__*/_jsx(InputNumber, {
|
|
82
57
|
size: "small",
|
|
83
58
|
style: {
|
|
84
59
|
width: 36
|
|
@@ -91,7 +66,7 @@ function TimeSelect(_ref) {
|
|
|
91
66
|
return [v, old[1], old[2]];
|
|
92
67
|
});
|
|
93
68
|
}
|
|
94
|
-
}), ":", /*#__PURE__*/_jsx(
|
|
69
|
+
}), ":", /*#__PURE__*/_jsx(InputNumber, {
|
|
95
70
|
size: "small",
|
|
96
71
|
style: {
|
|
97
72
|
width: 36
|
|
@@ -104,7 +79,7 @@ function TimeSelect(_ref) {
|
|
|
104
79
|
return [old[0], v, old[2]];
|
|
105
80
|
});
|
|
106
81
|
}
|
|
107
|
-
}), ":", /*#__PURE__*/_jsx(
|
|
82
|
+
}), ":", /*#__PURE__*/_jsx(InputNumber, {
|
|
108
83
|
size: "small",
|
|
109
84
|
style: {
|
|
110
85
|
width: 36
|
|
@@ -117,7 +92,7 @@ function TimeSelect(_ref) {
|
|
|
117
92
|
return [old[0], old[1], v];
|
|
118
93
|
});
|
|
119
94
|
}
|
|
120
|
-
}), /*#__PURE__*/_jsx(
|
|
95
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
121
96
|
size: "small",
|
|
122
97
|
type: "primary",
|
|
123
98
|
onClick: onChangeTime,
|
package/es/ScreenPlayer/demo.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _ConfigProvider from "antd/lib/config-provider";
|
|
1
|
+
import { ConfigProvider } from 'antd';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import LivePlayer from "./Live";
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -8,7 +7,7 @@ var list = [{
|
|
|
8
7
|
type: 'hls'
|
|
9
8
|
}];
|
|
10
9
|
export default function App() {
|
|
11
|
-
return /*#__PURE__*/_jsx(
|
|
10
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
12
11
|
prefixCls: "cloudapp",
|
|
13
12
|
children: /*#__PURE__*/_jsx("div", {
|
|
14
13
|
style: {
|
package/es/ScreenPlayer/demo2.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
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 "antd/lib/config-provider/style";
|
|
4
|
-
import _ConfigProvider from "antd/lib/config-provider";
|
|
5
|
-
import "antd/lib/date-picker/style";
|
|
6
|
-
import _DatePicker from "antd/lib/date-picker";
|
|
7
|
-
|
|
8
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, $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; }
|
|
9
4
|
|
|
10
5
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -37,7 +32,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
37
32
|
|
|
38
33
|
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; }
|
|
39
34
|
|
|
40
|
-
import
|
|
35
|
+
import { ConfigProvider, DatePicker } from 'antd';
|
|
36
|
+
import moment from 'dayjs';
|
|
41
37
|
import React, { useMemo, useState } from 'react';
|
|
42
38
|
import Service from "../Service";
|
|
43
39
|
import RecordPlayer from "./Record";
|
|
@@ -51,16 +47,8 @@ var query = function query(_ref) {
|
|
|
51
47
|
var cid = _ref.cid,
|
|
52
48
|
date = _ref.date;
|
|
53
49
|
var m = moment(date);
|
|
54
|
-
var beginTime = m.set(
|
|
55
|
-
|
|
56
|
-
minutes: 0,
|
|
57
|
-
seconds: 0
|
|
58
|
-
}).unix();
|
|
59
|
-
var endTime = m.set({
|
|
60
|
-
hours: 23,
|
|
61
|
-
minutes: 59,
|
|
62
|
-
seconds: 59
|
|
63
|
-
}).unix();
|
|
50
|
+
var beginTime = m.set('hours', 0).set('minutes', 0).set('seconds', 0).unix();
|
|
51
|
+
var endTime = m.set('hours', 23).set('minutes', 59).set('seconds', 59).unix();
|
|
64
52
|
var promise = Service.http({
|
|
65
53
|
method: 'post',
|
|
66
54
|
url: "https://jxsr-eye.antelopecloud.cn/api/staticResource/v2/video/queryHistoryAddress?Authorization=".concat(token),
|
|
@@ -97,19 +85,15 @@ export default function App() {
|
|
|
97
85
|
var value = useMemo(function () {
|
|
98
86
|
var _state$list$state$idx;
|
|
99
87
|
|
|
100
|
-
return state.list[state.idx] ? moment((_state$list$state$idx = state.list[state.idx]) === null || _state$list$state$idx === void 0 ? void 0 : _state$list$state$idx.date).set(
|
|
101
|
-
hour: 0,
|
|
102
|
-
minute: 0,
|
|
103
|
-
second: 0
|
|
104
|
-
}) : undefined;
|
|
88
|
+
return state.list[state.idx] ? moment((_state$list$state$idx = state.list[state.idx]) === null || _state$list$state$idx === void 0 ? void 0 : _state$list$state$idx.date).set('hours', 0).set('minutes', 0).set('seconds', 0) : undefined;
|
|
105
89
|
}, [state.list, state.idx]);
|
|
106
|
-
return /*#__PURE__*/_jsx(
|
|
90
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
107
91
|
prefixCls: "cloudapp",
|
|
108
92
|
children: /*#__PURE__*/_jsxs("div", {
|
|
109
93
|
style: {
|
|
110
94
|
width: '100%'
|
|
111
95
|
},
|
|
112
|
-
children: [/*#__PURE__*/_jsx(
|
|
96
|
+
children: [/*#__PURE__*/_jsx(DatePicker, {
|
|
113
97
|
value: value,
|
|
114
98
|
onChange: /*#__PURE__*/function () {
|
|
115
99
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(v) {
|
|
@@ -121,11 +105,7 @@ export default function App() {
|
|
|
121
105
|
list = _toConsumableArray(state.list);
|
|
122
106
|
flag = state.idx % 2 === 0;
|
|
123
107
|
cid = flag ? cids[0] : cids[1];
|
|
124
|
-
date = v === null || v === void 0 ? void 0 : v.set(
|
|
125
|
-
hours: 0,
|
|
126
|
-
minutes: 0,
|
|
127
|
-
seconds: 0
|
|
128
|
-
}).valueOf();
|
|
108
|
+
date = v === null || v === void 0 ? void 0 : v.set('hours', 0).set('minutes', 0).set('seconds', 0).valueOf();
|
|
129
109
|
item = {
|
|
130
110
|
date: date,
|
|
131
111
|
cid: cid,
|
|
@@ -21,7 +21,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
21
21
|
|
|
22
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
23
|
|
|
24
|
-
import moment from '
|
|
24
|
+
import moment from 'dayjs';
|
|
25
25
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
26
26
|
var hours = [1, 6, 12, 24];
|
|
27
27
|
var currentColor = '#FF000A';
|
package/es/Service/http.js
CHANGED
|
@@ -10,16 +10,13 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
10
10
|
|
|
11
11
|
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; }
|
|
12
12
|
|
|
13
|
-
/* eslint-disable no-param-reassign */
|
|
14
13
|
import Axios from 'axios';
|
|
15
|
-
import fetchAdapter from "./fetch-adapter";
|
|
16
14
|
import * as Middleware from "./middleware";
|
|
17
15
|
var CancelToken = Axios.CancelToken;
|
|
18
16
|
var config = {
|
|
19
17
|
baseURL: '/',
|
|
20
18
|
timeout: 60 * 1000,
|
|
21
19
|
xhrMode: 'fetch',
|
|
22
|
-
adapter: fetchAdapter,
|
|
23
20
|
headers: {
|
|
24
21
|
Accept: 'application/json; charset=utf-8',
|
|
25
22
|
'Content-Type': 'application/json; charset=utf-8'
|
|
@@ -43,17 +40,19 @@ httpInstance.interceptors.response.use(function (response) {
|
|
|
43
40
|
if (Middleware.responseMiddleware.length === 0) {
|
|
44
41
|
return response.data;
|
|
45
42
|
} else {
|
|
43
|
+
var resp = response;
|
|
46
44
|
Middleware.responseMiddleware.forEach(function (fn) {
|
|
47
|
-
|
|
45
|
+
resp = fn(response);
|
|
48
46
|
});
|
|
49
|
-
return
|
|
47
|
+
return resp;
|
|
50
48
|
}
|
|
51
49
|
}, function httpUtilErrorRequest(error) {
|
|
52
50
|
if (Middleware.responseErrorMiddleware.length !== 0) {
|
|
51
|
+
var err = error;
|
|
53
52
|
Middleware.responseErrorMiddleware.forEach(function (fn) {
|
|
54
|
-
|
|
53
|
+
err = fn(error);
|
|
55
54
|
});
|
|
56
|
-
return Promise.reject(
|
|
55
|
+
return Promise.reject(err);
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
if (!error.response) {
|
|
@@ -83,7 +82,6 @@ function http(_ref) {
|
|
|
83
82
|
|
|
84
83
|
var httpMultiPartInstance = Axios.create({
|
|
85
84
|
timeout: 10 * 60 * 1000,
|
|
86
|
-
adapter: fetchAdapter,
|
|
87
85
|
headers: {
|
|
88
86
|
'Content-Type': 'multipart/form-data'
|
|
89
87
|
}
|
package/es/TableLayout/index.js
CHANGED
|
@@ -4,17 +4,20 @@ import "./index.less";
|
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
function TableLayout(_ref) {
|
|
7
|
-
var className = _ref.className,
|
|
7
|
+
var _ref$className = _ref.className,
|
|
8
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
8
9
|
children = _ref.children,
|
|
9
|
-
cutNum = _ref.cutNum,
|
|
10
|
-
|
|
10
|
+
_ref$cutNum = _ref.cutNum,
|
|
11
|
+
cutNum = _ref$cutNum === void 0 ? 0 : _ref$cutNum,
|
|
12
|
+
_ref$x = _ref.x,
|
|
13
|
+
x = _ref$x === void 0 ? 1200 : _ref$x;
|
|
11
14
|
var domRef = useRef(null);
|
|
12
15
|
|
|
13
16
|
var size = _useSize(domRef);
|
|
14
17
|
|
|
15
18
|
var height = useMemo(function () {
|
|
16
|
-
return size.height - cutNum;
|
|
17
|
-
}, [size.height, cutNum]);
|
|
19
|
+
return size !== null && size !== void 0 && size.height ? size.height - cutNum : 0;
|
|
20
|
+
}, [size === null || size === void 0 ? void 0 : size.height, cutNum]);
|
|
18
21
|
return /*#__PURE__*/_jsx("div", {
|
|
19
22
|
ref: domRef,
|
|
20
23
|
className: "table-layout ".concat(className),
|
|
@@ -27,9 +30,4 @@ function TableLayout(_ref) {
|
|
|
27
30
|
});
|
|
28
31
|
}
|
|
29
32
|
|
|
30
|
-
TableLayout.defaultProps = {
|
|
31
|
-
className: '',
|
|
32
|
-
cutNum: 0,
|
|
33
|
-
x: 1200
|
|
34
|
-
};
|
|
35
33
|
export default TableLayout;
|
package/es/ThemeAntd/demo.js
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _ConfigProvider from "antd/lib/config-provider";
|
|
3
|
-
import "antd/lib/table/style";
|
|
4
|
-
import _Table from "antd/lib/table";
|
|
5
|
-
import "antd/lib/button/style";
|
|
6
|
-
import _Button from "antd/lib/button";
|
|
7
|
-
import "antd/lib/pagination/style";
|
|
8
|
-
import _Pagination from "antd/lib/pagination";
|
|
9
|
-
import "antd/lib/date-picker/style";
|
|
10
|
-
import _DatePicker from "antd/lib/date-picker";
|
|
11
|
-
import "antd/lib/checkbox/style";
|
|
12
|
-
import _Checkbox from "antd/lib/checkbox";
|
|
13
|
-
import "antd/lib/radio/style";
|
|
14
|
-
import _Radio from "antd/lib/radio";
|
|
15
|
-
import "antd/lib/select/style";
|
|
16
|
-
import _Select from "antd/lib/select";
|
|
17
|
-
import "antd/lib/input-number/style";
|
|
18
|
-
import _InputNumber from "antd/lib/input-number";
|
|
19
|
-
import "antd/lib/input/style";
|
|
20
|
-
import _Input from "antd/lib/input";
|
|
1
|
+
import { Button, Checkbox, ConfigProvider, DatePicker, Input, InputNumber, Pagination, Radio, Select, Table } from 'antd';
|
|
21
2
|
import React, { useRef } from 'react';
|
|
22
3
|
import ThemeAntd from '.';
|
|
23
4
|
import "./demo.less";
|
|
@@ -26,14 +7,14 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
26
7
|
|
|
27
8
|
var App = function App() {
|
|
28
9
|
var ref = useRef(null);
|
|
29
|
-
return /*#__PURE__*/_jsx(
|
|
10
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
30
11
|
prefixCls: "cloudapp",
|
|
31
12
|
children: /*#__PURE__*/_jsx(ThemeAntd, {
|
|
32
13
|
children: /*#__PURE__*/_jsxs("div", {
|
|
33
14
|
className: "theme-antd-demo",
|
|
34
15
|
ref: ref,
|
|
35
16
|
children: [/*#__PURE__*/_jsx("p", {
|
|
36
|
-
children: /*#__PURE__*/_jsx(
|
|
17
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
37
18
|
placeholder: "\u6587\u672C\u8F93\u5165",
|
|
38
19
|
prefix: /*#__PURE__*/_jsx("div", {
|
|
39
20
|
children: "111"
|
|
@@ -43,80 +24,80 @@ var App = function App() {
|
|
|
43
24
|
})
|
|
44
25
|
})
|
|
45
26
|
}), /*#__PURE__*/_jsx("p", {
|
|
46
|
-
children: /*#__PURE__*/_jsx(
|
|
27
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
47
28
|
placeholder: "\u6587\u672C\u8F93\u5165"
|
|
48
29
|
})
|
|
49
30
|
}), /*#__PURE__*/_jsx("p", {
|
|
50
|
-
children: /*#__PURE__*/_jsx(
|
|
31
|
+
children: /*#__PURE__*/_jsx(InputNumber, {
|
|
51
32
|
placeholder: "\u6570\u5B57\u8F93\u5165"
|
|
52
33
|
})
|
|
53
34
|
}), /*#__PURE__*/_jsx("p", {
|
|
54
|
-
children: /*#__PURE__*/_jsx(
|
|
35
|
+
children: /*#__PURE__*/_jsx(Input.TextArea, {
|
|
55
36
|
placeholder: "\u591A\u884C\u6587\u672C\u8F93\u5165"
|
|
56
37
|
})
|
|
57
38
|
}), /*#__PURE__*/_jsx("p", {
|
|
58
|
-
children: /*#__PURE__*/_jsxs(
|
|
39
|
+
children: /*#__PURE__*/_jsxs(Select, {
|
|
59
40
|
placeholder: "\u9009\u62E9\u8F93\u5165",
|
|
60
41
|
getPopupContainer: function getPopupContainer() {
|
|
61
42
|
return ref.current;
|
|
62
43
|
},
|
|
63
|
-
children: [/*#__PURE__*/_jsx(
|
|
44
|
+
children: [/*#__PURE__*/_jsx(Select.Option, {
|
|
64
45
|
value: 1,
|
|
65
46
|
children: "\u9009\u98791"
|
|
66
|
-
}), /*#__PURE__*/_jsx(
|
|
47
|
+
}), /*#__PURE__*/_jsx(Select.Option, {
|
|
67
48
|
value: 2,
|
|
68
49
|
children: "\u9009\u98792"
|
|
69
50
|
})]
|
|
70
51
|
})
|
|
71
52
|
}), /*#__PURE__*/_jsx("p", {
|
|
72
|
-
children: /*#__PURE__*/_jsxs(
|
|
73
|
-
children: [/*#__PURE__*/_jsx(
|
|
53
|
+
children: /*#__PURE__*/_jsxs(Radio.Group, {
|
|
54
|
+
children: [/*#__PURE__*/_jsx(Radio, {
|
|
74
55
|
value: 1,
|
|
75
56
|
children: "\u9009\u98791"
|
|
76
|
-
}), /*#__PURE__*/_jsx(
|
|
57
|
+
}), /*#__PURE__*/_jsx(Radio, {
|
|
77
58
|
value: 2,
|
|
78
59
|
children: "\u9009\u98792"
|
|
79
60
|
})]
|
|
80
61
|
})
|
|
81
62
|
}), /*#__PURE__*/_jsx("p", {
|
|
82
|
-
children: /*#__PURE__*/_jsxs(
|
|
83
|
-
children: [/*#__PURE__*/_jsx(
|
|
63
|
+
children: /*#__PURE__*/_jsxs(Checkbox.Group, {
|
|
64
|
+
children: [/*#__PURE__*/_jsx(Checkbox, {
|
|
84
65
|
value: 1,
|
|
85
66
|
children: "\u9009\u98791"
|
|
86
|
-
}), /*#__PURE__*/_jsx(
|
|
67
|
+
}), /*#__PURE__*/_jsx(Checkbox, {
|
|
87
68
|
value: 2,
|
|
88
69
|
children: "\u9009\u98792"
|
|
89
70
|
})]
|
|
90
71
|
})
|
|
91
72
|
}), /*#__PURE__*/_jsx("p", {
|
|
92
|
-
children: /*#__PURE__*/_jsx(
|
|
73
|
+
children: /*#__PURE__*/_jsx(DatePicker, {
|
|
93
74
|
getPopupContainer: function getPopupContainer() {
|
|
94
75
|
return ref.current;
|
|
95
76
|
}
|
|
96
77
|
})
|
|
97
78
|
}), /*#__PURE__*/_jsx("p", {
|
|
98
|
-
children: /*#__PURE__*/_jsx(
|
|
79
|
+
children: /*#__PURE__*/_jsx(DatePicker.RangePicker, {
|
|
99
80
|
getPopupContainer: function getPopupContainer() {
|
|
100
81
|
return ref.current;
|
|
101
82
|
}
|
|
102
83
|
})
|
|
103
84
|
}), /*#__PURE__*/_jsx("p", {
|
|
104
|
-
children: /*#__PURE__*/_jsx(
|
|
85
|
+
children: /*#__PURE__*/_jsx(Pagination, {
|
|
105
86
|
total: 100
|
|
106
87
|
})
|
|
107
88
|
}), /*#__PURE__*/_jsxs("p", {
|
|
108
|
-
children: [/*#__PURE__*/_jsx(
|
|
89
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
109
90
|
children: "\u6309\u94AE1"
|
|
110
91
|
}), /*#__PURE__*/_jsx("span", {
|
|
111
92
|
style: {
|
|
112
93
|
paddingRight: 10
|
|
113
94
|
}
|
|
114
|
-
}), /*#__PURE__*/_jsx(
|
|
95
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
115
96
|
type: "primary",
|
|
116
97
|
children: "\u6309\u94AE2"
|
|
117
98
|
})]
|
|
118
99
|
}), /*#__PURE__*/_jsx("p", {
|
|
119
|
-
children: /*#__PURE__*/_jsx(
|
|
100
|
+
children: /*#__PURE__*/_jsx(Table, {
|
|
120
101
|
columns: [{
|
|
121
102
|
title: '姓名',
|
|
122
103
|
dataIndex: 'name'
|
package/es/ThemeAntd/index.js
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
import { ConfigProvider } from 'antd';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import "./index.less";
|
|
3
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export default function ThemeAntd(_ref) {
|
|
6
6
|
var children = _ref.children;
|
|
7
|
-
return /*#__PURE__*/_jsx(
|
|
7
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
8
|
+
theme: {
|
|
9
|
+
token: {
|
|
10
|
+
colorBgBase: '#1d4788',
|
|
11
|
+
colorTextBase: '#fff',
|
|
12
|
+
colorBgContainer: '#1d4788',
|
|
13
|
+
colorBgElevated: '#2a64bc',
|
|
14
|
+
controlItemBgActive: '#1d4788',
|
|
15
|
+
// 表单选中颜色
|
|
16
|
+
colorPrimary: 'orange',
|
|
17
|
+
// 主色
|
|
18
|
+
controlOutline: 'transparent' // 表单阴影
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
},
|
|
8
22
|
children: children
|
|
9
23
|
});
|
|
10
24
|
}
|
package/es/ThemeAntd/index.less
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
@import url('./style/button.less');
|
|
2
|
-
@import url('./style/checkbox.less');
|
|
3
|
-
@import url('./style/form.less');
|
|
4
|
-
@import url('./style/input.less');
|
|
5
|
-
@import url('./style/pagination.less');
|
|
6
|
-
@import url('./style/picker.less');
|
|
7
|
-
@import url('./style/popover.less');
|
|
8
|
-
@import url('./style/radio.less');
|
|
9
|
-
@import url('./style/scrollbar.less');
|
|
10
|
-
@import url('./style/select.less');
|
|
11
|
-
@import url('./style/tree.less');
|
|
12
|
-
@import url('./style/table.less');
|
|
13
1
|
|
|
14
2
|
:root {
|
|
15
3
|
color: var(--color);
|
package/es/Timeout/index.js
CHANGED
|
@@ -61,9 +61,9 @@ function Timeout(_ref) {
|
|
|
61
61
|
|
|
62
62
|
if (!lockstatusRef.current && state.timelock - cuurentTimeRef.current > time * 1000 && !isIgnore) {
|
|
63
63
|
lockstatusRef.current = true;
|
|
64
|
-
onTimeout
|
|
64
|
+
onTimeout === null || onTimeout === void 0 ? void 0 : onTimeout();
|
|
65
65
|
setTimeout(function () {
|
|
66
|
-
|
|
66
|
+
lockstatusRef.current = false;
|
|
67
67
|
}, 1000);
|
|
68
68
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
69
|
|