@tmagic/form 1.4.15 → 1.4.17
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/dist/tmagic-form.js +19 -8
- package/dist/tmagic-form.umd.cjs +19 -8
- package/package.json +6 -6
- package/src/fields/Date.vue +3 -3
- package/src/fields/DateTime.vue +5 -1
- package/src/fields/Daterange.vue +9 -2
- package/src/fields/Timerange.vue +1 -2
- package/src/schema.ts +3 -0
- package/types/Form.vue.d.ts +30 -30
- package/types/FormBox.vue.d.ts +288 -37
- package/types/FormDialog.vue.d.ts +293 -42
- package/types/FormDrawer.vue.d.ts +295 -44
- package/types/containers/Col.vue.d.ts +14 -14
- package/types/containers/Container.vue.d.ts +16 -16
- package/types/containers/Fieldset.vue.d.ts +10 -10
- package/types/containers/GroupList.vue.d.ts +10 -10
- package/types/containers/GroupListItem.vue.d.ts +10 -10
- package/types/containers/Panel.vue.d.ts +19 -17
- package/types/containers/Row.vue.d.ts +12 -12
- package/types/containers/Step.vue.d.ts +10 -10
- package/types/containers/Table.vue.d.ts +32 -30
- package/types/containers/Tabs.vue.d.ts +12 -12
- package/types/schema.d.ts +3 -0
- package/types/utils/form.d.ts +1 -1
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { FormConfig } from './schema';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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;
|
|
16
21
|
}>, {
|
|
17
22
|
config: () => never[];
|
|
18
23
|
values: () => {};
|
|
@@ -84,13 +89,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
84
89
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
85
90
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
86
91
|
}, {
|
|
87
|
-
values: import("vue").Ref<import("./schema").FormValue>;
|
|
88
|
-
lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
|
|
92
|
+
values: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
|
|
93
|
+
lastValuesProcessed: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
|
|
89
94
|
formState: import("./schema").FormState;
|
|
90
|
-
initialized: import("vue").Ref<boolean>;
|
|
95
|
+
initialized: import("vue").Ref<boolean, boolean>;
|
|
91
96
|
changeHandler: () => void;
|
|
92
97
|
resetForm: () => any;
|
|
93
|
-
submitForm: (native?: boolean
|
|
98
|
+
submitForm: (native?: boolean) => Promise<any>;
|
|
94
99
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
95
100
|
change: (...args: any[]) => void;
|
|
96
101
|
error: (...args: any[]) => void;
|
|
@@ -247,13 +252,262 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
247
252
|
"onField-input"?: ((...args: any[]) => any) | undefined;
|
|
248
253
|
"onField-change"?: ((...args: any[]) => any) | undefined;
|
|
249
254
|
}, {
|
|
250
|
-
values: import("vue").Ref<import("./schema").FormValue>;
|
|
251
|
-
lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
|
|
255
|
+
values: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
|
|
256
|
+
lastValuesProcessed: import("vue").Ref<import("./schema").FormValue, import("./schema").FormValue>;
|
|
252
257
|
formState: import("./schema").FormState;
|
|
253
|
-
initialized: import("vue").Ref<boolean>;
|
|
258
|
+
initialized: import("vue").Ref<boolean, boolean>;
|
|
254
259
|
changeHandler: () => void;
|
|
255
260
|
resetForm: () => any;
|
|
256
|
-
submitForm: (native?: boolean
|
|
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>;
|
|
257
511
|
}, {}, {}, {}, {
|
|
258
512
|
config: FormConfig;
|
|
259
513
|
initValues: Record<string, any>;
|
|
@@ -268,8 +522,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
268
522
|
inline: boolean;
|
|
269
523
|
labelPosition: string;
|
|
270
524
|
}> | undefined>;
|
|
271
|
-
saveFetch: import("vue").Ref<boolean>;
|
|
272
|
-
dialogVisible: import("vue").Ref<boolean>;
|
|
525
|
+
saveFetch: import("vue").Ref<boolean, boolean>;
|
|
526
|
+
dialogVisible: import("vue").Ref<boolean, boolean>;
|
|
273
527
|
cancel: () => void;
|
|
274
528
|
save: () => Promise<void>;
|
|
275
529
|
show: () => void;
|
|
@@ -280,19 +534,19 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
280
534
|
submit: (...args: any[]) => void;
|
|
281
535
|
close: (...args: any[]) => void;
|
|
282
536
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
283
|
-
config?: FormConfig
|
|
284
|
-
values?: Object
|
|
285
|
-
parentValues?: Object
|
|
286
|
-
width?: string | number
|
|
287
|
-
labelWidth?: string
|
|
288
|
-
fullscreen?: boolean
|
|
289
|
-
disabled?: boolean
|
|
290
|
-
title?: string
|
|
291
|
-
inline?: boolean
|
|
292
|
-
labelPosition?: string
|
|
293
|
-
zIndex?: number
|
|
294
|
-
size?: "
|
|
295
|
-
confirmText?: string
|
|
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;
|
|
296
550
|
}>, {
|
|
297
551
|
config: () => never[];
|
|
298
552
|
values: () => {};
|
|
@@ -306,11 +560,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
306
560
|
config: FormConfig;
|
|
307
561
|
values: Object;
|
|
308
562
|
confirmText: string;
|
|
309
|
-
}, {}
|
|
310
|
-
|
|
311
|
-
left?(_: {}): any;
|
|
312
|
-
footer?(_: {}): any;
|
|
313
|
-
}>;
|
|
563
|
+
}, {}>;
|
|
564
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
314
565
|
export default _default;
|
|
315
566
|
type __VLS_WithDefaults<P, D> = {
|
|
316
567
|
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|