@zhubangyun/lowcode-core 5.12.91 → 5.12.161

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 (60) hide show
  1. package/es/components/load-materials/index.js +12 -12
  2. package/es/demo/index.js +8 -8
  3. package/es/utils/api/file-api.js +21 -21
  4. package/es/utils/api/form-api.d.ts +1 -1
  5. package/es/utils/api/form-api.js +38 -36
  6. package/es/utils/api/form-api.utils.js +5 -4
  7. package/es/utils/api/index.d.ts +1 -1
  8. package/es/utils/api/rest-api.js +116 -116
  9. package/es/utils/api/schema-api.js +5 -5
  10. package/es/utils/api/script-api.js +12 -12
  11. package/es/utils/api/user-info.js +7 -7
  12. package/es/utils/cache/index.js +14 -14
  13. package/es/utils/common/LoadPlugins.js +33 -33
  14. package/es/utils/common/SingletonInstanceMap.js +21 -21
  15. package/es/utils/designer/assets/assets.parse.js +15 -15
  16. package/es/utils/designer/assets/assets.typing.js +6 -0
  17. package/es/utils/designer/engine/index.js +23 -23
  18. package/es/utils/designer/index.js +7 -7
  19. package/es/utils/page/index.js +18 -18
  20. package/es/utils/page/page-form-data-manager-group.js +7 -4
  21. package/es/utils/page/page-form-data-manager.js +7 -4
  22. package/es/utils/page/page-form-group.js +6 -5
  23. package/es/utils/page/page-form.js +12 -11
  24. package/es/utils/page/page-layout.d.ts +2 -0
  25. package/es/utils/page/page-layout.js +14 -7
  26. package/es/utils/page/page-render.js +4 -4
  27. package/es/utils/page/page-show.js +3 -3
  28. package/es/utils/page/print-form.js +36 -36
  29. package/lib/components/load-materials/index.js +13 -14
  30. package/lib/demo/index.js +9 -10
  31. package/lib/index.js +1 -2
  32. package/lib/utils/api/file-api.js +21 -21
  33. package/lib/utils/api/form-api.d.ts +1 -1
  34. package/lib/utils/api/form-api.js +38 -36
  35. package/lib/utils/api/form-api.utils.js +5 -4
  36. package/lib/utils/api/index.d.ts +1 -1
  37. package/lib/utils/api/index.js +1 -2
  38. package/lib/utils/api/rest-api.js +116 -116
  39. package/lib/utils/api/schema-api.js +5 -5
  40. package/lib/utils/api/script-api.js +12 -12
  41. package/lib/utils/api/user-info.js +7 -7
  42. package/lib/utils/cache/index.js +14 -14
  43. package/lib/utils/common/LoadPlugins.js +33 -33
  44. package/lib/utils/common/SingletonInstanceMap.js +21 -21
  45. package/lib/utils/designer/assets/assets.parse.js +16 -17
  46. package/lib/utils/designer/assets/assets.typing.js +6 -0
  47. package/lib/utils/designer/engine/index.js +23 -23
  48. package/lib/utils/designer/index.js +7 -7
  49. package/lib/utils/index.js +1 -2
  50. package/lib/utils/page/index.js +18 -18
  51. package/lib/utils/page/page-form-data-manager-group.js +8 -6
  52. package/lib/utils/page/page-form-data-manager.js +8 -6
  53. package/lib/utils/page/page-form-group.js +7 -7
  54. package/lib/utils/page/page-form.js +13 -13
  55. package/lib/utils/page/page-layout.d.ts +2 -0
  56. package/lib/utils/page/page-layout.js +15 -9
  57. package/lib/utils/page/page-render.js +4 -4
  58. package/lib/utils/page/page-show.js +4 -5
  59. package/lib/utils/page/print-form.js +36 -36
  60. package/package.json +1 -1
@@ -28,25 +28,25 @@ export var BaseRestApi = /*#__PURE__*/function () {
28
28
  }
