@cloud-app-dev/vidc 2.0.0-alpha.12 → 2.0.0-alpha.16

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 (93) hide show
  1. package/es/Api/index.js +7 -7
  2. package/es/AppContext/Sync.d.ts +1 -0
  3. package/es/AppRedirect/index.d.ts +1 -0
  4. package/es/AppRedirect/index.js +1 -2
  5. package/es/AppRoute/index.d.ts +2 -2
  6. package/es/AppRoute/index.js +41 -46
  7. package/es/AppRoute/interface.d.ts +1 -1
  8. package/es/AutoExit/index.js +11 -9
  9. package/es/CheckGroupFixed/index.d.ts +1 -0
  10. package/es/ConfigContext/index.d.ts +15 -2
  11. package/es/ConfigContext/index.js +25 -3
  12. package/es/DeviceSelect/TreeType.d.ts +1 -0
  13. package/es/DeviceSelect/demo.d.ts +1 -0
  14. package/es/DeviceSelect/index.d.ts +1 -0
  15. package/es/Dict/desc.js +3 -3
  16. package/es/Dict/utils.js +3 -3
  17. package/es/Drawer/Footer.d.ts +1 -0
  18. package/es/Drawer/index.d.ts +1 -0
  19. package/es/InitialConfig/utils.js +3 -3
  20. package/es/InitialRequest/utils.js +5 -5
  21. package/es/Input/index.d.ts +1 -0
  22. package/es/InstanceHistory/index.d.ts +3 -0
  23. package/es/InstanceHistory/index.js +9 -0
  24. package/es/List/CheckExt.d.ts +1 -0
  25. package/es/List/DynamicDeviceList/Demo.d.ts +1 -0
  26. package/es/List/DynamicDeviceList/index.d.ts +1 -0
  27. package/es/List/DynamicDeviceList/utils.js +1 -1
  28. package/es/List/VList/index.d.ts +1 -0
  29. package/es/List/index.d.ts +1 -0
  30. package/es/LoaderApp/index.js +0 -1
  31. package/es/Modal/index.d.ts +7 -6
  32. package/es/Picture/component/DefaultRects/RectInfo.d.ts +1 -0
  33. package/es/Picture/component/DefaultRects/index.d.ts +1 -0
  34. package/es/Picture/component/DrawRect/index.d.ts +1 -0
  35. package/es/Picture/component/MoveContent/index.js +3 -3
  36. package/es/Picture/component/RectMenu/index.d.ts +1 -0
  37. package/es/Picture/component/WheelScale/index.d.ts +1 -0
  38. package/es/Picture/index.d.ts +1 -0
  39. package/es/Progress/index.d.ts +1 -0
  40. package/es/RefDrawer/index.js +1 -1
  41. package/es/RefModal/index.js +1 -1
  42. package/es/Service/http.d.ts +6 -4
  43. package/es/Service/http.js +18 -14
  44. package/es/Service/index.d.ts +3 -3
  45. package/es/Service/index.js +7 -11
  46. package/es/Service/interface.d.ts +4 -9
  47. package/es/Service/middleware.d.ts +1 -1
  48. package/es/Tree/BaseTree/demo.d.ts +1 -0
  49. package/es/Tree/demo.d.ts +1 -0
  50. package/es/UserSelect/demo.d.ts +1 -0
  51. package/es/WorkerFlow/Form/Approver.d.ts +1 -0
  52. package/es/WorkerFlow/Form/Condition.d.ts +1 -0
  53. package/es/WorkerFlow/Form/EmptyUserSet.d.ts +1 -0
  54. package/es/WorkerFlow/Form/FormAuth.d.ts +1 -0
  55. package/es/WorkerFlow/Form/GroupList.d.ts +1 -0
  56. package/es/WorkerFlow/Form/GroupSelect.d.ts +1 -0
  57. package/es/WorkerFlow/Form/Handle.d.ts +1 -0
  58. package/es/WorkerFlow/Form/LevelGroupSelect.d.ts +1 -0
  59. package/es/WorkerFlow/Form/LevelGroupSelect.js +1 -1
  60. package/es/WorkerFlow/Form/Notifier.d.ts +1 -0
  61. package/es/WorkerFlow/Form/UserAndGroupSelect.d.ts +1 -0
  62. package/es/WorkerFlow/Form/UserSelect.d.ts +1 -0
  63. package/es/WorkerFlow/Form/UserSet.d.ts +1 -0
  64. package/es/WorkerFlow/Form/UsersHandleType.d.ts +1 -0
  65. package/es/WorkerFlow/Nodes/Add.d.ts +1 -0
  66. package/es/WorkerFlow/Nodes/AddOption.d.ts +1 -0
  67. package/es/WorkerFlow/Nodes/AddOptionList.d.ts +1 -0
  68. package/es/WorkerFlow/Nodes/Approver.d.ts +1 -0
  69. package/es/WorkerFlow/Nodes/Condition.d.ts +1 -0
  70. package/es/WorkerFlow/Nodes/End.d.ts +1 -0
  71. package/es/WorkerFlow/Nodes/Handle.d.ts +1 -0
  72. package/es/WorkerFlow/Nodes/Node.d.ts +1 -0
  73. package/es/WorkerFlow/Nodes/Notifier.d.ts +1 -0
  74. package/es/WorkerFlow/Nodes/Render.d.ts +1 -0
  75. package/es/WorkerFlow/Nodes/Start.d.ts +1 -0
  76. package/es/WorkerFlow/Nodes/TitleElement.d.ts +1 -0
  77. package/es/WorkerFlow/index.js +10 -6
  78. package/es/index.d.ts +2 -1
  79. package/es/index.js +2 -1
  80. package/es/useDrawer/index.js +1 -1
  81. package/es/useHistory/index.d.ts +3 -0
  82. package/es/useHistory/index.js +11 -0
  83. package/es/useHttp/index.js +1 -1
  84. package/es/useModal/index.js +1 -1
  85. package/package.json +5 -3
  86. package/tsconfig.json +1 -1
  87. package/es/Service/logger.d.ts +0 -3
  88. package/es/Service/logger.js +0 -13
  89. package/es/Service/utils.d.ts +0 -3
  90. package/es/Service/utils.js +0 -11
  91. package/es/useNavigate/index.css +0 -0
  92. package/es/useNavigate/index.d.ts +0 -4
  93. package/es/useNavigate/index.js +0 -14
