@cloud-app-dev/vidc 2.0.0-alpha.18 → 2.0.0-alpha.21

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.
@@ -10,7 +10,7 @@ interface AppRedirectProps {
10
10
  * @description 重定向路径
11
11
  * @description -
12
12
  */
13
- to: H.LocationDescriptor<any>;
13
+ to: H.Location;
14
14
  }
15
15
  declare function AppRedirect({ path, to }: AppRedirectProps): JSX.Element;
16
16
  export default AppRedirect;
@@ -22,7 +22,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
22
22
  import TreeMode from '../Tree';
23
23
  import DynamicDeviceList from '../List/DynamicDeviceList';
24
24
  import DeviceList from '../List/DeviceList';
25
- import { uniq, uniqBy } from 'lodash-es';
25
+ import { uniq, uniqBy } from 'lodash';
26
26
  import TreeType from './TreeType';
27
27
  import "./index.css";
28
28
 
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import replace from 'lodash-es/replace';
3
- import escapeRegExp from 'lodash-es/escapeRegExp';
2
+ import { replace, escapeRegExp } from 'lodash';
4
3
  import "./index.css";
5
4
 
6
5
  function HighLevel(_ref) {
@@ -13,7 +13,7 @@ export function queryBSConfig() {
13
13
  case 0:
14
14
  _context.next = 2;
15
15
  return Service.http({
16
- url: '/api/system/config/web'
16
+ url: "/config/web.conf.json?".concat(Date.now())
17
17
  });
18
18
 
19
19
  case 2:
@@ -40,7 +40,7 @@ export function queryMicroApplicationList() {
40
40
  case 0:
41
41
  _context2.next = 2;
42
42
  return Service.http({
43
- url: "/api/app/list"
43
+ url: "/config/app.conf.json?".concat(Date.now())
44
44
  });
45
45
 
46
46
  case 2:
@@ -66,7 +66,7 @@ export function querySystemUpdate() {
66
66
  switch (_context3.prev = _context3.next) {
67
67
  case 0:
68
68
  return _context3.abrupt("return", Service.http({
69
- url: "/api/system/config/updateStatus?".concat(Date.now())
69
+ url: "/config/update.status.conf.json?".concat(Date.now())
70
70
  }));
71
71
 
72
72
  case 1:
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
+ import { InitDataType } from './utils';
2
3
  interface IInitialRequestProps {
3
4
  children: React.ReactNode;
4
5
  Spin?: React.ReactNode;
6
+ customInitialization?: () => Promise<InitDataType>;
5
7
  }
6
- declare function InitialRequest({ children, Spin }: IInitialRequestProps): JSX.Element;
8
+ declare function InitialRequest({ children, Spin, customInitialization }: IInitialRequestProps): JSX.Element;
7
9
  export default InitialRequest;
@@ -23,7 +23,8 @@ function InitialRequest(_ref) {
23
23
  var _this = this;
24
24
 
25
25
  var children = _ref.children,
26
- Spin = _ref.Spin;
26
+ Spin = _ref.Spin,
27
+ customInitialization = _ref.customInitialization;
27
28
 
28
29
  var _useContext = useContext(AppContext.Context),
29
30
  updateUser = _useContext.updateUser,
@@ -42,22 +43,23 @@ function InitialRequest(_ref) {
42
43
 
43
44
  var init = function init() {
44
45
  return __awaiter(_this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
45
- var _yield$initialization, userFeatures, operationInfo, systemFeatures, userInfo, themeConfig;
46
+ var fetchInitData, _yield$fetchInitData, userFeatures, operationInfo, systemFeatures, userInfo, themeConfig;
46
47
 
47
48
  return regeneratorRuntime.wrap(function _callee$(_context) {
48
49
  while (1) {
49
50
  switch (_context.prev = _context.next) {
50
51
  case 0:
51
- _context.next = 2;
52
- return initialization();
53
-
54
- case 2:
55
- _yield$initialization = _context.sent;
56
- userFeatures = _yield$initialization.userFeatures;
57
- operationInfo = _yield$initialization.operationInfo;
58
- systemFeatures = _yield$initialization.systemFeatures;
59
- userInfo = _yield$initialization.userInfo;
60
- themeConfig = _yield$initialization.themeConfig;
52
+ fetchInitData = customInitialization || initialization;
53
+ _context.next = 3;
54
+ return fetchInitData();
55
+
56
+ case 3:
57
+ _yield$fetchInitData = _context.sent;
58
+ userFeatures = _yield$fetchInitData.userFeatures;
59
+ operationInfo = _yield$fetchInitData.operationInfo;
60
+ systemFeatures = _yield$fetchInitData.systemFeatures;
61
+ userInfo = _yield$fetchInitData.userInfo;
62
+ themeConfig = _yield$fetchInitData.themeConfig;
61
63
  updateUser(userInfo);
62
64
  updateOperation(operationInfo);
63
65
  Config.registerFeatrueIds(userFeatures);
@@ -70,7 +72,7 @@ function InitialRequest(_ref) {
70
72
 
71
73
  _BASE_DATA_INIT = true;
72
74
 
73
- case 15:
75
+ case 16:
74
76
  case "end":
75
77
  return _context.stop();
76
78
  }
@@ -1,9 +1,10 @@
1
1
  import { UserInfoType, OperationInfoType } from '../AppContext/interface';
2
2
  import { FeatureItemType, ThemeInfoType } from '../Config/interface';
3
- export declare function initialization(): Promise<{
3
+ export declare type InitDataType = {
4
4
  userInfo: UserInfoType;
5
5
  userFeatures: string[];
6
6
  systemFeatures: FeatureItemType[];
7
7
  operationInfo: OperationInfoType;
8
8
  themeConfig: ThemeInfoType;
9
- }>;
9
+ };
10
+ export declare function initialization(): Promise<InitDataType>;
@@ -1,3 +1,3 @@
1
1
  import type { History } from 'history';
2
- declare const InstanceHistory: History<unknown>;
2
+ declare const InstanceHistory: History;
3
3
  export default InstanceHistory;
@@ -23,7 +23,7 @@ import Tools from './component/Tools';
23
23
  import DrawRect from './component/DrawRect';
24
24
  import WheelScale from './component/WheelScale';
25
25
  import DefaultRects from './component/DefaultRects';
26
- import isFunction from 'lodash-es/isFunction';
26
+ import { isFunction } from 'lodash';
27
27
  import "./index.css";
28
28
 
29
29
  function Picture(_a) {
@@ -1,4 +1,4 @@
1
- import cloneDeep from 'lodash-es/cloneDeep';
1
+ import { cloneDeep } from 'lodash';
2
2
  export function customContextMenu(e) {
3
3
  e.preventDefault();
4
4
  return false;
@@ -24,10 +24,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
24
24
  import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
25
25
  import api from '../Api';
26
26
  import TreeMode from '../Tree';
27
- import uniq from 'lodash-es/uniq';
28
- import intersectionWith from 'lodash-es/intersectionWith';
29
- import uniqBy from 'lodash-es/uniqBy';
30
- import differenceWith from 'lodash-es/differenceWith';
27
+ import { uniq, intersectionWith, uniqBy, differenceWith } from 'lodash';
31
28
  import IconFont from '../IconFont';
32
29
  import useHttp from '../useHttp';
33
30
  import ListExt from '../List/ListExt';
@@ -19,7 +19,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
19
 
20
20
  import { __awaiter } from "tslib";
21
21
  import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
22
- import replace from 'lodash-es/replace';
22
+ import { replace } from 'lodash';
23
23
  import chroma from 'chroma-js';
24
24
  import UserSelectModalContent from './UserSelectModalContent';
25
25
  import RefModal from '../../RefModal';
@@ -25,7 +25,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
25
 
26
26
  import React, { useCallback, useEffect, useState } from 'react';
27
27
  import Box from '../../Box';
28
- import cloneDeep from 'lodash-es/cloneDeep';
28
+ import { cloneDeep } from 'lodash';
29
29
 
30
30
  function FormAuth(_ref) {
31
31
  var form = _ref.form,
@@ -19,7 +19,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
19
 
20
20
  import { __awaiter } from "tslib";
21
21
  import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
22
- import replace from 'lodash-es/replace';
22
+ import { replace } from 'lodash';
23
23
  import chroma from 'chroma-js';
24
24
  import GroupSelectModalContent from './GroupSelectModalContent';
25
25
  import IconFont from '../../IconFont';
@@ -23,8 +23,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
23
  import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
24
24
  import api from '../../Api';
25
25
  import TreeMode from '../../Tree';
26
- import uniq from 'lodash-es/uniq';
27
- import intersectionWith from 'lodash-es/intersectionWith';
26
+ import { uniq, intersectionWith } from 'lodash';
28
27
  import useHttp from '../../useHttp';
29
28
  import { formatRenderGroup } from './utils';
30
29
  import GroupList from './GroupList';
@@ -21,7 +21,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
21
 
22
22
  import { __awaiter } from "tslib";
23
23
  import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
24
- import replace from 'lodash-es/replace';
24
+ import { replace } from 'lodash';
25
25
  import chroma from 'chroma-js';
26
26
  import GroupSelectModalContent from './GroupSelectModalContent';
27
27
  import { formatRenderGroup, ToUpperNumberString } from './utils';
@@ -21,7 +21,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
21
 
22
22
  import { __awaiter } from "tslib";
23
23
  import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
24
- import replace from 'lodash-es/replace';
24
+ import { replace } from 'lodash';
25
25
  import chroma from 'chroma-js';
26
26
  import UserSelectModalContent from './UserSelectModalContent';
27
27
  import GroupSelectModalContent from './GroupSelectModalContent';
@@ -19,7 +19,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
19
 
20
20
  import { __awaiter } from "tslib";
21
21
  import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
22
- import replace from 'lodash-es/replace';
22
+ import { replace } from 'lodash';
23
23
  import chroma from 'chroma-js';
24
24
  import UserSelectModalContent from './UserSelectModalContent';
25
25
  import RefModal from '../../RefModal';
@@ -22,10 +22,7 @@ import React, { useCallback, useMemo, useState, forwardRef, useImperativeHandle
22
22
  import api from '../../Api';
23
23
  import TreeMode from '../../Tree';
24
24
  import List from '../../List/ListExt';
25
- import uniq from 'lodash-es/uniq';
26
- import intersectionWith from 'lodash-es/intersectionWith';
27
- import uniqBy from 'lodash-es/uniqBy';
28
- import differenceWith from 'lodash-es/differenceWith';
25
+ import { uniq, uniqBy, differenceWith, intersectionWith } from 'lodash';
29
26
  import useHttp from '../../useHttp';
30
27
  var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalContent(_ref, ref) {
31
28
  var selectUsers = _ref.selectUsers;
@@ -17,7 +17,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
17
 
18
18
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
19
19
  import { UserSetOptions } from '../Nodes/Constants';
20
- import cloneDeep from 'lodash-es/cloneDeep';
20
+ import { cloneDeep } from 'lodash';
21
21
  import UsersHandleType from './UsersHandleType';
22
22
  import UserSelect from './UserSelect';
23
23
  import UserAndGroupSelect from './UserAndGroupSelect';
@@ -33,7 +33,7 @@ import ApproverForm from './Form/Approver';
33
33
  import ConditionForm from './Form/Condition';
34
34
  import NotifierForm from './Form/Notifier';
35
35
  import { TemplateConfig1 } from './template';
36
- import cloneDeep from 'lodash-es/cloneDeep';
36
+ import { cloneDeep } from 'lodash';
37
37
  import EndNode from './Nodes/End';
38
38
  import Render from './Nodes/Render';
39
39
  import Tools from './Tools';
@@ -10,7 +10,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
10
10
 
11
11
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
12
 
13
- import cloneDeep from 'lodash-es/cloneDeep';
13
+ import { cloneDeep } from 'lodash';
14
14
  import { getNodeById } from './XML/utils';
15
15
  export function getJAVATaskData(data) {
16
16
  var _a;
@@ -1,3 +1,3 @@
1
1
  import type { History } from 'history';
2
- declare function useHistory(): History<unknown>;
2
+ declare function useHistory(): History;
3
3
  export default useHistory;
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": "2.0.0-alpha.18",
5
+ "version": "2.0.0-alpha.21",
6
6
  "scripts": {
7
7
  "start": "dumi dev",
8
8
  "docs:build": "dumi build",
@@ -35,15 +35,15 @@
35
35
  "chroma-js": "^2.1.2",
36
36
  "fetch-like-axios": "^0.0.5",
37
37
  "immer": "^9.0.5",
38
- "lodash-es": "^4.17.21",
38
+ "lodash": "^4.17.21",
39
39
  "rc-queue-anim": "^2.0.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@cloud-app-dev/utils": "^3.0.3",
43
43
  "@types/add-dom-event-listener": "^1.1.0",
44
44
  "@types/chroma-js": "^2.1.3",
45
- "@types/lodash-es": "^4.17.5",
46
45
  "@types/node": "^17.0.5",
46
+ "@types/lodash": "^4.14.178",
47
47
  "@umijs/test": "^3.0.5",
48
48
  "antd": "^4.17.0",
49
49
  "babel-plugin-import": "^1.13.3",