@vtj/designer 0.16.11 → 0.16.13

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 (29) hide show
  1. package/dist/Editor-Ce_uPB1q.js +4 -0
  2. package/dist/{index-D40kzfbN.js → index-Cm-7k5DS.js} +1397 -1391
  3. package/dist/index.mjs +1 -1
  4. package/package.json +7 -7
  5. package/types/components/hooks/useAI.d.ts +1 -1
  6. package/types/components/hooks/useOpenApi.d.ts +1 -1
  7. package/types/components/setters/image.d.ts +42 -267
  8. package/types/components/setters/index.d.ts +42 -266
  9. package/types/components/shared/binder.d.ts +56 -304
  10. package/types/components/shared/panel.d.ts +5 -13
  11. package/types/components/shared/viewer.d.ts +1231 -199
  12. package/types/components/widgets/ai/image-input.d.ts +42 -267
  13. package/types/components/widgets/ai/index.d.ts +4 -10
  14. package/types/components/widgets/ai/json-input.d.ts +120 -570
  15. package/types/components/widgets/apis/form.d.ts +32 -163
  16. package/types/components/widgets/apis/swagger.d.ts +2 -4
  17. package/types/components/widgets/designer/index.d.ts +2 -4
  18. package/types/components/widgets/devtools/index.d.ts +4 -10
  19. package/types/components/widgets/docs/index.d.ts +4 -10
  20. package/types/components/widgets/env/index.d.ts +2 -4
  21. package/types/components/widgets/i18n/index.d.ts +2 -4
  22. package/types/components/widgets/index.d.ts +16 -46
  23. package/types/components/widgets/market/index.d.ts +4 -10
  24. package/types/components/widgets/scripts/group.d.ts +38 -220
  25. package/types/components/widgets/style/spacing-input.d.ts +2 -4
  26. package/types/framework/openapi.d.ts +1 -1
  27. package/types/utils.d.ts +20 -16
  28. package/types/version.d.ts +2 -2
  29. package/dist/Editor-K7Frwt8a.js +0 -4
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, a as E, b as t, c as r, d as n, C as i, D as S, e as _, E as o, f as I, g as T, h as O, G as l, H as d, i as p, j as g, K as V, M as R, k as A, l as D, N, m as P, O as L, P as M, n as c, R as K, o as m, p as u, q as Y, S as b, r as B, s as G, t as U, u as W, v as y, w as F, x as f, y as k, z as w, T as x, B as C, F as H, V as X, I as J, J as Z, L as h, Q as j, U as v, W as z, X as q, Y as Q, Z as $, $ as aa, a0 as sa, a1 as ea, a2 as Ea, a3 as ta, a4 as ra, a5 as na, a6 as ia, a7 as Sa, a8 as _a, a9 as oa, aa as Ia, ab as Ta, ac as Oa, ad as la, ae as da, af as pa, ag as ga, ah as Va, ai as Ra, aj as Aa, ak as Da, al as Na, am as Pa, an as La } from "./index-D40kzfbN.js";
1
+ import { A as e, a as E, b as t, c as r, d as n, C as i, D as S, e as _, E as o, f as I, g as T, h as O, G as l, H as d, i as p, j as g, K as V, M as R, k as A, l as D, N, m as P, O as L, P as M, n as c, R as K, o as m, p as u, q as Y, S as b, r as B, s as G, t as U, u as W, v as y, w as F, x as f, y as k, z as w, T as x, B as C, F as H, V as X, I as J, J as Z, L as h, Q as j, U as v, W as z, X as q, Y as Q, Z as $, $ as aa, a0 as sa, a1 as ea, a2 as Ea, a3 as ta, a4 as ra, a5 as na, a6 as ia, a7 as Sa, a8 as _a, a9 as oa, aa as Ia, ab as Ta, ac as Oa, ad as la, ae as da, af as pa, ag as ga, ah as Va, ai as Ra, aj as Aa, ak as Da, al as Na, am as Pa, an as La } from "./index-Cm-7k5DS.js";
2
2
  export {
3
3
  e as API_METHOD_TYPES,
4
4
  E as ActionMenu,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/designer",
3
3
  "private": false,
4
- "version": "0.16.11",
4
+ "version": "0.16.13",
5
5
  "type": "module",
6
6
  "keywords": [
7
7
  "低代码引擎",
@@ -29,12 +29,12 @@
29
29
  "marked": "~17.0.1",
30
30
  "mockjs": "~1.1.0",
31
31
  "monaco-editor": "~0.55.0",
32
- "@vtj/core": "~0.16.11",
33
- "@vtj/icons": "~0.16.11",
34
- "@vtj/renderer": "~0.16.11",
35
- "@vtj/uni": "~0.16.11",
36
- "@vtj/ui": "~0.16.11",
37
- "@vtj/utils": "~0.16.11"
32
+ "@vtj/core": "~0.16.13",
33
+ "@vtj/icons": "~0.16.13",
34
+ "@vtj/renderer": "~0.16.13",
35
+ "@vtj/uni": "~0.16.13",
36
+ "@vtj/utils": "~0.16.13",
37
+ "@vtj/ui": "~0.16.13"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/mockjs": "~1.0.10",
@@ -221,7 +221,7 @@ export declare function useAI(): {
221
221
  onFix: (chat: AIChat) => void;
222
222
  fillPromptInput: (content: string, isNew?: boolean) => void;
223
223
  promptText: Ref<string, string>;
224
- getHotTopics: () => Promise<any>;
224
+ getHotTopics: (platform?: string) => Promise<any>;
225
225
  settings: Ref<Settings | undefined, Settings | undefined>;
226
226
  inputDisabled: ComputedRef<boolean>;
227
227
  createOrder: () => Promise<any>;
@@ -25,7 +25,7 @@ export declare function useOpenApi(): {
25
25
  removeTopic: (topicId: string) => Promise<any>;
26
26
  chatCompletions: (topicId: string, chatId: string, callback?: (data: CompletionChunk | null, done?: boolean) => void, error?: (err: Error, cancel?: boolean) => void) => Promise<() => void>;
27
27
  saveChat: (chat: any) => Promise<any>;
28
- getHotTopics: () => Promise<any>;
28
+ getHotTopics: (platform?: string) => Promise<any>;
29
29
  getSettings: () => Promise<Settings | undefined>;
30
30
  createOrder: () => Promise<any>;
31
31
  cancelOrder: (id: string) => Promise<any>;
@@ -1,7 +1,6 @@
1
- import { UploadUserFile, UploadData, UploadRawFile, UploadHooks, ListType, UploadRequestHandler, Crossorigin, UploadFile, UploadFiles, UploadProgressEvent, UploadStatus } from 'element-plus';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
- import { Awaitable, Mutable } from 'element-plus/es/utils/typescript.mjs';
4
- import { UploadUserFile } from 'element-plus/es/components/upload/src/upload.mjs';
1
+ import { UploadUserFile, UploadHooks, Crossorigin, UploadData, UploadRawFile, ListType, UploadRequestHandler, UploadProps, UploadFile, UploadStatus } from 'element-plus';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, Slot, ComponentPublicInstance, ComponentOptionsBase, GlobalComponents, GlobalDirectives, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
+ import { Awaitable } from 'element-plus/es/utils/typescript.mjs';
5
4
  import { OnCleanup } from '@vue/reactivity';
6
5
  export interface Props {
7
6
  modelValue?: any;
@@ -19,58 +18,36 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
19
18
  uploadRef: ({
20
19
  $: ComponentInternalInstance;
21
20
  $data: {};
22
- $props: Partial<{
23
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
24
- disabled: boolean;
25
- name: string;
26
- onProgress: UploadHooks["onProgress"];
27
- onChange: UploadHooks["onChange"];
28
- onError: UploadHooks["onError"];
29
- method: string;
30
- action: string;
31
- accept: string;
32
- beforeUpload: UploadHooks["beforeUpload"];
33
- onRemove: UploadHooks["onRemove"];
34
- onPreview: UploadHooks["onPreview"];
35
- onSuccess: UploadHooks["onSuccess"];
36
- onExceed: UploadHooks["onExceed"];
37
- showFileList: boolean;
38
- fileList: UploadUserFile[];
39
- autoUpload: boolean;
40
- listType: ListType;
41
- httpRequest: UploadRequestHandler;
42
- }> & Omit<{
43
- readonly name: string;
44
- readonly method: string;
45
- readonly data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
46
- readonly onChange: UploadHooks["onChange"];
47
- readonly onError: UploadHooks["onError"];
48
- readonly onProgress: UploadHooks["onProgress"];
49
- readonly beforeUpload: UploadHooks["beforeUpload"];
50
- readonly onRemove: UploadHooks["onRemove"];
51
- readonly onPreview: UploadHooks["onPreview"];
52
- readonly onSuccess: UploadHooks["onSuccess"];
53
- readonly onExceed: UploadHooks["onExceed"];
54
- readonly action: string;
55
- readonly showFileList: boolean;
56
- readonly accept: string;
57
- readonly fileList: UploadUserFile[];
58
- readonly autoUpload: boolean;
59
- readonly listType: ListType;
60
- readonly httpRequest: UploadRequestHandler;
61
- readonly disabled?: boolean | undefined;
62
- readonly headers?: (Headers | Record<string, any>) | undefined;
63
- readonly crossorigin?: Crossorigin | undefined;
21
+ $props: {
22
+ readonly beforeUpload?: UploadHooks["beforeUpload"] | undefined;
64
23
  readonly beforeRemove?: UploadHooks["beforeRemove"] | undefined;
24
+ readonly onRemove?: UploadHooks["onRemove"] | undefined;
25
+ readonly onChange?: UploadHooks["onChange"] | undefined;
26
+ readonly onPreview?: UploadHooks["onPreview"] | undefined;
27
+ readonly onSuccess?: UploadHooks["onSuccess"] | undefined;
28
+ readonly onProgress?: UploadHooks["onProgress"] | undefined;
29
+ readonly onError?: UploadHooks["onError"] | undefined;
30
+ readonly onExceed?: UploadHooks["onExceed"] | undefined;
31
+ readonly crossorigin?: Crossorigin | undefined;
32
+ readonly action?: string | undefined;
33
+ readonly headers?: (Headers | Record<string, any>) | undefined;
34
+ readonly method?: string | undefined;
35
+ readonly data?: ( Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)) | undefined;
65
36
  readonly multiple?: boolean | undefined;
37
+ readonly name?: string | undefined;
66
38
  readonly drag?: boolean | undefined;
67
39
  readonly withCredentials?: boolean | undefined;
40
+ readonly showFileList?: boolean | undefined;
41
+ readonly accept?: string | undefined;
42
+ readonly fileList?: UploadUserFile[] | undefined;
43
+ readonly autoUpload?: boolean | undefined;
44
+ readonly listType?: ListType | undefined;
45
+ readonly httpRequest?: UploadRequestHandler | undefined;
46
+ readonly disabled?: boolean | undefined;
68
47
  readonly limit?: number | undefined;
69
48
  readonly directory?: boolean | undefined;
70
- } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "name" | "method" | "disabled" | "data" | "onChange" | "onError" | "onProgress" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest">;
71
- $attrs: {
72
- [x: string]: unknown;
73
- };
49
+ } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
50
+ $attrs: Attrs;
74
51
  $refs: {
75
52
  [x: string]: unknown;
76
53
  };
@@ -82,129 +59,28 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
82
59
  $host: Element | null;
83
60
  $emit: (event: string, ...args: any[]) => void;
84
61
  $el: any;
85
- $options: ComponentOptionsBase<Readonly< ExtractPropTypes<{
86
- name: {
87
- type: PropType<string>;
88
- default: "file";
89
- };
90
- method: {
91
- type: PropType<string>;
92
- default: "post";
93
- };
94
- disabled: {
95
- type: PropType<boolean>;
96
- default: undefined;
97
- };
98
- headers: {
99
- type: PropType<Record<string, any> | Headers>;
100
- };
101
- data: {
102
- type: PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
103
- default: () => Mutable<{}>;
104
- };
105
- onChange: {
106
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
107
- default: () => void;
108
- };
109
- onError: {
110
- type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
111
- default: () => void;
112
- };
113
- onProgress: {
114
- type: PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
115
- default: () => void;
116
- };
117
- crossorigin: {
118
- type: PropType<Crossorigin>;
119
- };
120
- beforeUpload: {
121
- type: PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
122
- default: () => void;
123
- };
124
- beforeRemove: {
125
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
126
- };
127
- onRemove: {
128
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
129
- default: () => void;
130
- };
131
- onPreview: {
132
- type: PropType<(uploadFile: UploadFile) => void>;
133
- default: () => void;
134
- };
135
- onSuccess: {
136
- type: PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
137
- default: () => void;
138
- };
139
- onExceed: {
140
- type: PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
141
- default: () => void;
142
- };
143
- action: {
144
- type: PropType<string>;
145
- default: "#";
146
- };
147
- multiple: {
148
- type: PropType<boolean>;
149
- };
150
- drag: {
151
- type: PropType<boolean>;
152
- };
153
- withCredentials: {
154
- type: PropType<boolean>;
155
- };
156
- showFileList: {
157
- type: PropType<boolean>;
158
- default: true;
159
- };
160
- accept: {
161
- type: PropType<string>;
162
- default: "";
163
- };
164
- fileList: {
165
- type: PropType<UploadUserFile[]>;
166
- default: () => never[];
167
- };
168
- autoUpload: {
169
- type: PropType<boolean>;
170
- default: true;
171
- };
172
- listType: {
173
- type: PropType<ListType>;
174
- default: "text";
175
- };
176
- httpRequest: {
177
- type: PropType<UploadRequestHandler>;
178
- default: UploadRequestHandler;
179
- };
180
- limit: {
181
- type: PropType<number>;
182
- };
183
- directory: {
184
- type: PropType<boolean>;
185
- };
186
- }>>, {
62
+ $options: ComponentOptionsBase<Readonly< UploadProps> & Readonly<{}>, {
187
63
  abort: (file?: UploadFile) => void;
188
64
  submit: () => void;
189
65
  clearFiles: (states?: UploadStatus[]) => void;
190
66
  handleStart: (rawFile: UploadRawFile) => void;
191
67
  handleRemove: (file: UploadFile | UploadRawFile) => void;
192
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
193
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
68
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
194
69
  disabled: boolean;
195
- name: string;
196
- onProgress: UploadHooks["onProgress"];
70
+ data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
197
71
  onChange: UploadHooks["onChange"];
72
+ name: string;
198
73
  onError: UploadHooks["onError"];
199
- method: string;
200
- action: string;
201
- accept: string;
74
+ onProgress: UploadHooks["onProgress"];
202
75
  beforeUpload: UploadHooks["beforeUpload"];
203
76
  onRemove: UploadHooks["onRemove"];
204
77
  onPreview: UploadHooks["onPreview"];
205
78
  onSuccess: UploadHooks["onSuccess"];
206
79
  onExceed: UploadHooks["onExceed"];
80
+ action: string;
81
+ method: string;
207
82
  showFileList: boolean;
83
+ accept: string;
208
84
  fileList: UploadUserFile[];
209
85
  autoUpload: boolean;
210
86
  listType: ListType;
@@ -230,127 +106,26 @@ declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsM
230
106
  $nextTick: nextTick;
231
107
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, OnCleanup]) => any : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions): WatchStopHandle;
232
108
  } & Readonly<{
233
- data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
234
109
  disabled: boolean;
235
- name: string;
236
- onProgress: UploadHooks["onProgress"];
110
+ data: Awaitable<UploadData> | ((rawFile: UploadRawFile) => Awaitable<UploadData>);
237
111
  onChange: UploadHooks["onChange"];
112
+ name: string;
238
113
  onError: UploadHooks["onError"];
239
- method: string;
240
- action: string;
241
- accept: string;
114
+ onProgress: UploadHooks["onProgress"];
242
115
  beforeUpload: UploadHooks["beforeUpload"];
243
116
  onRemove: UploadHooks["onRemove"];
244
117
  onPreview: UploadHooks["onPreview"];
245
118
  onSuccess: UploadHooks["onSuccess"];
246
119
  onExceed: UploadHooks["onExceed"];
120
+ action: string;
121
+ method: string;
247
122
  showFileList: boolean;
123
+ accept: string;
248
124
  fileList: UploadUserFile[];
249
125
  autoUpload: boolean;
250
126
  listType: ListType;
251
127
  httpRequest: UploadRequestHandler;
252
- }> & Omit<Readonly< ExtractPropTypes<{
253
- name: {
254
- type: PropType<string>;
255
- default: "file";
256
- };
257
- method: {
258
- type: PropType<string>;
259
- default: "post";
260
- };
261
- disabled: {
262
- type: PropType<boolean>;
263
- default: undefined;
264
- };
265
- headers: {
266
- type: PropType<Record<string, any> | Headers>;
267
- };
268
- data: {
269
- type: PropType< Awaitable<Mutable<Record<string, any>>> | ((rawFile: UploadRawFile) => Awaitable<UploadData>)>;
270
- default: () => Mutable<{}>;
271
- };
272
- onChange: {
273
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
274
- default: () => void;
275
- };
276
- onError: {
277
- type: PropType<(error: Error, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
278
- default: () => void;
279
- };
280
- onProgress: {
281
- type: PropType<(evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
282
- default: () => void;
283
- };
284
- crossorigin: {
285
- type: PropType<Crossorigin>;
286
- };
287
- beforeUpload: {
288
- type: PropType<(rawFile: UploadRawFile) => Awaitable<void | undefined | null | boolean | File | Blob>>;
289
- default: () => void;
290
- };
291
- beforeRemove: {
292
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => Awaitable<boolean>>;
293
- };
294
- onRemove: {
295
- type: PropType<(uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
296
- default: () => void;
297
- };
298
- onPreview: {
299
- type: PropType<(uploadFile: UploadFile) => void>;
300
- default: () => void;
301
- };
302
- onSuccess: {
303
- type: PropType<(response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => void>;
304
- default: () => void;
305
- };
306
- onExceed: {
307
- type: PropType<(files: File[], uploadFiles: UploadUserFile[]) => void>;
308
- default: () => void;
309
- };
310
- action: {
311
- type: PropType<string>;
312
- default: "#";
313
- };
314
- multiple: {
315
- type: PropType<boolean>;
316
- };
317
- drag: {
318
- type: PropType<boolean>;
319
- };
320
- withCredentials: {
321
- type: PropType<boolean>;
322
- };
323
- showFileList: {
324
- type: PropType<boolean>;
325
- default: true;
326
- };
327
- accept: {
328
- type: PropType<string>;
329
- default: "";
330
- };
331
- fileList: {
332
- type: PropType<UploadUserFile[]>;
333
- default: () => never[];
334
- };
335
- autoUpload: {
336
- type: PropType<boolean>;
337
- default: true;
338
- };
339
- listType: {
340
- type: PropType<ListType>;
341
- default: "text";
342
- };
343
- httpRequest: {
344
- type: PropType<UploadRequestHandler>;
345
- default: UploadRequestHandler;
346
- };
347
- limit: {
348
- type: PropType<number>;
349
- };
350
- directory: {
351
- type: PropType<boolean>;
352
- };
353
- }>>, "name" | "method" | "disabled" | "data" | "onChange" | "onError" | "onProgress" | "submit" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "abort" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef<{
128
+ }> & Omit<Readonly< UploadProps> & Readonly<{}>, "name" | "method" | "disabled" | "data" | "onChange" | "onError" | "onProgress" | "submit" | "beforeUpload" | "onRemove" | "onPreview" | "onSuccess" | "onExceed" | "action" | "showFileList" | "accept" | "fileList" | "autoUpload" | "listType" | "httpRequest" | "abort" | "clearFiles" | "handleStart" | "handleRemove"> & ShallowUnwrapRef<{
354
129
  abort: (file?: UploadFile) => void;
355
130
  submit: () => void;
356
131
  clearFiles: (states?: UploadStatus[]) => void;