adp-web-components 0.1.57 → 0.1.59

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 (301) hide show
  1. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +7 -7
  2. package/dist/cjs/decode-time-offset-DqzP0mck.js +37 -0
  3. package/dist/cjs/flexible-container.cjs.entry.js +1 -1
  4. package/dist/cjs/form-checkbox.cjs.entry.js +1 -1
  5. package/dist/cjs/form-date-picker.cjs.entry.js +221 -0
  6. package/dist/cjs/form-dialog_8.cjs.entry.js +809 -0
  7. package/dist/cjs/{form-input-prefix-BEKoXMuK.js → form-input-label-meHUwu3m.js} +0 -9
  8. package/dist/cjs/form-input-prefix-RFgXEC1Q.js +18 -0
  9. package/dist/cjs/form-input_4.cjs.entry.js +31 -14
  10. package/dist/cjs/form-switch.cjs.entry.js +2 -2
  11. package/dist/cjs/form-time-picker.cjs.entry.js +165 -0
  12. package/dist/cjs/general-inquiry-form.cjs.entry.js +11 -9
  13. package/dist/cjs/{get-local-language-CLEoE4A4.js → get-local-language-CMptyFxH.js} +1 -1
  14. package/dist/cjs/index-D5c513Xn.js +22147 -0
  15. package/dist/cjs/information-table.cjs.entry.js +1 -1
  16. package/dist/cjs/{loader-icon-8WtBJ-H1.js → loader-icon-qrSyqpQO.js} +49 -26
  17. package/dist/cjs/loader.cjs.js +1 -1
  18. package/dist/cjs/loading-spinner.cjs.entry.js +1 -1
  19. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +3 -3
  20. package/dist/cjs/part-lookup.cjs.entry.js +3 -3
  21. package/dist/cjs/service-booking-form.cjs.entry.js +21 -194
  22. package/dist/cjs/shift-components.cjs.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 +10 -10
  25. package/dist/cjs/ssc-lookup-form.cjs.entry.js +11 -9
  26. package/dist/cjs/state-object-B_0-oj8G.js +243 -0
  27. package/dist/cjs/test-drive-form.cjs.entry.js +11 -9
  28. package/dist/cjs/{type-DlWZZ9uC.js → type-B8LchmnL.js} +1 -1
  29. package/dist/cjs/{type-VgtSVhXd.js → type-BqNpIYcE.js} +1 -1
  30. package/dist/cjs/{type-CG7yWUpY.js → type-BrzZ5GMr.js} +1 -1
  31. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +24 -24
  32. package/dist/cjs/vehicle-lookup.cjs.entry.js +3 -3
  33. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +14 -11
  34. package/dist/collection/collection-manifest.json +3 -0
  35. package/dist/collection/components/components/flexible-container.css +1 -1
  36. package/dist/collection/components/components/information-table.css +1 -1
  37. package/dist/collection/components/components/loading-spinner.css +1 -1
  38. package/dist/collection/components/components/shift-tab-content.css +1 -1
  39. package/dist/collection/components/components/shift-tabs.css +1 -1
  40. package/dist/collection/components/form-elements/VehicleImageViewer.js +50 -0
  41. package/dist/collection/components/form-elements/form-date-picker-legacy.js +498 -0
  42. package/dist/collection/components/form-elements/form-dialog.js +3 -3
  43. package/dist/collection/components/form-elements/form-input.js +95 -5
  44. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  45. package/dist/collection/components/form-elements/form-phone-number.js +2 -2
  46. package/dist/collection/components/form-elements/form-picker-input.js +478 -0
  47. package/dist/collection/components/form-elements/form-shadow-input.js +24 -1
  48. package/dist/collection/components/form-elements/form-structure-error.js +1 -1
  49. package/dist/collection/components/form-elements/form-submit.js +2 -2
  50. package/dist/collection/components/form-elements/form-switch.js +1 -1
  51. package/dist/collection/components/form-elements/form-text-area.js +2 -2
  52. package/dist/collection/components/form-elements/form-time-picker-legacy.js +397 -0
  53. package/dist/collection/components/form-elements/form-vin-input.js +5 -4
  54. package/dist/collection/components/forms/defaults/mappers.js +72 -0
  55. package/dist/collection/components/forms/defaults/style.css +1 -1
  56. package/dist/collection/components/forms/defaults/validation.js +29 -1
  57. package/dist/collection/components/forms/general-inquiry.js +6 -6
  58. package/dist/collection/components/forms/service-booking.js +21 -21
  59. package/dist/collection/components/forms/ssc-lookup.js +6 -6
  60. package/dist/collection/components/forms/test-drive.js +6 -6
  61. package/dist/collection/components/forms/vehicle-quotation/VehicleImageViewer.js +1 -1
  62. package/dist/collection/components/forms/vehicle-quotation.js +11 -9
  63. package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
  64. package/dist/collection/components/part-lookup/distributor-lookup.js +2 -2
  65. package/dist/collection/components/part-lookup/manufacturer-part-lookup.js +1 -1
  66. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  67. package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +2 -2
  68. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  69. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +4 -4
  70. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  71. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +8 -8
  72. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  73. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  74. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.js +1 -1
  75. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  76. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +2 -2
  77. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  78. package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +1 -1
  79. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  80. package/dist/collection/components/vehicle-lookup/vehicle-specification.js +1 -1
  81. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  82. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.js +4 -4
  83. package/dist/collection/components/vin-extractor/vin-extractor.css +1 -1
  84. package/dist/collection/components/vin-extractor/vin-extractor.js +1 -1
  85. package/dist/collection/features/form-hook/functions.js +37 -13
  86. package/dist/collection/global/assets/calendar-days-icon.js +6 -0
  87. package/dist/collection/global/assets/clock-8-icon.js +6 -0
  88. package/dist/collection/global/lib/decode-time-offset.js +32 -0
  89. package/dist/components/dead-stock-lookup.js +1 -1
  90. package/dist/components/distributor-lookup.js +1 -1
  91. package/dist/components/flexible-container.js +1 -1
  92. package/dist/components/form-checkbox.js +1 -1
  93. package/dist/components/form-date-picker.d.ts +11 -0
  94. package/dist/components/form-date-picker.js +5 -0
  95. package/dist/components/form-dialog.js +1 -1
  96. package/dist/components/form-input.js +1 -1
  97. package/dist/components/form-phone-number.js +1 -1
  98. package/dist/components/form-picker-input.d.ts +11 -0
  99. package/dist/components/form-picker-input.js +5 -0
  100. package/dist/components/form-select.js +1 -1
  101. package/dist/components/form-shadow-input.js +1 -1
  102. package/dist/components/form-structure-error.js +1 -1
  103. package/dist/components/form-structure.js +1 -1
  104. package/dist/components/form-submit.js +1 -1
  105. package/dist/components/form-switch.js +1 -1
  106. package/dist/components/form-text-area.js +1 -1
  107. package/dist/components/form-time-picker.d.ts +11 -0
  108. package/dist/components/form-time-picker.js +5 -0
  109. package/dist/components/form-vin-input.js +1 -1
  110. package/dist/components/general-inquiry-form.js +1 -1
  111. package/dist/components/information-table.js +1 -1
  112. package/dist/components/loading-spinner.js +1 -1
  113. package/dist/components/manufacturer-lookup.js +1 -1
  114. package/dist/components/manufacturer-part-lookup.js +1 -1
  115. package/dist/components/{p-Bi75CV6R.js → p-3WjYFbnU.js} +1 -1
  116. package/dist/components/p-64G0Y_tC.js +5 -0
  117. package/dist/components/p-7y7dFWS-.js +5 -0
  118. package/dist/components/p-BEClgvwe.js +5 -0
  119. package/dist/components/p-BILW0yP6.js +5 -0
  120. package/dist/components/p-BTqv9A1K.js +5 -0
  121. package/dist/components/p-B_QEyJOO.js +5 -0
  122. package/dist/components/{p-F0WWPE_O.js → p-Bd2-gh8M.js} +1 -1
  123. package/dist/components/p-BffBGA_K.js +5 -0
  124. package/dist/components/p-Bon4whdT.js +5 -0
  125. package/dist/components/{p-CCGW3XAg.js → p-BsFKuBtC.js} +1 -1
  126. package/dist/components/p-C-4CT4ZF.js +5 -0
  127. package/dist/components/p-C6WhIy7O.js +5 -0
  128. package/dist/components/{p-CixlAlH4.js → p-CBXAxKky.js} +1 -1
  129. package/dist/components/p-CEM5EBP0.js +5 -0
  130. package/dist/components/p-CHdx52dw.js +5 -0
  131. package/dist/components/p-CwQEFAEF.js +5 -0
  132. package/dist/components/p-Cxfsh87m.js +5 -0
  133. package/dist/components/p-D-tlRZMk.js +5 -0
  134. package/dist/components/p-D930Q75B.js +5 -0
  135. package/dist/components/p-DA0taq65.js +5 -0
  136. package/dist/components/p-DJKERvsE.js +5 -0
  137. package/dist/components/p-DNn44A0I.js +5 -0
  138. package/dist/components/{p-DEDxfC7_.js → p-Df56BNKV.js} +1 -1
  139. package/dist/components/p-DjDUhW2q.js +5 -0
  140. package/dist/components/{p-Cv4B-c-D.js → p-DkA_i--O.js} +1 -1
  141. package/dist/components/{p-C9NbnDFD.js → p-DqNmAqS_.js} +1 -1
  142. package/dist/components/p-DuNp8sSh.js +5 -0
  143. package/dist/components/p-NEl9bwNq.js +5 -0
  144. package/dist/components/p-RInF2GNQ.js +5 -0
  145. package/dist/components/{p-BtR-iDdk.js → p-_C-vBKCe.js} +1 -1
  146. package/dist/components/p-eTLWmtnI.js +5 -0
  147. package/dist/components/{p-C3JyRnEg.js → p-vEsQVFLN.js} +1 -1
  148. package/dist/components/{p-CFfmHNjt.js → p-zofQKKfh.js} +1 -1
  149. package/dist/components/part-lookup.js +1 -1
  150. package/dist/components/service-booking-form.js +1 -1
  151. package/dist/components/shift-accordion.js +1 -1
  152. package/dist/components/shift-slider.js +1 -1
  153. package/dist/components/shift-tab-content.js +1 -1
  154. package/dist/components/shift-tabs.js +1 -1
  155. package/dist/components/ssc-lookup-form.js +1 -1
  156. package/dist/components/test-drive-form.js +1 -1
  157. package/dist/components/vehicle-accessories.js +1 -1
  158. package/dist/components/vehicle-claimable-items.js +1 -1
  159. package/dist/components/vehicle-item-claim-form.js +1 -1
  160. package/dist/components/vehicle-lookup.js +1 -1
  161. package/dist/components/vehicle-paint-thickness.js +1 -1
  162. package/dist/components/vehicle-quotation-form.js +1 -1
  163. package/dist/components/vehicle-sale-information.js +1 -1
  164. package/dist/components/vehicle-service-history.js +1 -1
  165. package/dist/components/vehicle-specification.js +1 -1
  166. package/dist/components/vehicle-warranty-details.js +1 -1
  167. package/dist/components/vin-extractor.js +1 -1
  168. package/dist/esm/dead-stock-lookup_3.entry.js +7 -7
  169. package/dist/esm/decode-time-offset-Cfi43WoV.js +35 -0
  170. package/dist/esm/flexible-container.entry.js +1 -1
  171. package/dist/esm/form-checkbox.entry.js +1 -1
  172. package/dist/esm/form-date-picker.entry.js +219 -0
  173. package/dist/esm/form-dialog_8.entry.js +800 -0
  174. package/dist/esm/{form-input-prefix-uiMTBAZe.js → form-input-label-BhD_T_C5.js} +1 -9
  175. package/dist/esm/form-input-prefix-C48SfAOK.js +16 -0
  176. package/dist/esm/form-input_4.entry.js +30 -13
  177. package/dist/esm/form-switch.entry.js +2 -2
  178. package/dist/esm/form-time-picker.entry.js +163 -0
  179. package/dist/esm/general-inquiry-form.entry.js +11 -9
  180. package/dist/esm/{get-local-language-B3oLMQ7x.js → get-local-language-CCj6E27L.js} +1 -1
  181. package/dist/esm/index-BILW0yP6.js +22145 -0
  182. package/dist/esm/information-table.entry.js +1 -1
  183. package/dist/esm/{loader-icon-BT-MqKj_.js → loader-icon-DhBPTC5g.js} +39 -15
  184. package/dist/esm/loader.js +1 -1
  185. package/dist/esm/loading-spinner.entry.js +1 -1
  186. package/dist/esm/manufacturer-part-lookup.entry.js +3 -3
  187. package/dist/esm/part-lookup.entry.js +3 -3
  188. package/dist/esm/service-booking-form.entry.js +21 -194
  189. package/dist/esm/shift-components.js +1 -1
  190. package/dist/esm/shift-tab-content.entry.js +1 -1
  191. package/dist/esm/shift-tabs_2.entry.js +10 -10
  192. package/dist/esm/ssc-lookup-form.entry.js +11 -9
  193. package/dist/esm/state-object-Cwph5K2Q.js +238 -0
  194. package/dist/esm/test-drive-form.entry.js +11 -9
  195. package/dist/esm/{type-B96smKVB.js → type-BluG_k1P.js} +1 -1
  196. package/dist/esm/{type-CJFFdz9f.js → type-D_rpjbuj.js} +1 -1
  197. package/dist/esm/{type-BymH_Reb.js → type-zroDKO0U.js} +1 -1
  198. package/dist/esm/vehicle-accessories_7.entry.js +24 -24
  199. package/dist/esm/vehicle-lookup.entry.js +3 -3
  200. package/dist/esm/vehicle-quotation-form.entry.js +14 -11
  201. package/dist/locales/vehicleLookup/saleInformation/ar.json +1 -1
  202. package/dist/locales/vehicleLookup/saleInformation/en.json +1 -1
  203. package/dist/locales/vehicleLookup/saleInformation/ku.json +1 -1
  204. package/dist/locales/vehicleLookup/saleInformation/ru.json +1 -1
  205. package/dist/shift-components/p-0a728fec.entry.js +5 -0
  206. package/dist/shift-components/p-0e630c66.entry.js +5 -0
  207. package/dist/shift-components/p-0f83786b.entry.js +5 -0
  208. package/dist/shift-components/p-1c93d5e6.entry.js +5 -0
  209. package/dist/shift-components/p-26f3e6da.entry.js +5 -0
  210. package/dist/shift-components/p-3a7196d4.entry.js +5 -0
  211. package/dist/shift-components/{p-ce1bf4af.entry.js → p-45670df9.entry.js} +1 -1
  212. package/dist/shift-components/{p-d9234e52.entry.js → p-4aa6f707.entry.js} +1 -1
  213. package/dist/shift-components/p-50fd9d29.entry.js +5 -0
  214. package/dist/shift-components/p-63e1e80e.entry.js +5 -0
  215. package/dist/shift-components/{p-c250576d.entry.js → p-67476178.entry.js} +1 -1
  216. package/dist/shift-components/p-683f3ab3.entry.js +5 -0
  217. package/dist/shift-components/p-8700e868.entry.js +5 -0
  218. package/dist/shift-components/p-90a6803f.entry.js +5 -0
  219. package/dist/shift-components/{p-DPJOLEPo.js → p-B-8v_CQL.js} +1 -1
  220. package/dist/shift-components/p-BILW0yP6.js +5 -0
  221. package/dist/shift-components/{p-C2E0OQuQ.js → p-BK4ZcuiW.js} +1 -1
  222. package/dist/shift-components/p-BVMG8UaH.js +5 -0
  223. package/dist/shift-components/{p-BQaoN4EI.js → p-Bfkguwb-.js} +1 -1
  224. package/dist/shift-components/p-BnQp2Q8E.js +5 -0
  225. package/dist/shift-components/{p-DitnhRjp.js → p-C3YLTa2J.js} +1 -1
  226. package/dist/shift-components/p-DXZTo2xz.js +5 -0
  227. package/dist/shift-components/p-Dgh-j_S7.js +5 -0
  228. package/dist/shift-components/p-XyQhTm0V.js +5 -0
  229. package/dist/shift-components/p-b4231e50.entry.js +5 -0
  230. package/dist/shift-components/p-c7eaf245.entry.js +5 -0
  231. package/dist/shift-components/{p-6f59eb5f.entry.js → p-d7da1152.entry.js} +1 -1
  232. package/dist/shift-components/p-f7692371.entry.js +5 -0
  233. package/dist/shift-components/p-f8ac59ee.entry.js +5 -0
  234. package/dist/shift-components/p-fac0fdb9.entry.js +5 -0
  235. package/dist/shift-components/p-fe02d5ed.entry.js +5 -0
  236. package/dist/shift-components/shift-components.esm.js +1 -1
  237. package/dist/types/components/form-elements/VehicleImageViewer.d.ts +7 -0
  238. package/dist/types/components/form-elements/form-date-picker-legacy.d.ts +44 -0
  239. package/dist/types/components/form-elements/form-input.d.ts +5 -0
  240. package/dist/types/components/form-elements/form-picker-input.d.ts +36 -0
  241. package/dist/types/components/form-elements/form-shadow-input.d.ts +1 -0
  242. package/dist/types/components/form-elements/form-time-picker-legacy.d.ts +38 -0
  243. package/dist/types/components/form-elements/form-vin-input.d.ts +1 -1
  244. package/dist/types/components/forms/defaults/mappers.d.ts +20 -0
  245. package/dist/types/components/forms/defaults/validation.d.ts +5 -1
  246. package/dist/types/components/forms/service-booking.d.ts +5 -7
  247. package/dist/types/components.d.ts +187 -6
  248. package/dist/types/features/form-hook/functions.d.ts +6 -6
  249. package/dist/types/global/assets/calendar-days-icon.d.ts +8 -0
  250. package/dist/types/global/assets/clock-8-icon.d.ts +8 -0
  251. package/dist/types/global/lib/decode-time-offset.d.ts +6 -0
  252. package/dist/types/locales/vehicleLookup/serviceHistory/type.d.ts +2 -2
  253. package/dist/types/locales/vehicleLookup/wrapper-type.d.ts +2 -2
  254. package/package.json +2 -1
  255. package/dist/cjs/form-dialog_2.cjs.entry.js +0 -80
  256. package/dist/cjs/form-phone-number_5.cjs.entry.js +0 -638
  257. package/dist/cjs/state-object-BKYoOET2.js +0 -84
  258. package/dist/components/p-0RPSruUw.js +0 -5
  259. package/dist/components/p-AXXIpFHS.js +0 -5
  260. package/dist/components/p-B6oAdbSG.js +0 -5
  261. package/dist/components/p-B8ficu-2.js +0 -5
  262. package/dist/components/p-BccOXbO6.js +0 -5
  263. package/dist/components/p-BiWhrVwg.js +0 -5
  264. package/dist/components/p-CCnpN4O6.js +0 -5
  265. package/dist/components/p-CMIWLyy-.js +0 -5
  266. package/dist/components/p-CTvhIyUe.js +0 -5
  267. package/dist/components/p-CVPVwYky.js +0 -5
  268. package/dist/components/p-CY-XNpVl.js +0 -5
  269. package/dist/components/p-Cfv1Ad7h.js +0 -5
  270. package/dist/components/p-CmZX4oFn.js +0 -5
  271. package/dist/components/p-DDwq6NYq.js +0 -5
  272. package/dist/components/p-DGmPDcfO.js +0 -5
  273. package/dist/components/p-DnDLOq--.js +0 -5
  274. package/dist/components/p-Dot72Ksm.js +0 -5
  275. package/dist/components/p-DwlUO-mQ.js +0 -5
  276. package/dist/components/p-Dy_xcj4e.js +0 -5
  277. package/dist/components/p-HU3XmNIl.js +0 -5
  278. package/dist/components/p-qgWJBcxw.js +0 -5
  279. package/dist/components/p-uhXr4495.js +0 -5
  280. package/dist/esm/form-dialog_2.entry.js +0 -77
  281. package/dist/esm/form-phone-number_5.entry.js +0 -632
  282. package/dist/esm/state-object-DKRL_FzI.js +0 -79
  283. package/dist/shift-components/p-0e2d3d93.entry.js +0 -5
  284. package/dist/shift-components/p-10da80aa.entry.js +0 -5
  285. package/dist/shift-components/p-1ff500c4.entry.js +0 -5
  286. package/dist/shift-components/p-361e8b06.entry.js +0 -5
  287. package/dist/shift-components/p-38bb86f3.entry.js +0 -5
  288. package/dist/shift-components/p-39914eb3.entry.js +0 -5
  289. package/dist/shift-components/p-76f94eb5.entry.js +0 -5
  290. package/dist/shift-components/p-830b1bea.entry.js +0 -5
  291. package/dist/shift-components/p-835b1234.entry.js +0 -5
  292. package/dist/shift-components/p-92551553.entry.js +0 -5
  293. package/dist/shift-components/p-9c01c8ff.entry.js +0 -5
  294. package/dist/shift-components/p-CaFQm1Ia.js +0 -5
  295. package/dist/shift-components/p-Cf1rwCRV.js +0 -5
  296. package/dist/shift-components/p-DpDKQYgQ.js +0 -5
  297. package/dist/shift-components/p-a2419627.entry.js +0 -5
  298. package/dist/shift-components/p-a9a116b5.entry.js +0 -5
  299. package/dist/shift-components/p-bb5c2961.entry.js +0 -5
  300. package/dist/shift-components/p-bcb6b13e.entry.js +0 -5
  301. package/dist/shift-components/p-e06782ee.entry.js +0 -5
