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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by ShiftSoftware
|
|
3
|
+
* Copyright (c)
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
var validation = require('./validation-DEdJb-KL.js');
|
|
8
|
+
var getNestedValue = require('./get-nested-value-lW6t7V4I.js');
|
|
9
|
+
|
|
10
|
+
const getInputLocalization = (context, meta, errorMessage) => {
|
|
11
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
12
|
+
const [locale, language] = (_a = context === null || context === void 0 ? void 0 : context.form) === null || _a === void 0 ? void 0 : _a.getFormLocale();
|
|
13
|
+
const label = ((_c = (_b = context === null || context === void 0 ? void 0 : context.localization) === null || _b === void 0 ? void 0 : _b[language]) === null || _c === void 0 ? void 0 : _c.label) || getNestedValue.getNestedValue(locale, meta === null || meta === void 0 ? void 0 : meta.label) || (meta === null || meta === void 0 ? void 0 : meta.label);
|
|
14
|
+
const placeholder = ((_e = (_d = context === null || context === void 0 ? void 0 : context.localization) === null || _d === void 0 ? void 0 : _d[language]) === null || _e === void 0 ? void 0 : _e.placeholder) || getNestedValue.getNestedValue(locale, meta === null || meta === void 0 ? void 0 : meta.placeholder) || (meta === null || meta === void 0 ? void 0 : meta.placeholder);
|
|
15
|
+
let localizationErrorMessage = '';
|
|
16
|
+
if (errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.endsWith(validation.y.format('')))
|
|
17
|
+
localizationErrorMessage = (_g = (_f = context === null || context === void 0 ? void 0 : context.localization) === null || _f === void 0 ? void 0 : _f[language]) === null || _g === void 0 ? void 0 : _g.format;
|
|
18
|
+
else if (errorMessage === null || errorMessage === void 0 ? void 0 : errorMessage.endsWith(validation.y.require('')))
|
|
19
|
+
localizationErrorMessage = (_j = (_h = context === null || context === void 0 ? void 0 : context.localization) === null || _h === void 0 ? void 0 : _h[language]) === null || _j === void 0 ? void 0 : _j.require;
|
|
20
|
+
else if (errorMessage === 'minMessage')
|
|
21
|
+
localizationErrorMessage = context === null || context === void 0 ? void 0 : context.withSlots(((_l = (_k = context === null || context === void 0 ? void 0 : context.localization) === null || _k === void 0 ? void 0 : _k[language]) === null || _l === void 0 ? void 0 : _l.minMessage) || 'Min date is $minDate$');
|
|
22
|
+
else if (errorMessage === 'maxMessage')
|
|
23
|
+
localizationErrorMessage = context === null || context === void 0 ? void 0 : context.withSlots(((_o = (_m = context === null || context === void 0 ? void 0 : context.localization) === null || _m === void 0 ? void 0 : _m[language]) === null || _o === void 0 ? void 0 : _o.maxMessage) || 'Max date is $maxDate$');
|
|
24
|
+
else if (errorMessage === 'betweenMessage')
|
|
25
|
+
localizationErrorMessage = context === null || context === void 0 ? void 0 : context.withSlots(((_q = (_p = context === null || context === void 0 ? void 0 : context.localization) === null || _p === void 0 ? void 0 : _p[language]) === null || _q === void 0 ? void 0 : _q.betweenMessage) || 'Must be between $minDate$ and $maxDate$');
|
|
26
|
+
const errorTextMessage = localizationErrorMessage || locale[errorMessage] || errorMessage;
|
|
27
|
+
return { label, placeholder, errorTextMessage };
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.getInputLocalization = getInputLocalization;
|