@ironsource/shared-ui 2.1.0-rc.1 → 2.1.0-rc.2

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 (33) hide show
  1. package/FormField.vue_vue_type_style_index_0_scoped_00052aa6_lang.css +1 -0
  2. package/components/button/v3/Button.vue.d.ts +6 -6
  3. package/components/button/v3/index.d.ts +14 -14
  4. package/components/emptyState/v3/EmptyState.vue.d.ts +3 -3
  5. package/components/emptyState/v3/index.d.ts +7 -7
  6. package/components/forms/FormField.vue.d.ts +2 -2
  7. package/components/forms/index.d.ts +0 -4
  8. package/components/forms/validation/ValidationStory.vue.d.ts +2 -0
  9. package/components/forms/validation/examples/dynamicForm/DynamicForm.vue.d.ts +2 -0
  10. package/components/forms/validation/examples/dynamicForm/FormParts/FormA.vue.d.ts +23 -0
  11. package/components/forms/validation/examples/dynamicForm/FormParts/FormB.vue.d.ts +25 -0
  12. package/components/forms/validation/examples/dynamicForm/types.d.ts +26 -0
  13. package/components/forms/validation/examples/dynamicForm/useFormTestValidation.d.ts +2 -0
  14. package/components/forms/validation/examples/simpleForm/SimpleForm.vue.d.ts +2 -0
  15. package/components/forms/validation/examples/simpleForm/types.d.ts +4 -0
  16. package/components/forms/validation/examples/simpleForm/useSimpleFormValidation.d.ts +2 -0
  17. package/components/forms/validation/utils/types.d.ts +1 -9
  18. package/components/icon/v3/icons/Duplicate.vue.d.ts +2 -0
  19. package/components/icon/v3/icons/index.d.ts +3 -0
  20. package/components/icon/v3/index.d.ts +3 -0
  21. package/components/layout/index.d.ts +170 -170
  22. package/index.d.ts +3 -0
  23. package/package.json +1 -1
  24. package/src/components/forms/FormField.vue.js +3 -3
  25. package/src/components/forms/FormField.vue2.js +5 -5
  26. package/src/components/forms/validation/utils/scrollToElemets.js +3 -3
  27. package/src/components/forms/validation/utils/useFormValidation.js +20 -21
  28. package/src/components/icon/v3/Icon.vue2.js +1 -1
  29. package/src/components/icon/v3/icons/Duplicate.vue.js +19 -0
  30. package/src/components/icon/v3/icons/index.js +3 -0
  31. package/FormField.vue_vue_type_style_index_0_scoped_a6ff18af_lang.css +0 -1
  32. package/components/forms/FormContainer.vue.d.ts +0 -9
  33. package/components/forms/validation/utils/useConvertErrorsSchema.d.ts +0 -1
@@ -7,13 +7,46 @@ declare const FormCardTypes: () => (({
7
7
  $: import("vue").ComponentInternalInstance;
8
8
  $data: {};
9
9
  $props: Partial<{
10
+ title: string;
11
+ testId: string;
12
+ actionButtons: boolean;
10
13
  noPadding: boolean;
14
+ saveLabel: string;
15
+ cancelLabel: string;
16
+ saveLoading: boolean;
11
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
+ };
12
30
  noPadding: {
13
31
  type: import("vue").PropType<boolean>;
14
32
  default: boolean;
15
33
  };
16
- }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "noPadding">;
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">;
17
50
  $attrs: {
18
51
  [x: string]: unknown;
19
52
  };
@@ -25,15 +58,51 @@ declare const FormCardTypes: () => (({
25
58
  }>;
26
59
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
27
60
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
28
- $emit: (event: string, ...args: any[]) => void;
61
+ $emit: ((event: "cancel") => void) & ((event: "save") => void);
29
62
  $el: any;
30
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
+ };
31
76
  noPadding: {
32
77
  type: import("vue").PropType<boolean>;
33
78
  default: boolean;
34
79
  };
35
- }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
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;
36
102
  noPadding: boolean;
103
+ saveLabel: string;
104
+ cancelLabel: string;
105
+ saveLoading: boolean;
37
106
  }, {}, string> & {
38
107
  beforeCreate?: (() => void) | (() => void)[];
39
108
  created?: (() => void) | (() => void)[];
@@ -55,49 +124,102 @@ declare const FormCardTypes: () => (({
55
124
  $nextTick: typeof import("vue").nextTick;
56
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;
57
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
+ };
58
139
  noPadding: {
59
140
  type: import("vue").PropType<boolean>;
60
141
  default: boolean;
61
142
  };
62
- }>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
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 & {};
63
159
  __isFragment?: never;
64
160
  __isTeleport?: never;
65
161
  __isSuspense?: never;
66
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
+ };
67
175
  noPadding: {
68
176
  type: import("vue").PropType<boolean>;
69
177
  default: boolean;
70
178
  };
71
- }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
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;
72
201
  noPadding: boolean;
202
+ saveLabel: string;
203
+ cancelLabel: string;
204
+ saveLoading: boolean;
73
205
  }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
