@tmagic/form 1.4.16 → 1.5.0-beta.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.
Files changed (42) hide show
  1. package/package.json +5 -9
  2. package/types/index.d.ts +3233 -39
  3. package/src/shims-vue.d.ts +0 -6
  4. package/types/Form.vue.d.ts +0 -118
  5. package/types/FormBox.vue.d.ts +0 -578
  6. package/types/FormDialog.vue.d.ts +0 -587
  7. package/types/FormDrawer.vue.d.ts +0 -599
  8. package/types/containers/Col.vue.d.ts +0 -40
  9. package/types/containers/Container.vue.d.ts +0 -72
  10. package/types/containers/Fieldset.vue.d.ts +0 -61
  11. package/types/containers/GroupList.vue.d.ts +0 -38
  12. package/types/containers/GroupListItem.vue.d.ts +0 -44
  13. package/types/containers/Panel.vue.d.ts +0 -48
  14. package/types/containers/Row.vue.d.ts +0 -40
  15. package/types/containers/Step.vue.d.ts +0 -50
  16. package/types/containers/Table.vue.d.ts +0 -96
  17. package/types/containers/Tabs.vue.d.ts +0 -57
  18. package/types/fields/Cascader.vue.d.ts +0 -16
  19. package/types/fields/Checkbox.vue.d.ts +0 -16
  20. package/types/fields/CheckboxGroup.vue.d.ts +0 -16
  21. package/types/fields/ColorPicker.vue.d.ts +0 -16
  22. package/types/fields/Date.vue.d.ts +0 -16
  23. package/types/fields/DateTime.vue.d.ts +0 -16
  24. package/types/fields/Daterange.vue.d.ts +0 -16
  25. package/types/fields/Display.vue.d.ts +0 -12
  26. package/types/fields/DynamicField.vue.d.ts +0 -16
  27. package/types/fields/Hidden.vue.d.ts +0 -12
  28. package/types/fields/Link.vue.d.ts +0 -16
  29. package/types/fields/Number.vue.d.ts +0 -18
  30. package/types/fields/NumberRange.vue.d.ts +0 -16
  31. package/types/fields/RadioGroup.vue.d.ts +0 -16
  32. package/types/fields/Select.vue.d.ts +0 -16
  33. package/types/fields/Switch.vue.d.ts +0 -16
  34. package/types/fields/Text.vue.d.ts +0 -18
  35. package/types/fields/Textarea.vue.d.ts +0 -18
  36. package/types/fields/Time.vue.d.ts +0 -16
  37. package/types/fields/Timerange.vue.d.ts +0 -16
  38. package/types/schema.d.ts +0 -605
  39. package/types/utils/config.d.ts +0 -3
  40. package/types/utils/containerProps.d.ts +0 -26
  41. package/types/utils/form.d.ts +0 -9
  42. package/types/utils/useAddField.d.ts +0 -1
