@zhubangyun/lowcode-core 5.10.211 → 5.10.221
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.d.ts +1 -1
- package/es/components/react-render/index.js +2 -5
- package/es/utils/api/form-api.js +3 -6
- package/es/utils/cache/index.d.ts +1 -0
- package/es/utils/cache/index.js +7 -1
- package/es/utils/page/page-load-schema.js +1 -1
- package/es/utils/page/page-render.js +1 -1
- package/lib/components/react-render/index.d.ts +1 -1
- package/lib/components/react-render/index.js +2 -5
- package/lib/utils/api/form-api.js +3 -6
- package/lib/utils/cache/index.d.ts +1 -0
- package/lib/utils/cache/index.js +7 -1
- package/lib/utils/page/page-load-schema.js +1 -1
- package/lib/utils/page/page-render.js +1 -1
- package/package.json +1 -1
|
@@ -3,5 +3,5 @@ import { IRendererProps } from "@zhubangyun/lowcode-render-core/lib/types";
|
|
|
3
3
|
export declare class ReactRender extends PureComponent<IRendererProps & {}> {
|
|
4
4
|
key: string;
|
|
5
5
|
node: any;
|
|
6
|
-
render(
|
|
6
|
+
render(): import("react").JSX.Element;
|
|
7
7
|
}
|
|
@@ -16,11 +16,8 @@ export var ReactRender = /*#__PURE__*/function (_PureComponent) {
|
|
|
16
16
|
}
|
|
17
17
|
_inheritsLoose(ReactRender, _PureComponent);
|
|
18
18
|
var _proto = ReactRender.prototype;
|
|
19
|
-
_proto.render = function render(
|
|
19
|
+
_proto.render = function render() {
|
|
20
20
|
var _this2 = this;
|
|
21
|
-
if (utils === void 0) {
|
|
22
|
-
utils = window.utils;
|
|
23
|
-
}
|
|
24
21
|
var components = this.props.components || window._components;
|
|
25
22
|
return /*#__PURE__*/React.createElement(ReactRenderFactory, _extends({
|
|
26
23
|
key: this.key
|
|
@@ -31,7 +28,7 @@ export var ReactRender = /*#__PURE__*/function (_PureComponent) {
|
|
|
31
28
|
thisRequiredInJSE: true,
|
|
32
29
|
components: components,
|
|
33
30
|
appHelper: {
|
|
34
|
-
utils: utils,
|
|
31
|
+
utils: window.utils,
|
|
35
32
|
requestHandlersMap: {
|
|
36
33
|
fetch: createFetchHandler()
|
|
37
34
|
}
|
package/es/utils/api/form-api.js
CHANGED
|
@@ -23,15 +23,12 @@ function _getFormApi() {
|
|
|
23
23
|
key = [formId, fieldId, mock ? "mock" : ""].filter(function (key) {
|
|
24
24
|
return !!key;
|
|
25
25
|
}).join("_");
|
|
26
|
-
_context9.
|
|
27
|
-
return formApi.getInstance(key, {
|
|
26
|
+
return _context9.abrupt("return", formApi.getInstance(key, {
|
|
28
27
|
mock: mock,
|
|
29
28
|
fieldId: fieldId,
|
|
30
29
|
formId: formId
|
|
31
|
-
});
|
|
32
|
-
case
|
|
33
|
-
return _context9.abrupt("return", _context9.sent);
|
|
34
|
-
case 5:
|
|
30
|
+
}));
|
|
31
|
+
case 3:
|
|
35
32
|
case "end":
|
|
36
33
|
return _context9.stop();
|
|
37
34
|
}
|
|
@@ -12,6 +12,7 @@ export declare class FormApiCache extends SingletonInstanceMap<RestFormApi<any>,
|
|
|
12
12
|
fieldId?: string;
|
|
13
13
|
mock?: boolean;
|
|
14
14
|
}> {
|
|
15
|
+
apiMap: Map<string, RestFormApi<any>>;
|
|
15
16
|
createInstance(key: string, options?: any): Promise<RestFormApi<any>>;
|
|
16
17
|
}
|
|
17
18
|
export declare const formApi: FormApiCache;
|
package/es/utils/cache/index.js
CHANGED
|
@@ -50,7 +50,13 @@ export var SchemaCache = /*#__PURE__*/function (_SingletonInstanceMap) {
|
|
|
50
50
|
export var schema = new SchemaCache();
|
|
51
51
|
export var FormApiCache = /*#__PURE__*/function (_SingletonInstanceMap2) {
|
|
52
52
|
function FormApiCache() {
|
|
53
|
-
|
|
53
|
+
var _this;
|
|
54
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
55
|
+
args[_key] = arguments[_key];
|
|
56
|
+
}
|
|
57
|
+
_this = _SingletonInstanceMap2.call.apply(_SingletonInstanceMap2, [this].concat(args)) || this;
|
|
58
|
+
_this.apiMap = new Map();
|
|
59
|
+
return _this;
|
|
54
60
|
}
|
|
55
61
|
_inheritsLoose(FormApiCache, _SingletonInstanceMap2);
|
|
56
62
|
var _proto2 = FormApiCache.prototype;
|
|
@@ -36,8 +36,8 @@ export function renderElement(options) {
|
|
|
36
36
|
_onClose === null || _onClose === void 0 ? void 0 : _onClose();
|
|
37
37
|
}
|
|
38
38
|
}));
|
|
39
|
-
console.log("渲染", container, root, element);
|
|
40
39
|
root.render(element);
|
|
40
|
+
return _context.abrupt("return", element);
|
|
41
41
|
case 8:
|
|
42
42
|
case "end":
|
|
43
43
|
return _context.stop();
|
|
@@ -3,5 +3,5 @@ import { IRendererProps } from "@zhubangyun/lowcode-render-core/lib/types";
|
|
|
3
3
|
export declare class ReactRender extends PureComponent<IRendererProps & {}> {
|
|
4
4
|
key: string;
|
|
5
5
|
node: any;
|
|
6
|
-
render(
|
|
6
|
+
render(): import("react").JSX.Element;
|
|
7
7
|
}
|
|
@@ -21,11 +21,8 @@ var ReactRender = exports.ReactRender = /*#__PURE__*/function (_PureComponent) {
|
|
|
21
21
|
}
|
|
22
22
|
(0, _inheritsLoose2["default"])(ReactRender, _PureComponent);
|
|
23
23
|
var _proto = ReactRender.prototype;
|
|
24
|
-
_proto.render = function render(
|
|
24
|
+
_proto.render = function render() {
|
|
25
25
|
var _this2 = this;
|
|
26
|
-
if (utils === void 0) {
|
|
27
|
-
utils = window.utils;
|
|
28
|
-
}
|
|
29
26
|
var components = this.props.components || window._components;
|
|
30
27
|
return /*#__PURE__*/React.createElement(_reactRenderFactory["default"], (0, _extends2["default"])({
|
|
31
28
|
key: this.key
|
|
@@ -36,7 +33,7 @@ var ReactRender = exports.ReactRender = /*#__PURE__*/function (_PureComponent) {
|
|
|
36
33
|
thisRequiredInJSE: true,
|
|
37
34
|
components: components,
|
|
38
35
|
appHelper: {
|
|
39
|
-
utils: utils,
|
|
36
|
+
utils: window.utils,
|
|
40
37
|
requestHandlersMap: {
|
|
41
38
|
fetch: (0, _lowcodeDatasourceFetchHandler.createFetchHandler)()
|
|
42
39
|
}
|
|
@@ -29,15 +29,12 @@ function _getFormApi() {
|
|
|
29
29
|
key = [formId, fieldId, mock ? "mock" : ""].filter(function (key) {
|
|
30
30
|
return !!key;
|
|
31
31
|
}).join("_");
|
|
32
|
-
_context9.
|
|
33
|
-
return _cache.formApi.getInstance(key, {
|
|
32
|
+
return _context9.abrupt("return", _cache.formApi.getInstance(key, {
|
|
34
33
|
mock: mock,
|
|
35
34
|
fieldId: fieldId,
|
|
36
35
|
formId: formId
|
|
37
|
-
});
|
|
38
|
-
case
|
|
39
|
-
return _context9.abrupt("return", _context9.sent);
|
|
40
|
-
case 5:
|
|
36
|
+
}));
|
|
37
|
+
case 3:
|
|
41
38
|
case "end":
|
|
42
39
|
return _context9.stop();
|
|
43
40
|
}
|
|
@@ -12,6 +12,7 @@ export declare class FormApiCache extends SingletonInstanceMap<RestFormApi<any>,
|
|
|
12
12
|
fieldId?: string;
|
|
13
13
|
mock?: boolean;
|
|
14
14
|
}> {
|
|
15
|
+
apiMap: Map<string, RestFormApi<any>>;
|
|
15
16
|
createInstance(key: string, options?: any): Promise<RestFormApi<any>>;
|
|
16
17
|
}
|
|
17
18
|
export declare const formApi: FormApiCache;
|
package/lib/utils/cache/index.js
CHANGED
|
@@ -54,7 +54,13 @@ var SchemaCache = exports.SchemaCache = /*#__PURE__*/function (_SingletonInstanc
|
|
|
54
54
|
var schema = exports.schema = new SchemaCache();
|
|
55
55
|
var FormApiCache = exports.FormApiCache = /*#__PURE__*/function (_SingletonInstanceMap2) {
|
|
56
56
|
function FormApiCache() {
|
|
57
|
-
|
|
57
|
+
var _this;
|
|
58
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
59
|
+
args[_key] = arguments[_key];
|
|
60
|
+
}
|
|
61
|
+
_this = _SingletonInstanceMap2.call.apply(_SingletonInstanceMap2, [this].concat(args)) || this;
|
|
62
|
+
_this.apiMap = new Map();
|
|
63
|
+
return _this;
|
|
58
64
|
}
|
|
59
65
|
(0, _inheritsLoose2["default"])(FormApiCache, _SingletonInstanceMap2);
|
|
60
66
|
var _proto2 = FormApiCache.prototype;
|
|
@@ -41,8 +41,8 @@ function renderElement(options) {
|
|
|
41
41
|
_onClose === null || _onClose === void 0 ? void 0 : _onClose();
|
|
42
42
|
}
|
|
43
43
|
}));
|
|
44
|
-
console.log("渲染", container, root, element);
|
|
45
44
|
root.render(element);
|
|
45
|
+
return _context.abrupt("return", element);
|
|
46
46
|
case 8:
|
|
47
47
|
case "end":
|
|
48
48
|
return _context.stop();
|