@cicctencent/low-code-simulate-base 0.0.0-stage → 1.1.10

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.
Files changed (82) hide show
  1. package/README.md +1 -3
  2. package/__tests__/plugin.spec.ts +40 -0
  3. package/__tests__/utils.transform.test.ts +37 -0
  4. package/api-extractor.json +36 -0
  5. package/build/md.js +25 -0
  6. package/dist/VCComponent.d.ts +5 -0
  7. package/dist/VCComponent.js +91 -0
  8. package/dist/domain/BaseProjectDomain.d.ts +389 -0
  9. package/dist/domain/BaseProjectDomain.js +1305 -0
  10. package/dist/domain/ComponentManager.d.ts +78 -0
  11. package/dist/domain/ComponentManager.js +293 -0
  12. package/dist/domain/DataHistoryDomain.d.ts +53 -0
  13. package/dist/domain/DataHistoryDomain.js +110 -0
  14. package/dist/domain/PreviewDomain.d.ts +208 -0
  15. package/dist/domain/PreviewDomain.js +490 -0
  16. package/dist/domain/ProjectDomain.d.ts +209 -0
  17. package/dist/domain/ProjectDomain.js +138 -0
  18. package/dist/event/generateEventHandler.d.ts +21 -0
  19. package/dist/event/generateEventHandler.js +218 -0
  20. package/dist/event/generateEventSchema.d.ts +123 -0
  21. package/dist/event/generateEventSchema.js +342 -0
  22. package/dist/event/register.d.ts +56 -0
  23. package/dist/event/register.js +207 -0
  24. package/dist/index.d.ts +1369 -0
  25. package/dist/index.js +28 -0
  26. package/dist/plugin/onH5PageValidate.d.ts +7 -0
  27. package/dist/plugin/onH5PageValidate.js +178 -0
  28. package/dist/plugin/onPlaceholder.d.ts +6 -0
  29. package/dist/plugin/onPlaceholder.js +68 -0
  30. package/dist/plugin/subscribeInsertUploadList.d.ts +6 -0
  31. package/dist/plugin/subscribeInsertUploadList.js +49 -0
  32. package/dist/plugin/subscribeSetTitle.d.ts +6 -0
  33. package/dist/plugin/subscribeSetTitle.js +16 -0
  34. package/dist/plugin/subscribeTransformComponentMeta.d.ts +14 -0
  35. package/dist/plugin/subscribeTransformComponentMeta.js +31 -0
  36. package/dist/plugin/subscribeValidateField.d.ts +7 -0
  37. package/dist/plugin/subscribeValidateField.js +57 -0
  38. package/dist/plugin/subscribeValidateUpload.d.ts +6 -0
  39. package/dist/plugin/subscribeValidateUpload.js +92 -0
  40. package/dist/utils/base64.d.ts +14 -0
  41. package/dist/utils/base64.js +14 -0
  42. package/dist/utils/buildInVariable.d.ts +61 -0
  43. package/dist/utils/buildInVariable.js +216 -0
  44. package/dist/utils/dom.d.ts +14 -0
  45. package/dist/utils/dom.js +19 -0
  46. package/dist/utils/index.d.ts +55 -0
  47. package/dist/utils/index.js +201 -0
  48. package/dist/utils/transform.d.ts +39 -0
  49. package/dist/utils/transform.js +191 -0
  50. package/dist/utils/validate.d.ts +7 -0
  51. package/dist/utils/validate.js +18 -0
  52. package/docs/.api/low-code-simulate-base.api.json +8450 -0
  53. package/jest.config.ts +20 -0
  54. package/package.json +45 -4
  55. package/src/VCComponent.ts +118 -0
  56. package/src/domain/BaseProjectDomain.ts +1341 -0
  57. package/src/domain/ComponentManager.ts +241 -0
  58. package/src/domain/DataHistoryDomain.ts +102 -0
  59. package/src/domain/PreviewDomain.ts +424 -0
  60. package/src/domain/ProjectDomain.ts +244 -0
  61. package/src/event/generateEventHandler.ts +162 -0
  62. package/src/event/generateEventSchema.ts +371 -0
  63. package/src/event/register.ts +181 -0
  64. package/src/index.ts +61 -0
  65. package/src/plugin/onH5PageValidate.ts +179 -0
  66. package/src/plugin/onPlaceholder.ts +71 -0
  67. package/src/plugin/subscribeInsertUploadList.ts +51 -0
  68. package/src/plugin/subscribeSetTitle.ts +18 -0
  69. package/src/plugin/subscribeTransformComponentMeta.ts +38 -0
  70. package/src/plugin/subscribeValidateField.ts +65 -0
  71. package/src/plugin/subscribeValidateUpload.ts +116 -0
  72. package/src/utils/base64.ts +17 -0
  73. package/src/utils/buildInVariable.ts +157 -0
  74. package/src/utils/dom.ts +30 -0
  75. package/src/utils/index.ts +194 -0
  76. package/src/utils/transform.ts +171 -0
  77. package/src/utils/validate.ts +19 -0
  78. package/temp/low-code-simulate-base.api.md +597 -0
  79. package/test/plugin.test.ts +4 -0
  80. package/tsconfig.build.json +9 -0
  81. package/tsconfig.json +9 -0
  82. package/tsconfig.test.json +14 -0
