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.
Files changed (295) hide show
  1. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +7 -6
  2. package/dist/cjs/flexible-container.cjs.entry.js +1 -1
  3. package/dist/cjs/form-checkbox.cjs.entry.js +9 -5
  4. package/dist/cjs/form-date-picker.cjs.entry.js +2 -2
  5. package/dist/cjs/form-dialog_8.cjs.entry.js +40 -36
  6. package/dist/cjs/{form-error-message-CrGiKsoO.js → form-error-message-B2s83XoL.js} +1 -1
  7. package/dist/cjs/form-input-BZp9_abd.js +24 -0
  8. package/dist/cjs/form-input_4.cjs.entry.js +24 -18
  9. package/dist/cjs/form-switch.cjs.entry.js +9 -5
  10. package/dist/cjs/form-time-picker.cjs.entry.js +2 -2
  11. package/dist/cjs/general-inquiry-form.cjs.entry.js +24 -22
  12. package/dist/cjs/get-local-language-DV1oVchQ.js +194 -0
  13. package/dist/cjs/information-table.cjs.entry.js +1 -1
  14. package/dist/cjs/{loader-icon-qrSyqpQO.js → loader-icon-OTnFBvzm.js} +1150 -263
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
  17. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +8 -7
  18. package/dist/cjs/part-lookup.cjs.entry.js +6 -5
  19. package/dist/cjs/service-booking-form.cjs.entry.js +11 -9
  20. package/dist/cjs/shift-checkbox.cjs.entry.js +1 -1
  21. package/dist/cjs/shift-components.cjs.js +1 -1
  22. package/dist/cjs/shift-switch.cjs.entry.js +1 -1
  23. package/dist/cjs/shift-tab-content.cjs.entry.js +1 -1
  24. package/dist/cjs/shift-tabs_2.cjs.entry.js +2 -2
  25. package/dist/cjs/ssc-lookup-form.cjs.entry.js +11 -9
  26. package/dist/cjs/state-object-DFBHdqbr.js +172 -0
  27. package/dist/cjs/test-drive-form.cjs.entry.js +11 -9
  28. package/dist/cjs/{type-BqNpIYcE.js → type-BSH0OxyO.js} +3 -3
  29. package/dist/cjs/{type-B8LchmnL.js → type-BvWomz0N.js} +2 -2
  30. package/dist/cjs/{type-BrzZ5GMr.js → type-NRLY9OsL.js} +9 -9
  31. package/dist/cjs/{get-local-language-CMptyFxH.js → types-B3WMBBhs.js} +4 -187
  32. package/dist/cjs/validation-BxmICJwK.js +89 -0
  33. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +18 -17
  34. package/dist/cjs/vehicle-lookup.cjs.entry.js +6 -5
  35. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +15 -14
  36. package/dist/collection/collection-manifest.json +1 -1
  37. package/dist/collection/components/components/empty.css +1 -1
  38. package/dist/collection/components/components/flexible-container.css +1 -1
  39. package/dist/collection/components/components/information-table.css +1 -1
  40. package/dist/collection/components/components/loading-spinner.css +1 -1
  41. package/dist/collection/components/components/shift-tab-content.css +1 -1
  42. package/dist/collection/components/components/shift-tabs.css +1 -1
  43. package/dist/collection/components/form-elements/components/form-error-message.js +1 -1
  44. package/dist/collection/components/form-elements/form-checkbox.js +29 -4
  45. package/dist/collection/components/form-elements/form-input.js +30 -5
  46. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  47. package/dist/collection/components/form-elements/form-phone-number.js +30 -5
  48. package/dist/collection/components/form-elements/form-picker-input.js +30 -5
  49. package/dist/collection/components/form-elements/form-select.js +30 -4
  50. package/dist/collection/components/form-elements/form-submit.js +31 -4
  51. package/dist/collection/components/form-elements/form-switch.js +29 -4
  52. package/dist/collection/components/form-elements/form-text-area.js +32 -6
  53. package/dist/collection/components/form-elements/form-vin-input.js +53 -9
  54. package/dist/collection/components/forms/defaults/mappers.js +58 -46
  55. package/dist/collection/components/forms/defaults/style.css +1 -1
  56. package/dist/collection/components/forms/defaults/validation.js +73 -75
  57. package/dist/collection/components/forms/general-inquiry.js +20 -20
  58. package/dist/collection/components/forms/service-booking.js +6 -7
  59. package/dist/collection/components/forms/ssc-lookup.js +6 -7
  60. package/dist/collection/components/forms/test-drive.js +6 -7
  61. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  62. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  63. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  64. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +1 -1
  65. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  66. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  67. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  68. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  69. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  70. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  71. package/dist/collection/components/vin-extractor/vin-extractor.css +1 -1
  72. package/dist/collection/features/form-hook/functions.js +14 -10
  73. package/dist/collection/features/form-hook/inputs/form-input.js +19 -1
  74. package/dist/collection/features/form-hook/render-structure.js +1 -1
  75. package/dist/components/dead-stock-lookup.js +1 -1
  76. package/dist/components/distributor-lookup.js +1 -1
  77. package/dist/components/flexible-container.js +1 -1
  78. package/dist/components/form-checkbox.js +1 -1
  79. package/dist/components/form-date-picker.js +1 -1
  80. package/dist/components/form-dialog.js +1 -1
  81. package/dist/components/form-input.js +1 -1
  82. package/dist/components/form-phone-number.js +1 -1
  83. package/dist/components/form-picker-input.js +1 -1
  84. package/dist/components/form-select.js +1 -1
  85. package/dist/components/form-shadow-input.js +1 -1
  86. package/dist/components/form-structure-error.js +1 -1
  87. package/dist/components/form-structure.js +1 -1
  88. package/dist/components/form-submit.js +1 -1
  89. package/dist/components/form-switch.js +1 -1
  90. package/dist/components/form-text-area.js +1 -1
  91. package/dist/components/form-time-picker.js +1 -1
  92. package/dist/components/form-vin-input.js +1 -1
  93. package/dist/components/general-inquiry-form.js +1 -1
  94. package/dist/components/information-table.js +1 -1
  95. package/dist/components/loading-spinner.js +1 -1
  96. package/dist/components/manufacturer-lookup.js +1 -1
  97. package/dist/components/manufacturer-part-lookup.js +1 -1
  98. package/dist/components/p--ZWu5kfe.js +5 -0
  99. package/dist/components/p-3o70TTPM.js +5 -0
  100. package/dist/components/p-9Jshpnf4.js +5 -0
  101. package/dist/components/{p-CwQEFAEF.js → p-B6mLLQ5Z.js} +1 -1
  102. package/dist/components/p-B6yxFkGn.js +5 -0
  103. package/dist/components/{p-CHdx52dw.js → p-BFvKdyvP.js} +1 -1
  104. package/dist/components/p-BMqwfA7R.js +5 -0
  105. package/dist/components/p-BNfiYxny.js +5 -0
  106. package/dist/components/{p-BsFKuBtC.js → p-BPtyEnCf.js} +1 -1
  107. package/dist/components/p-BW74FG6u.js +5 -0
  108. package/dist/components/p-Bau2XePf.js +5 -0
  109. package/dist/components/p-BnRsfejo.js +5 -0
  110. package/dist/components/p-BrEz2vz_.js +5 -0
  111. package/dist/components/p-C9lmL_jC.js +5 -0
  112. package/dist/components/p-CD_2-fK9.js +5 -0
  113. package/dist/components/{p-CRhdQvF0.js → p-CGKHe5aV.js} +1 -1
  114. package/dist/components/p-CL_w2QQD.js +5 -0
  115. package/dist/components/p-CTnFqaoj.js +5 -0
  116. package/dist/components/{p-D930Q75B.js → p-ChgSU1Ua.js} +1 -1
  117. package/dist/components/{p-DqNmAqS_.js → p-CiwfnrB-.js} +1 -1
  118. package/dist/components/p-Crd-9v2B.js +5 -0
  119. package/dist/components/{p-CBXAxKky.js → p-Cu6cHcY1.js} +1 -1
  120. package/dist/components/p-CzffKzcR.js +5 -0
  121. package/dist/components/{p-7y7dFWS-.js → p-D39ljWpy.js} +1 -1
  122. package/dist/components/p-DLBJDU-Z.js +5 -0
  123. package/dist/components/p-DVOFEN__.js +5 -0
  124. package/dist/components/p-DW9tnza0.js +5 -0
  125. package/dist/components/p-DXV8vbHa.js +5 -0
  126. package/dist/components/{p-B_QEyJOO.js → p-DYUVoVJU.js} +1 -1
  127. package/dist/components/p-Dbq3Z3a7.js +5 -0
  128. package/dist/components/p-DodX8HCB.js +5 -0
  129. package/dist/components/p-Dq5EPmKC.js +5 -0
  130. package/dist/components/{p-DJaWpqrV.js → p-DvwR_CeT.js} +1 -1
  131. package/dist/components/p-GjSy7W7d.js +5 -0
  132. package/dist/components/p-KrwBOds5.js +5 -0
  133. package/dist/components/p-VJzNTmbc.js +5 -0
  134. package/dist/components/p-to4xqGcM.js +5 -0
  135. package/dist/components/p-vJNV_Y5G.js +5 -0
  136. package/dist/components/part-lookup.js +1 -1
  137. package/dist/components/service-booking-form.js +1 -1
  138. package/dist/components/shift-accordion.js +1 -1
  139. package/dist/components/shift-checkbox.js +1 -1
  140. package/dist/components/shift-slider.js +1 -1
  141. package/dist/components/shift-switch.js +1 -1
  142. package/dist/components/shift-tab-content.js +1 -1
  143. package/dist/components/shift-tabs.js +1 -1
  144. package/dist/components/ssc-lookup-form.js +1 -1
  145. package/dist/components/test-drive-form.js +1 -1
  146. package/dist/components/vehicle-accessories.js +1 -1
  147. package/dist/components/vehicle-claimable-items.js +1 -1
  148. package/dist/components/vehicle-item-claim-form.js +1 -1
  149. package/dist/components/vehicle-lookup.js +1 -1
  150. package/dist/components/vehicle-paint-thickness.js +1 -1
  151. package/dist/components/vehicle-quotation-form.js +1 -1
  152. package/dist/components/vehicle-sale-information.js +1 -1
  153. package/dist/components/vehicle-service-history.js +1 -1
  154. package/dist/components/vehicle-specification.js +1 -1
  155. package/dist/components/vehicle-warranty-details.js +1 -1
  156. package/dist/components/vin-extractor.js +1 -1
  157. package/dist/esm/dead-stock-lookup_3.entry.js +4 -3
  158. package/dist/esm/flexible-container.entry.js +1 -1
  159. package/dist/esm/form-checkbox.entry.js +9 -5
  160. package/dist/esm/form-date-picker.entry.js +2 -2
  161. package/dist/esm/form-dialog_8.entry.js +37 -33
  162. package/dist/esm/{form-error-message-BRYZJjPy.js → form-error-message-C4gzgw8C.js} +1 -1
  163. package/dist/esm/form-input-DRd-doY1.js +22 -0
  164. package/dist/esm/form-input_4.entry.js +24 -18
  165. package/dist/esm/form-switch.entry.js +9 -5
  166. package/dist/esm/form-time-picker.entry.js +2 -2
  167. package/dist/esm/general-inquiry-form.entry.js +24 -22
  168. package/dist/esm/get-local-language-DJl5eWCY.js +189 -0
  169. package/dist/esm/information-table.entry.js +1 -1
  170. package/dist/esm/{loader-icon-DhBPTC5g.js → loader-icon-DUMSCofl.js} +1150 -263
  171. package/dist/esm/loader.js +1 -1
  172. package/dist/esm/loading-spinner.entry.js +1 -1
  173. package/dist/esm/manufacturer-part-lookup.entry.js +3 -2
  174. package/dist/esm/part-lookup.entry.js +4 -3
  175. package/dist/esm/service-booking-form.entry.js +11 -9
  176. package/dist/esm/shift-checkbox.entry.js +1 -1
  177. package/dist/esm/shift-components.js +1 -1
  178. package/dist/esm/shift-switch.entry.js +1 -1
  179. package/dist/esm/shift-tab-content.entry.js +1 -1
  180. package/dist/esm/shift-tabs_2.entry.js +2 -2
  181. package/dist/esm/ssc-lookup-form.entry.js +10 -8
  182. package/dist/esm/state-object-D7JLK2vI.js +169 -0
  183. package/dist/esm/test-drive-form.entry.js +10 -8
  184. package/dist/esm/{type-BluG_k1P.js → type-BJF9x4jt.js} +1 -1
  185. package/dist/esm/{type-D_rpjbuj.js → type-TpJOuSTQ.js} +1 -1
  186. package/dist/esm/{type-zroDKO0U.js → type-r4cI4JJY.js} +1 -1
  187. package/dist/esm/{get-local-language-CCj6E27L.js → types-Cn7YOi83.js} +1 -184
  188. package/dist/esm/validation-BsxDkThF.js +86 -0
  189. package/dist/esm/vehicle-accessories_7.entry.js +10 -9
  190. package/dist/esm/vehicle-lookup.entry.js +4 -3
  191. package/dist/esm/vehicle-quotation-form.entry.js +3 -2
  192. package/dist/shift-components/{p-d7da1152.entry.js → p-16e95508.entry.js} +1 -1
  193. package/dist/shift-components/{p-2fe3538e.entry.js → p-2c9950cc.entry.js} +1 -1
  194. package/dist/shift-components/p-380144df.entry.js +5 -0
  195. package/dist/shift-components/p-3853ea20.entry.js +5 -0
  196. package/dist/shift-components/{p-0e630c66.entry.js → p-3a91a272.entry.js} +1 -1
  197. package/dist/shift-components/{p-b4231e50.entry.js → p-5b587a6a.entry.js} +1 -1
  198. package/dist/shift-components/p-694d921f.entry.js +5 -0
  199. package/dist/shift-components/p-8a97341b.entry.js +5 -0
  200. package/dist/shift-components/p-8e6d183e.entry.js +5 -0
  201. package/dist/shift-components/p-98b10e49.entry.js +5 -0
  202. package/dist/shift-components/p-B-Ttz-dC.js +5 -0
  203. package/dist/shift-components/p-BUbNT08a.js +5 -0
  204. package/dist/shift-components/p-B_8bnsuC.js +5 -0
  205. package/dist/shift-components/{p-Bfkguwb-.js → p-B_HWC4v3.js} +1 -1
  206. package/dist/shift-components/p-Cn7YOi83.js +5 -0
  207. package/dist/shift-components/{p-B-8v_CQL.js → p-CpygzMlx.js} +1 -1
  208. package/dist/shift-components/p-DDiSIFiM.js +5 -0
  209. package/dist/shift-components/p-a9ee64a7.entry.js +5 -0
  210. package/dist/shift-components/p-aa72cb3d.entry.js +5 -0
  211. package/dist/shift-components/p-aae6a6e7.entry.js +5 -0
  212. package/dist/shift-components/p-bea5d49e.entry.js +5 -0
  213. package/dist/shift-components/p-c61723de.entry.js +5 -0
  214. package/dist/shift-components/p-cb348218.entry.js +5 -0
  215. package/dist/shift-components/{p-0a728fec.entry.js → p-d09cd43d.entry.js} +1 -1
  216. package/dist/shift-components/p-d1543879.entry.js +5 -0
  217. package/dist/shift-components/{p-f4914abc.entry.js → p-d7bb6f3a.entry.js} +1 -1
  218. package/dist/shift-components/{p-BW6seqLB.js → p-det1AUh4.js} +1 -1
  219. package/dist/shift-components/p-e4b69987.entry.js +5 -0
  220. package/dist/shift-components/p-eed5e111.entry.js +5 -0
  221. package/dist/shift-components/p-fd48f8b4.entry.js +5 -0
  222. package/dist/shift-components/p-fd626a4f.entry.js +5 -0
  223. package/dist/shift-components/{p-BK4ZcuiW.js → p-gokv-pzN.js} +1 -1
  224. package/dist/shift-components/p-nfwRLPgJ.js +5 -0
  225. package/dist/shift-components/shift-components.esm.js +1 -1
  226. package/dist/types/components/form-elements/form-checkbox.d.ts +2 -1
  227. package/dist/types/components/form-elements/form-input.d.ts +2 -0
  228. package/dist/types/components/form-elements/form-phone-number.d.ts +2 -1
  229. package/dist/types/components/form-elements/form-picker-input.d.ts +2 -0
  230. package/dist/types/components/form-elements/form-select.d.ts +2 -1
  231. package/dist/types/components/form-elements/form-submit.d.ts +2 -1
  232. package/dist/types/components/form-elements/form-switch.d.ts +2 -1
  233. package/dist/types/components/form-elements/form-text-area.d.ts +2 -1
  234. package/dist/types/components/form-elements/form-vin-input.d.ts +5 -0
  235. package/dist/types/components/forms/defaults/mappers.d.ts +7 -5
  236. package/dist/types/components/forms/defaults/validation.d.ts +29 -12
  237. package/dist/types/components.d.ts +76 -2
  238. package/dist/types/features/form-hook/inputs/form-input.d.ts +13 -0
  239. package/dist/types/features/form-hook/inputs/form-select.d.ts +2 -0
  240. package/dist/types/locales/vehicleLookup/claimableItems/type.d.ts +4 -4
  241. package/dist/types/locales/vehicleLookup/serviceHistory/type.d.ts +2 -2
  242. package/dist/types/locales/vehicleLookup/wrapper-type.d.ts +4 -4
  243. package/package.json +1 -1
  244. package/dist/cjs/state-object-B_0-oj8G.js +0 -243
  245. package/dist/collection/components/forms/service-booking/element-mapper.js +0 -134
  246. package/dist/collection/components/forms/service-booking/validations.js +0 -56
  247. package/dist/components/p-3WjYFbnU.js +0 -5
  248. package/dist/components/p-64G0Y_tC.js +0 -5
  249. package/dist/components/p-BEClgvwe.js +0 -5
  250. package/dist/components/p-BTqv9A1K.js +0 -5
  251. package/dist/components/p-Bd2-gh8M.js +0 -5
  252. package/dist/components/p-BffBGA_K.js +0 -5
  253. package/dist/components/p-Bon4whdT.js +0 -5
  254. package/dist/components/p-C-4CT4ZF.js +0 -5
  255. package/dist/components/p-C6WhIy7O.js +0 -5
  256. package/dist/components/p-CEM5EBP0.js +0 -5
  257. package/dist/components/p-Cxfsh87m.js +0 -5
  258. package/dist/components/p-D-tlRZMk.js +0 -5
  259. package/dist/components/p-DA0taq65.js +0 -5
  260. package/dist/components/p-DJKERvsE.js +0 -5
  261. package/dist/components/p-DNn44A0I.js +0 -5
  262. package/dist/components/p-DdWYx3mw.js +0 -5
  263. package/dist/components/p-Df56BNKV.js +0 -5
  264. package/dist/components/p-DjDUhW2q.js +0 -5
  265. package/dist/components/p-DkA_i--O.js +0 -5
  266. package/dist/components/p-DuNp8sSh.js +0 -5
  267. package/dist/components/p-NEl9bwNq.js +0 -5
  268. package/dist/components/p-RInF2GNQ.js +0 -5
  269. package/dist/components/p-_C-vBKCe.js +0 -5
  270. package/dist/components/p-eTLWmtnI.js +0 -5
  271. package/dist/components/p-vEsQVFLN.js +0 -5
  272. package/dist/components/p-zofQKKfh.js +0 -5
  273. package/dist/esm/state-object-Cwph5K2Q.js +0 -238
  274. package/dist/shift-components/p-0f83786b.entry.js +0 -5
  275. package/dist/shift-components/p-1c93d5e6.entry.js +0 -5
  276. package/dist/shift-components/p-26f3e6da.entry.js +0 -5
  277. package/dist/shift-components/p-3a7196d4.entry.js +0 -5
  278. package/dist/shift-components/p-45670df9.entry.js +0 -5
  279. package/dist/shift-components/p-4aa6f707.entry.js +0 -5
  280. package/dist/shift-components/p-50fd9d29.entry.js +0 -5
  281. package/dist/shift-components/p-63e1e80e.entry.js +0 -5
  282. package/dist/shift-components/p-67476178.entry.js +0 -5
  283. package/dist/shift-components/p-683f3ab3.entry.js +0 -5
  284. package/dist/shift-components/p-8700e868.entry.js +0 -5
  285. package/dist/shift-components/p-90a6803f.entry.js +0 -5
  286. package/dist/shift-components/p-BVMG8UaH.js +0 -5
  287. package/dist/shift-components/p-BnQp2Q8E.js +0 -5
  288. package/dist/shift-components/p-C3YLTa2J.js +0 -5
  289. package/dist/shift-components/p-c7eaf245.entry.js +0 -5
  290. package/dist/shift-components/p-f7692371.entry.js +0 -5
  291. package/dist/shift-components/p-f8ac59ee.entry.js +0 -5
  292. package/dist/shift-components/p-fac0fdb9.entry.js +0 -5
  293. package/dist/shift-components/p-fe02d5ed.entry.js +0 -5
  294. package/dist/types/components/forms/service-booking/element-mapper.d.ts +0 -7
  295. package/dist/types/components/forms/service-booking/validations.d.ts +0 -25