@@ -0,0 +1,238 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { a as create$6 } from './get-local-language-CCj6E27L.js';
6
+ import { v as validateVin } from './validate-vin-CUREVASG.js';
7
+ import { h } from './index-Bf4Ol6Qt.js';
8
+ import { d as dateFnsExports } from './index-BILW0yP6.js';
9
+ import { L as LoaderIcon, g as getPhoneValidator } from './loader-icon-DhBPTC5g.js';
10
+ import { c as cn } from './cn-BK16Cn81.js';
11
+ import { d as decodeTimeOffset } from './decode-time-offset-Cfi43WoV.js';
12
+
13
+ const label = (name) => `${name}-label`;
14
+ const format = (name) => `${name}-format`;
15
+ const require = (name) => `${name}-require`;
16
+ const placeholder = (name) => `${name}-placeholder`;
17
+ const condition = (name) => `$${name}Required`;
18
+ const y = { label, format, require, condition, placeholder };
19
+ const getDefaultValidations = (stateObject) => ({
20
+ name: create$6()
21
+ .meta({ label: label('name'), placeholder: placeholder('name') })
22
+ .when(condition('name'), {
23
+ is: true,
24
+ otherwise: schema => schema.optional(),
25
+ then: schema => schema.required(require('name')).min(3, format('name')),
26
+ }),
27
+ lastName: create$6()
28
+ .meta({ label: label('lastName'), placeholder: placeholder('lastName') })
29
+ .when(condition('lastName'), {
30
+ is: true,
31
+ otherwise: schema => schema.optional(),
32
+ then: schema => schema.required(require('lastName')).min(3, format('lastName')),
33
+ }),
34
+ message: create$6()
35
+ .meta({ label: label('message'), placeholder: placeholder('message') })
36
+ .when(condition('message'), {
37
+ is: true,
38
+ otherwise: schema => schema.optional(),
39
+ then: schema => schema.required(require('message')).min(10, format('message')),
40
+ }),
41
+ email: create$6()
42
+ .meta({ label: label('email'), placeholder: placeholder('email') })
43
+ .when(condition('email'), {
44
+ is: true,
45
+ otherwise: schema => schema.optional(),
46
+ then: schema => schema.required(require('email')),
47
+ })
48
+ .email(format('email')),
49
+ vin: create$6()
50
+ .meta({ label: label('vin'), placeholder: placeholder('vin') })
51
+ .when(condition('vin'), {
52
+ is: true,
53
+ otherwise: schema => schema.optional(),
54
+ then: schema => schema.required(require('vin')).test(format('vin'), format('vin'), a => validateVin(a === null || a === void 0 ? void 0 : a.toUpperCase())),
55
+ }),
56
+ phone: create$6()
57
+ .meta({ label: label('phone'), placeholder: placeholder('phone') })
58
+ .when(condition('phone'), {
59
+ is: true,
60
+ otherwise: schema => schema.optional(),
61
+ then: schema => schema.required(require('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(); }),
62
+ }),
63
+ vehicle: create$6()
64
+ .meta({ label: y.label('vehicle'), placeholder: y.placeholder('vehicle') })
65
+ .when(y.condition('vehicle'), {
66
+ is: true,
67
+ otherwise: schema => schema.optional(),
68
+ then: schema => schema.required(y.require('vehicle')),
69
+ }),
70
+ companyBranchId: create$6()
71
+ .meta({ label: y.label('companyBranchId'), placeholder: y.placeholder('companyBranchId') })
72
+ .when(y.condition('companyBranchId'), {
73
+ is: true,
74
+ otherwise: schema => schema.optional(),
75
+ then: schema => schema.required(y.require('companyBranchId')),
76
+ }),
77
+ date: create$6()
78
+ .meta({ label: label('date'), placeholder: placeholder('date') })
79
+ .when(condition('date'), {
80
+ is: true,
81
+ otherwise: schema => schema.optional(),
82
+ then: schema => schema.required(require('date')),
83
+ }),
84
+ time: create$6()
85
+ .meta({ label: label('time'), placeholder: placeholder('time') })
86
+ .when(condition('time'), {
87
+ is: true,
88
+ otherwise: schema => schema.optional(),
89
+ then: schema => schema.required(require('time')),
90
+ }),
91
+ });
92
+
93
+ const cachedImages = {};
94
+ const cacheImage = (form, imSrc, id) => {
95
+ fetch(imSrc)
96
+ .then(res => res.blob())
97
+ .then(blob => {
98
+ const reader = new FileReader();
99
+ reader.onloadend = () => {
100
+ cachedImages[id] = reader.result;
101
+ form.rerender({ rerenderForm: true });
102
+ };
103
+ reader.readAsDataURL(blob);
104
+ })
105
+ .catch(e => {
106
+ console.log(e);
107
+ // fail silently, keep fallback
108
+ });
109
+ };
110
+ let imageSrcBase64 = '';
111
+ const VehicleImageViewer = ({ form }) => {
112
+ var _a, _b, _c, _d;
113
+ form.addWatcher('vehicle');
114
+ let vehicleId = form.getValue('vehicle');
115
+ let openContainer = !!vehicleId;
116
+ const selectedVehicle = (_a = form.context['vehicleList']) === null || _a === void 0 ? void 0 : _a.find(vehicle => vehicle.value === vehicleId);
117
+ let imSrc;
118
+ if (selectedVehicle) {
119
+ imSrc = (_b = selectedVehicle === null || selectedVehicle === void 0 ? void 0 : selectedVehicle.meta) === null || _b === void 0 ? void 0 : _b.image;
120
+ vehicleId = selectedVehicle.value;
121
+ }
122
+ else if (form.context['vehicleList'] && form.context['vehicleList'][0]) {
123
+ imSrc = (_d = (_c = form.context['vehicleList'][0]) === null || _c === void 0 ? void 0 : _c.meta) === null || _d === void 0 ? void 0 : _d.image;
124
+ vehicleId = form.context['vehicleList'][0].value;
125
+ }
126
+ let isLoading = false;
127
+ if (cachedImages[vehicleId]) {
128
+ imageSrcBase64 = cachedImages[vehicleId];
129
+ }
130
+ else if (form && imSrc && vehicleId) {
131
+ cacheImage(form, imSrc, vehicleId);
132
+ isLoading = true;
133
+ }
134
+ return (h("flexible-container", { isOpened: openContainer },
135
+ h("div", { style: { 'min-height': '60px' }, part: "vehicle-image-wrapper", class: cn('vehicle-image-wrapper', { loading: isLoading }) },
136
+ h("div", { part: cn('vehicle-image-loading-wrapper', { 'vehicle-image-active-loading-wrapper': isLoading }), class: cn('loading-wrapper vehicle-image-loading-wrapper', { 'vehicle-image-active-loading-wrapper': isLoading }) },
137
+ h(LoaderIcon, { part: "vehicle-image-loader-icon", class: "img vehicle-image-loader-icon" })),
138
+ 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' } }))));
139
+ };
140
+
141
+ const CalendarDaysIcon = props => (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" }),
142
+ h("path", { d: "M8 2v4" }),
143
+ h("path", { d: "M16 2v4" }),
144
+ h("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2" }),
145
+ h("path", { d: "M3 10h18" }),
146
+ h("path", { d: "M8 14h.01" }),
147
+ h("path", { d: "M12 14h.01" }),
148
+ h("path", { d: "M16 14h.01" }),
149
+ h("path", { d: "M8 18h.01" }),
150
+ h("path", { d: "M12 18h.01" }),
151
+ h("path", { d: "M16 18h.01" })));
152
+
153
+ const getDefaultMappers = (stateObject) => ({
154
+ submit: ({ props }) => h("form-submit", Object.assign({}, props)),
155
+ name: ({ props }) => h("form-input", Object.assign({}, props)),
156
+ lastName: ({ props }) => h("form-input", Object.assign({}, props)),
157
+ email: ({ props }) => h("form-input", Object.assign({ type: "email" }, props)),
158
+ message: ({ props }) => h("form-text-area", Object.assign({}, props)),
159
+ vin: ({ props }) => h("form-vin-input", Object.assign({}, props)),
160
+ vehicleImage: ({ form }) => h(VehicleImageViewer, { form: form }),
161
+ phone: ({ props, isLoading }) => {
162
+ if (!stateObject.phoneValidator) {
163
+ stateObject.phoneValidator = getPhoneValidator((props === null || props === void 0 ? void 0 : props.countryCode) || '');
164
+ }
165
+ return h("form-phone-number", Object.assign({ defaultValue: stateObject.phoneValidator.default }, props, { isLoading: isLoading, validator: stateObject.phoneValidator }));
166
+ },
167
+ vehicle: ({ form, language, props }) => {
168
+ var _a;
169
+ const fetcher = async ({ signal }) => {
170
+ var _a, _b, _c;
171
+ const vehicleEndpoint = (_a = form.context.structure) === null || _a === void 0 ? void 0 : _a.data.vehicleApi;
172
+ const response = await fetch(vehicleEndpoint, { signal, headers: { 'Accept-Language': language } });
173
+ if ((_c = (_b = form.context.structure) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.vehiclesApiStrapiFormat) {
174
+ const res = await response.json();
175
+ let options = res.data;
176
+ return options.map(vehicle => ({
177
+ label: vehicle.attributes.GradeName,
178
+ value: `${vehicle.id}`,
179
+ meta: Object.assign(Object.assign({}, vehicle), { image: vehicle.attributes.Cover.data.attributes.url }),
180
+ }));
181
+ }
182
+ else {
183
+ const options = await response.json();
184
+ return options.map(vehicle => ({
185
+ label: vehicle.Title,
186
+ value: `${vehicle.ID}`,
187
+ meta: Object.assign(Object.assign({}, vehicle), { image: vehicle.Image }),
188
+ }));
189
+ }
190
+ };
191
+ let defaultValue;
192
+ if (!props.defaultValue) {
193
+ const params = new URLSearchParams(window.location.search);
194
+ defaultValue = params.get((_a = form.context.structure.data) === null || _a === void 0 ? void 0 : _a.vehicleIdQueryParam);
195
+ }
196
+ else {
197
+ defaultValue = props.defaultValue;
198
+ }
199
+ return h("form-select", Object.assign({}, props, { defaultValue: defaultValue, searchable: true, fetcher: fetcher, language: language }));
200
+ },
201
+ companyBranchId: ({ form, language, props }) => {
202
+ const fetcher = async ({ signal }) => {
203
+ var _a;
204
+ const dealerEndpoint = (_a = form.context.structure) === null || _a === void 0 ? void 0 : _a.data.dealerApi;
205
+ const response = await fetch(dealerEndpoint, { signal, headers: { 'Accept-Language': language } });
206
+ const options = (await response.json()).map(dealer => ({
207
+ label: dealer.Name,
208
+ value: `${dealer.ID}`,
209
+ meta: Object.assign({}, dealer),
210
+ }));
211
+ return options;
212
+ };
213
+ return h("form-select", Object.assign({}, props, { clearable: true, searchable: true, fetcher: fetcher, language: language }));
214
+ },
215
+ date: ({ props }) => h("form-picker-input", Object.assign({ type: "date" }, props, { icon: h(CalendarDaysIcon, null) })),
216
+ time: ({ language, props }) => {
217
+ const fetcher = async () => {
218
+ const options = [];
219
+ if (Array.isArray(props.span) && Array.isArray(props.min) && Array.isArray(props.max) && props.format) {
220
+ let tempDate = decodeTimeOffset({ offsets: props.min });
221
+ let maxDate = decodeTimeOffset({ offsets: props.max });
222
+ while (dateFnsExports.isBefore(tempDate, maxDate) || dateFnsExports.isEqual(tempDate, maxDate)) {
223
+ options.push({
224
+ value: dateFnsExports.format(tempDate, props.format),
225
+ label: dateFnsExports.format(tempDate, props.format),
226
+ });
227
+ tempDate = decodeTimeOffset({ offsets: props.span, date: tempDate });
228
+ }
229
+ }
230
+ return options;
231
+ };
232
+ return h("form-select", Object.assign({}, props, { clearable: true, fetcher: fetcher, language: language }));
233
+ },
234
+ });
235
+
236
+ const getDefaultStateObject = () => ({ phoneValidator: undefined });
237
+
238
+ export { getDefaultMappers as a, getDefaultStateObject as b, getDefaultValidations as g, y };
@@ -3,17 +3,19 @@
3
3
  * Copyright (c)
4
4
  */
5
5
  import { r as registerInstance, h, H as Host, a as getElement } from './index-Bf4Ol6Qt.js';
6
- import { f as functionHooks, L as LoaderIcon } from './loader-icon-BT-MqKj_.js';
6
+ import { f as functionHooks, L as LoaderIcon } from './loader-icon-DhBPTC5g.js';
7
7
  import { c as cn } from './cn-BK16Cn81.js';
8
- import { c as create$3, s as sharedFormLocalesSchema } from './get-local-language-B3oLMQ7x.js';
8
+ import { c as create$3, s as sharedFormLocalesSchema } from './get-local-language-CCj6E27L.js';
9
9
  import { g as getLanguageFromUrl } from './get-language-from-url-DS2wH9wf.js';
10
- import { g as getDefaultValidaations, b as getDefaultStateObject, a as getDefaultMappers } from './state-object-DKRL_FzI.js';
10
+ import { g as getDefaultValidations, b as getDefaultStateObject, a as getDefaultMappers } from './state-object-Cwph5K2Q.js';
11
+ import './index-BILW0yP6.js';
11
12
  import './validate-vin-CUREVASG.js';
13
+ import './decode-time-offset-Cfi43WoV.js';
12
14
 
13
- const styleCss = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host{all:initial!important;display:block;font-family:inherit!important}@keyframes form-loading-spin{to{transform:rotate(1turn)}}.form-loader-container .img{animation:form-loading-spin 2s linear infinite;height:32px;width:32px}*{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pointer-events-none{pointer-events:none}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.top-0{top:0}.flex{display:flex}.h-full{height:100%}.min-h-\\[150px\\]{min-height:150px}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500{transition-duration:.5s}.\\!h-auto{height:auto!important}.min-w-full{min-width:100%}.resize{resize:both}.overflow-hidden{overflow:hidden}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!transition-none{transition-property:none!important}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\\!duration-0{transition-duration:0s!important}.\\!duration-500{transition-duration:.5s!important}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.fixed{position:fixed}.bottom-4{bottom:1rem}.left-1\\/2{left:50%}.z-10{z-index:10}.z-\\[9999\\]{z-index:9999}.hidden{display:none}.size-8{height:2rem;width:2rem}.size-\\[32px\\]{height:32px;width:32px}.size-full{height:100%;width:100%}.h-\\[100dvh\\]{height:100dvh}.h-\\[60px\\]{height:60px}.min-h-full{min-height:100%}.w-\\[100dvw\\]{width:100dvw}.w-\\[100px\\]{width:100px}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.justify-between{justify-content:space-between}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\\/30{background-color:rgba(0,0,0,.3)}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.object-cover{object-fit:cover}.object-center{object-position:center}.p-1{padding:.25rem}.p-\\[16px\\]{padding:16px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.text-center{text-align:center}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.hover\\:border-slate-700:hover{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.hover\\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.hover\\:text-slate-700:hover{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.disabled\\:bg-white\\/75:disabled{background-color:hsla(0,0%,100%,.75)}@media (min-width:768px){.md\\:relative{position:relative}.md\\:aspect-auto{aspect-ratio:auto}.md\\:h-auto{height:auto}.md\\:w-\\[600px\\]{width:600px}.md\\:\\!translate-x-0{--tw-translate-x:0px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.md\\:overflow-hidden{overflow:hidden}.md\\:rounded-lg{border-radius:.5rem}.md\\:border-none{border-style:none}.md\\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.md\\:py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.md\\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\\:text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.md\\:\\!opacity-100{opacity:1!important}.md\\:transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.md\\:duration-300{transition-duration:.3s}.md\\:hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}}";
15
+ const styleCss = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}.flex{display:flex}.grid{display:grid}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:host{all:initial!important;display:block;font-family:inherit!important}@keyframes form-loading-spin{to{transform:rotate(1turn)}}.form-loader-container .img{animation:form-loading-spin 2s linear infinite;height:32px;width:32px}*{-webkit-user-select:none;-moz-user-select:none;user-select:none}#vehicle-wrapper{display:flex;flex-direction:column}@media (min-width:640px){#vehicle-wrapper{align-items:center;display:grid;gap:24px;grid-template-columns:repeat(2,minmax(0,1fr))}}.pointer-events-none{pointer-events:none}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.top-0{top:0}.h-full{height:100%}.min-h-\\[150px\\]{min-height:150px}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500{transition-duration:.5s}.-mt-1{margin-top:-.25rem}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.\\!h-auto{height:auto!important}.min-w-full{min-width:100%}.resize{resize:both}.overflow-hidden{overflow:hidden}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.\\!transition-none{transition-property:none!important}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.\\!duration-0{transition-duration:0s!important}.\\!duration-500{transition-duration:.5s!important}.fixed{position:fixed}.bottom-4{bottom:1rem}.left-1\\/2{left:50%}.z-10{z-index:10}.z-\\[9999\\]{z-index:9999}.hidden{display:none}.aspect-video{aspect-ratio:16/9}.size-8{height:2rem;width:2rem}.size-\\[32px\\]{height:32px;width:32px}.size-full{height:100%;width:100%}.h-\\[100dvh\\]{height:100dvh}.h-\\[60px\\]{height:60px}.min-h-full{min-height:100%}.w-\\[100dvw\\]{width:100dvw}.w-\\[100px\\]{width:100px}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.justify-between{justify-content:space-between}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-slate-500{--tw-border-opacity:1;border-color:rgb(100 116 139/var(--tw-border-opacity,1))}.border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\\/30{background-color:rgba(0,0,0,.3)}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.object-cover{object-fit:cover}.object-center{object-position:center}.p-1{padding:.25rem}.p-\\[16px\\]{padding:16px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-slate-100{--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity,1))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.hover\\:border-slate-700:hover{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.hover\\:bg-slate-300:hover{--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity,1))}.hover\\:text-slate-700:hover{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.disabled\\:bg-white\\/75:disabled{background-color:hsla(0,0%,100%,.75)}@media (min-width:768px){.md\\:relative{position:relative}.md\\:h-auto{height:auto}.md\\:w-\\[600px\\]{width:600px}.md\\:\\!translate-x-0{--tw-translate-x:0px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.md\\:overflow-hidden{overflow:hidden}.md\\:rounded-lg{border-radius:.5rem}.md\\:border-none{border-style:none}.md\\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.md\\:py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.md\\:text-\\[24px\\]{font-size:24px}.md\\:text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.md\\:\\!opacity-100{opacity:1!important}.md\\:transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.md\\:duration-300{transition-duration:.3s}.md\\:hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}}";
14
16
 
15
17
  let stateObject = getDefaultStateObject();
16
- const validation = create$3(Object.assign({}, getDefaultValidaations(stateObject)));
18
+ const validation = create$3(Object.assign({}, getDefaultValidations(stateObject)));
17
19
  const elementMapper = Object.assign({}, getDefaultMappers(stateObject));
18
20
  const TestDriveForm = class {
19
21
  constructor(hostRef) {
@@ -41,7 +43,7 @@ const TestDriveForm = class {
41
43
  this.language = getLanguageFromUrl();
42
44
  }
43
45
  async formSubmit(formValues) {
44
- await functionHooks.formSubmittHandler({ context: this, formValues });
46
+ await functionHooks.onFormSubmit({ context: this, formValues });
45
47
  }
46
48
  // #endregion
47
49
  // #region Component Logic
@@ -52,7 +54,7 @@ const TestDriveForm = class {
52
54
  return await functionHooks.formGetFormHandler(this);
53
55
  }
54
56
  async submit() {
55
- await functionHooks.formSubmitHandler(this);
57
+ await functionHooks.handleFormSubmit(this);
56
58
  }
57
59
  async structureChanged(isRendered) {
58
60
  await functionHooks.formStructureRenderedHandler(this, isRendered);
@@ -60,9 +62,9 @@ const TestDriveForm = class {
60
62
  // #endregion
61
63
  render() {
62
64
  var _a, _b;
63
- return (h(Host, { key: '2cafdb258607d2b9403e2081e5789fee9e1c9efe' }, h("div", { key: '4f27101366ff80d740d65d628204882acf559b99', part: cn((_b = (_a = this.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.theme, this.theme) }, h("div", { key: '664bed04c5dc2f850efbd01e89d90236717150e9', part: "form-container", class: "relative min-h-[150px]" }, h("div", { key: 'f1b4bc27fcc4412800a0991930d92cc6e0e41776', part: "form-loader-container", class: cn('form-loader-container absolute top-0 left-0 w-full h-full pointer-events-none flex justify-center items-center transition-opacity duration-500', {
65
+ return (h(Host, { key: '9bcf43def4797b17b5322672651f9f3bd8685673' }, h("div", { key: 'f25e1549593869a93a9e5a38037c33a6c5fe857f', part: cn('shift-form', (_b = (_a = this.structure) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.theme, this.theme) }, h("div", { key: 'eb345a9aba3f3044843431eeec52581eafe3955b', part: "form-container", class: "relative min-h-[150px]" }, h("div", { key: 'bcd0c35133bf72bd2a151b43dc5a63efbc1d0d0a', part: "form-loader-container", class: cn('form-loader-container absolute top-0 left-0 w-full h-full pointer-events-none flex justify-center items-center transition-opacity duration-500', {
64
66
  'opacity-0': this.structureRendered,
65
- }) }, h(LoaderIcon, { key: 'd2aa4a3388764f536bf856686f4b9efcd4d4b104', part: "form-loader-icon", class: "img" })), h("flexible-container", { key: '9d1a4ed4b498228af0beb84acd701e70f916389b', onlyForMounting: true, isOpened: this.structureRendered }, !!this.form && (h("form-structure", { key: 'e816449ef971170131a33922c78539d9b75f0912', form: this.form, fields: this.fields, formId: this.formId, formLocale: this.locale, structure: this.structure, isLoading: this.isLoading, language: this.localeLanguage, errorMessage: this.errorMessage, formElementMapper: elementMapper, successMessage: this.locale['Form submitted successfully.'] || 'Form submitted successfully.' }, h("slot", { key: '3565b739678e069ef7b113312ab47a2ba487b774' }))))))));
67
+ }) }, h(LoaderIcon, { key: '7c484c2d2ef1cbb622379f837801caf84c89be92', part: "form-loader-icon", class: "img" })), h("flexible-container", { key: '4636f9d944ee5b192c8515fb6911a5e600cc0a96', onlyForMounting: true, isOpened: this.structureRendered }, !!this.form && (h("form-structure", { key: 'ccad70c33dfa964511f1350fdaa11b991830d1cc', form: this.form, fields: this.fields, formId: this.formId, formLocale: this.locale, structure: this.structure, isLoading: this.isLoading, language: this.localeLanguage, errorMessage: this.errorMessage, formElementMapper: elementMapper, successMessage: this.locale['Form submitted successfully.'] || 'Form submitted successfully.' }, h("slot", { key: '5d4e0ec46dfc3011a37ebba13dc32c4761e47cd7' }))))))));
66
68
  }
67
69
  get el() { return getElement(this); }
68
70
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
  * Built by ShiftSoftware
3
3
  * Copyright (c)
4
4
  */
5
- import { y as yupTypeMapper } from './get-local-language-B3oLMQ7x.js';
5
+ import { y as yupTypeMapper } from './get-local-language-CCj6E27L.js';
6
6
 
7
7
  const deadStockSchema = yupTypeMapper(['deadStock', 'branch', 'availableQuantity']);
8
8
 
@@ -2,7 +2,7 @@
2
2
  * Built by ShiftSoftware
3
3
  * Copyright (c)
4
4
  */
5
- import { y as yupTypeMapper, c as create$3 } from './get-local-language-B3oLMQ7x.js';
5
+ import { y as yupTypeMapper, c as create$3 } from './get-local-language-CCj6E27L.js';
6
6
 
7
7
  const warrantySchema = yupTypeMapper([
8
8
  'dealer',
@@ -2,7 +2,7 @@
2
2
  * Built by ShiftSoftware
3
3
  * Copyright (c)
4
4
  */
5
- import { y as yupTypeMapper } from './get-local-language-B3oLMQ7x.js';
5
+ import { y as yupTypeMapper } from './get-local-language-CCj6E27L.js';
6
6
 
7
7
  const distributerSchema = yupTypeMapper([
8
8
  'info',