@@ -1,587 +0,0 @@
1
- import { FormConfig } from './schema';
2
- declare function __VLS_template(): {
3
- default?(_: {}): any;
4
- left?(_: {}): any;
5
- footer?(_: {}): any;
6
- };
7
- declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
8
- config?: FormConfig;
9
- values?: Object;
10
- parentValues?: Object;
11
- width?: string | number;
12
- labelWidth?: string;
13
- fullscreen?: boolean;
14
- disabled?: boolean;
15
- title?: string;
16
- inline?: boolean;
17
- labelPosition?: string;
18
- zIndex?: number;
19
- size?: "small" | "default" | "large";
20
- confirmText?: string;
21
- }>, {
22
- config: () => never[];
23
- values: () => {};
24
- confirmText: string;
25
- }>, {
26
- form: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
27
- config: {
28
- type: import("vue").PropType<FormConfig>;
29
- required: true;
30
- default: () => never[];
31
- };
32
- popperClass: {
33
- type: import("vue").PropType<string>;
34
- };
35
- initValues: {
36
- type: import("vue").PropType<Record<string, any>>;
37
- required: true;
38
- default: () => {};
39
- };
40
- lastValues: {
41
- type: import("vue").PropType<Record<string, any>>;
42
- default: () => {};
43
- };
44
- isCompare: {
45
- type: import("vue").PropType<boolean>;
46
- default: boolean;
47
- };
48
- keyProp: {
49
- type: import("vue").PropType<string>;
50
- default: string;
51
- };
52
- parentValues: {
53
- type: import("vue").PropType<Record<string, any>>;
54
- default: () => {};
55
- };
56
- labelWidth: {
57
- type: import("vue").PropType<string>;
58
- default: string;
59
- };
60
- disabled: {
61
- type: import("vue").PropType<boolean>;
62
- default: boolean;
63
- };
64
- stepActive: {
65
- type: import("vue").PropType<string | number>;
66
- default: number;
67
- };
68
- size: {
69
- type: import("vue").PropType<"large" | "default" | "small">;
70
- };
71
- height: {
72
- type: import("vue").PropType<string>;
73
- default: string;
74
- };
75
- inline: {
76
- type: import("vue").PropType<boolean>;
77
- default: boolean;
78
- };
79
- labelPosition: {
80
- type: import("vue").PropType<string>;
81
- default: string;
82
- };
83
- extendState: {
84
- type: import("vue").PropType<(state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>>;
85
- };
86
- }>> & {
87
- onChange?: ((...args: any[]) => any) | undefined;
88
- onError?: ((...args: any[]) => any) | undefined;
89
- "onField-input"?: ((...args: any[]) => any) | undefined;
90
- "onField-change"?: ((...args: any[]) => any) | undefined;
91
- }, {
92
- values: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
93
- lastValuesProcessed: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
94
- formState: import("./schema").FormState;
95
- initialized: import("vue").Ref<boolean, boolean>;
96
- changeHandler: () => void;
97
- resetForm: () => any;
98
- submitForm: (native?: boolean) => Promise<any>;
99
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
100
- change: (...args: any[]) => void;
101
- error: (...args: any[]) => void;
102
- "field-input": (...args: any[]) => void;
103
- "field-change": (...args: any[]) => void;
104
- }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
105
- config: {
106
- type: import("vue").PropType<FormConfig>;
107
- required: true;
108
- default: () => never[];
109
- };
110
- popperClass: {
111
- type: import("vue").PropType<string>;
112
- };
113
- initValues: {
114
- type: import("vue").PropType<Record<string, any>>;
115
- required: true;
116
- default: () => {};
117
- };
118
- lastValues: {
119
- type: import("vue").PropType<Record<string, any>>;
120
- default: () => {};
121
- };
122
- isCompare: {
123
- type: import("vue").PropType<boolean>;
124
- default: boolean;
125
- };
126
- keyProp: {
127
- type: import("vue").PropType<string>;
128
- default: string;
129
- };
130
- parentValues: {
131
- type: import("vue").PropType<Record<string, any>>;
132
- default: () => {};
133
- };
134
- labelWidth: {
135
- type: import("vue").PropType<string>;
136
- default: string;
137
- };
138
- disabled: {
139
- type: import("vue").PropType<boolean>;
140
- default: boolean;
141
- };
142
- stepActive: {
143
- type: import("vue").PropType<string | number>;
144
- default: number;
145
- };
146
- size: {
147
- type: import("vue").PropType<"large" | "default" | "small">;
148
- };
149
- height: {
150
- type: import("vue").PropType<string>;
151
- default: string;
152
- };
153
- inline: {
154
- type: import("vue").PropType<boolean>;
155
- default: boolean;
156
- };
157
- labelPosition: {
158
- type: import("vue").PropType<string>;
159
- default: string;
160
- };
161
- extendState: {
162
- type: import("vue").PropType<(state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>>;
163
- };
164
- }>> & {
165
- onChange?: ((...args: any[]) => any) | undefined;
166
- onError?: ((...args: any[]) => any) | undefined;
167
- "onField-input"?: ((...args: any[]) => any) | undefined;
168
- "onField-change"?: ((...args: any[]) => any) | undefined;
169
- }, {
170
- config: FormConfig;
171
- initValues: Record<string, any>;
172
- lastValues: Record<string, any>;
173
- isCompare: boolean;
174
- keyProp: string;
175
- parentValues: Record<string, any>;
176
- labelWidth: string;
177
- disabled: boolean;
178
- stepActive: string | number;
179
- height: string;
180
- inline: boolean;
181
- labelPosition: string;
182
- }, true, {}, {}, {
183
- P: {};
184
- B: {};
185
- D: {};
186
- C: {};
187
- M: {};
188
- Defaults: {};
189
- }, Readonly<import("vue").ExtractPropTypes<{
190
- config: {
191
- type: import("vue").PropType<FormConfig>;
192
- required: true;
193
- default: () => never[];
194
- };
195
- popperClass: {
196
- type: import("vue").PropType<string>;
197
- };
198
- initValues: {
199
- type: import("vue").PropType<Record<string, any>>;
200
- required: true;
201
- default: () => {};
202
- };
203
- lastValues: {
204
- type: import("vue").PropType<Record<string, any>>;
205
- default: () => {};
206
- };
207
- isCompare: {
208
- type: import("vue").PropType<boolean>;
209
- default: boolean;
210
- };
211
- keyProp: {
212
- type: import("vue").PropType<string>;
213
- default: string;
214
- };
215
- parentValues: {
216
- type: import("vue").PropType<Record<string, any>>;
217
- default: () => {};
218
- };
219
- labelWidth: {
220
- type: import("vue").PropType<string>;
221
- default: string;
222
- };
223
- disabled: {
224
- type: import("vue").PropType<boolean>;
225
- default: boolean;
226
- };
227
- stepActive: {
228
- type: import("vue").PropType<string | number>;
229
- default: number;
230
- };
231
- size: {
232
- type: import("vue").PropType<"large" | "default" | "small">;
233
- };
234
- height: {
235
- type: import("vue").PropType<string>;
236
- default: string;
237
- };
238
- inline: {
239
- type: import("vue").PropType<boolean>;
240
- default: boolean;
241
- };
242
- labelPosition: {
243
- type: import("vue").PropType<string>;
244
- default: string;
245
- };
246
- extendState: {
247
- type: import("vue").PropType<(state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>>;
248
- };
249
- }>> & {
250
- onChange?: ((...args: any[]) => any) | undefined;
251
- onError?: ((...args: any[]) => any) | undefined;
252
- "onField-input"?: ((...args: any[]) => any) | undefined;
253
- "onField-change"?: ((...args: any[]) => any) | undefined;
254
- }, {
255
- values: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
256
- lastValuesProcessed: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
257
- formState: import("./schema").FormState;
258
- initialized: import("vue").Ref<boolean, boolean>;
259
- changeHandler: () => void;
260
- resetForm: () => any;
261
- submitForm: (native?: boolean) => Promise<any>;
262
- }, {}, {}, {}, {
263
- config: FormConfig;
264
- initValues: Record<string, any>;
265
- lastValues: Record<string, any>;
266
- isCompare: boolean;
267
- keyProp: string;
268
- parentValues: Record<string, any>;
269
- labelWidth: string;
270
- disabled: boolean;
271
- stepActive: string | number;
272
- height: string;
273
- inline: boolean;
274
- labelPosition: string;
275
- }> | undefined, import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
276
- config: {
277
- type: import("vue").PropType<FormConfig>;
278
- required: true;
279
- default: () => never[];
280
- };
281
- popperClass: {
282
- type: import("vue").PropType<string>;
283
- };
284
- initValues: {
285
- type: import("vue").PropType<Record<string, any>>;
286
- required: true;
287
- default: () => {};
288
- };
289
- lastValues: {
290
- type: import("vue").PropType<Record<string, any>>;
291
- default: () => {};
292
- };
293
- isCompare: {
294
- type: import("vue").PropType<boolean>;
295
- default: boolean;
296
- };
297
- keyProp: {
298
- type: import("vue").PropType<string>;
299
- default: string;
300
- };
301
- parentValues: {
302
- type: import("vue").PropType<Record<string, any>>;
303
- default: () => {};
304
- };
305
- labelWidth: {
306
- type: import("vue").PropType<string>;
307
- default: string;
308
- };
309
- disabled: {
310
- type: import("vue").PropType<boolean>;
311
- default: boolean;
312
- };
313
- stepActive: {
314
- type: import("vue").PropType<string | number>;
315
- default: number;
316
- };
317
- size: {
318
- type: import("vue").PropType<"large" | "default" | "small">;
319
- };
320
- height: {
321
- type: import("vue").PropType<string>;
322
- default: string;
323
- };
324
- inline: {
325
- type: import("vue").PropType<boolean>;
326
- default: boolean;
327
- };
328
- labelPosition: {
329
- type: import("vue").PropType<string>;
330
- default: string;
331
- };
332
- extendState: {
333
- type: import("vue").PropType<(state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>>;
334
- };
335
- }>> & {
336
- onChange?: ((...args: any[]) => any) | undefined;
337
- onError?: ((...args: any[]) => any) | undefined;
338
- "onField-input"?: ((...args: any[]) => any) | undefined;
339
- "onField-change"?: ((...args: any[]) => any) | undefined;
340
- }, {
341
- values: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
342
- lastValuesProcessed: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
343
- formState: import("./schema").FormState;
344
- initialized: import("vue").Ref<boolean, boolean>;
345
- changeHandler: () => void;
346
- resetForm: () => any;
347
- submitForm: (native?: boolean) => Promise<any>;
348
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
349
- change: (...args: any[]) => void;
350
- error: (...args: any[]) => void;
351
- "field-input": (...args: any[]) => void;
352
- "field-change": (...args: any[]) => void;
353
- }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
354
- config: {
355
- type: import("vue").PropType<FormConfig>;
356
- required: true;
357
- default: () => never[];
358
- };
359
- popperClass: {
360
- type: import("vue").PropType<string>;
361
- };
362
- initValues: {
363
- type: import("vue").PropType<Record<string, any>>;
364
- required: true;
365
- default: () => {};
366
- };
367
- lastValues: {
368
- type: import("vue").PropType<Record<string, any>>;
369
- default: () => {};
370
- };
371
- isCompare: {
372
- type: import("vue").PropType<boolean>;
373
- default: boolean;
374
- };
375
- keyProp: {
376
- type: import("vue").PropType<string>;
377
- default: string;
378
- };
379
- parentValues: {
380
- type: import("vue").PropType<Record<string, any>>;
381
- default: () => {};
382
- };
383
- labelWidth: {
384
- type: import("vue").PropType<string>;
385
- default: string;
386
- };
387
- disabled: {
388
- type: import("vue").PropType<boolean>;
389
- default: boolean;
390
- };
391
- stepActive: {
392
- type: import("vue").PropType<string | number>;
393
- default: number;
394
- };
395
- size: {
396
- type: import("vue").PropType<"large" | "default" | "small">;
397
- };
398
- height: {
399
- type: import("vue").PropType<string>;
400
- default: string;
401
- };
402
- inline: {
403
- type: import("vue").PropType<boolean>;
404
- default: boolean;
405
- };
406
- labelPosition: {
407
- type: import("vue").PropType<string>;
408
- default: string;
409
- };
410
- extendState: {
411
- type: import("vue").PropType<(state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>>;
412
- };
413
- }>> & {
414
- onChange?: ((...args: any[]) => any) | undefined;
415
- onError?: ((...args: any[]) => any) | undefined;
416
- "onField-input"?: ((...args: any[]) => any) | undefined;
417
- "onField-change"?: ((...args: any[]) => any) | undefined;
418
- }, {
419
- config: FormConfig;
420
- initValues: Record<string, any>;
421
- lastValues: Record<string, any>;
422
- isCompare: boolean;
423
- keyProp: string;
424
- parentValues: Record<string, any>;
425
- labelWidth: string;
426
- disabled: boolean;
427
- stepActive: string | number;
428
- height: string;
429
- inline: boolean;
430
- labelPosition: string;
431
- }, true, {}, {}, {
432
- P: {};
433
- B: {};
434
- D: {};
435
- C: {};
436
- M: {};
437
- Defaults: {};
438
- }, Readonly<import("vue").ExtractPropTypes<{
439
- config: {
440
- type: import("vue").PropType<FormConfig>;
441
- required: true;
442
- default: () => never[];
443
- };
444
- popperClass: {
445
- type: import("vue").PropType<string>;
446
- };
447
- initValues: {
448
- type: import("vue").PropType<Record<string, any>>;
449
- required: true;
450
- default: () => {};
451
- };
452
- lastValues: {
453
- type: import("vue").PropType<Record<string, any>>;
454
- default: () => {};
455
- };
456
- isCompare: {
457
- type: import("vue").PropType<boolean>;
458
- default: boolean;
459
- };
460
- keyProp: {
461
- type: import("vue").PropType<string>;
462
- default: string;
463
- };
464
- parentValues: {
465
- type: import("vue").PropType<Record<string, any>>;
466
- default: () => {};
467
- };
468
- labelWidth: {
469
- type: import("vue").PropType<string>;
470
- default: string;
471
- };
472
- disabled: {
473
- type: import("vue").PropType<boolean>;
474
- default: boolean;
475
- };
476
- stepActive: {
477
- type: import("vue").PropType<string | number>;
478
- default: number;
479
- };
480
- size: {
481
- type: import("vue").PropType<"large" | "default" | "small">;
482
- };
483
- height: {
484
- type: import("vue").PropType<string>;
485
- default: string;
486
- };
487
- inline: {
488
- type: import("vue").PropType<boolean>;
489
- default: boolean;
490
- };
491
- labelPosition: {
492
- type: import("vue").PropType<string>;
493
- default: string;
494
- };
495
- extendState: {
496
- type: import("vue").PropType<(state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>>;
497
- };
498
- }>> & {
499
- onChange?: ((...args: any[]) => any) | undefined;
500
- onError?: ((...args: any[]) => any) | undefined;
501
- "onField-input"?: ((...args: any[]) => any) | undefined;
502
- "onField-change"?: ((...args: any[]) => any) | undefined;
503
- }, {
504
- values: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
505
- lastValuesProcessed: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
506
- formState: import("./schema").FormState;
507
- initialized: import("vue").Ref<boolean, boolean>;
508
- changeHandler: () => void;
509
- resetForm: () => any;
510
- submitForm: (native?: boolean) => Promise<any>;
511
- }, {}, {}, {}, {
512
- config: FormConfig;
513
- initValues: Record<string, any>;
514
- lastValues: Record<string, any>;
515
- isCompare: boolean;
516
- keyProp: string;
517
- parentValues: Record<string, any>;
518
- labelWidth: string;
519
- disabled: boolean;
520
- stepActive: string | number;
521
- height: string;
522
- inline: boolean;
523
- labelPosition: string;
524
- }> | undefined>;
525
- saveFetch: import("vue").Ref<boolean, boolean>;
526
- dialogVisible: import("vue").Ref<boolean, boolean>;
527
- cancel: () => void;
528
- save: () => Promise<void>;
529
- show: () => void;
530
- hide: () => void;
531
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
532
- change: (...args: any[]) => void;
533
- error: (...args: any[]) => void;
534
- submit: (...args: any[]) => void;
535
- close: (...args: any[]) => void;
536
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
537
- config?: FormConfig;
538
- values?: Object;
539
- parentValues?: Object;
540
- width?: string | number;
541
- labelWidth?: string;
542
- fullscreen?: boolean;
543
- disabled?: boolean;
544
- title?: string;
545
- inline?: boolean;
546
- labelPosition?: string;
547
- zIndex?: number;
548
- size?: "small" | "default" | "large";
549
- confirmText?: string;
550
- }>, {
551
- config: () => never[];
552
- values: () => {};
553
- confirmText: string;
554
- }>>> & {
555
- onChange?: ((...args: any[]) => any) | undefined;
556
- onSubmit?: ((...args: any[]) => any) | undefined;
557
- onError?: ((...args: any[]) => any) | undefined;
558
- onClose?: ((...args: any[]) => any) | undefined;
559
- }, {
560
- config: FormConfig;
561
- values: Object;
562
- confirmText: string;
563
- }, {}>;
564
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
565
- export default _default;
566
- type __VLS_WithDefaults<P, D> = {
567
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
568
- default: D[K];
569
- }> : P[K];
570
- };
571
- type __VLS_Prettify<T> = {
572
- [K in keyof T]: T[K];
573
- } & {};
574
- type __VLS_WithTemplateSlots<T, S> = T & {
575
- new (): {
576
- $slots: S;
577
- };
578
- };
579
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
580
- type __VLS_TypePropsToOption<T> = {
581
- [K in keyof T]-?: {} extends Pick<T, K> ? {
582
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
583
- } : {
584
- type: import('vue').PropType<T[K]>;
585
- required: true;
586
- };
587
- };