@@ -10,7 +10,7 @@ import { Endpoint } from "./global/lib/fetch-from";
10
10
  import { BlazorInvokableFunction, DotNetObjectReference } from "./features/blazor-ref/index";
11
11
  import { PartLookupDTO } from "./global/types/generated/part/part-lookup-dto";
12
12
  import { PartLookupMock } from "./features/part-lookup-components/index";
13
- import { FormElementMapper, FormElementStructure, FormHook, FormSelectFetcher, FormSelectItem, PhoneValidator } from "./features/form-hook/index";
13
+ import { FormElementMapper, FormElementStructure, FormHook, FormInputLocalization, FormSelectFetcher, FormSelectItem, PhoneValidator } from "./features/form-hook/index";
14
14
  import { FormHook as FormHook1 } from "./features/form-hook/form-hook";
15
15
  import { DateTypes } from "./global/lib/decode-time-offset";
16
16
  import { InformationTableColumn } from "./components/components/information-table";
@@ -29,7 +29,7 @@ export { Endpoint } from "./global/lib/fetch-from";
29
29
  export { BlazorInvokableFunction, DotNetObjectReference } from "./features/blazor-ref/index";
30
30
  export { PartLookupDTO } from "./global/types/generated/part/part-lookup-dto";
31
31
  export { PartLookupMock } from "./features/part-lookup-components/index";
