@zhubangyun/lowcode-core 1.1.19 → 1.1.21

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.
@@ -1,9 +1,10 @@
1
- import { PureComponent } from "react";
1
+ import React, { PureComponent } from "react";
2
2
  export declare class ReactRender extends PureComponent<{
3
3
  schema: any;
4
4
  components?: any;
5
+ style?: React.CSSProperties;
5
6
  }> {
6
7
  key: string;
7
8
  jsx: any;
8
- render(): import("react").JSX.Element;
9
+ render(): JSX.Element;
9
10
  }
@@ -1,9 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
3
- import RendererCore from "@zhubangyun/lowcode-renderer-core";
4
- import { PureComponent } from "react";
3
+ import _ConfigProvider from "antd/es/config-provider";
4
+ var _window$antd, _window$antd2;
5
+ import RendererCore, { adapter } from "@zhubangyun/lowcode-renderer-core";
6
+ import React, { PureComponent } from "react";
5
7
  import utils from "../../utils";
6
8
  import { createFetchHandler } from "@alilc/lowcode-datasource-fetch-handler";
9
+ // @ts-ignore
10
+ adapter.setConfigProvider(((_window$antd = window.antd) === null || _window$antd === void 0 ? void 0 : _window$antd.ConfigProvider) || _ConfigProvider);
11
+ // @ts-ignore
12
+ var LocalConfig = ((_window$antd2 = window.antd) === null || _window$antd2 === void 0 ? void 0 : _window$antd2.ConfigProvider) || _ConfigProvider;
7
13
  export var ReactRender = /*#__PURE__*/function (_PureComponent) {
8
14
  function ReactRender() {
9
15
  var _this;
@@ -0,0 +1 @@
1
+ export declare function loadMaterials(): Promise<Record<string, React.FC>>;
@@ -0,0 +1,37 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import { loadPlugins } from "./LoadPlugins";
4
+ export function loadMaterials() {
5
+ return _loadMaterials.apply(this, arguments);
6
+ }
7
+ function _loadMaterials() {
8
+ _loadMaterials = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
9
+ var urls, components;
10
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
11
+ while (1) switch (_context.prev = _context.next) {
12
+ case 0:
13
+ urls = ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.css", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"];
14
+ _context.next = 3;
15
+ return loadPlugins(urls);
16
+ case 3:
17
+ components = {};
18
+ ["RootMaterial", "AntdMaterial", "AntdProMaterial"].forEach(function (lib) {
19
+ var data = window[lib];
20
+ if (data) {
21
+ Object.entries(data).forEach(function (_ref) {
22
+ var key = _ref[0],
23
+ value = _ref[1];
24
+ // @ts-ignore
25
+ components[key] = value;
26
+ });
27
+ }
28
+ });
29
+ return _context.abrupt("return", components);
30
+ case 6:
31
+ case "end":
32
+ return _context.stop();
33
+ }
34
+ }, _callee);
35
+ }));
36
+ return _loadMaterials.apply(this, arguments);
37
+ }
@@ -76,5 +76,6 @@ export interface ManyResult<DataType> extends BaseResult<DataType> {
76
76
  total: number;
77
77
  }
78
78
  export interface BaseRequestOptions<DataType> {
79
- onError: (res: OneResult<DataType>) => Promise<void>;
79
+ onError?: (res: OneResult<DataType>) => Promise<void>;
80
+ onSuccess?: (res: OneResult<DataType>) => Promise<void>;
80
81
  }
