adp-web-components 0.1.59 → 0.1.60
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 +7 -6
- package/dist/cjs/flexible-container.cjs.entry.js +1 -1
- package/dist/cjs/form-checkbox.cjs.entry.js +9 -5
- package/dist/cjs/form-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/form-dialog_8.cjs.entry.js +40 -36
- package/dist/cjs/{form-error-message-CrGiKsoO.js → form-error-message-B2s83XoL.js} +1 -1
- package/dist/cjs/form-input-BZp9_abd.js +24 -0
- package/dist/cjs/form-input_4.cjs.entry.js +24 -18
- package/dist/cjs/form-switch.cjs.entry.js +9 -5
- package/dist/cjs/form-time-picker.cjs.entry.js +2 -2
- package/dist/cjs/general-inquiry-form.cjs.entry.js +24 -22
- package/dist/cjs/get-local-language-DV1oVchQ.js +194 -0
- package/dist/cjs/information-table.cjs.entry.js +1 -1
- package/dist/cjs/{loader-icon-qrSyqpQO.js → loader-icon-OTnFBvzm.js} +1150 -263
- 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 +8 -7
- package/dist/cjs/part-lookup.cjs.entry.js +6 -5
- package/dist/cjs/service-booking-form.cjs.entry.js +11 -9
- 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 +11 -9
- package/dist/cjs/state-object-DFBHdqbr.js +172 -0
- package/dist/cjs/test-drive-form.cjs.entry.js +11 -9
- package/dist/cjs/{type-BqNpIYcE.js → type-BSH0OxyO.js} +3 -3
- package/dist/cjs/{type-B8LchmnL.js → type-BvWomz0N.js} +2 -2
- package/dist/cjs/{type-BrzZ5GMr.js → type-NRLY9OsL.js} +9 -9
- package/dist/cjs/{get-local-language-CMptyFxH.js → types-B3WMBBhs.js} +4 -187
- package/dist/cjs/validation-BxmICJwK.js +89 -0
- package/dist/cjs/vehicle-accessories_7.cjs.entry.js +18 -17
- package/dist/cjs/vehicle-lookup.cjs.entry.js +6 -5
- package/dist/cjs/vehicle-quotation-form.cjs.entry.js +15 -14
- package/dist/collection/collection-manifest.json +1 -1
- 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-tab-content.css +1 -1
- package/dist/collection/components/components/shift-tabs.css +1 -1
- package/dist/collection/components/form-elements/components/form-error-message.js +1 -1
- package/dist/collection/components/form-elements/form-checkbox.js +29 -4
- package/dist/collection/components/form-elements/form-input.js +30 -5
- package/dist/collection/components/form-elements/form-inputs.css +1 -1
- package/dist/collection/components/form-elements/form-phone-number.js +30 -5
- package/dist/collection/components/form-elements/form-picker-input.js +30 -5
- package/dist/collection/components/form-elements/form-select.js +30 -4
- package/dist/collection/components/form-elements/form-submit.js +31 -4
- package/dist/collection/components/form-elements/form-switch.js +29 -4
- package/dist/collection/components/form-elements/form-text-area.js +32 -6
- package/dist/collection/components/form-elements/form-vin-input.js +53 -9
- package/dist/collection/components/forms/defaults/mappers.js +58 -46
- package/dist/collection/components/forms/defaults/style.css +1 -1
- package/dist/collection/components/forms/defaults/validation.js +73 -75
- package/dist/collection/components/forms/general-inquiry.js +20 -20
- package/dist/collection/components/forms/service-booking.js +6 -7
- package/dist/collection/components/forms/ssc-lookup.js +6 -7
- package/dist/collection/components/forms/test-drive.js +6 -7
- 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-item-claim-form.js +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/components/vin-extractor/vin-extractor.css +1 -1
- package/dist/collection/features/form-hook/functions.js +14 -10
- package/dist/collection/features/form-hook/inputs/form-input.js +19 -1
- package/dist/collection/features/form-hook/render-structure.js +1 -1
- 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--ZWu5kfe.js +5 -0
- package/dist/components/p-3o70TTPM.js +5 -0
- package/dist/components/p-9Jshpnf4.js +5 -0
- package/dist/components/{p-CwQEFAEF.js → p-B6mLLQ5Z.js} +1 -1
- package/dist/components/p-B6yxFkGn.js +5 -0
- package/dist/components/{p-CHdx52dw.js → p-BFvKdyvP.js} +1 -1
- package/dist/components/p-BMqwfA7R.js +5 -0
- package/dist/components/p-BNfiYxny.js +5 -0
- package/dist/components/{p-BsFKuBtC.js → p-BPtyEnCf.js} +1 -1
- package/dist/components/p-BW74FG6u.js +5 -0
- package/dist/components/p-Bau2XePf.js +5 -0
- package/dist/components/p-BnRsfejo.js +5 -0
- package/dist/components/p-BrEz2vz_.js +5 -0
- package/dist/components/p-C9lmL_jC.js +5 -0
- package/dist/components/p-CD_2-fK9.js +5 -0
- package/dist/components/{p-CRhdQvF0.js → p-CGKHe5aV.js} +1 -1
- package/dist/components/p-CL_w2QQD.js +5 -0
- package/dist/components/p-CTnFqaoj.js +5 -0
- package/dist/components/{p-D930Q75B.js → p-ChgSU1Ua.js} +1 -1
- package/dist/components/{p-DqNmAqS_.js → p-CiwfnrB-.js} +1 -1
- package/dist/components/p-Crd-9v2B.js +5 -0
- package/dist/components/{p-CBXAxKky.js → p-Cu6cHcY1.js} +1 -1
- package/dist/components/p-CzffKzcR.js +5 -0
- package/dist/components/{p-7y7dFWS-.js → p-D39ljWpy.js} +1 -1
- package/dist/components/p-DLBJDU-Z.js +5 -0
- package/dist/components/p-DVOFEN__.js +5 -0
- package/dist/components/p-DW9tnza0.js +5 -0
- package/dist/components/p-DXV8vbHa.js +5 -0
- package/dist/components/{p-B_QEyJOO.js → p-DYUVoVJU.js} +1 -1
- package/dist/components/p-Dbq3Z3a7.js +5 -0
- package/dist/components/p-DodX8HCB.js +5 -0
- package/dist/components/p-Dq5EPmKC.js +5 -0
- package/dist/components/{p-DJaWpqrV.js → p-DvwR_CeT.js} +1 -1
- package/dist/components/p-GjSy7W7d.js +5 -0
- package/dist/components/p-KrwBOds5.js +5 -0
- package/dist/components/p-VJzNTmbc.js +5 -0
- package/dist/components/p-to4xqGcM.js +5 -0
- package/dist/components/p-vJNV_Y5G.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-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/components/vin-extractor.js +1 -1
- package/dist/esm/dead-stock-lookup_3.entry.js +4 -3
- package/dist/esm/flexible-container.entry.js +1 -1
- package/dist/esm/form-checkbox.entry.js +9 -5
- package/dist/esm/form-date-picker.entry.js +2 -2
- package/dist/esm/form-dialog_8.entry.js +37 -33
- package/dist/esm/{form-error-message-BRYZJjPy.js → form-error-message-C4gzgw8C.js} +1 -1
- package/dist/esm/form-input-DRd-doY1.js +22 -0
- package/dist/esm/form-input_4.entry.js +24 -18
- package/dist/esm/form-switch.entry.js +9 -5
- package/dist/esm/form-time-picker.entry.js +2 -2
- package/dist/esm/general-inquiry-form.entry.js +24 -22
- package/dist/esm/get-local-language-DJl5eWCY.js +189 -0
- package/dist/esm/information-table.entry.js +1 -1
- package/dist/esm/{loader-icon-DhBPTC5g.js → loader-icon-DUMSCofl.js} +1150 -263
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-spinner.entry.js +1 -1
- package/dist/esm/manufacturer-part-lookup.entry.js +3 -2
- package/dist/esm/part-lookup.entry.js +4 -3
- package/dist/esm/service-booking-form.entry.js +11 -9
- 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 +10 -8
- package/dist/esm/state-object-D7JLK2vI.js +169 -0
- package/dist/esm/test-drive-form.entry.js +10 -8
- package/dist/esm/{type-BluG_k1P.js → type-BJF9x4jt.js} +1 -1
- package/dist/esm/{type-D_rpjbuj.js → type-TpJOuSTQ.js} +1 -1
- package/dist/esm/{type-zroDKO0U.js → type-r4cI4JJY.js} +1 -1
- package/dist/esm/{get-local-language-CCj6E27L.js → types-Cn7YOi83.js} +1 -184
- package/dist/esm/validation-BsxDkThF.js +86 -0
- package/dist/esm/vehicle-accessories_7.entry.js +10 -9
- package/dist/esm/vehicle-lookup.entry.js +4 -3
- package/dist/esm/vehicle-quotation-form.entry.js +3 -2
- package/dist/shift-components/{p-d7da1152.entry.js → p-16e95508.entry.js} +1 -1
- package/dist/shift-components/{p-2fe3538e.entry.js → p-2c9950cc.entry.js} +1 -1
- package/dist/shift-components/p-380144df.entry.js +5 -0
- package/dist/shift-components/p-3853ea20.entry.js +5 -0
- package/dist/shift-components/{p-0e630c66.entry.js → p-3a91a272.entry.js} +1 -1
- package/dist/shift-components/{p-b4231e50.entry.js → p-5b587a6a.entry.js} +1 -1
- package/dist/shift-components/p-694d921f.entry.js +5 -0
- package/dist/shift-components/p-8a97341b.entry.js +5 -0
- package/dist/shift-components/p-8e6d183e.entry.js +5 -0
- package/dist/shift-components/p-98b10e49.entry.js +5 -0
- package/dist/shift-components/p-B-Ttz-dC.js +5 -0
- package/dist/shift-components/p-BUbNT08a.js +5 -0
- package/dist/shift-components/p-B_8bnsuC.js +5 -0
- package/dist/shift-components/{p-Bfkguwb-.js → p-B_HWC4v3.js} +1 -1
- package/dist/shift-components/p-Cn7YOi83.js +5 -0
- package/dist/shift-components/{p-B-8v_CQL.js → p-CpygzMlx.js} +1 -1
- package/dist/shift-components/p-DDiSIFiM.js +5 -0
- package/dist/shift-components/p-a9ee64a7.entry.js +5 -0
- package/dist/shift-components/p-aa72cb3d.entry.js +5 -0
- package/dist/shift-components/p-aae6a6e7.entry.js +5 -0
- package/dist/shift-components/p-bea5d49e.entry.js +5 -0
- package/dist/shift-components/p-c61723de.entry.js +5 -0
- package/dist/shift-components/p-cb348218.entry.js +5 -0
- package/dist/shift-components/{p-0a728fec.entry.js → p-d09cd43d.entry.js} +1 -1
- package/dist/shift-components/p-d1543879.entry.js +5 -0
- package/dist/shift-components/{p-f4914abc.entry.js → p-d7bb6f3a.entry.js} +1 -1
- package/dist/shift-components/{p-BW6seqLB.js → p-det1AUh4.js} +1 -1
- package/dist/shift-components/p-e4b69987.entry.js +5 -0
- package/dist/shift-components/p-eed5e111.entry.js +5 -0
- package/dist/shift-components/p-fd48f8b4.entry.js +5 -0
- package/dist/shift-components/p-fd626a4f.entry.js +5 -0
- package/dist/shift-components/{p-BK4ZcuiW.js → p-gokv-pzN.js} +1 -1
- package/dist/shift-components/p-nfwRLPgJ.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/form-elements/form-checkbox.d.ts +2 -1
- package/dist/types/components/form-elements/form-input.d.ts +2 -0
- package/dist/types/components/form-elements/form-phone-number.d.ts +2 -1
- package/dist/types/components/form-elements/form-picker-input.d.ts +2 -0
- package/dist/types/components/form-elements/form-select.d.ts +2 -1
- package/dist/types/components/form-elements/form-submit.d.ts +2 -1
- package/dist/types/components/form-elements/form-switch.d.ts +2 -1
- package/dist/types/components/form-elements/form-text-area.d.ts +2 -1
- package/dist/types/components/form-elements/form-vin-input.d.ts +5 -0
- package/dist/types/components/forms/defaults/mappers.d.ts +7 -5
- package/dist/types/components/forms/defaults/validation.d.ts +29 -12
- package/dist/types/components.d.ts +76 -2
- package/dist/types/features/form-hook/inputs/form-input.d.ts +13 -0
- package/dist/types/features/form-hook/inputs/form-select.d.ts +2 -0
- package/dist/types/locales/vehicleLookup/claimableItems/type.d.ts +4 -4
- package/dist/types/locales/vehicleLookup/serviceHistory/type.d.ts +2 -2
- package/dist/types/locales/vehicleLookup/wrapper-type.d.ts +4 -4
- package/package.json +1 -1
- package/dist/cjs/state-object-B_0-oj8G.js +0 -243
- package/dist/collection/components/forms/service-booking/element-mapper.js +0 -134
- package/dist/collection/components/forms/service-booking/validations.js +0 -56
- package/dist/components/p-3WjYFbnU.js +0 -5
- package/dist/components/p-64G0Y_tC.js +0 -5
- package/dist/components/p-BEClgvwe.js +0 -5
- package/dist/components/p-BTqv9A1K.js +0 -5
- package/dist/components/p-Bd2-gh8M.js +0 -5
- package/dist/components/p-BffBGA_K.js +0 -5
- package/dist/components/p-Bon4whdT.js +0 -5
- package/dist/components/p-C-4CT4ZF.js +0 -5
- package/dist/components/p-C6WhIy7O.js +0 -5
- package/dist/components/p-CEM5EBP0.js +0 -5
- package/dist/components/p-Cxfsh87m.js +0 -5
- package/dist/components/p-D-tlRZMk.js +0 -5
- package/dist/components/p-DA0taq65.js +0 -5
- package/dist/components/p-DJKERvsE.js +0 -5
- package/dist/components/p-DNn44A0I.js +0 -5
- package/dist/components/p-DdWYx3mw.js +0 -5
- package/dist/components/p-Df56BNKV.js +0 -5
- package/dist/components/p-DjDUhW2q.js +0 -5
- package/dist/components/p-DkA_i--O.js +0 -5
- package/dist/components/p-DuNp8sSh.js +0 -5
- package/dist/components/p-NEl9bwNq.js +0 -5
- package/dist/components/p-RInF2GNQ.js +0 -5
- package/dist/components/p-_C-vBKCe.js +0 -5
- package/dist/components/p-eTLWmtnI.js +0 -5
- package/dist/components/p-vEsQVFLN.js +0 -5
- package/dist/components/p-zofQKKfh.js +0 -5
- package/dist/esm/state-object-Cwph5K2Q.js +0 -238
- package/dist/shift-components/p-0f83786b.entry.js +0 -5
- package/dist/shift-components/p-1c93d5e6.entry.js +0 -5
- package/dist/shift-components/p-26f3e6da.entry.js +0 -5
- package/dist/shift-components/p-3a7196d4.entry.js +0 -5
- package/dist/shift-components/p-45670df9.entry.js +0 -5
- package/dist/shift-components/p-4aa6f707.entry.js +0 -5
- package/dist/shift-components/p-50fd9d29.entry.js +0 -5
- package/dist/shift-components/p-63e1e80e.entry.js +0 -5
- package/dist/shift-components/p-67476178.entry.js +0 -5
- package/dist/shift-components/p-683f3ab3.entry.js +0 -5
- package/dist/shift-components/p-8700e868.entry.js +0 -5
- package/dist/shift-components/p-90a6803f.entry.js +0 -5
- package/dist/shift-components/p-BVMG8UaH.js +0 -5
- package/dist/shift-components/p-BnQp2Q8E.js +0 -5
- package/dist/shift-components/p-C3YLTa2J.js +0 -5
- package/dist/shift-components/p-c7eaf245.entry.js +0 -5
- package/dist/shift-components/p-f7692371.entry.js +0 -5
- package/dist/shift-components/p-f8ac59ee.entry.js +0 -5
- package/dist/shift-components/p-fac0fdb9.entry.js +0 -5
- package/dist/shift-components/p-fe02d5ed.entry.js +0 -5
- package/dist/types/components/forms/service-booking/element-mapper.d.ts +0 -7
- package/dist/types/components/forms/service-booking/validations.d.ts +0 -25
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
6
6
|
|
|
7
|
-
require('./index-CmK48vN3.js');
|
|
8
|
-
|
|
9
7
|
function getDefaultExportFromCjs (x) {
|
|
10
8
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
11
9
|
}
|
|
@@ -2452,194 +2450,13 @@ const languageMapper = {
|
|
|
2452
2450
|
ru: RUSSIAN_JSON_FILE,
|
|
2453
2451
|
};
|
|
2454
2452
|
|
|
2455
|
-
const version = "0.1.59";
|
|
2456
|
-
|
|
2457
|
-
// This file is auto-generated. Do not edit it manually.
|
|
2458
|
-
// Use command: yarn create:locale-mapper
|
|
2459
|
-
// It is generated by the script located at: generate-locale-mapper.mjs
|
|
2460
|
-
const localeMapper = {
|
|
2461
|
-
"-": [
|
|
2462
|
-
"locales/"
|
|
2463
|
-
],
|
|
2464
|
-
"errors": [
|
|
2465
|
-
"locales/errors/"
|
|
2466
|
-
],
|
|
2467
|
-
"forms": [
|
|
2468
|
-
"locales/forms/",
|
|
2469
|
-
"locales/forms/contactUs/",
|
|
2470
|
-
"locales/forms/demo/",
|
|
2471
|
-
"locales/forms/testDriveDemo/",
|
|
2472
|
-
"locales/forms/vehicleQuotation/"
|
|
2473
|
-
],
|
|
2474
|
-
"forms.contactUs": [
|
|
2475
|
-
"locales/forms/contactUs/"
|
|
2476
|
-
],
|
|
2477
|
-
"forms.demo": [
|
|
2478
|
-
"locales/forms/demo/"
|
|
2479
|
-
],
|
|
2480
|
-
"forms.testDriveDemo": [
|
|
2481
|
-
"locales/forms/testDriveDemo/"
|
|
2482
|
-
],
|
|
2483
|
-
"forms.vehicleQuotation": [
|
|
2484
|
-
"locales/forms/vehicleQuotation/"
|
|
2485
|
-
],
|
|
2486
|
-
"general": [
|
|
2487
|
-
"locales/general/"
|
|
2488
|
-
],
|
|
2489
|
-
"generalTicketTypes": [
|
|
2490
|
-
"locales/generalTicketTypes/"
|
|
2491
|
-
],
|
|
2492
|
-
"partLookup.deadStock": [
|
|
2493
|
-
"locales/partLookup/deadStock/"
|
|
2494
|
-
],
|
|
2495
|
-
"partLookup": [
|
|
2496
|
-
"locales/partLookup/deadStock/",
|
|
2497
|
-
"locales/partLookup/distributor/",
|
|
2498
|
-
"locales/partLookup/manufacturer/"
|
|
2499
|
-
],
|
|
2500
|
-
"partLookup.distributor": [
|
|
2501
|
-
"locales/partLookup/distributor/"
|
|
2502
|
-
],
|
|
2503
|
-
"partLookup.manufacturer": [
|
|
2504
|
-
"locales/partLookup/manufacturer/"
|
|
2505
|
-
],
|
|
2506
|
-
"vehicleLookup.accessories": [
|
|
2507
|
-
"locales/vehicleLookup/accessories/"
|
|
2508
|
-
],
|
|
2509
|
-
"vehicleLookup": [
|
|
2510
|
-
"locales/vehicleLookup/accessories/",
|
|
2511
|
-
"locales/vehicleLookup/claimableItems/",
|
|
2512
|
-
"locales/vehicleLookup/paintThickness/",
|
|
2513
|
-
"locales/vehicleLookup/saleInformation/",
|
|
2514
|
-
"locales/vehicleLookup/serviceHistory/",
|
|
2515
|
-
"locales/vehicleLookup/specification/",
|
|
2516
|
-
"locales/vehicleLookup/warranty/"
|
|
2517
|
-
],
|
|
2518
|
-
"vehicleLookup.claimableItems": [
|
|
2519
|
-
"locales/vehicleLookup/claimableItems/"
|
|
2520
|
-
],
|
|
2521
|
-
"vehicleLookup.paintThickness": [
|
|
2522
|
-
"locales/vehicleLookup/paintThickness/"
|
|
2523
|
-
],
|
|
2524
|
-
"vehicleLookup.serviceHistory": [
|
|
2525
|
-
"locales/vehicleLookup/serviceHistory/"
|
|
2526
|
-
],
|
|
2527
|
-
"vehicleLookup.saleInformation": [
|
|
2528
|
-
"locales/vehicleLookup/saleInformation/"
|
|
2529
|
-
],
|
|
2530
|
-
"vehicleLookup.specification": [
|
|
2531
|
-
"locales/vehicleLookup/specification/"
|
|
2532
|
-
],
|
|
2533
|
-
"vehicleLookup.warranty": [
|
|
2534
|
-
"locales/vehicleLookup/warranty/"
|
|
2535
|
-
],
|
|
2536
|
-
"forms*": [
|
|
2537
|
-
"locales/forms/"
|
|
2538
|
-
]
|
|
2539
|
-
};
|
|
2540
|
-
|
|
2541
|
-
const cachedLocales = {};
|
|
2542
|
-
async function getSharedLocal(languageKey) {
|
|
2543
|
-
const [errors, globalKeys] = await Promise.all([getLocaleLanguage(languageKey, 'errors', errorsSchema), getLocaleLanguage(languageKey, '-', globalSchema)]);
|
|
2544
|
-
return Object.assign({ errors }, globalKeys);
|
|
2545
|
-
}
|
|
2546
|
-
async function getSharedFormLocal(languageKey) {
|
|
2547
|
-
const [errors, globalKeys, sharedFormKeys] = await Promise.all([
|
|
2548
|
-
getLocaleLanguage(languageKey, 'errors', errorsSchema),
|
|
2549
|
-
getLocaleLanguage(languageKey, '-', globalSchema),
|
|
2550
|
-
getLocaleLanguage(languageKey, 'forms*', formsSchema),
|
|
2551
|
-
]);
|
|
2552
|
-
return Object.assign(Object.assign(Object.assign({}, globalKeys), sharedFormKeys), errors);
|
|
2553
|
-
}
|
|
2554
|
-
async function getLocaleLanguage(languageKey, component, schema) {
|
|
2555
|
-
const languageFile = languageMapper[languageKey] || languageMapper.en;
|
|
2556
|
-
const localeFiles = localeMapper[component];
|
|
2557
|
-
if (!localeFiles || !localeFiles.length)
|
|
2558
|
-
throw new Error(`Locale file not found for component: ${component}`);
|
|
2559
|
-
if (localeFiles.length === 1) {
|
|
2560
|
-
const localeFile = localeFiles[0] + languageFile;
|
|
2561
|
-
const response = await requestLocaleFile(localeFile);
|
|
2562
|
-
try {
|
|
2563
|
-
schema.validateSync(response, { strict: true, abortEarly: false });
|
|
2564
|
-
}
|
|
2565
|
-
catch (error) {
|
|
2566
|
-
console.error(`Failed to parse locale file: ${localeFile}`);
|
|
2567
|
-
console.error(error);
|
|
2568
|
-
}
|
|
2569
|
-
return response;
|
|
2570
|
-
}
|
|
2571
|
-
else {
|
|
2572
|
-
const localeFilePromises = localeFiles.map(localeFile => requestLocaleFile(localeFile + languageFile));
|
|
2573
|
-
const localeFilesResponses = await Promise.all(localeFilePromises);
|
|
2574
|
-
const responseBluePrint = schema.getDefault();
|
|
2575
|
-
const parsedResponseMapper = {};
|
|
2576
|
-
recursiveParser(component, responseBluePrint, parsedResponseMapper, languageFile);
|
|
2577
|
-
try {
|
|
2578
|
-
schema.validateSync(parsedResponseMapper, { strict: true, abortEarly: false });
|
|
2579
|
-
}
|
|
2580
|
-
catch (error) {
|
|
2581
|
-
console.error(`Failed to parse locale file component: ${component}`);
|
|
2582
|
-
console.error(error);
|
|
2583
|
-
}
|
|
2584
|
-
return localeFilesResponses;
|
|
2585
|
-
}
|
|
2586
|
-
}
|
|
2587
|
-
function isPlainObject(value) {
|
|
2588
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
2589
|
-
}
|
|
2590
|
-
function recursiveParser(parents, bluePrint, parsedResponseMapper, languageFile) {
|
|
2591
|
-
let mappedSelf = false;
|
|
2592
|
-
Object.entries(bluePrint).forEach(([key, value]) => {
|
|
2593
|
-
if (typeof value === 'string' && !mappedSelf) {
|
|
2594
|
-
if (localeMapper[parents]) {
|
|
2595
|
-
const cacheKey = localeMapper[parents][0] + languageFile;
|
|
2596
|
-
if (cachedLocales[cacheKey])
|
|
2597
|
-
Object.assign(parsedResponseMapper, cachedLocales[cacheKey]);
|
|
2598
|
-
}
|
|
2599
|
-
mappedSelf = true;
|
|
2600
|
-
}
|
|
2601
|
-
else if (isPlainObject(value)) {
|
|
2602
|
-
const childMapperKey = parents + '.' + key;
|
|
2603
|
-
const isNestedObject = Object.entries(value).some(([_, nestedValue]) => isPlainObject(nestedValue));
|
|
2604
|
-
if (isNestedObject) {
|
|
2605
|
-
parsedResponseMapper[key] = {};
|
|
2606
|
-
recursiveParser(childMapperKey, value, parsedResponseMapper[key], languageFile);
|
|
2607
|
-
}
|
|
2608
|
-
else if (localeMapper[childMapperKey] && !!localeMapper[childMapperKey].length) {
|
|
2609
|
-
const cacheKey = localeMapper[childMapperKey][0] + languageFile;
|
|
2610
|
-
if (cachedLocales[cacheKey])
|
|
2611
|
-
parsedResponseMapper[key] = cachedLocales[cacheKey];
|
|
2612
|
-
}
|
|
2613
|
-
}
|
|
2614
|
-
});
|
|
2615
|
-
}
|
|
2616
|
-
async function requestLocaleFile(localeFile) {
|
|
2617
|
-
if (cachedLocales[localeFile])
|
|
2618
|
-
return await cachedLocales[localeFile];
|
|
2619
|
-
try {
|
|
2620
|
-
const fetchPromise = (fetch(`https://cdn.jsdelivr.net/npm/adp-web-components@${version}/dist/${localeFile}`)).then(res => {
|
|
2621
|
-
if (!res.ok)
|
|
2622
|
-
delete cachedLocales[localeFile];
|
|
2623
|
-
return res.json();
|
|
2624
|
-
});
|
|
2625
|
-
cachedLocales[localeFile] = fetchPromise;
|
|
2626
|
-
const result = await fetchPromise;
|
|
2627
|
-
cachedLocales[localeFile] = result;
|
|
2628
|
-
return result;
|
|
2629
|
-
}
|
|
2630
|
-
catch (error) {
|
|
2631
|
-
delete cachedLocales[localeFile];
|
|
2632
|
-
return {};
|
|
2633
|
-
}
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
2453
|
exports.create$3 = create$3;
|
|
2637
2454
|
exports.create$5 = create$5;
|
|
2638
2455
|
exports.create$6 = create$6;
|
|
2639
|
-
exports.
|
|
2640
|
-
exports.
|
|
2641
|
-
exports.
|
|
2456
|
+
exports.errorsSchema = errorsSchema;
|
|
2457
|
+
exports.formsSchema = formsSchema;
|
|
2458
|
+
exports.globalSchema = globalSchema;
|
|
2459
|
+
exports.languageMapper = languageMapper;
|
|
2642
2460
|
exports.sharedFormLocalesSchema = sharedFormLocalesSchema;
|
|
2643
2461
|
exports.sharedLocalesSchema = sharedLocalesSchema;
|
|
2644
|
-
exports.version = version;
|
|
2645
2462
|
exports.yupTypeMapper = yupTypeMapper;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by ShiftSoftware
|
|
3
|
+
* Copyright (c)
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
var types = require('./types-B3WMBBhs.js');
|
|
8
|
+
var validateVin = require('./validate-vin-CJDIXpJO.js');
|
|
9
|
+
|
|
10
|
+
const label = (name) => `${name}-label`;
|
|
11
|
+
const format = (name) => `${name}-format`;
|
|
12
|
+
const require$1 = (name) => `${name}-require`;
|
|
13
|
+
const placeholder = (name) => `${name}-placeholder`;
|
|
14
|
+
const meta = (name) => ({ label: label(name), placeholder: placeholder(name) });
|
|
15
|
+
const condition = (name) => `$${name}Required`;
|
|
16
|
+
const y = { label, format, require: require$1, condition, placeholder, meta };
|
|
17
|
+
const getFormValidations = (stateObject, extraFields = {}) => {
|
|
18
|
+
return types.create$3(Object.assign({ name: types.create$6()
|
|
19
|
+
.meta(meta('name'))
|
|
20
|
+
.when(condition('name'), {
|
|
21
|
+
is: true,
|
|
22
|
+
otherwise: schema => schema.optional(),
|
|
23
|
+
then: schema => schema.required(require$1('name')).min(3, format('name')),
|
|
24
|
+
}), lastName: types.create$6()
|
|
25
|
+
.meta(meta('lastName'))
|
|
26
|
+
.when(condition('lastName'), {
|
|
27
|
+
is: true,
|
|
28
|
+
otherwise: schema => schema.optional(),
|
|
29
|
+
then: schema => schema.required(require$1('lastName')).min(3, format('lastName')),
|
|
30
|
+
}), message: types.create$6()
|
|
31
|
+
.meta(meta('message'))
|
|
32
|
+
.when(condition('message'), {
|
|
33
|
+
is: true,
|
|
34
|
+
otherwise: schema => schema.optional(),
|
|
35
|
+
then: schema => schema.required(require$1('message')).min(10, format('message')),
|
|
36
|
+
}), email: types.create$6()
|
|
37
|
+
.meta(meta('email'))
|
|
38
|
+
.when(condition('email'), {
|
|
39
|
+
is: true,
|
|
40
|
+
otherwise: schema => schema.optional(),
|
|
41
|
+
then: schema => schema.required(require$1('email')),
|
|
42
|
+
})
|
|
43
|
+
.email(format('email')), vin: types.create$6()
|
|
44
|
+
.meta(meta('vin'))
|
|
45
|
+
.when(condition('vin'), {
|
|
46
|
+
is: true,
|
|
47
|
+
otherwise: schema => schema.optional(),
|
|
48
|
+
then: schema => schema.required(require$1('vin')).test(format('vin'), format('vin'), a => validateVin.validateVin(a === null || a === void 0 ? void 0 : a.toUpperCase())),
|
|
49
|
+
}), phone: types.create$6()
|
|
50
|
+
.meta(meta('phone'))
|
|
51
|
+
.when(condition('phone'), {
|
|
52
|
+
is: true,
|
|
53
|
+
otherwise: schema => schema.optional(),
|
|
54
|
+
then: schema => schema.required(require$1('phone')).test(format('phone'), format('phone'), () => { var _a; return (_a = stateObject === null || stateObject === void 0 ? void 0 : stateObject.phoneValidator) === null || _a === void 0 ? void 0 : _a.geIsValidPhoneNumber(); }),
|
|
55
|
+
}), vehicle: types.create$6()
|
|
56
|
+
.meta(meta('vehicle'))
|
|
57
|
+
.when(y.condition('vehicle'), {
|
|
58
|
+
is: true,
|
|
59
|
+
otherwise: schema => schema.optional(),
|
|
60
|
+
then: schema => schema.required(y.require('vehicle')),
|
|
61
|
+
}), companyBranchId: types.create$6()
|
|
62
|
+
.meta(meta('companyBranchId'))
|
|
63
|
+
.when(y.condition('companyBranchId'), {
|
|
64
|
+
is: true,
|
|
65
|
+
otherwise: schema => schema.optional(),
|
|
66
|
+
then: schema => schema.required(y.require('companyBranchId')),
|
|
67
|
+
}), cityId: types.create$6()
|
|
68
|
+
.meta(meta('cityId'))
|
|
69
|
+
.when(y.condition('cityId'), {
|
|
70
|
+
is: true,
|
|
71
|
+
otherwise: schema => schema.optional(),
|
|
72
|
+
then: schema => schema.required(y.require('cityId')),
|
|
73
|
+
}), date: types.create$6()
|
|
74
|
+
.meta(meta('date'))
|
|
75
|
+
.when(condition('date'), {
|
|
76
|
+
is: true,
|
|
77
|
+
otherwise: schema => schema.optional(),
|
|
78
|
+
then: schema => schema.required(require$1('date')),
|
|
79
|
+
}), time: types.create$6()
|
|
80
|
+
.meta(meta('time'))
|
|
81
|
+
.when(condition('time'), {
|
|
82
|
+
is: true,
|
|
83
|
+
otherwise: schema => schema.optional(),
|
|
84
|
+
then: schema => schema.required(require$1('time')),
|
|
85
|
+
}) }, extraFields));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.getFormValidations = getFormValidations;
|
|
89
|
+
exports.y = y;
|