@cloud-app-dev/vidc 1.0.47 → 2.0.0-alpha.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.
Files changed (108) hide show
  1. package/.umirc.ts +1 -1
  2. package/README.md +4 -0
  3. package/es/AppContext/Sync.d.ts +6 -0
  4. package/es/AppContext/Sync.js +47 -0
  5. package/es/AppContext/index.d.ts +10 -0
  6. package/es/AppContext/index.js +111 -0
  7. package/es/AppContext/interface.d.ts +29 -0
  8. package/es/AppContext/static.d.ts +6 -0
  9. package/es/AppContext/static.js +6 -0
  10. package/es/AutoExit/index.d.ts +1 -1
  11. package/es/RefDrawer/index.d.ts +2 -2
  12. package/es/RefModal/index.d.ts +2 -2
  13. package/es/TreeMode/index.js +1 -2
  14. package/es/WorkerFlow/Demo.js +1 -0
  15. package/es/WorkerFlow/Form/Condition.js +8 -8
  16. package/es/WorkerFlow/Form/GroupList.d.ts +2 -1
  17. package/es/WorkerFlow/Form/GroupList.js +3 -2
  18. package/es/WorkerFlow/Form/GroupSelectModalContent.js +4 -2
  19. package/es/WorkerFlow/Form/UserSet.js +1 -6
  20. package/es/WorkerFlow/Nodes/TitleElement.js +13 -6
  21. package/es/WorkerFlow/index.js +40 -8
  22. package/es/WorkerFlow/utils.js +1 -1
  23. package/es/index.d.ts +1 -8
  24. package/es/index.js +1 -8
  25. package/package.json +4 -4
  26. package/es/AppLayout/AppHeader/index.css +0 -4
  27. package/es/AppLayout/AppHeader/index.d.ts +0 -18
  28. package/es/AppLayout/AppHeader/index.js +0 -41
  29. package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.d.ts +0 -1
  30. package/es/AppLayout/AppHorizontalMenu/MenuEmptyBox.js +0 -10
  31. package/es/AppLayout/AppHorizontalMenu/SubGroup.d.ts +0 -9
  32. package/es/AppLayout/AppHorizontalMenu/SubGroup.js +0 -57
  33. package/es/AppLayout/AppHorizontalMenu/index.css +0 -152
  34. package/es/AppLayout/AppHorizontalMenu/index.d.ts +0 -13
  35. package/es/AppLayout/AppHorizontalMenu/index.js +0 -230
  36. package/es/AppLayout/AppInlineMenu/SubGroup.d.ts +0 -9
  37. package/es/AppLayout/AppInlineMenu/SubGroup.js +0 -34
  38. package/es/AppLayout/AppInlineMenu/index.css +0 -110
  39. package/es/AppLayout/AppInlineMenu/index.d.ts +0 -12
  40. package/es/AppLayout/AppInlineMenu/index.js +0 -194
  41. package/es/AppLayout/AppLogo/index.css +0 -74
  42. package/es/AppLayout/AppLogo/index.d.ts +0 -13
  43. package/es/AppLayout/AppLogo/index.js +0 -100
  44. package/es/AppLayout/AppTools/index.css +0 -0
  45. package/es/AppLayout/AppTools/index.d.ts +0 -8
  46. package/es/AppLayout/AppTools/index.js +0 -10
  47. package/es/AppLayout/FunctionPreview/index.css +0 -128
  48. package/es/AppLayout/FunctionPreview/index.d.ts +0 -22
  49. package/es/AppLayout/FunctionPreview/index.js +0 -218
  50. package/es/AppLayout/Header/ListenceRoute.d.ts +0 -5
  51. package/es/AppLayout/Header/ListenceRoute.js +0 -28
  52. package/es/AppLayout/Header/ModifyPassword/index.d.ts +0 -6
  53. package/es/AppLayout/Header/ModifyPassword/index.js +0 -201
  54. package/es/AppLayout/Header/ModifyUserAvatar/index.css +0 -21
  55. package/es/AppLayout/Header/ModifyUserAvatar/index.d.ts +0 -10
  56. package/es/AppLayout/Header/ModifyUserAvatar/index.js +0 -98
  57. package/es/AppLayout/Header/NotifyAlarm.js +0 -122
  58. package/es/AppLayout/Header/ThemeTools.js +0 -69
  59. package/es/AppLayout/Header/Tools.d.ts +0 -11
  60. package/es/AppLayout/Header/Tools.js +0 -86
  61. package/es/AppLayout/Header/ToolsItem.d.ts +0 -1
  62. package/es/AppLayout/Header/ToolsItem.js +0 -12
  63. package/es/AppLayout/Header/UserAction.d.ts +0 -10
  64. package/es/AppLayout/Header/UserAction.js +0 -224
  65. package/es/AppLayout/Header/index.css +0 -136
  66. package/es/AppLayout/Header/index.d.ts +0 -9
  67. package/es/AppLayout/Header/index.js +0 -36
  68. package/es/AppLayout/index.css +0 -21
  69. package/es/AppLayout/index.d.ts +0 -12
  70. package/es/AppLayout/index.js +0 -38
  71. package/es/AppLayout/service/index.js +0 -174
  72. package/es/AppLayout/service/prefix.js +0 -4
  73. package/es/AppLayout/service/url.js +0 -35
  74. package/es/AppLayout/utils/menu.js +0 -24
  75. package/es/AppLayout/utils.d.ts +0 -4
  76. package/es/AppLayout/utils.js +0 -112
  77. package/es/DagInitialConfig/index.css +0 -0
  78. package/es/DagInitialConfig/index.d.ts +0 -10
  79. package/es/DagInitialConfig/index.js +0 -70
  80. package/es/DagInitialConfig/utils.js +0 -185
  81. package/es/DagInitialRequest/index.css +0 -0
  82. package/es/DagInitialRequest/index.d.ts +0 -10
  83. package/es/DagInitialRequest/index.js +0 -77
  84. package/es/DagInitialRequest/utils.js +0 -573
  85. package/es/FormContent/index.css +0 -27
  86. package/es/FormContent/index.d.ts +0 -19
  87. package/es/FormContent/index.js +0 -58
  88. package/es/OrgTree/index.css +0 -39
  89. package/es/OrgTree/index.d.ts +0 -16
  90. package/es/OrgTree/index.js +0 -177
  91. package/es/OrgUserTree/demo.d.ts +0 -2
  92. package/es/OrgUserTree/demo.js +0 -20
  93. package/es/OrgUserTree/index.css +0 -31
  94. package/es/OrgUserTree/index.d.ts +0 -28
  95. package/es/OrgUserTree/index.js +0 -132
  96. package/es/PlaceTree/demo.d.ts +0 -2
  97. package/es/PlaceTree/demo.js +0 -20
  98. package/es/PlaceTree/index.css +0 -40
  99. package/es/PlaceTree/index.d.ts +0 -26
  100. package/es/PlaceTree/index.js +0 -175
  101. package/es/Upload/AntUpload/index.css +0 -22
  102. package/es/Upload/AntUpload/index.d.ts +0 -19
  103. package/es/Upload/AntUpload/index.js +0 -226
  104. package/es/Upload/UploadChildren/index.css +0 -28
  105. package/es/Upload/UploadChildren/index.js +0 -26
  106. package/es/Upload/index.css +0 -0
  107. package/es/Upload/index.d.ts +0 -9
  108. package/es/Upload/index.js +0 -7
