@cuipengyu5/bling-renderer-core 0.0.1
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/adapter/index.d.ts +24 -0
- package/es/adapter/index.js +95 -0
- package/es/components/Div.d.ts +2 -0
- package/es/components/Div.js +19 -0
- package/es/components/VisualDom/index.css +19 -0
- package/es/components/VisualDom/index.d.ts +3 -0
- package/es/components/VisualDom/index.js +44 -0
- package/es/context/index.d.ts +1 -0
- package/es/context/index.js +11 -0
- package/es/hoc/index.d.ts +7 -0
- package/es/hoc/index.js +90 -0
- package/es/hoc/leaf.d.ts +32 -0
- package/es/hoc/leaf.js +521 -0
- package/es/index.d.ts +7 -0
- package/es/index.js +9 -0
- package/es/renderer/addon.d.ts +2 -0
- package/es/renderer/addon.js +107 -0
- package/es/renderer/base.d.ts +13 -0
- package/es/renderer/base.js +1120 -0
- package/es/renderer/block.d.ts +2 -0
- package/es/renderer/block.js +43 -0
- package/es/renderer/component.d.ts +2 -0
- package/es/renderer/component.js +59 -0
- package/es/renderer/index.d.ts +8 -0
- package/es/renderer/index.js +8 -0
- package/es/renderer/page.d.ts +2 -0
- package/es/renderer/page.js +91 -0
- package/es/renderer/renderer.d.ts +2 -0
- package/es/renderer/renderer.js +230 -0
- package/es/renderer/temp.d.ts +2 -0
- package/es/renderer/temp.js +139 -0
- package/es/style.js +1 -0
- package/es/types/index.d.ts +275 -0
- package/es/types/index.js +1 -0
- package/es/utils/common.d.ts +119 -0
- package/es/utils/common.js +378 -0
- package/es/utils/data-helper.d.ts +74 -0
- package/es/utils/data-helper.js +300 -0
- package/es/utils/index.d.ts +3 -0
- package/es/utils/index.js +3 -0
- package/es/utils/is-use-loop.d.ts +2 -0
- package/es/utils/is-use-loop.js +16 -0
- package/es/utils/logger.d.ts +3 -0
- package/es/utils/logger.js +5 -0
- package/es/utils/request.d.ts +54 -0
- package/es/utils/request.js +209 -0
- package/lib/adapter/index.d.ts +24 -0
- package/lib/adapter/index.js +99 -0
- package/lib/components/Div.d.ts +2 -0
- package/lib/components/Div.js +24 -0
- package/lib/components/VisualDom/index.css +19 -0
- package/lib/components/VisualDom/index.d.ts +3 -0
- package/lib/components/VisualDom/index.js +49 -0
- package/lib/context/index.d.ts +1 -0
- package/lib/context/index.js +16 -0
- package/lib/hoc/index.d.ts +7 -0
- package/lib/hoc/index.js +95 -0
- package/lib/hoc/leaf.d.ts +32 -0
- package/lib/hoc/leaf.js +526 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +34 -0
- package/lib/renderer/addon.d.ts +2 -0
- package/lib/renderer/addon.js +112 -0
- package/lib/renderer/base.d.ts +13 -0
- package/lib/renderer/base.js +1126 -0
- package/lib/renderer/block.d.ts +2 -0
- package/lib/renderer/block.js +48 -0
- package/lib/renderer/component.d.ts +2 -0
- package/lib/renderer/component.js +64 -0
- package/lib/renderer/index.d.ts +8 -0
- package/lib/renderer/index.js +18 -0
- package/lib/renderer/page.d.ts +2 -0
- package/lib/renderer/page.js +96 -0
- package/lib/renderer/renderer.d.ts +2 -0
- package/lib/renderer/renderer.js +235 -0
- package/lib/renderer/temp.d.ts +2 -0
- package/lib/renderer/temp.js +144 -0
- package/lib/style.js +1 -0
- package/lib/types/index.d.ts +275 -0
- package/lib/types/index.js +3 -0
- package/lib/utils/common.d.ts +119 -0
- package/lib/utils/common.js +409 -0
- package/lib/utils/data-helper.d.ts +74 -0
- package/lib/utils/data-helper.js +306 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.js +21 -0
- package/lib/utils/is-use-loop.d.ts +2 -0
- package/lib/utils/is-use-loop.js +19 -0
- package/lib/utils/logger.d.ts +3 -0
- package/lib/utils/logger.js +9 -0
- package/lib/utils/request.d.ts +54 -0
- package/lib/utils/request.js +217 -0
- package/package.json +64 -0
package/es/hoc/leaf.js
ADDED
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
|
|
5
|
+
var _excluded = ["visible"],
|
|
6
|
+
_excluded2 = ["forwardedRef"];
|
|
7
|
+
import { GlobalEvent, IPublicEnumTransformStage } from '@alilc/lowcode-types';
|
|
8
|
+
import { isReactComponent, cloneEnumerableProperty } from '@alilc/lowcode-utils';
|
|
9
|
+
import { debounce } from '../utils/common';
|
|
10
|
+
import adapter from '../adapter';
|
|
11
|
+
import logger from '../utils/logger';
|
|
12
|
+
var RerenderType = /*#__PURE__*/function (RerenderType) {
|
|
13
|
+
RerenderType["All"] = "All";
|
|
14
|
+
RerenderType["ChildChanged"] = "ChildChanged";
|
|
15
|
+
RerenderType["PropsChanged"] = "PropsChanged";
|
|
16
|
+
RerenderType["VisibleChanged"] = "VisibleChanged";
|
|
17
|
+
RerenderType["MinimalRenderUnit"] = "MinimalRenderUnit";
|
|
18
|
+
return RerenderType;
|
|
19
|
+
}(RerenderType || {}); // 缓存 Leaf 层组件,防止重新渲染问题
|
|
20
|
+
var LeafCache = function LeafCache(documentId, device) {
|
|
21
|
+
this.documentId = documentId;
|
|
22
|
+
this.device = device;
|
|
23
|
+
/** 组件缓存 */
|
|
24
|
+
this.component = new Map();
|
|
25
|
+
/**
|
|
26
|
+
* 状态缓存,场景:属性变化后,改组件被销毁,state 为空,没有展示修改后的属性
|
|
27
|
+
*/
|
|
28
|
+
this.state = new Map();
|
|
29
|
+
/**
|
|
30
|
+
* 订阅事件缓存,导致 rerender 的订阅事件
|
|
31
|
+
*/
|
|
32
|
+
this.event = new Map();
|
|
33
|
+
this.ref = new Map();
|
|
34
|
+
};
|
|
35
|
+
var cache;
|
|
36
|
+
|
|
37
|
+
/** 部分没有渲染的 node 节点进行兜底处理 or 渲染方式没有渲染 LeafWrapper */
|
|
38
|
+
function initRerenderEvent(_ref) {
|
|
39
|
+
var _cache$event$get, _cache$event$get2, _leaf$onPropChange, _leaf$onChildrenChang, _leaf$onVisibleChange;
|
|
40
|
+
var schema = _ref.schema,
|
|
41
|
+
__debug = _ref.__debug,
|
|
42
|
+
container = _ref.container,
|
|
43
|
+
getNode = _ref.getNode;
|
|
44
|
+
var leaf = getNode === null || getNode === void 0 ? void 0 : getNode(schema.id);
|
|
45
|
+
if (!leaf || (_cache$event$get = cache.event.get(schema.id)) !== null && _cache$event$get !== void 0 && _cache$event$get.clear || leaf === cache.event.get(schema.id)) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
(_cache$event$get2 = cache.event.get(schema.id)) === null || _cache$event$get2 === void 0 ? void 0 : _cache$event$get2.dispose.forEach(function (disposeFn) {
|
|
49
|
+
return disposeFn && disposeFn();
|
|
50
|
+
});
|
|
51
|
+
var debounceRerender = debounce(function () {
|
|
52
|
+
container.rerender();
|
|
53
|
+
}, 20);
|
|
54
|
+
cache.event.set(schema.id, {
|
|
55
|
+
clear: false,
|
|
56
|
+
leaf: leaf,
|
|
57
|
+
dispose: [leaf === null || leaf === void 0 ? void 0 : (_leaf$onPropChange = leaf.onPropChange) === null || _leaf$onPropChange === void 0 ? void 0 : _leaf$onPropChange.call(leaf, function () {
|
|
58
|
+
if (!container.autoRepaintNode) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
__debug(schema.componentName + "[" + schema.id + "] leaf not render in SimulatorRendererView, leaf onPropsChange make rerender");
|
|
62
|
+
debounceRerender();
|
|
63
|
+
}), leaf === null || leaf === void 0 ? void 0 : (_leaf$onChildrenChang = leaf.onChildrenChange) === null || _leaf$onChildrenChang === void 0 ? void 0 : _leaf$onChildrenChang.call(leaf, function () {
|
|
64
|
+
if (!container.autoRepaintNode) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
__debug(schema.componentName + "[" + schema.id + "] leaf not render in SimulatorRendererView, leaf onChildrenChange make rerender");
|
|
68
|
+
debounceRerender();
|
|
69
|
+
}), leaf === null || leaf === void 0 ? void 0 : (_leaf$onVisibleChange = leaf.onVisibleChange) === null || _leaf$onVisibleChange === void 0 ? void 0 : _leaf$onVisibleChange.call(leaf, function () {
|
|
70
|
+
if (!container.autoRepaintNode) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
__debug(schema.componentName + "[" + schema.id + "] leaf not render in SimulatorRendererView, leaf onVisibleChange make rerender");
|
|
74
|
+
debounceRerender();
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** 渲染的 node 节点全局注册事件清除 */
|
|
80
|
+
function clearRerenderEvent(id) {
|
|
81
|
+
var _cache$event$get3, _cache$event$get4, _cache$event$get4$dis;
|
|
82
|
+
if ((_cache$event$get3 = cache.event.get(id)) !== null && _cache$event$get3 !== void 0 && _cache$event$get3.clear) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
(_cache$event$get4 = cache.event.get(id)) === null || _cache$event$get4 === void 0 ? void 0 : (_cache$event$get4$dis = _cache$event$get4.dispose) === null || _cache$event$get4$dis === void 0 ? void 0 : _cache$event$get4$dis.forEach(function (disposeFn) {
|
|
86
|
+
return disposeFn && disposeFn();
|
|
87
|
+
});
|
|
88
|
+
cache.event.set(id, {
|
|
89
|
+
clear: true,
|
|
90
|
+
dispose: []
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// 给每个组件包裹一个 HOC Leaf,支持组件内部属性变化,自响应渲染
|
|
95
|
+
export function leafWrapper(Comp, _ref2) {
|
|
96
|
+
var _baseRenderer$props, _baseRenderer$props$d, _baseRenderer$props2, _baseRenderer$props$d2, _baseRenderer$props3, _baseRenderer$props4, _baseRenderer$props5, _baseRenderer$props6, _host$designer;
|
|
97
|
+
var schema = _ref2.schema,
|
|
98
|
+
baseRenderer = _ref2.baseRenderer,
|
|
99
|
+
componentInfo = _ref2.componentInfo,
|
|
100
|
+
scope = _ref2.scope;
|
|
101
|
+
var __debug = baseRenderer.__debug,
|
|
102
|
+
getProps = baseRenderer.__getComponentProps,
|
|
103
|
+
getChildren = baseRenderer.__getSchemaChildrenVirtualDom,
|
|
104
|
+
__parseData = baseRenderer.__parseData;
|
|
105
|
+
var engine = baseRenderer.context.engine;
|
|
106
|
+
var host = (_baseRenderer$props = baseRenderer.props) === null || _baseRenderer$props === void 0 ? void 0 : _baseRenderer$props.__host;
|
|
107
|
+
var curDocumentId = (_baseRenderer$props$d = (_baseRenderer$props2 = baseRenderer.props) === null || _baseRenderer$props2 === void 0 ? void 0 : _baseRenderer$props2.documentId) !== null && _baseRenderer$props$d !== void 0 ? _baseRenderer$props$d : '';
|
|
108
|
+
var curDevice = (_baseRenderer$props$d2 = (_baseRenderer$props3 = baseRenderer.props) === null || _baseRenderer$props3 === void 0 ? void 0 : _baseRenderer$props3.device) !== null && _baseRenderer$props$d2 !== void 0 ? _baseRenderer$props$d2 : '';
|
|
109
|
+
var getNode = (_baseRenderer$props4 = baseRenderer.props) === null || _baseRenderer$props4 === void 0 ? void 0 : _baseRenderer$props4.getNode;
|
|
110
|
+
var container = (_baseRenderer$props5 = baseRenderer.props) === null || _baseRenderer$props5 === void 0 ? void 0 : _baseRenderer$props5.__container;
|
|
111
|
+
var setSchemaChangedSymbol = (_baseRenderer$props6 = baseRenderer.props) === null || _baseRenderer$props6 === void 0 ? void 0 : _baseRenderer$props6.setSchemaChangedSymbol;
|
|
112
|
+
var editor = host === null || host === void 0 ? void 0 : (_host$designer = host.designer) === null || _host$designer === void 0 ? void 0 : _host$designer.editor;
|
|
113
|
+
var runtime = adapter.getRuntime();
|
|
114
|
+
var forwardRef = runtime.forwardRef,
|
|
115
|
+
createElement = runtime.createElement;
|
|
116
|
+
var Component = runtime.Component;
|
|
117
|
+
var componentCacheId = schema.id;
|
|
118
|
+
if (!cache || curDocumentId && curDocumentId !== cache.documentId || curDevice && curDevice !== cache.device) {
|
|
119
|
+
var _cache;
|
|
120
|
+
(_cache = cache) === null || _cache === void 0 ? void 0 : _cache.event.forEach(function (event) {
|
|
121
|
+
var _event$dispose;
|
|
122
|
+
(_event$dispose = event.dispose) === null || _event$dispose === void 0 ? void 0 : _event$dispose.forEach(function (disposeFn) {
|
|
123
|
+
return disposeFn && disposeFn();
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
cache = new LeafCache(curDocumentId, curDevice);
|
|
127
|
+
}
|
|
128
|
+
if (!isReactComponent(Comp)) {
|
|
129
|
+
logger.error(schema.componentName + " component may be has errors: ", Comp);
|
|
130
|
+
}
|
|
131
|
+
initRerenderEvent({
|
|
132
|
+
schema: schema,
|
|
133
|
+
__debug: __debug,
|
|
134
|
+
container: container,
|
|
135
|
+
getNode: getNode
|
|
136
|
+
});
|
|
137
|
+
if (curDocumentId && cache.component.has(componentCacheId) && cache.component.get(componentCacheId).Comp === Comp) {
|
|
138
|
+
return cache.component.get(componentCacheId).LeafWrapper;
|
|
139
|
+
}
|
|
140
|
+
var LeafHoc = /*#__PURE__*/function (_Component) {
|
|
141
|
+
function LeafHoc(props, context) {
|
|
142
|
+
var _this;
|
|
143
|
+
_this = _Component.call(this, props, context) || this;
|
|
144
|
+
// 监听以下事件,当变化时更新自己
|
|
145
|
+
_this.recordInfo = {};
|
|
146
|
+
_this.curEventLeaf = void 0;
|
|
147
|
+
_this.disposeFunctions = [];
|
|
148
|
+
_this.__component_tag = 'leafWrapper';
|
|
149
|
+
_this.renderUnitInfo = void 0;
|
|
150
|
+
// 最小渲染单元做防抖处理
|
|
151
|
+
_this.makeUnitRenderDebounced = debounce(function () {
|
|
152
|
+
var _this$leaf, _this$leaf$export, _this$leaf2;
|
|
153
|
+
_this.beforeRender(RerenderType.MinimalRenderUnit);
|
|
154
|
+
var schema = (_this$leaf = _this.leaf) === null || _this$leaf === void 0 ? void 0 : (_this$leaf$export = _this$leaf["export"]) === null || _this$leaf$export === void 0 ? void 0 : _this$leaf$export.call(_this$leaf, IPublicEnumTransformStage.Render);
|
|
155
|
+
if (!schema) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
var nextProps = getProps(schema, scope, Comp, componentInfo);
|
|
159
|
+
var children = getChildren(schema, scope, Comp);
|
|
160
|
+
var nextState = {
|
|
161
|
+
nodeProps: nextProps,
|
|
162
|
+
nodeChildren: children,
|
|
163
|
+
childrenInState: true
|
|
164
|
+
};
|
|
165
|
+
if ('children' in nextProps) {
|
|
166
|
+
nextState.nodeChildren = nextProps.children;
|
|
167
|
+
}
|
|
168
|
+
__debug(((_this$leaf2 = _this.leaf) === null || _this$leaf2 === void 0 ? void 0 : _this$leaf2.componentName) + "(" + _this.props.componentId + ") MinimalRenderUnit Render!");
|
|
169
|
+
_this.setState(nextState);
|
|
170
|
+
}, 20);
|
|
171
|
+
_this.recordTime = function () {
|
|
172
|
+
var _host$designer2, _host$designer2$curre, _host$designer2$curre2, _this$recordInfo$node, _this$leaf3;
|
|
173
|
+
if (!_this.recordInfo.startTime) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
var endTime = Date.now();
|
|
177
|
+
var nodeCount = host === null || host === void 0 ? void 0 : (_host$designer2 = host.designer) === null || _host$designer2 === void 0 ? void 0 : (_host$designer2$curre = _host$designer2.currentDocument) === null || _host$designer2$curre === void 0 ? void 0 : (_host$designer2$curre2 = _host$designer2$curre.getNodeCount) === null || _host$designer2$curre2 === void 0 ? void 0 : _host$designer2$curre2.call(_host$designer2$curre);
|
|
178
|
+
var componentName = ((_this$recordInfo$node = _this.recordInfo.node) === null || _this$recordInfo$node === void 0 ? void 0 : _this$recordInfo$node.componentName) || ((_this$leaf3 = _this.leaf) === null || _this$leaf3 === void 0 ? void 0 : _this$leaf3.componentName) || 'UnknownComponent';
|
|
179
|
+
editor === null || editor === void 0 ? void 0 : editor.eventBus.emit(GlobalEvent.Node.Rerender, {
|
|
180
|
+
componentName: componentName,
|
|
181
|
+
time: endTime - _this.recordInfo.startTime,
|
|
182
|
+
type: _this.recordInfo.type,
|
|
183
|
+
nodeCount: nodeCount
|
|
184
|
+
});
|
|
185
|
+
_this.recordInfo.startTime = null;
|
|
186
|
+
};
|
|
187
|
+
_this.makeUnitRender = function () {
|
|
188
|
+
_this.makeUnitRenderDebounced();
|
|
189
|
+
};
|
|
190
|
+
__debug(schema.componentName + "[" + _this.props.componentId + "] leaf render in SimulatorRendererView");
|
|
191
|
+
clearRerenderEvent(componentCacheId);
|
|
192
|
+
_this.curEventLeaf = _this.leaf;
|
|
193
|
+
cache.ref.set(componentCacheId, {
|
|
194
|
+
makeUnitRender: _this.makeUnitRender
|
|
195
|
+
});
|
|
196
|
+
var cacheState = cache.state.get(componentCacheId);
|
|
197
|
+
if (!cacheState || cacheState.__tag !== props.__tag) {
|
|
198
|
+
cacheState = _this.getDefaultState(props);
|
|
199
|
+
}
|
|
200
|
+
_this.state = cacheState;
|
|
201
|
+
return _this;
|
|
202
|
+
}
|
|
203
|
+
_inheritsLoose(LeafHoc, _Component);
|
|
204
|
+
var _proto = LeafHoc.prototype;
|
|
205
|
+
_proto.componentDidUpdate = function componentDidUpdate() {
|
|
206
|
+
this.recordTime();
|
|
207
|
+
};
|
|
208
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
209
|
+
var _leaf = this.leaf;
|
|
210
|
+
this.initOnPropsChangeEvent(_leaf);
|
|
211
|
+
this.initOnChildrenChangeEvent(_leaf);
|
|
212
|
+
this.initOnVisibleChangeEvent(_leaf);
|
|
213
|
+
this.recordTime();
|
|
214
|
+
};
|
|
215
|
+
_proto.getDefaultState = function getDefaultState(nextProps) {
|
|
216
|
+
var _this$leaf4, _this$leaf4$export;
|
|
217
|
+
var _ref3 = nextProps.__inner__ || ((_this$leaf4 = this.leaf) === null || _this$leaf4 === void 0 ? void 0 : (_this$leaf4$export = _this$leaf4["export"]) === null || _this$leaf4$export === void 0 ? void 0 : _this$leaf4$export.call(_this$leaf4, IPublicEnumTransformStage.Render)) || {},
|
|
218
|
+
_ref3$hidden = _ref3.hidden,
|
|
219
|
+
hidden = _ref3$hidden === void 0 ? false : _ref3$hidden,
|
|
220
|
+
_ref3$condition = _ref3.condition,
|
|
221
|
+
condition = _ref3$condition === void 0 ? true : _ref3$condition;
|
|
222
|
+
return {
|
|
223
|
+
nodeChildren: null,
|
|
224
|
+
childrenInState: false,
|
|
225
|
+
visible: !hidden,
|
|
226
|
+
condition: __parseData === null || __parseData === void 0 ? void 0 : __parseData(condition, scope),
|
|
227
|
+
nodeCacheProps: {},
|
|
228
|
+
nodeProps: {}
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
_proto.setState = function setState(state) {
|
|
232
|
+
cache.state.set(componentCacheId, _extends({}, this.state, state, {
|
|
233
|
+
__tag: this.props.__tag
|
|
234
|
+
}));
|
|
235
|
+
_Component.prototype.setState.call(this, state);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/** 由于内部属性变化,在触发渲染前,会执行该函数 */;
|
|
239
|
+
_proto.beforeRender = function beforeRender(type, node) {
|
|
240
|
+
this.recordInfo.startTime = Date.now();
|
|
241
|
+
this.recordInfo.type = type;
|
|
242
|
+
this.recordInfo.node = node;
|
|
243
|
+
setSchemaChangedSymbol === null || setSchemaChangedSymbol === void 0 ? void 0 : setSchemaChangedSymbol(true);
|
|
244
|
+
};
|
|
245
|
+
_proto.judgeMiniUnitRender = function judgeMiniUnitRender() {
|
|
246
|
+
var _this$leaf5;
|
|
247
|
+
if (!this.renderUnitInfo) {
|
|
248
|
+
this.getRenderUnitInfo();
|
|
249
|
+
}
|
|
250
|
+
var renderUnitInfo = this.renderUnitInfo || {
|
|
251
|
+
singleRender: true
|
|
252
|
+
};
|
|
253
|
+
if (renderUnitInfo.singleRender) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
var ref = cache.ref.get(renderUnitInfo.minimalUnitId);
|
|
257
|
+
if (!ref) {
|
|
258
|
+
__debug('Cant find minimalRenderUnit ref! This make rerender!');
|
|
259
|
+
container === null || container === void 0 ? void 0 : container.rerender();
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
__debug(((_this$leaf5 = this.leaf) === null || _this$leaf5 === void 0 ? void 0 : _this$leaf5.componentName) + "(" + this.props.componentId + ") need render, make its minimalRenderUnit " + renderUnitInfo.minimalUnitName + "(" + renderUnitInfo.minimalUnitId + ")");
|
|
263
|
+
ref.makeUnitRender();
|
|
264
|
+
};
|
|
265
|
+
_proto.getRenderUnitInfo = function getRenderUnitInfo(leaf) {
|
|
266
|
+
if (leaf === void 0) {
|
|
267
|
+
leaf = this.leaf;
|
|
268
|
+
}
|
|
269
|
+
// leaf 在低代码组件中存在 mock 的情况,退出最小渲染单元判断
|
|
270
|
+
if (!leaf || typeof leaf.isRoot !== 'function') {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
if (leaf.isRootNode) {
|
|
274
|
+
this.renderUnitInfo = _extends({
|
|
275
|
+
singleRender: true
|
|
276
|
+
}, this.renderUnitInfo || {});
|
|
277
|
+
}
|
|
278
|
+
if (leaf.componentMeta.isMinimalRenderUnit) {
|
|
279
|
+
this.renderUnitInfo = {
|
|
280
|
+
minimalUnitId: leaf.id,
|
|
281
|
+
minimalUnitName: leaf.componentName,
|
|
282
|
+
singleRender: false
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
if (leaf.hasLoop()) {
|
|
286
|
+
var _leaf2, _leaf2$parent, _leaf3, _leaf3$parent;
|
|
287
|
+
// 含有循环配置的元素,父元素是最小渲染单元
|
|
288
|
+
this.renderUnitInfo = {
|
|
289
|
+
minimalUnitId: (_leaf2 = leaf) === null || _leaf2 === void 0 ? void 0 : (_leaf2$parent = _leaf2.parent) === null || _leaf2$parent === void 0 ? void 0 : _leaf2$parent.id,
|
|
290
|
+
minimalUnitName: (_leaf3 = leaf) === null || _leaf3 === void 0 ? void 0 : (_leaf3$parent = _leaf3.parent) === null || _leaf3$parent === void 0 ? void 0 : _leaf3$parent.componentName,
|
|
291
|
+
singleRender: false
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
if (leaf.parent) {
|
|
295
|
+
this.getRenderUnitInfo(leaf.parent);
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
_proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
299
|
+
var componentId = nextProps.componentId;
|
|
300
|
+
if (nextProps.__tag === this.props.__tag) {
|
|
301
|
+
return null;
|
|
302
|
+
}
|
|
303
|
+
var _leaf = getNode === null || getNode === void 0 ? void 0 : getNode(componentId);
|
|
304
|
+
if (_leaf && this.curEventLeaf && _leaf !== this.curEventLeaf) {
|
|
305
|
+
this.disposeFunctions.forEach(function (fn) {
|
|
306
|
+
return fn();
|
|
307
|
+
});
|
|
308
|
+
this.disposeFunctions = [];
|
|
309
|
+
this.initOnChildrenChangeEvent(_leaf);
|
|
310
|
+
this.initOnPropsChangeEvent(_leaf);
|
|
311
|
+
this.initOnVisibleChangeEvent(_leaf);
|
|
312
|
+
this.curEventLeaf = _leaf;
|
|
313
|
+
}
|
|
314
|
+
var _this$getDefaultState = this.getDefaultState(nextProps),
|
|
315
|
+
visible = _this$getDefaultState.visible,
|
|
316
|
+
resetState = _objectWithoutPropertiesLoose(_this$getDefaultState, _excluded);
|
|
317
|
+
this.setState(resetState);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/** 监听参数变化 */;
|
|
321
|
+
_proto.initOnPropsChangeEvent = function initOnPropsChangeEvent(leaf) {
|
|
322
|
+
var _this2 = this,
|
|
323
|
+
_leaf5,
|
|
324
|
+
_leaf5$onPropChange;
|
|
325
|
+
if (leaf === void 0) {
|
|
326
|
+
leaf = this.leaf;
|
|
327
|
+
}
|
|
328
|
+
var handlePropsChange = debounce(function (propChangeInfo) {
|
|
329
|
+
var _node$export, _leaf4;
|
|
330
|
+
var key = propChangeInfo.key,
|
|
331
|
+
_propChangeInfo$newVa = propChangeInfo.newValue,
|
|
332
|
+
newValue = _propChangeInfo$newVa === void 0 ? null : _propChangeInfo$newVa;
|
|
333
|
+
var node = leaf;
|
|
334
|
+
if (key === '___condition___') {
|
|
335
|
+
var _this2$leaf;
|
|
336
|
+
var _ref4 = ((_this2$leaf = _this2.leaf) === null || _this2$leaf === void 0 ? void 0 : _this2$leaf["export"](IPublicEnumTransformStage.Render)) || {},
|
|
337
|
+
_ref4$condition = _ref4.condition,
|
|
338
|
+
condition = _ref4$condition === void 0 ? true : _ref4$condition;
|
|
339
|
+
var conditionValue = __parseData === null || __parseData === void 0 ? void 0 : __parseData(condition, scope);
|
|
340
|
+
__debug("key is ___condition___, change condition value to [" + condition + "]");
|
|
341
|
+
// 条件表达式改变
|
|
342
|
+
_this2.setState({
|
|
343
|
+
condition: conditionValue
|
|
344
|
+
});
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// 如果循坏条件变化,从根节点重新渲染
|
|
349
|
+
// 目前多层循坏无法判断需要从哪一层开始渲染,故先粗暴解决
|
|
350
|
+
if (key === '___loop___') {
|
|
351
|
+
__debug('key is ___loop___, render a page!');
|
|
352
|
+
container === null || container === void 0 ? void 0 : container.rerender();
|
|
353
|
+
// 由于 scope 变化,需要清空缓存,使用新的 scope
|
|
354
|
+
cache.component["delete"](componentCacheId);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
_this2.beforeRender(RerenderType.PropsChanged);
|
|
358
|
+
var state = _this2.state;
|
|
359
|
+
var nodeCacheProps = state.nodeCacheProps;
|
|
360
|
+
var nodeProps = getProps(node === null || node === void 0 ? void 0 : (_node$export = node["export"]) === null || _node$export === void 0 ? void 0 : _node$export.call(node, IPublicEnumTransformStage.Render), scope, Comp, componentInfo);
|
|
361
|
+
if (key && !(key in nodeProps) && key in _this2.props) {
|
|
362
|
+
// 当 key 在 this.props 中时,且不存在在计算值中,需要用 newValue 覆盖掉 this.props 的取值
|
|
363
|
+
nodeCacheProps[key] = newValue;
|
|
364
|
+
}
|
|
365
|
+
__debug(((_leaf4 = leaf) === null || _leaf4 === void 0 ? void 0 : _leaf4.componentName) + "[" + _this2.props.componentId + "] component trigger onPropsChange!", nodeProps, nodeCacheProps, key, newValue);
|
|
366
|
+
_this2.setState('children' in nodeProps ? {
|
|
367
|
+
nodeChildren: nodeProps.children,
|
|
368
|
+
nodeProps: nodeProps,
|
|
369
|
+
childrenInState: true,
|
|
370
|
+
nodeCacheProps: nodeCacheProps
|
|
371
|
+
} : {
|
|
372
|
+
nodeProps: nodeProps,
|
|
373
|
+
nodeCacheProps: nodeCacheProps
|
|
374
|
+
});
|
|
375
|
+
_this2.judgeMiniUnitRender();
|
|
376
|
+
});
|
|
377
|
+
var dispose = (_leaf5 = leaf) === null || _leaf5 === void 0 ? void 0 : (_leaf5$onPropChange = _leaf5.onPropChange) === null || _leaf5$onPropChange === void 0 ? void 0 : _leaf5$onPropChange.call(_leaf5, function (propChangeInfo) {
|
|
378
|
+
if (!_this2.autoRepaintNode) {
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
handlePropsChange(propChangeInfo);
|
|
382
|
+
});
|
|
383
|
+
dispose && this.disposeFunctions.push(dispose);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* 监听显隐变化
|
|
388
|
+
*/;
|
|
389
|
+
_proto.initOnVisibleChangeEvent = function initOnVisibleChangeEvent(leaf) {
|
|
390
|
+
var _leaf6,
|
|
391
|
+
_leaf6$onVisibleChang,
|
|
392
|
+
_this3 = this;
|
|
393
|
+
if (leaf === void 0) {
|
|
394
|
+
leaf = this.leaf;
|
|
395
|
+
}
|
|
396
|
+
var dispose = (_leaf6 = leaf) === null || _leaf6 === void 0 ? void 0 : (_leaf6$onVisibleChang = _leaf6.onVisibleChange) === null || _leaf6$onVisibleChang === void 0 ? void 0 : _leaf6$onVisibleChang.call(_leaf6, function (flag) {
|
|
397
|
+
var _leaf7;
|
|
398
|
+
if (!_this3.autoRepaintNode) {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (_this3.state.visible === flag) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
__debug(((_leaf7 = leaf) === null || _leaf7 === void 0 ? void 0 : _leaf7.componentName) + "[" + _this3.props.componentId + "] component trigger onVisibleChange(" + flag + ") event");
|
|
405
|
+
_this3.beforeRender(RerenderType.VisibleChanged);
|
|
406
|
+
_this3.setState({
|
|
407
|
+
visible: flag
|
|
408
|
+
});
|
|
409
|
+
_this3.judgeMiniUnitRender();
|
|
410
|
+
});
|
|
411
|
+
dispose && this.disposeFunctions.push(dispose);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* 监听子元素变化(拖拽,删除...)
|
|
416
|
+
*/;
|
|
417
|
+
_proto.initOnChildrenChangeEvent = function initOnChildrenChangeEvent(leaf) {
|
|
418
|
+
var _leaf8,
|
|
419
|
+
_leaf8$onChildrenChan,
|
|
420
|
+
_this4 = this;
|
|
421
|
+
if (leaf === void 0) {
|
|
422
|
+
leaf = this.leaf;
|
|
423
|
+
}
|
|
424
|
+
var dispose = (_leaf8 = leaf) === null || _leaf8 === void 0 ? void 0 : (_leaf8$onChildrenChan = _leaf8.onChildrenChange) === null || _leaf8$onChildrenChan === void 0 ? void 0 : _leaf8$onChildrenChan.call(_leaf8, function (param) {
|
|
425
|
+
var _leaf9, _leaf9$export;
|
|
426
|
+
if (!_this4.autoRepaintNode) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
var _ref5 = param || {},
|
|
430
|
+
type = _ref5.type,
|
|
431
|
+
node = _ref5.node;
|
|
432
|
+
_this4.beforeRender(RerenderType.ChildChanged + "-" + type, node);
|
|
433
|
+
// TODO: 缓存同级其他元素的 children。
|
|
434
|
+
// 缓存二级 children Next 查询筛选组件有问题
|
|
435
|
+
// 缓存一级 children Next Tab 组件有问题
|
|
436
|
+
var nextChild = getChildren((_leaf9 = leaf) === null || _leaf9 === void 0 ? void 0 : (_leaf9$export = _leaf9["export"]) === null || _leaf9$export === void 0 ? void 0 : _leaf9$export.call(_leaf9, IPublicEnumTransformStage.Render), scope, Comp);
|
|
437
|
+
__debug(schema.componentName + "[" + _this4.props.componentId + "] component trigger onChildrenChange event", nextChild);
|
|
438
|
+
_this4.setState({
|
|
439
|
+
nodeChildren: nextChild,
|
|
440
|
+
childrenInState: true
|
|
441
|
+
});
|
|
442
|
+
_this4.judgeMiniUnitRender();
|
|
443
|
+
});
|
|
444
|
+
dispose && this.disposeFunctions.push(dispose);
|
|
445
|
+
};
|
|
446
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
447
|
+
this.disposeFunctions.forEach(function (fn) {
|
|
448
|
+
return fn();
|
|
449
|
+
});
|
|
450
|
+
};
|
|
451
|
+
_proto.render = function render() {
|
|
452
|
+
if (!this.state.visible || !this.state.condition) {
|
|
453
|
+
return null;
|
|
454
|
+
}
|
|
455
|
+
var _this$props = this.props,
|
|
456
|
+
forwardedRef = _this$props.forwardedRef,
|
|
457
|
+
rest = _objectWithoutPropertiesLoose(_this$props, _excluded2);
|
|
458
|
+
var compProps = _extends({}, rest, this.state.nodeCacheProps || {}, this.state.nodeProps || {}, {
|
|
459
|
+
children: [],
|
|
460
|
+
__id: this.props.componentId,
|
|
461
|
+
ref: forwardedRef
|
|
462
|
+
});
|
|
463
|
+
delete compProps.__inner__;
|
|
464
|
+
if (this.hasChildren) {
|
|
465
|
+
return engine.createElement(Comp, compProps, this.children);
|
|
466
|
+
}
|
|
467
|
+
return engine.createElement(Comp, compProps);
|
|
468
|
+
};
|
|
469
|
+
return _createClass(LeafHoc, [{
|
|
470
|
+
key: "autoRepaintNode",
|
|
471
|
+
get: function get() {
|
|
472
|
+
return container === null || container === void 0 ? void 0 : container.autoRepaintNode;
|
|
473
|
+
}
|
|
474
|
+
}, {
|
|
475
|
+
key: "hasChildren",
|
|
476
|
+
get: function get() {
|
|
477
|
+
if (!this.state.childrenInState) {
|
|
478
|
+
return 'children' in this.props;
|
|
479
|
+
}
|
|
480
|
+
return true;
|
|
481
|
+
}
|
|
482
|
+
}, {
|
|
483
|
+
key: "children",
|
|
484
|
+
get: function get() {
|
|
485
|
+
if (this.state.childrenInState) {
|
|
486
|
+
return this.state.nodeChildren;
|
|
487
|
+
}
|
|
488
|
+
if (this.props.children && !Array.isArray(this.props.children)) {
|
|
489
|
+
return [this.props.children];
|
|
490
|
+
}
|
|
491
|
+
if (this.props.children && this.props.children.length) {
|
|
492
|
+
return this.props.children;
|
|
493
|
+
}
|
|
494
|
+
return this.props.children;
|
|
495
|
+
}
|
|
496
|
+
}, {
|
|
497
|
+
key: "leaf",
|
|
498
|
+
get: function get() {
|
|
499
|
+
var _this$props$_leaf;
|
|
500
|
+
if ((_this$props$_leaf = this.props._leaf) !== null && _this$props$_leaf !== void 0 && _this$props$_leaf.isMock) {
|
|
501
|
+
// 低代码组件作为一个整体更新,其内部的组件不需要监听相关事件
|
|
502
|
+
return undefined;
|
|
503
|
+
}
|
|
504
|
+
return getNode === null || getNode === void 0 ? void 0 : getNode(componentCacheId);
|
|
505
|
+
}
|
|
506
|
+
}]);
|
|
507
|
+
}(Component);
|
|
508
|
+
LeafHoc.displayName = schema.componentName;
|
|
509
|
+
var LeafWrapper = forwardRef(function (props, ref) {
|
|
510
|
+
return createElement(LeafHoc, _extends({}, props, {
|
|
511
|
+
forwardedRef: ref
|
|
512
|
+
}));
|
|
513
|
+
});
|
|
514
|
+
LeafWrapper = cloneEnumerableProperty(LeafWrapper, Comp);
|
|
515
|
+
LeafWrapper.displayName = Comp.displayName;
|
|
516
|
+
cache.component.set(componentCacheId, {
|
|
517
|
+
LeafWrapper: LeafWrapper,
|
|
518
|
+
Comp: Comp
|
|
519
|
+
});
|
|
520
|
+
return LeafWrapper;
|
|
521
|
+
}
|
package/es/index.d.ts
ADDED
package/es/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import adapter from './adapter';
|
|
2
|
+
import contextFactory from './context';
|
|
3
|
+
export { adapter, contextFactory };
|
|
4
|
+
export * from './renderer';
|
|
5
|
+
import * as _types from './types';
|
|
6
|
+
export { _types as types };
|
|
7
|
+
import * as _utils from './utils';
|
|
8
|
+
export { _utils as utils };
|
|
9
|
+
export * from './hoc';
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
|
|
5
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import baseRendererFactory from './base';
|
|
8
|
+
import { isEmpty } from '../utils';
|
|
9
|
+
import logger from '../utils/logger';
|
|
10
|
+
export default function addonRendererFactory() {
|
|
11
|
+
var _AddonRenderer;
|
|
12
|
+
var BaseRenderer = baseRendererFactory();
|
|
13
|
+
return _AddonRenderer = /*#__PURE__*/function (_BaseRenderer) {
|
|
14
|
+
function AddonRenderer() {
|
|
15
|
+
var _this;
|
|
16
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
+
args[_key] = arguments[_key];
|
|
18
|
+
}
|
|
19
|
+
_this = _BaseRenderer.call.apply(_BaseRenderer, [this].concat(args)) || this;
|
|
20
|
+
_this.__namespace = 'addon';
|
|
21
|
+
_this.addonKey = void 0;
|
|
22
|
+
_this.appHelper = void 0;
|
|
23
|
+
_this.open = void 0;
|
|
24
|
+
_this.close = void 0;
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
_inheritsLoose(AddonRenderer, _BaseRenderer);
|
|
28
|
+
var _proto = AddonRenderer.prototype;
|
|
29
|
+
_proto.__afterInit = function __afterInit(props) {
|
|
30
|
+
var _props$config;
|
|
31
|
+
this.__generateCtx({
|
|
32
|
+
component: this
|
|
33
|
+
});
|
|
34
|
+
var schema = props.__schema || {};
|
|
35
|
+
this.state = this.__parseData(schema.state || {});
|
|
36
|
+
if (isEmpty(props.config) || !((_props$config = props.config) !== null && _props$config !== void 0 && _props$config.addonKey)) {
|
|
37
|
+
logger.warn('lce addon has wrong config');
|
|
38
|
+
this.setState({
|
|
39
|
+
__hasError: true
|
|
40
|
+
});
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
// 注册插件
|
|
44
|
+
this.addonKey = props.config.addonKey;
|
|
45
|
+
this.appHelper.addons = this.appHelper.addons || {};
|
|
46
|
+
this.appHelper.addons[this.addonKey] = this;
|
|
47
|
+
this.__initDataSource(props);
|
|
48
|
+
this.open = this.open || function () {};
|
|
49
|
+
this.close = this.close || function () {};
|
|
50
|
+
this.__executeLifeCycleMethod('constructor', Array.prototype.slice.call(arguments));
|
|
51
|
+
};
|
|
52
|
+
_proto.componentWillUnmount = /*#__PURE__*/function () {
|
|
53
|
+
var _componentWillUnmount = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
54
|
+
var _BaseRenderer$prototy;
|
|
55
|
+
var config,
|
|
56
|
+
_args = arguments;
|
|
57
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
58
|
+
while (1) switch (_context.prev = _context.next) {
|
|
59
|
+
case 0:
|
|
60
|
+
(_BaseRenderer$prototy = _BaseRenderer.prototype.componentWillUnmount) === null || _BaseRenderer$prototy === void 0 ? void 0 : _BaseRenderer$prototy.apply(this, Array.prototype.slice.call(_args));
|
|
61
|
+
// 注销插件
|
|
62
|
+
config = this.props.config || {};
|
|
63
|
+
if (config && this.appHelper.addons) {
|
|
64
|
+
delete this.appHelper.addons[config.addonKey];
|
|
65
|
+
}
|
|
66
|
+
case 1:
|
|
67
|
+
case "end":
|
|
68
|
+
return _context.stop();
|
|
69
|
+
}
|
|
70
|
+
}, _callee, this);
|
|
71
|
+
}));
|
|
72
|
+
function componentWillUnmount() {
|
|
73
|
+
return _componentWillUnmount.apply(this, arguments);
|
|
74
|
+
}
|
|
75
|
+
return componentWillUnmount;
|
|
76
|
+
}();
|
|
77
|
+
_proto.render = function render() {
|
|
78
|
+
var __schema = this.props.__schema;
|
|
79
|
+
if (this.__checkSchema(__schema)) {
|
|
80
|
+
return '插件 schema 结构异常!';
|
|
81
|
+
}
|
|
82
|
+
this.__debug(AddonRenderer.displayName + " render - " + __schema.fileName);
|
|
83
|
+
this.__generateCtx({
|
|
84
|
+
component: this
|
|
85
|
+
});
|
|
86
|
+
this.__render();
|
|
87
|
+
return this.__renderContent(this.__renderContextProvider({
|
|
88
|
+
compContext: this
|
|
89
|
+
}));
|
|
90
|
+
};
|
|
91
|
+
return _createClass(AddonRenderer, [{
|
|
92
|
+
key: "utils",
|
|
93
|
+
get: function get() {
|
|
94
|
+
var _ref = this.context.config || {},
|
|
95
|
+
_ref$utils = _ref.utils,
|
|
96
|
+
utils = _ref$utils === void 0 ? {} : _ref$utils;
|
|
97
|
+
return _extends({}, this.appHelper.utils, utils);
|
|
98
|
+
}
|
|
99
|
+
}]);
|
|
100
|
+
}(BaseRenderer), _AddonRenderer.displayName = 'AddonRenderer', _AddonRenderer.propTypes = {
|
|
101
|
+
config: PropTypes.object,
|
|
102
|
+
__schema: PropTypes.object
|
|
103
|
+
}, _AddonRenderer.defaultProps = {
|
|
104
|
+
config: {},
|
|
105
|
+
__schema: {}
|
|
106
|
+
}, _AddonRenderer;
|
|
107
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IPublicTypeNodeSchema, IPublicTypeNodeData } from '@alilc/lowcode-types';
|
|
2
|
+
import { IBaseRenderComponent } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* execute method in schema.lifeCycles with context
|
|
5
|
+
* @PRIVATE
|
|
6
|
+
*/
|
|
7
|
+
export declare function executeLifeCycleMethod(context: any, schema: IPublicTypeNodeSchema, method: string, args: any, thisRequiredInJSE: boolean | undefined): any;
|
|
8
|
+
/**
|
|
9
|
+
* get children from a node schema
|
|
10
|
+
* @PRIVATE
|
|
11
|
+
*/
|
|
12
|
+
export declare function getSchemaChildren(schema: IPublicTypeNodeSchema | undefined): IPublicTypeNodeData | IPublicTypeNodeData[];
|
|
13
|
+
export default function baseRendererFactory(): IBaseRenderComponent;
|