adp-web-components 0.0.47 → 0.0.49
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/cjs/contact-us-form.cjs.entry.js +4861 -95
- package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +2 -2
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +3 -2
- package/dist/cjs/dynamic-redeem.cjs.entry.js +1 -1
- package/dist/cjs/form-dialog_5.cjs.entry.js +344 -0
- package/dist/cjs/form-structure_2.cjs.entry.js +10 -9
- package/dist/cjs/{get-local-language-3ae85685.js → get-local-language-9c24d981.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/part-lookup.cjs.entry.js +1 -1
- package/dist/cjs/shift-components.cjs.js +1 -1
- package/dist/cjs/vehicle-lookup.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/form-elements/form-dialog.css +1 -0
- package/dist/collection/components/form-elements/form-dialog.js +137 -0
- package/dist/collection/components/form-elements/form-input.css +1 -1
- package/dist/collection/components/form-elements/form-input.js +96 -1
- package/dist/collection/components/form-elements/form-select.css +1 -1
- package/dist/collection/components/form-elements/form-select.js +30 -3
- package/dist/collection/components/form-elements/form-structure-error.css +1 -1
- package/dist/collection/components/form-elements/form-structure-error.js +1 -1
- package/dist/collection/components/form-elements/form-structure.css +1 -1
- package/dist/collection/components/form-elements/form-structure.js +23 -5
- package/dist/collection/components/form-elements/form-submit.css +1 -1
- package/dist/collection/components/form-elements/form-submit.js +2 -2
- package/dist/collection/components/form-elements/form-text-area.css +1 -1
- package/dist/collection/components/form-elements/form-text-area.js +52 -1
- package/dist/collection/components/forms/contact-us/form.css +1 -0
- package/dist/collection/components/forms/contact-us/mapper.js +12 -0
- package/dist/collection/components/forms/contact-us/params.js +72 -0
- package/dist/collection/components/forms/contact-us/validations.js +19 -0
- package/dist/collection/components/forms/contact-us-form.js +13 -76
- package/dist/collection/components/vehicle-lookup/vehicle-specification.js +2 -1
- package/dist/collection/global/lib/form-hook.js +18 -0
- package/dist/collection/global/lib/validate-form-structure.js +2 -2
- package/dist/collection/global/types/locales/general.js +1 -0
- package/dist/collection/templates/vehicle-lookup/mock-data.js +1 -5
- package/dist/components/contact-us-form.js +1 -1
- package/dist/components/dead-stock-lookup.js +1 -1
- package/dist/components/distributor-lookup.js +1 -1
- package/dist/components/dynamic-claim.js +1 -1
- package/dist/components/dynamic-redeem.js +1 -1
- package/dist/components/form-dialog.d.ts +11 -0
- package/dist/components/form-dialog.js +5 -0
- package/dist/components/form-input.js +1 -1
- package/dist/components/form-select.js +1 -1
- package/dist/components/form-structure-error.js +1 -1
- package/dist/components/form-structure.js +1 -1
- package/dist/components/form-submit.js +1 -1
- package/dist/components/form-text-area.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/p-15eb8e7b.js +5 -0
- package/dist/components/p-237a7c55.js +5 -0
- package/dist/components/p-2eadbfd5.js +5 -0
- package/dist/components/{p-8db6fbb6.js → p-49f54b37.js} +1 -1
- package/dist/components/{p-ce440126.js → p-5d3020cf.js} +1 -1
- package/dist/components/p-5f7ef1e2.js +5 -0
- package/dist/components/{p-d70c3cbd.js → p-7b4a568a.js} +1 -1
- package/dist/components/{p-b901ce51.js → p-a762e41e.js} +1 -1
- package/dist/components/{p-40bb71e4.js → p-a7c8367b.js} +1 -1
- package/dist/components/{p-e4ae4434.js → p-ad293da0.js} +1 -1
- package/dist/components/p-b155c713.js +5 -0
- package/dist/components/p-c015f62c.js +5 -0
- package/dist/components/{p-5d3abb5b.js → p-c9c50bd5.js} +1 -1
- package/dist/components/{p-7f889bd6.js → p-cd16aa91.js} +1 -1
- package/dist/components/{p-21feb9cb.js → p-dd2ca9f8.js} +1 -1
- package/dist/components/p-df782441.js +5 -0
- package/dist/components/p-e74a2c29.js +5 -0
- package/dist/components/{p-d8a1e55d.js → p-f7ea9714.js} +1 -1
- package/dist/components/{p-0f15eb0b.js → p-f9be83de.js} +1 -1
- package/dist/components/paint-thickness.js +1 -1
- package/dist/components/part-lookup.js +1 -1
- package/dist/components/service-history.js +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-lookup.js +1 -1
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/warranty-details.js +1 -1
- package/dist/esm/contact-us-form.entry.js +4861 -95
- package/dist/esm/dead-stock-lookup_3.entry.js +2 -2
- package/dist/esm/dynamic-claim_6.entry.js +3 -2
- package/dist/esm/dynamic-redeem.entry.js +1 -1
- package/dist/esm/form-dialog_5.entry.js +336 -0
- package/dist/esm/form-structure_2.entry.js +10 -9
- package/dist/esm/{get-local-language-cd53bfd4.js → get-local-language-80b87597.js} +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/part-lookup.entry.js +1 -1
- package/dist/esm/shift-components.js +1 -1
- package/dist/esm/vehicle-lookup.entry.js +1 -1
- package/dist/locales/ar.json +2 -1
- package/dist/locales/en.json +1 -0
- package/dist/locales/ku.json +2 -1
- package/dist/locales/ru.json +1 -0
- package/dist/shift-components/p-07c08204.entry.js +5 -0
- package/dist/shift-components/p-13d46f3d.entry.js +5 -0
- package/dist/shift-components/{p-b8390527.entry.js → p-27c1f365.entry.js} +1 -1
- package/dist/shift-components/p-4a717542.entry.js +5 -0
- package/dist/shift-components/{p-974f9490.entry.js → p-654aaa7d.entry.js} +1 -1
- package/dist/shift-components/{p-ba46e8f2.entry.js → p-940585ec.entry.js} +1 -1
- package/dist/shift-components/{p-f4b4e9d2.js → p-991b3547.js} +1 -1
- package/dist/shift-components/{p-359ea480.entry.js → p-bff6ab62.entry.js} +1 -1
- package/dist/shift-components/p-ea177504.entry.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/form-elements/form-dialog.d.ts +13 -0
- package/dist/types/components/form-elements/form-input.d.ts +11 -2
- package/dist/types/components/form-elements/form-select.d.ts +5 -3
- package/dist/types/components/form-elements/form-structure.d.ts +1 -0
- package/dist/types/components/form-elements/form-text-area.d.ts +8 -2
- package/dist/types/components/forms/contact-us/mapper.d.ts +2 -0
- package/dist/types/components/forms/contact-us/params.d.ts +2 -0
- package/dist/types/components/forms/contact-us/validations.d.ts +26 -0
- package/dist/types/components/forms/contact-us-form.d.ts +3 -19
- package/dist/types/components.d.ts +37 -2
- package/dist/types/global/lib/form-hook.d.ts +10 -1
- package/dist/types/global/lib/validate-form-structure.d.ts +2 -2
- package/dist/types/global/types/forms.d.ts +9 -1
- package/dist/types/global/types/locales/general.d.ts +2 -0
- package/dist/types/global/types/locales/index.d.ts +2 -0
- package/package.json +2 -1
- package/dist/cjs/form-input_4.cjs.entry.js +0 -252
- package/dist/collection/components/forms/contact-us-form.css +0 -1
- package/dist/components/p-14df0c85.js +0 -5
- package/dist/components/p-176b63e3.js +0 -5
- package/dist/components/p-4bae9c16.js +0 -5
- package/dist/components/p-5e1738a6.js +0 -5
- package/dist/components/p-64e16378.js +0 -5
- package/dist/components/p-9faefa40.js +0 -5
- package/dist/components/p-b224d16f.js +0 -5
- package/dist/esm/form-input_4.entry.js +0 -245
- package/dist/shift-components/p-14de3422.entry.js +0 -5
- package/dist/shift-components/p-36423afa.entry.js +0 -5
- package/dist/shift-components/p-6cc94857.entry.js +0 -5
- package/dist/shift-components/p-ecc53648.entry.js +0 -5
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AsYouType } from 'libphonenumber-js';
|
|
2
|
+
import { InferType } from 'yup';
|
|
3
|
+
export declare const phoneValidator: AsYouType & {
|
|
4
|
+
default: string;
|
|
5
|
+
metadata: {
|
|
6
|
+
numberingPlan: {
|
|
7
|
+
metadata: [string];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const contactUsSchema: import("yup").ObjectSchema<{
|
|
12
|
+
cityId: string;
|
|
13
|
+
email: string;
|
|
14
|
+
message: string;
|
|
15
|
+
generalTicketType: string;
|
|
16
|
+
name: string;
|
|
17
|
+
phone: string;
|
|
18
|
+
}, import("yup").AnyObject, {
|
|
19
|
+
cityId: undefined;
|
|
20
|
+
email: undefined;
|
|
21
|
+
message: undefined;
|
|
22
|
+
generalTicketType: undefined;
|
|
23
|
+
name: undefined;
|
|
24
|
+
phone: undefined;
|
|
25
|
+
}, "">;
|
|
26
|
+
export type ContactUs = InferType<typeof contactUsSchema>;
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
import { InferType } from 'yup';
|
|
2
|
-
import { LanguageKeys, Locale } from "../../global/types/locales/index";
|
|
3
1
|
import { FormHookInterface, StructureObject } from "../../global/types/forms";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
email: string;
|
|
7
|
-
message: string;
|
|
8
|
-
generalTicketType: string;
|
|
9
|
-
name: string;
|
|
10
|
-
phone: string;
|
|
11
|
-
}, import("yup").AnyObject, {
|
|
12
|
-
cityId: undefined;
|
|
13
|
-
email: undefined;
|
|
14
|
-
message: undefined;
|
|
15
|
-
generalTicketType: undefined;
|
|
16
|
-
name: undefined;
|
|
17
|
-
phone: undefined;
|
|
18
|
-
}, "">;
|
|
19
|
-
export type ContactUs = InferType<typeof contactUsSchema>;
|
|
2
|
+
import { LanguageKeys, Locale } from "../../global/types/locales/index";
|
|
3
|
+
import { ContactUs } from './contact-us/validations';
|
|
20
4
|
export declare class ContactUsForm implements FormHookInterface<ContactUs> {
|
|
21
5
|
theme: string;
|
|
22
6
|
baseUrl: string;
|
|
@@ -30,6 +14,7 @@ export declare class ContactUsForm implements FormHookInterface<ContactUs> {
|
|
|
30
14
|
recaptchaKey: string;
|
|
31
15
|
isLoading: boolean;
|
|
32
16
|
renderControl: {};
|
|
17
|
+
errorMessage: string;
|
|
33
18
|
structureObject: StructureObject;
|
|
34
19
|
locale: Locale;
|
|
35
20
|
recaptchaWidget: number | null;
|
|
@@ -43,4 +28,3 @@ export declare class ContactUsForm implements FormHookInterface<ContactUs> {
|
|
|
43
28
|
formSubmit(formValues: ContactUs): Promise<void>;
|
|
44
29
|
render(): any;
|
|
45
30
|
}
|
|
46
|
-
export {};
|
|
@@ -9,16 +9,16 @@ import { ErrorKeys, LanguageKeys } from "./global/types/locales/index";
|
|
|
9
9
|
import { PartInformation } from "./global/types/part-information";
|
|
10
10
|
import { DotNetObjectReference, MockJson } from "./global/types/components";
|
|
11
11
|
import { ServiceItem, VehicleInformation } from "./global/types/vehicle-information";
|
|
12
|
-
import { FormElementMapper, FormFieldParams, FormInputChanges, FormSelectFetcher, LocaleFormKeys, StructureObject } from "./global/types/forms";
|
|
13
12
|
import { FormHook } from "./global/lib/form-hook";
|
|
13
|
+
import { FormElementMapper, FormFieldParams, FormInputChanges, FormSelectFetcher, LocaleFormKeys, StructureObject } from "./global/types/forms";
|
|
14
14
|
import { ActiveElement } from "./components/part-lookup/part-lookup";
|
|
15
15
|
import { ActiveElement as ActiveElement1 } from "./components/vehicle-lookup/vehicle-lookup";
|
|
16
16
|
export { ErrorKeys, LanguageKeys } from "./global/types/locales/index";
|
|
17
17
|
export { PartInformation } from "./global/types/part-information";
|
|
18
18
|
export { DotNetObjectReference, MockJson } from "./global/types/components";
|
|
19
19
|
export { ServiceItem, VehicleInformation } from "./global/types/vehicle-information";
|
|
20
|
-
export { FormElementMapper, FormFieldParams, FormInputChanges, FormSelectFetcher, LocaleFormKeys, StructureObject } from "./global/types/forms";
|
|
21
20
|
export { FormHook } from "./global/lib/form-hook";
|
|
21
|
+
export { FormElementMapper, FormFieldParams, FormInputChanges, FormSelectFetcher, LocaleFormKeys, StructureObject } from "./global/types/forms";
|
|
22
22
|
export { ActiveElement } from "./components/part-lookup/part-lookup";
|
|
23
23
|
export { ActiveElement as ActiveElement1 } from "./components/vehicle-lookup/vehicle-lookup";
|
|
24
24
|
export namespace Components {
|
|
@@ -88,12 +88,19 @@ export namespace Components {
|
|
|
88
88
|
"unInvoicedByBrokerName"?: string;
|
|
89
89
|
"vin"?: string;
|
|
90
90
|
}
|
|
91
|
+
interface FormDialog {
|
|
92
|
+
"dialogClosed": () => void;
|
|
93
|
+
"errorMessage": string;
|
|
94
|
+
"language": LanguageKeys;
|
|
95
|
+
}
|
|
91
96
|
interface FormInput {
|
|
92
97
|
"class": string;
|
|
93
98
|
"componentClass": string;
|
|
94
99
|
"componentId": string;
|
|
100
|
+
"defaultValue"?: string;
|
|
95
101
|
"disabled": boolean;
|
|
96
102
|
"errorMessage": string;
|
|
103
|
+
"form": FormHook<any>;
|
|
97
104
|
"formLocaleName": LocaleFormKeys;
|
|
98
105
|
"inputChanges": FormInputChanges;
|
|
99
106
|
"inputPreFix": string;
|
|
@@ -102,6 +109,8 @@ export namespace Components {
|
|
|
102
109
|
"label": string;
|
|
103
110
|
"language": LanguageKeys;
|
|
104
111
|
"name": string;
|
|
112
|
+
"numberDirection"?: boolean;
|
|
113
|
+
"onChangeMiddleware"?: (event: InputEvent) => InputEvent;
|
|
105
114
|
"placeholder": string;
|
|
106
115
|
"type": string;
|
|
107
116
|
}
|
|
@@ -111,6 +120,7 @@ export namespace Components {
|
|
|
111
120
|
"disabled": boolean;
|
|
112
121
|
"errorMessage": string;
|
|
113
122
|
"fetcher": FormSelectFetcher;
|
|
123
|
+
"form": FormHook<any>;
|
|
114
124
|
"formLocaleName": string;
|
|
115
125
|
"inputChanges": FormInputChanges;
|
|
116
126
|
"isError": boolean;
|
|
@@ -121,6 +131,7 @@ export namespace Components {
|
|
|
121
131
|
"placeholder": string;
|
|
122
132
|
}
|
|
123
133
|
interface FormStructure {
|
|
134
|
+
"errorMessage": string;
|
|
124
135
|
"form": FormHook<any>;
|
|
125
136
|
"formElementMapper": FormElementMapper;
|
|
126
137
|
"formFieldParams": FormFieldParams;
|
|
@@ -140,8 +151,10 @@ export namespace Components {
|
|
|
140
151
|
interface FormTextArea {
|
|
141
152
|
"componentClass": string;
|
|
142
153
|
"componentId": string;
|
|
154
|
+
"defaultValue"?: string;
|
|
143
155
|
"disabled": boolean;
|
|
144
156
|
"errorMessage": string;
|
|
157
|
+
"form": FormHook<any>;
|
|
145
158
|
"formLocaleName": LocaleFormKeys;
|
|
146
159
|
"inputChanges": FormInputChanges;
|
|
147
160
|
"isError": boolean;
|
|
@@ -307,6 +320,12 @@ declare global {
|
|
|
307
320
|
prototype: HTMLDynamicRedeemElement;
|
|
308
321
|
new (): HTMLDynamicRedeemElement;
|
|
309
322
|
};
|
|
323
|
+
interface HTMLFormDialogElement extends Components.FormDialog, HTMLStencilElement {
|
|
324
|
+
}
|
|
325
|
+
var HTMLFormDialogElement: {
|
|
326
|
+
prototype: HTMLFormDialogElement;
|
|
327
|
+
new (): HTMLFormDialogElement;
|
|
328
|
+
};
|
|
310
329
|
interface HTMLFormInputElement extends Components.FormInput, HTMLStencilElement {
|
|
311
330
|
}
|
|
312
331
|
var HTMLFormInputElement: {
|
|
@@ -397,6 +416,7 @@ declare global {
|
|
|
397
416
|
"distributor-lookup": HTMLDistributorLookupElement;
|
|
398
417
|
"dynamic-claim": HTMLDynamicClaimElement;
|
|
399
418
|
"dynamic-redeem": HTMLDynamicRedeemElement;
|
|
419
|
+
"form-dialog": HTMLFormDialogElement;
|
|
400
420
|
"form-input": HTMLFormInputElement;
|
|
401
421
|
"form-select": HTMLFormSelectElement;
|
|
402
422
|
"form-structure": HTMLFormStructureElement;
|
|
@@ -465,12 +485,19 @@ declare namespace LocalJSX {
|
|
|
465
485
|
"unInvoicedByBrokerName"?: string;
|
|
466
486
|
"vin"?: string;
|
|
467
487
|
}
|
|
488
|
+
interface FormDialog {
|
|
489
|
+
"dialogClosed"?: () => void;
|
|
490
|
+
"errorMessage"?: string;
|
|
491
|
+
"language"?: LanguageKeys;
|
|
492
|
+
}
|
|
468
493
|
interface FormInput {
|
|
469
494
|
"class"?: string;
|
|
470
495
|
"componentClass"?: string;
|
|
471
496
|
"componentId"?: string;
|
|
497
|
+
"defaultValue"?: string;
|
|
472
498
|
"disabled"?: boolean;
|
|
473
499
|
"errorMessage"?: string;
|
|
500
|
+
"form"?: FormHook<any>;
|
|
474
501
|
"formLocaleName"?: LocaleFormKeys;
|
|
475
502
|
"inputChanges"?: FormInputChanges;
|
|
476
503
|
"inputPreFix"?: string;
|
|
@@ -479,6 +506,8 @@ declare namespace LocalJSX {
|
|
|
479
506
|
"label"?: string;
|
|
480
507
|
"language"?: LanguageKeys;
|
|
481
508
|
"name"?: string;
|
|
509
|
+
"numberDirection"?: boolean;
|
|
510
|
+
"onChangeMiddleware"?: (event: InputEvent) => InputEvent;
|
|
482
511
|
"placeholder"?: string;
|
|
483
512
|
"type"?: string;
|
|
484
513
|
}
|
|
@@ -488,6 +517,7 @@ declare namespace LocalJSX {
|
|
|
488
517
|
"disabled"?: boolean;
|
|
489
518
|
"errorMessage"?: string;
|
|
490
519
|
"fetcher"?: FormSelectFetcher;
|
|
520
|
+
"form"?: FormHook<any>;
|
|
491
521
|
"formLocaleName"?: string;
|
|
492
522
|
"inputChanges"?: FormInputChanges;
|
|
493
523
|
"isError"?: boolean;
|
|
@@ -498,6 +528,7 @@ declare namespace LocalJSX {
|
|
|
498
528
|
"placeholder"?: string;
|
|
499
529
|
}
|
|
500
530
|
interface FormStructure {
|
|
531
|
+
"errorMessage"?: string;
|
|
501
532
|
"form"?: FormHook<any>;
|
|
502
533
|
"formElementMapper"?: FormElementMapper;
|
|
503
534
|
"formFieldParams"?: FormFieldParams;
|
|
@@ -517,8 +548,10 @@ declare namespace LocalJSX {
|
|
|
517
548
|
interface FormTextArea {
|
|
518
549
|
"componentClass"?: string;
|
|
519
550
|
"componentId"?: string;
|
|
551
|
+
"defaultValue"?: string;
|
|
520
552
|
"disabled"?: boolean;
|
|
521
553
|
"errorMessage"?: string;
|
|
554
|
+
"form"?: FormHook<any>;
|
|
522
555
|
"formLocaleName"?: LocaleFormKeys;
|
|
523
556
|
"inputChanges"?: FormInputChanges;
|
|
524
557
|
"isError"?: boolean;
|
|
@@ -630,6 +663,7 @@ declare namespace LocalJSX {
|
|
|
630
663
|
"distributor-lookup": DistributorLookup;
|
|
631
664
|
"dynamic-claim": DynamicClaim;
|
|
632
665
|
"dynamic-redeem": DynamicRedeem;
|
|
666
|
+
"form-dialog": FormDialog;
|
|
633
667
|
"form-input": FormInput;
|
|
634
668
|
"form-select": FormSelect;
|
|
635
669
|
"form-structure": FormStructure;
|
|
@@ -655,6 +689,7 @@ declare module "@stencil/core" {
|
|
|
655
689
|
"distributor-lookup": LocalJSX.DistributorLookup & JSXBase.HTMLAttributes<HTMLDistributorLookupElement>;
|
|
656
690
|
"dynamic-claim": LocalJSX.DynamicClaim & JSXBase.HTMLAttributes<HTMLDynamicClaimElement>;
|
|
657
691
|
"dynamic-redeem": LocalJSX.DynamicRedeem & JSXBase.HTMLAttributes<HTMLDynamicRedeemElement>;
|
|
692
|
+
"form-dialog": LocalJSX.FormDialog & JSXBase.HTMLAttributes<HTMLFormDialogElement>;
|
|
658
693
|
"form-input": LocalJSX.FormInput & JSXBase.HTMLAttributes<HTMLFormInputElement>;
|
|
659
694
|
"form-select": LocalJSX.FormSelect & JSXBase.HTMLAttributes<HTMLFormSelectElement>;
|
|
660
695
|
"form-structure": LocalJSX.FormStructure & JSXBase.HTMLAttributes<HTMLFormStructureElement>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AnyObjectSchema } from 'yup';
|
|
2
|
-
import { Field, FieldType, FormHookInterface, FormStateOptions } from "../types/forms";
|
|
2
|
+
import { Field, FieldType, FormElement, FormHookInterface, FormStateOptions } from "../types/forms";
|
|
3
3
|
export declare class FormHook<T> {
|
|
4
4
|
private isSubmitted;
|
|
5
|
+
private subscribers;
|
|
5
6
|
private context;
|
|
6
7
|
private schemaObject;
|
|
8
|
+
private haltValidation;
|
|
7
9
|
private validationType;
|
|
8
10
|
private subscribedFields;
|
|
9
11
|
formErrors: {
|
|
@@ -11,6 +13,13 @@ export declare class FormHook<T> {
|
|
|
11
13
|
};
|
|
12
14
|
formController: any;
|
|
13
15
|
constructor(context: FormHookInterface<T>, schemaObject: AnyObjectSchema, formStateOptions?: FormStateOptions);
|
|
16
|
+
subscribe: (formName: string, formElement: FormElement) => number;
|
|
17
|
+
unsubscribe: (formName: string) => {
|
|
18
|
+
name: string;
|
|
19
|
+
context: FormElement;
|
|
20
|
+
}[];
|
|
21
|
+
reset(): void;
|
|
22
|
+
resetFormErrorMessage: () => string;
|
|
14
23
|
getFormErrors: () => {
|
|
15
24
|
[key: string]: string;
|
|
16
25
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StructureObject } from "../types/forms";
|
|
1
|
+
import { StructureArray, StructureObject } from "../types/forms";
|
|
2
2
|
export declare const formStructureStringExample = "[[\"div.kodo#j7\",\"name.name#name\"], \"div.d3#s2\"]";
|
|
3
|
-
export declare const isValidStructure: (
|
|
3
|
+
export declare const isValidStructure: (requestedStructure: string | StructureArray) => StructureObject;
|
|
@@ -5,6 +5,7 @@ export interface FormHookInterface<T> {
|
|
|
5
5
|
structure: string;
|
|
6
6
|
renderControl: {};
|
|
7
7
|
isLoading: boolean;
|
|
8
|
+
errorMessage: string;
|
|
8
9
|
language: LanguageKeys;
|
|
9
10
|
structureObject: StructureObject;
|
|
10
11
|
formSubmit: (formValues: T) => void;
|
|
@@ -40,9 +41,16 @@ type FormElementStructure = {
|
|
|
40
41
|
export type StructureArray = (string | StructureArray)[];
|
|
41
42
|
export type StructureObject = FormElementStructure | null;
|
|
42
43
|
export type LocaleFormKeys = 'contactUs';
|
|
43
|
-
type Params = {
|
|
44
|
+
export type Params = {
|
|
44
45
|
[key: string]: any;
|
|
45
46
|
formLocaleName: LocaleFormKeys;
|
|
46
47
|
};
|
|
47
48
|
export type FormFieldParams = Record<string, Params>;
|
|
49
|
+
export interface FormElement {
|
|
50
|
+
reset: (newValue?: string) => void;
|
|
51
|
+
}
|
|
52
|
+
export type Subscribers = {
|
|
53
|
+
name: string;
|
|
54
|
+
context: FormElement;
|
|
55
|
+
}[];
|
|
48
56
|
export {};
|
|
@@ -48,6 +48,7 @@ export declare const localeSchema: import("yup").ObjectSchema<{
|
|
|
48
48
|
requestFailedPleaseTryAgainLater?: string;
|
|
49
49
|
};
|
|
50
50
|
general: {
|
|
51
|
+
close?: string;
|
|
51
52
|
noSelectOptions?: string;
|
|
52
53
|
};
|
|
53
54
|
lang: string;
|
|
@@ -227,6 +228,7 @@ export declare const localeSchema: import("yup").ObjectSchema<{
|
|
|
227
228
|
requestFailedPleaseTryAgainLater: undefined;
|
|
228
229
|
};
|
|
229
230
|
general: {
|
|
231
|
+
close: undefined;
|
|
230
232
|
noSelectOptions: undefined;
|
|
231
233
|
};
|
|
232
234
|
lang: undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adp-web-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"description": "ADP Platform Web Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"license": "MIT",
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"clsx": "^2.1.1",
|
|
63
|
+
"libphonenumber-js": "^1.11.19",
|
|
63
64
|
"tailwind-merge": "^2.5.5",
|
|
64
65
|
"yup": "^1.5.0"
|
|
65
66
|
}
|