@byteluck-fe/model-driven-core-all 4.69.0-lx0 → 4.69.0-lx2

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/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # `runtime-all`
2
-
3
- > TODO: description
4
-
5
- ## Usage
6
-
7
- ```
8
- const runtimeAll = require('runtime-all');
9
-
10
- // TODO: DEMONSTRATE API
11
- ```
1
+ # `runtime-all`
2
+
3
+ > TODO: description
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ const runtimeAll = require('runtime-all');
9
+
10
+ // TODO: DEMONSTRATE API
11
+ ```
@@ -166,7 +166,7 @@ export function getHackerControl(comid, type, tipMessage) {
166
166
  }
167
167
  }
168
168
  },
169
- upgrade: function(schema) {
169
+ upgrade: function upgrade(schema) {
170
170
  return schema;
171
171
  }
172
172
  };
@@ -28,7 +28,7 @@ function _async_to_generator(fn) {
28
28
  };
29
29
  }
30
30
  function _ts_generator(thisArg, body) {
31
- var f, y, t, g, _ = {
31
+ var f, y, t, _ = {
32
32
  label: 0,
33
33
  sent: function() {
34
34
  if (t[0] & 1) throw t[1];
@@ -36,13 +36,17 @@ function _ts_generator(thisArg, body) {
36
36
  },
37
37
  trys: [],
38
38
  ops: []
39
- };
40
- return g = {
41
- next: verb(0),
42
- "throw": verb(1),
43
- "return": verb(2)
44
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
45
- return this;
39
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
40
+ return d(g, "next", {
41
+ value: verb(0)
42
+ }), d(g, "throw", {
43
+ value: verb(1)
44
+ }), d(g, "return", {
45
+ value: verb(2)
46
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
47
+ value: function() {
48
+ return this;
49
+ }
46
50
  }), g;
47
51
  function verb(n) {
48
52
  return function(v) {
@@ -54,7 +58,7 @@ function _ts_generator(thisArg, body) {
54
58
  }
55
59
  function step(op) {
56
60
  if (f) throw new TypeError("Generator is already executing.");
57
- while(_)try {
61
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
58
62
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
59
63
  if (y = 0, t) op = [
60
64
  op[0] & 2,
@@ -150,7 +154,7 @@ export function loadScriptFromTag(url, globalModules) {
150
154
  var resetHackWindow = hackWindow(globalModules);
151
155
  script.src = url;
152
156
  script.type = 'text/javascript';
153
- var loadEnd = function() {
157
+ var loadEnd = function loadEnd() {
154
158
  document.head.removeChild(script);
155
159
  var index = jobs.findIndex(function(j) {
156
160
  return j === p;
@@ -208,10 +212,7 @@ export function loadRemoteControl(url, globalModules) {
208
212
  return loadScriptFromFetch(url, globalModules);
209
213
  }
210
214
  export function loadRemoteControls(urls, globalModules) {
211
- return _loadRemoteControls.apply(this, arguments);
212
- }
213
- function _loadRemoteControls() {
214
- _loadRemoteControls = _async_to_generator(function(urls, globalModules) {
215
+ return _async_to_generator(function() {
215
216
  return _ts_generator(this, function(_state) {
216
217
  switch(_state.label){
217
218
  case 0:
@@ -228,6 +229,5 @@ function _loadRemoteControls() {
228
229
  ];
229
230
  }
230
231
  });
231
- });
232
- return _loadRemoteControls.apply(this, arguments);
232
+ })();
233
233
  }
@@ -28,7 +28,7 @@ function _async_to_generator(fn) {
28
28
  };
29
29
  }
30
30
  function _ts_generator(thisArg, body) {
31
- var f, y, t, g, _ = {
31
+ var f, y, t, _ = {
32
32
  label: 0,
33
33
  sent: function() {
34
34
  if (t[0] & 1) throw t[1];
@@ -36,13 +36,17 @@ function _ts_generator(thisArg, body) {
36
36
  },
37
37
  trys: [],
38
38
  ops: []
39
- };
40
- return g = {
41
- next: verb(0),
42
- "throw": verb(1),
43
- "return": verb(2)
44
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
45
- return this;
39
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
40
+ return d(g, "next", {
41
+ value: verb(0)
42
+ }), d(g, "throw", {
43
+ value: verb(1)
44
+ }), d(g, "return", {
45
+ value: verb(2)
46
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
47
+ value: function() {
48
+ return this;
49
+ }
46
50
  }), g;
47
51
  function verb(n) {
48
52
  return function(v) {
@@ -54,7 +58,7 @@ function _ts_generator(thisArg, body) {
54
58
  }
55
59
  function step(op) {
56
60
  if (f) throw new TypeError("Generator is already executing.");
57
- while(_)try {
61
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
58
62
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
59
63
  if (y = 0, t) op = [
60
64
  op[0] & 2,
@@ -124,12 +128,8 @@ function _ts_generator(thisArg, body) {
124
128
  }
125
129
  import { getHackerControl } from './getHackerControl';
126
130
  import { nativeFetch, loadRemoteControl } from './loadRemoteScripts';
127
- import { getLocaleText } from '@byteluck-fe/locale-message';
128
131
  export function registerByteluckControls(url, payload) {
129
- return _registerByteluckControls.apply(this, arguments);
130
- }
131
- function _registerByteluckControls() {
132
- _registerByteluckControls = _async_to_generator(function(url, payload) {
132
+ return _async_to_generator(function() {
133
133
  var version, byteluckControls, componentsStr, components, controls;
134
134
  return _ts_generator(this, function(_state) {
135
135
  switch(_state.label){
@@ -153,7 +153,7 @@ function _registerByteluckControls() {
153
153
  components = JSON.parse(componentsStr);
154
154
  return [
155
155
  4,
156
- loadRemoteControl("".concat(url, "/").concat(payload.type, ".js?v=").concat(version, "&").concat(payload.isPc === false ? 'mobile' : 'desktop'), payload.globalModules)
156
+ loadRemoteControl("".concat(url, "/").concat(payload.type, ".js?v=").concat(version), payload.globalModules)
157
157
  ];
158
158
  case 2:
159
159
  controls = _state.sent();
@@ -166,7 +166,7 @@ function _registerByteluckControls() {
166
166
  }
167
167
  });
168
168
  if (control === undefined) {
169
- control = getHackerControl(item.id, payload.type, getLocaleText('CMD.loadCtrlError', null, '内置组件加载错误'));
169
+ control = getHackerControl(item.id, payload.type, '内置组件加载错误');
170
170
  }
171
171
  byteluckControls.set(item.id, {
172
172
  props: item,
@@ -183,6 +183,5 @@ function _registerByteluckControls() {
183
183
  ];
184
184
  }
185
185
  });
186
- });
187
- return _registerByteluckControls.apply(this, arguments);
186
+ })();
188
187
  }
@@ -74,7 +74,7 @@ function _unsupported_iterable_to_array(o, minLen) {
74
74
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
75
75
  }
76
76
  function _ts_generator(thisArg, body) {
77
- var f, y, t, g, _ = {
77
+ var f, y, t, _ = {
78
78
  label: 0,
79
79
  sent: function() {
80
80
  if (t[0] & 1) throw t[1];
@@ -82,13 +82,17 @@ function _ts_generator(thisArg, body) {
82
82
  },
83
83
  trys: [],
84
84
  ops: []
85
- };
86
- return g = {
87
- next: verb(0),
88
- "throw": verb(1),
89
- "return": verb(2)
90
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
91
- return this;
85
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
86
+ return d(g, "next", {
87
+ value: verb(0)
88
+ }), d(g, "throw", {
89
+ value: verb(1)
90
+ }), d(g, "return", {
91
+ value: verb(2)
92
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
93
+ value: function() {
94
+ return this;
95
+ }
92
96
  }), g;
93
97
  function verb(n) {
94
98
  return function(v) {
@@ -100,7 +104,7 @@ function _ts_generator(thisArg, body) {
100
104
  }
101
105
  function step(op) {
102
106
  if (f) throw new TypeError("Generator is already executing.");
103
- while(_)try {
107
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
104
108
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
105
109
  if (y = 0, t) op = [
106
110
  op[0] & 2,
@@ -172,10 +176,7 @@ import { loadRemoteControl } from './loadRemoteScripts';
172
176
  import { warn } from '@byteluck-fe/model-driven-shared';
173
177
  import { getHackerControl } from './getHackerControl';
174
178
  export function registerCustomControls(componentList, components, refLibs, payload) {
175
- return _registerCustomControls.apply(this, arguments);
176
- }
177
- function _registerCustomControls() {
178
- _registerCustomControls = _async_to_generator(function(componentList, components, refLibs, payload) {
179
+ return _async_to_generator(function() {
179
180
  var registered;
180
181
  return _ts_generator(this, function(_state) {
181
182
  switch(_state.label){
@@ -190,8 +191,8 @@ function _registerCustomControls() {
190
191
  //qiyu 2022-4-18 逐个加载自定义组件,只有异常的组件加载为hackerControl
191
192
  return [
192
193
  4,
193
- Promise.all(components.map(/*#__PURE__*/ function() {
194
- var _ref = _async_to_generator(function(item) {
194
+ Promise.all(components.map(function(item) {
195
+ return _async_to_generator(function() {
195
196
  var isLoaded, control, url, e, link, reg, reg1, styleLink;
196
197
  return _ts_generator(this, function(_state) {
197
198
  switch(_state.label){
@@ -212,7 +213,7 @@ function _registerCustomControls() {
212
213
  } else {
213
214
  url = item.designer;
214
215
  }
215
- url += '?v=' + item.version + '&' + (payload.isPc === false ? 'mobile' : 'desktop');
216
+ url += '?v=' + item.version;
216
217
  return [
217
218
  4,
218
219
  loadRemoteControl(url, refLibs)
@@ -232,7 +233,6 @@ function _registerCustomControls() {
232
233
  case 3:
233
234
  e = _state.sent();
234
235
  isLoaded = false;
235
- // @i18n-translate-ignore
236
236
  warn('加载自定义控件异常,会影响到的控件:' + item.id, e);
237
237
  control = getHackerControl(item.id, payload.type, payload.tipMessage);
238
238
  return [
@@ -262,11 +262,8 @@ function _registerCustomControls() {
262
262
  ];
263
263
  }
264
264
  });
265
- });
266
- return function(item) {
267
- return _ref.apply(this, arguments);
268
- };
269
- }()))
265
+ })();
266
+ }))
270
267
  ];
271
268
  case 1:
272
269
  _state.sent();
@@ -292,8 +289,7 @@ function _registerCustomControls() {
292
289
  ];
293
290
  }
294
291
  });
295
- });
296
- return _registerCustomControls.apply(this, arguments);
292
+ })();
297
293
  }
298
294
  function pushControl(type, control, registered, isLoaded, props) {
299
295
  if (type === 'runtime') {