29
29
  var _proto = BaseRestApi.prototype;
30
30
  _proto.search = /*#__PURE__*/function () {
31
- var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
31
+ var _search = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
32
32
  var _this$handleRequestCo;
33
33
  var config;
34
- return _regeneratorRuntime.wrap(function _callee$(_context) {
34
+ return _regeneratorRuntime.wrap(function (_context) {
35
35
  while (1) switch (_context.prev = _context.next) {
36
36
  case 0:
37
37
  config = {
38
38
  params: params
39
39
  };
40
- _context.next = 3;
40
+ _context.next = 1;
41
41
  return (_this$handleRequestCo = this.handleRequestConfig) === null || _this$handleRequestCo === void 0 ? void 0 : _this$handleRequestCo.call(this, config);
42
- case 3:
43
- _context.next = 5;
42
+ case 1:
43
+ _context.next = 2;
44
44
  return this.request.get("", {
45
45
  params: params
46
46
  });
47
- case 5:
47
+ case 2:
48
48
  return _context.abrupt("return", _context.sent);
49
- case 6:
49
+ case 3:
50
50
  case "end":
51
51
  return _context.stop();
52
52
  }
@@ -66,36 +66,36 @@ export var BaseRestApi = /*#__PURE__*/function () {
66
66
  _proto.getById =
67
67
  /*#__PURE__*/
68
68
  function () {
69
- var _getById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id, options) {
69
+ var _getById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id, options) {
70
70
  var _this$handleRequestCo2;
71
71
  var config, res, _options$onError, _options$onSuccess;
72
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
72
+ return _regeneratorRuntime.wrap(function (_context2) {
73
73
  while (1) switch (_context2.prev = _context2.next) {
74
74
  case 0:
75
75
  config = {};
76
- _context2.next = 3;
76
+ _context2.next = 1;
77
77
  return (_this$handleRequestCo2 = this.handleRequestConfig) === null || _this$handleRequestCo2 === void 0 ? void 0 : _this$handleRequestCo2.call(this, config);
78
- case 3:
79
- _context2.next = 5;
78
+ case 1:
79
+ _context2.next = 2;
80
80
  return this.request.get(String(id), config);
81
- case 5:
81
+ case 2:
82
82
  res = _context2.sent;
83
83
  if (res.success) {
84
- _context2.next = 12;
84
+ _context2.next = 4;
85
85
  break;
86
86
  }
87
87
  this.showError("\u83B7\u53D6{" + id + "}\u5931\u8D25!", res).then();
88
- _context2.next = 10;
88
+ _context2.next = 3;
89
89
  return options === null || options === void 0 ? void 0 : (_options$onError = options.onError) === null || _options$onError === void 0 ? void 0 : _options$onError.call(options, res);
90
- case 10:
91
- _context2.next = 14;
90
+ case 3:
91
+ _context2.next = 5;
92
92
  break;
93
- case 12:
94
- _context2.next = 14;
93
+ case 4:
94
+ _context2.next = 5;
95
95
  return options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options, res);
96
- case 14:
96
+ case 5:
97
97
  return _context2.abrupt("return", res);
98
- case 15:
98
+ case 6:
99
99
  case "end":
100
100
  return _context2.stop();
101
101
  }
@@ -107,36 +107,36 @@ export var BaseRestApi = /*#__PURE__*/function () {
107
107
  return getById;
108
108
  }();
109
109
  _proto.save = /*#__PURE__*/function () {
110
- var _save = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, options) {
110
+ var _save = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, options) {
111
111
  var _this$handleRequestCo3;
112
112
  var config, res, _options$onError2, _options$onSuccess2;
113
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
113
+ return _regeneratorRuntime.wrap(function (_context3) {
114
114
  while (1) switch (_context3.prev = _context3.next) {
115
115
  case 0:
116
116
  config = {};
117
- _context3.next = 3;
117
+ _context3.next = 1;
118
118
  return (_this$handleRequestCo3 = this.handleRequestConfig) === null || _this$handleRequestCo3 === void 0 ? void 0 : _this$handleRequestCo3.call(this, config);
119
- case 3:
120
- _context3.next = 5;
119
+ case 1:
120
+ _context3.next = 2;
121
121
  return this.request.post("save", data, config);
122
- case 5:
122
+ case 2:
123
123
  res = _context3.sent;
124
124
  if (res.success) {
125
- _context3.next = 12;
125
+ _context3.next = 4;
126
126
  break;
127
127
  }
128
128
  this.showError("\u63D0\u4EA4\u5931\u8D25!", res).then();
129
- _context3.next = 10;
129
+ _context3.next = 3;
130
130
  return options === null || options === void 0 ? void 0 : (_options$onError2 = options.onError) === null || _options$onError2 === void 0 ? void 0 : _options$onError2.call(options, res);
131
- case 10:
132
- _context3.next = 14;
131
+ case 3:
132
+ _context3.next = 5;
133
133
  break;
134
- case 12:
135
- _context3.next = 14;
134
+ case 4:
135
+ _context3.next = 5;
136
136
  return options === null || options === void 0 ? void 0 : (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 ? void 0 : _options$onSuccess2.call(options, res);
137
- case 14:
137
+ case 5:
138
138
  return _context3.abrupt("return", res);
139
- case 15:
139
+ case 6:
140
140
  case "end":
141
141
  return _context3.stop();
142
142
  }
@@ -154,36 +154,36 @@ export var BaseRestApi = /*#__PURE__*/function () {
154
154
  _proto.create =
155
155
  /*#__PURE__*/
156
156
  function () {
157
- var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data, options) {
157
+ var _create = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(data, options) {
158
158
  var _this$handleRequestCo4;
159
159
  var config, res, _options$onError3, _options$onSuccess3;
160
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
160
+ return _regeneratorRuntime.wrap(function (_context4) {
161
161
  while (1) switch (_context4.prev = _context4.next) {
162
162
  case 0:
163
163
  config = {};
164
- _context4.next = 3;
164
+ _context4.next = 1;
165
165
  return (_this$handleRequestCo4 = this.handleRequestConfig) === null || _this$handleRequestCo4 === void 0 ? void 0 : _this$handleRequestCo4.call(this, config);
166
- case 3:
167
- _context4.next = 5;
166
+ case 1:
167
+ _context4.next = 2;
168
168
  return this.request.post("", data, config);
169
- case 5:
169
+ case 2:
170
170
  res = _context4.sent;
171
171
  if (res.success) {
172
- _context4.next = 12;
172
+ _context4.next = 4;
173
173
  break;
174
174
  }
175
175
  this.showError("\u65B0\u589E\u5931\u8D25!", res).then();
176
- _context4.next = 10;
176
+ _context4.next = 3;
177
177
  return options === null || options === void 0 ? void 0 : (_options$onError3 = options.onError) === null || _options$onError3 === void 0 ? void 0 : _options$onError3.call(options, res);
178
- case 10:
179
- _context4.next = 14;
178
+ case 3:
179
+ _context4.next = 5;
180
180
  break;
181
- case 12:
182
- _context4.next = 14;
181
+ case 4:
182
+ _context4.next = 5;
183
183
  return options === null || options === void 0 ? void 0 : (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 ? void 0 : _options$onSuccess3.call(options, res);
184
- case 14:
184
+ case 5:
185
185
  return _context4.abrupt("return", res);
186
- case 15:
186
+ case 6:
187
187
  case "end":
188
188
  return _context4.stop();
189
189
  }
@@ -201,42 +201,42 @@ export var BaseRestApi = /*#__PURE__*/function () {
201
201
  _proto.update =
202
202
  /*#__PURE__*/
203
203
  function () {
204
- var _update = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(id, data, options) {
204
+ var _update = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(id, data, options) {
205
205
  var _this$handleRequestCo5;
206
206
  var config, res, _options$onError4, _options$onSuccess4;
207
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
207
+ return _regeneratorRuntime.wrap(function (_context5) {
208
208
  while (1) switch (_context5.prev = _context5.next) {
209
209
  case 0:
210
210
  config = {};
211
- _context5.next = 3;
211
+ _context5.next = 1;
212
212
  return (_this$handleRequestCo5 = this.handleRequestConfig) === null || _this$handleRequestCo5 === void 0 ? void 0 : _this$handleRequestCo5.call(this, config);
213
- case 3:
214
- _context5.next = 5;
213
+ case 1:
214
+ _context5.next = 2;
215
215
  return this.request.put(String(id), data, config);
216
- case 5:
216
+ case 2:
217
217
  res = _context5.sent;
218
218
  if (res.success) {
219
- _context5.next = 12;
219
+ _context5.next = 4;
220
220
  break;
221
221
  }
222
222
  this.showError("\u66F4\u65B0\u5931\u8D25!", res).then();
223
- _context5.next = 10;
223
+ _context5.next = 3;
224
224
  return options === null || options === void 0 ? void 0 : (_options$onError4 = options.onError) === null || _options$onError4 === void 0 ? void 0 : _options$onError4.call(options, res);
225
- case 10:
226
- _context5.next = 14;
225
+ case 3:
226
+ _context5.next = 5;
227
227
  break;
228
- case 12:
229
- _context5.next = 14;
228
+ case 4:
229
+ _context5.next = 5;
230
230
  return options === null || options === void 0 ? void 0 : (_options$onSuccess4 = options.onSuccess) === null || _options$onSuccess4 === void 0 ? void 0 : _options$onSuccess4.call(options, res);
231
- case 14:
231
+ case 5:
232
232
  return _context5.abrupt("return", res);
233
- case 15:
233
+ case 6:
234
234
  case "end":
235
235
  return _context5.stop();
236
236
  }
237
237
  }, _callee5, this);
238
238
  }));
239
- function update(_x8, _x9, _x10) {
239
+ function update(_x8, _x9, _x0) {
240
240
  return _update.apply(this, arguments);
241
241
  }
242
242
  return update;
@@ -248,57 +248,57 @@ export var BaseRestApi = /*#__PURE__*/function () {
248
248
  _proto.deleteById =
249
249
  /*#__PURE__*/
250
250
  function () {
251
- var _deleteById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id, options) {
251
+ var _deleteById = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(id, options) {
252
252
  var _this$handleRequestCo6;
253
253
  var config, res, _options$onError5, _options$onSuccess5;
254
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
254
+ return _regeneratorRuntime.wrap(function (_context6) {
255
255
  while (1) switch (_context6.prev = _context6.next) {
256
256
  case 0:
257
257
  config = {};
258
- _context6.next = 3;
258
+ _context6.next = 1;
259
259
  return (_this$handleRequestCo6 = this.handleRequestConfig) === null || _this$handleRequestCo6 === void 0 ? void 0 : _this$handleRequestCo6.call(this, config);
260
- case 3:
261
- _context6.next = 5;
260
+ case 1:
261
+ _context6.next = 2;
262
262
  return this.request["delete"](String(id), config);
263
- case 5:
263
+ case 2:
264
264
  res = _context6.sent;
265
265
  if (res.success) {
266
- _context6.next = 12;
266
+ _context6.next = 4;
267
267
  break;
268
268
  }
269
269
  this.showError("\u5220\u9664{" + id + "}\u5931\u8D25!", res).then();
270
- _context6.next = 10;
270
+ _context6.next = 3;
271
271
  return options === null || options === void 0 ? void 0 : (_options$onError5 = options.onError) === null || _options$onError5 === void 0 ? void 0 : _options$onError5.call(options, res);
272
- case 10:
273
- _context6.next = 14;
272
+ case 3:
273
+ _context6.next = 5;
274
274
  break;
275
- case 12:
276
- _context6.next = 14;
275
+ case 4:
276
+ _context6.next = 5;
277
277
  return options === null || options === void 0 ? void 0 : (_options$onSuccess5 = options.onSuccess) === null || _options$onSuccess5 === void 0 ? void 0 : _options$onSuccess5.call(options, res);
278
- case 14:
278
+ case 5:
279
279
  return _context6.abrupt("return", res);
280
- case 15:
280
+ case 6:
281
281
  case "end":
282
282
  return _context6.stop();
283
283
  }
284
284
  }, _callee6, this);
285
285
  }));
286
- function deleteById(_x11, _x12) {
286
+ function deleteById(_x1, _x10) {
287
287
  return _deleteById.apply(this, arguments);
288
288
  }
289
289
  return deleteById;
290
290
  }();
291
291
  _proto["delete"] = /*#__PURE__*/function () {
292
- var _delete2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(data, options) {
292
+ var _delete2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(data, options) {
293
293
  var _this$handleRequestCo7;
294
294
  var config, arrayData, idValue, res, _options$onError6, _options$onSuccess6;
295
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
295
+ return _regeneratorRuntime.wrap(function (_context7) {
296
296
  while (1) switch (_context7.prev = _context7.next) {
297
297
  case 0:
298
298
  config = {};
299
- _context7.next = 3;
299
+ _context7.next = 1;
300
300
  return (_this$handleRequestCo7 = this.handleRequestConfig) === null || _this$handleRequestCo7 === void 0 ? void 0 : _this$handleRequestCo7.call(this, config);
301
- case 3:
301
+ case 1:
302
302
  arrayData = [];
303
303
  idValue = transformerId(data);
304
304
  if (!Array.isArray(idValue)) {
@@ -310,51 +310,51 @@ export var BaseRestApi = /*#__PURE__*/function () {
310
310
  return !!item;
311
311
  });
312
312
  if (!(arrayData.length == 0)) {
313
- _context7.next = 9;
313
+ _context7.next = 2;
314
314
  break;
315
315
  }
316
316
  throw new Error("删除对象不可为空!");
317
- case 9:
318
- _context7.next = 11;
317
+ case 2:
318
+ _context7.next = 3;
319
319
  return this.request.post("remove", arrayData, config);
320
- case 11:
320
+ case 3:
321
321
  res = _context7.sent;
322
322
  if (res.success) {
323
- _context7.next = 18;
323
+ _context7.next = 5;
324
324
  break;
325
325
  }
326
326
  this.showError("\u5220\u9664\u5931\u8D25!", res).then();
327
- _context7.next = 16;
327
+ _context7.next = 4;
328
328
  return options === null || options === void 0 ? void 0 : (_options$onError6 = options.onError) === null || _options$onError6 === void 0 ? void 0 : _options$onError6.call(options, res);
329
- case 16:
330
- _context7.next = 20;
329
+ case 4:
330
+ _context7.next = 6;
331
331
  break;
332
- case 18:
333
- _context7.next = 20;
332
+ case 5:
333
+ _context7.next = 6;
334
334
  return options === null || options === void 0 ? void 0 : (_options$onSuccess6 = options.onSuccess) === null || _options$onSuccess6 === void 0 ? void 0 : _options$onSuccess6.call(options, res);
335
- case 20:
335
+ case 6:
336
336
  return _context7.abrupt("return", res);
337
- case 21:
337
+ case 7:
338
338
  case "end":
339
339
  return _context7.stop();
340
340
  }
341
341
  }, _callee7, this);
342
342
  }));
343
- function _delete(_x13, _x14) {
343
+ function _delete(_x11, _x12) {
344
344
  return _delete2.apply(this, arguments);
345
345
  }
346
346
  return _delete;
347
347
  }();
348
348
  _proto.showError = /*#__PURE__*/function () {
349
- var _showError = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(type, res) {
350
- var msg, props;
351
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
349
+ var _showError = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(type, res) {
350
+ var msg, props, _t;
351
+ return _regeneratorRuntime.wrap(function (_context8) {
352
352
  while (1) switch (_context8.prev = _context8.next) {
353
353
  case 0:
354
354
  msg = res.message;
355
355
  _context8.prev = 1;
356
356
  if (!msg) {
357
- _context8.next = 19;
357
+ _context8.next = 4;
358
358
  break;
359
359
  }
360
360
  props = JSON.parse(msg);
@@ -363,31 +363,31 @@ export var BaseRestApi = /*#__PURE__*/function () {
363
363
  props.title = "" + this.title + type;
364
364
  }
365
365
  if (!(props.type == "message")) {
366
- _context8.next = 11;
366
+ _context8.next = 2;
367
367
  break;
368
368
  }
369
369
  _message.error(props);
370
370
  return _context8.abrupt("return");
371
- case 11:
371
+ case 2:
372
372
  if (!(props.type == "modal")) {
373
- _context8.next = 16;
373
+ _context8.next = 3;
374
374
  break;
375
375
  }
376
376
  _Modal.error(props);
377
377
  return _context8.abrupt("return");
378
- case 16:
378
+ case 3:
379
379
  if (!(props.type == "notification")) {
380
- _context8.next = 19;
380
+ _context8.next = 4;
381
381
  break;
382
382
  }
383
383
  _notification.error(props);
384
384
  return _context8.abrupt("return");
385
- case 19:
386
- _context8.next = 25;
385
+ case 4:
386
+ _context8.next = 6;
387
387
  break;
388
- case 21:
389
- _context8.prev = 21;
390
- _context8.t0 = _context8["catch"](1);
388
+ case 5:
389
+ _context8.prev = 5;
390
+ _t = _context8["catch"](1);
391
391
  console.error("" + this.title + type + (msg || ""));
392
392
  _Modal.error({
393
393
  title: "" + this.title + type,
@@ -397,13 +397,13 @@ export var BaseRestApi = /*#__PURE__*/function () {
397
397
  message: res.message
398
398
  })
399
399
  });
400
- case 25:
400
+ case 6:
401
401
  case "end":
402
402
  return _context8.stop();
403
403
  }
404
- }, _callee8, this, [[1, 21]]);
404
+ }, _callee8, this, [[1, 5]]);
405
405
  }));
406
- function showError(_x15, _x16) {
406
+ function showError(_x13, _x14) {
407
407
  return _showError.apply(this, arguments);
408
408
  }
409
409
  return showError;
@@ -425,8 +425,8 @@ export var RestApi = /*#__PURE__*/function (_BaseRestApi2) {
425
425
  _inheritsLoose(RestApi, _BaseRestApi2);
426
426
  var _proto2 = RestApi.prototype;
427
427
  _proto2.handleRequestConfig = /*#__PURE__*/function () {
428
- var _handleRequestConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(config) {
429
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
428
+ var _handleRequestConfig = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(config) {
429
+ return _regeneratorRuntime.wrap(function (_context9) {
430
430
  while (1) switch (_context9.prev = _context9.next) {
431
431
  case 0:
432
432
  case "end":
@@ -434,7 +434,7 @@ export var RestApi = /*#__PURE__*/function (_BaseRestApi2) {
434
434
  }
435
435
  }, _callee9);
436
436
  }));
437
- function handleRequestConfig(_x17) {
437
+ function handleRequestConfig(_x15) {
438
438
  return _handleRequestConfig.apply(this, arguments);
439
439
  }
440
440
  return handleRequestConfig;
@@ -5,21 +5,21 @@ export function getSchema(_x, _x2) {
5
5
  return _getSchema.apply(this, arguments);
6
6
  }
7
7
  function _getSchema() {
8
- _getSchema = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(pageId, mock) {
8
+ _getSchema = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(pageId, mock) {
9
9
  var key;
10
- return _regeneratorRuntime.wrap(function _callee$(_context) {
10
+ return _regeneratorRuntime.wrap(function (_context) {
11
11
  while (1) switch (_context.prev = _context.next) {
12
12
  case 0:
13
13
  mock = getMock(mock);
14
14
  key = mock ? pageId + ":mock" : pageId;
15
- _context.next = 4;
15
+ _context.next = 1;
16
16
  return schema.getInstance(key, {
17
17
  mock: mock,
18
18
  pageId: pageId
19
19
  });
20
- case 4:
20
+ case 1:
21
21
  return _context.abrupt("return", _context.sent);
22
- case 5:
22
+ case 2:
23
23
  case "end":
24
24
  return _context.stop();
25
25
  }
@@ -5,17 +5,17 @@ export function loadDts() {
5
5
  return _loadDts.apply(this, arguments);
6
6
  }
7
7
  function _loadDts() {
8
- _loadDts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
9
- var api, res;
10
- return _regeneratorRuntime.wrap(function _callee$(_context) {
8
+ _loadDts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
9
+ var api, res, _t;
10
+ return _regeneratorRuntime.wrap(function (_context) {
11
11
  while (1) switch (_context.prev = _context.next) {
12
12
  case 0:
13
13
  _context.prev = 0;
14
- _context.next = 3;
14
+ _context.next = 1;
15
15
  return getFormApi("c40772eb-864b-42bb-ae31-9921d8ede97f");
16
- case 3:
16
+ case 1:
17
17
  api = _context.sent;
18
- _context.next = 6;
18
+ _context.next = 2;
19
19
  return api.search({
20
20
  pageSize: 1000,
21
21
  searchFields: [{
@@ -24,18 +24,18 @@ function _loadDts() {
24
24
  value: "dts"
25
25
  }]
26
26
  });
27
- case 6:
27
+ case 2:
28
28
  res = _context.sent;
29
29
  return _context.abrupt("return", res.data || []);
30
- case 10:
31
- _context.prev = 10;
32
- _context.t0 = _context["catch"](0);
30
+ case 3:
31
+ _context.prev = 3;
32
+ _t = _context["catch"](0);
33
33
  return _context.abrupt("return", []);
34
- case 13:
34
+ case 4:
35
35
  case "end":
36
36
  return _context.stop();
37
37
  }
38
- }, _callee, null, [[0, 10]]);
38
+ }, _callee, null, [[0, 3]]);
39
39
  }));
40
40
  return _loadDts.apply(this, arguments);
41
41
  }
@@ -6,9 +6,9 @@ export function getUserinfo() {
6
6
  return _getUserinfo.apply(this, arguments);
7
7
  }
8
8
  function _getUserinfo() {
9
- _getUserinfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
9
+ _getUserinfo = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
10
10
  var userinfo, cache, res;
11
- return _regeneratorRuntime.wrap(function _callee$(_context) {
11
+ return _regeneratorRuntime.wrap(function (_context) {
12
12
  while (1) switch (_context.prev = _context.next) {
13
13
  case 0:
14
14
  userinfo = null;
@@ -19,18 +19,18 @@ function _getUserinfo() {
19
19
  } catch (e) {}
20
20
  }
21
21
  if (userinfo) {
22
- _context.next = 8;
22
+ _context.next = 2;
23
23
  break;
24
24
  }
25
- _context.next = 6;
25
+ _context.next = 1;
26
26
  return apiRequest.get("auths/userinfo");
27
- case 6:
27
+ case 1:
28
28
  res = _context.sent;
29
29
  if (res.success) {
30
30
  sessionStorage.setItem(userinfoKey, JSON.stringify(res.data));
31
31
  userinfo = res.data;
32
32
  }
33
- case 8:
33
+ case 2:
34
34
  if (userinfo) {
35
35
  Object.defineProperty(window, "userinfo", {
36
36
  value: userinfo
@@ -40,7 +40,7 @@ function _getUserinfo() {
40
40
  });
41
41
  }
42
42
  return _context.abrupt("return", userinfo);
43
- case 10:
43
+ case 3:
44
44
  case "end":
45
45
  return _context.stop();
46
46
  }
@@ -11,28 +11,28 @@ export var SchemaCache = /*#__PURE__*/function (_SingletonInstanceMap) {
11
11
  _inheritsLoose(SchemaCache, _SingletonInstanceMap);
12
12
  var _proto = SchemaCache.prototype;
13
13
  _proto.createInstance = /*#__PURE__*/function () {
14
- var _createInstance = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(key, options) {
14
+ var _createInstance = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(key, options) {
15
15
  var mock, pageId, schemaRes, schema, permissionRes, permission;
16
- return _regeneratorRuntime.wrap(function _callee$(_context) {
16
+ return _regeneratorRuntime.wrap(function (_context) {
17
17
  while (1) switch (_context.prev = _context.next) {
18
18
  case 0:
19
19
  mock = options.mock, pageId = options.pageId;
20
- _context.next = 3;
20
+ _context.next = 1;
21
21
  return apiRequest.get("pages/" + pageId + "/schema", {
22
22
  params: {
23
23
  mock: mock
24
24
  }
25
25
  });
26
- case 3:
26
+ case 1:
27
27
  schemaRes = _context.sent;
28
28
  schema = schemaRes.data;
29
29
  if (!(typeof schema == "object")) {
30
- _context.next = 11;
30
+ _context.next = 3;
31
31
  break;
32
32
  }
33
- _context.next = 8;
33
+ _context.next = 2;
34
34
  return apiRequest.get("pages/" + pageId + "/permission");
35
- case 8:
35
+ case 2:
36
36
  permissionRes = _context.sent;
37
37
  permission = permissionRes.data;
38
38
  if (typeof permission == "object") {
@@ -41,10 +41,10 @@ export var SchemaCache = /*#__PURE__*/function (_SingletonInstanceMap) {
41
41
  child.props.permission = permission;
42
42
  });
43
43
  }
44
- case 11:
44
+ case 3:
45
45
  console.log("schemaRes", schemaRes);
46
46
  return _context.abrupt("return", schemaRes);
47
- case 13:
47
+ case 4:
48
48
  case "end":
49
49
  return _context.stop();
50
50
  }
@@ -71,9 +71,9 @@ export var FormApiCache = /*#__PURE__*/function (_SingletonInstanceMap2) {
71
71
  _inheritsLoose(FormApiCache, _SingletonInstanceMap2);
72
72
  var _proto2 = FormApiCache.prototype;
73
73
  _proto2.createInstance = /*#__PURE__*/function () {
74
- var _createInstance2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(key, options) {
74
+ var _createInstance2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(key, options) {
75
75
  var _options, formId, fieldId, mock, formApi;
76
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
76
+ return _regeneratorRuntime.wrap(function (_context2) {
77
77
  while (1) switch (_context2.prev = _context2.next) {
78
78
  case 0:
79
79
  if (options === void 0) {
@@ -81,11 +81,11 @@ export var FormApiCache = /*#__PURE__*/function (_SingletonInstanceMap2) {
81
81
  }
82
82
  _options = options, formId = _options.formId, fieldId = _options.fieldId, mock = _options.mock;
83
83
  formApi = new RestFormApi(formId, fieldId, mock);
84
- _context2.next = 5;
84
+ _context2.next = 1;
85
85
  return formApi.initialize();
86
- case 5:
86
+ case 1:
87
87
  return _context2.abrupt("return", formApi);
88
- case 6:
88
+ case 2:
89
89
  case "end":
90
90
  return _context2.stop();
91
91
  }