@tmagic/form 1.4.15 → 1.5.0-beta.0

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 +7 -11
  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 -327
  6. package/types/FormDialog.vue.d.ts +0 -336
  7. package/types/FormDrawer.vue.d.ts +0 -348
  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 -46
  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 -94
  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,6 +0,0 @@
1
- declare module '*.vue' {
2
- import { DefineComponent } from 'vue';
3
-
4
- const component: DefineComponent<{}, {}, any>;
5
- export default component;
6
- }
@@ -1,118 +0,0 @@
1
- import type { FormConfig, FormState, FormValue } from './schema';
2
- declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
3
- /** 表单配置 */
4
- config: FormConfig;
5
- /** 表单值 */
6
- initValues: Record<string, any>;
7
- /** 需对比的值(开启对比模式时传入) */
8
- lastValues?: Record<string, any> | undefined;
9
- /** 是否开启对比模式 */
10
- isCompare?: boolean | undefined;
11
- parentValues?: Record<string, any> | undefined;
12
- labelWidth?: string | undefined;
13
- disabled?: boolean | undefined;
14
- height?: string | undefined;
15
- stepActive?: string | number | undefined;
16
- size?: "large" | "default" | "small" | undefined;
17
- inline?: boolean | undefined;
18
- labelPosition?: string | undefined;
19
- keyProp?: string | undefined;
20
- popperClass?: string | undefined;
21
- extendState?: ((state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
22
- }>, {
23
- config: () => never[];
24
- initValues: () => {};
25
- lastValues: () => {};
26
- isCompare: boolean;
27
- parentValues: () => {};
28
- labelWidth: string;
29
- disabled: boolean;
30
- height: string;
31
- stepActive: number;
32
- inline: boolean;
33
- labelPosition: string;
34
- keyProp: string;
35
- }>, {
36
- values: import("vue").Ref<FormValue>;
37
- lastValuesProcessed: import("vue").Ref<FormValue>;
38
- formState: FormState;
39
- initialized: import("vue").Ref<boolean>;
40
- changeHandler: () => void;
41
- resetForm: () => any;
42
- submitForm: (native?: boolean | undefined) => Promise<any>;
43
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
44
- change: (...args: any[]) => void;
45
- error: (...args: any[]) => void;
46
- "field-input": (...args: any[]) => void;
47
- "field-change": (...args: any[]) => void;
48
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
49
- /** 表单配置 */
50
- config: FormConfig;
51
- /** 表单值 */
52
- initValues: Record<string, any>;
53
- /** 需对比的值(开启对比模式时传入) */
54
- lastValues?: Record<string, any> | undefined;
55
- /** 是否开启对比模式 */
56
- isCompare?: boolean | undefined;
57
- parentValues?: Record<string, any> | undefined;
58
- labelWidth?: string | undefined;
59
- disabled?: boolean | undefined;
60
- height?: string | undefined;
61
- stepActive?: string | number | undefined;
62
- size?: "large" | "default" | "small" | undefined;
63
- inline?: boolean | undefined;
64
- labelPosition?: string | undefined;
65
- keyProp?: string | undefined;
66
- popperClass?: string | undefined;
67
- extendState?: ((state: FormState) => Record<string, any> | Promise<Record<string, any>>) | undefined;
68
- }>, {
69
- config: () => never[];
70
- initValues: () => {};
71
- lastValues: () => {};
72
- isCompare: boolean;
73
- parentValues: () => {};
74
- labelWidth: string;
75
- disabled: boolean;
76
- height: string;
77
- stepActive: number;
78
- inline: boolean;
79
- labelPosition: string;
80
- keyProp: string;
81
- }>>> & {
82
- onChange?: ((...args: any[]) => any) | undefined;
83
- onError?: ((...args: any[]) => any) | undefined;
84
- "onField-input"?: ((...args: any[]) => any) | undefined;
85
- "onField-change"?: ((...args: any[]) => any) | undefined;
86
- }, {
87
- config: FormConfig;
88
- initValues: Record<string, any>;
89
- lastValues: Record<string, any>;
90
- isCompare: boolean;
91
- keyProp: string;
92
- parentValues: Record<string, any>;
93
- labelWidth: string;
94
- disabled: boolean;
95
- stepActive: string | number;
96
- height: string;
97
- inline: boolean;
98
- labelPosition: string;
99
- }, {}>;
100
- export default _default;
101
-
102
- type __VLS_WithDefaults<P, D> = {
103
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
104
- default: D[K];
105
- }> : P[K];
106
- };
107
- type __VLS_Prettify<T> = {
108
- [K in keyof T]: T[K];
109
- } & {};
110
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
111
- type __VLS_TypePropsToOption<T> = {
112
- [K in keyof T]-?: {} extends Pick<T, K> ? {
113
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
114
- } : {
115
- type: import('vue').PropType<T[K]>;
116
- required: true;
117
- };
118
- };
@@ -1,327 +0,0 @@
1
- import type { FormConfig } from './schema';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
3
- config?: FormConfig | undefined;
4
- values?: Object | undefined;
5
- parentValues?: Object | undefined;
6
- width?: number | undefined;
7
- height?: number | undefined;
8
- labelWidth?: string | undefined;
9
- disabled?: boolean | undefined;
10
- size?: "large" | "default" | "small" | undefined;
11
- confirmText?: string | undefined;
12
- inline?: boolean | undefined;
13
- labelPosition?: string | undefined;
14
- }>, {
15
- config: () => never[];
16
- values: () => {};
17
- confirmText: string;
18
- }>, {
19
- form: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
20
- config: {
21
- type: import("vue").PropType<FormConfig>;
22
- required: true;
23
- default: () => never[];
24
- };
25
- popperClass: {
26
- type: import("vue").PropType<string>;
27
- };
28
- initValues: {
29
- type: import("vue").PropType<Record<string, any>>;
30
- required: true;
31
- default: () => {};
32
- };
33
- lastValues: {
34
- type: import("vue").PropType<Record<string, any>>;
35
- default: () => {};
36
- };
37
- isCompare: {
38
- type: import("vue").PropType<boolean>;
39
- default: boolean;
40
- };
41
- keyProp: {
42
- type: import("vue").PropType<string>;
43
- default: string;
44
- };
45
- parentValues: {
46
- type: import("vue").PropType<Record<string, any>>;
47
- default: () => {};
48
- };
49
- labelWidth: {
50
- type: import("vue").PropType<string>;
51
- default: string;
52
- };
53
- disabled: {
54
- type: import("vue").PropType<boolean>;
55
- default: boolean;
56
- };
57
- stepActive: {
58
- type: import("vue").PropType<string | number>;
59
- default: number;
60
- };
61
- size: {
62
- type: import("vue").PropType<"large" | "default" | "small">;
63
- };
64
- height: {
65
- type: import("vue").PropType<string>;
66
- default: string;
67
- };
68
- inline: {
69
- type: import("vue").PropType<boolean>;
70
- default: boolean;
71
- };
72
- labelPosition: {
73
- type: import("vue").PropType<string>;
74
- default: string;
75
- };
76
- extendState: {
77
- type: import("vue").PropType<(state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>>;
78
- };
79
- }>> & {
80
- onChange?: ((...args: any[]) => any) | undefined;
81
- onError?: ((...args: any[]) => any) | undefined;
82
- "onField-input"?: ((...args: any[]) => any) | undefined;
83
- "onField-change"?: ((...args: any[]) => any) | undefined;
84
- }, {
85
- values: import("vue").Ref<import("./schema").FormValue>;
86
- lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
87
- formState: import("./schema").FormState;
88
- initialized: import("vue").Ref<boolean>;
89
- changeHandler: () => void;
90
- resetForm: () => any;
91
- submitForm: (native?: boolean | undefined) => Promise<any>;
92
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
93
- change: (...args: any[]) => void;
94
- error: (...args: any[]) => void;
95
- "field-input": (...args: any[]) => void;
96
- "field-change": (...args: any[]) => void;
97
- }, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
98
- config: {
99
- type: import("vue").PropType<FormConfig>;
100
- required: true;
101
- default: () => never[];
102
- };
103
- popperClass: {
104
- type: import("vue").PropType<string>;
105
- };
106
- initValues: {
107
- type: import("vue").PropType<Record<string, any>>;
108
- required: true;
109
- default: () => {};
110
- };
111
- lastValues: {
112
- type: import("vue").PropType<Record<string, any>>;
113
- default: () => {};
114
- };
115
- isCompare: {
116
- type: import("vue").PropType<boolean>;
117
- default: boolean;
118
- };
119
- keyProp: {
120
- type: import("vue").PropType<string>;
121
- default: string;
122
- };
123
- parentValues: {
124
- type: import("vue").PropType<Record<string, any>>;
125
- default: () => {};
126
- };
127
- labelWidth: {
128
- type: import("vue").PropType<string>;
129
- default: string;
130
- };
131
- disabled: {
132
- type: import("vue").PropType<boolean>;
133
- default: boolean;
134
- };
135
- stepActive: {
136
- type: import("vue").PropType<string | number>;
137
- default: number;
138
- };
139
- size: {
140
- type: import("vue").PropType<"large" | "default" | "small">;
141
- };
142
- height: {
143
- type: import("vue").PropType<string>;
144
- default: string;
145
- };
146
- inline: {
147
- type: import("vue").PropType<boolean>;
148
- default: boolean;
149
- };
150
- labelPosition: {
151
- type: import("vue").PropType<string>;
152
- default: string;
153
- };
154
- extendState: {
155
- type: import("vue").PropType<(state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>>;
156
- };
157
- }>> & {
158
- onChange?: ((...args: any[]) => any) | undefined;
159
- onError?: ((...args: any[]) => any) | undefined;
160
- "onField-input"?: ((...args: any[]) => any) | undefined;
161
- "onField-change"?: ((...args: any[]) => any) | undefined;
162
- }, {
163
- config: FormConfig;
164
- initValues: Record<string, any>;
165
- lastValues: Record<string, any>;
166
- isCompare: boolean;
167
- keyProp: string;
168
- parentValues: Record<string, any>;
169
- labelWidth: string;
170
- disabled: boolean;
171
- stepActive: string | number;
172
- height: string;
173
- inline: boolean;
174
- labelPosition: string;
175
- }, true, {}, {}, {
176
- P: {};
177
- B: {};
178
- D: {};
179
- C: {};
180
- M: {};
181
- Defaults: {};
182
- }, Readonly<import("vue").ExtractPropTypes<{
183
- config: {
184
- type: import("vue").PropType<FormConfig>;
185
- required: true;
186
- default: () => never[];
187
- };
188
- popperClass: {
189
- type: import("vue").PropType<string>;
190
- };
191
- initValues: {
192
- type: import("vue").PropType<Record<string, any>>;
193
- required: true;
194
- default: () => {};
195
- };
196
- lastValues: {
197
- type: import("vue").PropType<Record<string, any>>;
198
- default: () => {};
199
- };
200
- isCompare: {
201
- type: import("vue").PropType<boolean>;
202
- default: boolean;
203
- };
204
- keyProp: {
205
- type: import("vue").PropType<string>;
206
- default: string;
207
- };
208
- parentValues: {
209
- type: import("vue").PropType<Record<string, any>>;
210
- default: () => {};
211
- };
212
- labelWidth: {
213
- type: import("vue").PropType<string>;
214
- default: string;
215
- };
216
- disabled: {
217
- type: import("vue").PropType<boolean>;
218
- default: boolean;
219
- };
220
- stepActive: {
221
- type: import("vue").PropType<string | number>;
222
- default: number;
223
- };
224
- size: {
225
- type: import("vue").PropType<"large" | "default" | "small">;
226
- };
227
- height: {
228
- type: import("vue").PropType<string>;
229
- default: string;
230
- };
231
- inline: {
232
- type: import("vue").PropType<boolean>;
233
- default: boolean;
234
- };
235
- labelPosition: {
236
- type: import("vue").PropType<string>;
237
- default: string;
238
- };
239
- extendState: {
240
- type: import("vue").PropType<(state: import("./schema").FormState) => Record<string, any> | Promise<Record<string, any>>>;
241
- };
242
- }>> & {
243
- onChange?: ((...args: any[]) => any) | undefined;
244
- onError?: ((...args: any[]) => any) | undefined;
245
- "onField-input"?: ((...args: any[]) => any) | undefined;
246
- "onField-change"?: ((...args: any[]) => any) | undefined;
247
- }, {
248
- values: import("vue").Ref<import("./schema").FormValue>;
249
- lastValuesProcessed: import("vue").Ref<import("./schema").FormValue>;
250
- formState: import("./schema").FormState;
251
- initialized: import("vue").Ref<boolean>;
252
- changeHandler: () => void;
253
- resetForm: () => any;
254
- submitForm: (native?: boolean | undefined) => Promise<any>;
255
- }, {}, {}, {}, {
256
- config: FormConfig;
257
- initValues: Record<string, any>;
258
- lastValues: Record<string, any>;
259
- isCompare: boolean;
260
- keyProp: string;
261
- parentValues: Record<string, any>;
262
- labelWidth: string;
263
- disabled: boolean;
264
- stepActive: string | number;
265
- height: string;
266
- inline: boolean;
267
- labelPosition: string;
268
- }> | undefined>;
269
- saveFetch: import("vue").Ref<boolean>;
270
- show: () => void;
271
- hide: () => void;
272
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
273
- change: (...args: any[]) => void;
274
- error: (...args: any[]) => void;
275
- submit: (...args: any[]) => void;
276
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
277
- config?: FormConfig | undefined;
278
- values?: Object | undefined;
279
- parentValues?: Object | undefined;
280
- width?: number | undefined;
281
- height?: number | undefined;
282
- labelWidth?: string | undefined;
283
- disabled?: boolean | undefined;
284
- size?: "large" | "default" | "small" | undefined;
285
- confirmText?: string | undefined;
286
- inline?: boolean | undefined;
287
- labelPosition?: string | undefined;
288
- }>, {
289
- config: () => never[];
290
- values: () => {};
291
- confirmText: string;
292
- }>>> & {
293
- onChange?: ((...args: any[]) => any) | undefined;
294
- onSubmit?: ((...args: any[]) => any) | undefined;
295
- onError?: ((...args: any[]) => any) | undefined;
296
- }, {
297
- config: FormConfig;
298
- values: Object;
299
- confirmText: string;
300
- }, {}>, {
301
- default?(_: {}): any;
302
- left?(_: {}): any;
303
- footer?(_: {}): any;
304
- }>;
305
- export default _default;
306
- type __VLS_WithDefaults<P, D> = {
307
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
308
- default: D[K];
309
- }> : P[K];
310
- };
311
- type __VLS_Prettify<T> = {
312
- [K in keyof T]: T[K];
313
- } & {};
314
- type __VLS_WithTemplateSlots<T, S> = T & {
315
- new (): {
316
- $slots: S;
317
- };
318
- };
319
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
320
- type __VLS_TypePropsToOption<T> = {
321
- [K in keyof T]-?: {} extends Pick<T, K> ? {
322
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
323
- } : {
324
- type: import('vue').PropType<T[K]>;
325
- required: true;
326
- };
327
- };