@cicctencent/low-code-editor 0.0.0-stage → 1.1.9-beta.5

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 (97) hide show
  1. package/README.md +2 -2
  2. package/api-extractor.json +36 -0
  3. package/dist/ActivityBar/index.vue.d.ts +29 -0
  4. package/dist/ComponentTree/components/List.vue.d.ts +29 -0
  5. package/dist/ComponentTree/index.vue.d.ts +32 -0
  6. package/dist/DataSource/index.vue.d.ts +34 -0
  7. package/dist/HeaderBar/components/BarTooltip.vue.d.ts +37 -0
  8. package/dist/HeaderBar/index.vue.d.ts +49 -0
  9. package/dist/NavTree/index.vue.d.ts +48 -0
  10. package/dist/SchemaConfig/index.vue.d.ts +36 -0
  11. package/dist/SidebarPane/index.vue.d.ts +38 -0
  12. package/dist/components/ComponentTreeFavorites/components/List.vue.d.ts +41 -0
  13. package/dist/components/ComponentTreeFavorites/components/Tips.vue.d.ts +16 -0
  14. package/dist/components/ComponentTreeFavorites/index.vue.d.ts +44 -0
  15. package/dist/components/ImageGuide/index.vue.d.ts +45 -0
  16. package/dist/components.d.ts +7 -0
  17. package/dist/composables/useComponentTree.d.ts +13 -0
  18. package/dist/config/ace.config.d.ts +3 -0
  19. package/dist/domain/EditorDomain.d.ts +89 -0
  20. package/dist/editor.d.ts +286 -0
  21. package/dist/editor.vue.d.ts +104 -0
  22. package/dist/formily/ActivityBar/index.d.ts +4 -0
  23. package/dist/formily/ComponentTree/index.d.ts +4 -0
  24. package/dist/formily/DataBinding/index.d.ts +4 -0
  25. package/dist/formily/DataBinding/index.vue.d.ts +26 -0
  26. package/dist/formily/DataSource/index.d.ts +4 -0
  27. package/dist/formily/MenuTable/PageList.vue.d.ts +28 -0
  28. package/dist/formily/MenuTable/index.d.ts +4 -0
  29. package/dist/formily/MenuTable/index.vue.d.ts +30 -0
  30. package/dist/formily/MenuTable/useMenuTable.d.ts +227 -0
  31. package/dist/formily/NavTree/index.d.ts +4 -0
  32. package/dist/formily/SidebarPane/index.d.ts +4 -0
  33. package/dist/formily/index.d.ts +2 -0
  34. package/dist/index.css +1167 -0
  35. package/dist/index.d.ts +250 -0
  36. package/dist/index.js +34171 -0
  37. package/dist/utils/base64.d.ts +4 -0
  38. package/dist/utils/index.d.ts +27 -0
  39. package/package.json +58 -4
  40. package/rollup.config.js +3 -0
  41. package/src/ActivityBar/index.vue +71 -0
  42. package/src/ComponentTree/components/List.vue +310 -0
  43. package/src/ComponentTree/index.vue +77 -0
  44. package/src/DataSource/index.vue +640 -0
  45. package/src/HeaderBar/components/BarDialog.vue +43 -0
  46. package/src/HeaderBar/components/BarTooltip.vue +33 -0
  47. package/src/HeaderBar/index.vue +513 -0
  48. package/src/NavTree/index.vue +345 -0
  49. package/src/SchemaConfig/index.vue +150 -0
  50. package/src/SidebarPane/index.vue +199 -0
  51. package/src/SynBarComponent/index.vue +31 -0
  52. package/src/assets/font/NotoSansSC.ttf +0 -0
  53. package/src/assets/img/header/edit.png +0 -0
  54. package/src/assets/img/header/link.png +0 -0
  55. package/src/assets/img/header/link.svg +9 -0
  56. package/src/assets/img/header/preview.png +0 -0
  57. package/src/assets/img/header/preview.svg +9 -0
  58. package/src/assets/img/header/redo.svg +1 -0
  59. package/src/assets/img/header/undo.svg +1 -0
  60. package/src/assets/img/tool/all-select.svg +9 -0
  61. package/src/assets/img/tool/all.svg +9 -0
  62. package/src/assets/img/tool/collect.svg +6 -0
  63. package/src/assets/img/tool/collection-select.svg +3 -0
  64. package/src/assets/img/tool/collection-tag.svg +5 -0
  65. package/src/assets/img/tool/info.svg +4 -0
  66. package/src/assets/img/tool/union.svg +4 -0
  67. package/src/components/ComponentTreeFavorites/components/List.vue +452 -0
  68. package/src/components/ComponentTreeFavorites/components/Tips.vue +108 -0
  69. package/src/components/ComponentTreeFavorites/index.vue +180 -0
  70. package/src/components/ImageGuide/index.vue +100 -0
  71. package/src/components.ts +23 -0
  72. package/src/composables/useComponentTree.ts +38 -0
  73. package/src/config/ace.config.ts +22 -0
  74. package/src/domain/EditorDomain.ts +265 -0
  75. package/src/editor.ts +645 -0
  76. package/src/editor.vue +380 -0
  77. package/src/formily/ActivityBar/index.ts +23 -0
  78. package/src/formily/ActivityBar/index.vue +121 -0
  79. package/src/formily/ComponentTree/index.ts +22 -0
  80. package/src/formily/DataBinding/index.ts +22 -0
  81. package/src/formily/DataBinding/index.vue +285 -0
  82. package/src/formily/DataSource/index.ts +22 -0
  83. package/src/formily/MenuTable/PageList.vue +132 -0
  84. package/src/formily/MenuTable/index.ts +19 -0
  85. package/src/formily/MenuTable/index.vue +218 -0
  86. package/src/formily/MenuTable/useMenuTable.ts +147 -0
  87. package/src/formily/NavTree/index.ts +20 -0
  88. package/src/formily/SidebarPane/index.ts +23 -0
  89. package/src/formily/SidebarPane/index.vue +174 -0
  90. package/src/formily/index.ts +12 -0
  91. package/src/index.ts +29 -0
  92. package/src/typings/vue-shim.d.ts +13 -0
  93. package/src/utils/base64.ts +5 -0
  94. package/src/utils/index.ts +57 -0
  95. package/test/case.ts +67 -0
  96. package/test/utils/index.test.ts +27 -0
  97. package/tsconfig.json +8 -0
