adp-web-components 0.0.44 → 0.0.47
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/Loading-c3489701.js +16 -0
- package/dist/cjs/contact-us-form.cjs.entry.js +352 -0
- package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +45 -20
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +15 -15
- package/dist/cjs/dynamic-redeem.cjs.entry.js +5 -6
- package/dist/cjs/form-input_4.cjs.entry.js +252 -0
- package/dist/cjs/form-structure_2.cjs.entry.js +97 -0
- package/dist/cjs/{index.esm-c628daeb.js → get-local-language-3ae85685.js} +242 -0
- package/dist/cjs/{index-846c93d2.js → index-603d8f32.js} +12 -19
- package/dist/cjs/{Loading-6f4f0127.js → loader-baf2418b.js} +0 -9
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/part-lookup.cjs.entry.js +3 -4
- package/dist/cjs/shift-components.cjs.js +2 -2
- package/dist/cjs/vehicle-lookup.cjs.entry.js +3 -4
- package/dist/collection/collection-manifest.json +7 -2
- package/dist/collection/components/form-elements/form-input.css +1 -0
- package/dist/collection/components/form-elements/form-input.js +342 -0
- package/dist/collection/components/form-elements/form-select.css +1 -0
- package/dist/collection/components/form-elements/form-select.js +397 -0
- package/dist/collection/components/form-elements/form-structure-error.css +1 -0
- package/dist/collection/components/form-elements/form-structure-error.js +72 -0
- package/dist/collection/components/form-elements/form-structure.css +1 -0
- package/dist/collection/components/form-elements/form-structure.js +227 -0
- package/dist/collection/components/form-elements/form-submit.css +1 -0
- package/dist/collection/components/form-elements/form-submit.js +93 -0
- package/dist/collection/components/form-elements/form-text-area.css +1 -0
- package/dist/collection/components/form-elements/form-text-area.js +288 -0
- package/dist/collection/components/forms/contact-us-form.css +1 -0
- package/dist/collection/components/forms/contact-us-form.js +376 -0
- package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +4 -4
- package/dist/collection/components/part-lookup/distributor-lookup.js +28 -8
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +11 -6
- package/dist/collection/components/part-lookup/part-lookup.js +1 -1
- package/dist/collection/components/vehicle-lookup/dynamic-claim.js +3 -3
- package/dist/collection/components/vehicle-lookup/dynamic-redeem.js +3 -3
- package/dist/collection/components/vehicle-lookup/paint-thickness.js +4 -4
- package/dist/collection/components/vehicle-lookup/service-history.js +2 -2
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +4 -4
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-specification.js +2 -2
- package/dist/collection/components/vehicle-lookup/warranty-details.js +2 -2
- package/dist/collection/global/api/urls.js +6 -0
- package/dist/collection/global/assets/white-loader.svg +11 -0
- package/dist/collection/global/lib/form-hook.js +25 -14
- package/dist/collection/global/lib/recaptcha.js +25 -0
- package/dist/collection/global/lib/validate-form-structure.js +47 -0
- package/dist/collection/global/types/forms.js +1 -0
- package/dist/collection/global/types/general.js +1 -0
- package/dist/collection/global/types/locales/error-schema.js +1 -0
- package/dist/collection/global/types/locales/forms/contact-us-schema.js +24 -0
- package/dist/collection/global/types/locales/forms/index.js +11 -0
- package/dist/collection/global/types/locales/general.js +8 -0
- package/dist/collection/global/types/locales/index.js +7 -0
- package/dist/collection/global/types/locales/inquiryTypes.js +15 -0
- package/dist/collection/templates/part-lookup/mock-data.js +180 -100
- package/dist/components/{general-inquiry-form.d.ts → contact-us-form.d.ts} +4 -4
- package/dist/components/contact-us-form.js +5 -0
- 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-input.js +1 -1
- package/dist/components/form-select.d.ts +11 -0
- package/dist/components/form-select.js +5 -0
- package/dist/components/form-structure-error.d.ts +11 -0
- package/dist/components/form-structure-error.js +5 -0
- package/dist/components/form-structure.d.ts +11 -0
- package/dist/components/form-structure.js +5 -0
- package/dist/components/form-submit.d.ts +11 -0
- package/dist/components/form-submit.js +5 -0
- package/dist/components/form-text-area.d.ts +11 -0
- package/dist/components/form-text-area.js +5 -0
- package/dist/components/index.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/p-0f15eb0b.js +5 -0
- package/dist/components/{p-c59cfec8.js → p-14df0c85.js} +1 -1
- package/dist/components/p-176b63e3.js +5 -0
- package/dist/components/{p-7662fe0a.js → p-21feb9cb.js} +1 -1
- package/dist/components/p-40bb71e4.js +5 -0
- package/dist/components/p-4bae9c16.js +5 -0
- package/dist/components/p-5d3abb5b.js +5 -0
- package/dist/components/p-5e1738a6.js +5 -0
- package/dist/components/p-64e16378.js +5 -0
- package/dist/components/p-75476014.js +5 -0
- package/dist/components/{p-c37ba710.js → p-7f889bd6.js} +1 -1
- package/dist/components/{p-f5015d31.js → p-8db6fbb6.js} +1 -1
- package/dist/components/p-9faefa40.js +5 -0
- package/dist/components/p-b224d16f.js +5 -0
- package/dist/components/p-b901ce51.js +5 -0
- package/dist/components/p-ce440126.js +5 -0
- package/dist/components/p-d70c3cbd.js +5 -0
- package/dist/components/{p-d98710fe.js → p-d8a1e55d.js} +1 -1
- package/dist/components/{p-2e567b64.js → p-e4ae4434.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/Loading-3fdd028d.js +14 -0
- package/dist/esm/contact-us-form.entry.js +348 -0
- package/dist/esm/dead-stock-lookup_3.entry.js +45 -20
- package/dist/esm/dynamic-claim_6.entry.js +15 -15
- package/dist/esm/dynamic-redeem.entry.js +5 -6
- package/dist/esm/form-input_4.entry.js +245 -0
- package/dist/esm/form-structure_2.entry.js +92 -0
- package/dist/esm/{index.esm-46e0cdad.js → get-local-language-cd53bfd4.js} +241 -1
- package/dist/esm/{index-33ae6859.js → index-cac905b0.js} +12 -19
- package/dist/esm/{Loading-f4d666ee.js → loader-027b88af.js} +1 -9
- package/dist/esm/loader.js +3 -3
- package/dist/esm/part-lookup.entry.js +3 -4
- package/dist/esm/shift-components.js +3 -3
- package/dist/esm/vehicle-lookup.entry.js +3 -4
- package/dist/locales/ar.json +40 -1
- package/dist/locales/en.json +39 -0
- package/dist/locales/ku.json +40 -1
- package/dist/locales/ru.json +41 -2
- package/dist/shift-components/p-14de3422.entry.js +5 -0
- package/dist/shift-components/p-359ea480.entry.js +5 -0
- package/dist/shift-components/p-36423afa.entry.js +5 -0
- package/dist/shift-components/p-65102e7a.js +6 -0
- package/dist/shift-components/p-6cc94857.entry.js +5 -0
- package/dist/shift-components/p-974f9490.entry.js +5 -0
- package/dist/shift-components/p-a21e2e2e.js +5 -0
- package/dist/shift-components/p-b8390527.entry.js +5 -0
- package/dist/shift-components/p-ba46e8f2.entry.js +5 -0
- package/dist/shift-components/p-ecc53648.entry.js +5 -0
- package/dist/shift-components/p-f4b4e9d2.js +5 -0
- package/dist/shift-components/p-fa19695e.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/form-elements/form-input.d.ts +24 -0
- package/dist/types/components/form-elements/form-select.d.ts +38 -0
- package/dist/types/components/form-elements/form-structure-error.d.ts +8 -0
- package/dist/types/components/form-elements/form-structure.d.ts +18 -0
- package/dist/types/components/form-elements/form-submit.d.ts +7 -0
- package/dist/types/components/form-elements/form-text-area.d.ts +21 -0
- package/dist/types/components/forms/contact-us-form.d.ts +46 -0
- package/dist/types/components.d.ts +188 -31
- package/dist/types/global/api/urls.d.ts +2 -0
- package/dist/types/global/lib/form-hook.d.ts +1 -30
- package/dist/types/global/lib/recaptcha.d.ts +16 -0
- package/dist/types/global/lib/validate-form-structure.d.ts +3 -0
- package/dist/types/global/types/forms.d.ts +48 -0
- package/dist/types/global/types/general.d.ts +14 -0
- package/dist/types/global/types/locales/error-schema.d.ts +2 -0
- package/dist/types/global/types/locales/forms/contact-us-schema.d.ts +37 -0
- package/dist/types/global/types/locales/forms/index.d.ts +45 -0
- package/dist/types/global/types/locales/general.d.ts +5 -0
- package/dist/types/global/types/locales/index.d.ts +76 -0
- package/dist/types/global/types/locales/inquiryTypes.d.ts +19 -0
- package/dist/types/global/types/part-information.d.ts +10 -3
- package/package.json +1 -1
- package/dist/cjs/form-input.cjs.entry.js +0 -36
- package/dist/cjs/general-inquiry-form.cjs.entry.js +0 -154
- package/dist/cjs/get-local-language-30419427.js +0 -203
- package/dist/collection/components/form-input/form-input.css +0 -1
- package/dist/collection/components/form-input/form-input.js +0 -209
- package/dist/collection/components/general-inquiry-form/general-inquiry-form.css +0 -1
- package/dist/collection/components/general-inquiry-form/general-inquiry-form.js +0 -46
- package/dist/components/general-inquiry-form.js +0 -5
- package/dist/components/p-42a5d3c9.js +0 -5
- package/dist/components/p-4c7017f8.js +0 -5
- package/dist/components/p-4cdcb520.js +0 -5
- package/dist/components/p-8c079b39.js +0 -5
- package/dist/components/p-8dc757e9.js +0 -5
- package/dist/components/p-b2051f01.js +0 -5
- package/dist/components/p-b7a8a0ff.js +0 -5
- package/dist/components/p-c1acb397.js +0 -5
- package/dist/components/p-e446fb9d.js +0 -5
- package/dist/esm/form-input.entry.js +0 -32
- package/dist/esm/general-inquiry-form.entry.js +0 -150
- package/dist/esm/get-local-language-9742a5f6.js +0 -200
- package/dist/shift-components/p-02589422.entry.js +0 -5
- package/dist/shift-components/p-0f0e54c1.js +0 -6
- package/dist/shift-components/p-33434784.entry.js +0 -5
- package/dist/shift-components/p-99d314b5.js +0 -5
- package/dist/shift-components/p-a6ecaa3f.js +0 -5
- package/dist/shift-components/p-a88d388f.entry.js +0 -5
- package/dist/shift-components/p-ad59c0ac.entry.js +0 -5
- package/dist/shift-components/p-b1663a0f.entry.js +0 -5
- package/dist/shift-components/p-c87d536f.entry.js +0 -5
- package/dist/shift-components/p-e446fb9d.js +0 -5
- package/dist/shift-components/p-edf9ed4b.entry.js +0 -5
- package/dist/types/components/form-input/form-input.d.ts +0 -14
- package/dist/types/components/general-inquiry-form/general-inquiry-form.d.ts +0 -21
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as e,b as a}from"./p-
|
|
5
|
+
import{p as e,b as a}from"./p-65102e7a.js";export{s as setNonce}from"./p-65102e7a.js";import{g as r}from"./p-446d908d.js";(()=>{const a=import.meta.url,r={};return""!==a&&(r.resourcesUrl=new URL(".",a).href),e(r)})().then((async e=>(await r(),a([["p-b8390527",[[4,"vehicle-lookup",{activeElement:[1,"active-element"],baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],language:[1],blazorErrorStateListener:[1,"blazor-error-state-listener"],childrenProps:[1,"children-props"],blazorOnLoadingStateChange:[1,"blazor-on-loading-state-change"],errorStateListener:[16],loadingStateChanged:[16],wrapperErrorState:[32],blazorRef:[32],locale:[32],setBlazorRef:[64],fetchVin:[64]},null,{language:["changeLanguage"],wrapperErrorState:["errorListener"]}]]],["p-6cc94857",[[4,"form-structure",{renderControl:[16],isLoading:[4,"is-loading"],form:[16],language:[1],formFieldParams:[16],formElementMapper:[16],structureObject:[16],fieldControllers:[32],locale:[32]},null,{language:["changeLanguage"]}],[0,"form-structure-error",{language:[1],locale:[32]},null,{language:["changeLanguage"]}]]],["p-ecc53648",[[4,"contact-us-form",{theme:[1],baseUrl:[1,"base-url"],brandId:[1,"brand-id"],queryString:[1,"query-string"],language:[1],errorCallback:[16],successCallback:[16],structure:[1],loadingChanges:[16],recaptchaKey:[1,"recaptcha-key"],isLoading:[32],renderControl:[32],structureObject:[32],locale:[32]},null,{language:["changeLanguage"],structure:["onStructureChange"]}]]],["p-359ea480",[[1,"dynamic-redeem",{vin:[1],item:[16],language:[1],canceledItems:[16],unInvoicedByBrokerName:[1,"un-invoiced-by-broker-name"],handleScanner:[16],handleQrChanges:[16],loadingStateChange:[16],locale:[32],isLoading:[32],internalVin:[32],isOpened:[32],internalItem:[32],confirmServiceCancellation:[32],internalCanceledItem:[32],confirmUnInvoicedTBPVehicles:[32],quite:[64],getQrValue:[64]},null,{language:["changeLanguage"],isLoading:["onIsLoadingChange"],canceledItems:["changeInternalCanceledItem"],unInvoicedByBrokerName:["changeConfirmUnInvoicedTBPVehicles"],vin:["changeInternalVin"],item:["changeInternalItem"]}]]],["p-36423afa",[[1,"dead-stock-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],language:[1],errorCallback:[16],loadingStateChange:[16],loadedResponse:[16],state:[32],errorMessage:[32],partInformation:[32],externalPartNumber:[32],locale:[32],setData:[64],setErrorMessage:[64],fetchData:[64],setMockData:[64]},null,{language:["changeLanguage"],state:["loadingListener"]}],[1,"distributor-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],hiddenFields:[1,"hidden-fields"],language:[1],localizationName:[1,"localization-name"],errorCallback:[16],loadingStateChange:[16],loadedResponse:[16],state:[32],errorMessage:[32],partInformation:[32],externalPartNumber:[32],locale:[32],setData:[64],setErrorMessage:[64],fetchData:[64],setMockData:[64]},null,{language:["changeLanguage"],state:["loadingListener"]}],[1,"manufacturer-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],hiddenFields:[1,"hidden-fields"],language:[1],localizationName:[1,"localization-name"],headerTitle:[1,"header-title"],errorCallback:[16],loadingStateChange:[16],loadedResponse:[16],state:[32],errorMessage:[32],partInformation:[32],externalPartNumber:[32],locale:[32],setData:[64],setErrorMessage:[64],fetchData:[64],setMockData:[64]},null,{language:["changeLanguage"],state:["loadingListener"]}]]],["p-ba46e8f2",[[4,"part-lookup",{baseUrl:[1,"base-url"],queryString:[1,"query-string"],language:[1],blazorErrorStateListener:[1,"blazor-error-state-listener"],childrenProps:[1,"children-props"],blazorOnLoadingStateChange:[1,"blazor-on-loading-state-change"],activeElement:[1,"active-element"],errorStateListener:[16],loadingStateChanged:[16],wrapperErrorState:[32],blazorRef:[32],locale:[32],setBlazorRef:[64],fetchPartNumber:[64]},null,{language:["changeLanguage"],wrapperErrorState:["errorListener"]}]]],["p-974f9490",[[1,"dynamic-claim",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],language:[1],errorCallback:[16],loadingStateChange:[16],loadedResponse:[16],locale:[32],isIdle:[32],popupClasses:[32],isLoading:[32],externalVin:[32],errorMessage:[32],activePopupIndex:[32],vehicleInformation:[32],setMockData:[64],setData:[64],setErrorMessage:[64],fetchData:[64],completeClaim:[64]},null,{language:["changeLanguage"],isLoading:["onLoadingChange"],vehicleInformation:["resetProgressBar"],popupClasses:["windowScrollListener"]}],[1,"paint-thickness",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],language:[1],errorCallback:[16],loadingStateChange:[16],loadedResponse:[16],locale:[32],state:[32],externalVin:[32],expandedImage:[32],errorMessage:[32],vehicleInformation:[32],setData:[64],setErrorMessage:[64],fetchData:[64],setMockData:[64]},null,{language:["changeLanguage"],state:["loadingListener"]}],[1,"service-history",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],language:[1],errorCallback:[16],loadingStateChange:[16],loadedResponse:[16],locale:[32],state:[32],externalVin:[32],errorMessage:[32],vehicleInformation:[32],setData:[64],setErrorMessage:[64],fetchData:[64],setMockData:[64]},null,{language:["changeLanguage"],state:["loadingListener"]}],[1,"vehicle-accessories",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],language:[1],errorCallback:[16],loadingStateChange:[16],loadedResponse:[16],locale:[32],state:[32],externalVin:[32],expandedImage:[32],errorMessage:[32],vehicleInformation:[32],setData:[64],setErrorMessage:[64],fetchData:[64],setMockData:[64]},null,{language:["changeLanguage"],state:["loadingListener"]}],[1,"vehicle-specification",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],language:[1],errorCallback:[16],loadingStateChange:[16],loadedResponse:[16],locale:[32],state:[32],externalVin:[32],errorMessage:[32],vehicleInformation:[32],setData:[64],setErrorMessage:[64],fetchData:[64],setMockData:[64]},null,{language:["changeLanguage"],state:["loadingListener"]}],[1,"warranty-details",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],showSsc:[4,"show-ssc"],queryString:[1,"query-string"],recaptchaKey:[1,"recaptcha-key"],language:[1],showWarranty:[4,"show-warranty"],unauthorizedSscLookupBaseUrl:[1,"unauthorized-ssc-lookup-base-url"],unauthorizedSscLookupQueryString:[1,"unauthorized-ssc-lookup-query-string"],cityId:[1,"city-id"],cityIntegrationId:[1,"city-integration-id"],companyId:[1,"company-id"],companyIntegrationId:[1,"company-integration-id"],companyBranchId:[1,"company-branch-id"],companyBranchIntegrationId:[1,"company-branch-integration-id"],userId:[1,"user-id"],brandIntegrationId:[1,"brand-integration-id"],customerName:[1,"customer-name"],customerPhone:[1,"customer-phone"],customerEmail:[1,"customer-email"],errorCallback:[16],loadingStateChange:[16],loadedResponse:[16],state:[32],externalVin:[32],showRecaptcha:[32],errorMessage:[32],unInvoicedByBrokerName:[32],vehicleInformation:[32],checkingUnauthorizedSSC:[32],recaptchaRes:[32],headers:[32],locale:[32],setData:[64],setErrorMessage:[64],fetchData:[64],setMockData:[64]},null,{language:["changeLanguage"],state:["loadingListener"]}]]],["p-14de3422",[[0,"form-input",{name:[1],type:[1],label:[1],class:[1],isError:[4,"is-error"],disabled:[4],componentId:[1,"component-id"],inputPreFix:[1,"input-pre-fix"],isRequired:[4,"is-required"],placeholder:[1],errorMessage:[1,"error-message"],componentClass:[1,"component-class"],language:[1],formLocaleName:[1,"form-locale-name"],inputChanges:[16],locale:[32]},null,{language:["changeLanguage"]}],[0,"form-select",{name:[1],label:[1],isError:[4,"is-error"],disabled:[4],componentId:[1,"component-id"],isRequired:[4,"is-required"],errorMessage:[1,"error-message"],componentClass:[1,"component-class"],formLocaleName:[1,"form-locale-name"],fetcher:[16],language:[1],inputChanges:[16],placeholder:[1],isLoading:[32],isOpen:[32],selectedValue:[32],openUpwards:[32],options:[32],fetchingErrorMessage:[32],locale:[32]},null,{language:["changeLanguage"]}],[0,"form-submit",{isLoading:[4,"is-loading"],params:[16],structureElement:[16]}],[0,"form-text-area",{name:[1],label:[1],isError:[4,"is-error"],disabled:[4],isRequired:[4,"is-required"],componentId:[1,"component-id"],placeholder:[1],errorMessage:[1,"error-message"],componentClass:[1,"component-class"],language:[1],formLocaleName:[1,"form-locale-name"],inputChanges:[16],locale:[32]},null,{language:["changeLanguage"]}]]]],e))));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FormInputChanges, LocaleFormKeys } from "../../global/types/forms";
|
|
2
|
+
import { LanguageKeys, Locale } from "../../global/types/locales/index";
|
|
3
|
+
export declare class FormInput {
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
label: string;
|
|
7
|
+
class: string;
|
|
8
|
+
isError: boolean;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
componentId: string;
|
|
11
|
+
inputPreFix: string;
|
|
12
|
+
isRequired: boolean;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
errorMessage: string;
|
|
15
|
+
componentClass: string;
|
|
16
|
+
language: LanguageKeys;
|
|
17
|
+
formLocaleName: LocaleFormKeys;
|
|
18
|
+
inputChanges: FormInputChanges;
|
|
19
|
+
locale: Locale;
|
|
20
|
+
el: HTMLElement;
|
|
21
|
+
componentWillLoad(): Promise<void>;
|
|
22
|
+
changeLanguage(newLanguage: LanguageKeys): Promise<void>;
|
|
23
|
+
render(): any;
|
|
24
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ErrorKeys, LanguageKeys, Locale } from "../../global/types/locales/index";
|
|
2
|
+
import { FormInputChanges, FormSelectFetcher, FormSelectItem } from "../../global/types/forms";
|
|
3
|
+
export declare class FormSelect {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
isError: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
componentId: string;
|
|
9
|
+
isRequired: boolean;
|
|
10
|
+
errorMessage: string;
|
|
11
|
+
componentClass: string;
|
|
12
|
+
formLocaleName: string;
|
|
13
|
+
fetcher: FormSelectFetcher;
|
|
14
|
+
language: LanguageKeys;
|
|
15
|
+
inputChanges: FormInputChanges;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
isOpen: boolean;
|
|
19
|
+
selectedValue: string;
|
|
20
|
+
openUpwards: boolean;
|
|
21
|
+
options: FormSelectItem[];
|
|
22
|
+
fetchingErrorMessage?: ErrorKeys;
|
|
23
|
+
locale: Locale;
|
|
24
|
+
el: HTMLElement;
|
|
25
|
+
private abortController;
|
|
26
|
+
changeLanguage(newLanguage: LanguageKeys): Promise<void>;
|
|
27
|
+
dropdownRef: HTMLElement;
|
|
28
|
+
componentWillLoad(): Promise<void>;
|
|
29
|
+
toggleDropdown: () => void;
|
|
30
|
+
adjustDropdownPosition(): void;
|
|
31
|
+
handleSelection(option: FormSelectItem): void;
|
|
32
|
+
handleKeyDown(event: KeyboardEvent): void;
|
|
33
|
+
closeDropdown: (event: MouseEvent) => void;
|
|
34
|
+
fetch(): Promise<void>;
|
|
35
|
+
componentDidLoad(): Promise<void>;
|
|
36
|
+
disconnectedCallback(): Promise<void>;
|
|
37
|
+
render(): any;
|
|
38
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LanguageKeys, Locale } from "../../global/types/locales/index";
|
|
2
|
+
export declare class FormStructureError {
|
|
3
|
+
language: LanguageKeys;
|
|
4
|
+
locale: Locale;
|
|
5
|
+
componentWillLoad(): Promise<void>;
|
|
6
|
+
changeLanguage(newLanguage: LanguageKeys): Promise<void>;
|
|
7
|
+
render(): any;
|
|
8
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormHook } from "../../global/lib/form-hook";
|
|
2
|
+
import { LanguageKeys, Locale } from "../../global/types/locales/index";
|
|
3
|
+
import { FieldControllers, FormElementMapper, FormFieldParams, StructureObject } from "../../global/types/forms";
|
|
4
|
+
export declare class FormStructure {
|
|
5
|
+
renderControl: {};
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
form: FormHook<any>;
|
|
8
|
+
language: LanguageKeys;
|
|
9
|
+
formFieldParams: FormFieldParams;
|
|
10
|
+
formElementMapper: FormElementMapper;
|
|
11
|
+
structureObject: StructureObject;
|
|
12
|
+
fieldControllers: FieldControllers;
|
|
13
|
+
locale: Locale;
|
|
14
|
+
componentWillLoad(): Promise<void>;
|
|
15
|
+
changeLanguage(newLanguage: LanguageKeys): Promise<void>;
|
|
16
|
+
private renderLoop;
|
|
17
|
+
render(): any;
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LanguageKeys, Locale } from "../../global/types/locales/index";
|
|
2
|
+
import { FormInputChanges, LocaleFormKeys } from "../../global/types/forms";
|
|
3
|
+
export declare class FormTextArea {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
isError: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
isRequired: boolean;
|
|
9
|
+
componentId: string;
|
|
10
|
+
placeholder: string;
|
|
11
|
+
errorMessage: string;
|
|
12
|
+
componentClass: string;
|
|
13
|
+
language: LanguageKeys;
|
|
14
|
+
formLocaleName: LocaleFormKeys;
|
|
15
|
+
inputChanges: FormInputChanges;
|
|
16
|
+
locale: Locale;
|
|
17
|
+
el: HTMLElement;
|
|
18
|
+
componentWillLoad(): Promise<void>;
|
|
19
|
+
changeLanguage(newLanguage: LanguageKeys): Promise<void>;
|
|
20
|
+
render(): any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { InferType } from 'yup';
|
|
2
|
+
import { LanguageKeys, Locale } from "../../global/types/locales/index";
|
|
3
|
+
import { FormHookInterface, StructureObject } from "../../global/types/forms";
|
|
4
|
+
declare const contactUsSchema: import("yup").ObjectSchema<{
|
|
5
|
+
cityId: string;
|
|
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>;
|
|
20
|
+
export declare class ContactUsForm implements FormHookInterface<ContactUs> {
|
|
21
|
+
theme: string;
|
|
22
|
+
baseUrl: string;
|
|
23
|
+
brandId: string;
|
|
24
|
+
queryString: string;
|
|
25
|
+
language: LanguageKeys;
|
|
26
|
+
errorCallback: (error: any) => void;
|
|
27
|
+
successCallback: (values: any) => void;
|
|
28
|
+
structure: string;
|
|
29
|
+
loadingChanges: (loading: boolean) => void;
|
|
30
|
+
recaptchaKey: string;
|
|
31
|
+
isLoading: boolean;
|
|
32
|
+
renderControl: {};
|
|
33
|
+
structureObject: StructureObject;
|
|
34
|
+
locale: Locale;
|
|
35
|
+
recaptchaWidget: number | null;
|
|
36
|
+
private form;
|
|
37
|
+
el: HTMLElement;
|
|
38
|
+
componentWillLoad(): Promise<void>;
|
|
39
|
+
changeLanguage(newLanguage: LanguageKeys): Promise<void>;
|
|
40
|
+
onStructureChange(newStructure: string): Promise<void>;
|
|
41
|
+
structureValidation(structureString: string): Promise<void>;
|
|
42
|
+
componentDidLoad(): Promise<void>;
|
|
43
|
+
formSubmit(formValues: ContactUs): Promise<void>;
|
|
44
|
+
render(): any;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -9,15 +9,31 @@ 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
|
+
import { FormHook } from "./global/lib/form-hook";
|
|
12
14
|
import { ActiveElement } from "./components/part-lookup/part-lookup";
|
|
13
15
|
import { ActiveElement as ActiveElement1 } from "./components/vehicle-lookup/vehicle-lookup";
|
|
14
16
|
export { ErrorKeys, LanguageKeys } from "./global/types/locales/index";
|
|
15
17
|
export { PartInformation } from "./global/types/part-information";
|
|
16
18
|
export { DotNetObjectReference, MockJson } from "./global/types/components";
|
|
17
19
|
export { ServiceItem, VehicleInformation } from "./global/types/vehicle-information";
|
|
20
|
+
export { FormElementMapper, FormFieldParams, FormInputChanges, FormSelectFetcher, LocaleFormKeys, StructureObject } from "./global/types/forms";
|
|
21
|
+
export { FormHook } from "./global/lib/form-hook";
|
|
18
22
|
export { ActiveElement } from "./components/part-lookup/part-lookup";
|
|
19
23
|
export { ActiveElement as ActiveElement1 } from "./components/vehicle-lookup/vehicle-lookup";
|
|
20
24
|
export namespace Components {
|
|
25
|
+
interface ContactUsForm {
|
|
26
|
+
"baseUrl": string;
|
|
27
|
+
"brandId": string;
|
|
28
|
+
"errorCallback": (error: any) => void;
|
|
29
|
+
"language": LanguageKeys;
|
|
30
|
+
"loadingChanges": (loading: boolean) => void;
|
|
31
|
+
"queryString": string;
|
|
32
|
+
"recaptchaKey": string;
|
|
33
|
+
"structure": string;
|
|
34
|
+
"successCallback": (values: any) => void;
|
|
35
|
+
"theme": string;
|
|
36
|
+
}
|
|
21
37
|
interface DeadStockLookup {
|
|
22
38
|
"baseUrl": string;
|
|
23
39
|
"errorCallback": (errorMessage: ErrorKeys) => void;
|
|
@@ -74,16 +90,66 @@ export namespace Components {
|
|
|
74
90
|
}
|
|
75
91
|
interface FormInput {
|
|
76
92
|
"class": string;
|
|
77
|
-
"
|
|
93
|
+
"componentClass": string;
|
|
94
|
+
"componentId": string;
|
|
78
95
|
"disabled": boolean;
|
|
79
|
-
"errorClass": string;
|
|
80
96
|
"errorMessage": string;
|
|
97
|
+
"formLocaleName": LocaleFormKeys;
|
|
98
|
+
"inputChanges": FormInputChanges;
|
|
99
|
+
"inputPreFix": string;
|
|
81
100
|
"isError": boolean;
|
|
101
|
+
"isRequired": boolean;
|
|
82
102
|
"label": string;
|
|
83
|
-
"
|
|
103
|
+
"language": LanguageKeys;
|
|
84
104
|
"name": string;
|
|
105
|
+
"placeholder": string;
|
|
106
|
+
"type": string;
|
|
107
|
+
}
|
|
108
|
+
interface FormSelect {
|
|
109
|
+
"componentClass": string;
|
|
110
|
+
"componentId": string;
|
|
111
|
+
"disabled": boolean;
|
|
112
|
+
"errorMessage": string;
|
|
113
|
+
"fetcher": FormSelectFetcher;
|
|
114
|
+
"formLocaleName": string;
|
|
115
|
+
"inputChanges": FormInputChanges;
|
|
116
|
+
"isError": boolean;
|
|
117
|
+
"isRequired": boolean;
|
|
118
|
+
"label": string;
|
|
119
|
+
"language": LanguageKeys;
|
|
120
|
+
"name": string;
|
|
121
|
+
"placeholder": string;
|
|
122
|
+
}
|
|
123
|
+
interface FormStructure {
|
|
124
|
+
"form": FormHook<any>;
|
|
125
|
+
"formElementMapper": FormElementMapper;
|
|
126
|
+
"formFieldParams": FormFieldParams;
|
|
127
|
+
"isLoading": boolean;
|
|
128
|
+
"language": LanguageKeys;
|
|
129
|
+
"renderControl": {};
|
|
130
|
+
"structureObject": StructureObject;
|
|
85
131
|
}
|
|
86
|
-
interface
|
|
132
|
+
interface FormStructureError {
|
|
133
|
+
"language": LanguageKeys;
|
|
134
|
+
}
|
|
135
|
+
interface FormSubmit {
|
|
136
|
+
"isLoading": boolean;
|
|
137
|
+
"params": FormFieldParams;
|
|
138
|
+
"structureElement": StructureObject;
|
|
139
|
+
}
|
|
140
|
+
interface FormTextArea {
|
|
141
|
+
"componentClass": string;
|
|
142
|
+
"componentId": string;
|
|
143
|
+
"disabled": boolean;
|
|
144
|
+
"errorMessage": string;
|
|
145
|
+
"formLocaleName": LocaleFormKeys;
|
|
146
|
+
"inputChanges": FormInputChanges;
|
|
147
|
+
"isError": boolean;
|
|
148
|
+
"isRequired": boolean;
|
|
149
|
+
"label": string;
|
|
150
|
+
"language": LanguageKeys;
|
|
151
|
+
"name": string;
|
|
152
|
+
"placeholder": string;
|
|
87
153
|
}
|
|
88
154
|
interface ManufacturerLookup {
|
|
89
155
|
"baseUrl": string;
|
|
@@ -210,11 +276,13 @@ export namespace Components {
|
|
|
210
276
|
"userId"?: string;
|
|
211
277
|
}
|
|
212
278
|
}
|
|
213
|
-
export interface FormInputCustomEvent<T> extends CustomEvent<T> {
|
|
214
|
-
detail: T;
|
|
215
|
-
target: HTMLFormInputElement;
|
|
216
|
-
}
|
|
217
279
|
declare global {
|
|
280
|
+
interface HTMLContactUsFormElement extends Components.ContactUsForm, HTMLStencilElement {
|
|
281
|
+
}
|
|
282
|
+
var HTMLContactUsFormElement: {
|
|
283
|
+
prototype: HTMLContactUsFormElement;
|
|
284
|
+
new (): HTMLContactUsFormElement;
|
|
285
|
+
};
|
|
218
286
|
interface HTMLDeadStockLookupElement extends Components.DeadStockLookup, HTMLStencilElement {
|
|
219
287
|
}
|
|
220
288
|
var HTMLDeadStockLookupElement: {
|
|
@@ -239,28 +307,41 @@ declare global {
|
|
|
239
307
|
prototype: HTMLDynamicRedeemElement;
|
|
240
308
|
new (): HTMLDynamicRedeemElement;
|
|
241
309
|
};
|
|
242
|
-
interface HTMLFormInputElementEventMap {
|
|
243
|
-
"onInput": any;
|
|
244
|
-
}
|
|
245
310
|
interface HTMLFormInputElement extends Components.FormInput, HTMLStencilElement {
|
|
246
|
-
addEventListener<K extends keyof HTMLFormInputElementEventMap>(type: K, listener: (this: HTMLFormInputElement, ev: FormInputCustomEvent<HTMLFormInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
247
|
-
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
248
|
-
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
249
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
250
|
-
removeEventListener<K extends keyof HTMLFormInputElementEventMap>(type: K, listener: (this: HTMLFormInputElement, ev: FormInputCustomEvent<HTMLFormInputElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
251
|
-
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
252
|
-
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
253
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
254
311
|
}
|
|
255
312
|
var HTMLFormInputElement: {
|
|
256
313
|
prototype: HTMLFormInputElement;
|
|
257
314
|
new (): HTMLFormInputElement;
|
|
258
315
|
};
|
|
259
|
-
interface
|
|
316
|
+
interface HTMLFormSelectElement extends Components.FormSelect, HTMLStencilElement {
|
|
317
|
+
}
|
|
318
|
+
var HTMLFormSelectElement: {
|
|
319
|
+
prototype: HTMLFormSelectElement;
|
|
320
|
+
new (): HTMLFormSelectElement;
|
|
321
|
+
};
|
|
322
|
+
interface HTMLFormStructureElement extends Components.FormStructure, HTMLStencilElement {
|
|
260
323
|
}
|
|
261
|
-
var
|
|
262
|
-
prototype:
|
|
263
|
-
new ():
|
|
324
|
+
var HTMLFormStructureElement: {
|
|
325
|
+
prototype: HTMLFormStructureElement;
|
|
326
|
+
new (): HTMLFormStructureElement;
|
|
327
|
+
};
|
|
328
|
+
interface HTMLFormStructureErrorElement extends Components.FormStructureError, HTMLStencilElement {
|
|
329
|
+
}
|
|
330
|
+
var HTMLFormStructureErrorElement: {
|
|
331
|
+
prototype: HTMLFormStructureErrorElement;
|
|
332
|
+
new (): HTMLFormStructureErrorElement;
|
|
333
|
+
};
|
|
334
|
+
interface HTMLFormSubmitElement extends Components.FormSubmit, HTMLStencilElement {
|
|
335
|
+
}
|
|
336
|
+
var HTMLFormSubmitElement: {
|
|
337
|
+
prototype: HTMLFormSubmitElement;
|
|
338
|
+
new (): HTMLFormSubmitElement;
|
|
339
|
+
};
|
|
340
|
+
interface HTMLFormTextAreaElement extends Components.FormTextArea, HTMLStencilElement {
|
|
341
|
+
}
|
|
342
|
+
var HTMLFormTextAreaElement: {
|
|
343
|
+
prototype: HTMLFormTextAreaElement;
|
|
344
|
+
new (): HTMLFormTextAreaElement;
|
|
264
345
|
};
|
|
265
346
|
interface HTMLManufacturerLookupElement extends Components.ManufacturerLookup, HTMLStencilElement {
|
|
266
347
|
}
|
|
@@ -311,12 +392,17 @@ declare global {
|
|
|
311
392
|
new (): HTMLWarrantyDetailsElement;
|
|
312
393
|
};
|
|
313
394
|
interface HTMLElementTagNameMap {
|
|
395
|
+
"contact-us-form": HTMLContactUsFormElement;
|
|
314
396
|
"dead-stock-lookup": HTMLDeadStockLookupElement;
|
|
315
397
|
"distributor-lookup": HTMLDistributorLookupElement;
|
|
316
398
|
"dynamic-claim": HTMLDynamicClaimElement;
|
|
317
399
|
"dynamic-redeem": HTMLDynamicRedeemElement;
|
|
318
400
|
"form-input": HTMLFormInputElement;
|
|
319
|
-
"
|
|
401
|
+
"form-select": HTMLFormSelectElement;
|
|
402
|
+
"form-structure": HTMLFormStructureElement;
|
|
403
|
+
"form-structure-error": HTMLFormStructureErrorElement;
|
|
404
|
+
"form-submit": HTMLFormSubmitElement;
|
|
405
|
+
"form-text-area": HTMLFormTextAreaElement;
|
|
320
406
|
"manufacturer-lookup": HTMLManufacturerLookupElement;
|
|
321
407
|
"paint-thickness": HTMLPaintThicknessElement;
|
|
322
408
|
"part-lookup": HTMLPartLookupElement;
|
|
@@ -328,6 +414,18 @@ declare global {
|
|
|
328
414
|
}
|
|
329
415
|
}
|
|
330
416
|
declare namespace LocalJSX {
|
|
417
|
+
interface ContactUsForm {
|
|
418
|
+
"baseUrl"?: string;
|
|
419
|
+
"brandId"?: string;
|
|
420
|
+
"errorCallback"?: (error: any) => void;
|
|
421
|
+
"language"?: LanguageKeys;
|
|
422
|
+
"loadingChanges"?: (loading: boolean) => void;
|
|
423
|
+
"queryString"?: string;
|
|
424
|
+
"recaptchaKey"?: string;
|
|
425
|
+
"structure"?: string;
|
|
426
|
+
"successCallback"?: (values: any) => void;
|
|
427
|
+
"theme"?: string;
|
|
428
|
+
}
|
|
331
429
|
interface DeadStockLookup {
|
|
332
430
|
"baseUrl"?: string;
|
|
333
431
|
"errorCallback"?: (errorMessage: ErrorKeys) => void;
|
|
@@ -369,17 +467,66 @@ declare namespace LocalJSX {
|
|
|
369
467
|
}
|
|
370
468
|
interface FormInput {
|
|
371
469
|
"class"?: string;
|
|
372
|
-
"
|
|
470
|
+
"componentClass"?: string;
|
|
471
|
+
"componentId"?: string;
|
|
472
|
+
"disabled"?: boolean;
|
|
473
|
+
"errorMessage"?: string;
|
|
474
|
+
"formLocaleName"?: LocaleFormKeys;
|
|
475
|
+
"inputChanges"?: FormInputChanges;
|
|
476
|
+
"inputPreFix"?: string;
|
|
477
|
+
"isError"?: boolean;
|
|
478
|
+
"isRequired"?: boolean;
|
|
479
|
+
"label"?: string;
|
|
480
|
+
"language"?: LanguageKeys;
|
|
481
|
+
"name"?: string;
|
|
482
|
+
"placeholder"?: string;
|
|
483
|
+
"type"?: string;
|
|
484
|
+
}
|
|
485
|
+
interface FormSelect {
|
|
486
|
+
"componentClass"?: string;
|
|
487
|
+
"componentId"?: string;
|
|
373
488
|
"disabled"?: boolean;
|
|
374
|
-
"errorClass"?: string;
|
|
375
489
|
"errorMessage"?: string;
|
|
490
|
+
"fetcher"?: FormSelectFetcher;
|
|
491
|
+
"formLocaleName"?: string;
|
|
492
|
+
"inputChanges"?: FormInputChanges;
|
|
376
493
|
"isError"?: boolean;
|
|
494
|
+
"isRequired"?: boolean;
|
|
377
495
|
"label"?: string;
|
|
378
|
-
"
|
|
496
|
+
"language"?: LanguageKeys;
|
|
379
497
|
"name"?: string;
|
|
380
|
-
"
|
|
498
|
+
"placeholder"?: string;
|
|
499
|
+
}
|
|
500
|
+
interface FormStructure {
|
|
501
|
+
"form"?: FormHook<any>;
|
|
502
|
+
"formElementMapper"?: FormElementMapper;
|
|
503
|
+
"formFieldParams"?: FormFieldParams;
|
|
504
|
+
"isLoading"?: boolean;
|
|
505
|
+
"language"?: LanguageKeys;
|
|
506
|
+
"renderControl"?: {};
|
|
507
|
+
"structureObject"?: StructureObject;
|
|
508
|
+
}
|
|
509
|
+
interface FormStructureError {
|
|
510
|
+
"language"?: LanguageKeys;
|
|
381
511
|
}
|
|
382
|
-
interface
|
|
512
|
+
interface FormSubmit {
|
|
513
|
+
"isLoading"?: boolean;
|
|
514
|
+
"params"?: FormFieldParams;
|
|
515
|
+
"structureElement"?: StructureObject;
|
|
516
|
+
}
|
|
517
|
+
interface FormTextArea {
|
|
518
|
+
"componentClass"?: string;
|
|
519
|
+
"componentId"?: string;
|
|
520
|
+
"disabled"?: boolean;
|
|
521
|
+
"errorMessage"?: string;
|
|
522
|
+
"formLocaleName"?: LocaleFormKeys;
|
|
523
|
+
"inputChanges"?: FormInputChanges;
|
|
524
|
+
"isError"?: boolean;
|
|
525
|
+
"isRequired"?: boolean;
|
|
526
|
+
"label"?: string;
|
|
527
|
+
"language"?: LanguageKeys;
|
|
528
|
+
"name"?: string;
|
|
529
|
+
"placeholder"?: string;
|
|
383
530
|
}
|
|
384
531
|
interface ManufacturerLookup {
|
|
385
532
|
"baseUrl"?: string;
|
|
@@ -478,12 +625,17 @@ declare namespace LocalJSX {
|
|
|
478
625
|
"userId"?: string;
|
|
479
626
|
}
|
|
480
627
|
interface IntrinsicElements {
|
|
628
|
+
"contact-us-form": ContactUsForm;
|
|
481
629
|
"dead-stock-lookup": DeadStockLookup;
|
|
482
630
|
"distributor-lookup": DistributorLookup;
|
|
483
631
|
"dynamic-claim": DynamicClaim;
|
|
484
632
|
"dynamic-redeem": DynamicRedeem;
|
|
485
633
|
"form-input": FormInput;
|
|
486
|
-
"
|
|
634
|
+
"form-select": FormSelect;
|
|
635
|
+
"form-structure": FormStructure;
|
|
636
|
+
"form-structure-error": FormStructureError;
|
|
637
|
+
"form-submit": FormSubmit;
|
|
638
|
+
"form-text-area": FormTextArea;
|
|
487
639
|
"manufacturer-lookup": ManufacturerLookup;
|
|
488
640
|
"paint-thickness": PaintThickness;
|
|
489
641
|
"part-lookup": PartLookup;
|
|
@@ -498,12 +650,17 @@ export { LocalJSX as JSX };
|
|
|
498
650
|
declare module "@stencil/core" {
|
|
499
651
|
export namespace JSX {
|
|
500
652
|
interface IntrinsicElements {
|
|
653
|
+
"contact-us-form": LocalJSX.ContactUsForm & JSXBase.HTMLAttributes<HTMLContactUsFormElement>;
|
|
501
654
|
"dead-stock-lookup": LocalJSX.DeadStockLookup & JSXBase.HTMLAttributes<HTMLDeadStockLookupElement>;
|
|
502
655
|
"distributor-lookup": LocalJSX.DistributorLookup & JSXBase.HTMLAttributes<HTMLDistributorLookupElement>;
|
|
503
656
|
"dynamic-claim": LocalJSX.DynamicClaim & JSXBase.HTMLAttributes<HTMLDynamicClaimElement>;
|
|
504
657
|
"dynamic-redeem": LocalJSX.DynamicRedeem & JSXBase.HTMLAttributes<HTMLDynamicRedeemElement>;
|
|
505
658
|
"form-input": LocalJSX.FormInput & JSXBase.HTMLAttributes<HTMLFormInputElement>;
|
|
506
|
-
"
|
|
659
|
+
"form-select": LocalJSX.FormSelect & JSXBase.HTMLAttributes<HTMLFormSelectElement>;
|
|
660
|
+
"form-structure": LocalJSX.FormStructure & JSXBase.HTMLAttributes<HTMLFormStructureElement>;
|
|
661
|
+
"form-structure-error": LocalJSX.FormStructureError & JSXBase.HTMLAttributes<HTMLFormStructureErrorElement>;
|
|
662
|
+
"form-submit": LocalJSX.FormSubmit & JSXBase.HTMLAttributes<HTMLFormSubmitElement>;
|
|
663
|
+
"form-text-area": LocalJSX.FormTextArea & JSXBase.HTMLAttributes<HTMLFormTextAreaElement>;
|
|
507
664
|
"manufacturer-lookup": LocalJSX.ManufacturerLookup & JSXBase.HTMLAttributes<HTMLManufacturerLookupElement>;
|
|
508
665
|
"paint-thickness": LocalJSX.PaintThickness & JSXBase.HTMLAttributes<HTMLPaintThicknessElement>;
|
|
509
666
|
"part-lookup": LocalJSX.PartLookup & JSXBase.HTMLAttributes<HTMLPartLookupElement>;
|
|
@@ -1,33 +1,5 @@
|
|
|
1
1
|
import { AnyObjectSchema } from 'yup';
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
label: string;
|
|
5
|
-
class: string;
|
|
6
|
-
isError: boolean;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
labelClass: string;
|
|
9
|
-
errorClass: string;
|
|
10
|
-
errorMessage: string;
|
|
11
|
-
containerClass: string;
|
|
12
|
-
}
|
|
13
|
-
export interface FormHookInterface<T> {
|
|
14
|
-
el: HTMLElement;
|
|
15
|
-
renderControl: {};
|
|
16
|
-
isLoading: boolean;
|
|
17
|
-
formSubmit: (formValues: T) => void;
|
|
18
|
-
}
|
|
19
|
-
type FieldType = 'text';
|
|
20
|
-
type ValidationType = 'onSubmit' | 'always';
|
|
21
|
-
interface Field {
|
|
22
|
-
name: string;
|
|
23
|
-
isError: boolean;
|
|
24
|
-
disabled: boolean;
|
|
25
|
-
errorMessage: string;
|
|
26
|
-
onInput: (event: InputEvent) => void;
|
|
27
|
-
}
|
|
28
|
-
export interface FormStateOptions {
|
|
29
|
-
validationType?: ValidationType;
|
|
30
|
-
}
|
|
2
|
+
import { Field, FieldType, FormHookInterface, FormStateOptions } from "../types/forms";
|
|
31
3
|
export declare class FormHook<T> {
|
|
32
4
|
private isSubmitted;
|
|
33
5
|
private context;
|
|
@@ -51,4 +23,3 @@ export declare class FormHook<T> {
|
|
|
51
23
|
private signal;
|
|
52
24
|
private onChanges;
|
|
53
25
|
}
|
|
54
|
-
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LanguageKeys } from "../types/locales/index";
|
|
2
|
+
export type Grecaptcha = {
|
|
3
|
+
getResponse(): string;
|
|
4
|
+
reset(widgetId?: number): void;
|
|
5
|
+
ready(callback: () => void): void;
|
|
6
|
+
execute(siteKey: string, options: {
|
|
7
|
+
action: string;
|
|
8
|
+
}): Promise<string>;
|
|
9
|
+
render(container: HTMLElement | string, parameters: {
|
|
10
|
+
'sitekey': string;
|
|
11
|
+
'callback'?: (token: string) => void;
|
|
12
|
+
'error-callback'?: () => void;
|
|
13
|
+
'expired-callback'?: () => void;
|
|
14
|
+
}): number;
|
|
15
|
+
};
|
|
16
|
+
export declare const setupRecaptcha: (recaptchaKey: string, language?: LanguageKeys, callback?: () => void) => void;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LanguageKeys, Locale } from "./locales/index";
|
|
2
|
+
export interface FormHookInterface<T> {
|
|
3
|
+
locale: Locale;
|
|
4
|
+
el: HTMLElement;
|
|
5
|
+
structure: string;
|
|
6
|
+
renderControl: {};
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
language: LanguageKeys;
|
|
9
|
+
structureObject: StructureObject;
|
|
10
|
+
formSubmit: (formValues: T) => void;
|
|
11
|
+
}
|
|
12
|
+
export type FormSelectItem = {
|
|
13
|
+
value: string;
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
export type FormInputChanges = (event: InputEvent | string) => void;
|
|
17
|
+
export type FormSelectFetcher = (language: string, signal: AbortSignal) => FormSelectItem[];
|
|
18
|
+
export type FieldType = 'text' | 'select' | 'number' | 'text-area';
|
|
19
|
+
export type FormElementMapper = Record<string, FieldType>;
|
|
20
|
+
export type ValidationType = 'onSubmit' | 'always';
|
|
21
|
+
export interface Field {
|
|
22
|
+
name: string;
|
|
23
|
+
isError: boolean;
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
isRequired: boolean;
|
|
26
|
+
fieldType: FieldType;
|
|
27
|
+
errorMessage: string;
|
|
28
|
+
inputChanges: FormInputChanges;
|
|
29
|
+
}
|
|
30
|
+
export type FieldControllers = Record<string, Field>;
|
|
31
|
+
export interface FormStateOptions {
|
|
32
|
+
validationType?: ValidationType;
|
|
33
|
+
}
|
|
34
|
+
type FormElementStructure = {
|
|
35
|
+
id: string;
|
|
36
|
+
class: string;
|
|
37
|
+
children: FormElementStructure[];
|
|
38
|
+
element: '' | 'div' | 'slot' | 'submit' | 'button' | string;
|
|
39
|
+
};
|
|
40
|
+
export type StructureArray = (string | StructureArray)[];
|
|
41
|
+
export type StructureObject = FormElementStructure | null;
|
|
42
|
+
export type LocaleFormKeys = 'contactUs';
|
|
43
|
+
type Params = {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
formLocaleName: LocaleFormKeys;
|
|
46
|
+
};
|
|
47
|
+
export type FormFieldParams = Record<string, Params>;
|
|
48
|
+
export {};
|