32
- export { FormElementMapper, FormElementStructure, FormHook, FormSelectFetcher, FormSelectItem, PhoneValidator } from "./features/form-hook/index";
32
+ export { FormElementMapper, FormElementStructure, FormHook, FormInputLocalization, FormSelectFetcher, FormSelectItem, PhoneValidator } from "./features/form-hook/index";
33
33
  export { FormHook as FormHook1 } from "./features/form-hook/form-hook";
34
34
  export { DateTypes } from "./global/lib/decode-time-offset";
35
35
  export { InformationTableColumn } from "./components/components/information-table";
@@ -131,6 +131,10 @@ export namespace Components {
131
131
  "defaultChecked": boolean;
132
132
  "form": FormHook<any>;
133
133
  "inputPrefix": string;
134
+ /**
135
+ * @default {}
136
+ */
137
+ "localization"?: FormInputLocalization;
134
138
  "name": string;
135
139
  /**
136
140
  * @default 'text'
@@ -184,6 +188,10 @@ export namespace Components {
184
188
  "inputProps"?: any;
185
189
  "isDisabled"?: boolean;
186
190
  "isLoading"?: boolean;
191
+ /**
192
+ * @default {}
193
+ */
194
+ "localization"?: FormInputLocalization;
187
195
  "name": string;
188
196
  "staticValue"?: string;
189
197
  "type"?: HTMLInputElement['type'];
@@ -196,6 +204,10 @@ export namespace Components {
196
204
  "inputPrefix": string;
197
205
  "isDisabled"?: boolean;
198
206
  "isLoading"?: boolean;
207
+ /**
208
+ * @default {}
209
+ */
210
+ "localization"?: FormInputLocalization;
199
211
  "name": string;
200
212
  "staticValue"?: string;
201
213
  /**
@@ -224,6 +236,10 @@ export namespace Components {
224
236
  "inputProps"?: any;
225
237
  "isDisabled"?: boolean;
226
238
  "isLoading"?: boolean;
239
+ /**
240
+ * @default {}
241
+ */
242
+ "localization"?: FormInputLocalization;
227
243
  "max"?: string | number[];
228
244
  "min"?: string | number[];
229
245
  "name": string;
@@ -256,6 +272,10 @@ export namespace Components {
256
272
  * @default 'en'
257
273
  */
258
274
  "language": LanguageKeys;
275
+ /**
276
+ * @default {}
277
+ */
278
+ "localization"?: FormInputLocalization;
259
279
  "name": string;
260
280
  "resetKey": any;
261
281
  "searchable": boolean;
@@ -300,6 +320,10 @@ export namespace Components {
300
320
  "form": FormHook<any>;
301
321
  "isLoading": boolean;
302
322
  "language"?: string;
323
+ /**
324
+ * @default {}
325
+ */
326
+ "localization"?: FormInputLocalization;
303
327
  /**
304
328
  * @default 'submit'
305
329
  */
@@ -311,6 +335,10 @@ export namespace Components {
311
335
  "defaultChecked": boolean;
312
336
  "form": FormHook<any>;
313
337
  "inputPrefix": string;
338
+ /**
339
+ * @default {}
340
+ */
341
+ "localization"?: FormInputLocalization;
314
342
  "name": string;
315
343
  /**
316
344
  * @default 'text'
@@ -324,6 +352,10 @@ export namespace Components {
324
352
  "form": FormHook<any>;
325
353
  "isDisabled"?: boolean;
326
354
  "isLoading"?: boolean;
355
+ /**
356
+ * @default {}
357
+ */
358
+ "localization"?: FormInputLocalization;
327
359
  "name": string;
328
360
  "staticValue"?: string;
329
361
  "wrapperClass": string;
@@ -355,7 +387,12 @@ export namespace Components {
355
387
  "inputProps"?: any;
356
388
  "isDisabled"?: boolean;
357
389
  "isLoading"?: boolean;
390
+ /**
391
+ * @default {}
392
+ */
393
+ "localization"?: FormInputLocalization<{ scan: string }>;
358
394
  "name": string;
395
+ "ocrEndpoint"?: string;
359
396
  "readSticker"?: boolean;
360
397
  /**
361
398
  * @default ''
@@ -1430,6 +1467,10 @@ declare namespace LocalJSX {
1430
1467
  "defaultChecked"?: boolean;
1431
1468
  "form"?: FormHook<any>;
1432
1469
  "inputPrefix"?: string;
1470
+ /**
1471
+ * @default {}
1472
+ */
1473
+ "localization"?: FormInputLocalization;
1433
1474
  "name"?: string;
1434
1475
  /**
1435
1476
  * @default 'text'
@@ -1483,6 +1524,10 @@ declare namespace LocalJSX {
1483
1524
  "inputProps"?: any;
1484
1525
  "isDisabled"?: boolean;
1485
1526
  "isLoading"?: boolean;
1527
+ /**
1528
+ * @default {}
1529
+ */
1530
+ "localization"?: FormInputLocalization;
1486
1531
  "name"?: string;
1487
1532
  "staticValue"?: string;
1488
1533
  "type"?: HTMLInputElement['type'];
@@ -1495,6 +1540,10 @@ declare namespace LocalJSX {
1495
1540
  "inputPrefix"?: string;
1496
1541
  "isDisabled"?: boolean;
1497
1542
  "isLoading"?: boolean;
1543
+ /**
1544
+ * @default {}
1545
+ */
1546
+ "localization"?: FormInputLocalization;
1498
1547
  "name"?: string;
1499
1548
  "staticValue"?: string;
1500
1549
  /**
@@ -1523,6 +1572,10 @@ declare namespace LocalJSX {
1523
1572
  "inputProps"?: any;
1524
1573
  "isDisabled"?: boolean;
1525
1574
  "isLoading"?: boolean;
1575
+ /**
1576
+ * @default {}
1577
+ */
1578
+ "localization"?: FormInputLocalization;
1526
1579
  "max"?: string | number[];
1527
1580
  "min"?: string | number[];
1528
1581
  "name"?: string;
@@ -1555,6 +1608,10 @@ declare namespace LocalJSX {
1555
1608
  * @default 'en'
1556
1609
  */
1557
1610
  "language"?: LanguageKeys;
1611
+ /**
1612
+ * @default {}
1613
+ */
1614
+ "localization"?: FormInputLocalization;
1558
1615
  "name"?: string;
1559
1616
  "resetKey"?: any;
1560
1617
  "searchable"?: boolean;
@@ -1599,6 +1656,10 @@ declare namespace LocalJSX {
1599
1656
  "form"?: FormHook<any>;
1600
1657
  "isLoading"?: boolean;
1601
1658
  "language"?: string;
1659
+ /**
1660
+ * @default {}
1661
+ */
1662
+ "localization"?: FormInputLocalization;
1602
1663
  /**
1603
1664
  * @default 'submit'
1604
1665
  */
@@ -1610,6 +1671,10 @@ declare namespace LocalJSX {
1610
1671
  "defaultChecked"?: boolean;
1611
1672
  "form"?: FormHook<any>;
1612
1673
  "inputPrefix"?: string;
1674
+ /**
1675
+ * @default {}
1676
+ */
1677
+ "localization"?: FormInputLocalization;
1613
1678
  "name"?: string;
1614
1679
  /**
1615
1680
  * @default 'text'
@@ -1623,6 +1688,10 @@ declare namespace LocalJSX {
1623
1688
  "form"?: FormHook<any>;
1624
1689
  "isDisabled"?: boolean;
1625
1690
  "isLoading"?: boolean;
1691
+ /**
1692
+ * @default {}
1693
+ */
1694
+ "localization"?: FormInputLocalization;
1626
1695
  "name"?: string;
1627
1696
  "staticValue"?: string;
1628
1697
  "wrapperClass"?: string;
@@ -1654,7 +1723,12 @@ declare namespace LocalJSX {
1654
1723
  "inputProps"?: any;
1655
1724
  "isDisabled"?: boolean;
1656
1725
  "isLoading"?: boolean;
1726
+ /**
1727
+ * @default {}
1728
+ */
1729
+ "localization"?: FormInputLocalization<{ scan: string }>;
1657
1730
  "name"?: string;
1731
+ "ocrEndpoint"?: string;
1658
1732
  "readSticker"?: boolean;
1659
1733
  /**
1660
1734
  * @default ''
@@ -2,3 +2,16 @@ export type FormInputMeta = {
2
2
  label: string;
3
3
  placeholder: string;
4
4
  };
5
+ export type FormInputLocalization<T = {}> = {
6
+ [lang: string]: {
7
+ label?: string;
8
+ placeholder?: string;
9
+ require?: string;
10
+ format?: string;
11
+ } & T;
12
+ };
13
+ export declare const getInputLocalization: (context: any, meta: FormInputMeta, errorMessage: string) => {
14
+ label: any;
15
+ placeholder: any;
16
+ errorTextMessage: any;
17
+ };
@@ -1,3 +1,4 @@
1
+ import { FormSelect } from '../../../components/form-elements/form-select';
1
2
  export type FormSelectItem = {
2
3
  value: string;
3
4
  label: string;
@@ -6,6 +7,7 @@ export type FormSelectItem = {
6
7
  type FormSelectFetcherProps = {
7
8
  language: string;
8
9
  signal: AbortSignal;
10
+ context: FormSelect;
9
11
  locale: Record<string, any>;
10
12
  };
11
13
  export type FormSelectFetcher = (props: FormSelectFetcherProps) => Promise<FormSelectItem[]>;
@@ -3,9 +3,9 @@ export declare const claimFormSchema: import("yup").ObjectSchema<{
3
3
  name: string;
4
4
  print: string;
5
5
  expand: string;
6
- serviceType: string;
7
6
  uploadSingleDocument: string;
8
7
  uploadMultipleDocument: string;
8
+ serviceType: string;
9
9
  documentLimitError: string;
10
10
  documentRequiredError: string;
11
11
  activationDate: string;
@@ -22,9 +22,9 @@ export declare const claimFormSchema: import("yup").ObjectSchema<{
22
22
  name: undefined;
23
23
  print: undefined;
24
24
  expand: undefined;
25
- serviceType: undefined;
26
25
  uploadSingleDocument: undefined;
27
26
  uploadMultipleDocument: undefined;
27
+ serviceType: undefined;
28
28
  documentLimitError: undefined;
29
29
  documentRequiredError: undefined;
30
30
  activationDate: undefined;
@@ -44,9 +44,9 @@ declare const claimableItemsSchema: import("yup").ObjectSchema<{
44
44
  name?: string;
45
45
  print?: string;
46
46
  expand?: string;
47
- serviceType?: string;
48
47
  uploadSingleDocument?: string;
49
48
  uploadMultipleDocument?: string;
49
+ serviceType?: string;
50
50
  documentLimitError?: string;
51
51
  documentRequiredError?: string;
52
52
  activationDate?: string;
@@ -85,9 +85,9 @@ declare const claimableItemsSchema: import("yup").ObjectSchema<{
85
85
  name: undefined;
86
86
  print: undefined;
87
87
  expand: undefined;
88
- serviceType: undefined;
89
88
  uploadSingleDocument: undefined;
90
89
  uploadMultipleDocument: undefined;
90
+ serviceType: undefined;
91
91
  documentLimitError: undefined;
92
92
  documentRequiredError: undefined;
93
93
  activationDate: undefined;
@@ -2,10 +2,10 @@ declare const ServiceHistorySchema: import("yup").ObjectSchema<{
2
2
  noData: string;
3
3
  date: string;
4
4
  dealer: string;
5
- serviceType: string;
6
5
  branch: string;
7
6
  partDescription: string;
8
7
  partNumber: string;
8
+ serviceType: string;
9
9
  packageCode: string;
10
10
  invoiceNumber: string;
11
11
  serviceHistory: string;
@@ -20,10 +20,10 @@ declare const ServiceHistorySchema: import("yup").ObjectSchema<{
20
20
  noData: undefined;
21
21
  date: undefined;
22
22
  dealer: undefined;
23
- serviceType: undefined;
24
23
  branch: undefined;
25
24
  partDescription: undefined;
26
25
  partNumber: undefined;
26
+ serviceType: undefined;
27
27
  packageCode: undefined;
28
28
  invoiceNumber: undefined;
29
29
  serviceHistory: undefined;
@@ -48,9 +48,9 @@ declare const vehicleLookupWrapperSchema: import("yup").ObjectSchema<{
48
48
  name?: string;
49
49
  print?: string;
50
50
  expand?: string;
51
- serviceType?: string;
52
51
  uploadSingleDocument?: string;
53
52
  uploadMultipleDocument?: string;
53
+ serviceType?: string;
54
54
  documentLimitError?: string;
55
55
  documentRequiredError?: string;
56
56
  activationDate?: string;
@@ -90,10 +90,10 @@ declare const vehicleLookupWrapperSchema: import("yup").ObjectSchema<{
90
90
  noData?: string;
91
91
  date?: string;
92
92
  dealer?: string;
93
- serviceType?: string;
94
93
  branch?: string;
95
94
  partDescription?: string;
96
95
  partNumber?: string;
96
+ serviceType?: string;
97
97
  packageCode?: string;
98
98
  invoiceNumber?: string;
99
99
  serviceHistory?: string;
@@ -148,9 +148,9 @@ declare const vehicleLookupWrapperSchema: import("yup").ObjectSchema<{
148
148
  name: undefined;
149
149
  print: undefined;
150
150
  expand: undefined;
151
- serviceType: undefined;
152
151
  uploadSingleDocument: undefined;
153
152
  uploadMultipleDocument: undefined;
153
+ serviceType: undefined;
154
154
  documentLimitError: undefined;
155
155
  documentRequiredError: undefined;
156
156
  activationDate: undefined;
@@ -197,10 +197,10 @@ declare const vehicleLookupWrapperSchema: import("yup").ObjectSchema<{
197
197
  noData: undefined;
198
198
  date: undefined;
199
199
  dealer: undefined;
200
- serviceType: undefined;
201
200
  branch: undefined;
202
201
  partDescription: undefined;
203
202
  partNumber: undefined;
203
+ serviceType: undefined;
204
204
  packageCode: undefined;
205
205
  invoiceNumber: undefined;
206
206
  serviceHistory: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adp-web-components",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
4
4
  "description": "ADP Platform Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,243 +0,0 @@
1
- /*!
2
- * Built by ShiftSoftware
3
- * Copyright (c)
4
- */
5
- 'use strict';
6
-
7
- var getLocalLanguage = require('./get-local-language-CMptyFxH.js');
8
- var validateVin = require('./validate-vin-CJDIXpJO.js');
9
- var index = require('./index-CmK48vN3.js');
10
- var index$1 = require('./index-D5c513Xn.js');
11
- var loaderIcon = require('./loader-icon-qrSyqpQO.js');
12
- var cn = require('./cn-BHnqYtun.js');
13
- var decodeTimeOffset = require('./decode-time-offset-DqzP0mck.js');
14
-
15
- const label = (name) => `${name}-label`;
16
- const format = (name) => `${name}-format`;
17
- const require$1 = (name) => `${name}-require`;
18
- const placeholder = (name) => `${name}-placeholder`;
19
- const condition = (name) => `$${name}Required`;
20
- const y = { label, format, require: require$1, condition, placeholder };
21
- const getDefaultValidations = (stateObject) => ({
22
- name: getLocalLanguage.create$6()
23
- .meta({ label: label('name'), placeholder: placeholder('name') })
24
- .when(condition('name'), {
25
- is: true,
26
- otherwise: schema => schema.optional(),
27
- then: schema => schema.required(require$1('name')).min(3, format('name')),
28
- }),
29
- lastName: getLocalLanguage.create$6()
30
- .meta({ label: label('lastName'), placeholder: placeholder('lastName') })
31
- .when(condition('lastName'), {
32
- is: true,
33
- otherwise: schema => schema.optional(),
34
- then: schema => schema.required(require$1('lastName')).min(3, format('lastName')),
35
- }),
36
- message: getLocalLanguage.create$6()
37
- .meta({ label: label('message'), placeholder: placeholder('message') })
38
- .when(condition('message'), {
39
- is: true,
40
- otherwise: schema => schema.optional(),
41
- then: schema => schema.required(require$1('message')).min(10, format('message')),
42
- }),
43
- email: getLocalLanguage.create$6()
44
- .meta({ label: label('email'), placeholder: placeholder('email') })
45
- .when(condition('email'), {
46
- is: true,
47
- otherwise: schema => schema.optional(),
48
- then: schema => schema.required(require$1('email')),
49
- })
50
- .email(format('email')),
51
- vin: getLocalLanguage.create$6()
52
- .meta({ label: label('vin'), placeholder: placeholder('vin') })
53
- .when(condition('vin'), {
54
- is: true,
55
- otherwise: schema => schema.optional(),
56
- then: schema => schema.required(require$1('vin')).test(format('vin'), format('vin'), a => validateVin.validateVin(a === null || a === void 0 ? void 0 : a.toUpperCase())),
57
- }),
58
- phone: getLocalLanguage.create$6()
59
- .meta({ label: label('phone'), placeholder: placeholder('phone') })
60
- .when(condition('phone'), {
61
- is: true,
62
- otherwise: schema => schema.optional(),
63
- 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(); }),
64
- }),
65
- vehicle: getLocalLanguage.create$6()
66
- .meta({ label: y.label('vehicle'), placeholder: y.placeholder('vehicle') })
67
- .when(y.condition('vehicle'), {
68
- is: true,
69
- otherwise: schema => schema.optional(),
70
- then: schema => schema.required(y.require('vehicle')),
71
- }),
72
- companyBranchId: getLocalLanguage.create$6()
73
- .meta({ label: y.label('companyBranchId'), placeholder: y.placeholder('companyBranchId') })
74
- .when(y.condition('companyBranchId'), {
75
- is: true,
76
- otherwise: schema => schema.optional(),
77
- then: schema => schema.required(y.require('companyBranchId')),
78
- }),
79
- date: getLocalLanguage.create$6()
80
- .meta({ label: label('date'), placeholder: placeholder('date') })
81
- .when(condition('date'), {
82
- is: true,
83
- otherwise: schema => schema.optional(),
84
- then: schema => schema.required(require$1('date')),
85
- }),
86
- time: getLocalLanguage.create$6()
87
- .meta({ label: label('time'), placeholder: placeholder('time') })
88
- .when(condition('time'), {
89
- is: true,
90
- otherwise: schema => schema.optional(),
91
- then: schema => schema.required(require$1('time')),
92
- }),
93
- });
94
-
95
- const cachedImages = {};
96
- const cacheImage = (form, imSrc, id) => {
97
- fetch(imSrc)
98
- .then(res => res.blob())
99
- .then(blob => {
100
- const reader = new FileReader();
101
- reader.onloadend = () => {
102
- cachedImages[id] = reader.result;
103
- form.rerender({ rerenderForm: true });
104
- };
105
- reader.readAsDataURL(blob);
106
- })
107
- .catch(e => {
108
- console.log(e);
109
- // fail silently, keep fallback
110
- });
111
- };
112
- let imageSrcBase64 = '';
113
- const VehicleImageViewer = ({ form }) => {
114
- var _a, _b, _c, _d;
115
- form.addWatcher('vehicle');
116
- let vehicleId = form.getValue('vehicle');
117
- let openContainer = !!vehicleId;
118
- const selectedVehicle = (_a = form.context['vehicleList']) === null || _a === void 0 ? void 0 : _a.find(vehicle => vehicle.value === vehicleId);
119
- let imSrc;
120
- if (selectedVehicle) {
121
- imSrc = (_b = selectedVehicle === null || selectedVehicle === void 0 ? void 0 : selectedVehicle.meta) === null || _b === void 0 ? void 0 : _b.image;
122
- vehicleId = selectedVehicle.value;
123
- }
124
- else if (form.context['vehicleList'] && form.context['vehicleList'][0]) {
125
- imSrc = (_d = (_c = form.context['vehicleList'][0]) === null || _c === void 0 ? void 0 : _c.meta) === null || _d === void 0 ? void 0 : _d.image;
126
- vehicleId = form.context['vehicleList'][0].value;
127
- }
128
- let isLoading = false;
129
- if (cachedImages[vehicleId]) {
130
- imageSrcBase64 = cachedImages[vehicleId];
131
- }
132
- else if (form && imSrc && vehicleId) {
133
- cacheImage(form, imSrc, vehicleId);
134
- isLoading = true;
135
- }
136
- return (index.h("flexible-container", { isOpened: openContainer },
137
- index.h("div", { style: { 'min-height': '60px' }, part: "vehicle-image-wrapper", class: cn.cn('vehicle-image-wrapper', { loading: isLoading }) },
138
- index.h("div", { part: cn.cn('vehicle-image-loading-wrapper', { 'vehicle-image-active-loading-wrapper': isLoading }), class: cn.cn('loading-wrapper vehicle-image-loading-wrapper', { 'vehicle-image-active-loading-wrapper': isLoading }) },
139
- index.h(loaderIcon.LoaderIcon, { part: "vehicle-image-loader-icon", class: "img vehicle-image-loader-icon" })),
140
- index.h("img", { alt: "vehicle image", part: "vehicle-image", src: imageSrcBase64, style: { 'border-radius': '6px', 'transition': 'opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);', 'opacity': isLoading ? '0' : '1' } }))));
141
- };
142
-
143
- const CalendarDaysIcon = props => (index.h("svg", Object.assign({ fill: "none" }, props, { "stroke-width": "2", viewBox: "0 0 24 24", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", xmlns: "http://www.w3.org/2000/svg" }),
144
- index.h("path", { d: "M8 2v4" }),
145
- index.h("path", { d: "M16 2v4" }),
146
- index.h("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }),
147
- index.h("path", { d: "M3 10h18" }),
148
- index.h("path", { d: "M8 14h.01" }),
149
- index.h("path", { d: "M12 14h.01" }),
150
- index.h("path", { d: "M16 14h.01" }),
151
- index.h("path", { d: "M8 18h.01" }),
152
- index.h("path", { d: "M12 18h.01" }),
153
- index.h("path", { d: "M16 18h.01" })));
154
-
155
- const getDefaultMappers = (stateObject) => ({
156
- submit: ({ props }) => index.h("form-submit", Object.assign({}, props)),
157
- name: ({ props }) => index.h("form-input", Object.assign({}, props)),
158
- lastName: ({ props }) => index.h("form-input", Object.assign({}, props)),
159
- email: ({ props }) => index.h("form-input", Object.assign({ type: "email" }, props)),
160
- message: ({ props }) => index.h("form-text-area", Object.assign({}, props)),
161
- vin: ({ props }) => index.h("form-vin-input", Object.assign({}, props)),
162
- vehicleImage: ({ form }) => index.h(VehicleImageViewer, { form: form }),
163
- phone: ({ props, isLoading }) => {
164
- if (!stateObject.phoneValidator) {
165
- stateObject.phoneValidator = loaderIcon.getPhoneValidator((props === null || props === void 0 ? void 0 : props.countryCode) || '');
166
- }
167
- return index.h("form-phone-number", Object.assign({ defaultValue: stateObject.phoneValidator.default }, props, { isLoading: isLoading, validator: stateObject.phoneValidator }));
168
- },
169
- vehicle: ({ form, language, props }) => {
170
- var _a;
171
- const fetcher = async ({ signal }) => {
172
- var _a, _b, _c;
173
- const vehicleEndpoint = (_a = form.context.structure) === null || _a === void 0 ? void 0 : _a.data.vehicleApi;
174
- const response = await fetch(vehicleEndpoint, { signal, headers: { 'Accept-Language': language } });
175
- if ((_c = (_b = form.context.structure) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.vehiclesApiStrapiFormat) {
176
- const res = await response.json();
177
- let options = res.data;
178
- return options.map(vehicle => ({
179
- label: vehicle.attributes.GradeName,
180
- value: `${vehicle.id}`,
181
- meta: Object.assign(Object.assign({}, vehicle), { image: vehicle.attributes.Cover.data.attributes.url }),
182
- }));
183
- }
184
- else {
185
- const options = await response.json();
186
- return options.map(vehicle => ({
187
- label: vehicle.Title,
188
- value: `${vehicle.ID}`,
189
- meta: Object.assign(Object.assign({}, vehicle), { image: vehicle.Image }),
190
- }));
191
- }
192
- };
193
- let defaultValue;
194
- if (!props.defaultValue) {
195
- const params = new URLSearchParams(window.location.search);
196
- defaultValue = params.get((_a = form.context.structure.data) === null || _a === void 0 ? void 0 : _a.vehicleIdQueryParam);
197
- }
198
- else {
199
- defaultValue = props.defaultValue;
200
- }
201
- return index.h("form-select", Object.assign({}, props, { defaultValue: defaultValue, searchable: true, fetcher: fetcher, language: language }));
202
- },
203
- companyBranchId: ({ form, language, props }) => {
204
- const fetcher = async ({ signal }) => {
205
- var _a;
206
- const dealerEndpoint = (_a = form.context.structure) === null || _a === void 0 ? void 0 : _a.data.dealerApi;
207
- const response = await fetch(dealerEndpoint, { signal, headers: { 'Accept-Language': language } });
208
- const options = (await response.json()).map(dealer => ({
209
- label: dealer.Name,
210
- value: `${dealer.ID}`,
211
- meta: Object.assign({}, dealer),
212
- }));
213
- return options;
214
- };
215
- return index.h("form-select", Object.assign({}, props, { clearable: true, searchable: true, fetcher: fetcher, language: language }));
216
- },
217
- date: ({ props }) => index.h("form-picker-input", Object.assign({ type: "date" }, props, { icon: index.h(CalendarDaysIcon, null) })),
218
- time: ({ language, props }) => {
219
- const fetcher = async () => {
220
- const options = [];
221
- if (Array.isArray(props.span) && Array.isArray(props.min) && Array.isArray(props.max) && props.format) {
222
- let tempDate = decodeTimeOffset.decodeTimeOffset({ offsets: props.min });
223
- let maxDate = decodeTimeOffset.decodeTimeOffset({ offsets: props.max });
224
- while (index$1.dateFnsExports.isBefore(tempDate, maxDate) || index$1.dateFnsExports.isEqual(tempDate, maxDate)) {
225
- options.push({
226
- value: index$1.dateFnsExports.format(tempDate, props.format),
227
- label: index$1.dateFnsExports.format(tempDate, props.format),
228
- });
229
- tempDate = decodeTimeOffset.decodeTimeOffset({ offsets: props.span, date: tempDate });
230
- }
231
- }
232
- return options;
233
- };
234
- return index.h("form-select", Object.assign({}, props, { clearable: true, fetcher: fetcher, language: language }));
235
- },
236
- });
237
-
238
- const getDefaultStateObject = () => ({ phoneValidator: undefined });
239
-
240
- exports.getDefaultMappers = getDefaultMappers;
241
- exports.getDefaultStateObject = getDefaultStateObject;
242
- exports.getDefaultValidations = getDefaultValidations;
243
- exports.y = y;