@@ -0,0 +1,286 @@
1
+ import { CheckResponseItem, LowCodeKey, SendReq } from '@jt/low-code-core';
2
+ export default function (props: any, emits: any): {
3
+ menuData: import("vue").Ref<any[]>;
4
+ guideVisible: import("vue").Ref<boolean>;
5
+ guideData: import("vue").Ref<any>;
6
+ onUpdateScale: ({ key, scale }: {
7
+ key: any;
8
+ scale: any;
9
+ }) => void;
10
+ onSelect: (key: LowCodeKey) => void;
11
+ onSelectPage: () => void;
12
+ onMenuOpen: (key: LowCodeKey) => void;
13
+ onSplice: (data: any) => void;
14
+ onMenuClick: (key: LowCodeKey) => void;
15
+ onSubmitEdit: (key: any, data: any) => void;
16
+ onAddItem: ({ key, value }: {
17
+ key: any;
18
+ value: any;
19
+ }) => void;
20
+ onDragEnd: ({ key, value }: {
21
+ key: any;
22
+ value: any;
23
+ }, isCors: any) => void;
24
+ onDragover: (e: any) => void;
25
+ onDrop: (v: any, e: any) => void;
26
+ onDragenter: (e: any) => void;
27
+ onSchemaFormChange: ({ key, value }: {
28
+ key: any;
29
+ value: any;
30
+ }) => void;
31
+ onDragleave: (e: any) => void;
32
+ onSchemaUpload: (file: any, done: any, config: any) => Promise<void>;
33
+ fillData: (data: CheckResponseItem[]) => Promise<any>;
34
+ onIconClick: (key: LowCodeKey) => void;
35
+ validate: () => Promise<any>;
36
+ editTitle: (data: any) => void;
37
+ onOpenCloud: (data: any, done: any) => Promise<void>;
38
+ onSchemaGetData: (cmdname: string, done: any, cmdParams: any) => void;
39
+ onPreloadCloud: (url: any) => void;
40
+ onEditTitle: (key: any) => Promise<void>;
41
+ updateNavMenuConf: (navMenuConf: any) => void;
42
+ loading: import("vue").Ref<boolean>;
43
+ onUndo: ({ key }: {
44
+ key: any;
45
+ }) => Promise<void>;
46
+ onRedo: ({ key }: {
47
+ key: any;
48
+ }) => Promise<void>;
49
+ viewScalePercent: import("vue").ComputedRef<number>;
50
+ dialog: {
51
+ visible: boolean;
52
+ renderData: {
53
+ title: string;
54
+ width?: string;
55
+ schema: import("@jt/low-code-core").Schema;
56
+ formData: Record<string, any>;
57
+ confirmButton: {
58
+ text: string;
59
+ key?: {
60
+ module?: string;
61
+ action?: string;
62
+ component?: string;
63
+ path?: string;
64
+ };
65
+ };
66
+ cancelButton: {
67
+ text: string;
68
+ key?: {
69
+ module?: string;
70
+ action?: string;
71
+ component?: string;
72
+ path?: string;
73
+ };
74
+ };
75
+ };
76
+ };
77
+ onEditDialogConfirm: () => void;
78
+ onEditDialogCancel: () => void;
79
+ onDialogSchemaChange: (values: any) => void;
80
+ activeBarName: import("vue").Ref<string>;
81
+ onDataSourceChange: ({ type, data }: {
82
+ type: any;
83
+ data: any;
84
+ }) => void;
85
+ onGetEntityList: (done: any) => void;
86
+ onGetMethodList: (done: any, entityId: any) => void;
87
+ onClick: () => void;
88
+ onInitValidateRule: (callback: any) => void;
89
+ timestamp: import("vue").Ref<number>;
90
+ send: (payload: SendReq) => Promise<Record<string, any>>;
91
+ navTreeRef: import("vue").Ref<any>;
92
+ project: import("vue").Ref<any>;
93
+ config: import("vue").Ref<{
94
+ navTreeData?: {
95
+ key: {
96
+ module?: string;
97
+ action?: string;
98
+ component?: string;
99
+ path?: string;
100
+ };
101
+ value: {
102
+ title: string;
103
+ type?: import("@jt/low-code-core").ComponentType;
104
+ key?: {
105
+ module?: string;
106
+ action?: string;
107
+ component?: string;
108
+ path?: string;
109
+ };
110
+ icon?: string;
111
+ activity?: boolean;
112
+ rightIcon?: {
113
+ key: {
114
+ module?: string;
115
+ action?: string;
116
+ component?: string;
117
+ path?: string;
118
+ };
119
+ icon: string;
120
+ };
121
+ children?: any[];
122
+ componentId?: number;
123
+ immobile?: boolean;
124
+ }[];
125
+ };
126
+ componentTreeData?: {
127
+ key: {
128
+ module?: string;
129
+ action?: string;
130
+ component?: string;
131
+ path?: string;
132
+ };
133
+ value: {
134
+ title: string;
135
+ list: (any | {
136
+ name: string;
137
+ isNoLogin?: boolean;
138
+ type: import("@jt/low-code-core").ComponentType;
139
+ title: string;
140
+ icon: string;
141
+ key: {
142
+ module?: string;
143
+ action?: string;
144
+ component?: string;
145
+ path?: string;
146
+ };
147
+ })[];
148
+ }[];
149
+ };
150
+ functionData?: {
151
+ undo?: {
152
+ key: {
153
+ module?: string;
154
+ action?: string;
155
+ component?: string;
156
+ path?: string;
157
+ };
158
+ value?: boolean;
159
+ clickable?: boolean;
160
+ };
161
+ redo?: {
162
+ key: {
163
+ module?: string;
164
+ action?: string;
165
+ component?: string;
166
+ path?: string;
167
+ };
168
+ value?: boolean;
169
+ clickable?: boolean;
170
+ };
171
+ status?: {
172
+ key: {
173
+ module?: string;
174
+ action?: string;
175
+ component?: string;
176
+ path?: string;
177
+ };
178
+ value: string;
179
+ };
180
+ title?: {
181
+ key: {
182
+ module?: string;
183
+ action?: string;
184
+ component?: string;
185
+ path?: string;
186
+ };
187
+ value: string;
188
+ };
189
+ simulatorSizeList?: {
190
+ key: {
191
+ module?: string;
192
+ action?: string;
193
+ component?: string;
194
+ path?: string;
195
+ };
196
+ value: {
197
+ options: {
198
+ label: string;
199
+ value: {
200
+ width: number;
201
+ height: number;
202
+ };
203
+ name: string;
204
+ default?: boolean;
205
+ }[];
206
+ data: {
207
+ width: string;
208
+ height: string;
209
+ percent?: number;
210
+ sizeMode?: "auto" | "simulator";
211
+ };
212
+ };
213
+ };
214
+ save?: {
215
+ key: {
216
+ module?: string;
217
+ action?: string;
218
+ component?: string;
219
+ path?: string;
220
+ };
221
+ value?: {
222
+ readonly?: boolean;
223
+ };
224
+ };
225
+ publish?: {
226
+ key: {
227
+ module?: string;
228
+ action?: string;
229
+ component?: string;
230
+ path?: string;
231
+ };
232
+ value?: {
233
+ readonly?: boolean;
234
+ };
235
+ };
236
+ };
237
+ schemaData?: {
238
+ key?: {
239
+ module?: string;
240
+ action?: string;
241
+ component?: string;
242
+ path?: string;
243
+ };
244
+ title?: string;
245
+ schema?: Record<string, any>;
246
+ data?: Record<string, any>;
247
+ componentId?: number;
248
+ };
249
+ activityBarList?: {
250
+ title: string;
251
+ name: string;
252
+ icon: string;
253
+ paneConfig: {
254
+ type: "float" | "fixed";
255
+ name: string;
256
+ showHeader: boolean;
257
+ };
258
+ }[];
259
+ primarySidebarData?: {
260
+ componentName: string;
261
+ componentProps: any;
262
+ sidebarPaneConfig: {
263
+ type: "float" | "fixed";
264
+ name: string;
265
+ showHeader: boolean;
266
+ };
267
+ };
268
+ }>;
269
+ communicator: import("vue").Ref<{
270
+ isReady: boolean;
271
+ publish: (cmdname: string, data: Record<string, any>) => Promise<import("@jt/postmessage-channel").PostResponse>;
272
+ subscribe: (cmdname: string, callback: import("@jt/postmessage-channel").PostCallback) => import("@jt/postmessage-channel").Communicator;
273
+ destroy: () => void;
274
+ }>;
275
+ request: import("vue").Ref<Function>;
276
+ iframe: import("vue").Ref<HTMLIFrameElement>;
277
+ iframeMaskFlag: import("vue").Ref<boolean>;
278
+ viewScaleStyle: import("vue").ComputedRef<any>;
279
+ viewIframeBoxStyle: import("vue").ComputedRef<{
280
+ width: string;
281
+ height: string;
282
+ } | {
283
+ width?: undefined;
284
+ height?: undefined;
285
+ }>;
286
+ };
@@ -0,0 +1,104 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ editorData: {
3
+ type: any;
4
+ required: false;
5
+ };
6
+ url: {
7
+ type: StringConstructor;
8
+ required: true;
9
+ };
10
+ request: {
11
+ type: FunctionConstructor;
12
+ required: false;
13
+ };
14
+ postMessageOption: {
15
+ type: any;
16
+ required: false;
17
+ };
18
+ readOnly: {
19
+ type: BooleanConstructor;
20
+ required: false;
21
+ default: boolean;
22
+ };
23
+ appConfig: {
24
+ type: any;
25
+ required: false;
26
+ default: Record<string, any>;
27
+ };
28
+ categoryList: {
29
+ type: ArrayConstructor;
30
+ required: false;
31
+ };
32
+ navBarComponents: {
33
+ type: any;
34
+ required: false;
35
+ };
36
+ onMessage: {
37
+ type: FunctionConstructor;
38
+ required: false;
39
+ };
40
+ }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
41
+ [key: string]: any;
42
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("save" | "upload" | "publish" | "preview" | "copyUrl" | "editTitle" | "autoSave" | "updateProject" | "updateScreenShot" | "openUpload" | "getData" | "openCloud" | "preloadCloud" | "editDialogConfirm" | "editDialogCancel")[], "save" | "upload" | "publish" | "preview" | "copyUrl" | "editTitle" | "autoSave" | "updateProject" | "updateScreenShot" | "openUpload" | "getData" | "openCloud" | "preloadCloud" | "editDialogConfirm" | "editDialogCancel", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
+ editorData: {
44
+ type: any;
45
+ required: false;
46
+ };
47
+ url: {
48
+ type: StringConstructor;
49
+ required: true;
50
+ };
51
+ request: {
52
+ type: FunctionConstructor;
53
+ required: false;
54
+ };
55
+ postMessageOption: {
56
+ type: any;
57
+ required: false;
58
+ };
59
+ readOnly: {
60
+ type: BooleanConstructor;
61
+ required: false;
62
+ default: boolean;
63
+ };
64
+ appConfig: {
65
+ type: any;
66
+ required: false;
67
+ default: Record<string, any>;
68
+ };
69
+ categoryList: {
70
+ type: ArrayConstructor;
71
+ required: false;
72
+ };
73
+ navBarComponents: {
74
+ type: any;
75
+ required: false;
76
+ };
77
+ onMessage: {
78
+ type: FunctionConstructor;
79
+ required: false;
80
+ };
81
+ }>> & {
82
+ onSave?: (...args: any[]) => any;
83
+ onUpload?: (...args: any[]) => any;
84
+ onPublish?: (...args: any[]) => any;
85
+ onPreview?: (...args: any[]) => any;
86
+ onCopyUrl?: (...args: any[]) => any;
87
+ onEditTitle?: (...args: any[]) => any;
88
+ onAutoSave?: (...args: any[]) => any;
89
+ onUpdateProject?: (...args: any[]) => any;
90
+ onUpdateScreenShot?: (...args: any[]) => any;
91
+ onOpenUpload?: (...args: any[]) => any;
92
+ onGetData?: (...args: any[]) => any;
93
+ onOpenCloud?: (...args: any[]) => any;
94
+ onPreloadCloud?: (...args: any[]) => any;
95
+ onEditDialogConfirm?: (...args: any[]) => any;
96
+ onEditDialogCancel?: (...args: any[]) => any;
97
+ }, {
98
+ editorData: any;
99
+ postMessageOption: any;
100
+ readOnly: boolean;
101
+ appConfig: any;
102
+ navBarComponents: any;
103
+ }, {}>;
104
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import JtActivityBar from './index.vue';
2
+ export declare type JtActivityBarProps = typeof JtActivityBar;
3
+ export declare const ActivityBar: any;
4
+ export default ActivityBar;
@@ -0,0 +1,4 @@
1
+ import JtComponentTree from '../../ComponentTree/index.vue';
2
+ export declare type JtComponentTreeProps = typeof JtComponentTree;
3
+ export declare const ActivityBar: any;
4
+ export default ActivityBar;
@@ -0,0 +1,4 @@
1
+ import JtDataBinding from './index.vue';
2
+ export declare type JtDataBindingProps = typeof JtDataBinding;
3
+ export declare const MenuTable: any;
4
+ export default MenuTable;
@@ -0,0 +1,26 @@
1
+ import { PropType } from 'vue';
2
+ import '../../config/ace.config';
3
+ import { DataSource } from '@jt/low-code-core';
4
+ declare const _default: import("vue").DefineComponent<{
5
+ schema: ObjectConstructor;
6
+ modelValue: StringConstructor;
7
+ sourceList: {
8
+ type: PropType<DataSource[]>;
9
+ default: () => any[];
10
+ };
11
+ }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ [key: string]: any;
13
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "getBindingValue")[], "update:modelValue" | "getBindingValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
+ schema: ObjectConstructor;
15
+ modelValue: StringConstructor;
16
+ sourceList: {
17
+ type: PropType<DataSource[]>;
18
+ default: () => any[];
19
+ };
20
+ }>> & {
21
+ "onUpdate:modelValue"?: (...args: any[]) => any;
22
+ onGetBindingValue?: (...args: any[]) => any;
23
+ }, {
24
+ sourceList: DataSource[];
25
+ }, {}>;
26
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import JtDataSource from '../../dataSource/index.vue';
2
+ export declare type JtDataSourceProps = typeof JtDataSource;
3
+ export declare const ActivityBar: any;
4
+ export default ActivityBar;
@@ -0,0 +1,28 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: NumberConstructor;
4
+ required: true;
5
+ default: number;
6
+ };
7
+ project: {
8
+ type: any;
9
+ required: true;
10
+ };
11
+ }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
12
+ [key: string]: any;
13
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
14
+ modelValue: {
15
+ type: NumberConstructor;
16
+ required: true;
17
+ default: number;
18
+ };
19
+ project: {
20
+ type: any;
21
+ required: true;
22
+ };
23
+ }>> & {
24
+ "onUpdate:modelValue"?: (...args: any[]) => any;
25
+ }, {
26
+ modelValue: number;
27
+ }, {}>;
28
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import JtMenuTable from './index.vue';
2
+ export declare type JtMenuTableProps = typeof JtMenuTable;
3
+ export declare const MenuTable: any;
4
+ export default MenuTable;
@@ -0,0 +1,30 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ modelValue: {
3
+ type: ArrayConstructor;
4
+ default: () => {
5
+ name: string;
6
+ icon: string;
7
+ pageId: number;
8
+ children: any[];
9
+ }[];
10
+ };
11
+ project: ObjectConstructor;
12
+ }, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
13
+ [key: string]: any;
14
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
+ modelValue: {
16
+ type: ArrayConstructor;
17
+ default: () => {
18
+ name: string;
19
+ icon: string;
20
+ pageId: number;
21
+ children: any[];
22
+ }[];
23
+ };
24
+ project: ObjectConstructor;
25
+ }>> & {
26
+ "onUpdate:modelValue"?: (...args: any[]) => any;
27
+ }, {
28
+ modelValue: unknown[];
29
+ }, {}>;
30
+ export default _default;