@@ -65,7 +65,7 @@ export var RestApi = /*#__PURE__*/function () {
65
65
  /*#__PURE__*/
66
66
  function () {
67
67
  var _getById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(id, options) {
68
- var res, _options$onError;
68
+ var res, _options$onError, _options$onSuccess;
69
69
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
70
70
  while (1) switch (_context2.prev = _context2.next) {
71
71
  case 0:
@@ -74,15 +74,21 @@ export var RestApi = /*#__PURE__*/function () {
74
74
  case 2:
75
75
  res = _context2.sent;
76
76
  if (res.success) {
77
- _context2.next = 7;
77
+ _context2.next = 9;
78
78
  break;
79
79
  }
80
80
  this.showError("\u83B7\u53D6{" + id + "}\u5931\u8D25!", res.message).then();
81
81
  _context2.next = 7;
82
82
  return options === null || options === void 0 ? void 0 : (_options$onError = options.onError) === null || _options$onError === void 0 ? void 0 : _options$onError.call(options, res);
83
83
  case 7:
84
+ _context2.next = 11;
85
+ break;
86
+ case 9:
87
+ _context2.next = 11;
88
+ return options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options, res);
89
+ case 11:
84
90
  return _context2.abrupt("return", res.data);
85
- case 8:
91
+ case 12:
86
92
  case "end":
87
93
  return _context2.stop();
88
94
  }
@@ -101,7 +107,7 @@ export var RestApi = /*#__PURE__*/function () {
101
107
  /*#__PURE__*/
102
108
  function () {
103
109
  var _create = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(data, options) {
104
- var res, _options$onError2;
110
+ var res, _options$onError2, _options$onSuccess2;
105
111
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
106
112
  while (1) switch (_context3.prev = _context3.next) {
107
113
  case 0:
@@ -110,15 +116,21 @@ export var RestApi = /*#__PURE__*/function () {
110
116
  case 2:
111
117
  res = _context3.sent;
112
118
  if (res.success) {
113
- _context3.next = 7;
119
+ _context3.next = 9;
114
120
  break;
115
121
  }
116
122
  this.showError("\u65B0\u589E\u5931\u8D25!", res.message).then();
117
123
  _context3.next = 7;
118
124
  return options === null || options === void 0 ? void 0 : (_options$onError2 = options.onError) === null || _options$onError2 === void 0 ? void 0 : _options$onError2.call(options, res);
119
125
  case 7:
126
+ _context3.next = 11;
127
+ break;
128
+ case 9:
129
+ _context3.next = 11;
130
+ return options === null || options === void 0 ? void 0 : (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 ? void 0 : _options$onSuccess2.call(options, res);
131
+ case 11:
120
132
  return _context3.abrupt("return", res.data);
121
- case 8:
133
+ case 12:
122
134
  case "end":
123
135
  return _context3.stop();
124
136
  }
@@ -137,7 +149,7 @@ export var RestApi = /*#__PURE__*/function () {
137
149
  /*#__PURE__*/
138
150
  function () {
139
151
  var _update = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(id, data, options) {
140
- var res, _options$onError3;
152
+ var res, _options$onError3, _options$onSuccess3;
141
153
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
142
154
  while (1) switch (_context4.prev = _context4.next) {
143
155
  case 0:
@@ -146,15 +158,21 @@ export var RestApi = /*#__PURE__*/function () {
146
158
  case 2:
147
159
  res = _context4.sent;
148
160
  if (res.success) {
149
- _context4.next = 7;
161
+ _context4.next = 9;
150
162
  break;
151
163
  }
152
164
  this.showError("\u66F4\u65B0\u5931\u8D25!", res.message).then();
153
165
  _context4.next = 7;
154
166
  return options === null || options === void 0 ? void 0 : (_options$onError3 = options.onError) === null || _options$onError3 === void 0 ? void 0 : _options$onError3.call(options, res);
155
167
  case 7:
168
+ _context4.next = 11;
169
+ break;
170
+ case 9:
171
+ _context4.next = 11;
172
+ return options === null || options === void 0 ? void 0 : (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 ? void 0 : _options$onSuccess3.call(options, res);
173
+ case 11:
156
174
  return _context4.abrupt("return", res.data);
157
- case 8:
175
+ case 12:
158
176
  case "end":
159
177
  return _context4.stop();
160
178
  }
@@ -173,7 +191,7 @@ export var RestApi = /*#__PURE__*/function () {
173
191
  /*#__PURE__*/
174
192
  function () {
175
193
  var _deleteById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(id, options) {
176
- var res, _options$onError4;
194
+ var res, _options$onError4, _options$onSuccess4;
177
195
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
178
196
  while (1) switch (_context5.prev = _context5.next) {
179
197
  case 0:
@@ -182,15 +200,21 @@ export var RestApi = /*#__PURE__*/function () {
182
200
  case 2:
183
201
  res = _context5.sent;
184
202
  if (res.success) {
185
- _context5.next = 7;
203
+ _context5.next = 9;
186
204
  break;
187
205
  }
188
206
  this.showError("\u5220\u9664{" + id + "}\u5931\u8D25!", res.message).then();
189
207
  _context5.next = 7;
190
208
  return options === null || options === void 0 ? void 0 : (_options$onError4 = options.onError) === null || _options$onError4 === void 0 ? void 0 : _options$onError4.call(options, res);
191
209
  case 7:
210
+ _context5.next = 11;
211
+ break;
212
+ case 9:
213
+ _context5.next = 11;
214
+ return options === null || options === void 0 ? void 0 : (_options$onSuccess4 = options.onSuccess) === null || _options$onSuccess4 === void 0 ? void 0 : _options$onSuccess4.call(options, res);
215
+ case 11:
192
216
  return _context5.abrupt("return", res.success);
193
- case 8:
217
+ case 12:
194
218
  case "end":
195
219
  return _context5.stop();
196
220
  }
@@ -1,15 +1,5 @@
1
1
  export var AntdAssets = {
2
- packages: [{
3
- "package": "antd-material",
4
- "version": "0.1.0",
5
- "library": "AntdMaterial",
6
- "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css"]
7
- }, {
8
- "package": "@zhubangyun/antd-pro-material",
9
- "version": "0.1.0",
10
- "library": "AntdProMaterial",
11
- "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
12
- }],
2
+ packages: [],
13
3
  components: [{
14
4
  "exportName": "AntdMaterialMeta",
15
5
  "npm": {
@@ -24,6 +24,16 @@ var BaseAssets = {
24
24
  "version": "0.1.0",
25
25
  "library": "RootMaterial",
26
26
  "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.css"]
27
+ }, {
28
+ "package": "antd-material",
29
+ "version": "0.1.0",
30
+ "library": "AntdMaterial",
31
+ "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css"]
32
+ }, {
33
+ "package": "@zhubangyun/antd-pro-material",
34
+ "version": "0.1.0",
35
+ "library": "AntdProMaterial",
36
+ "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
27
37
  }],
28
38
  "components": [{
29
39
  "exportName": "RootMaterialMeta",
@@ -168,7 +168,6 @@ function _assetsParse() {
168
168
  }
169
169
  return acc;
170
170
  }, {});
171
- console.log(libraryMap, proCodeComponentsMap);
172
171
  components = buildComponents(libraryMap, proCodeComponentsMap, function (schema) {
173
172
  return null;
174
173
  });
@@ -176,7 +175,7 @@ function _assetsParse() {
176
175
  return _context2.abrupt("return", {
177
176
  components: _extends({}, components, lowCodeComponents)
178
177
  });
179
- case 24:
178
+ case 23:
180
179
  case "end":
181
180
  return _context2.stop();
182
181
  }
@@ -1,9 +1,10 @@
1
- import { PureComponent } from "react";
1
+ import React, { PureComponent } from "react";
2
2
  export declare class ReactRender extends PureComponent<{
3
3
  schema: any;
4
4
  components?: any;
5
+ style?: React.CSSProperties;
5
6
  }> {
6
7
  key: string;
7
8
  jsx: any;
8
- render(): import("react").JSX.Element;
9
+ render(): JSX.Element;
9
10
  }
@@ -5,10 +5,18 @@ exports.__esModule = true;
5
5
  exports.ReactRender = void 0;
6
6
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
7
  var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
8
- var _lowcodeRendererCore = _interopRequireDefault(require("@zhubangyun/lowcode-renderer-core"));
9
- var _react = require("react");
8
+ var _configProvider = _interopRequireDefault(require("antd/lib/config-provider"));
9
+ var _lowcodeRendererCore = _interopRequireWildcard(require("@zhubangyun/lowcode-renderer-core"));
10
+ var _react = _interopRequireWildcard(require("react"));
10
11
  var _utils = _interopRequireDefault(require("../../utils"));
11
12
  var _lowcodeDatasourceFetchHandler = require("@alilc/lowcode-datasource-fetch-handler");
13
+ var _window$antd, _window$antd2;
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
16
+ // @ts-ignore
17
+ _lowcodeRendererCore.adapter.setConfigProvider(((_window$antd = window.antd) === null || _window$antd === void 0 ? void 0 : _window$antd.ConfigProvider) || _configProvider["default"]);
18
+ // @ts-ignore
19
+ var LocalConfig = ((_window$antd2 = window.antd) === null || _window$antd2 === void 0 ? void 0 : _window$antd2.ConfigProvider) || _configProvider["default"];
12
20
  var ReactRender = exports.ReactRender = /*#__PURE__*/function (_PureComponent) {
13
21
  function ReactRender() {
14
22
  var _this;
@@ -27,7 +35,7 @@ var ReactRender = exports.ReactRender = /*#__PURE__*/function (_PureComponent) {
27
35
  var key = this.key;
28
36
  // @ts-ignore
29
37
  var components = this.props.components || window.components || {};
30
- return /*#__PURE__*/React.createElement(_lowcodeRendererCore["default"], (0, _extends2["default"])({}, this.props, {
38
+ return /*#__PURE__*/_react["default"].createElement(_lowcodeRendererCore["default"], (0, _extends2["default"])({}, this.props, {
31
39
  key: key,
32
40
  ref: function ref(page) {
33
41
  _this2.jsx = page === null || page === void 0 ? void 0 : page.__ref;
@@ -0,0 +1 @@
1
+ export declare function loadMaterials(): Promise<Record<string, React.FC>>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports.loadMaterials = loadMaterials;
6
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
7
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
+ var _LoadPlugins = require("./LoadPlugins");
9
+ function loadMaterials() {
10
+ return _loadMaterials.apply(this, arguments);
11
+ }
12
+ function _loadMaterials() {
13
+ _loadMaterials = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
14
+ var urls, components;
15
+ return _regenerator["default"].wrap(function _callee$(_context) {
16
+ while (1) switch (_context.prev = _context.next) {
17
+ case 0:
18
+ urls = ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.css", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"];
19
+ _context.next = 3;
20
+ return (0, _LoadPlugins.loadPlugins)(urls);
21
+ case 3:
22
+ components = {};
23
+ ["RootMaterial", "AntdMaterial", "AntdProMaterial"].forEach(function (lib) {
24
+ var data = window[lib];
25
+ if (data) {
26
+ Object.entries(data).forEach(function (_ref) {
27
+ var key = _ref[0],
28
+ value = _ref[1];
29
+ // @ts-ignore
30
+ components[key] = value;
31
+ });
32
+ }
33
+ });
34
+ return _context.abrupt("return", components);
35
+ case 6:
36
+ case "end":
37
+ return _context.stop();
38
+ }
39
+ }, _callee);
40
+ }));
41
+ return _loadMaterials.apply(this, arguments);
42
+ }
@@ -76,5 +76,6 @@ export interface ManyResult<DataType> extends BaseResult<DataType> {
76
76
  total: number;
77
77
  }
78
78
  export interface BaseRequestOptions<DataType> {
79
- onError: (res: OneResult<DataType>) => Promise<void>;
79
+ onError?: (res: OneResult<DataType>) => Promise<void>;
80
+ onSuccess?: (res: OneResult<DataType>) => Promise<void>;
80
81
  }
@@ -70,7 +70,7 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
70
70
  /*#__PURE__*/
71
71
  function () {
72
72
  var _getById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(id, options) {
73
- var res, _options$onError;
73
+ var res, _options$onError, _options$onSuccess;
74
74
  return _regenerator["default"].wrap(function _callee2$(_context2) {
75
75
  while (1) switch (_context2.prev = _context2.next) {
76
76
  case 0:
@@ -79,15 +79,21 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
79
79
  case 2:
80
80
  res = _context2.sent;
81
81
  if (res.success) {
82
- _context2.next = 7;
82
+ _context2.next = 9;
83
83
  break;
84
84
  }
85
85
  this.showError("\u83B7\u53D6{" + id + "}\u5931\u8D25!", res.message).then();
86
86
  _context2.next = 7;
87
87
  return options === null || options === void 0 ? void 0 : (_options$onError = options.onError) === null || _options$onError === void 0 ? void 0 : _options$onError.call(options, res);
88
88
  case 7:
89
+ _context2.next = 11;
90
+ break;
91
+ case 9:
92
+ _context2.next = 11;
93
+ return options === null || options === void 0 ? void 0 : (_options$onSuccess = options.onSuccess) === null || _options$onSuccess === void 0 ? void 0 : _options$onSuccess.call(options, res);
94
+ case 11:
89
95
  return _context2.abrupt("return", res.data);
90
- case 8:
96
+ case 12:
91
97
  case "end":
92
98
  return _context2.stop();
93
99
  }
@@ -106,7 +112,7 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
106
112
  /*#__PURE__*/
107
113
  function () {
108
114
  var _create = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(data, options) {
109
- var res, _options$onError2;
115
+ var res, _options$onError2, _options$onSuccess2;
110
116
  return _regenerator["default"].wrap(function _callee3$(_context3) {
111
117
  while (1) switch (_context3.prev = _context3.next) {
112
118
  case 0:
@@ -115,15 +121,21 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
115
121
  case 2:
116
122
  res = _context3.sent;
117
123
  if (res.success) {
118
- _context3.next = 7;
124
+ _context3.next = 9;
119
125
  break;
120
126
  }
121
127
  this.showError("\u65B0\u589E\u5931\u8D25!", res.message).then();
122
128
  _context3.next = 7;
123
129
  return options === null || options === void 0 ? void 0 : (_options$onError2 = options.onError) === null || _options$onError2 === void 0 ? void 0 : _options$onError2.call(options, res);
124
130
  case 7:
131
+ _context3.next = 11;
132
+ break;
133
+ case 9:
134
+ _context3.next = 11;
135
+ return options === null || options === void 0 ? void 0 : (_options$onSuccess2 = options.onSuccess) === null || _options$onSuccess2 === void 0 ? void 0 : _options$onSuccess2.call(options, res);
136
+ case 11:
125
137
  return _context3.abrupt("return", res.data);
126
- case 8:
138
+ case 12:
127
139
  case "end":
128
140
  return _context3.stop();
129
141
  }
@@ -142,7 +154,7 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
142
154
  /*#__PURE__*/
143
155
  function () {
144
156
  var _update = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(id, data, options) {
145
- var res, _options$onError3;
157
+ var res, _options$onError3, _options$onSuccess3;
146
158
  return _regenerator["default"].wrap(function _callee4$(_context4) {
147
159
  while (1) switch (_context4.prev = _context4.next) {
148
160
  case 0:
@@ -151,15 +163,21 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
151
163
  case 2:
152
164
  res = _context4.sent;
153
165
  if (res.success) {
154
- _context4.next = 7;
166
+ _context4.next = 9;
155
167
  break;
156
168
  }
157
169
  this.showError("\u66F4\u65B0\u5931\u8D25!", res.message).then();
158
170
  _context4.next = 7;
159
171
  return options === null || options === void 0 ? void 0 : (_options$onError3 = options.onError) === null || _options$onError3 === void 0 ? void 0 : _options$onError3.call(options, res);
160
172
  case 7:
173
+ _context4.next = 11;
174
+ break;
175
+ case 9:
176
+ _context4.next = 11;
177
+ return options === null || options === void 0 ? void 0 : (_options$onSuccess3 = options.onSuccess) === null || _options$onSuccess3 === void 0 ? void 0 : _options$onSuccess3.call(options, res);
178
+ case 11:
161
179
  return _context4.abrupt("return", res.data);
162
- case 8:
180
+ case 12:
163
181
  case "end":
164
182
  return _context4.stop();
165
183
  }
@@ -178,7 +196,7 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
178
196
  /*#__PURE__*/
179
197
  function () {
180
198
  var _deleteById = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(id, options) {
181
- var res, _options$onError4;
199
+ var res, _options$onError4, _options$onSuccess4;
182
200
  return _regenerator["default"].wrap(function _callee5$(_context5) {
183
201
  while (1) switch (_context5.prev = _context5.next) {
184
202
  case 0:
@@ -187,15 +205,21 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
187
205
  case 2:
188
206
  res = _context5.sent;
189
207
  if (res.success) {
190
- _context5.next = 7;
208
+ _context5.next = 9;
191
209
  break;
192
210
  }
193
211
  this.showError("\u5220\u9664{" + id + "}\u5931\u8D25!", res.message).then();
194
212
  _context5.next = 7;
195
213
  return options === null || options === void 0 ? void 0 : (_options$onError4 = options.onError) === null || _options$onError4 === void 0 ? void 0 : _options$onError4.call(options, res);
196
214
  case 7:
215
+ _context5.next = 11;
216
+ break;
217
+ case 9:
218
+ _context5.next = 11;
219
+ return options === null || options === void 0 ? void 0 : (_options$onSuccess4 = options.onSuccess) === null || _options$onSuccess4 === void 0 ? void 0 : _options$onSuccess4.call(options, res);
220
+ case 11:
197
221
  return _context5.abrupt("return", res.success);
198
- case 8:
222
+ case 12:
199
223
  case "end":
200
224
  return _context5.stop();
201
225
  }
@@ -3,17 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports["default"] = exports.AntdAssets = void 0;
5
5
  var AntdAssets = exports.AntdAssets = {
6
- packages: [{
7
- "package": "antd-material",
8
- "version": "0.1.0",
9
- "library": "AntdMaterial",
10
- "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css"]
11
- }, {
12
- "package": "@zhubangyun/antd-pro-material",
13
- "version": "0.1.0",
14
- "library": "AntdProMaterial",
15
- "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
16
- }],
6
+ packages: [],
17
7
  components: [{
18
8
  "exportName": "AntdMaterialMeta",
19
9
  "npm": {
@@ -28,6 +28,16 @@ var BaseAssets = {
28
28
  "version": "0.1.0",
29
29
  "library": "RootMaterial",
30
30
  "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/root/view.css"]
31
+ }, {
32
+ "package": "antd-material",
33
+ "version": "0.1.0",
34
+ "library": "AntdMaterial",
35
+ "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd/view.css"]
36
+ }, {
37
+ "package": "@zhubangyun/antd-pro-material",
38
+ "version": "0.1.0",
39
+ "library": "AntdProMaterial",
40
+ "urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
31
41
  }],
32
42
  "components": [{
33
43
  "exportName": "RootMaterialMeta",
@@ -175,7 +175,6 @@ function _assetsParse() {
175
175
  }
176
176
  return acc;
177
177
  }, {});
178
- console.log(libraryMap, proCodeComponentsMap);
179
178
  components = (0, _lowcodeUtils.buildComponents)(libraryMap, proCodeComponentsMap, function (schema) {
180
179
  return null;
181
180
  });
@@ -183,7 +182,7 @@ function _assetsParse() {
183
182
  return _context2.abrupt("return", {
184
183
  components: (0, _extends2["default"])({}, components, lowCodeComponents)
185
184
  });
186
- case 24:
185
+ case 23:
187
186
  case "end":
188
187
  return _context2.stop();
189
188
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhubangyun/lowcode-core",
3
- "version": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "description": "低代码核心",
5
5
  "files": [
6
6
  "lib",