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.
Files changed (211) hide show
  1. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +4 -4
  2. package/dist/cjs/flexible-container.cjs.entry.js +1 -1
  3. package/dist/cjs/form-checkbox.cjs.entry.js +2 -2
  4. package/dist/cjs/form-date-picker.cjs.entry.js +1 -1
  5. package/dist/cjs/form-dialog_8.cjs.entry.js +81 -11
  6. package/dist/cjs/form-input-C3gQ_Noj.js +30 -0
  7. package/dist/cjs/form-input_4.cjs.entry.js +5 -5
  8. package/dist/cjs/form-switch.cjs.entry.js +2 -2
  9. package/dist/cjs/form-time-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/general-inquiry-form.cjs.entry.js +4 -4
  11. package/dist/cjs/{get-language-from-url-CfLHbGsq.js → get-language-from-url-DSzX4HQt.js} +28 -2
  12. package/dist/cjs/{get-local-language-CG40OoLK.js → get-local-language-8KMktNqV.js} +1 -1
  13. package/dist/cjs/information-table.cjs.entry.js +1 -1
  14. package/dist/cjs/{loader-icon-CoLnzFJQ.js → loader-icon-Cf3Xs3Kv.js} +2 -2
  15. package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
  16. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +3 -3
  17. package/dist/cjs/part-lookup.cjs.entry.js +2 -2
  18. package/dist/cjs/service-booking-form.cjs.entry.js +4 -4
  19. package/dist/cjs/shift-tab-content.cjs.entry.js +1 -1
  20. package/dist/cjs/shift-tabs_2.cjs.entry.js +2 -2
  21. package/dist/cjs/ssc-lookup-form.cjs.entry.js +4 -4
  22. package/dist/cjs/{state-object-C1OC85SG.js → state-object-BhdQ1vEN.js} +1 -1
  23. package/dist/cjs/test-drive-form.cjs.entry.js +4 -4
  24. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +8 -8
  25. package/dist/cjs/vehicle-lookup.cjs.entry.js +2 -2
  26. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +3 -3
  27. package/dist/collection/components/components/flexible-container.css +1 -1
  28. package/dist/collection/components/components/information-table.css +1 -1
  29. package/dist/collection/components/components/loading-spinner.css +1 -1
  30. package/dist/collection/components/components/shift-tab-content.css +1 -1
  31. package/dist/collection/components/components/shift-tabs.css +1 -1
  32. package/dist/collection/components/form-elements/form-checkbox.js +1 -1
  33. package/dist/collection/components/form-elements/form-input.js +1 -1
  34. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  35. package/dist/collection/components/form-elements/form-phone-number.js +1 -1
  36. package/dist/collection/components/form-elements/form-picker-input.js +74 -4
  37. package/dist/collection/components/form-elements/form-select.js +1 -1
  38. package/dist/collection/components/form-elements/form-submit.js +1 -1
  39. package/dist/collection/components/form-elements/form-switch.js +1 -1
  40. package/dist/collection/components/form-elements/form-text-area.js +1 -1
  41. package/dist/collection/components/form-elements/form-vin-input.js +1 -1
  42. package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
  43. package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
  44. package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
  45. package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
  46. package/dist/collection/components/part-lookup/part-lookup.css +1 -1
  47. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  48. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  49. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  50. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  51. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  52. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  53. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  54. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  55. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  56. package/dist/collection/features/form-hook/form-hook.js +28 -2
  57. package/dist/collection/features/form-hook/inputs/form-input.js +11 -5
  58. package/dist/components/dead-stock-lookup.js +1 -1
  59. package/dist/components/distributor-lookup.js +1 -1
  60. package/dist/components/flexible-container.js +1 -1
  61. package/dist/components/form-checkbox.js +1 -1
  62. package/dist/components/form-date-picker.js +1 -1
  63. package/dist/components/form-dialog.js +1 -1
  64. package/dist/components/form-input.js +1 -1
  65. package/dist/components/form-phone-number.js +1 -1
  66. package/dist/components/form-picker-input.js +1 -1
  67. package/dist/components/form-select.js +1 -1
  68. package/dist/components/form-shadow-input.js +1 -1
  69. package/dist/components/form-structure-error.js +1 -1
  70. package/dist/components/form-structure.js +1 -1
  71. package/dist/components/form-submit.js +1 -1
  72. package/dist/components/form-switch.js +1 -1
  73. package/dist/components/form-text-area.js +1 -1
  74. package/dist/components/form-time-picker.js +1 -1
  75. package/dist/components/form-vin-input.js +1 -1
  76. package/dist/components/general-inquiry-form.js +1 -1
  77. package/dist/components/information-table.js +1 -1
  78. package/dist/components/loading-spinner.js +1 -1
  79. package/dist/components/manufacturer-lookup.js +1 -1
  80. package/dist/components/manufacturer-part-lookup.js +1 -1
  81. package/dist/components/p-B7jki48I.js +5 -0
  82. package/dist/components/{p-DBPcMct2.js → p-BP80WvAz.js} +1 -1
  83. package/dist/components/{p-36-IaSKm.js → p-BQtb1fok.js} +1 -1
  84. package/dist/components/{p-Cjj1G4D2.js → p-BuKy7Rx0.js} +1 -1
  85. package/dist/components/{p-A7iMsEel.js → p-BuP_DwlH.js} +1 -1
  86. package/dist/components/{p-5agmhwm7.js → p-Bxru3K95.js} +1 -1
  87. package/dist/components/{p-DnkuFboF.js → p-C1siXH7Y.js} +1 -1
  88. package/dist/components/{p-DRb1hBHP.js → p-C2aeZGeT.js} +1 -1
  89. package/dist/components/p-CAxrIdkp.js +5 -0
  90. package/dist/components/p-CDTvzwTY.js +5 -0
  91. package/dist/components/{p-D0XGI6mk.js → p-CG-zovra.js} +1 -1
  92. package/dist/components/{p-C6hyNnHw.js → p-CKI3aAYE.js} +1 -1
  93. package/dist/components/p-CO1nZnKO.js +5 -0
  94. package/dist/components/p-CU0-hVft.js +5 -0
  95. package/dist/components/{p-BPrc_-Uw.js → p-CUBMSqcx.js} +1 -1
  96. package/dist/components/{p-DpfBI1eP.js → p-CasPml7B.js} +1 -1
  97. package/dist/components/{p-clgmN8l6.js → p-CcLFnUSS.js} +1 -1
  98. package/dist/components/{p-D4rNtEH9.js → p-Cekl00HW.js} +1 -1
  99. package/dist/components/p-CkzCdQDi.js +5 -0
  100. package/dist/components/{p-DppYpL5T.js → p-D3RWScgO.js} +1 -1
  101. package/dist/components/{p-DsFbXACB.js → p-DACKk-aI.js} +1 -1
  102. package/dist/components/p-DAOqnjKo.js +5 -0
  103. package/dist/components/p-DC9JViaQ.js +5 -0
  104. package/dist/components/{p-BkRUZTAo.js → p-DPN4YeOb.js} +1 -1
  105. package/dist/components/{p-CrUnNyzK.js → p-DWp-GWu1.js} +1 -1
  106. package/dist/components/{p-D3aoGLFX.js → p-DZWy-asx.js} +1 -1
  107. package/dist/components/{p-Cz2GJXgI.js → p-DeNo_PJi.js} +1 -1
  108. package/dist/components/{p-Bgg84Jga.js → p-Dk1orRQl.js} +1 -1
  109. package/dist/components/p-Dlrjtovg.js +5 -0
  110. package/dist/components/{p-aJdysKHK.js → p-EKpRGPLQ.js} +1 -1
  111. package/dist/components/{p-DTYO6O3a.js → p-NSqEj65Q.js} +1 -1
  112. package/dist/components/p-Oy02T-n-.js +5 -0
  113. package/dist/components/{p-BXt8N0qj.js → p-elqvs8Bp.js} +1 -1
  114. package/dist/components/p-jTYPnZnQ.js +5 -0
  115. package/dist/components/part-lookup.js +1 -1
  116. package/dist/components/service-booking-form.js +1 -1
  117. package/dist/components/shift-accordion.js +1 -1
  118. package/dist/components/shift-slider.js +1 -1
  119. package/dist/components/shift-tab-content.js +1 -1
  120. package/dist/components/shift-tabs.js +1 -1
  121. package/dist/components/ssc-lookup-form.js +1 -1
  122. package/dist/components/test-drive-form.js +1 -1
  123. package/dist/components/vehicle-accessories.js +1 -1
  124. package/dist/components/vehicle-claimable-items.js +1 -1
  125. package/dist/components/vehicle-item-claim-form.js +1 -1
  126. package/dist/components/vehicle-lookup.js +1 -1
  127. package/dist/components/vehicle-paint-thickness.js +1 -1
  128. package/dist/components/vehicle-quotation-form.js +1 -1
  129. package/dist/components/vehicle-sale-information.js +1 -1
  130. package/dist/components/vehicle-service-history.js +1 -1
  131. package/dist/components/vehicle-specification.js +1 -1
  132. package/dist/components/vehicle-warranty-details.js +1 -1
  133. package/dist/esm/dead-stock-lookup_3.entry.js +4 -4
  134. package/dist/esm/flexible-container.entry.js +1 -1
  135. package/dist/esm/form-checkbox.entry.js +2 -2
  136. package/dist/esm/form-date-picker.entry.js +1 -1
  137. package/dist/esm/form-dialog_8.entry.js +81 -11
  138. package/dist/esm/form-input-C5O2h7ti.js +28 -0
  139. package/dist/esm/form-input_4.entry.js +5 -5
  140. package/dist/esm/form-switch.entry.js +2 -2
  141. package/dist/esm/form-time-picker.entry.js +1 -1
  142. package/dist/esm/general-inquiry-form.entry.js +4 -4
  143. package/dist/esm/{get-language-from-url-DS2wH9wf.js → get-language-from-url-WEiw5juk.js} +28 -2
  144. package/dist/esm/{get-local-language-VdAZpG-2.js → get-local-language-B8070P5r.js} +1 -1
  145. package/dist/esm/information-table.entry.js +1 -1
  146. package/dist/esm/{loader-icon-QHxzLM80.js → loader-icon-Bdlakq4b.js} +2 -2
  147. package/dist/esm/loading-spinner.entry.js +1 -1
  148. package/dist/esm/manufacturer-part-lookup.entry.js +3 -3
  149. package/dist/esm/part-lookup.entry.js +2 -2
  150. package/dist/esm/service-booking-form.entry.js +4 -4
  151. package/dist/esm/shift-tab-content.entry.js +1 -1
  152. package/dist/esm/shift-tabs_2.entry.js +2 -2
  153. package/dist/esm/ssc-lookup-form.entry.js +4 -4
  154. package/dist/esm/{state-object-B5sDOkr3.js → state-object-CmzxAD3a.js} +1 -1
  155. package/dist/esm/test-drive-form.entry.js +4 -4
  156. package/dist/esm/vehicle-accessories_7.entry.js +8 -8
  157. package/dist/esm/vehicle-lookup.entry.js +2 -2
  158. package/dist/esm/vehicle-quotation-form.entry.js +3 -3
  159. package/dist/shift-components/{p-bac28415.entry.js → p-0cd22be9.entry.js} +1 -1
  160. package/dist/shift-components/{p-caed63eb.entry.js → p-1103449e.entry.js} +1 -1
  161. package/dist/shift-components/{p-1eb4562c.entry.js → p-15af4b62.entry.js} +1 -1
  162. package/dist/shift-components/{p-82d7784e.entry.js → p-220ce6f0.entry.js} +1 -1
  163. package/dist/shift-components/p-2af694b2.entry.js +5 -0
  164. package/dist/shift-components/{p-3c07dae0.entry.js → p-314e6be5.entry.js} +1 -1
  165. package/dist/shift-components/p-42e06b24.entry.js +5 -0
  166. package/dist/shift-components/{p-aab59b34.entry.js → p-4aaeb37f.entry.js} +1 -1
  167. package/dist/shift-components/{p-6035ad7f.entry.js → p-5caec752.entry.js} +1 -1
  168. package/dist/shift-components/{p-5d6ca023.entry.js → p-601b2a59.entry.js} +1 -1
  169. package/dist/shift-components/p-6685c185.entry.js +5 -0
  170. package/dist/shift-components/{p-69a9617b.entry.js → p-7cbe4db3.entry.js} +1 -1
  171. package/dist/shift-components/p-8512615f.entry.js +5 -0
  172. package/dist/shift-components/{p-4ca85ba8.entry.js → p-89bb047b.entry.js} +1 -1
  173. package/dist/shift-components/{p-59296309.entry.js → p-99ba86c6.entry.js} +1 -1
  174. package/dist/shift-components/p-Bp-HDfJB.js +5 -0
  175. package/dist/shift-components/{p-BqVN5MXa.js → p-DO0hHkF_.js} +1 -1
  176. package/dist/shift-components/{p-D43Y2KJZ.js → p-DOQtgS4h.js} +1 -1
  177. package/dist/shift-components/{p-CYuX6By7.js → p-DPETJEMv.js} +1 -1
  178. package/dist/shift-components/{p-7a9dc564.entry.js → p-a4c7d4c9.entry.js} +1 -1
  179. package/dist/shift-components/p-a56e2de9.entry.js +5 -0
  180. package/dist/shift-components/{p-bc928bcf.entry.js → p-ba318357.entry.js} +1 -1
  181. package/dist/shift-components/p-d4c5e30d.entry.js +5 -0
  182. package/dist/shift-components/{p-82cc9e0d.entry.js → p-d51df697.entry.js} +1 -1
  183. package/dist/shift-components/{p-35e4059b.entry.js → p-f21ceea0.entry.js} +1 -1
  184. package/dist/shift-components/p-no7IC1jn.js +5 -0
  185. package/dist/shift-components/shift-components.esm.js +1 -1
  186. package/dist/types/components/form-elements/form-picker-input.d.ts +5 -0
  187. package/dist/types/features/form-hook/form-hook.d.ts +3 -5
  188. package/dist/types/features/form-hook/inputs/form-input.d.ts +3 -0
  189. package/dist/types/features/form-hook/interface.d.ts +3 -0
  190. package/package.json +1 -1
  191. package/dist/cjs/form-input-D5dWFwoN.js +0 -24
  192. package/dist/components/p-78hsxToT.js +0 -5
  193. package/dist/components/p-B1K4fRUA.js +0 -5
  194. package/dist/components/p-C7H6IjZ0.js +0 -5
  195. package/dist/components/p-D205nHLN.js +0 -5
  196. package/dist/components/p-DZ29hUTN.js +0 -5
  197. package/dist/components/p-Di7kQptP.js +0 -5
  198. package/dist/components/p-DzJYZ-yg.js +0 -5
  199. package/dist/components/p-K0JAT1Gz.js +0 -5
  200. package/dist/components/p-e7OMZxZr.js +0 -5
  201. package/dist/components/p-rAxWdX54.js +0 -5
  202. package/dist/components/p-v09Fe7HV.js +0 -5
  203. package/dist/esm/form-input-qOEP7NyE.js +0 -22
  204. package/dist/shift-components/p-2b8d01e8.entry.js +0 -5
  205. package/dist/shift-components/p-3ab64036.entry.js +0 -5
  206. package/dist/shift-components/p-5e1772f7.entry.js +0 -5
  207. package/dist/shift-components/p-6ab35401.entry.js +0 -5
  208. package/dist/shift-components/p-BtuVI_PX.js +0 -5
  209. package/dist/shift-components/p-DgUKb8cO.js +0 -5
  210. package/dist/shift-components/p-aa5fbfe8.entry.js +0 -5
  211. 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;