@@ -1,185 +0,0 @@
1
- import _Service from "@cloud-app-dev/basic-components/es/Service";
2
-
3
- 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); } }
4
-
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); }); }; }
6
-
7
- export function formatAppConfig(appConfig) {
8
- var dataMap = {};
9
- appConfig.forEach(function (item) {
10
- var urls = item.url.split(',');
11
- dataMap[item.alias] = {
12
- id: item.id,
13
- name: item.alias,
14
- script: "".concat(urls[0], "?version=").concat(item.version),
15
- style: "".concat(urls[1], "?version=").concat(item.version),
16
- appTitle: item.name,
17
- appType: item.type,
18
- version: item.version,
19
- status: item.status,
20
- describe: item.describe,
21
- tag: item.tag,
22
- group: item.group
23
- };
24
- });
25
- return dataMap;
26
- }
27
- export function querySystemConfig() {
28
- return _querySystemConfig.apply(this, arguments);
29
- }
30
-
31
- function _querySystemConfig() {
32
- _querySystemConfig = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
33
- return regeneratorRuntime.wrap(function _callee$(_context) {
34
- while (1) {
35
- switch (_context.prev = _context.next) {
36
- case 0:
37
- return _context.abrupt("return", _Service.$http({
38
- url: "/micro-apps/micro-dep-librarys/config/systemConfig.json?".concat(Date.now()),
39
- requestId: 'systemConfig'
40
- }));
41
-
42
- case 1:
43
- case "end":
44
- return _context.stop();
45
- }
46
- }
47
- }, _callee);
48
- }));
49
- return _querySystemConfig.apply(this, arguments);
50
- }
51
-
52
- export function queryThemeConfig() {
53
- return _queryThemeConfig.apply(this, arguments);
54
- }
55
-
56
- function _queryThemeConfig() {
57
- _queryThemeConfig = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
58
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
59
- while (1) {
60
- switch (_context2.prev = _context2.next) {
61
- case 0:
62
- return _context2.abrupt("return", _Service.$http({
63
- url: "/micro-apps/micro-dep-librarys/config/themeConfig.json?".concat(Date.now()),
64
- requestId: 'themeConfig'
65
- }));
66
-
67
- case 1:
68
- case "end":
69
- return _context2.stop();
70
- }
71
- }
72
- }, _callee2);
73
- }));
74
- return _queryThemeConfig.apply(this, arguments);
75
- }
76
-
77
- export function queryMapConfig() {
78
- return _queryMapConfig.apply(this, arguments);
79
- }
80
-
81
- function _queryMapConfig() {
82
- _queryMapConfig = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
83
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
84
- while (1) {
85
- switch (_context3.prev = _context3.next) {
86
- case 0:
87
- return _context3.abrupt("return", _Service.$http({
88
- url: "/micro-apps/micro-dep-librarys/config/map.json?".concat(Date.now()),
89
- requestId: 'mapConfig'
90
- }));
91
-
92
- case 1:
93
- case "end":
94
- return _context3.stop();
95
- }
96
- }
97
- }, _callee3);
98
- }));
99
- return _queryMapConfig.apply(this, arguments);
100
- }
101
-
102
- export function queryMicroApplicationList() {
103
- return _queryMicroApplicationList.apply(this, arguments);
104
- }
105
-
106
- function _queryMicroApplicationList() {
107
- _queryMicroApplicationList = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
108
- var res;
109
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
110
- while (1) {
111
- switch (_context4.prev = _context4.next) {
112
- case 0:
113
- _context4.next = 2;
114
- return _Service.$http({
115
- url: "/api/micro/microApplication/v1/queryMicroApplicationList",
116
- requestId: 'appConfig'
117
- });
118
-
119
- case 2:
120
- res = _context4.sent;
121
- return _context4.abrupt("return", res.data);
122
-
123
- case 4:
124
- case "end":
125
- return _context4.stop();
126
- }
127
- }
128
- }, _callee4);
129
- }));
130
- return _queryMicroApplicationList.apply(this, arguments);
131
- }
132
-
133
- export function queryLogoConfig() {
134
- return _queryLogoConfig.apply(this, arguments);
135
- }
136
-
137
- function _queryLogoConfig() {
138
- _queryLogoConfig = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
139
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
140
- while (1) {
141
- switch (_context5.prev = _context5.next) {
142
- case 0:
143
- return _context5.abrupt("return", _Service.$http({
144
- url: "/micro-apps/micro-dep-librarys/config/logConfig.json?".concat(Date.now()),
145
- requestId: 'queryLogoConfig'
146
- }).catch(function () {
147
- return {};
148
- }));
149
-
150
- case 1:
151
- case "end":
152
- return _context5.stop();
153
- }
154
- }
155
- }, _callee5);
156
- }));
157
- return _queryLogoConfig.apply(this, arguments);
158
- }
159
-
160
- export function querySystemUpdate() {
161
- return _querySystemUpdate.apply(this, arguments);
162
- }
163
-
164
- function _querySystemUpdate() {
165
- _querySystemUpdate = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
166
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
167
- while (1) {
168
- switch (_context6.prev = _context6.next) {
169
- case 0:
170
- return _context6.abrupt("return", _Service.$http({
171
- url: "/micro-apps/micro-dep-librarys/config/systemUpdate.json?".concat(Date.now()),
172
- requestId: 'querySystemUpdate'
173
- }).catch(function () {
174
- return {};
175
- }));
176
-
177
- case 1:
178
- case "end":
179
- return _context6.stop();
180
- }
181
- }
182
- }, _callee6);
183
- }));
184
- return _querySystemUpdate.apply(this, arguments);
185
- }
File without changes
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
-
3
- export interface InitialRequestProps {
4
- children: React.ReactNode;
5
- Spin?: React.ReactNode;
6
- }
7
-
8
- declare const InitialRequest: React.StatelessComponent<InitialRequestProps>;
9
-
10
- export default InitialRequest;
@@ -1,77 +0,0 @@
1
- import _Store from "@cloud-app-dev/basic-components/es/Store";
2
-
3
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
-
5
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
-
7
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
-
9
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
-
11
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
-
13
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
-
15
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
-
17
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18
-
19
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
20
-
21
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
-
23
- import React, { useState, useEffect } from 'react';
24
- import { initialization, authFormat } from './utils';
25
- import "./index.css";
26
- var _BASE_DATA_INIT = false;
27
-
28
- function InitialRequest(_ref) {
29
- var children = _ref.children,
30
- Spin = _ref.Spin;
31
-
32
- var _useState = useState(false),
33
- _useState2 = _slicedToArray(_useState, 2),
34
- isInit = _useState2[0],
35
- setIsInit = _useState2[1];
36
-
37
- useEffect(function () {
38
- if (_BASE_DATA_INIT) {
39
- setIsInit(true);
40
- return;
41
- }
42
-
43
- initialization().then(function (res) {
44
- var userPrivileges = res.userPrivileges,
45
- allPrivileges = res.allPrivileges,
46
- centerPrivileges = res.centerPrivileges,
47
- centerInfo = res.centerInfo,
48
- systemInfo = res.systemInfo,
49
- userInfo = res.userInfo;
50
- var userRoles = (userPrivileges.data || []).map(function (item) {
51
- return item.functionCodes;
52
- }).flat();
53
-
54
- _Store.app.updateUserInfo(userInfo);
55
-
56
- _Store.app.updateAppInfo(centerInfo.data);
57
-
58
- _Store.app.updateSystemConfig(systemInfo.data);
59
-
60
- var userAuth = [].concat(authFormat(userRoles, centerPrivileges.data, userInfo.userType));
61
- var globalAuth = [].concat(authFormat([], allPrivileges.data, userInfo.userType));
62
-
63
- _Store.auth.initAuthData([].concat(_toConsumableArray(userAuth), _toConsumableArray(globalAuth)));
64
-
65
- _BASE_DATA_INIT = true;
66
- }).then(function () {
67
- return setIsInit(true);
68
- }).catch(function (e) {
69
- return console.error('接口初始化失败!', e);
70
- }); // eslint-disable-next-line react-hooks/exhaustive-deps
71
- }, []);
72
- return isInit ? children : Spin ? /*#__PURE__*/React.createElement(Spin, {
73
- spinning: true
74
- }) : null;
75
- }
76
-
77
- export default InitialRequest;