@ironsource/shared-ui 2.1.1-rc.2 → 2.1.1-rc.3
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/{CardPanel.vue_vue_type_style_index_0_scoped_3cda0f04_lang.css → CardPanel.vue_vue_type_style_index_0_scoped_d2b5d12f_lang.css} +1 -1
- package/{FormCard.vue_vue_type_style_index_0_scoped_bb7d27f9_lang.css → FormCard.vue_vue_type_style_index_0_scoped_ad5e4be0_lang.css} +1 -1
- package/FormRow.vue_vue_type_style_index_0_scoped_017dc22e_lang.css +1 -0
- package/components/{layout → forms}/CardPanel.vue.js +2 -2
- package/components/{layout → forms}/CardPanel.vue2.js +1 -1
- package/components/forms/FormCard.vue.js +7 -0
- package/components/{layout → forms}/FormCard.vue2.js +1 -1
- package/components/forms/FormRow.vue.js +7 -0
- package/components/forms/FormRow.vue2.js +41 -0
- package/components/forms/index.d.ts +397 -0
- package/components/forms/index.js +9 -2
- package/components/forms/validation/examples/dynamicForm/useFormTestValidation.d.ts +2 -1
- package/components/forms/validation/examples/simpleForm/useSimpleFormValidation.d.ts +2 -1
- package/components/layout/index.d.ts +3 -398
- package/components/layout/index.js +4 -10
- package/composables/useFormValidation.d.ts +2 -2
- package/composables/useFormValidation.js +12 -12
- package/index.js +85 -84
- package/package.json +1 -1
- package/FormRow.vue_vue_type_style_index_0_scoped_8daca9c2_lang.css +0 -1
- package/components/layout/FormCard.vue.js +0 -7
- package/components/layout/FormRow.vue.js +0 -7
- package/components/layout/FormRow.vue2.js +0 -43
- /package/components/{layout → forms}/CardPanel.vue.d.ts +0 -0
- /package/components/{layout → forms}/FormCard.vue.d.ts +0 -0
- /package/components/{layout → forms}/FormRow.vue.d.ts +0 -0
|
@@ -1,286 +1,5 @@
|
|
|
1
|
-
import FormCard from './FormCard.vue';
|
|
2
|
-
import CardPanel from './CardPanel.vue';
|
|
3
1
|
import FoldableSection from './FoldableSection.vue';
|
|
4
|
-
|
|
5
|
-
declare const FormCardTypes: () => (({
|
|
6
|
-
new (...args: any[]): {
|
|
7
|
-
$: import("vue").ComponentInternalInstance;
|
|
8
|
-
$data: {};
|
|
9
|
-
$props: Partial<{
|
|
10
|
-
title: string;
|
|
11
|
-
testId: string;
|
|
12
|
-
actionButtons: boolean;
|
|
13
|
-
noPadding: boolean;
|
|
14
|
-
saveLabel: string;
|
|
15
|
-
cancelLabel: string;
|
|
16
|
-
saveLoading: boolean;
|
|
17
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
-
title: {
|
|
19
|
-
type: import("vue").PropType<string>;
|
|
20
|
-
default: string;
|
|
21
|
-
};
|
|
22
|
-
testId: {
|
|
23
|
-
type: import("vue").PropType<string>;
|
|
24
|
-
default: string;
|
|
25
|
-
};
|
|
26
|
-
actionButtons: {
|
|
27
|
-
type: import("vue").PropType<boolean>;
|
|
28
|
-
default: boolean;
|
|
29
|
-
};
|
|
30
|
-
noPadding: {
|
|
31
|
-
type: import("vue").PropType<boolean>;
|
|
32
|
-
default: boolean;
|
|
33
|
-
};
|
|
34
|
-
saveLabel: {
|
|
35
|
-
type: import("vue").PropType<string>;
|
|
36
|
-
default: string;
|
|
37
|
-
};
|
|
38
|
-
cancelLabel: {
|
|
39
|
-
type: import("vue").PropType<string>;
|
|
40
|
-
default: string;
|
|
41
|
-
};
|
|
42
|
-
saveLoading: {
|
|
43
|
-
type: import("vue").PropType<boolean>;
|
|
44
|
-
default: boolean;
|
|
45
|
-
};
|
|
46
|
-
}>> & {
|
|
47
|
-
onCancel?: () => any;
|
|
48
|
-
onSave?: () => any;
|
|
49
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "testId" | "actionButtons" | "noPadding" | "saveLabel" | "cancelLabel" | "saveLoading">;
|
|
50
|
-
$attrs: {
|
|
51
|
-
[x: string]: unknown;
|
|
52
|
-
};
|
|
53
|
-
$refs: {
|
|
54
|
-
[x: string]: unknown;
|
|
55
|
-
};
|
|
56
|
-
$slots: Readonly<{
|
|
57
|
-
[name: string]: import("vue").Slot;
|
|
58
|
-
}>;
|
|
59
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
60
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
61
|
-
$emit: ((event: "cancel") => void) & ((event: "save") => void);
|
|
62
|
-
$el: any;
|
|
63
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
64
|
-
title: {
|
|
65
|
-
type: import("vue").PropType<string>;
|
|
66
|
-
default: string;
|
|
67
|
-
};
|
|
68
|
-
testId: {
|
|
69
|
-
type: import("vue").PropType<string>;
|
|
70
|
-
default: string;
|
|
71
|
-
};
|
|
72
|
-
actionButtons: {
|
|
73
|
-
type: import("vue").PropType<boolean>;
|
|
74
|
-
default: boolean;
|
|
75
|
-
};
|
|
76
|
-
noPadding: {
|
|
77
|
-
type: import("vue").PropType<boolean>;
|
|
78
|
-
default: boolean;
|
|
79
|
-
};
|
|
80
|
-
saveLabel: {
|
|
81
|
-
type: import("vue").PropType<string>;
|
|
82
|
-
default: string;
|
|
83
|
-
};
|
|
84
|
-
cancelLabel: {
|
|
85
|
-
type: import("vue").PropType<string>;
|
|
86
|
-
default: string;
|
|
87
|
-
};
|
|
88
|
-
saveLoading: {
|
|
89
|
-
type: import("vue").PropType<boolean>;
|
|
90
|
-
default: boolean;
|
|
91
|
-
};
|
|
92
|
-
}>> & {
|
|
93
|
-
onCancel?: () => any;
|
|
94
|
-
onSave?: () => any;
|
|
95
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
96
|
-
save: () => void;
|
|
97
|
-
cancel: () => void;
|
|
98
|
-
}, string, {
|
|
99
|
-
title: string;
|
|
100
|
-
testId: string;
|
|
101
|
-
actionButtons: boolean;
|
|
102
|
-
noPadding: boolean;
|
|
103
|
-
saveLabel: string;
|
|
104
|
-
cancelLabel: string;
|
|
105
|
-
saveLoading: boolean;
|
|
106
|
-
}, {}, string> & {
|
|
107
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
108
|
-
created?: (() => void) | (() => void)[];
|
|
109
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
110
|
-
mounted?: (() => void) | (() => void)[];
|
|
111
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
112
|
-
updated?: (() => void) | (() => void)[];
|
|
113
|
-
activated?: (() => void) | (() => void)[];
|
|
114
|
-
deactivated?: (() => void) | (() => void)[];
|
|
115
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
116
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
117
|
-
destroyed?: (() => void) | (() => void)[];
|
|
118
|
-
unmounted?: (() => void) | (() => void)[];
|
|
119
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
120
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
121
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void)[];
|
|
122
|
-
};
|
|
123
|
-
$forceUpdate: () => void;
|
|
124
|
-
$nextTick: typeof import("vue").nextTick;
|
|
125
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
|
126
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
127
|
-
title: {
|
|
128
|
-
type: import("vue").PropType<string>;
|
|
129
|
-
default: string;
|
|
130
|
-
};
|
|
131
|
-
testId: {
|
|
132
|
-
type: import("vue").PropType<string>;
|
|
133
|
-
default: string;
|
|
134
|
-
};
|
|
135
|
-
actionButtons: {
|
|
136
|
-
type: import("vue").PropType<boolean>;
|
|
137
|
-
default: boolean;
|
|
138
|
-
};
|
|
139
|
-
noPadding: {
|
|
140
|
-
type: import("vue").PropType<boolean>;
|
|
141
|
-
default: boolean;
|
|
142
|
-
};
|
|
143
|
-
saveLabel: {
|
|
144
|
-
type: import("vue").PropType<string>;
|
|
145
|
-
default: string;
|
|
146
|
-
};
|
|
147
|
-
cancelLabel: {
|
|
148
|
-
type: import("vue").PropType<string>;
|
|
149
|
-
default: string;
|
|
150
|
-
};
|
|
151
|
-
saveLoading: {
|
|
152
|
-
type: import("vue").PropType<boolean>;
|
|
153
|
-
default: boolean;
|
|
154
|
-
};
|
|
155
|
-
}>> & {
|
|
156
|
-
onCancel?: () => any;
|
|
157
|
-
onSave?: () => any;
|
|
158
|
-
} & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
159
|
-
__isFragment?: never;
|
|
160
|
-
__isTeleport?: never;
|
|
161
|
-
__isSuspense?: never;
|
|
162
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
163
|
-
title: {
|
|
164
|
-
type: import("vue").PropType<string>;
|
|
165
|
-
default: string;
|
|
166
|
-
};
|
|
167
|
-
testId: {
|
|
168
|
-
type: import("vue").PropType<string>;
|
|
169
|
-
default: string;
|
|
170
|
-
};
|
|
171
|
-
actionButtons: {
|
|
172
|
-
type: import("vue").PropType<boolean>;
|
|
173
|
-
default: boolean;
|
|
174
|
-
};
|
|
175
|
-
noPadding: {
|
|
176
|
-
type: import("vue").PropType<boolean>;
|
|
177
|
-
default: boolean;
|
|
178
|
-
};
|
|
179
|
-
saveLabel: {
|
|
180
|
-
type: import("vue").PropType<string>;
|
|
181
|
-
default: string;
|
|
182
|
-
};
|
|
183
|
-
cancelLabel: {
|
|
184
|
-
type: import("vue").PropType<string>;
|
|
185
|
-
default: string;
|
|
186
|
-
};
|
|
187
|
-
saveLoading: {
|
|
188
|
-
type: import("vue").PropType<boolean>;
|
|
189
|
-
default: boolean;
|
|
190
|
-
};
|
|
191
|
-
}>> & {
|
|
192
|
-
onCancel?: () => any;
|
|
193
|
-
onSave?: () => any;
|
|
194
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
195
|
-
save: () => void;
|
|
196
|
-
cancel: () => void;
|
|
197
|
-
}, string, {
|
|
198
|
-
title: string;
|
|
199
|
-
testId: string;
|
|
200
|
-
actionButtons: boolean;
|
|
201
|
-
noPadding: boolean;
|
|
202
|
-
saveLabel: string;
|
|
203
|
-
cancelLabel: string;
|
|
204
|
-
saveLoading: boolean;
|
|
205
|
-
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
206
|
-
$slots: {
|
|
207
|
-
header?(_: {}): any;
|
|
208
|
-
default?(_: {}): any;
|
|
209
|
-
footer?(_: {}): any;
|
|
210
|
-
};
|
|
211
|
-
})) | ({
|
|
212
|
-
new (...args: any[]): {
|
|
213
|
-
$: import("vue").ComponentInternalInstance;
|
|
214
|
-
$data: {};
|
|
215
|
-
$props: Partial<{
|
|
216
|
-
noPadding: boolean;
|
|
217
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
218
|
-
noPadding: {
|
|
219
|
-
type: import("vue").PropType<boolean>;
|
|
220
|
-
default: boolean;
|
|
221
|
-
};
|
|
222
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "noPadding">;
|
|
223
|
-
$attrs: {
|
|
224
|
-
[x: string]: unknown;
|
|
225
|
-
};
|
|
226
|
-
$refs: {
|
|
227
|
-
[x: string]: unknown;
|
|
228
|
-
};
|
|
229
|
-
$slots: Readonly<{
|
|
230
|
-
[name: string]: import("vue").Slot;
|
|
231
|
-
}>;
|
|
232
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
233
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
234
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
235
|
-
$el: any;
|
|
236
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
237
|
-
noPadding: {
|
|
238
|
-
type: import("vue").PropType<boolean>;
|
|
239
|
-
default: boolean;
|
|
240
|
-
};
|
|
241
|
-
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
242
|
-
noPadding: boolean;
|
|
243
|
-
}, {}, string> & {
|
|
244
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
245
|
-
created?: (() => void) | (() => void)[];
|
|
246
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
247
|
-
mounted?: (() => void) | (() => void)[];
|
|
248
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
249
|
-
updated?: (() => void) | (() => void)[];
|
|
250
|
-
activated?: (() => void) | (() => void)[];
|
|
251
|
-
deactivated?: (() => void) | (() => void)[];
|
|
252
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
253
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
254
|
-
destroyed?: (() => void) | (() => void)[];
|
|
255
|
-
unmounted?: (() => void) | (() => void)[];
|
|
256
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
257
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
258
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void)[];
|
|
259
|
-
};
|
|
260
|
-
$forceUpdate: () => void;
|
|
261
|
-
$nextTick: typeof import("vue").nextTick;
|
|
262
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
|
263
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
264
|
-
noPadding: {
|
|
265
|
-
type: import("vue").PropType<boolean>;
|
|
266
|
-
default: boolean;
|
|
267
|
-
};
|
|
268
|
-
}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
269
|
-
__isFragment?: never;
|
|
270
|
-
__isTeleport?: never;
|
|
271
|
-
__isSuspense?: never;
|
|
272
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
273
|
-
noPadding: {
|
|
274
|
-
type: import("vue").PropType<boolean>;
|
|
275
|
-
default: boolean;
|
|
276
|
-
};
|
|
277
|
-
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
278
|
-
noPadding: boolean;
|
|
279
|
-
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
280
|
-
$slots: {
|
|
281
|
-
default?(_: {}): any;
|
|
282
|
-
};
|
|
283
|
-
})) | ({
|
|
2
|
+
declare const FoldableSectionTypes: () => ({
|
|
284
3
|
new (...args: any[]): {
|
|
285
4
|
$: import("vue").ComponentInternalInstance;
|
|
286
5
|
$data: {};
|
|
@@ -402,119 +121,5 @@ declare const FormCardTypes: () => (({
|
|
|
402
121
|
$slots: {
|
|
403
122
|
default?(_: {}): any;
|
|
404
123
|
};
|
|
405
|
-
}))
|
|
406
|
-
|
|
407
|
-
$: import("vue").ComponentInternalInstance;
|
|
408
|
-
$data: {};
|
|
409
|
-
$props: Partial<{
|
|
410
|
-
label: string;
|
|
411
|
-
mandatory: boolean;
|
|
412
|
-
testId: string;
|
|
413
|
-
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
414
|
-
label: {
|
|
415
|
-
type: import("vue").PropType<string>;
|
|
416
|
-
required: true;
|
|
417
|
-
default: string;
|
|
418
|
-
};
|
|
419
|
-
mandatory: {
|
|
420
|
-
type: import("vue").PropType<boolean>;
|
|
421
|
-
default: boolean;
|
|
422
|
-
};
|
|
423
|
-
testId: {
|
|
424
|
-
type: import("vue").PropType<string>;
|
|
425
|
-
default: string;
|
|
426
|
-
};
|
|
427
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "label" | "mandatory" | "testId">;
|
|
428
|
-
$attrs: {
|
|
429
|
-
[x: string]: unknown;
|
|
430
|
-
};
|
|
431
|
-
$refs: {
|
|
432
|
-
[x: string]: unknown;
|
|
433
|
-
};
|
|
434
|
-
$slots: Readonly<{
|
|
435
|
-
[name: string]: import("vue").Slot;
|
|
436
|
-
}>;
|
|
437
|
-
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
438
|
-
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
|
|
439
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
440
|
-
$el: any;
|
|
441
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
442
|
-
label: {
|
|
443
|
-
type: import("vue").PropType<string>;
|
|
444
|
-
required: true;
|
|
445
|
-
default: string;
|
|
446
|
-
};
|
|
447
|
-
mandatory: {
|
|
448
|
-
type: import("vue").PropType<boolean>;
|
|
449
|
-
default: boolean;
|
|
450
|
-
};
|
|
451
|
-
testId: {
|
|
452
|
-
type: import("vue").PropType<string>;
|
|
453
|
-
default: string;
|
|
454
|
-
};
|
|
455
|
-
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
456
|
-
label: string;
|
|
457
|
-
mandatory: boolean;
|
|
458
|
-
testId: string;
|
|
459
|
-
}, {}, string> & {
|
|
460
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
461
|
-
created?: (() => void) | (() => void)[];
|
|
462
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
463
|
-
mounted?: (() => void) | (() => void)[];
|
|
464
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
465
|
-
updated?: (() => void) | (() => void)[];
|
|
466
|
-
activated?: (() => void) | (() => void)[];
|
|
467
|
-
deactivated?: (() => void) | (() => void)[];
|
|
468
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
469
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
470
|
-
destroyed?: (() => void) | (() => void)[];
|
|
471
|
-
unmounted?: (() => void) | (() => void)[];
|
|
472
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
473
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
474
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>, info: string) => boolean | void)[];
|
|
475
|
-
};
|
|
476
|
-
$forceUpdate: () => void;
|
|
477
|
-
$nextTick: typeof import("vue").nextTick;
|
|
478
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean>): import("vue").WatchStopHandle;
|
|
479
|
-
} & Readonly<import("vue").ExtractPropTypes<{
|
|
480
|
-
label: {
|
|
481
|
-
type: import("vue").PropType<string>;
|
|
482
|
-
required: true;
|
|
483
|
-
default: string;
|
|
484
|
-
};
|
|
485
|
-
mandatory: {
|
|
486
|
-
type: import("vue").PropType<boolean>;
|
|
487
|
-
default: boolean;
|
|
488
|
-
};
|
|
489
|
-
testId: {
|
|
490
|
-
type: import("vue").PropType<string>;
|
|
491
|
-
default: string;
|
|
492
|
-
};
|
|
493
|
-
}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
494
|
-
__isFragment?: never;
|
|
495
|
-
__isTeleport?: never;
|
|
496
|
-
__isSuspense?: never;
|
|
497
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
498
|
-
label: {
|
|
499
|
-
type: import("vue").PropType<string>;
|
|
500
|
-
required: true;
|
|
501
|
-
default: string;
|
|
502
|
-
};
|
|
503
|
-
mandatory: {
|
|
504
|
-
type: import("vue").PropType<boolean>;
|
|
505
|
-
default: boolean;
|
|
506
|
-
};
|
|
507
|
-
testId: {
|
|
508
|
-
type: import("vue").PropType<string>;
|
|
509
|
-
default: string;
|
|
510
|
-
};
|
|
511
|
-
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
512
|
-
label: string;
|
|
513
|
-
mandatory: boolean;
|
|
514
|
-
testId: string;
|
|
515
|
-
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
516
|
-
$slots: {
|
|
517
|
-
default?(_: {}): any;
|
|
518
|
-
};
|
|
519
|
-
})))[];
|
|
520
|
-
export { FormRow, FormCard, CardPanel, FoldableSection, FormCardTypes };
|
|
124
|
+
}))[];
|
|
125
|
+
export { FoldableSection, FoldableSectionTypes };
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import o from "./
|
|
2
|
-
|
|
3
|
-
import m from "./FoldableSection.vue.js";
|
|
4
|
-
import t from "./FormRow.vue.js";
|
|
5
|
-
const d = () => [o, r, m, t];
|
|
1
|
+
import o from "./FoldableSection.vue.js";
|
|
2
|
+
const t = () => [o];
|
|
6
3
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
o as FormCard,
|
|
10
|
-
d as FormCardTypes,
|
|
11
|
-
t as FormRow
|
|
4
|
+
o as FoldableSection,
|
|
5
|
+
t as FoldableSectionTypes
|
|
12
6
|
};
|
|
@@ -7,7 +7,7 @@ export type ValidationStateType<T> = {
|
|
|
7
7
|
};
|
|
8
8
|
export type FormValidationSchemaYupType<T> = Record<keyof T, yup.AnySchema<any, any, any, any>>;
|
|
9
9
|
export type UseFormValidationType<T> = {
|
|
10
|
-
formState: T
|
|
10
|
+
formState: Ref<T>;
|
|
11
11
|
formValidationSchema: FormValidationSchemaYupType<T>;
|
|
12
12
|
};
|
|
13
13
|
export type UseFormValidationReponseType<T> = {
|
|
@@ -17,5 +17,5 @@ export type UseFormValidationReponseType<T> = {
|
|
|
17
17
|
};
|
|
18
18
|
export declare const scrollToElementByClass: (elementClass: string, index?: number) => void;
|
|
19
19
|
export declare const scrollToFirstInvalidElement: <T>(validationErrors: Partial<Record<keyof T, string>>) => void;
|
|
20
|
-
export declare const yupValidation: <T>(schema: FormValidationSchemaYupType<T>, formState: T) => ValidationStateType<T>;
|
|
20
|
+
export declare const yupValidation: <T>(schema: FormValidationSchemaYupType<T>, formState: Ref<T>) => ValidationStateType<T>;
|
|
21
21
|
export declare const useFormValidation: <T extends object>({ formState, formValidationSchema, }: UseFormValidationType<T>) => UseFormValidationReponseType<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ref as
|
|
1
|
+
import * as m from "yup";
|
|
2
|
+
import { ref as u, reactive as f, watch as v } from "vue";
|
|
3
3
|
const E = (e, r = 0) => {
|
|
4
4
|
try {
|
|
5
5
|
window.document.getElementsByClassName(e)[r].scrollIntoView({ behavior: "smooth" });
|
|
@@ -10,25 +10,25 @@ const E = (e, r = 0) => {
|
|
|
10
10
|
const r = Object.keys(e)?.[0];
|
|
11
11
|
r && E(`form-field-${r}`);
|
|
12
12
|
}, y = (e, r) => {
|
|
13
|
-
const o =
|
|
13
|
+
const o = m.object().shape(e);
|
|
14
14
|
try {
|
|
15
|
-
return o.validateSync(r, { abortEarly: !1 }), { isValid: !0, errors: {} };
|
|
15
|
+
return o.validateSync(r.value, { abortEarly: !1 }), { isValid: !0, errors: {} };
|
|
16
16
|
} catch (i) {
|
|
17
|
-
return { isValid: !1, errors: i.inner.reduce((s,
|
|
17
|
+
return { isValid: !1, errors: i.inner.reduce((s, l) => (s[l.path] = l.message, s), {}) };
|
|
18
18
|
}
|
|
19
19
|
}, b = ({
|
|
20
20
|
formState: e,
|
|
21
21
|
formValidationSchema: r
|
|
22
22
|
}) => {
|
|
23
|
-
const o =
|
|
24
|
-
const { isValid:
|
|
25
|
-
o.value = !0, i.value =
|
|
23
|
+
const o = u(!1), i = u(!0), t = f({}), s = (l) => {
|
|
24
|
+
const { isValid: n, errors: c } = y(r, e);
|
|
25
|
+
o.value = !0, i.value = n, Object.keys(t).forEach((a) => {
|
|
26
26
|
a && !c[a] && delete t[a];
|
|
27
|
-
}), Object.entries(c).forEach(([a,
|
|
28
|
-
t[a] =
|
|
29
|
-
}), !
|
|
27
|
+
}), Object.entries(c).forEach(([a, d]) => {
|
|
28
|
+
t[a] = d;
|
|
29
|
+
}), !n && !l && h(t);
|
|
30
30
|
};
|
|
31
|
-
return v(e, () => {
|
|
31
|
+
return v(e.value, () => {
|
|
32
32
|
o.value && s(!0);
|
|
33
33
|
}), {
|
|
34
34
|
validationErrors: t,
|