@cloudbase/lowcode-builder 1.8.86 → 1.8.88
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/lib/builder/mp/index.js +34 -18
- package/lib/builder/mp/mp_config.d.ts +2 -2
- package/lib/builder/mp/mp_config.js +33 -25
- package/lib/builder/util/net.js +5 -2
- package/lib/builder.web.js +3 -3
- package/package.json +2 -2
- package/template/html/index.html.ejs +14 -12
- package/template/mp/common/query.js +83 -66
- package/template/mp/common/util.js +27 -14
- package/template/mp/common/weapp-component.js +54 -29
- package/template/mp/common/widget.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/lowcode-builder",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.88",
|
|
4
4
|
"description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
|
|
5
5
|
"author": "yhsunshining@gmail.com",
|
|
6
6
|
"homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/core": "7.21.4",
|
|
49
49
|
"@babel/preset-env": "7.21.4",
|
|
50
|
-
"@cloudbase/cals": "^1.0.
|
|
50
|
+
"@cloudbase/cals": "^1.0.70",
|
|
51
51
|
"@cloudbase/lowcode-generator": "^1.8.25",
|
|
52
52
|
"axios": "^0.21.0",
|
|
53
53
|
"browserfs": "^1.4.3",
|
|
@@ -23,17 +23,19 @@
|
|
|
23
23
|
<% })%> <% if(cdnEndpoints.aegis){ %>
|
|
24
24
|
<script crossorigin="anonymous" src="<%= cdnEndpoints.aegis %>/aegis-sdk/latest/aegis.min.js"></script>
|
|
25
25
|
<script>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
if (Aegis) {
|
|
27
|
+
const _aegis = new Aegis({
|
|
28
|
+
id: 'lXHFsBpTjIzNADiczY', // 项目ID,即上报key
|
|
29
|
+
reportApiSpeed: true, // 接口测速
|
|
30
|
+
reportAssetSpeed: true, // 静态资源测速
|
|
31
|
+
spa: true,
|
|
32
|
+
ext1: '<%=appId%>',
|
|
33
|
+
ext3: '<%=ext3%>',
|
|
34
|
+
version: '<%= !isAdminPortal? "0.0.2" : "0.0.3" %>',
|
|
35
|
+
env: '<%= mode !== "production"? "pre" : "production" %>',
|
|
36
|
+
});
|
|
37
|
+
window._aegis = _aegis;
|
|
38
|
+
}
|
|
37
39
|
window._aegis_inited = Date.now();
|
|
38
40
|
</script>
|
|
39
41
|
<% }%>
|
|
@@ -543,7 +545,7 @@
|
|
|
543
545
|
crossorigin
|
|
544
546
|
src="<%=
|
|
545
547
|
cdnEndpoints.cdngo
|
|
546
|
-
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.
|
|
548
|
+
%>/lcap/lcap-resource-cdngo/-/0.1.4/_files/static/weda-render/main.4b74407996a537f4d5a6.bundle.js"
|
|
547
549
|
></script>
|
|
548
550
|
</body>
|
|
549
551
|
</html>
|
|
@@ -16,6 +16,11 @@ export class Query {
|
|
|
16
16
|
#observableValue = observable({ data: null, error: null, isFetching: false });
|
|
17
17
|
#eventHandlerMap = {};
|
|
18
18
|
#action = () => {};
|
|
19
|
+
#runQueryMap = {
|
|
20
|
+
sql: { QueryResource: 'mysql-plugin', QueryPath: '/WeDa/Query/V1/RunPluginQuery' },
|
|
21
|
+
sqlserver: { QueryResource: 'mssql-plugin', QueryPath: '/WeDa/Query/V1/RunPluginQuery' },
|
|
22
|
+
'cloud-connector': { QueryResource: 'apis-plugin', QueryPath: '/WeDa/Connector/v1/RunApisQuery' },
|
|
23
|
+
};
|
|
19
24
|
constructor({ schema, context, options = {} }) {
|
|
20
25
|
const { looseError = false } = options;
|
|
21
26
|
this.#schema = schema;
|
|
@@ -33,7 +38,7 @@ export class Query {
|
|
|
33
38
|
autorun(
|
|
34
39
|
(r) => {
|
|
35
40
|
try {
|
|
36
|
-
const data = this.#resolveParams();
|
|
41
|
+
const data = this.#resolveParams({}, { combainErrors: true });
|
|
37
42
|
if (this.#triggered) {
|
|
38
43
|
this.#debounceTrigger(data);
|
|
39
44
|
}
|
|
@@ -59,76 +64,85 @@ export class Query {
|
|
|
59
64
|
|
|
60
65
|
const { $w } = this.#context;
|
|
61
66
|
|
|
62
|
-
this.#action =
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
type = 'OBJECT';
|
|
91
|
-
}
|
|
67
|
+
this.#action = this.#isRunQueryType
|
|
68
|
+
? async function (data) {
|
|
69
|
+
const requestData = {
|
|
70
|
+
EnvId: $w.env.envId,
|
|
71
|
+
Name: data.sqlTemplateId,
|
|
72
|
+
Parameter: JSON.stringify(
|
|
73
|
+
Object.entries(data.params || {}).reduce((list, [key, value]) => {
|
|
74
|
+
if (value !== undefined) {
|
|
75
|
+
let type = 'OBJECT';
|
|
76
|
+
const typeofValue = typeof value;
|
|
77
|
+
switch (typeofValue) {
|
|
78
|
+
case 'boolean': {
|
|
79
|
+
type = 'BOOLEAN';
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
case 'number': {
|
|
83
|
+
type = 'NUMBER';
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
case 'string': {
|
|
87
|
+
type = 'STRING';
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
default: {
|
|
91
|
+
if (Array.isArray(value)) {
|
|
92
|
+
type = 'ARRAY';
|
|
93
|
+
} else {
|
|
94
|
+
type = 'OBJECT';
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
|
-
|
|
95
|
-
list.push({
|
|
96
|
-
Key: key,
|
|
97
|
-
Type: type,
|
|
98
|
-
Value: type === 'STRING' ? value : JSON.stringify(value),
|
|
99
|
-
});
|
|
100
97
|
}
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
list.push({
|
|
100
|
+
Key: key,
|
|
101
|
+
Type: type,
|
|
102
|
+
Value: type === 'STRING' ? value : JSON.stringify(value),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return list;
|
|
107
|
+
}, []) || [],
|
|
108
|
+
),
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const Data = await $w.cloud.callWedaApi({
|
|
112
|
+
action: 'RunQuery',
|
|
113
|
+
CallQuery: true,
|
|
114
|
+
...(this.#runQueryMap[this.#schema.type] || this.#runQueryMap['sql']),
|
|
115
|
+
EnvId: requestData.EnvId,
|
|
116
|
+
QueryName: requestData.Name,
|
|
117
|
+
data: requestData,
|
|
118
|
+
});
|
|
106
119
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
data: requestData,
|
|
115
|
-
});
|
|
120
|
+
// const Data = await $w.cloud.callWedaApi({
|
|
121
|
+
// action: 'RunPluginQuery',
|
|
122
|
+
// data: {
|
|
123
|
+
// MainAppId: $w.app.id,
|
|
124
|
+
// ...requestData
|
|
125
|
+
// },
|
|
126
|
+
// });
|
|
116
127
|
|
|
117
|
-
|
|
118
|
-
// action: 'RunPluginQuery',
|
|
119
|
-
// data: {
|
|
120
|
-
// MainAppId: $w.app.id,
|
|
121
|
-
// ...requestData
|
|
122
|
-
// },
|
|
123
|
-
// });
|
|
128
|
+
const { ExecuteResultList = [], Total, Payload } = Data || {};
|
|
124
129
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
130
|
+
let payload = Payload;
|
|
131
|
+
try {
|
|
132
|
+
if (Payload) {
|
|
133
|
+
payload = JSON.parse(Payload);
|
|
134
|
+
}
|
|
135
|
+
} catch (e) {}
|
|
136
|
+
return {
|
|
137
|
+
...(this.#schema.type === 'cloud-connector'
|
|
138
|
+
? payload
|
|
139
|
+
: {
|
|
140
|
+
records: ExecuteResultList.map((item) => JSON.parse(item)),
|
|
141
|
+
total: Total || ExecuteResultList.length,
|
|
142
|
+
}),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
: this.#schema.handler;
|
|
132
146
|
this.#eventHandlerMap = Object.entries(
|
|
133
147
|
createEventHandlers(this.#schema.eventHandlers || {}, {
|
|
134
148
|
looseError: looseError,
|
|
@@ -164,6 +178,9 @@ export class Query {
|
|
|
164
178
|
get isFetching() {
|
|
165
179
|
return this.#observableValue.isFetching;
|
|
166
180
|
}
|
|
181
|
+
get #isRunQueryType() {
|
|
182
|
+
return !!this.#runQueryMap[this.#schema.type];
|
|
183
|
+
}
|
|
167
184
|
async trigger(additionalScope, options = {}) {
|
|
168
185
|
this.#triggered = true;
|
|
169
186
|
return this.#innerTrigger(this.#resolveParams(additionalScope), options);
|
|
@@ -217,7 +234,7 @@ export class Query {
|
|
|
217
234
|
}, 300);
|
|
218
235
|
}
|
|
219
236
|
|
|
220
|
-
#resolveParams(additionalScope = {}) {
|
|
237
|
+
#resolveParams(additionalScope = {}, options = {}) {
|
|
221
238
|
/**
|
|
222
239
|
* 这里万一其中某个字段计算失败
|
|
223
240
|
* 好像会阻塞其他字段的计算
|
|
@@ -227,7 +244,7 @@ export class Query {
|
|
|
227
244
|
mergeDynamic2StaticData(toJS(this.#paramsRef.current), this.#dataBinds, {
|
|
228
245
|
$w: this.#context.$w,
|
|
229
246
|
paramsContext: additionalScope,
|
|
230
|
-
}) || {};
|
|
247
|
+
}, options?.combainErrors) || {};
|
|
231
248
|
|
|
232
249
|
return params;
|
|
233
250
|
}
|
|
@@ -714,6 +714,7 @@ export function mergeDynamic2StaticData(
|
|
|
714
714
|
dataContext?: Record<string,any>;
|
|
715
715
|
paramsContext?: Record<string,any>;
|
|
716
716
|
}*/,
|
|
717
|
+
combainErrors = false,
|
|
717
718
|
) {
|
|
718
719
|
const { forContext = {}, codeContext = {}, dataContext = {}, $w, paramsContext = {} } = context;
|
|
719
720
|
const { lists = [], forItems = {} } = forContext;
|
|
@@ -721,22 +722,34 @@ export function mergeDynamic2StaticData(
|
|
|
721
722
|
const resolvedData = {
|
|
722
723
|
...staticData,
|
|
723
724
|
};
|
|
725
|
+
let error = null;
|
|
724
726
|
|
|
725
727
|
for (const key in dataBinds) {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
728
|
+
try {
|
|
729
|
+
set(
|
|
730
|
+
resolvedData,
|
|
731
|
+
key,
|
|
732
|
+
dataBinds[key].call(
|
|
733
|
+
codeContext.instance,
|
|
734
|
+
codeContext.instance,
|
|
735
|
+
lists,
|
|
736
|
+
forItems,
|
|
737
|
+
codeContext.event,
|
|
738
|
+
dataContext,
|
|
739
|
+
$w,
|
|
740
|
+
paramsContext,
|
|
741
|
+
),
|
|
742
|
+
);
|
|
743
|
+
} catch(e) {
|
|
744
|
+
if(combainErrors) {
|
|
745
|
+
error = e
|
|
746
|
+
} else {
|
|
747
|
+
throw e
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
if(error) {
|
|
752
|
+
throw error
|
|
740
753
|
}
|
|
741
754
|
|
|
742
755
|
return resolvedData;
|
|
@@ -4,7 +4,7 @@ import { createWidgets, getWidget, disposeWidget } from './widget'
|
|
|
4
4
|
import mergeRenderer from './merge-renderer'
|
|
5
5
|
import { runWatchers } from './watch'
|
|
6
6
|
import lodashGet from 'lodash.get';
|
|
7
|
-
import { createInitData } from './widget';
|
|
7
|
+
import { createInitData, createWidget } from './widget';
|
|
8
8
|
import { commonCompBehavior } from '@cloudbase/weda-client';
|
|
9
9
|
import { $w as baseAPI } from '../app/weapps-api'
|
|
10
10
|
|
|
@@ -13,7 +13,7 @@ import { $w as baseAPI } from '../app/weapps-api'
|
|
|
13
13
|
*/
|
|
14
14
|
export const compLowcodes = {}
|
|
15
15
|
|
|
16
|
-
export function createComponent(key, behaviors, properties, events, handler, dataBinds, evtListeners, widgetProps, index, lifeCycle, stateFn, computedFuncs, config, libCommonRes, libCode) {
|
|
16
|
+
export function createComponent(key, behaviors, properties={}, events, handler, dataBinds, evtListeners, widgetProps, index, lifeCycle, stateFn, computedFuncs, config, libCommonRes, libCode) {
|
|
17
17
|
widgetProps = patchWdigetPropsWithEvtListeners(widgetProps, evtListeners)
|
|
18
18
|
|
|
19
19
|
compLowcodes[key] = {
|
|
@@ -53,6 +53,7 @@ export function createComponent(key, behaviors, properties, events, handler, dat
|
|
|
53
53
|
created() {
|
|
54
54
|
this._pageActive = true
|
|
55
55
|
this._disposers = []
|
|
56
|
+
this._nativeObserver = false
|
|
56
57
|
},
|
|
57
58
|
attached() {
|
|
58
59
|
const $comp = this._getInstance()
|
|
@@ -60,7 +61,7 @@ export function createComponent(key, behaviors, properties, events, handler, dat
|
|
|
60
61
|
$comp.__internal__.active = this._pageActive
|
|
61
62
|
|
|
62
63
|
$comp.props.events = createPropEvents(events, this)
|
|
63
|
-
const { widgets, rootWidget: virtualRootWidget } = createWidgets(widgetProps, dataBinds, this,
|
|
64
|
+
const { widgets, rootWidget: virtualRootWidget } = createWidgets(widgetProps, dataBinds, this, $comp.widgets)
|
|
64
65
|
$comp.widgets = widgets
|
|
65
66
|
this._virtualRootWidget = virtualRootWidget
|
|
66
67
|
|
|
@@ -98,7 +99,7 @@ export function createComponent(key, behaviors, properties, events, handler, dat
|
|
|
98
99
|
$comp.__internal__.active = this._pageActive
|
|
99
100
|
|
|
100
101
|
$comp.widgets = null
|
|
101
|
-
$comp.node._eventListeners
|
|
102
|
+
$comp.node._eventListeners?.clear?.();
|
|
102
103
|
disposeWidget(this._virtualRootWidget)
|
|
103
104
|
this._disposers.forEach(dispose => dispose())
|
|
104
105
|
lifeCycle.onDetached && lifeCycle.onDetached.call($comp)
|
|
@@ -130,19 +131,34 @@ export function createComponent(key, behaviors, properties, events, handler, dat
|
|
|
130
131
|
...createEventHandlers(evtListeners, { looseError: true, isComposite: true }),
|
|
131
132
|
...mergeRenderer,
|
|
132
133
|
_getInstance() {
|
|
133
|
-
if(!this.$WEAPPS_COMP){
|
|
134
|
-
|
|
134
|
+
if (!this.$WEAPPS_COMP) {
|
|
135
|
+
let widget = this.$node
|
|
135
136
|
if (!widget) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
if(this.selectOwnerComponent && !this.selectOwnerComponent?.()) {
|
|
138
|
+
const widgetValue = {}
|
|
139
|
+
for (const key in properties) {
|
|
140
|
+
if (properties[key]?.value !== undefined) {
|
|
141
|
+
widgetValue[key] = properties[key]?.value
|
|
142
|
+
}
|
|
143
|
+
if (this.data[key] !== undefined) {
|
|
144
|
+
widgetValue[key] = this.data[key]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
this.$node = createWidget({ widgetType: key, ...widgetValue }, this.id || `id${Date.now()}`, '', undefined, {})
|
|
148
|
+
widget = this.$node
|
|
149
|
+
this._nativeObserver = true;
|
|
150
|
+
} else {
|
|
151
|
+
console.error('Fatal error: weapps component instance not created', this.is, this.id);
|
|
152
|
+
return
|
|
153
|
+
}
|
|
140
154
|
}
|
|
155
|
+
widget.getDom = (fields) => this._virtualRootWidget.children[0].getDom(fields)
|
|
156
|
+
this.$WEAPPS_COMP = create$comp(widget)
|
|
141
157
|
}
|
|
142
158
|
return this.$WEAPPS_COMP
|
|
143
159
|
},
|
|
144
160
|
},
|
|
145
|
-
|
|
161
|
+
observers: createObservers(Object.keys(properties))
|
|
146
162
|
})
|
|
147
163
|
}
|
|
148
164
|
|
|
@@ -152,7 +168,6 @@ export function create$comp(w) {
|
|
|
152
168
|
if (!lowcode) {
|
|
153
169
|
return
|
|
154
170
|
}
|
|
155
|
-
const libCode = w.widgetType.split(':')[0]
|
|
156
171
|
const { stateFn, computedFuncs, handler, lib } = lowcode
|
|
157
172
|
|
|
158
173
|
const $comp = {
|
|
@@ -161,21 +176,15 @@ export function create$comp(w) {
|
|
|
161
176
|
state: {},
|
|
162
177
|
computed: {},
|
|
163
178
|
widgets: {},
|
|
164
|
-
node: w,
|
|
179
|
+
node: w || {},
|
|
165
180
|
props: {
|
|
166
|
-
data: w,
|
|
181
|
+
data: w || {},
|
|
167
182
|
events: {},
|
|
168
183
|
get style() { return w.style },
|
|
169
184
|
get classList() { return w.classList },
|
|
170
185
|
},
|
|
171
186
|
handler: {},
|
|
172
|
-
lib
|
|
173
|
-
// i18n: {
|
|
174
|
-
// t(key, data) {
|
|
175
|
-
// const ns = libCode;
|
|
176
|
-
// return sdk.i18n.t(`${ns}:${key}`, data)
|
|
177
|
-
// },
|
|
178
|
-
// }
|
|
187
|
+
lib
|
|
179
188
|
}
|
|
180
189
|
$comp.$WEAPPS_COMP = $comp // TODO $comp will replaced to this.$WEAPPS_COMP
|
|
181
190
|
$comp.computed = createComputed(computedFuncs, $comp)
|
|
@@ -190,7 +199,7 @@ export function create$comp(w) {
|
|
|
190
199
|
baseAPI,
|
|
191
200
|
{
|
|
192
201
|
get(target, prop) {
|
|
193
|
-
if(prop === '$comp'){
|
|
202
|
+
if (prop === '$comp') {
|
|
194
203
|
return $comp
|
|
195
204
|
}
|
|
196
205
|
// 尝试代理组件级别组件实例
|
|
@@ -207,13 +216,29 @@ export function create$comp(w) {
|
|
|
207
216
|
}
|
|
208
217
|
|
|
209
218
|
function createObservers(props) {
|
|
219
|
+
const MAP = {
|
|
220
|
+
className: {
|
|
221
|
+
alias: 'classList',
|
|
222
|
+
format: function(value='') {
|
|
223
|
+
return Array.from(new Set(value.split(' ').filter(item=>!!item)))
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
}
|
|
210
227
|
return props.reduce((observers, prop) => {
|
|
211
|
-
observers[prop] = function (
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
228
|
+
observers[prop] = function (value) {
|
|
229
|
+
if (!this._nativeObserver) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
const $comp = this._getInstance()
|
|
233
|
+
if ($comp) {
|
|
234
|
+
const data = $comp.props.data || {}
|
|
235
|
+
const dataKey = MAP[prop]?.alias || prop;
|
|
236
|
+
const formatValue = MAP[prop]?.format ? MAP[prop].format(value) : value;
|
|
237
|
+
// if (!deepEqual(data[prop], formatValue)) {
|
|
238
|
+
data[dataKey] = formatValue
|
|
239
|
+
// } else {
|
|
240
|
+
// // console.log(`Same comp prop will not trigger observer. ${prop}->${dataKey}`, formatValue)
|
|
241
|
+
// }
|
|
217
242
|
}
|
|
218
243
|
}
|
|
219
244
|
return observers
|
|
@@ -256,7 +281,7 @@ function createPropEvents(events, mpInst) {
|
|
|
256
281
|
mpInst.setData({ value: evt.getValueFromEvent({ detail: evtDetail }) })
|
|
257
282
|
}
|
|
258
283
|
mpInst.triggerEvent(evt.name, evtDetail)
|
|
259
|
-
mpInst._getInstance().node
|
|
284
|
+
mpInst._getInstance().node?._eventListeners?.emit?.(evt.name, evtDetail)
|
|
260
285
|
}
|
|
261
286
|
}
|
|
262
287
|
})
|
|
@@ -377,7 +377,7 @@ function runFor(curForNode, dataBinds, ownerMpInst, forContext, ownerForWidgetHo
|
|
|
377
377
|
return dispose;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
-
function createWidget(props, nodeId, indexPostfix, parent, ownerMpInst, forContext) {
|
|
380
|
+
export function createWidget(props, nodeId, indexPostfix, parent, ownerMpInst, forContext) {
|
|
381
381
|
const { widgetType, _parentId, ...restProps } = props;
|
|
382
382
|
const w = observable(restProps);
|
|
383
383
|
const id = `${nodeId}${indexPostfix}`;
|