@zhubangyun/lowcode-core 5.3.182 → 5.3.184
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/es/components/react-render/index.js +0 -1
- package/es/index.js +3 -0
- package/es/utils/api/RestApi.d.ts +6 -2
- package/es/utils/api/RestApi.js +14 -4
- package/es/utils/designer/assets/assets.data.base.js +2 -1
- package/es/utils/designer/assets/assets.typing.d.ts +1 -0
- package/lib/components/react-render/index.js +0 -1
- package/lib/index.js +3 -1
- package/lib/utils/api/RestApi.d.ts +6 -2
- package/lib/utils/api/RestApi.js +15 -5
- package/lib/utils/designer/assets/assets.data.base.js +2 -1
- package/lib/utils/designer/assets/assets.typing.d.ts +1 -0
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -4,4 +4,7 @@ export { RestFormApi } from "./utils/form/form.api";
|
|
|
4
4
|
export { Layout } from "./components/layout";
|
|
5
5
|
export { SchemaRender } from "./components/schema-render";
|
|
6
6
|
export { ReactRender } from "./components/react-render";
|
|
7
|
+
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
window.utils = utils;
|
|
7
10
|
export { utils };
|
|
@@ -9,11 +9,11 @@ export interface RestApiOptions {
|
|
|
9
9
|
*/
|
|
10
10
|
title?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare abstract class
|
|
12
|
+
export declare abstract class BaseRestApi<DataType> {
|
|
13
13
|
uri: string;
|
|
14
14
|
title: string;
|
|
15
15
|
request: AxiosInstance;
|
|
16
|
-
constructor(uri: string, options?: RestApiOptions);
|
|
16
|
+
protected constructor(uri: string, options?: RestApiOptions);
|
|
17
17
|
abstract handleRequestConfig(config: AxiosRequestConfig): void;
|
|
18
18
|
search(params?: Record<string, any>, page?: number, pageSize?: number): Promise<ManyResult<DataType>>;
|
|
19
19
|
/**
|
|
@@ -37,6 +37,10 @@ export declare abstract class RestApi<DataType> {
|
|
|
37
37
|
deleteById(id: string, options?: BaseRequestOptions<DataType>): Promise<OneResult<DataType>>;
|
|
38
38
|
private showError;
|
|
39
39
|
}
|
|
40
|
+
export declare class RestApi<DataType> extends BaseRestApi<DataType> {
|
|
41
|
+
constructor(uri: string, options?: RestApiOptions);
|
|
42
|
+
handleRequestConfig(config: AxiosRequestConfig): void;
|
|
43
|
+
}
|
|
40
44
|
export interface BaseType {
|
|
41
45
|
/**
|
|
42
46
|
* 对象id
|
package/es/utils/api/RestApi.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
|
|
1
2
|
import _message from "antd/es/message";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
4
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
5
|
import axios from "axios";
|
|
5
6
|
import { onFulfilled, onRejected } from "./Request";
|
|
6
|
-
export var
|
|
7
|
-
function
|
|
7
|
+
export var BaseRestApi = /*#__PURE__*/function () {
|
|
8
|
+
function BaseRestApi(uri, options) {
|
|
8
9
|
this.uri = void 0;
|
|
9
10
|
this.title = void 0;
|
|
10
11
|
this.request = void 0;
|
|
@@ -21,7 +22,7 @@ export var RestApi = /*#__PURE__*/function () {
|
|
|
21
22
|
});
|
|
22
23
|
this.request.interceptors.response.use(onFulfilled, onRejected);
|
|
23
24
|
}
|
|
24
|
-
var _proto =
|
|
25
|
+
var _proto = BaseRestApi.prototype;
|
|
25
26
|
_proto.search = /*#__PURE__*/function () {
|
|
26
27
|
var _search = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params, page, pageSize) {
|
|
27
28
|
var _this$handleRequestCo;
|
|
@@ -299,8 +300,17 @@ export var RestApi = /*#__PURE__*/function () {
|
|
|
299
300
|
}
|
|
300
301
|
return showError;
|
|
301
302
|
}();
|
|
302
|
-
return
|
|
303
|
+
return BaseRestApi;
|
|
303
304
|
}();
|
|
305
|
+
export var RestApi = /*#__PURE__*/function (_BaseRestApi2) {
|
|
306
|
+
function RestApi(uri, options) {
|
|
307
|
+
return _BaseRestApi2.call(this, uri, options) || this;
|
|
308
|
+
}
|
|
309
|
+
_inheritsLoose(RestApi, _BaseRestApi2);
|
|
310
|
+
var _proto2 = RestApi.prototype;
|
|
311
|
+
_proto2.handleRequestConfig = function handleRequestConfig(config) {};
|
|
312
|
+
return RestApi;
|
|
313
|
+
}(BaseRestApi);
|
|
304
314
|
|
|
305
315
|
/**
|
|
306
316
|
* 基础返回结果
|
|
@@ -18,7 +18,7 @@ var BaseAssets = {
|
|
|
18
18
|
"library": "antd",
|
|
19
19
|
"id": "antd",
|
|
20
20
|
"external": true,
|
|
21
|
-
"urls": ["https://cdn.zhiyunhe.com/plugin/antd/5.17.0/antd.min.js", "https://cdn.zhiyunhe.com/plugin/antd/5.17.0/reset.min.css", "https://cdn.zhiyunhe.com/plugin/antdIcon/1.0.0/antdIcon.min.js"]
|
|
21
|
+
"urls": ["https://cdn.zhiyunhe.com/plugin/antd/5.17.0/antd.min.js", "https://cdn.zhiyunhe.com/plugin/antd/5.17.0/reset.min.css", "https://cdn.zhiyunhe.com/plugin/antdIcon/1.0.0/antdIcon.min.js", "https://cdn.zhiyunhe.com/plugin/lowcode/core/index.js"]
|
|
22
22
|
}, {
|
|
23
23
|
"package": "root-material",
|
|
24
24
|
"version": "0.1.0",
|
|
@@ -35,6 +35,7 @@ var BaseAssets = {
|
|
|
35
35
|
"library": "AntdProMaterial",
|
|
36
36
|
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
|
|
37
37
|
}],
|
|
38
|
+
utils: [],
|
|
38
39
|
"components": [],
|
|
39
40
|
"sort": {
|
|
40
41
|
"categoryList": ["布局", "通用", "导航", "数据录入", "数据展示", "反馈", "大屏组件", "图表", "基础元素", "表格类", "表单详情类", "帮助类", "对话框类", "业务类", "引导", "信息输入", "信息展示", "信息反馈", "布局容器类", "增强组件", "工具组件"],
|
|
@@ -30,7 +30,6 @@ var ReactRender = exports.ReactRender = /*#__PURE__*/function (_PureComponent) {
|
|
|
30
30
|
key: this.key
|
|
31
31
|
}, this.props, {
|
|
32
32
|
ref: function ref(node) {
|
|
33
|
-
console.log(node);
|
|
34
33
|
_this2.node = node === null || node === void 0 ? void 0 : node.__ref;
|
|
35
34
|
},
|
|
36
35
|
thisRequiredInJSE: true,
|
package/lib/index.js
CHANGED
|
@@ -14,4 +14,6 @@ exports.Layout = _layout.Layout;
|
|
|
14
14
|
var _schemaRender = require("./components/schema-render");
|
|
15
15
|
exports.SchemaRender = _schemaRender.SchemaRender;
|
|
16
16
|
var _reactRender = require("./components/react-render");
|
|
17
|
-
exports.ReactRender = _reactRender.ReactRender;
|
|
17
|
+
exports.ReactRender = _reactRender.ReactRender;
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
window.utils = _utils["default"];
|
|
@@ -9,11 +9,11 @@ export interface RestApiOptions {
|
|
|
9
9
|
*/
|
|
10
10
|
title?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare abstract class
|
|
12
|
+
export declare abstract class BaseRestApi<DataType> {
|
|
13
13
|
uri: string;
|
|
14
14
|
title: string;
|
|
15
15
|
request: AxiosInstance;
|
|
16
|
-
constructor(uri: string, options?: RestApiOptions);
|
|
16
|
+
protected constructor(uri: string, options?: RestApiOptions);
|
|
17
17
|
abstract handleRequestConfig(config: AxiosRequestConfig): void;
|
|
18
18
|
search(params?: Record<string, any>, page?: number, pageSize?: number): Promise<ManyResult<DataType>>;
|
|
19
19
|
/**
|
|
@@ -37,6 +37,10 @@ export declare abstract class RestApi<DataType> {
|
|
|
37
37
|
deleteById(id: string, options?: BaseRequestOptions<DataType>): Promise<OneResult<DataType>>;
|
|
38
38
|
private showError;
|
|
39
39
|
}
|
|
40
|
+
export declare class RestApi<DataType> extends BaseRestApi<DataType> {
|
|
41
|
+
constructor(uri: string, options?: RestApiOptions);
|
|
42
|
+
handleRequestConfig(config: AxiosRequestConfig): void;
|
|
43
|
+
}
|
|
40
44
|
export interface BaseType {
|
|
41
45
|
/**
|
|
42
46
|
* 对象id
|
package/lib/utils/api/RestApi.js
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.RestApi = void 0;
|
|
5
|
+
exports.RestApi = exports.BaseRestApi = void 0;
|
|
6
6
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
7
|
+
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
|
|
7
8
|
var _message2 = _interopRequireDefault(require("antd/lib/message"));
|
|
8
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
9
10
|
var _axios = _interopRequireDefault(require("axios"));
|
|
10
11
|
var _Request = require("./Request");
|
|
11
|
-
var
|
|
12
|
-
function
|
|
12
|
+
var BaseRestApi = exports.BaseRestApi = /*#__PURE__*/function () {
|
|
13
|
+
function BaseRestApi(uri, options) {
|
|
13
14
|
this.uri = void 0;
|
|
14
15
|
this.title = void 0;
|
|
15
16
|
this.request = void 0;
|
|
@@ -26,7 +27,7 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
|
|
|
26
27
|
});
|
|
27
28
|
this.request.interceptors.response.use(_Request.onFulfilled, _Request.onRejected);
|
|
28
29
|
}
|
|
29
|
-
var _proto =
|
|
30
|
+
var _proto = BaseRestApi.prototype;
|
|
30
31
|
_proto.search = /*#__PURE__*/function () {
|
|
31
32
|
var _search = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(params, page, pageSize) {
|
|
32
33
|
var _this$handleRequestCo;
|
|
@@ -304,8 +305,17 @@ var RestApi = exports.RestApi = /*#__PURE__*/function () {
|
|
|
304
305
|
}
|
|
305
306
|
return showError;
|
|
306
307
|
}();
|
|
307
|
-
return
|
|
308
|
+
return BaseRestApi;
|
|
308
309
|
}();
|
|
310
|
+
var RestApi = exports.RestApi = /*#__PURE__*/function (_BaseRestApi2) {
|
|
311
|
+
function RestApi(uri, options) {
|
|
312
|
+
return _BaseRestApi2.call(this, uri, options) || this;
|
|
313
|
+
}
|
|
314
|
+
(0, _inheritsLoose2["default"])(RestApi, _BaseRestApi2);
|
|
315
|
+
var _proto2 = RestApi.prototype;
|
|
316
|
+
_proto2.handleRequestConfig = function handleRequestConfig(config) {};
|
|
317
|
+
return RestApi;
|
|
318
|
+
}(BaseRestApi);
|
|
309
319
|
/**
|
|
310
320
|
* 基础返回结果
|
|
311
321
|
*/
|
|
@@ -22,7 +22,7 @@ var BaseAssets = {
|
|
|
22
22
|
"library": "antd",
|
|
23
23
|
"id": "antd",
|
|
24
24
|
"external": true,
|
|
25
|
-
"urls": ["https://cdn.zhiyunhe.com/plugin/antd/5.17.0/antd.min.js", "https://cdn.zhiyunhe.com/plugin/antd/5.17.0/reset.min.css", "https://cdn.zhiyunhe.com/plugin/antdIcon/1.0.0/antdIcon.min.js"]
|
|
25
|
+
"urls": ["https://cdn.zhiyunhe.com/plugin/antd/5.17.0/antd.min.js", "https://cdn.zhiyunhe.com/plugin/antd/5.17.0/reset.min.css", "https://cdn.zhiyunhe.com/plugin/antdIcon/1.0.0/antdIcon.min.js", "https://cdn.zhiyunhe.com/plugin/lowcode/core/index.js"]
|
|
26
26
|
}, {
|
|
27
27
|
"package": "root-material",
|
|
28
28
|
"version": "0.1.0",
|
|
@@ -39,6 +39,7 @@ var BaseAssets = {
|
|
|
39
39
|
"library": "AntdProMaterial",
|
|
40
40
|
"urls": ["https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.js", "https://cdn.zhiyunhe.com/plugin/lowcode/materials/antd-pro/view.css"]
|
|
41
41
|
}],
|
|
42
|
+
utils: [],
|
|
42
43
|
"components": [],
|
|
43
44
|
"sort": {
|
|
44
45
|
"categoryList": ["布局", "通用", "导航", "数据录入", "数据展示", "反馈", "大屏组件", "图表", "基础元素", "表格类", "表单详情类", "帮助类", "对话框类", "业务类", "引导", "信息输入", "信息展示", "信息反馈", "布局容器类", "增强组件", "工具组件"],
|