adp-web-components 0.1.67 → 0.1.69
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 +1 -1
- package/dist/cjs/form-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/form-dialog_8.cjs.entry.js +8 -8
- package/dist/cjs/form-input_4.cjs.entry.js +4 -4
- package/dist/cjs/form-switch.cjs.entry.js +1 -1
- package/dist/cjs/form-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/general-inquiry-form.cjs.entry.js +3 -3
- package/dist/cjs/{get-local-language-C0eJQl-k.js → get-local-language-Cen-CaAS.js} +1 -1
- package/dist/cjs/information-table.cjs.entry.js +1 -1
- package/dist/cjs/{loader-icon-78LDg8nX.js → loader-icon-DDFoc4iC.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +2 -2
- package/dist/cjs/part-lookup.cjs.entry.js +2 -2
- package/dist/cjs/service-booking-form.cjs.entry.js +3 -3
- package/dist/cjs/shift-accordion.cjs.entry.js +1 -1
- package/dist/cjs/shift-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/shift-components.cjs.js +1 -1
- package/dist/cjs/shift-switch.cjs.entry.js +1 -1
- 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 +3 -3
- package/dist/cjs/{state-object-DWOXUB-o.js → state-object-P-Iq2rJH.js} +1 -1
- package/dist/cjs/test-drive-form.cjs.entry.js +3 -3
- package/dist/cjs/vehicle-accessories_7.cjs.entry.js +90 -36
- package/dist/cjs/vehicle-lookup.cjs.entry.js +5 -5
- package/dist/cjs/vehicle-quotation-form.cjs.entry.js +2 -2
- package/dist/collection/components/components/empty.css +1 -1
- 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-accordion.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-inputs.css +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-accessories.js +4 -4
- package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +6 -6
- 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-lookup.js +3 -3
- package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.js +2 -2
- package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +4 -4
- package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +3 -3
- package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-specification.js +3 -3
- package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.js +93 -12
- 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-Cz-O_r4H.js → p-5vCnW15q.js} +1 -1
- package/dist/components/{p-_x1qOUHh.js → p-BFIEwYxz.js} +1 -1
- package/dist/components/p-BJVKwMQT.js +5 -0
- package/dist/components/{p-Cq-sTJso.js → p-BNxNkaWr.js} +1 -1
- package/dist/components/p-BR4OFzVP.js +5 -0
- package/dist/components/p-BS9Sy4l-.js +5 -0
- package/dist/components/{p-C5beT03Y.js → p-BgJinsB1.js} +1 -1
- package/dist/components/p-BxThjPHO.js +5 -0
- package/dist/components/{p-BhJ0NeBX.js → p-C2_nbD-_.js} +1 -1
- package/dist/components/p-CL7WvF4L.js +5 -0
- package/dist/components/{p-DoJMUHY7.js → p-CSP0hpyv.js} +1 -1
- package/dist/components/{p-BBF3x0El.js → p-CSaunwNy.js} +1 -1
- package/dist/components/{p-BAR4zZVE.js → p-CYk4_3GI.js} +1 -1
- package/dist/components/{p-BsmD9rGm.js → p-CZAQDwlb.js} +1 -1
- package/dist/components/{p-CTHDXEu8.js → p-C_yzUJkF.js} +1 -1
- package/dist/components/{p-CQbRBuSN.js → p-CaTpKLTA.js} +1 -1
- package/dist/components/{p-DuzJFeOY.js → p-CpDHXuPB.js} +1 -1
- package/dist/components/p-CrJpwlcT.js +5 -0
- package/dist/components/p-CtOJ_zjn.js +5 -0
- package/dist/components/p-D4jWMiB1.js +5 -0
- package/dist/components/{p-CRhdQvF0.js → p-DBGnUep_.js} +1 -1
- package/dist/components/{p-BwXXF-5U.js → p-DM8BoqLf.js} +1 -1
- package/dist/components/p-DUVWBnA9.js +5 -0
- package/dist/components/{p-D_toYQMY.js → p-DUqTj2gi.js} +1 -1
- package/dist/components/p-DZp-jErv.js +5 -0
- package/dist/components/{p-B7RVaJXo.js → p-D_eB5U40.js} +1 -1
- package/dist/components/p-Dj8Ee7hQ.js +5 -0
- package/dist/components/p-FQ2AsScl.js +5 -0
- package/dist/components/{p-7fu5WWpw.js → p-MF_Mhmek.js} +1 -1
- package/dist/components/{p-C7mRDJgi.js → p-PmX2Y4Vl.js} +1 -1
- package/dist/components/{p-fh0nyIZs.js → p-UCSAYvqq.js} +1 -1
- package/dist/components/{p-CXDoWZb-.js → p-l_zY6q-j.js} +1 -1
- package/dist/components/p-qrgJk9wz.js +5 -0
- package/dist/components/{p-0k1C5djy.js → p-s1egbQvB.js} +1 -1
- 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-checkbox.js +1 -1
- package/dist/components/shift-slider.js +1 -1
- package/dist/components/shift-switch.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 +1 -1
- package/dist/esm/form-date-picker.entry.js +1 -1
- package/dist/esm/form-dialog_8.entry.js +8 -8
- package/dist/esm/form-input_4.entry.js +4 -4
- package/dist/esm/form-switch.entry.js +1 -1
- package/dist/esm/form-time-picker.entry.js +1 -1
- package/dist/esm/general-inquiry-form.entry.js +3 -3
- package/dist/esm/{get-local-language-Biw0yHkw.js → get-local-language-BA-mxji9.js} +1 -1
- package/dist/esm/information-table.entry.js +1 -1
- package/dist/esm/{loader-icon-BSq08I9B.js → loader-icon-CrkrQoZC.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/manufacturer-part-lookup.entry.js +2 -2
- package/dist/esm/part-lookup.entry.js +2 -2
- package/dist/esm/service-booking-form.entry.js +3 -3
- package/dist/esm/shift-accordion.entry.js +1 -1
- package/dist/esm/shift-checkbox.entry.js +1 -1
- package/dist/esm/shift-components.js +1 -1
- package/dist/esm/shift-switch.entry.js +1 -1
- 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 +3 -3
- package/dist/esm/{state-object-CsGRufMq.js → state-object-DAC-YAZL.js} +1 -1
- package/dist/esm/test-drive-form.entry.js +3 -3
- package/dist/esm/vehicle-accessories_7.entry.js +90 -36
- package/dist/esm/vehicle-lookup.entry.js +5 -5
- package/dist/esm/vehicle-quotation-form.entry.js +2 -2
- package/dist/shift-components/{p-349394fb.entry.js → p-0e787552.entry.js} +1 -1
- package/dist/shift-components/{p-2fe3538e.entry.js → p-1314318c.entry.js} +1 -1
- package/dist/shift-components/{p-de821002.entry.js → p-13ba1767.entry.js} +1 -1
- package/dist/shift-components/{p-7cc145f6.entry.js → p-1e7a67f8.entry.js} +1 -1
- package/dist/shift-components/{p-9b271345.entry.js → p-2a9fdd57.entry.js} +1 -1
- package/dist/shift-components/{p-f4914abc.entry.js → p-2b170c48.entry.js} +1 -1
- package/dist/shift-components/{p-fecd831c.entry.js → p-2c02f614.entry.js} +1 -1
- package/dist/shift-components/p-3ba867f7.entry.js +5 -0
- package/dist/shift-components/{p-34de460f.entry.js → p-57383665.entry.js} +1 -1
- package/dist/shift-components/p-69ff8945.entry.js +5 -0
- package/dist/shift-components/p-71390e8e.entry.js +5 -0
- package/dist/shift-components/{p-8cc48eb3.entry.js → p-7972fca8.entry.js} +1 -1
- package/dist/shift-components/{p-704d266f.entry.js → p-83b7765e.entry.js} +1 -1
- package/dist/shift-components/p-8a108e47.entry.js +5 -0
- package/dist/shift-components/{p-c18fe44e.entry.js → p-8d733785.entry.js} +1 -1
- package/dist/shift-components/{p-Dn20fvOF.js → p-BDOonna-.js} +1 -1
- package/dist/shift-components/{p-Bw1IKJcR.js → p-DJUFyE7i.js} +1 -1
- package/dist/shift-components/{p-CVA5hBAR.js → p-DZEsUMU0.js} +1 -1
- package/dist/shift-components/{p-7ff0398b.entry.js → p-b1c84fb2.entry.js} +1 -1
- package/dist/shift-components/p-bf8073aa.entry.js +5 -0
- package/dist/shift-components/p-c94a8a2a.entry.js +5 -0
- package/dist/shift-components/{p-9bbbf202.entry.js → p-d4fd929c.entry.js} +1 -1
- package/dist/shift-components/p-dfa74829.entry.js +5 -0
- package/dist/shift-components/{p-14ed433a.entry.js → p-ed1e7ad1.entry.js} +1 -1
- package/dist/shift-components/p-f23ef5c3.entry.js +5 -0
- package/dist/shift-components/{p-0382250d.entry.js → p-f2a4ac7c.entry.js} +1 -1
- package/dist/shift-components/p-f9d25f53.entry.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-accessories.d.ts +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-claimable-items.d.ts +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-paint-thickness.d.ts +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-sale-information.d.ts +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-service-history.d.ts +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-specification.d.ts +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-warranty-details.d.ts +10 -1
- package/dist/types/components.d.ts +9 -7
- package/dist/types/features/vehicle-lookup-component/interface.d.ts +1 -1
- package/dist/types/global/lib/recaptcha.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/p-BEZxHs-x.js +0 -5
- package/dist/components/p-BGJO2V-R.js +0 -5
- package/dist/components/p-BUCyV1JC.js +0 -5
- package/dist/components/p-Bey-llJC.js +0 -5
- package/dist/components/p-BlZgyuMY.js +0 -5
- package/dist/components/p-BoGVAN1W.js +0 -5
- package/dist/components/p-BzVkGia-.js +0 -5
- package/dist/components/p-CwUSuYLY.js +0 -5
- package/dist/components/p-D9QkCwy6.js +0 -5
- package/dist/components/p-DJaWpqrV.js +0 -5
- package/dist/components/p-Dwb9LXj0.js +0 -5
- package/dist/components/p-r2IjDj4R.js +0 -5
- package/dist/components/p-zdcy0etB.js +0 -5
- package/dist/shift-components/p-5adf2477.entry.js +0 -5
- package/dist/shift-components/p-65757d59.entry.js +0 -5
- package/dist/shift-components/p-80fcb58d.entry.js +0 -5
- package/dist/shift-components/p-98559d40.entry.js +0 -5
- package/dist/shift-components/p-bd4c7e62.entry.js +0 -5
- package/dist/shift-components/p-c224fb07.entry.js +0 -5
- package/dist/shift-components/p-d37308c4.entry.js +0 -5
- package/dist/shift-components/p-ea31d490.entry.js +0 -5
- package/dist/shift-components/p-eba6a739.entry.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import"./p-Bf4Ol6Qt.js";import{e as o,g as e,f as c,l as s}from"./p-CWP4hZcw.js";const t="0.1.
|
|
5
|
+
import"./p-Bf4Ol6Qt.js";import{e as o,g as e,f as c,l as s}from"./p-CWP4hZcw.js";const t="0.1.69",l={"-":["locales/"],errors:["locales/errors/"],forms:["locales/forms/","locales/forms/contactUs/","locales/forms/demo/","locales/forms/testDriveDemo/","locales/forms/vehicleQuotation/"],"forms.contactUs":["locales/forms/contactUs/"],"forms.demo":["locales/forms/demo/"],"forms.testDriveDemo":["locales/forms/testDriveDemo/"],"forms.vehicleQuotation":["locales/forms/vehicleQuotation/"],general:["locales/general/"],generalTicketTypes:["locales/generalTicketTypes/"],"partLookup.deadStock":["locales/partLookup/deadStock/"],partLookup:["locales/partLookup/deadStock/","locales/partLookup/distributor/","locales/partLookup/manufacturer/"],"partLookup.distributor":["locales/partLookup/distributor/"],"partLookup.manufacturer":["locales/partLookup/manufacturer/"],"vehicleLookup.accessories":["locales/vehicleLookup/accessories/"],vehicleLookup:["locales/vehicleLookup/accessories/","locales/vehicleLookup/claimableItems/","locales/vehicleLookup/paintThickness/","locales/vehicleLookup/saleInformation/","locales/vehicleLookup/serviceHistory/","locales/vehicleLookup/specification/","locales/vehicleLookup/warranty/"],"vehicleLookup.claimableItems":["locales/vehicleLookup/claimableItems/"],"vehicleLookup.paintThickness":["locales/vehicleLookup/paintThickness/"],"vehicleLookup.serviceHistory":["locales/vehicleLookup/serviceHistory/"],"vehicleLookup.saleInformation":["locales/vehicleLookup/saleInformation/"],"vehicleLookup.specification":["locales/vehicleLookup/specification/"],"vehicleLookup.warranty":["locales/vehicleLookup/warranty/"],"forms*":["locales/forms/"]},a={};async function r(c){const[s,t]=await Promise.all([n(c,"errors",o),n(c,"-",e)]);return Object.assign({errors:s},t)}async function i(s){const[t,l,a]=await Promise.all([n(s,"errors",o),n(s,"-",e),n(s,"forms*",c)]);return Object.assign(Object.assign(Object.assign({},l),a),t)}async function n(o,e,c){const t=s[o]||s.en,a=l[e];if(!a||!a.length)throw new Error(`Locale file not found for component: ${e}`);if(1===a.length){const o=a[0]+t,e=await f(o);try{c.validateSync(e,{strict:!0,abortEarly:!1})}catch(e){console.error(`Failed to parse locale file: ${o}`),console.error(e)}return e}{const o=a.map((o=>f(o+t))),s=await Promise.all(o),l={};u(e,c.getDefault(),l,t);try{c.validateSync(l,{strict:!0,abortEarly:!1})}catch(o){console.error(`Failed to parse locale file component: ${e}`),console.error(o)}return s}}function p(o){return"object"==typeof o&&null!==o&&!Array.isArray(o)}function u(o,e,c,s){let t=!1;Object.entries(e).forEach((([e,r])=>{if("string"!=typeof r||t){if(p(r)){const t=o+"."+e;if(Object.entries(r).some((([o,e])=>p(e))))c[e]={},u(t,r,c[e],s);else if(l[t]&&l[t].length){const o=l[t][0]+s;a[o]&&(c[e]=a[o])}}}else{if(l[o]){const e=l[o][0]+s;a[e]&&Object.assign(c,a[e])}t=!0}}))}async function f(o){if(a[o])return await a[o];try{const e=fetch(`https://cdn.jsdelivr.net/npm/adp-web-components@${t}/dist/${o}`).then((e=>(e.ok||delete a[o],e.json())));a[o]=e;const c=await e;return a[o]=c,c}catch(e){return delete a[o],{}}}export{n as a,i as b,r as g,t as v}
|
|
@@ -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 i}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 i}from"./p-BDOonna-.js";import{c as r}from"./p-BK16Cn81.js";import{C as o}from"./p-DucILGwe.js";import{d as n}from"./p-XyQhTm0V.js";import{g as t}from"./p-D0IHkGuC.js";const c={};let s="";const u=({form:l})=>{var i,o,n,t;l.addWatcher("vehicle");let u=l.getValue("vehicle"),d=!!u;const v=null===(i=l.context.vehicleList)||void 0===i?void 0:i.find((e=>e.value===u));let p;v?(p=null===(o=null==v?void 0:v.meta)||void 0===o?void 0:o.image,u=v.value):l.context.vehicleList&&l.context.vehicleList[0]&&(p=null===(t=null===(n=l.context.vehicleList[0])||void 0===n?void 0:n.meta)||void 0===t?void 0:t.image,u=l.context.vehicleList[0].value);let g=!1;return c[u]?s=c[u]:l&&p&&u&&(((e,l,a)=>{fetch(l).then((e=>e.blob())).then((l=>{const i=new FileReader;i.onloadend=()=>{c[a]=i.result,e.rerender({rerenderForm:!0})},i.readAsDataURL(l)})).catch((e=>{console.log(e)}))})(l,p,u),g=!0),e("flexible-container",{isOpened:d},e("div",{style:{"min-height":"60px"},part:"vehicle-image-wrapper",class:r("vehicle-image-wrapper",{loading:g})},e("div",{part:r("vehicle-image-loading-wrapper",{"vehicle-image-active-loading-wrapper":g}),class:r("loading-wrapper vehicle-image-loading-wrapper",{"vehicle-image-active-loading-wrapper":g})},e(a,{part:"vehicle-image-loader-icon",class:"img vehicle-image-loader-icon"})),e("img",{alt:"vehicle image",part:"vehicle-image",src:s,style:{"border-radius":"6px",transition:"opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);",opacity:g?"0":"1"}})))},d=(a,r={})=>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(u,{form:l}),phone:({props:l,isLoading:r})=>(a.phoneValidator||(a.phoneValidator=i((null==l?void 0:l.countryCode)||"")),e("form-phone-number",Object.assign({defaultValue:a.phoneValidator.default},l,{isLoading:r,validator:a.phoneValidator}))),vehicle:({language:l,props:a})=>e("form-select",Object.assign({},a,{searchable:!0,fetcher:async({signal:e,context:i})=>{var r,o;let n=null===(r=new URLSearchParams(window.location.search).get(null==a?void 0:a.vehicleIdQueryParam)||"")||void 0===r?void 0:r.toLowerCase();const c=a.vehicleApi,s=await fetch(c,{signal:e,headers:{"Accept-Language":l}});let u,d=-1;return(null==a?void 0:a.dynamic)?(u=((e,l)=>{const a=[];return t(e,l.items).forEach((e=>{const i=t(e,l["item-value"]),r=t(e,l["item-label"]),o={value:(null==l?void 0:l.useNamedValue)?r:i,label:r};o.meta=Object.assign({},e),a.push(o)})),a})(await s.json(),a),u.forEach(((e,l)=>{var i,r;a.defaultValue||!n||(null===(i=null==e?void 0:e.label)||void 0===i?void 0:i.toLowerCase())!==n&&(null===(r=`${e.value}`)||void 0===r?void 0:r.toLowerCase())!==n||(d=l)}))):(null==a?void 0:a.vehiclesApiStrapiFormat)?(u=(await s.json()).data,u=u.map(((e,l)=>{var i,r,o;return a.defaultValue||!n||(null===(i=null==e?void 0:e.GradeName)||void 0===i?void 0:i.toLowerCase())!==n&&(null===(r=`${e.id}`)||void 0===r?void 0:r.toLowerCase())!==n||(d=l),{label:e.attributes.GradeName,value:(null==a?void 0:a.useNamedValue)?`${null===(o=null==e?void 0:e.attributes)||void 0===o?void 0:o.GradeName}`:`${e.id}`,meta:Object.assign(Object.assign({},e),{image:e.attributes.Cover.data.attributes.url})}}))):(u=await s.json(),u=u.map(((e,l)=>{var i,r;return a.defaultValue||!n||(null===(i=null==e?void 0:e.Title)||void 0===i?void 0:i.toLowerCase())!==n&&(null===(r=`${e.ID}`)||void 0===r?void 0:r.toLowerCase())!==n||(d=l),{label:e.Title,value:(null==a?void 0:a.useNamedValue)?`${e.Title}`:`${e.ID}`,meta:Object.assign(Object.assign({},e),{image:e.Image})}}))),i.defaultValue=(null==a?void 0:a.defaultValue)?null==a?void 0:a.defaultValue:d>-1?null===(o=u[d])||void 0===o?void 0:o.value:"",u},language:l})),companyBranchId:({language:l,props:a})=>e("form-select",Object.assign({},a,{clearable:!0,searchable:!0,fetcher:async({signal:e})=>{const i=null==a?void 0:a.branchApi,r=await fetch(i,{signal:e,headers:{"Accept-Language":l}});return(await r.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 i=null==a?void 0:a.cityApi,r=await fetch(i,{signal:e,headers:{"Accept-Language":l}});return(await r.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(o,null)})),time:({language:a,props:i})=>e("form-select",Object.assign({},i,{clearable:!0,fetcher:async()=>{const e=[];if(Array.isArray(i.span)&&Array.isArray(i.min)&&Array.isArray(i.max)&&i.format){let a=n({offsets:i.min}),r=n({offsets:i.max});for(;l.isBefore(a,r)||l.isEqual(a,r);)e.push({value:l.format(a,i.format),label:l.format(a,i.format)}),a=n({offsets:i.span,date:a})}return e},language:a})),currentVehicleBrand:({form:l,language:a,props:i,locale:r})=>e("form-select",Object.assign({},i,{searchable:!0,fetcher:async({signal:e})=>{var a;const i=null===(a=l.context.structure)||void 0===a?void 0:a.data.currentVehiclesApi,o=await fetch(i,{signal:e,headers:{"Accept-Language":"en"}});return[...(await o.json()).filter((e=>"Other"!==e.name)).map((e=>({label:e.Name,value:`${e.ID}`,meta:Object.assign({},e)}))),{value:"Other",label:r.Other}]},language:a})),currentVehicleModel:({form:l,language:a,props:i,locale:r})=>{l.addWatcher("currentVehicleBrand");const o=null==l?void 0:l.getValue("currentVehicleBrand");return e("form-select",Object.assign({},i,{searchable:!0,fetcher:async({})=>{var e,a;if(!o)return[];const i=null===(a=null===(e=l.context.currentVehicleBrandList)||void 0===e?void 0:e.find((e=>e.value===o)))||void 0===a?void 0:a.meta;return i?[...null==i?void 0:i.Models.map((e=>({label:e.Name,value:`${e.ID}`}))),{value:"Other",label:r.Other}]:[]},language:a,resetKey:o,fetcherKey:o,isRequired:"Other"!==o,isDisabled:!o||"Other"===o}))},ownVehicle:({language:l,props:a})=>e("form-select",Object.assign({},a,{fetcher:async({})=>{var e,i,r,o;return[{value:"yes",label:null===(i=null===(e=null==a?void 0:a.localization)||void 0===e?void 0:e[l])||void 0===i?void 0:i.yes},{value:"no",label:null===(o=null===(r=null==a?void 0:a.localization)||void 0===r?void 0:r[l])||void 0===o?void 0:o.no}]},language:l})),conditionalCurrentVehicleBrand:({form:l,language:a,props:i,locale:r})=>{l.addWatcher("ownVehicle");const o="yes"===(null==l?void 0:l.getValue("ownVehicle"));return e("form-select",Object.assign({},i,{searchable:!0,fetcher:async({signal:e})=>{const l=null==i?void 0:i.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==i?void 0:i.useNamedValue)?e.Name:`${e.ID}`,meta:Object.assign({},e)}))),{value:"Other",label:r.Other}]},language:a,resetKey:o,isRequired:o,isDisabled:!o}))},conditionalCurrentVehicleModel:({form:l,language:a,props:i,locale:r})=>{l.addWatcher("ownVehicle"),l.addWatcher("conditionalCurrentVehicleBrand");const o="yes"===(null==l?void 0:l.getValue("ownVehicle")),n=null==l?void 0:l.getValue("conditionalCurrentVehicleBrand");return e("form-select",Object.assign({},i,{searchable:!0,fetcher:async({})=>{var e,a;if(!n)return[];const o=null===(a=null===(e=l.context.conditionalCurrentVehicleBrandList)||void 0===e?void 0:e.find((e=>e.value===n)))||void 0===a?void 0:a.meta;return o?[...null==o?void 0:o.Models.map((e=>({label:e.Name,value:(null==i?void 0:i.useNamedValue)?e.Name:`${e.ID}`}))),{value:"Other",label:r.Other}]:[]},language:a,resetKey:n,fetcherKey:n,isRequired:o&&"Other"!==n,isDisabled:!n||"Other"===n}))}},r),v=()=>({phoneValidator:void 0});export{v as a,d as g}
|