package/README.md CHANGED
@@ -1,3 +1 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # 模拟器基础包
@@ -0,0 +1,40 @@
1
+ import { findComponentById } from '../src/plugin/onH5PageValidate';
2
+ test('plugin/onH5PageValidate', () => {
3
+ const case1 = findComponentById([{ componentId: 1, title: '组件1' }], 1);
4
+ expect(case1).toEqual({ componentId: 1, title: '组件1' });
5
+ const case2 = findComponentById(
6
+ [
7
+ { componentId: 1, title: '组件1' },
8
+ {
9
+ componentId: 2,
10
+ title: '分组1',
11
+ children: [
12
+ {
13
+ componentId: 3,
14
+ title: '组件2',
15
+ },
16
+ {
17
+ componentId: 4,
18
+ title: '组件2',
19
+ },
20
+ ],
21
+ },
22
+ {
23
+ componentId: 5,
24
+ title: '分组2',
25
+ children: [
26
+ {
27
+ componentId: 6,
28
+ title: '组件3',
29
+ },
30
+ {
31
+ componentId: 7,
32
+ title: '组件4',
33
+ },
34
+ ],
35
+ },
36
+ ],
37
+ 6
38
+ );
39
+ expect(case2).toEqual({ componentId: 6, title: '组件3' });
40
+ });
@@ -0,0 +1,37 @@
1
+ import { getObjectPath } from '../src/utils/transform';
2
+
3
+ describe('getObjectPath', () => {
4
+
5
+ it('should handle basic objects', () => {
6
+ const obj = { a: 1, b: 2 };
7
+ const result = getObjectPath(obj);
8
+ expect(result).toEqual(['a', 'b']);
9
+ });
10
+
11
+ it('should handle nested objects', () => {
12
+ const obj = { a: { b: { c: 3 } } };
13
+ const result = getObjectPath(obj);
14
+ expect(result).toEqual(['a', 'a.b', 'a.b.c']);
15
+ });
16
+
17
+ it('should handle arrays', () => {
18
+ const obj = { a: [1, 2, 3] };
19
+ const result = getObjectPath(obj);
20
+ expect(result).toEqual(['a', 'a.0', 'a.1', 'a.2']);
21
+ });
22
+
23
+ it('should handle circular references', () => {
24
+ const obj = {} as any;
25
+ obj.self = obj;
26
+ const result = getObjectPath(obj);
27
+ expect(result).toEqual(['self']);
28
+ });
29
+
30
+ it('should handle non-object inputs', () => {
31
+ expect(getObjectPath(null)).toEqual([]);
32
+ expect(getObjectPath(123)).toEqual([]);
33
+ expect(getObjectPath('string')).toEqual([]);
34
+ expect(getObjectPath(undefined)).toEqual([]);
35
+ });
36
+
37
+ });
@@ -0,0 +1,36 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "projectFolder": "./",
4
+ "mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
5
+ "apiReport": {
6
+ "enabled": false
7
+ },
8
+ "docModel": {
9
+ "enabled": true,
10
+ "apiJsonFilePath": "./docs/.api/<unscopedPackageName>.api.json"
11
+ },
12
+ "dtsRollup": {
13
+ "enabled": false
14
+ },
15
+ "tsdocMetadata": {},
16
+ "messages": {
17
+ "compilerMessageReporting": {
18
+ "default": {
19
+ "logLevel": "warning"
20
+ }
21
+ },
22
+ "extractorMessageReporting": {
23
+ "default": {
24
+ "logLevel": "warning"
25
+ },
26
+ "ae-internal-missing-underscore": {
27
+ "logLevel": "none"
28
+ }
29
+ },
30
+ "tsdocMessageReporting": {
31
+ "default": {
32
+ "logLevel": "warning"
33
+ }
34
+ }
35
+ }
36
+ }
package/build/md.js ADDED
@@ -0,0 +1,25 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ /**
5
+ * 避免vitepress构建报错,转换部分字符
6
+ * @param {*} dir
7
+ */
8
+ function traverseDir(dir) {
9
+ fs.readdirSync(dir).forEach(file => {
10
+ const pathname = path.join(dir, file);
11
+ const stat = fs.statSync(pathname);
12
+ if (stat.isDirectory()) {
13
+ traverseDir(pathname);
14
+ } else if (stat.isFile() && path.extname(pathname) === '.md') {
15
+ let content = fs.readFileSync(pathname, 'utf-8');
16
+ content = content
17
+ .replace('Entity<T> EventEmitter', 'Entity\\<T\\> EventEmitter')
18
+ .replace(/[\{\}\<\>]/g, $0 => `\\${$0}`);
19
+
20
+ fs.writeFileSync(pathname, content, 'utf-8');
21
+ }
22
+ });
23
+ }
24
+
25
+ traverseDir(path.resolve(__dirname, '../docs/api'));
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @public
3
+ */
4
+ export declare const VcComponent: any;
5
+ export default VcComponent;
@@ -0,0 +1,91 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { h, getCurrentInstance, isVue3 } from 'vue-demi';
13
+ import * as Vue from 'vue-demi';
14
+ import { camelize } from '@cicctencent/ark-util';
15
+ import { generateEventHandlers } from './event/generateEventHandler';
16
+ function renderVue3(item) {
17
+ //@ts-ignore
18
+ var that = getCurrentInstance();
19
+ var name = item.name, componentId = item.componentId, _a = item.formData, style = _a.style, props = _a.props, _b = _a.event, event = _b === void 0 ? { list: [] } : _b;
20
+ var component;
21
+ if (isVue3) {
22
+ component = Vue.resolveComponent(name);
23
+ }
24
+ var _c = generateEventHandlers(
25
+ // this.$children[0],
26
+ that, event.list || []), on = _c.on, nativeOn = _c.nativeOn;
27
+ var eventObj = __assign(__assign({}, on), nativeOn);
28
+ var onEvent = {};
29
+ // 处理和过滤事件
30
+ Object.keys(eventObj).forEach(function (eventType) {
31
+ // 如果有生命周期的事件 不直接添加到组件上
32
+ if (['mounted'].includes(eventType))
33
+ return;
34
+ var eventKey = camelize("on-".concat(eventType));
35
+ onEvent[eventKey] = eventObj[eventType];
36
+ });
37
+ return h(component, __assign(__assign(__assign({ componentId: componentId }, props), { style: style, key: "".concat(name, "-").concat(componentId) }), onEvent), __assign({}, that.slots));
38
+ }
39
+ function renderVue2(item, c, thisArg) {
40
+ //@ts-ignore
41
+ var name = item.name, componentId = item.componentId, _a = item.formData, style = _a.style, props = _a.props, _b = _a.event, event = _b === void 0 ? { list: [] } : _b;
42
+ var _c = generateEventHandlers(
43
+ // this.$children[0],
44
+ thisArg, event.list || []), on = _c.on, nativeOn = _c.nativeOn;
45
+ // 获取所有的插槽(包括具名插槽和默认插槽)
46
+ var slots = __assign(__assign({}, thisArg.$slots), thisArg.$scopedSlots);
47
+ // 将插槽转换为函数对象
48
+ var scopedSlots = Object.keys(slots).reduce(function (acc, key) {
49
+ acc[key] = function (props) { return slots[key](props); };
50
+ return acc;
51
+ }, {});
52
+ return c(name, {
53
+ key: "".concat(name, "-").concat(componentId),
54
+ props: __assign({ componentId: componentId }, props),
55
+ style: style,
56
+ on: on,
57
+ nativeOn: nativeOn,
58
+ scopedSlots: scopedSlots
59
+ });
60
+ }
61
+ /**
62
+ * @public
63
+ */
64
+ export var VcComponent = {
65
+ name: 'VCComponent',
66
+ props: {
67
+ componentDescriptor: Object,
68
+ },
69
+ computed: {
70
+ eventObj: function () {
71
+ var _a = this.componentDescriptor.formData.event, event = _a === void 0 ? { list: [] } : _a;
72
+ var _b = generateEventHandlers(this, event.list || []), on = _b.on, nativeOn = _b.nativeOn;
73
+ return __assign(__assign({}, on), nativeOn);
74
+ },
75
+ },
76
+ mounted: function () {
77
+ if (Object.keys(this.eventObj).includes('mounted')) {
78
+ this.eventObj['mounted']();
79
+ }
80
+ },
81
+ render: function (c) {
82
+ var that = this;
83
+ return isVue3
84
+ ? renderVue3(that.componentDescriptor)
85
+ : renderVue2(that.componentDescriptor, c, that);
86
+ },
87
+ };
88
+ VcComponent.install = function (app) {
89
+ app.component('VcComponent', VcComponent);
90
+ };
91
+ export default VcComponent;
@@ -0,0 +1,389 @@
1
+ import type { NavTreeData, SchemaData, Component, ComponentTreeData, ComponentItem, MenuData, Project, GroupTree, LowCodeKey, ProjectData, FunctionData, FunctionConfig, EditorConfig } from '@cicctencent/low-code-core';
2
+ import { ComponentType } from '@cicctencent/low-code-core';
3
+ import ComponentManager from './ComponentManager';
4
+ /**
5
+ * @public
6
+ */
7
+ export interface ProjectDomainState {
8
+ basePath?: string;
9
+ project: Project;
10
+ pageConfig: Record<string, any>;
11
+ componentConfigs: Component[];
12
+ groupConfig: GroupTree[];
13
+ functionConfig: FunctionConfig;
14
+ }
15
+ import ProjectDomain from '../domain/ProjectDomain';
16
+ /**
17
+ * @public
18
+ */
19
+ export default class BaseProjectDomain extends ProjectDomain {
20
+ /**
21
+ * @public
22
+ * 获取配置
23
+ */
24
+ get config(): EditorConfig;
25
+ /**
26
+ * @public
27
+ */
28
+ staticPath: string;
29
+ /**
30
+ * @public
31
+ */
32
+ currentPageIndex: number;
33
+ /**
34
+ * @public
35
+ */
36
+ currentComponentPath: string;
37
+ /**
38
+ * @public
39
+ */
40
+ cManager: ComponentManager;
41
+ /**
42
+ * @public
43
+ */
44
+ get basePath(): string;
45
+ /**
46
+ * @public
47
+ */
48
+ constructor(state: ProjectDomainState);
49
+ /**
50
+ * @public
51
+ */
52
+ private Id2ComponentPathMap;
53
+ /**
54
+ * 根据id在pages中找到组件 生成componentPath
55
+ * @param id - 组件ID
56
+ * @returns 组件路径
57
+ * @example
58
+ * const pages = [{components:[{list:[{componentId:1}]}]}];
59
+ * const componentId = 1;
60
+ * generateComponentPath(componentId)
61
+ * // => 0.components.0.list.0
62
+ */
63
+ /**
64
+ * @public
65
+ */
66
+ generateComponentPath(id: number, pageIndex?: number): string;
67
+ /**
68
+ * @public
69
+ * 获取父组件数据
70
+ * @param childPath - 子组件路径
71
+ * @returns 父组件数据
72
+ */
73
+ getParent(childPath?: string): number | null;
74
+ /**
75
+ * @public
76
+ * 更新数据
77
+ * @param oldProject - 旧Project
78
+ * @returns true 新增记录 false 更新记录
79
+ */
80
+ needUpdateHistory(oldProject: any): boolean;
81
+ /**
82
+ * @public
83
+ * 根据组件路径获取组件位置、组件所在列表路径、组件父组件路径以及组件数据
84
+ * @param path - 组件路径
85
+ * @returns
86
+ * @example
87
+ */
88
+ getIndexByKey(path: string): {
89
+ index: number;
90
+ pageIndex: number;
91
+ componentListPath: string;
92
+ parentComponentPath: string;
93
+ component: ComponentItem;
94
+ };
95
+ /**
96
+ * @public
97
+ * 判断是否符合插入容器组件的条件
98
+ * @param child - 子容器组件配置
99
+ * @param container - 容器组件数据
100
+ * @returns
101
+ * @example
102
+ */
103
+ canInsertContainer(child: Component, container: ComponentItem): boolean;
104
+ /**
105
+ * @public
106
+ * @param name - 组件名
107
+ * @param data - 数据
108
+ */
109
+ action(name: string, data: any): void;
110
+ /**
111
+ * @public
112
+ */
113
+ get title(): string;
114
+ /**
115
+ * @public
116
+ */
117
+ get isNoLogin(): boolean;
118
+ /**
119
+ * @public
120
+ */
121
+ get pages(): ProjectData;
122
+ /**
123
+ * @public
124
+ */
125
+ get components(): ComponentItem[];
126
+ /**
127
+ * @public
128
+ * 含包含config的数据
129
+ */
130
+ get componentsWithConfig(): {
131
+ componentId: number;
132
+ formData: import("@cicctencent/low-code-core").ComponentFormData;
133
+ children?: ComponentItem[];
134
+ placeholderConfig?: import("@cicctencent/low-code-core").PlaceholderConfig;
135
+ slotName?: string;
136
+ insertConfig?: {
137
+ syncChildrenName?: string;
138
+ syncChildrenProp?: string;
139
+ allowList: string[];
140
+ allowErrorMessage: string;
141
+ aloneList: string[];
142
+ aloneErrorMessage: string;
143
+ };
144
+ guideConfig?: {
145
+ sampleUrl: string;
146
+ explain: string;
147
+ skill: string;
148
+ };
149
+ copyClearPaths?: string[];
150
+ customCopy?: boolean;
151
+ name: string;
152
+ group?: string;
153
+ icon?: string;
154
+ picture?: string;
155
+ type: ComponentType;
156
+ invalid?: boolean;
157
+ immobile?: boolean;
158
+ unlinkable?: boolean;
159
+ title: string;
160
+ key?: LowCodeKey;
161
+ isNoLogin?: boolean;
162
+ config?: {
163
+ props?: import("@cicctencent/low-code-core").Schema;
164
+ style?: import("@cicctencent/low-code-core").Schema;
165
+ event?: import("@cicctencent/low-code-core").Schema;
166
+ };
167
+ slot?: Record<string | number, Component>;
168
+ childContainer?: Component;
169
+ }[];
170
+ /**
171
+ * @public
172
+ */
173
+ get pageMeta(): {
174
+ props?: Record<string, any>;
175
+ style?: Record<string, any>;
176
+ plugin?: Record<string, any>;
177
+ event?: Record<string, any>;
178
+ };
179
+ /**
180
+ * @public
181
+ */
182
+ get currentComponent(): any;
183
+ /**
184
+ * @public
185
+ * 获取导航树数据
186
+ */
187
+ get navTreeData(): NavTreeData[];
188
+ /**
189
+ * @public
190
+ * 获取当前配置表单数据
191
+ */
192
+ get schemaData(): SchemaData;
193
+ /**
194
+ * @public
195
+ * 获取组件树数据
196
+ */
197
+ get componentTreeData(): ComponentTreeData;
198
+ /**
199
+ * @public
200
+ * 获取右键菜单数据 没有考虑有容器组件的情况
201
+ */
202
+ get menuData(): MenuData;
203
+ /**
204
+ * @public
205
+ * 生成占位词对应的真实数据
206
+ * @param index - 校验时需要传入的组件位置
207
+ * @returns
208
+ */
209
+ getComponentSelectors(index?: number): {
210
+ label: string;
211
+ value: string;
212
+ }[];
213
+ /**
214
+ * @public
215
+ * 当前组件之后的选择器选项(不包括当前组件)
216
+ * @param index - 下标
217
+ * @returns
218
+ */
219
+ getAfterComponentSelectors(index?: number): {
220
+ label: string;
221
+ value: string;
222
+ }[];
223
+ /**
224
+ * @public
225
+ * 占位词映射表
226
+ * @param index - 下标
227
+ * @returns
228
+ */
229
+ getFlagWordMap(index?: number): {
230
+ $componentSelectors: {
231
+ label: string;
232
+ value: string;
233
+ }[];
234
+ $afterComponentSelectors: {
235
+ label: string;
236
+ value: string;
237
+ }[];
238
+ $componentId: any;
239
+ $componentName: any;
240
+ $components: ComponentItem[];
241
+ };
242
+ /**
243
+ * @public
244
+ * 激活导航树
245
+ * @param key - 组件LowCodeKey
246
+ */
247
+ activate(key: LowCodeKey): void;
248
+ /**
249
+ * @public
250
+ * 生成编辑器删除操作二次确认弹出框所需的数据
251
+ * @param key - 组件LowCodeKey
252
+ * @returns
253
+ */
254
+ componentDeleteWithConfirm(key: LowCodeKey): void;
255
+ /**
256
+ * @public
257
+ * 组件列表元素处理
258
+ * @param start - 组件插入的位置
259
+ * @param deleteNum - 删除的组件个数
260
+ * @param item - 组件数据
261
+ * @param componentListPath - 组件所在列表的路径
262
+ * @returns
263
+ * @example
264
+ */
265
+ componentListSplice(start: number, deleteNum: number, item?: ComponentItem | Component, componentListPath?: string): any[];
266
+ /**
267
+ * @public
268
+ * 移动组件到某个位置
269
+ * @param originPath - 原路径
270
+ * @param newPath - 目标路径
271
+ * @example
272
+ * moveTo('0.components.0.list.0', '0.components.0.list.1')
273
+ **/
274
+ moveTo(originPath: any, newPath: any): void;
275
+ /**
276
+ * @public
277
+ * 删除组件
278
+ * @param key - 组件LowCodeKey
279
+ * @returns
280
+ */
281
+ componentDelete(key: LowCodeKey): void;
282
+ /**
283
+ * @public
284
+ * 复制组件
285
+ * @param key - 组件LowCodeKey
286
+ * @returns
287
+ */
288
+ componentCopy(key: LowCodeKey): void;
289
+ /**
290
+ * @public
291
+ * 拖动组件
292
+ * @param key - 组件LowCodeKey
293
+ * @param value - 数据
294
+ */
295
+ componentDrag(key: LowCodeKey, value: {
296
+ x: number;
297
+ y: number;
298
+ name: string;
299
+ }): void;
300
+ /**
301
+ * @public
302
+ * 点击时插入组件 直接插到模拟器最后
303
+ * @param key - 组件LowCodeKey
304
+ * @returns
305
+ */
306
+ componentInsert(key: LowCodeKey): void;
307
+ /**
308
+ * @public
309
+ * 组件上移
310
+ * @param key - 组件LowCodeKey
311
+ * @returns
312
+ */
313
+ componentMoveUp(key: LowCodeKey): void;
314
+ /**
315
+ * @public
316
+ * 组件下移
317
+ * @param key - 组件LowCodeKey
318
+ * @returns
319
+ */
320
+ componentMoveDown(key: LowCodeKey): void;
321
+ /**
322
+ * @public
323
+ * 打开图片上传
324
+ * @param key - 组件LowCodeKey
325
+ * @returns
326
+ */
327
+ componentImageOpen(key: LowCodeKey): void;
328
+ /**
329
+ * @public
330
+ * 修改表单更新项目数据
331
+ * @param path - 路径
332
+ * @param value - 值
333
+ */
334
+ setPathDataWithValidate(path: string, value: any): void;
335
+ /**
336
+ * @public
337
+ * 设置project数据 构造函数里和init时调用
338
+ * @param project - 项目数据
339
+ */
340
+ setProject(project: any): void;
341
+ /**
342
+ * @public
343
+ * 替换project数据 undo,redo
344
+ * @param project - project数据
345
+ */
346
+ replaceProject(project: any): void;
347
+ /**
348
+ * @public
349
+ * @param result - 模拟器校验二倍图的结果
350
+ * @param path - 图片地址的路径
351
+ * @returns
352
+ */
353
+ validateImage(result: boolean, path: string, imgUrl: string): {
354
+ text?: undefined;
355
+ icon?: undefined;
356
+ guide?: undefined;
357
+ } | {
358
+ text: any;
359
+ icon: string;
360
+ guide: any;
361
+ };
362
+ /**
363
+ * @public
364
+ * todo: 挪走
365
+ * 二倍图校验失败需要返回的弹窗配置
366
+ * @returns
367
+ */
368
+ validateImageFail(imgUrl: string): {
369
+ text?: undefined;
370
+ icon?: undefined;
371
+ guide?: undefined;
372
+ } | {
373
+ text: any;
374
+ icon: string;
375
+ guide: any;
376
+ };
377
+ /**
378
+ * @public
379
+ * 获取功能数据
380
+ */
381
+ get functionData(): FunctionData;
382
+ /**
383
+ * @public
384
+ * @param componentId - 组件id
385
+ * @param newValue - 新的值
386
+ * @param oldValue - 旧的值
387
+ */
388
+ syncChildren(componentId: number, newValue?: any[], oldValue?: any[]): void;
389
+ }