74
206
  $slots: {
207
+ header?(_: {}): any;
75
208
  default?(_: {}): any;
209
+ footer?(_: {}): any;
76
210
  };
77
211
  })) | ({
78
212
  new (...args: any[]): {
79
213
  $: import("vue").ComponentInternalInstance;
80
214
  $data: {};
81
215
  $props: Partial<{
82
- title: string;
83
- open: boolean;
84
- testId: string;
216
+ noPadding: boolean;
85
217
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
86
- title: {
87
- type: import("vue").PropType<string>;
88
- default: string;
89
- };
90
- open: {
218
+ noPadding: {
91
219
  type: import("vue").PropType<boolean>;
92
220
  default: boolean;
93
221
  };
94
- testId: {
95
- type: import("vue").PropType<string>;
96
- default: string;
97
- };
98
- }>> & {
99
- "onUpdate:open"?: (value: boolean) => any;
100
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "open" | "testId">;
222
+ }>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "noPadding">;
101
223
  $attrs: {
102
224
  [x: string]: unknown;
103
225
  };
@@ -109,29 +231,15 @@ declare const FormCardTypes: () => (({
109
231
  }>;
110
232
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
111
233
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
112
- $emit: (event: "update:open", value: boolean) => void;
234
+ $emit: (event: string, ...args: any[]) => void;
113
235
  $el: any;
114
236
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
115
- title: {
116
- type: import("vue").PropType<string>;
117
- default: string;
118
- };
119
- open: {
237
+ noPadding: {
120
238
  type: import("vue").PropType<boolean>;
121
239
  default: boolean;
122
240
  };
123
- testId: {
124
- type: import("vue").PropType<string>;
125
- default: string;
126
- };
127
- }>> & {
128
- "onUpdate:open"?: (value: boolean) => any;
129
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
130
- "update:open": (value: boolean) => void;
131
- }, string, {
132
- title: string;
133
- open: boolean;
134
- testId: string;
241
+ }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
242
+ noPadding: boolean;
135
243
  }, {}, string> & {
136
244
  beforeCreate?: (() => void) | (() => void)[];
137
245
  created?: (() => void) | (() => void)[];
@@ -153,45 +261,21 @@ declare const FormCardTypes: () => (({
153
261
  $nextTick: typeof import("vue").nextTick;
154
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;
155
263
  } & Readonly<import("vue").ExtractPropTypes<{
156
- title: {
157
- type: import("vue").PropType<string>;
158
- default: string;
159
- };
160
- open: {
264
+ noPadding: {
161
265
  type: import("vue").PropType<boolean>;
162
266
  default: boolean;
163
267
  };
164
- testId: {
165
- type: import("vue").PropType<string>;
166
- default: string;
167
- };
168
- }>> & {
169
- "onUpdate:open"?: (value: boolean) => any;
170
- } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
268
+ }>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
171
269
  __isFragment?: never;
172
270
  __isTeleport?: never;
173
271
  __isSuspense?: never;
174
272
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
175
- title: {
176
- type: import("vue").PropType<string>;
177
- default: string;
178
- };
179
- open: {
273
+ noPadding: {
180
274
  type: import("vue").PropType<boolean>;
181
275
  default: boolean;
182
276
  };
183
- testId: {
184
- type: import("vue").PropType<string>;
185
- default: string;
186
- };
187
- }>> & {
188
- "onUpdate:open"?: (value: boolean) => any;
189
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
190
- "update:open": (value: boolean) => void;
191
- }, string, {
192
- title: string;
193
- open: boolean;
194
- testId: string;
277
+ }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
278
+ noPadding: boolean;
195
279
  }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
196
280
  $slots: {
197
281
  default?(_: {}): any;
@@ -202,45 +286,24 @@ declare const FormCardTypes: () => (({
202
286
  $data: {};
203
287
  $props: Partial<{
204
288
  title: string;
289
+ open: boolean;
205
290
  testId: string;
206
- actionButtons: boolean;
207
- noPadding: boolean;
208
- saveLabel: string;
209
- cancelLabel: string;
210
- saveLoading: boolean;
211
291
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
212
292
  title: {
213
293
  type: import("vue").PropType<string>;
214
294
  default: string;
215
295
  };
216
- testId: {
217
- type: import("vue").PropType<string>;
218
- default: string;
219
- };
220
- actionButtons: {
221
- type: import("vue").PropType<boolean>;
222
- default: boolean;
223
- };
224
- noPadding: {
296
+ open: {
225
297
  type: import("vue").PropType<boolean>;
226
298
  default: boolean;
227
299
  };
228
- saveLabel: {
229
- type: import("vue").PropType<string>;
230
- default: string;
231
- };
232
- cancelLabel: {
300
+ testId: {
233
301
  type: import("vue").PropType<string>;
234
302
  default: string;
235
303
  };
236
- saveLoading: {
237
- type: import("vue").PropType<boolean>;
238
- default: boolean;
239
- };
240
304
  }>> & {
241
- onCancel?: () => any;
242
- onSave?: () => any;
243
- } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "testId" | "actionButtons" | "noPadding" | "saveLabel" | "cancelLabel" | "saveLoading">;
305
+ "onUpdate:open"?: (value: boolean) => any;
306
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "title" | "open" | "testId">;
244
307
  $attrs: {
245
308
  [x: string]: unknown;
246
309
  };
@@ -252,51 +315,29 @@ declare const FormCardTypes: () => (({
252
315
  }>;
253
316
  $root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
254
317
  $parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}>;
255
- $emit: ((event: "cancel") => void) & ((event: "save") => void);
318
+ $emit: (event: "update:open", value: boolean) => void;
256
319
  $el: any;
257
320
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
258
321
  title: {
259
322
  type: import("vue").PropType<string>;
260
323
  default: string;
261
324
  };
262
- testId: {
263
- type: import("vue").PropType<string>;
264
- default: string;
265
- };
266
- actionButtons: {
267
- type: import("vue").PropType<boolean>;
268
- default: boolean;
269
- };
270
- noPadding: {
325
+ open: {
271
326
  type: import("vue").PropType<boolean>;
272
327
  default: boolean;
273
328
  };
274
- saveLabel: {
275
- type: import("vue").PropType<string>;
276
- default: string;
277
- };
278
- cancelLabel: {
329
+ testId: {
279
330
  type: import("vue").PropType<string>;
280
331
  default: string;
281
332
  };
282
- saveLoading: {
283
- type: import("vue").PropType<boolean>;
284
- default: boolean;
285
- };
286
333
  }>> & {
287
- onCancel?: () => any;
288
- onSave?: () => any;
334
+ "onUpdate:open"?: (value: boolean) => any;
289
335
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
290
- save: () => void;
291
- cancel: () => void;
336
+ "update:open": (value: boolean) => void;
292
337
  }, string, {
293
338
  title: string;
339
+ open: boolean;
294
340
  testId: string;
295
- actionButtons: boolean;
296
- noPadding: boolean;
297
- saveLabel: string;
298
- cancelLabel: string;
299
- saveLoading: boolean;
300
341
  }, {}, string> & {
301
342
  beforeCreate?: (() => void) | (() => void)[];
302
343
  created?: (() => void) | (() => void)[];
@@ -322,33 +363,16 @@ declare const FormCardTypes: () => (({
322
363
  type: import("vue").PropType<string>;
323
364
  default: string;
324
365
  };
325
- testId: {
326
- type: import("vue").PropType<string>;
327
- default: string;
328
- };
329
- actionButtons: {
330
- type: import("vue").PropType<boolean>;
331
- default: boolean;
332
- };
333
- noPadding: {
366
+ open: {
334
367
  type: import("vue").PropType<boolean>;
335
368
  default: boolean;
336
369
  };
337
- saveLabel: {
338
- type: import("vue").PropType<string>;
339
- default: string;
340
- };
341
- cancelLabel: {
370
+ testId: {
342
371
  type: import("vue").PropType<string>;
343
372
  default: string;
344
373
  };
345
- saveLoading: {
346
- type: import("vue").PropType<boolean>;
347
- default: boolean;
348
- };
349
374
  }>> & {
350
- onCancel?: () => any;
351
- onSave?: () => any;
375
+ "onUpdate:open"?: (value: boolean) => any;
352
376
  } & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
353
377
  __isFragment?: never;
354
378
  __isTeleport?: never;
@@ -358,49 +382,25 @@ declare const FormCardTypes: () => (({
358
382
  type: import("vue").PropType<string>;
359
383
  default: string;
360
384
  };
361
- testId: {
362
- type: import("vue").PropType<string>;
363
- default: string;
364
- };
365
- actionButtons: {
366
- type: import("vue").PropType<boolean>;
367
- default: boolean;
368
- };
369
- noPadding: {
385
+ open: {
370
386
  type: import("vue").PropType<boolean>;
371
387
  default: boolean;
372
388
  };
373
- saveLabel: {
374
- type: import("vue").PropType<string>;
375
- default: string;
376
- };
377
- cancelLabel: {
389
+ testId: {
378
390
  type: import("vue").PropType<string>;
379
391
  default: string;
380
392
  };
381
- saveLoading: {
382
- type: import("vue").PropType<boolean>;
383
- default: boolean;
384
- };
385
393
  }>> & {
386
- onCancel?: () => any;
387
- onSave?: () => any;
394
+ "onUpdate:open"?: (value: boolean) => any;
388
395
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
389
- save: () => void;
390
- cancel: () => void;
396
+ "update:open": (value: boolean) => void;
391
397
  }, string, {
392
398
  title: string;
399
+ open: boolean;
393
400
  testId: string;
394
- actionButtons: boolean;
395
- noPadding: boolean;
396
- saveLabel: string;
397
- cancelLabel: string;
398
- saveLoading: boolean;
399
401
  }, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
400
402
  $slots: {
401
- header?(_: {}): any;
402
403
  default?(_: {}): any;
403
- footer?(_: {}): any;
404
404
  };
405
405
  })) | ({
406
406
  new (...args: any[]): {
package/index.d.ts CHANGED
@@ -7074,6 +7074,9 @@ declare const _default: {
7074
7074
  'drag-indicator': {
7075
7075
  fileName: string;
7076
7076
  };
7077
+ duplicate: {
7078
+ fileName: string;
7079
+ };
7077
7080
  ecpi: {
7078
7081
  fileName: string;
7079
7082
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.1.0-rc.1",
3
+ "version": "2.1.0-rc.2",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"
@@ -1,7 +1,7 @@
1
1
  import o from "./FormField.vue2.js";
2
2
  /* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
3
- console.log('scoped// import "../../FormField.vue_vue_type_style_index_0_scoped_a6ff18af_lang.css"; //*');
4
- const t = /* @__PURE__ */ e(o, [["__scopeId", "data-v-a6ff18af"]]);
3
+ console.log('scoped// import "../../FormField.vue_vue_type_style_index_0_scoped_00052aa6_lang.css"; //*');
4
+ const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-00052aa6"]]);
5
5
  export {
6
- t as default
6
+ a as default
7
7
  };
@@ -1,14 +1,14 @@
1
- import { defineComponent as e, openBlock as o, createElementBlock as l, normalizeClass as n, renderSlot as i } from "vue";
2
- const s = /* @__PURE__ */ e({
1
+ import { defineComponent as t, openBlock as o, createElementBlock as l, normalizeClass as n, renderSlot as i } from "vue";
2
+ const s = /* @__PURE__ */ t({
3
3
  __name: "FormField",
4
4
  props: {
5
5
  validationPath: null
6
6
  },
7
7
  setup(a) {
8
- return (t, d) => (o(), l("div", {
9
- class: n(`data-validation-${a.validationPath}`)
8
+ return (e, r) => (o(), l("div", {
9
+ class: n(`form-field-${a.validationPath}`)
10
10
  }, [
11
- i(t.$slots, "default", { validationPath: a.validationPath }, void 0, !0)
11
+ i(e.$slots, "default", { validationPath: a.validationPath }, void 0, !0)
12
12
  ], 2));
13
13
  }
14
14
  });
@@ -4,11 +4,11 @@ const o = (t, e = 0) => {
4
4
  } catch {
5
5
  return;
6
6
  }
7
- }, r = (t) => {
7
+ }, s = (t) => {
8
8
  const e = Object.keys(t)?.[0];
9
- console.log("firstErrorElement: ", e), e && o(`form-field-${e}`);
9
+ e && o(`form-field-${e}`);
10
10
  };
11
11
  export {
12
12
  o as scrollToElementByClass,
13
- r as scrollToFirstInvalidElement
13
+ s as scrollToFirstInvalidElement
14
14
  };
@@ -1,35 +1,34 @@
1
- import { object as m } from "../../../../../node_modules/yup/index.esm.js";
2
- import { ref as n, reactive as v, watch as p } from "vue";
3
- import { scrollToFirstInvalidElement as E } from "./scrollToElemets.js";
4
- const h = (a, s) => {
5
- const o = m().shape(a);
1
+ import { object as f } from "../../../../../node_modules/yup/index.esm.js";
2
+ import { ref as d, reactive as m, watch as v } from "vue";
3
+ import { scrollToFirstInvalidElement as p } from "./scrollToElemets.js";
4
+ const h = (a, n) => {
5
+ const o = f().shape(a);
6
6
  try {
7
- return o.validateSync(s, { abortEarly: !1 }), { isValid: !0, errors: {} };
7
+ return o.validateSync(n, { abortEarly: !1 }), { isValid: !0, errors: {} };
8
8
  } catch (i) {
9
- return { isValid: !1, errors: i.inner.reduce((r, e) => (r[e.path] = e.message, r), {}) };
9
+ return { isValid: !1, errors: i.inner.reduce((e, s) => (e[s.path] = s.message, e), {}) };
10
10
  }
11
- }, j = ({
11
+ }, y = ({
12
12
  formState: a,
13
- formValidationSchema: s
13
+ formValidationSchema: n
14
14
  }) => {
15
- const o = n(!1), i = n(null), l = n(!0), r = v({}), e = (c) => {
16
- i.value = c;
17
- const { isValid: d, errors: u } = h(s, a);
18
- o.value = !0, l.value = d, Object.keys(r).forEach((t) => {
19
- t && !u[t] && delete r[t];
20
- }), Object.entries(u).forEach(([t, f]) => {
21
- r[t] = f;
22
- }), !d && c && E(r);
15
+ const o = d(!1), i = d(!0), r = m({}), e = (s) => {
16
+ const { isValid: c, errors: l } = h(n, a);
17
+ o.value = !0, i.value = c, Object.keys(r).forEach((t) => {
18
+ t && !l[t] && delete r[t];
19
+ }), Object.entries(l).forEach(([t, u]) => {
20
+ r[t] = u;
21
+ }), !c && !s && p(r);
23
22
  };
24
- return p(a, () => {
25
- o.value && e(i);
23
+ return v(a, () => {
24
+ o.value && e(!0);
26
25
  }), {
27
26
  validationErrors: r,
28
- isValid: l,
27
+ isValid: i,
29
28
  validate: e
30
29
  };
31
30
  };
32
31
  export {
33
- j as useFormValidation,
32
+ y as useFormValidation,
34
33
  h as yupValidation
35
34
  };