package/es/Api/index.js CHANGED
@@ -2,7 +2,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
2
2
 
3
3
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4
4
 
5
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
5
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
6
 
7
7
  import { __awaiter } from "tslib";
8
8
  import Service from '../Service';
@@ -23,7 +23,7 @@ var Api = /*#__PURE__*/function () {
23
23
  switch (_context.prev = _context.next) {
24
24
  case 0:
25
25
  _context.next = 2;
26
- return Service.$http({
26
+ return Service.http({
27
27
  url: '/api/user/v1/organization/queryChildOrganizationsById',
28
28
  method: 'post',
29
29
  requestId: 'queryChildOrganizationsById',
@@ -60,7 +60,7 @@ var Api = /*#__PURE__*/function () {
60
60
  switch (_context2.prev = _context2.next) {
61
61
  case 0:
62
62
  _context2.next = 2;
63
- return Service.$http({
63
+ return Service.http({
64
64
  url: '/api/user/v1/queryUsers',
65
65
  method: 'post',
66
66
  requestId: 'queryUsers',
@@ -98,7 +98,7 @@ var Api = /*#__PURE__*/function () {
98
98
  switch (_context3.prev = _context3.next) {
99
99
  case 0:
100
100
  _context3.next = 2;
101
- return Service.$http({
101
+ return Service.http({
102
102
  url: "/api/user/v2/post/queryPostByOrgId/".concat(orgId),
103
103
  method: 'post',
104
104
  requestId: 'queryPostByOrgId',
@@ -128,7 +128,7 @@ var Api = /*#__PURE__*/function () {
128
128
  switch (_context4.prev = _context4.next) {
129
129
  case 0:
130
130
  _context4.next = 2;
131
- return Service.$http({
131
+ return Service.http({
132
132
  url: '/api/udm-api/DeviceBuzTree/queryList',
133
133
  method: 'post',
134
134
  requestId: 'getDeviceBzTree',
@@ -158,7 +158,7 @@ var Api = /*#__PURE__*/function () {
158
158
  switch (_context5.prev = _context5.next) {
159
159
  case 0:
160
160
  _context5.next = 2;
161
- return Service.$http({
161
+ return Service.http({
162
162
  url: '/api/udm-api/customDeviceGroup/queryList',
163
163
  method: 'post',
164
164
  requestId: 'customDeviceGroup',
@@ -188,7 +188,7 @@ var Api = /*#__PURE__*/function () {
188
188
  switch (_context6.prev = _context6.next) {
189
189
  case 0:
190
190
  _context6.next = 2;
191
- return Service.$http({
191
+ return Service.http({
192
192
  url: '/api/place/v1/getPlacesByHasDevice',
193
193
  method: 'post',
194
194
  requestId: 'getPlacesByHasDevice',
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { AppContextInterface } from './interface';
2
3
  interface ISyncProps {
3
4
  stateChange: (options: AppContextInterface) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as H from 'history';
2
3
  import './index.less';
3
4
  interface AppRedirectProps {
@@ -1,6 +1,5 @@
1
1
  import React, { useEffect } from 'react';
2
- import { useLocation } from 'react-router-dom';
3
- import useNavigate from '../useNavigate';
2
+ import { useLocation, useNavigate } from 'react-router-dom';
4
3
  import "./index.css";
5
4
 
6
5
  var getKey = function getKey() {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { IAppRouteProps } from './interface';
3
- declare class AppRoute extends React.PureComponent<IAppRouteProps, any> {
4
- private isRender;
3
+ declare class AppRoute extends React.Component<IAppRouteProps, any> {
4
+ static defaultProps: IAppRouteProps;
5
5
  constructor(props: IAppRouteProps);
6
6
  shouldComponentUpdate(props: IAppRouteProps): boolean;
7
7
  componentWillUnmount(): void;
@@ -1,16 +1,15 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
3
  import _cache from "@cloud-app-dev/utils/es/cache";
4
- import _useUnmount from "ahooks/es/useUnmount";
5
4
  import _useMount from "ahooks/es/useMount";
6
5
 
7
6
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
8
7
 
9
8
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
10
9
 
11
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
12
11
 
13
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
12
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
14
13
 
15
14
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
16
15
 
@@ -24,27 +23,23 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
24
23
 
25
24
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
25
 
26
+ import { __rest } from "tslib";
27
27
  import React from 'react';
28
- import { Route } from 'react-router-dom';
28
+ import { Route, Routes } from 'react-router-dom';
29
29
  var _global = window;
30
30
 
31
31
  function RenderSingleRoute(_ref) {
32
- var onMount = _ref.onMount,
33
- onUnmount = _ref.onUnmount;
32
+ var onMount = _ref.onMount;
34
33
 
35
34
  _useMount(function () {
36
35
  return onMount();
37
36
  });
38
37
 
39
- _useUnmount(function () {
40
- return onUnmount();
41
- });
42
-
43
38
  return /*#__PURE__*/React.createElement(React.Fragment, null);
44
39
  }
45
40
 
46
- var AppRoute = /*#__PURE__*/function (_React$PureComponent) {
47
- _inherits(AppRoute, _React$PureComponent);
41
+ var AppRoute = /*#__PURE__*/function (_React$Component) {
42
+ _inherits(AppRoute, _React$Component);
48
43
 
49
44
  var _super = _createSuper(AppRoute);
50
45
 
@@ -53,11 +48,9 @@ var AppRoute = /*#__PURE__*/function (_React$PureComponent) {
53
48
 
54
49
  _classCallCheck(this, AppRoute);
55
50
 
56
- _this = _super.call(this, props); //可能存在路由创建但是没有render 导致UI无法渲染
57
-
58
- _this.isRender = false;
51
+ _this = _super.call(this, props);
59
52
  _this.state = {
60
- isMatch: false
53
+ matchIndex: -1
61
54
  };
62
55
  return _this;
63
56
  }
@@ -65,11 +58,14 @@ var AppRoute = /*#__PURE__*/function (_React$PureComponent) {
65
58
  _createClass(AppRoute, [{
66
59
  key: "shouldComponentUpdate",
67
60
  value: function shouldComponentUpdate(props) {
68
- if (!_global._IS_RUN_MICRO_BASIC || !this.isRender || _global._IS_ALLOW_ROUTE_RENDER) {
69
- return true;
61
+ var tabId = props.currentId || _cache.getCache('currentTabKey', 'session');
62
+
63
+ if (_global._IS_RUN_MICRO_BASIC && tabId !== props.tabId) {
64
+ // 页签变化拦截
65
+ return false;
70
66
  }
71
67
 
72
- return (props.currentId || _cache.getCache('currentTabKey', 'session')) === props.tabId;
68
+ return true;
73
69
  }
74
70
  }, {
75
71
  key: "componentWillUnmount",
@@ -81,35 +77,34 @@ var AppRoute = /*#__PURE__*/function (_React$PureComponent) {
81
77
  value: function render() {
82
78
  var _this2 = this;
83
79
 
84
- var _this$props = this.props,
85
- element = _this$props.element,
86
- path = _this$props.path;
87
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Route, {
88
- path: path,
89
- element: /*#__PURE__*/React.createElement(RenderSingleRoute, {
90
- onMount: function onMount() {
91
- return _this2.setState({
92
- isMatch: true
93
- });
94
- },
95
- onUnmount: function onUnmount() {
96
- return _this2.setState({
97
- isMatch: false
98
- });
99
- }
100
- })
101
- }), this.state.isMatch && element, /*#__PURE__*/React.createElement(RenderSingleRoute, {
102
- onMount: function onMount() {
103
- return _this2.isRender = true;
104
- },
105
- onUnmount: function onUnmount() {
106
- return _this2.isRender = false;
107
- }
108
- }));
80
+ var matchIndex = this.state.matchIndex;
81
+
82
+ var _a = this.props,
83
+ _a$routes = _a.routes,
84
+ routes = _a$routes === void 0 ? [] : _a$routes,
85
+ props = __rest(_a, ["routes"]);
86
+
87
+ var component = matchIndex > -1 ? routes[matchIndex].element : undefined;
88
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Routes, null, routes.map(function (item, index) {
89
+ return /*#__PURE__*/React.createElement(Route, {
90
+ path: item.path,
91
+ key: item.path,
92
+ element: /*#__PURE__*/React.createElement(RenderSingleRoute, {
93
+ onMount: function onMount() {
94
+ return _this2.setState({
95
+ matchIndex: index
96
+ });
97
+ }
98
+ })
99
+ });
100
+ })), component && /*#__PURE__*/React.cloneElement(component, props));
109
101
  }
110
102
  }]);
111
103
 
112
104
  return AppRoute;
113
- }(React.PureComponent);
105
+ }(React.Component);
114
106
 
107
+ AppRoute.defaultProps = {
108
+ routes: []
109
+ };
115
110
  export default AppRoute;
@@ -1,7 +1,7 @@
1
1
  import * as H from 'history';
2
2
  import { RouteProps } from 'react-router-dom';
3
3
 
4
- export interface IAppRouteProps extends RouteProps, IAppRouteType {
4
+ export interface IAppRouteProps {
5
5
  routes?: RouteProps[];
6
6
  tabId?: string;
7
7
  currentId?: string;
@@ -1,6 +1,6 @@
1
- import _useMount from "ahooks/es/useMount";
2
- import React, { useContext } from 'react';
3
- import useNavigate from '../useNavigate';
1
+ import _nextTick from "@cloud-app-dev/utils/es/nextTick";
2
+ import React, { useContext, useEffect } from 'react';
3
+ import { useNavigate } from 'react-router-dom';
4
4
  import AppContext from '../AppContext';
5
5
 
6
6
  function AutoExit(_ref) {
@@ -10,12 +10,14 @@ function AutoExit(_ref) {
10
10
  loginStatus = _useContext.loginStatus;
11
11
 
12
12
  var navigate = useNavigate();
13
-
14
- _useMount(function () {
15
- !loginStatus && navigate('/login');
16
- });
17
-
18
- return /*#__PURE__*/React.createElement(React.Fragment, null, !loginStatus ? children : null);
13
+ useEffect(function () {
14
+ if (!loginStatus) {
15
+ _nextTick(function () {
16
+ return navigate('/login');
17
+ });
18
+ }
19
+ }, [loginStatus, navigate]);
20
+ return /*#__PURE__*/React.createElement(React.Fragment, null, loginStatus ? children : null);
19
21
  }
20
22
 
21
23
  export default AutoExit;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export interface SourceDictType {
3
4
  value?: string | number;
@@ -5,5 +5,18 @@ export interface IConfigContextProps {
5
5
  */
6
6
  root: HTMLElement;
7
7
  }
8
- declare const ConfigContext: React.Context<IConfigContextProps>;
9
- export default ConfigContext;
8
+ interface IProviderProps {
9
+ getContainer: () => HTMLElement;
10
+ children: React.ReactNode;
11
+ }
12
+ declare function Provider({ getContainer, children }: IProviderProps): JSX.Element;
13
+ declare namespace Provider {
14
+ var defaultProps: {
15
+ getContainer: () => HTMLElement;
16
+ };
17
+ }
18
+ declare const _default: {
19
+ Context: React.Context<IConfigContextProps>;
20
+ Provider: typeof Provider;
21
+ };
22
+ export default _default;
@@ -1,3 +1,25 @@
1
- import React from 'react';
2
- var ConfigContext = /*#__PURE__*/React.createContext(null);
3
- export default ConfigContext;
1
+ import React, { useMemo } from 'react';
2
+ var Context = /*#__PURE__*/React.createContext(null);
3
+
4
+ function Provider(_ref) {
5
+ var getContainer = _ref.getContainer,
6
+ children = _ref.children;
7
+ var root = useMemo(function () {
8
+ return getContainer();
9
+ }, [getContainer]);
10
+ return /*#__PURE__*/React.createElement(Context.Provider, {
11
+ value: {
12
+ root: root
13
+ }
14
+ }, children);
15
+ }
16
+
17
+ Provider.defaultProps = {
18
+ getContainer: function getContainer() {
19
+ return document.body;
20
+ }
21
+ };
22
+ export default {
23
+ Context: Context,
24
+ Provider: Provider
25
+ };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface ITreeTypeProps {
2
3
  mode: string;
3
4
  onChange: (mode: string) => void;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare function App(): JSX.Element;
2
3
  export default App;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DeviceItemType } from '../core';
2
3
  import './index.less';
3
4
  interface IDeviceSelectProps {
package/es/Dict/desc.js CHANGED
@@ -1,12 +1,12 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
4
 
5
5
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6
6
 
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
7
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
8
 
9
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
10
10
 
11
11
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
12
 
package/es/Dict/utils.js CHANGED
@@ -4,7 +4,7 @@ export function queryByTypeCode(typeCode) {
4
4
  var headers = {
5
5
  Authorization: _cache.getCache('token', 'session')
6
6
  };
7
- return Service.$http({
7
+ return Service.http({
8
8
  url: "/api/dictionary/v1/queryByTypeCode/".concat(typeCode),
9
9
  method: 'get',
10
10
  requestId: 'queryByTypeCode',
@@ -18,7 +18,7 @@ export function queryByTypeCodes() {
18
18
  var headers = {
19
19
  Authorization: _cache.getCache('token', 'session')
20
20
  };
21
- return Service.$http({
21
+ return Service.http({
22
22
  url: "/api/dictionary/v1/queryDictionaryListByCondition",
23
23
  method: 'post',
24
24
  requestId: 'queryByTypeCode',
@@ -30,7 +30,7 @@ export function queryByTypeCodes() {
30
30
  });
31
31
  }
32
32
  export function queryTypeCodes() {
33
- return Service.$http({
33
+ return Service.http({
34
34
  url: "/micro-apps/micro-dep-librarys/config/typeCodes.json",
35
35
  method: 'get',
36
36
  requestId: 'queryTypeCodes'
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IFooterProps } from './interface';
2
3
  import './index.less';
3
4
  declare function Footer({ onClose, cancelText, okText, onOk }: IFooterProps): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DrawerProps } from './interface';
2
3
  import './index.less';
3
4
  declare function ZVDrawer({ style, getContainer, onClose, className, onOk, cancelText, okText, children, ...props }: DrawerProps): JSX.Element;
@@ -12,7 +12,7 @@ export function queryBSConfig() {
12
12
  switch (_context.prev = _context.next) {
13
13
  case 0:
14
14
  _context.next = 2;
15
- return Service.$http({
15
+ return Service.http({
16
16
  url: '/api/system/config/web'
17
17
  });
18
18
 
@@ -39,7 +39,7 @@ export function queryMicroApplicationList() {
39
39
  switch (_context2.prev = _context2.next) {
40
40
  case 0:
41
41
  _context2.next = 2;
42
- return Service.$http({
42
+ return Service.http({
43
43
  url: "/api/app/list"
44
44
  });
45
45
 
@@ -65,7 +65,7 @@ export function querySystemUpdate() {
65
65
  while (1) {
66
66
  switch (_context3.prev = _context3.next) {
67
67
  case 0:
68
- return _context3.abrupt("return", Service.$http({
68
+ return _context3.abrupt("return", Service.http({
69
69
  url: "/api/system/config/updateStatus?".concat(Date.now())
70
70
  }));
71
71
 
@@ -28,7 +28,7 @@ export function initialization() {
28
28
  Authorization: _cache.getCache('token', 'session')
29
29
  };
30
30
  _context.next = 3;
31
- return Service.$http({
31
+ return Service.http({
32
32
  url: '/api/user/v1/getUserByToken',
33
33
  method: 'post',
34
34
  headers: headers
@@ -44,28 +44,28 @@ export function initialization() {
44
44
  systemFeatureUrl = "/api/system/".concat(systemId, "/list");
45
45
  themeConfigUrl = '/api/system/config/type';
46
46
  _context.next = 13;
47
- return Promise.all([Service.$http({
47
+ return Promise.all([Service.http({
48
48
  url: centerUrl,
49
49
  headers: headers,
50
50
  data: {
51
51
  id: systemId
52
52
  },
53
53
  method: 'post'
54
- }), Service.$http({
54
+ }), Service.http({
55
55
  url: userPrivilegesUrl,
56
56
  headers: headers,
57
57
  data: {
58
58
  id: userId
59
59
  },
60
60
  method: 'post'
61
- }), Service.$http({
61
+ }), Service.http({
62
62
  url: systemFeatureUrl,
63
63
  headers: headers,
64
64
  data: {
65
65
  id: systemId
66
66
  },
67
67
  method: 'get'
68
- }), Service.$http({
68
+ }), Service.http({
69
69
  url: themeConfigUrl,
70
70
  headers: headers,
71
71
  data: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InputProps } from 'antd';
2
3
  import './index.less';
3
4
  interface IInputProps extends Omit<InputProps, 'onChange'> {
@@ -0,0 +1,3 @@
1
+ import type { History } from 'history';
2
+ declare const InstanceHistory: History<unknown>;
3
+ export default InstanceHistory;
@@ -0,0 +1,9 @@
1
+ import { createBrowserHistory } from 'history';
2
+ var _global = window;
3
+
4
+ if (!_global._BSIC_HISTORY_) {
5
+ _global._BSIC_HISTORY_ = createBrowserHistory();
6
+ }
7
+
8
+ var InstanceHistory = _global._BSIC_HISTORY_;
9
+ export default InstanceHistory;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface ICheckExtProps {
2
3
  selectCount: number;
3
4
  count: number;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare function App(): JSX.Element;
2
3
  export default App;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IDynamicDeviceListProps } from './interface';
2
3
  import './index.less';
3
4
  declare function DynamicDeviceList({ onClick, checkedKeys, defaultCheckedIds, onChecked, params, title, onKeywordChange, limit, itemHeight }: IDynamicDeviceListProps): JSX.Element;
@@ -3,7 +3,7 @@ import Service from '../../Service';
3
3
  import { getHeader } from '../../utils';
4
4
  export function queryDeviceList() {
5
5
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6
- return Service.$http({
6
+ return Service.http({
7
7
  method: 'post',
8
8
  url: '/api/udm-api/device/queryList',
9
9
  requestId: 'queryDeviceList',
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface IVListProps<T> {
3
4
  data?: Array<T>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CheckListProps } from './interface';
2
3
  import './index.less';
3
4
  declare function List(props: CheckListProps<any>): JSX.Element;
@@ -108,7 +108,6 @@ function LoaderApp(_ref) {
108
108
  var props = Object.assign(Object.assign({}, appProps), {
109
109
  container: domRef.current
110
110
  });
111
- console.debug('执行更新!', appProps);
112
111
  loadedAppRef.current.update && loadedAppRef.current.update(props);
113
112
  }
114
113
  }, [appProps.currentId, appProps.tabId, appProps.updateTime]);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ModalProps } from './interface';
2
3
  import './index.less';
3
4
  declare function Modal({ children, className, style, getContainer, ...props }: ModalProps): JSX.Element;
@@ -6,12 +7,12 @@ declare namespace Modal {
6
7
  className: string;
7
8
  getContainer: boolean;
8
9
  };
9
- var info: import("antd/lib/modal/confirm").ModalFunc;
10
- var success: import("antd/lib/modal/confirm").ModalFunc;
11
- var error: import("antd/lib/modal/confirm").ModalFunc;
12
- var warn: import("antd/lib/modal/confirm").ModalFunc;
13
- var warning: import("antd/lib/modal/confirm").ModalFunc;
14
- var confirm: import("antd/lib/modal/confirm").ModalFunc;
10
+ var info;
11
+ var success;
12
+ var error;
13
+ var warn;
14
+ var warning;
15
+ var confirm;
15
16
  var destroyAll: () => void;
16
17
  }
17
18
  export default Modal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { RectType } from '../../interface';
2
3
  interface IRectInfoProps {
3
4
  item: RectType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { RectType } from '../../interface';
2
3
  import './index.less';
3
4
  interface IDefaultRectsProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MenuRectType } from '../../interface';
2
3
  import './index.less';
3
4
  interface IDrawRectProps {
@@ -1,12 +1,12 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
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
3
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
4
 
5
5
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
6
6
 
7
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
7
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
8
8
 
9
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
9
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
10
10
 
11
11
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
12
12
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  import { MenuRectType } from 'src/Picture/interface';
3
4
  interface IRectMenuProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface IWheelScaleProps {
2
3
  dom: HTMLElement;
3
4
  setScale: (scale: number) => void;