@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
@@ -1,44 +1,44 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
- 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); }
5
- 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; }
3
+ function _createForOfIteratorHelperLoose(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: !0 } : { done: !1, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
5
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
6
6
  var doc = document;
7
7
  export function loadPlugins(_x) {
8
8
  return _loadPlugins.apply(this, arguments);
9
9
  }
10
10
  function _loadPlugins() {
11
- _loadPlugins = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(plugins) {
11
+ _loadPlugins = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(plugins) {
12
12
  var _iterator, _step, plugin, _iterator2, _step2, _plugin;
13
- return _regeneratorRuntime.wrap(function _callee$(_context) {
13
+ return _regeneratorRuntime.wrap(function (_context) {
14
14
  while (1) switch (_context.prev = _context.next) {
15
15
  case 0:
16
16
  _iterator = _createForOfIteratorHelperLoose(plugins);
17
17
  case 1:
18
18
  if ((_step = _iterator()).done) {
19
- _context.next = 7;
19
+ _context.next = 3;
20
20
  break;
21
21
  }
22
22
  plugin = _step.value;
23
- _context.next = 5;
23
+ _context.next = 2;
24
24
  return loadStyle(plugin);
25
- case 5:
25
+ case 2:
26
26
  _context.next = 1;
27
27
  break;
28
- case 7:
28
+ case 3:
29
29
  _iterator2 = _createForOfIteratorHelperLoose(plugins);
30
- case 8:
30
+ case 4:
31
31
  if ((_step2 = _iterator2()).done) {
32
- _context.next = 14;
32
+ _context.next = 6;
33
33
  break;
34
34
  }
35
35
  _plugin = _step2.value;
36
- _context.next = 12;
36
+ _context.next = 5;
37
37
  return loadScript(_plugin);
38
- case 12:
39
- _context.next = 8;
38
+ case 5:
39
+ _context.next = 4;
40
40
  break;
41
- case 14:
41
+ case 6:
42
42
  case "end":
43
43
  return _context.stop();
44
44
  }
@@ -50,20 +50,20 @@ function loadStyle(_x2) {
50
50
  return _loadStyle.apply(this, arguments);
51
51
  }
52
52
  function _loadStyle() {
53
- _loadStyle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(src) {
54
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
53
+ _loadStyle = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(src) {
54
+ return _regeneratorRuntime.wrap(function (_context3) {
55
55
  while (1) switch (_context3.prev = _context3.next) {
56
56
  case 0:
57
57
  if (src.endsWith("css")) {
58
- _context3.next = 2;
58
+ _context3.next = 1;
59
59
  break;
60
60
  }
61
61
  return _context3.abrupt("return", true);
62
- case 2:
63
- return _context3.abrupt("return", new Promise( /*#__PURE__*/function () {
64
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(resolve) {
62
+ case 1:
63
+ return _context3.abrupt("return", new Promise(/*#__PURE__*/function () {
64
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(resolve) {
65
65
  var callback, target;
66
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
66
+ return _regeneratorRuntime.wrap(function (_context2) {
67
67
  while (1) switch (_context2.prev = _context2.next) {
68
68
  case 0:
69
69
  callback = function _callback(status) {
@@ -87,7 +87,7 @@ function _loadStyle() {
87
87
  } else {
88
88
  callback(true);
89
89
  }
90
- case 3:
90
+ case 1:
91
91
  case "end":
92
92
  return _context2.stop();
93
93
  }
@@ -97,7 +97,7 @@ function _loadStyle() {
97
97
  return _ref.apply(this, arguments);
98
98
  };
99
99
  }()));
100
- case 3:
100
+ case 2:
101
101
  case "end":
102
102
  return _context3.stop();
103
103
  }
@@ -109,20 +109,20 @@ function loadScript(_x3) {
109
109
  return _loadScript.apply(this, arguments);
110
110
  }
111
111
  function _loadScript() {
112
- _loadScript = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(src) {
113
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
112
+ _loadScript = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(src) {
113
+ return _regeneratorRuntime.wrap(function (_context5) {
114
114
  while (1) switch (_context5.prev = _context5.next) {
115
115
  case 0:
116
116
  if (src.endsWith("js")) {
117
- _context5.next = 2;
117
+ _context5.next = 1;
118
118
  break;
119
119
  }
120
120
  return _context5.abrupt("return", true);
121
- case 2:
122
- return _context5.abrupt("return", new Promise( /*#__PURE__*/function () {
123
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(resolve, reject) {
121
+ case 1:
122
+ return _context5.abrupt("return", new Promise(/*#__PURE__*/function () {
123
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(resolve, reject) {
124
124
  var callback, target;
125
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
125
+ return _regeneratorRuntime.wrap(function (_context4) {
126
126
  while (1) switch (_context4.prev = _context4.next) {
127
127
  case 0:
128
128
  callback = function _callback2(status) {
@@ -148,7 +148,7 @@ function _loadScript() {
148
148
  } else {
149
149
  callback(true);
150
150
  }
151
- case 3:
151
+ case 1:
152
152
  case "end":
153
153
  return _context4.stop();
154
154
  }
@@ -158,7 +158,7 @@ function _loadScript() {
158
158
  return _ref2.apply(this, arguments);
159
159
  };
160
160
  }()));
161
- case 3:
161
+ case 2:
162
162
  case "end":
163
163
  return _context5.stop();
164
164
  }
@@ -7,25 +7,25 @@ export var SingletonInstanceMap = /*#__PURE__*/function () {
7
7
  }
8
8
  var _proto = SingletonInstanceMap.prototype;
9
9
  _proto.getInstance = /*#__PURE__*/function () {
10
- var _getInstance = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(key, options) {
11
- var self, value;
12
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
10
+ var _getInstance = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(key, options) {
11
+ var self, value, _t;
12
+ return _regeneratorRuntime.wrap(function (_context2) {
13
13
  while (1) switch (_context2.prev = _context2.next) {
14
14
  case 0:
15
15
  self = this;
16
16
  if (!this.valueMap.has(key)) {
17
- _context2.next = 5;
17
+ _context2.next = 1;
18
18
  break;
19
19
  }
20
20
  return _context2.abrupt("return", Promise.resolve(this.valueMap.get(key)));
21
- case 5:
21
+ case 1:
22
22
  if (!this.lockMap.get(key)) {
23
- _context2.next = 9;
23
+ _context2.next = 2;
24
24
  break;
25
25
  }
26
26
  return _context2.abrupt("return", new Promise(function (resolve, reject) {
27
- setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
28
- return _regeneratorRuntime.wrap(function _callee$(_context) {
27
+ setTimeout(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
28
+ return _regeneratorRuntime.wrap(function (_context) {
29
29
  while (1) switch (_context.prev = _context.next) {
30
30
  case 0:
31
31
  resolve(self.getInstance(key, options));
@@ -36,29 +36,29 @@ export var SingletonInstanceMap = /*#__PURE__*/function () {
36
36
  }, _callee);
37
37
  })), 500);
38
38
  }));
39
- case 9:
40
- _context2.prev = 9;
39
+ case 2:
40
+ _context2.prev = 2;
41
41
  this.lockMap.set(key, true);
42
- _context2.next = 13;
42
+ _context2.next = 3;
43
43
  return this.createInstance(key, options);
44
- case 13:
44
+ case 3:
45
45
  value = _context2.sent;
46
46
  this.valueMap.set(key, value);
47
47
  this.lockMap.set(key, false);
48
48
  return _context2.abrupt("return", Promise.resolve(value));
49
- case 19:
50
- _context2.prev = 19;
51
- _context2.t0 = _context2["catch"](9);
52
- throw _context2.t0;
53
- case 22:
54
- _context2.prev = 22;
49
+ case 4:
50
+ _context2.prev = 4;
51
+ _t = _context2["catch"](2);
52
+ throw _t;
53
+ case 5:
54
+ _context2.prev = 5;
55
55
  this.lockMap.set(key, false);
56
- return _context2.finish(22);
57
- case 25:
56
+ return _context2.finish(5);
57
+ case 6:
58
58
  case "end":
59
59
  return _context2.stop();
60
60
  }
61
- }, _callee2, this, [[9, 19, 22, 25]]);
61
+ }, _callee2, this, [[2, 4, 5, 6]]);
62
62
  }));
63
63
  function getInstance(_x, _x2) {
64
64
  return _getInstance.apply(this, arguments);
@@ -26,9 +26,9 @@ export function assetsParse(_x) {
26
26
  return _assetsParse.apply(this, arguments);
27
27
  }
28
28
  function _assetsParse() {
29
- _assetsParse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(assets) {
29
+ _assetsParse = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(assets) {
30
30
  var rawComponents, packages, libraryAsset, libraryMap, packagesMap, assetLoader, newComponents, componentDescriptions, remoteComponentDescriptions, lowcodeComponentsArray, proCodeComponentsMap, genLowCodeComponentsMap, components, lowCodeComponents;
31
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
31
+ return _regeneratorRuntime.wrap(function (_context2) {
32
32
  while (1) switch (_context2.prev = _context2.next) {
33
33
  case 0:
34
34
  genLowCodeComponentsMap = function _genLowCodeComponents(components) {
@@ -62,12 +62,12 @@ function _assetsParse() {
62
62
  }
63
63
  });
64
64
  assetLoader = new AssetLoader();
65
- _context2.next = 9;
65
+ _context2.next = 1;
66
66
  return assetLoader.load(libraryAsset);
67
- case 9:
67
+ case 1:
68
68
  newComponents = rawComponents;
69
69
  if (!(rawComponents && rawComponents.length)) {
70
- _context2.next = 18;
70
+ _context2.next = 2;
71
71
  break;
72
72
  }
73
73
  componentDescriptions = [];
@@ -85,14 +85,14 @@ function _assetsParse() {
85
85
  newComponents = [].concat(componentDescriptions);
86
86
  // 如果有远程组件描述协议,则自动加载并补充到资产包中,同时出发 designer.incrementalAssetsReady 通知组件面板更新数据
87
87
  if (!(remoteComponentDescriptions && remoteComponentDescriptions.length)) {
88
- _context2.next = 18;
88
+ _context2.next = 2;
89
89
  break;
90
90
  }
91
- _context2.next = 18;
92
- return Promise.all(remoteComponentDescriptions.map( /*#__PURE__*/function () {
93
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(component) {
91
+ _context2.next = 2;
92
+ return Promise.all(remoteComponentDescriptions.map(/*#__PURE__*/function () {
93
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(component) {
94
94
  var exportName, url, npm, setAssetsComponent, setArrayAssets;
95
- return _regeneratorRuntime.wrap(function _callee$(_context) {
95
+ return _regeneratorRuntime.wrap(function (_context) {
96
96
  while (1) switch (_context.prev = _context.next) {
97
97
  case 0:
98
98
  setArrayAssets = function _setArrayAssets(value, preExportName, preSubName) {
@@ -134,9 +134,9 @@ function _assetsParse() {
134
134
  // assets.componentList = assets.componentList.concat(component.componentList || []);
135
135
  };
136
136
  exportName = component.exportName, url = component.url, npm = component.npm;
137
- _context.next = 5;
137
+ _context.next = 1;
138
138
  return new AssetLoader().load(url);
139
- case 5:
139
+ case 1:
140
140
  if (window[exportName]) {
141
141
  if (Array.isArray(window[exportName])) {
142
142
  setArrayAssets(window[exportName]);
@@ -145,7 +145,7 @@ function _assetsParse() {
145
145
  }
146
146
  }
147
147
  return _context.abrupt("return", window[exportName]);
148
- case 7:
148
+ case 2:
149
149
  case "end":
150
150
  return _context.stop();
151
151
  }
@@ -155,7 +155,7 @@ function _assetsParse() {
155
155
  return _ref.apply(this, arguments);
156
156
  };
157
157
  }()));
158
- case 18:
158
+ case 2:
159
159
  lowcodeComponentsArray = [];
160
160
  proCodeComponentsMap = newComponents.reduce(function (acc, cur) {
161
161
  if ((cur.devMode || '').toLowerCase() === 'lowcode') {
@@ -174,7 +174,7 @@ function _assetsParse() {
174
174
  return _context2.abrupt("return", {
175
175
  components: _extends({}, components, lowCodeComponents)
176
176
  });
177
- case 23:
177
+ case 3:
178
178
  case "end":
179
179
  return _context2.stop();
180
180
  }
@@ -22,7 +22,13 @@
22
22
  * 资源加载环境种类
23
23
  */
24
24
  export var LoadEnv = /*#__PURE__*/function (LoadEnv) {
25
+ /**
26
+ * 设计态
27
+ */
25
28
  LoadEnv["design"] = "design";
29
+ /**
30
+ * 运行态
31
+ */
26
32
  LoadEnv["runtime"] = "runtime";
27
33
  return LoadEnv;
28
34
  }({});
@@ -15,28 +15,28 @@ export var Engine = function Engine() {
15
15
  * 注入资产
16
16
  */
17
17
  this.injectAssets = /*#__PURE__*/function () {
18
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(types) {
18
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(types) {
19
19
  var assetsData, asserts, _yield$assetsParse, components;
20
- return _regeneratorRuntime.wrap(function _callee$(_context) {
20
+ return _regeneratorRuntime.wrap(function (_context) {
21
21
  while (1) switch (_context.prev = _context.next) {
22
22
  case 0:
23
23
  _this.assets.addDefaultAssets(types);
24
24
  assetsData = _this.assets.data; // @ts-ignore
25
- _context.next = 4;
25
+ _context.next = 1;
26
26
  return _this._engine.injectAssets(assetsData);
27
- case 4:
27
+ case 1:
28
28
  asserts = _context.sent;
29
- _context.next = 7;
29
+ _context.next = 2;
30
30
  return _this._engine.material.setAssets(asserts);
31
- case 7:
32
- _context.next = 9;
31
+ case 2:
32
+ _context.next = 3;
33
33
  return assetsParse(assetsData);
34
- case 9:
34
+ case 3:
35
35
  _yield$assetsParse = _context.sent;
36
36
  components = _yield$assetsParse.components;
37
37
  // @ts-ignore
38
38
  window.components = components;
39
- case 12:
39
+ case 4:
40
40
  case "end":
41
41
  return _context.stop();
42
42
  }
@@ -47,8 +47,8 @@ export var Engine = function Engine() {
47
47
  };
48
48
  }();
49
49
  this.loadIncrementalAssets = /*#__PURE__*/function () {
50
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(incrementalAssets) {
51
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
50
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(incrementalAssets) {
51
+ return _regeneratorRuntime.wrap(function (_context2) {
52
52
  while (1) switch (_context2.prev = _context2.next) {
53
53
  case 0:
54
54
  return _context2.abrupt("return", _this.material.loadIncrementalAssets(incrementalAssets));
@@ -63,8 +63,8 @@ export var Engine = function Engine() {
63
63
  };
64
64
  }();
65
65
  this.registerPlugin = /*#__PURE__*/function () {
66
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(pluginModel, options, registerOptions) {
67
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
66
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(pluginModel, options, registerOptions) {
67
+ return _regeneratorRuntime.wrap(function (_context3) {
68
68
  while (1) switch (_context3.prev = _context3.next) {
69
69
  case 0:
70
70
  return _context3.abrupt("return", _this.plugins.register(pluginModel, options, registerOptions));
@@ -84,11 +84,11 @@ export var Engine = function Engine() {
84
84
  * @param schema
85
85
  */
86
86
  this.init = /*#__PURE__*/function () {
87
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(container, schema) {
88
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
87
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(container, schema) {
88
+ return _regeneratorRuntime.wrap(function (_context4) {
89
89
  while (1) switch (_context4.prev = _context4.next) {
90
90
  case 0:
91
- _context4.next = 2;
91
+ _context4.next = 1;
92
92
  return _this._engine.init(container, {
93
93
  designMode: "design",
94
94
  enableCondition: true,
@@ -98,14 +98,14 @@ export var Engine = function Engine() {
98
98
  fetch: createFetchHandler()
99
99
  }
100
100
  });
101
- case 2:
101
+ case 1:
102
102
  if (!schema) {
103
- _context4.next = 5;
103
+ _context4.next = 2;
104
104
  break;
105
105
  }
106
- _context4.next = 5;
106
+ _context4.next = 2;
107
107
  return _this.openDocument(schema);
108
- case 5:
108
+ case 2:
109
109
  case "end":
110
110
  return _context4.stop();
111
111
  }
@@ -116,15 +116,15 @@ export var Engine = function Engine() {
116
116
  };
117
117
  }();
118
118
  this.openDocument = /*#__PURE__*/function () {
119
- var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(schema) {
120
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
119
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(schema) {
120
+ return _regeneratorRuntime.wrap(function (_context5) {
121
121
  while (1) switch (_context5.prev = _context5.next) {
122
122
  case 0:
123
123
  if (schema === void 0) {
124
124
  schema = {};
125
125
  }
126
126
  _this._engine.project.openDocument(schema);
127
- case 2:
127
+ case 1:
128
128
  case "end":
129
129
  return _context5.stop();
130
130
  }
@@ -7,26 +7,26 @@ export function initEngine() {
7
7
  return _initEngine.apply(this, arguments);
8
8
  }
9
9
  function _initEngine() {
10
- _initEngine = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
10
+ _initEngine = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
11
11
  var _window$AntdProMateri, _window$AntdProMateri2;
12
- return _regeneratorRuntime.wrap(function _callee$(_context) {
12
+ return _regeneratorRuntime.wrap(function (_context) {
13
13
  while (1) switch (_context.prev = _context.next) {
14
14
  case 0:
15
- _context.next = 2;
15
+ _context.next = 1;
16
16
  return loadPlugins(["next.min.js", "variables.css", "next.var.min.css",
17
17
  /* "react.production.min.js",
18
18
  "react-dom.production.min.js",*/
19
19
  "prop-types.js", "react15-polyfill.js", "lodash.min.js", "moment.min.js", "engine-core.css", "engine-core.js", "engine-ext.js", "engine-ext.css", "index.css", "index.js"].map(function (uri) {
20
20
  return "https://cdn.zhiyunhe.com/lowcode/designer/" + uri;
21
21
  }));
22
- case 2:
23
- _context.next = 4;
22
+ case 1:
23
+ _context.next = 2;
24
24
  return loadPlugins(["https://cdn.zhiyunhe.com/plugin/dayjs/dayjs.min.js", "https://cdn.zhiyunhe.com/plugin/antd/latest/reset.css", "https://cdn.zhiyunhe.com/plugin/antd/latest/antd.min.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js"]);
25
- case 4:
25
+ case 2:
26
26
  //注册setter
27
27
  (_window$AntdProMateri = window.AntdProMaterial) === null || _window$AntdProMateri === void 0 ? void 0 : (_window$AntdProMateri2 = _window$AntdProMateri.registerSetters) === null || _window$AntdProMateri2 === void 0 ? void 0 : _window$AntdProMateri2.call(_window$AntdProMateri);
28
28
  return _context.abrupt("return", new Engine());
29
- case 6:
29
+ case 3:
30
30
  case "end":
31
31
  return _context.stop();
32
32
  }
@@ -22,9 +22,9 @@ export function showLoading() {
22
22
  return _showLoading.apply(this, arguments);
23
23
  }
24
24
  function _showLoading() {
25
- _showLoading = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
25
+ _showLoading = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
26
26
  var loading, div;
27
- return _regeneratorRuntime.wrap(function _callee$(_context) {
27
+ return _regeneratorRuntime.wrap(function (_context) {
28
28
  while (1) switch (_context.prev = _context.next) {
29
29
  case 0:
30
30
  loading = document.getElementById("fullscreen-loading");
@@ -36,7 +36,7 @@ function _showLoading() {
36
36
  div.innerHTML = "\n <div class=\"atom-spinner\">\n <div class=\"spinner-inner\">\n <div class=\"spinner-line\"></div>\n <div class=\"spinner-line\"></div>\n <div class=\"spinner-line\"></div>\n <div class=\"spinner-circle\"></div>\n </div>\n </div>\n ";
37
37
  document.body.appendChild(div);
38
38
  }
39
- case 2:
39
+ case 1:
40
40
  case "end":
41
41
  return _context.stop();
42
42
  }
@@ -48,16 +48,16 @@ export function hideLoading() {
48
48
  return _hideLoading.apply(this, arguments);
49
49
  }
50
50
  function _hideLoading() {
51
- _hideLoading = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
51
+ _hideLoading = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
52
52
  var loading;
53
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
53
+ return _regeneratorRuntime.wrap(function (_context2) {
54
54
  while (1) switch (_context2.prev = _context2.next) {
55
55
  case 0:
56
56
  loading = document.getElementById("fullscreen-loading");
57
57
  if (loading) {
58
58
  loading.style.display = "none";
59
59
  }
60
- case 2:
60
+ case 1:
61
61
  case "end":
62
62
  return _context2.stop();
63
63
  }
@@ -69,33 +69,33 @@ export function openPage(_x, _x2) {
69
69
  return _openPage.apply(this, arguments);
70
70
  }
71
71
  function _openPage() {
72
- _openPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(url, target) {
72
+ _openPage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(url, target) {
73
73
  var _window$parent;
74
74
  var page, func;
75
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
75
+ return _regeneratorRuntime.wrap(function (_context3) {
76
76
  while (1) switch (_context3.prev = _context3.next) {
77
77
  case 0:
78
78
  // @ts-ignore
79
79
  func = (_window$parent = window.parent) === null || _window$parent === void 0 ? void 0 : _window$parent.openWorkPlatformTab;
80
80
  if (!func) {
81
- _context3.next = 7;
81
+ _context3.next = 2;
82
82
  break;
83
83
  }
84
- _context3.next = 4;
84
+ _context3.next = 1;
85
85
  return func({
86
86
  value: target,
87
87
  url: url
88
88
  });
89
- case 4:
89
+ case 1:
90
90
  page = _context3.sent;
91
- _context3.next = 8;
91
+ _context3.next = 3;
92
92
  break;
93
- case 7:
93
+ case 2:
94
94
  page = window.open(url, target);
95
- case 8:
95
+ case 3:
96
96
  console.debug("openPage", page, target);
97
97
  return _context3.abrupt("return", page);
98
- case 10:
98
+ case 4:
99
99
  case "end":
100
100
  return _context3.stop();
101
101
  }
@@ -107,10 +107,10 @@ export function closePage(_x3, _x4) {
107
107
  return _closePage.apply(this, arguments);
108
108
  }
109
109
  function _closePage() {
110
- _closePage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(url, target) {
110
+ _closePage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(url, target) {
111
111
  var _window$parent2;
112
112
  var func;
113
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
113
+ return _regeneratorRuntime.wrap(function (_context4) {
114
114
  while (1) switch (_context4.prev = _context4.next) {
115
115
  case 0:
116
116
  // @ts-ignore
@@ -123,7 +123,7 @@ function _closePage() {
123
123
  } else {
124
124
  window.close();
125
125
  }
126
- case 2:
126
+ case 1:
127
127
  case "end":
128
128
  return _context4.stop();
129
129
  }
@@ -14,9 +14,9 @@ export function showFormDataManagerGroup(_x) {
14
14
  return _showFormDataManagerGroup.apply(this, arguments);
15
15
  }
16
16
  function _showFormDataManagerGroup() {
17
- _showFormDataManagerGroup = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
17
+ _showFormDataManagerGroup = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
18
18
  var container, onClose, props;
19
- return _regeneratorRuntime.wrap(function _callee$(_context) {
19
+ return _regeneratorRuntime.wrap(function (_context) {
20
20
  while (1) switch (_context.prev = _context.next) {
21
21
  case 0:
22
22
  container = options.container, onClose = options.onClose, props = _objectWithoutPropertiesLoose(options, _excluded2);
@@ -28,7 +28,7 @@ function _showFormDataManagerGroup() {
28
28
  props: props
29
29
  }
30
30
  }));
31
- case 2:
31
+ case 1:
32
32
  case "end":
33
33
  return _context.stop();
34
34
  }
@@ -72,9 +72,12 @@ var FormDataManagerRender = /*#__PURE__*/function (_Component) {
72
72
  onSelectOk === null || onSelectOk === void 0 ? void 0 : onSelectOk(data);
73
73
  };
74
74
  return /*#__PURE__*/React.createElement(PageLayout, {
75
- layout: layout,
76
75
  ref: function ref(layout) {
77
76
  return _this2.layoutRef = layout;
77
+ },
78
+ layout: layout,
79
+ onClose: function onClose() {
80
+ onSelectOk === null || onSelectOk === void 0 ? void 0 : onSelectOk(undefined);
78
81
  }
79
82
  }, /*#__PURE__*/React.createElement(ReactRender, _extends({}, restProps, {
80
83
  components: window._components || window.components || window.__components,
@@ -16,9 +16,9 @@ export function showFormDataManager(_x) {
16
16
  return _showFormDataManager.apply(this, arguments);
17
17
  }
18
18
  function _showFormDataManager() {
19
- _showFormDataManager = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
19
+ _showFormDataManager = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
20
20
  var container, onClose, props;
21
- return _regeneratorRuntime.wrap(function _callee$(_context) {
21
+ return _regeneratorRuntime.wrap(function (_context) {
22
22
  while (1) switch (_context.prev = _context.next) {
23
23
  case 0:
24
24
  container = options.container, onClose = options.onClose, props = _objectWithoutPropertiesLoose(options, _excluded2);
@@ -30,7 +30,7 @@ function _showFormDataManager() {
30
30
  props: props
31
31
  }
32
32
  }));
33
- case 2:
33
+ case 1:
34
34
  case "end":
35
35
  return _context.stop();
36
36
  }
@@ -75,9 +75,12 @@ var FormDataManagerRender = /*#__PURE__*/function (_Component) {
75
75
  };
76
76
  var dataView = cloneDataView(this.props.dataView, this.props.extraProps);
77
77
  return /*#__PURE__*/React.createElement(PageLayout, {
78
- layout: layout,
79
78
  ref: function ref(layout) {
80
79
  return _this2.layoutRef = layout;
80
+ },
81
+ layout: layout,
82
+ onClose: function onClose() {
83
+ onSelectOk === null || onSelectOk === void 0 ? void 0 : onSelectOk(undefined);
81
84
  }
82
85
  }, /*#__PURE__*/React.createElement(PageLoadSchema, {
83
86
  pageId: form === null || form === void 0 ? void 0 : form.id