adp-web-components 0.1.63 → 0.1.64
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/dead-stock-lookup_3.cjs.entry.js +4 -4
- package/dist/cjs/flexible-container.cjs.entry.js +1 -1
- package/dist/cjs/form-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/form-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/form-dialog_8.cjs.entry.js +81 -11
- package/dist/cjs/form-input-C3gQ_Noj.js +30 -0
- package/dist/cjs/form-input_4.cjs.entry.js +5 -5
- package/dist/cjs/form-switch.cjs.entry.js +2 -2
- package/dist/cjs/form-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/general-inquiry-form.cjs.entry.js +4 -4
- package/dist/cjs/{get-language-from-url-CfLHbGsq.js → get-language-from-url-DSzX4HQt.js} +28 -2
- package/dist/cjs/{get-local-language-CG40OoLK.js → get-local-language-8KMktNqV.js} +1 -1
- package/dist/cjs/information-table.cjs.entry.js +1 -1
- package/dist/cjs/{loader-icon-CoLnzFJQ.js → loader-icon-Cf3Xs3Kv.js} +2 -2
- package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +3 -3
- package/dist/cjs/part-lookup.cjs.entry.js +2 -2
- package/dist/cjs/service-booking-form.cjs.entry.js +4 -4
- package/dist/cjs/shift-tab-content.cjs.entry.js +1 -1
- package/dist/cjs/shift-tabs_2.cjs.entry.js +2 -2
- package/dist/cjs/ssc-lookup-form.cjs.entry.js +4 -4
- package/dist/cjs/{state-object-C1OC85SG.js → state-object-BhdQ1vEN.js} +1 -1
- package/dist/cjs/test-drive-form.cjs.entry.js +4 -4
- package/dist/cjs/vehicle-accessories_7.cjs.entry.js +8 -8
- package/dist/cjs/vehicle-lookup.cjs.entry.js +2 -2
- package/dist/cjs/vehicle-quotation-form.cjs.entry.js +3 -3
- package/dist/collection/components/components/flexible-container.css +1 -1
- package/dist/collection/components/components/information-table.css +1 -1
- package/dist/collection/components/components/loading-spinner.css +1 -1
- package/dist/collection/components/components/shift-tab-content.css +1 -1
- package/dist/collection/components/components/shift-tabs.css +1 -1
- package/dist/collection/components/form-elements/form-checkbox.js +1 -1
- package/dist/collection/components/form-elements/form-input.js +1 -1
- package/dist/collection/components/form-elements/form-inputs.css +1 -1
- package/dist/collection/components/form-elements/form-phone-number.js +1 -1
- package/dist/collection/components/form-elements/form-picker-input.js +74 -4
- package/dist/collection/components/form-elements/form-select.js +1 -1
- package/dist/collection/components/form-elements/form-submit.js +1 -1
- package/dist/collection/components/form-elements/form-switch.js +1 -1
- package/dist/collection/components/form-elements/form-text-area.js +1 -1
- package/dist/collection/components/form-elements/form-vin-input.js +1 -1
- package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
- package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
- package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
- package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
- package/dist/collection/components/part-lookup/part-lookup.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
- package/dist/collection/features/form-hook/form-hook.js +28 -2
- package/dist/collection/features/form-hook/inputs/form-input.js +11 -5
- package/dist/components/dead-stock-lookup.js +1 -1
- package/dist/components/distributor-lookup.js +1 -1
- package/dist/components/flexible-container.js +1 -1
- package/dist/components/form-checkbox.js +1 -1
- package/dist/components/form-date-picker.js +1 -1
- package/dist/components/form-dialog.js +1 -1
- package/dist/components/form-input.js +1 -1
- package/dist/components/form-phone-number.js +1 -1
- package/dist/components/form-picker-input.js +1 -1
- package/dist/components/form-select.js +1 -1
- package/dist/components/form-shadow-input.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-switch.js +1 -1
- package/dist/components/form-text-area.js +1 -1
- package/dist/components/form-time-picker.js +1 -1
- package/dist/components/form-vin-input.js +1 -1
- package/dist/components/general-inquiry-form.js +1 -1
- package/dist/components/information-table.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/manufacturer-part-lookup.js +1 -1
- package/dist/components/p-B7jki48I.js +5 -0
- package/dist/components/{p-DBPcMct2.js → p-BP80WvAz.js} +1 -1
- package/dist/components/{p-36-IaSKm.js → p-BQtb1fok.js} +1 -1
- package/dist/components/{p-Cjj1G4D2.js → p-BuKy7Rx0.js} +1 -1
- package/dist/components/{p-A7iMsEel.js → p-BuP_DwlH.js} +1 -1
- package/dist/components/{p-5agmhwm7.js → p-Bxru3K95.js} +1 -1
- package/dist/components/{p-DnkuFboF.js → p-C1siXH7Y.js} +1 -1
- package/dist/components/{p-DRb1hBHP.js → p-C2aeZGeT.js} +1 -1
- package/dist/components/p-CAxrIdkp.js +5 -0
- package/dist/components/p-CDTvzwTY.js +5 -0
- package/dist/components/{p-D0XGI6mk.js → p-CG-zovra.js} +1 -1
- package/dist/components/{p-C6hyNnHw.js → p-CKI3aAYE.js} +1 -1
- package/dist/components/p-CO1nZnKO.js +5 -0
- package/dist/components/p-CU0-hVft.js +5 -0
- package/dist/components/{p-BPrc_-Uw.js → p-CUBMSqcx.js} +1 -1
- package/dist/components/{p-DpfBI1eP.js → p-CasPml7B.js} +1 -1
- package/dist/components/{p-clgmN8l6.js → p-CcLFnUSS.js} +1 -1
- package/dist/components/{p-D4rNtEH9.js → p-Cekl00HW.js} +1 -1
- package/dist/components/p-CkzCdQDi.js +5 -0
- package/dist/components/{p-DppYpL5T.js → p-D3RWScgO.js} +1 -1
- package/dist/components/{p-DsFbXACB.js → p-DACKk-aI.js} +1 -1
- package/dist/components/p-DAOqnjKo.js +5 -0
- package/dist/components/p-DC9JViaQ.js +5 -0
- package/dist/components/{p-BkRUZTAo.js → p-DPN4YeOb.js} +1 -1
- package/dist/components/{p-CrUnNyzK.js → p-DWp-GWu1.js} +1 -1
- package/dist/components/{p-D3aoGLFX.js → p-DZWy-asx.js} +1 -1
- package/dist/components/{p-Cz2GJXgI.js → p-DeNo_PJi.js} +1 -1
- package/dist/components/{p-Bgg84Jga.js → p-Dk1orRQl.js} +1 -1
- package/dist/components/p-Dlrjtovg.js +5 -0
- package/dist/components/{p-aJdysKHK.js → p-EKpRGPLQ.js} +1 -1
- package/dist/components/{p-DTYO6O3a.js → p-NSqEj65Q.js} +1 -1
- package/dist/components/p-Oy02T-n-.js +5 -0
- package/dist/components/{p-BXt8N0qj.js → p-elqvs8Bp.js} +1 -1
- package/dist/components/p-jTYPnZnQ.js +5 -0
- package/dist/components/part-lookup.js +1 -1
- package/dist/components/service-booking-form.js +1 -1
- package/dist/components/shift-accordion.js +1 -1
- package/dist/components/shift-slider.js +1 -1
- package/dist/components/shift-tab-content.js +1 -1
- package/dist/components/shift-tabs.js +1 -1
- package/dist/components/ssc-lookup-form.js +1 -1
- package/dist/components/test-drive-form.js +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-claimable-items.js +1 -1
- package/dist/components/vehicle-item-claim-form.js +1 -1
- package/dist/components/vehicle-lookup.js +1 -1
- package/dist/components/vehicle-paint-thickness.js +1 -1
- package/dist/components/vehicle-quotation-form.js +1 -1
- package/dist/components/vehicle-sale-information.js +1 -1
- package/dist/components/vehicle-service-history.js +1 -1
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/vehicle-warranty-details.js +1 -1
- package/dist/esm/dead-stock-lookup_3.entry.js +4 -4
- package/dist/esm/flexible-container.entry.js +1 -1
- package/dist/esm/form-checkbox.entry.js +2 -2
- package/dist/esm/form-date-picker.entry.js +1 -1
- package/dist/esm/form-dialog_8.entry.js +81 -11
- package/dist/esm/form-input-C5O2h7ti.js +28 -0
- package/dist/esm/form-input_4.entry.js +5 -5
- package/dist/esm/form-switch.entry.js +2 -2
- package/dist/esm/form-time-picker.entry.js +1 -1
- package/dist/esm/general-inquiry-form.entry.js +4 -4
- package/dist/esm/{get-language-from-url-DS2wH9wf.js → get-language-from-url-WEiw5juk.js} +28 -2
- package/dist/esm/{get-local-language-VdAZpG-2.js → get-local-language-B8070P5r.js} +1 -1
- package/dist/esm/information-table.entry.js +1 -1
- package/dist/esm/{loader-icon-QHxzLM80.js → loader-icon-Bdlakq4b.js} +2 -2
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/manufacturer-part-lookup.entry.js +3 -3
- package/dist/esm/part-lookup.entry.js +2 -2
- package/dist/esm/service-booking-form.entry.js +4 -4
- package/dist/esm/shift-tab-content.entry.js +1 -1
- package/dist/esm/shift-tabs_2.entry.js +2 -2
- package/dist/esm/ssc-lookup-form.entry.js +4 -4
- package/dist/esm/{state-object-B5sDOkr3.js → state-object-CmzxAD3a.js} +1 -1
- package/dist/esm/test-drive-form.entry.js +4 -4
- package/dist/esm/vehicle-accessories_7.entry.js +8 -8
- package/dist/esm/vehicle-lookup.entry.js +2 -2
- package/dist/esm/vehicle-quotation-form.entry.js +3 -3
- package/dist/shift-components/{p-bac28415.entry.js → p-0cd22be9.entry.js} +1 -1
- package/dist/shift-components/{p-caed63eb.entry.js → p-1103449e.entry.js} +1 -1
- package/dist/shift-components/{p-1eb4562c.entry.js → p-15af4b62.entry.js} +1 -1
- package/dist/shift-components/{p-82d7784e.entry.js → p-220ce6f0.entry.js} +1 -1
- package/dist/shift-components/p-2af694b2.entry.js +5 -0
- package/dist/shift-components/{p-3c07dae0.entry.js → p-314e6be5.entry.js} +1 -1
- package/dist/shift-components/p-42e06b24.entry.js +5 -0
- package/dist/shift-components/{p-aab59b34.entry.js → p-4aaeb37f.entry.js} +1 -1
- package/dist/shift-components/{p-6035ad7f.entry.js → p-5caec752.entry.js} +1 -1
- package/dist/shift-components/{p-5d6ca023.entry.js → p-601b2a59.entry.js} +1 -1
- package/dist/shift-components/p-6685c185.entry.js +5 -0
- package/dist/shift-components/{p-69a9617b.entry.js → p-7cbe4db3.entry.js} +1 -1
- package/dist/shift-components/p-8512615f.entry.js +5 -0
- package/dist/shift-components/{p-4ca85ba8.entry.js → p-89bb047b.entry.js} +1 -1
- package/dist/shift-components/{p-59296309.entry.js → p-99ba86c6.entry.js} +1 -1
- package/dist/shift-components/p-Bp-HDfJB.js +5 -0
- package/dist/shift-components/{p-BqVN5MXa.js → p-DO0hHkF_.js} +1 -1
- package/dist/shift-components/{p-D43Y2KJZ.js → p-DOQtgS4h.js} +1 -1
- package/dist/shift-components/{p-CYuX6By7.js → p-DPETJEMv.js} +1 -1
- package/dist/shift-components/{p-7a9dc564.entry.js → p-a4c7d4c9.entry.js} +1 -1
- package/dist/shift-components/p-a56e2de9.entry.js +5 -0
- package/dist/shift-components/{p-bc928bcf.entry.js → p-ba318357.entry.js} +1 -1
- package/dist/shift-components/p-d4c5e30d.entry.js +5 -0
- package/dist/shift-components/{p-82cc9e0d.entry.js → p-d51df697.entry.js} +1 -1
- package/dist/shift-components/{p-35e4059b.entry.js → p-f21ceea0.entry.js} +1 -1
- package/dist/shift-components/p-no7IC1jn.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/form-elements/form-picker-input.d.ts +5 -0
- package/dist/types/features/form-hook/form-hook.d.ts +3 -5
- package/dist/types/features/form-hook/inputs/form-input.d.ts +3 -0
- package/dist/types/features/form-hook/interface.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/form-input-D5dWFwoN.js +0 -24
- package/dist/components/p-78hsxToT.js +0 -5
- package/dist/components/p-B1K4fRUA.js +0 -5
- package/dist/components/p-C7H6IjZ0.js +0 -5
- package/dist/components/p-D205nHLN.js +0 -5
- package/dist/components/p-DZ29hUTN.js +0 -5
- package/dist/components/p-Di7kQptP.js +0 -5
- package/dist/components/p-DzJYZ-yg.js +0 -5
- package/dist/components/p-K0JAT1Gz.js +0 -5
- package/dist/components/p-e7OMZxZr.js +0 -5
- package/dist/components/p-rAxWdX54.js +0 -5
- package/dist/components/p-v09Fe7HV.js +0 -5
- package/dist/esm/form-input-qOEP7NyE.js +0 -22
- package/dist/shift-components/p-2b8d01e8.entry.js +0 -5
- package/dist/shift-components/p-3ab64036.entry.js +0 -5
- package/dist/shift-components/p-5e1772f7.entry.js +0 -5
- package/dist/shift-components/p-6ab35401.entry.js +0 -5
- package/dist/shift-components/p-BtuVI_PX.js +0 -5
- package/dist/shift-components/p-DgUKb8cO.js +0 -5
- package/dist/shift-components/p-aa5fbfe8.entry.js +0 -5
- package/dist/shift-components/p-e3cd1038.entry.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{h as e}from"./p-Bf4Ol6Qt.js";import"./p-CWP4hZcw.js";import{d as l}from"./p-BILW0yP6.js";import{L as a,g as r}from"./p-
|
|
5
|
+
import{h as e}from"./p-Bf4Ol6Qt.js";import"./p-CWP4hZcw.js";import{d as l}from"./p-BILW0yP6.js";import{L as a,g as r}from"./p-DOQtgS4h.js";import{c as i}from"./p-BK16Cn81.js";import{d as t}from"./p-XyQhTm0V.js";import{g as o}from"./p-D0IHkGuC.js";const n={};let c="";const s=({form:l})=>{var r,t,o,s;l.addWatcher("vehicle");let d=l.getValue("vehicle"),u=!!d;const v=null===(r=l.context.vehicleList)||void 0===r?void 0:r.find((e=>e.value===d));let p;v?(p=null===(t=null==v?void 0:v.meta)||void 0===t?void 0:t.image,d=v.value):l.context.vehicleList&&l.context.vehicleList[0]&&(p=null===(s=null===(o=l.context.vehicleList[0])||void 0===o?void 0:o.meta)||void 0===s?void 0:s.image,d=l.context.vehicleList[0].value);let h=!1;return n[d]?c=n[d]:l&&p&&d&&(((e,l,a)=>{fetch(l).then((e=>e.blob())).then((l=>{const r=new FileReader;r.onloadend=()=>{n[a]=r.result,e.rerender({rerenderForm:!0})},r.readAsDataURL(l)})).catch((e=>{console.log(e)}))})(l,p,d),h=!0),e("flexible-container",{isOpened:u},e("div",{style:{"min-height":"60px"},part:"vehicle-image-wrapper",class:i("vehicle-image-wrapper",{loading:h})},e("div",{part:i("vehicle-image-loading-wrapper",{"vehicle-image-active-loading-wrapper":h}),class:i("loading-wrapper vehicle-image-loading-wrapper",{"vehicle-image-active-loading-wrapper":h})},e(a,{part:"vehicle-image-loader-icon",class:"img vehicle-image-loader-icon"})),e("img",{alt:"vehicle image",part:"vehicle-image",src:c,style:{"border-radius":"6px",transition:"opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);",opacity:h?"0":"1"}})))},d=l=>e("svg",Object.assign({fill:"none"},l,{"stroke-width":"2",viewBox:"0 0 24 24",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",xmlns:"http://www.w3.org/2000/svg"}),e("path",{d:"M8 2v4"}),e("path",{d:"M16 2v4"}),e("rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),e("path",{d:"M3 10h18"}),e("path",{d:"M8 14h.01"}),e("path",{d:"M12 14h.01"}),e("path",{d:"M16 14h.01"}),e("path",{d:"M8 18h.01"}),e("path",{d:"M12 18h.01"}),e("path",{d:"M16 18h.01"})),u=(a,i={})=>Object.assign({submit:({props:l})=>e("form-submit",Object.assign({},l)),name:({props:l})=>e("form-input",Object.assign({},l)),lastName:({props:l})=>e("form-input",Object.assign({},l)),email:({props:l})=>e("form-input",Object.assign({type:"email"},l)),message:({props:l})=>e("form-text-area",Object.assign({},l)),vin:({props:l})=>e("form-vin-input",Object.assign({},l)),vehicleImage:({form:l})=>e(s,{form:l}),phone:({props:l,isLoading:i})=>(a.phoneValidator||(a.phoneValidator=r((null==l?void 0:l.countryCode)||"")),e("form-phone-number",Object.assign({defaultValue:a.phoneValidator.default},l,{isLoading:i,validator:a.phoneValidator}))),vehicle:({language:l,props:a})=>e("form-select",Object.assign({},a,{searchable:!0,fetcher:async({signal:e,context:r})=>{var i,t;let n=null===(i=new URLSearchParams(window.location.search).get(null==a?void 0:a.vehicleIdQueryParam)||"")||void 0===i?void 0:i.toLowerCase();const c=a.vehicleApi,s=await fetch(c,{signal:e,headers:{"Accept-Language":l}});let d,u=-1;return(null==a?void 0:a.dynamic)?(d=((e,l)=>{const a=[];return o(e,l.items).forEach((e=>{const r=o(e,l["item-value"]),i=o(e,l["item-label"]),t={value:(null==l?void 0:l.useNamedValue)?i:r,label:i};t.meta=Object.assign({},e),a.push(t)})),a})(await s.json(),a),d.forEach(((e,l)=>{var r,i;a.defaultValue||!n||(null===(r=null==e?void 0:e.label)||void 0===r?void 0:r.toLowerCase())!==n&&(null===(i=`${e.value}`)||void 0===i?void 0:i.toLowerCase())!==n||(u=l)}))):(null==a?void 0:a.vehiclesApiStrapiFormat)?(d=(await s.json()).data,d=d.map(((e,l)=>{var r,i,t;return a.defaultValue||!n||(null===(r=null==e?void 0:e.GradeName)||void 0===r?void 0:r.toLowerCase())!==n&&(null===(i=`${e.id}`)||void 0===i?void 0:i.toLowerCase())!==n||(u=l),{label:e.attributes.GradeName,value:(null==a?void 0:a.useNamedValue)?`${null===(t=null==e?void 0:e.attributes)||void 0===t?void 0:t.GradeName}`:`${e.id}`,meta:Object.assign(Object.assign({},e),{image:e.attributes.Cover.data.attributes.url})}}))):(d=await s.json(),d=d.map(((e,l)=>{var r,i;return a.defaultValue||!n||(null===(r=null==e?void 0:e.Title)||void 0===r?void 0:r.toLowerCase())!==n&&(null===(i=`${e.ID}`)||void 0===i?void 0:i.toLowerCase())!==n||(u=l),{label:e.Title,value:(null==a?void 0:a.useNamedValue)?`${e.Title}`:`${e.ID}`,meta:Object.assign(Object.assign({},e),{image:e.Image})}}))),r.defaultValue=(null==a?void 0:a.defaultValue)?null==a?void 0:a.defaultValue:u>-1?null===(t=d[u])||void 0===t?void 0:t.value:"",d},language:l})),companyBranchId:({language:l,props:a})=>e("form-select",Object.assign({},a,{clearable:!0,searchable:!0,fetcher:async({signal:e})=>{const r=null==a?void 0:a.branchApi,i=await fetch(r,{signal:e,headers:{"Accept-Language":l}});return(await i.json()).map((e=>({label:e.Name,value:`${e.ID}`,meta:Object.assign({},e)})))},language:l})),cityId:({language:l,props:a})=>e("form-select",Object.assign({},a,{clearable:!0,searchable:!0,fetcher:async({signal:e})=>{const r=null==a?void 0:a.cityApi,i=await fetch(r,{signal:e,headers:{"Accept-Language":l}});return(await i.json()).map((e=>({label:e.Name,value:`${e.ID}`,meta:Object.assign({},e)})))},language:l})),date:({props:l})=>e("form-picker-input",Object.assign({type:"date"},l,{icon:e(d,null)})),time:({language:a,props:r})=>e("form-select",Object.assign({},r,{clearable:!0,fetcher:async()=>{const e=[];if(Array.isArray(r.span)&&Array.isArray(r.min)&&Array.isArray(r.max)&&r.format){let a=t({offsets:r.min}),i=t({offsets:r.max});for(;l.isBefore(a,i)||l.isEqual(a,i);)e.push({value:l.format(a,r.format),label:l.format(a,r.format)}),a=t({offsets:r.span,date:a})}return e},language:a})),currentVehicleBrand:({form:l,language:a,props:r,locale:i})=>e("form-select",Object.assign({},r,{searchable:!0,fetcher:async({signal:e})=>{var a;const r=null===(a=l.context.structure)||void 0===a?void 0:a.data.currentVehiclesApi,t=await fetch(r,{signal:e,headers:{"Accept-Language":"en"}});return[...(await t.json()).filter((e=>"Other"!==e.name)).map((e=>({label:e.Name,value:`${e.ID}`,meta:Object.assign({},e)}))),{value:"Other",label:i.Other}]},language:a})),currentVehicleModel:({form:l,language:a,props:r,locale:i})=>{l.addWatcher("currentVehicleBrand");const t=null==l?void 0:l.getValue("currentVehicleBrand");return e("form-select",Object.assign({},r,{searchable:!0,fetcher:async({})=>{var e,a;if(!t)return[];const r=null===(a=null===(e=l.context.currentVehicleBrandList)||void 0===e?void 0:e.find((e=>e.value===t)))||void 0===a?void 0:a.meta;return r?[...null==r?void 0:r.Models.map((e=>({label:e.Name,value:`${e.ID}`}))),{value:"Other",label:i.Other}]:[]},language:a,resetKey:t,fetcherKey:t,isRequired:"Other"!==t,isDisabled:!t||"Other"===t}))},ownVehicle:({language:l,props:a})=>e("form-select",Object.assign({},a,{fetcher:async({})=>{var e,r,i,t;return[{value:"yes",label:null===(r=null===(e=null==a?void 0:a.localization)||void 0===e?void 0:e[l])||void 0===r?void 0:r.yes},{value:"no",label:null===(t=null===(i=null==a?void 0:a.localization)||void 0===i?void 0:i[l])||void 0===t?void 0:t.no}]},language:l})),conditionalCurrentVehicleBrand:({form:l,language:a,props:r,locale:i})=>{l.addWatcher("ownVehicle");const t="yes"===(null==l?void 0:l.getValue("ownVehicle"));return e("form-select",Object.assign({},r,{searchable:!0,fetcher:async({signal:e})=>{const l=null==r?void 0:r.brandApi,a=await fetch(l,{signal:e,headers:{"Accept-Language":"en"}});return[...(await a.json()).filter((e=>"Other"!==e.name)).map((e=>({label:e.Name,value:(null==r?void 0:r.useNamedValue)?e.Name:`${e.ID}`,meta:Object.assign({},e)}))),{value:"Other",label:i.Other}]},language:a,resetKey:t,isRequired:t,isDisabled:!t}))},conditionalCurrentVehicleModel:({form:l,language:a,props:r,locale:i})=>{l.addWatcher("ownVehicle"),l.addWatcher("conditionalCurrentVehicleBrand");const t="yes"===(null==l?void 0:l.getValue("ownVehicle")),o=null==l?void 0:l.getValue("conditionalCurrentVehicleBrand");return e("form-select",Object.assign({},r,{searchable:!0,fetcher:async({})=>{var e,a;if(!o)return[];const t=null===(a=null===(e=l.context.conditionalCurrentVehicleBrandList)||void 0===e?void 0:e.find((e=>e.value===o)))||void 0===a?void 0:a.meta;return t?[...null==t?void 0:t.Models.map((e=>({label:e.Name,value:(null==r?void 0:r.useNamedValue)?e.Name:`${e.ID}`}))),{value:"Other",label:i.Other}]:[]},language:a,resetKey:o,fetcherKey:o,isRequired:t&&"Other"!==o,isDisabled:!o||"Other"===o}))}},i),v=()=>({phoneValidator:void 0});export{v as a,u as g}
|