adp-web-components 0.3.14 → 0.3.16

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 (394) hide show
  1. package/dist/cjs/{add-icon-BaoMAIgg.js → add-icon-BklgM02f.js} +1 -1
  2. package/dist/cjs/{app-globals-DBRBLgev.js → app-globals-XGpRBTr6.js} +1 -1
  3. package/dist/cjs/{arrow-icon-CJX1aUJ8.js → arrow-icon-yMlETDbD.js} +1 -1
  4. package/dist/cjs/{arrow-up-icon-B3Z5Myqt.js → arrow-up-icon-BLo1aQC2.js} +1 -1
  5. package/dist/cjs/{form-dialog_13.cjs.entry.js → branch-slot-dropdown_15.cjs.entry.js} +557 -38
  6. package/dist/cjs/{calendar-days-icon-CsHz2cgV.js → calendar-days-icon-Cf14ROXV.js} +1 -1
  7. package/dist/cjs/{check-icon-CqTKjw2o.js → check-icon-DaQxP2EY.js} +1 -1
  8. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +13 -13
  9. package/dist/cjs/{decode-time-offset-DOSaziv5.js → decode-time-offset-DOUImlif.js} +1 -1
  10. package/dist/cjs/flexible-container.cjs.entry.js +4 -4
  11. package/dist/cjs/form-checkbox.cjs.entry.js +4 -4
  12. package/dist/cjs/form-date-picker.cjs.entry.js +8 -8
  13. package/dist/cjs/{form-error-message-K-KI154V.js → form-error-message-BtLdHgxO.js} +1 -1
  14. package/dist/cjs/{form-input-label-uhneFYXO.js → form-input-label-B4lkF89K.js} +1 -1
  15. package/dist/cjs/form-input_7.cjs.entry.js +24 -24
  16. package/dist/cjs/form-switch.cjs.entry.js +4 -4
  17. package/dist/cjs/form-time-picker.cjs.entry.js +9 -9
  18. package/dist/cjs/{functions-DBDDNNNX.js → functions-CGcEF0Sy.js} +3 -3
  19. package/dist/cjs/general-form.cjs.entry.js +10 -10
  20. package/dist/cjs/general-inquiry-form.cjs.entry.js +10 -10
  21. package/dist/cjs/{get-language-from-url-9TyZFCRO.js → get-language-from-url-DwOt9DVH.js} +1 -1
  22. package/dist/cjs/{get-local-language-DjRj7WaF.js → get-local-language-B805IYI-.js} +7 -3
  23. package/dist/cjs/{get-mock-files-Br7Co-Fj.js → get-mock-files-_dswvp-k.js} +2 -2
  24. package/dist/cjs/{index-Bi6W8dMN.js → index-BdHAYIvO.js} +16 -0
  25. package/dist/cjs/information-table.cjs.entry.js +3 -3
  26. package/dist/cjs/{loader-icon-By94sKO7.js → loader-icon-aY56OHXW.js} +1 -1
  27. package/dist/cjs/loader.cjs.js +3 -3
  28. package/dist/cjs/loading-spinner.cjs.entry.js +3 -3
  29. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +5 -5
  30. package/dist/cjs/{mappers-DF2WCWpn.js → mappers-BlH-TAo7.js} +27 -5
  31. package/dist/cjs/{material-card-BqsZgRVE.js → material-card-D1UQcy6U.js} +1 -1
  32. package/dist/cjs/part-lookup.cjs.entry.js +4 -4
  33. package/dist/cjs/{qr-code-scan-B-8WHa22.js → qr-code-scan-CtKK6wLL.js} +1 -1
  34. package/dist/cjs/service-booking-form.cjs.entry.js +10 -10
  35. package/dist/cjs/shift-accordion.cjs.entry.js +2 -2
  36. package/dist/cjs/shift-checkbox.cjs.entry.js +4 -4
  37. package/dist/cjs/shift-components.cjs.js +3 -3
  38. package/dist/cjs/shift-slider.cjs.entry.js +2 -2
  39. package/dist/cjs/shift-switch.cjs.entry.js +3 -3
  40. package/dist/cjs/shift-tab-content.cjs.entry.js +3 -3
  41. package/dist/cjs/shift-tabs_2.cjs.entry.js +15 -15
  42. package/dist/cjs/ssc-lookup-form.cjs.entry.js +10 -10
  43. package/dist/cjs/test-drive-form.cjs.entry.js +10 -10
  44. package/dist/cjs/{triangle-alert-CN15U99s.js → triangle-alert-BjQBwsRv.js} +1 -1
  45. package/dist/cjs/{vehicle-accessories_7.cjs.entry.js → vehicle-accessories_8.cjs.entry.js} +565 -47
  46. package/dist/cjs/{vehicle-info-layout-sV6altzn.js → vehicle-info-layout-CRpL8UMY.js} +1 -1
  47. package/dist/cjs/vehicle-lookup.cjs.entry.js +10 -6
  48. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +7 -7
  49. package/dist/cjs/{get-custom-classes-for-portal-NNOxAU3P.js → white-loader-CveXuRsH.js} +15 -15
  50. package/dist/collection/collection-manifest.json +3 -0
  51. package/dist/collection/components/components/empty.css +1 -1
  52. package/dist/collection/components/components/flexible-container.css +1 -1
  53. package/dist/collection/components/components/flexible-container.js +2 -2
  54. package/dist/collection/components/components/information-table.css +1 -1
  55. package/dist/collection/components/components/loading-spinner.css +1 -1
  56. package/dist/collection/components/components/loading-spinner.js +1 -1
  57. package/dist/collection/components/components/shift-accordion.js +1 -1
  58. package/dist/collection/components/components/shift-checkbox.js +1 -1
  59. package/dist/collection/components/components/shift-portal.css +1 -1
  60. package/dist/collection/components/components/shift-select-dropdown.css +1 -1
  61. package/dist/collection/components/components/shift-select-dropdown.js +2 -2
  62. package/dist/collection/components/components/shift-select.css +1 -1
  63. package/dist/collection/components/components/shift-select.js +3 -3
  64. package/dist/collection/components/components/shift-slider.js +1 -1
  65. package/dist/collection/components/components/shift-switch.js +1 -1
  66. package/dist/collection/components/components/shift-tab-content.css +1 -1
  67. package/dist/collection/components/components/shift-tab-content.js +1 -1
  68. package/dist/collection/components/components/shift-tabs.css +1 -1
  69. package/dist/collection/components/components/shift-tabs.js +2 -2
  70. package/dist/collection/components/form-elements/branch-slot-dropdown.css +1 -0
  71. package/dist/collection/components/form-elements/branch-slot-dropdown.js +405 -0
  72. package/dist/collection/components/form-elements/branch-slot-picker.css +1 -0
  73. package/dist/collection/components/form-elements/branch-slot-picker.js +921 -0
  74. package/dist/collection/components/form-elements/form-checkbox.js +1 -1
  75. package/dist/collection/components/form-elements/form-date-picker-legacy.js +4 -4
  76. package/dist/collection/components/form-elements/form-dialog.js +1 -1
  77. package/dist/collection/components/form-elements/form-file.js +2 -2
  78. package/dist/collection/components/form-elements/form-input.js +2 -2
  79. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  80. package/dist/collection/components/form-elements/form-picker-input.js +2 -2
  81. package/dist/collection/components/form-elements/form-shadow-input.js +1 -1
  82. package/dist/collection/components/form-elements/form-stepper-control.js +2 -2
  83. package/dist/collection/components/form-elements/form-stepper-submit.js +2 -2
  84. package/dist/collection/components/form-elements/form-stepper.js +1 -1
  85. package/dist/collection/components/form-elements/form-structure-error.js +1 -1
  86. package/dist/collection/components/form-elements/form-submit.js +2 -2
  87. package/dist/collection/components/form-elements/form-switch.js +1 -1
  88. package/dist/collection/components/form-elements/form-text-area.js +2 -2
  89. package/dist/collection/components/form-elements/form-time-picker-legacy.js +5 -5
  90. package/dist/collection/components/form-elements/form-vin-input.js +2 -2
  91. package/dist/collection/components/forms/defaults/mappers.js +23 -1
  92. package/dist/collection/components/forms/general-form.js +2 -2
  93. package/dist/collection/components/forms/general-inquiry.js +2 -2
  94. package/dist/collection/components/forms/service-booking.js +2 -2
  95. package/dist/collection/components/forms/ssc-lookup.js +2 -2
  96. package/dist/collection/components/forms/test-drive.js +2 -2
  97. package/dist/collection/components/forms/vehicle-quotation.js +2 -2
  98. package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
  99. package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
  100. package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
  101. package/dist/collection/components/part-lookup/distributor-lookup.js +2 -2
  102. package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
  103. package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
  104. package/dist/collection/components/part-lookup/manufacturer-part-lookup.js +1 -1
  105. package/dist/collection/components/part-lookup/part-lookup.css +1 -1
  106. package/dist/collection/components/vehicle-lookup/components/CoverageTimeline.js +317 -0
  107. package/dist/collection/components/vehicle-lookup/components/claimable-item-popover.js +51 -3
  108. package/dist/collection/components/vehicle-lookup/components/claimable-item.js +14 -1
  109. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  110. package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +2 -2
  111. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  112. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +79 -23
  113. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  114. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +8 -8
  115. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  116. package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +6 -2
  117. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  118. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  119. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +2 -2
  120. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  121. package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +1 -1
  122. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  123. package/dist/collection/components/vehicle-lookup/vehicle-specification.js +1 -1
  124. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  125. package/dist/collection/components/vehicle-lookup/vehicle-warranty-timeline.css +1 -0
  126. package/dist/collection/components/vehicle-lookup/vehicle-warranty-timeline.js +467 -0
  127. package/dist/collection/components/vin-extractor/vin-extractor.js +1 -1
  128. package/dist/collection/global/assets/hourglass-icon.js +6 -0
  129. package/dist/collection/global/assets/lock-icon.js +6 -0
  130. package/dist/collection/global/types/generated/vehicle-lookup/vehicle-extended-warranty-dto.js +1 -0
  131. package/dist/collection/global/types/generated/vehicle-lookup/vehicle-service-item-lock-dto.js +1 -0
  132. package/dist/collection/global/types/generated/vehicle-lookup/vehicle-service-item-prerequisite-dto.js +1 -0
  133. package/dist/collection/locale-mapper.js +5 -1
  134. package/dist/collection/locales/vehicleLookup/warrantyTimeline/type.js +31 -0
  135. package/dist/collection/templates/vehicle-lookup/prototype-assets/extended-warranty/adp-logo.svg +11 -0
  136. package/dist/collection/templates/vehicle-lookup/warranty-mock-data.js +96 -1
  137. package/dist/collection/tests/asset-stub.js +3 -0
  138. package/dist/components/branch-slot-dropdown.d.ts +11 -0
  139. package/dist/components/branch-slot-dropdown.js +5 -0
  140. package/dist/components/branch-slot-picker.d.ts +11 -0
  141. package/dist/components/branch-slot-picker.js +5 -0
  142. package/dist/components/dead-stock-lookup.js +1 -1
  143. package/dist/components/distributor-lookup.js +1 -1
  144. package/dist/components/flexible-container.js +1 -1
  145. package/dist/components/form-checkbox.js +1 -1
  146. package/dist/components/form-date-picker.js +1 -1
  147. package/dist/components/form-dialog.js +1 -1
  148. package/dist/components/form-file.js +1 -1
  149. package/dist/components/form-input-preview.js +1 -1
  150. package/dist/components/form-input.js +1 -1
  151. package/dist/components/form-phone-number.js +1 -1
  152. package/dist/components/form-picker-input.js +1 -1
  153. package/dist/components/form-select.js +1 -1
  154. package/dist/components/form-shadow-input.js +1 -1
  155. package/dist/components/form-stepper-control.js +1 -1
  156. package/dist/components/form-stepper-submit.js +1 -1
  157. package/dist/components/form-stepper.js +1 -1
  158. package/dist/components/form-structure-error.js +1 -1
  159. package/dist/components/form-structure.js +1 -1
  160. package/dist/components/form-submit.js +1 -1
  161. package/dist/components/form-switch.js +1 -1
  162. package/dist/components/form-text-area.js +1 -1
  163. package/dist/components/form-time-picker.js +1 -1
  164. package/dist/components/form-vin-input.js +1 -1
  165. package/dist/components/general-form.js +1 -1
  166. package/dist/components/general-inquiry-form.js +1 -1
  167. package/dist/components/index.js +1 -1
  168. package/dist/components/information-table.js +1 -1
  169. package/dist/components/loading-spinner.js +1 -1
  170. package/dist/components/manufacturer-lookup.js +1 -1
  171. package/dist/components/manufacturer-part-lookup.js +1 -1
  172. package/dist/components/{p-CsqoymFO.js → p-3f-o34tT.js} +1 -1
  173. package/dist/components/{p-DJ66XSRQ.js → p-8TjpeJSM.js} +1 -1
  174. package/dist/components/{p-vYuOlXCR.js → p-B-ee46vn.js} +1 -1
  175. package/dist/components/{p-ABcgwu6F.js → p-B2FtamaW.js} +1 -1
  176. package/dist/components/p-B5VLbYvi.js +5 -0
  177. package/dist/components/p-B7gfOpxv.js +5 -0
  178. package/dist/components/{p-B6_q3Jaz.js → p-B87nMNzg.js} +1 -1
  179. package/dist/components/p-BFM-DcG_.js +5 -0
  180. package/dist/components/{p-DlJAm0cB.js → p-BI9fJaw-.js} +1 -1
  181. package/dist/components/{p-B2ZE4oRD.js → p-BRSUeqZY.js} +1 -1
  182. package/dist/components/p-BRga86YJ.js +5 -0
  183. package/dist/components/{p-DoGNkDP-.js → p-B__72-PA.js} +1 -1
  184. package/dist/components/{p-CRJSM0nN.js → p-BcDVkdxZ.js} +1 -1
  185. package/dist/components/{p-CgimfOQ7.js → p-BrWGW8tX.js} +1 -1
  186. package/dist/components/p-BzXn-wtv.js +5 -0
  187. package/dist/components/{p-BTfZ7GAi.js → p-C4kEe245.js} +1 -1
  188. package/dist/components/{p-DTQIIqm5.js → p-C4o65xY0.js} +1 -1
  189. package/dist/components/{p-qYvbkatn.js → p-C8Fy2Klg.js} +1 -1
  190. package/dist/components/{p-BP6R1nYk.js → p-CADxWthH.js} +1 -1
  191. package/dist/components/p-CCuYl9VQ.js +5 -0
  192. package/dist/components/{p-BIeJEFM6.js → p-CDQ5F3Oe.js} +1 -1
  193. package/dist/components/{p-DWGSY0dp.js → p-CFAD5EiT.js} +1 -1
  194. package/dist/components/{p-SQ4fUegy.js → p-CXDKH9dP.js} +1 -1
  195. package/dist/components/{p-CYGQmS-P.js → p-CkOYv-3p.js} +1 -1
  196. package/dist/components/{p-emKMuKu4.js → p-ClyGZeVx.js} +1 -1
  197. package/dist/components/{p-Bu1VjE_4.js → p-CwhHBYbG.js} +1 -1
  198. package/dist/components/p-Czytw_So.js +5 -0
  199. package/dist/components/{p-0Leiluv7.js → p-D7eC7KnG.js} +1 -1
  200. package/dist/components/{p-DwJkEi88.js → p-DDbQOqlR.js} +1 -1
  201. package/dist/components/{p-BUGOUxbr.js → p-DFDuwRN_.js} +1 -1
  202. package/dist/components/p-DGpQUIZ3.js +5 -0
  203. package/dist/components/{p-CN6RvIb-.js → p-DHx3Ycv-.js} +1 -1
  204. package/dist/components/{p-Y2dufCGw.js → p-DVBif7ht.js} +1 -1
  205. package/dist/components/{p-DIMe8nY5.js → p-DVHM8Qgv.js} +1 -1
  206. package/dist/components/{p-B5T-06-W.js → p-DZQhS99P.js} +1 -1
  207. package/dist/components/{p-A2T8KqHs.js → p-Dr_ggnvT.js} +1 -1
  208. package/dist/components/{p-DJa_zubh.js → p-DsIilFPI.js} +1 -1
  209. package/dist/components/{p-puPUmTHi.js → p-DuG7sgOh.js} +1 -1
  210. package/dist/components/{p-COyo4v_L.js → p-DzVx9lgv.js} +1 -1
  211. package/dist/components/p-WXgB5UwE.js +5 -0
  212. package/dist/components/{p-CCpbwft_.js → p-_LAr7EWQ.js} +1 -1
  213. package/dist/components/{p-CH5Rb3vr.js → p-dHk4hFiZ.js} +1 -1
  214. package/dist/components/{p-DdUaptEO.js → p-mkmziXBF.js} +1 -1
  215. package/dist/components/{p-9zux5VXM.js → p-qYnLW3ti.js} +1 -1
  216. package/dist/components/p-rCUaKToY.js +5 -0
  217. package/dist/components/{p-Dhy4YWgm.js → p-yq14A9cI.js} +1 -1
  218. package/dist/components/part-lookup.js +1 -1
  219. package/dist/components/service-booking-form.js +1 -1
  220. package/dist/components/shift-accordion.js +1 -1
  221. package/dist/components/shift-checkbox.js +1 -1
  222. package/dist/components/shift-portal.js +1 -1
  223. package/dist/components/shift-select-dropdown.js +1 -1
  224. package/dist/components/shift-select.js +1 -1
  225. package/dist/components/shift-slider.js +1 -1
  226. package/dist/components/shift-switch.js +1 -1
  227. package/dist/components/shift-tab-content.js +1 -1
  228. package/dist/components/shift-tabs.js +1 -1
  229. package/dist/components/ssc-lookup-form.js +1 -1
  230. package/dist/components/test-drive-form.js +1 -1
  231. package/dist/components/vehicle-accessories.js +1 -1
  232. package/dist/components/vehicle-claimable-items.js +1 -1
  233. package/dist/components/vehicle-item-claim-form.js +1 -1
  234. package/dist/components/vehicle-lookup.js +1 -1
  235. package/dist/components/vehicle-paint-thickness.js +1 -1
  236. package/dist/components/vehicle-quotation-form.js +1 -1
  237. package/dist/components/vehicle-sale-information.js +1 -1
  238. package/dist/components/vehicle-service-history.js +1 -1
  239. package/dist/components/vehicle-specification.js +1 -1
  240. package/dist/components/vehicle-warranty-details.js +1 -1
  241. package/dist/components/vehicle-warranty-timeline.d.ts +11 -0
  242. package/dist/components/vehicle-warranty-timeline.js +5 -0
  243. package/dist/components/vin-extractor.js +1 -1
  244. package/dist/esm/{add-icon-DxQVyX6U.js → add-icon-DHh6DJXR.js} +1 -1
  245. package/dist/esm/{app-globals-ci3rJxmu.js → app-globals-CusTGK9D.js} +1 -1
  246. package/dist/esm/{arrow-icon-DRTeN2D5.js → arrow-icon-DziuNOTp.js} +1 -1
  247. package/dist/esm/{arrow-up-icon-FAYFxG6c.js → arrow-up-icon-Dw_d-rG9.js} +1 -1
  248. package/dist/esm/{form-dialog_13.entry.js → branch-slot-dropdown_15.entry.js} +554 -37
  249. package/dist/esm/{calendar-days-icon-BOy0a_W-.js → calendar-days-icon-CnASOv7M.js} +1 -1
  250. package/dist/esm/{check-icon-BYK1ESZG.js → check-icon-BZQF4tzH.js} +1 -1
  251. package/dist/esm/dead-stock-lookup_3.entry.js +13 -13
  252. package/dist/esm/{decode-time-offset-ChO_PV6l.js → decode-time-offset-Cib1aJfV.js} +1 -1
  253. package/dist/esm/flexible-container.entry.js +4 -4
  254. package/dist/esm/form-checkbox.entry.js +4 -4
  255. package/dist/esm/form-date-picker.entry.js +8 -8
  256. package/dist/esm/{form-error-message-YvMHko71.js → form-error-message-DWl6p6Dz.js} +1 -1
  257. package/dist/esm/{form-input-label-cuvgzRcH.js → form-input-label-6blOw1BN.js} +1 -1
  258. package/dist/esm/form-input_7.entry.js +23 -23
  259. package/dist/esm/form-switch.entry.js +4 -4
  260. package/dist/esm/form-time-picker.entry.js +9 -9
  261. package/dist/esm/{functions-DG73G3O6.js → functions-LONv8snV.js} +3 -3
  262. package/dist/esm/general-form.entry.js +10 -10
  263. package/dist/esm/general-inquiry-form.entry.js +10 -10
  264. package/dist/esm/{get-language-from-url-C1D-aPDq.js → get-language-from-url-fV-K15uy.js} +1 -1
  265. package/dist/esm/{get-local-language-DsJgnZ5L.js → get-local-language-CizYq_00.js} +7 -3
  266. package/dist/esm/{get-mock-files-_k2h1OdV.js → get-mock-files-k02F3T7q.js} +2 -2
  267. package/dist/esm/{index-Cg4V9l26.js → index-CteZTPhq.js} +16 -1
  268. package/dist/esm/information-table.entry.js +3 -3
  269. package/dist/esm/{loader-icon-B2ls1yXl.js → loader-icon-BvAmA41s.js} +1 -1
  270. package/dist/esm/loader.js +4 -4
  271. package/dist/esm/loading-spinner.entry.js +3 -3
  272. package/dist/esm/manufacturer-part-lookup.entry.js +5 -5
  273. package/dist/esm/{mappers-CeTQZn37.js → mappers-9IKbvPiR.js} +27 -5
  274. package/dist/esm/{material-card-BMtefyp-.js → material-card-jbQd-0as.js} +1 -1
  275. package/dist/esm/part-lookup.entry.js +4 -4
  276. package/dist/esm/{qr-code-scan-CktgNBSD.js → qr-code-scan-B1nViqZl.js} +1 -1
  277. package/dist/esm/service-booking-form.entry.js +10 -10
  278. package/dist/esm/shift-accordion.entry.js +2 -2
  279. package/dist/esm/shift-checkbox.entry.js +4 -4
  280. package/dist/esm/shift-components.js +4 -4
  281. package/dist/esm/shift-slider.entry.js +2 -2
  282. package/dist/esm/shift-switch.entry.js +3 -3
  283. package/dist/esm/shift-tab-content.entry.js +3 -3
  284. package/dist/esm/shift-tabs_2.entry.js +15 -15
  285. package/dist/esm/ssc-lookup-form.entry.js +10 -10
  286. package/dist/esm/test-drive-form.entry.js +10 -10
  287. package/dist/esm/{triangle-alert-D4H9aWiT.js → triangle-alert-Brtqhx2d.js} +1 -1
  288. package/dist/esm/{vehicle-accessories_7.entry.js → vehicle-accessories_8.entry.js} +565 -48
  289. package/dist/esm/{vehicle-info-layout-DQ12Civq.js → vehicle-info-layout-Dmx94GLp.js} +1 -1
  290. package/dist/esm/vehicle-lookup.entry.js +10 -6
  291. package/dist/esm/vehicle-quotation-form.entry.js +7 -7
  292. package/dist/esm/{get-custom-classes-for-portal-C4LvwyrX.js → white-loader-B3tJFuNO.js} +15 -15
  293. package/dist/integration-manifest.json +66 -2
  294. package/dist/locales/vehicleLookup/warrantyTimeline/ar.json +25 -0
  295. package/dist/locales/vehicleLookup/warrantyTimeline/en.json +25 -0
  296. package/dist/locales/vehicleLookup/warrantyTimeline/ku.json +25 -0
  297. package/dist/locales/vehicleLookup/warrantyTimeline/ru.json +25 -0
  298. package/dist/locales/vehicleLookup/warrantyTimeline/type.ts +29 -0
  299. package/dist/mocks/generated/broker-dealer/vehicle-lookup.json +19 -1
  300. package/dist/mocks/generated/edge-cases/vehicle-lookup.json +57 -0
  301. package/dist/mocks/generated/standard-dealer/part-lookup.json +18 -18
  302. package/dist/mocks/generated/standard-dealer/vehicle-lookup.json +123 -2
  303. package/dist/shift-components/{p-8e478de8.entry.js → p-0f576cb7.entry.js} +1 -1
  304. package/dist/shift-components/{p-83a38f2f.entry.js → p-10f68d42.entry.js} +1 -1
  305. package/dist/shift-components/{p-1416551c.entry.js → p-1aaf2b7f.entry.js} +1 -1
  306. package/dist/shift-components/{p-bd772f48.entry.js → p-1e26a2c4.entry.js} +1 -1
  307. package/dist/shift-components/{p-cc3bdbd7.entry.js → p-316aa46b.entry.js} +1 -1
  308. package/dist/shift-components/{p-8387da9d.entry.js → p-404ab3a9.entry.js} +1 -1
  309. package/dist/shift-components/{p-acd9087d.entry.js → p-4c0e75bc.entry.js} +1 -1
  310. package/dist/shift-components/{p-79faecaa.entry.js → p-65aad39b.entry.js} +1 -1
  311. package/dist/shift-components/p-695436be.entry.js +5 -0
  312. package/dist/shift-components/{p-b4f9de18.entry.js → p-6b46a2d7.entry.js} +1 -1
  313. package/dist/shift-components/{p-e65d8cc3.entry.js → p-6fe01a86.entry.js} +1 -1
  314. package/dist/shift-components/p-79150c47.entry.js +5 -0
  315. package/dist/shift-components/{p-9fbdc7fd.entry.js → p-8250a9d6.entry.js} +1 -1
  316. package/dist/shift-components/{p-d73f83a1.entry.js → p-829f24b9.entry.js} +1 -1
  317. package/dist/shift-components/p-902c5265.entry.js +5 -0
  318. package/dist/shift-components/{p-f148f0db.entry.js → p-9d1bbc0c.entry.js} +1 -1
  319. package/dist/shift-components/{p-56f69d7f.entry.js → p-9d41e300.entry.js} +1 -1
  320. package/dist/shift-components/{p-B8RCucpl.js → p-B9kqtQjS.js} +1 -1
  321. package/dist/shift-components/p-BOBRhkdK.js +5 -0
  322. package/dist/shift-components/p-BTNA9XsD.js +5 -0
  323. package/dist/shift-components/{p-CiA8HlYO.js → p-C4NpWwNE.js} +1 -1
  324. package/dist/shift-components/{p-BaC5C1YJ.js → p-C8PvXL-3.js} +1 -1
  325. package/dist/shift-components/p-C_QDvFTV.js +5 -0
  326. package/dist/shift-components/{p-BpCf2ue6.js → p-Ccwtsrgg.js} +1 -1
  327. package/dist/shift-components/p-CteZTPhq.js +6 -0
  328. package/dist/shift-components/p-CzKJCNU9.js +5 -0
  329. package/dist/shift-components/{p-BG5y01yj.js → p-D1ioFMhR.js} +1 -1
  330. package/dist/shift-components/{p-pUYjpajc.js → p-D6syzMN5.js} +1 -1
  331. package/dist/shift-components/{p-FFH7sR1n.js → p-D7cqTTll.js} +1 -1
  332. package/dist/shift-components/p-DWoutohJ.js +5 -0
  333. package/dist/shift-components/{p-BtLpOQVM.js → p-DtD7FZCG.js} +1 -1
  334. package/dist/shift-components/{p-CEfxRHUk.js → p-DzV_ls5o.js} +1 -1
  335. package/dist/shift-components/{p-08Pl1Pmo.js → p-MzYTUgsB.js} +1 -1
  336. package/dist/shift-components/{p-DwFWMVcD.js → p-OlAbjfKx.js} +1 -1
  337. package/dist/shift-components/p-aa2bf198.entry.js +5 -0
  338. package/dist/shift-components/{p-89853d6c.entry.js → p-aac87b64.entry.js} +1 -1
  339. package/dist/shift-components/{p-6a10c7ff.entry.js → p-ac83e668.entry.js} +1 -1
  340. package/dist/shift-components/p-bd1b1b6a.entry.js +5 -0
  341. package/dist/shift-components/{p-CtUQMviL.js → p-bfwabdVa.js} +1 -1
  342. package/dist/shift-components/{p-7ff0ea83.entry.js → p-c6a7902c.entry.js} +1 -1
  343. package/dist/shift-components/{p-d5db4fb4.entry.js → p-cb518142.entry.js} +1 -1
  344. package/dist/shift-components/{p-04b02a2a.entry.js → p-d26cc97e.entry.js} +1 -1
  345. package/dist/shift-components/{p-2b0e3d27.entry.js → p-d6973435.entry.js} +1 -1
  346. package/dist/shift-components/p-f092c7a2.entry.js +5 -0
  347. package/dist/shift-components/p-hABirfUj.js +5 -0
  348. package/dist/shift-components/{p-CRd5RAng.js → p-oFzLYYzz.js} +1 -1
  349. package/dist/shift-components/{p-Dvl1mJ6N.js → p-oQAUbfw7.js} +1 -1
  350. package/dist/shift-components/shift-components.esm.js +1 -1
  351. package/dist/stencil-docs.json +8468 -6799
  352. package/dist/types/components/form-elements/branch-slot-dropdown.d.ts +48 -0
  353. package/dist/types/components/form-elements/branch-slot-picker.d.ts +128 -0
  354. package/dist/types/components/forms/defaults/mappers.d.ts +16 -0
  355. package/dist/types/components/vehicle-lookup/components/CoverageTimeline.d.ts +13 -0
  356. package/dist/types/components/vehicle-lookup/vehicle-claimable-items.d.ts +15 -0
  357. package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +3 -0
  358. package/dist/types/components/vehicle-lookup/vehicle-warranty-timeline.d.ts +46 -0
  359. package/dist/types/components.d.ts +452 -4
  360. package/dist/types/features/multi-lingual/types.d.ts +4 -4
  361. package/dist/types/global/assets/hourglass-icon.d.ts +6 -0
  362. package/dist/types/global/assets/lock-icon.d.ts +6 -0
  363. package/dist/types/global/types/generated/vehicle-lookup/vehicle-extended-warranty-dto.d.ts +9 -0
  364. package/dist/types/global/types/generated/vehicle-lookup/vehicle-service-item-dto.d.ts +2 -0
  365. package/dist/types/global/types/generated/vehicle-lookup/vehicle-service-item-lock-dto.d.ts +5 -0
  366. package/dist/types/global/types/generated/vehicle-lookup/vehicle-service-item-prerequisite-dto.d.ts +6 -0
  367. package/dist/types/global/types/generated/vehicle-lookup/vehicle-warranty-dto.d.ts +4 -0
  368. package/dist/types/locale-mapper.d.ts +2 -1
  369. package/dist/types/locales/type.d.ts +2 -2
  370. package/dist/types/locales/vehicleLookup/paintThickness/type.d.ts +6 -6
  371. package/dist/types/locales/vehicleLookup/warranty/type.d.ts +4 -4
  372. package/dist/types/locales/vehicleLookup/warrantyTimeline/type.d.ts +50 -0
  373. package/dist/types/locales/vehicleLookup/wrapper-type.d.ts +10 -10
  374. package/package.json +1 -1
  375. package/dist/components/p-B6gnG2lN.js +0 -5
  376. package/dist/components/p-B6ib31CX.js +0 -5
  377. package/dist/components/p-BL5YkEz-.js +0 -5
  378. package/dist/components/p-CK3C2jeL.js +0 -5
  379. package/dist/components/p-CbL2RmJ1.js +0 -5
  380. package/dist/components/p-WdDnbO6s.js +0 -5
  381. package/dist/components/p-_i2jGDlH.js +0 -5
  382. package/dist/shift-components/p-214259ae.entry.js +0 -5
  383. package/dist/shift-components/p-2f764c75.entry.js +0 -5
  384. package/dist/shift-components/p-50819229.entry.js +0 -5
  385. package/dist/shift-components/p-64205a8d.entry.js +0 -5
  386. package/dist/shift-components/p-9c950549.entry.js +0 -5
  387. package/dist/shift-components/p-BBmr0kTe.js +0 -5
  388. package/dist/shift-components/p-BVDXHvth.js +0 -5
  389. package/dist/shift-components/p-C_AHRam8.js +0 -5
  390. package/dist/shift-components/p-Cg4V9l26.js +0 -6
  391. package/dist/shift-components/p-D2XgNV12.js +0 -5
  392. package/dist/shift-components/p-D6ZxBLEm.js +0 -5
  393. package/dist/shift-components/p-DlBduQTw.js +0 -5
  394. package/dist/shift-components/p-c3f88c4c.entry.js +0 -5
@@ -0,0 +1,921 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ import { Host, h } from "@stencil/core";
6
+ import cn from "../../global/lib/cn";
7
+ import { ArrowUpIcon } from "../../global/assets/arrow-up-icon";
8
+ import getCustomClassesForPortal from "../../global/lib/get-custom-classes-for-portal";
9
+ import { getInputLocalization } from "../../features/form-hook/index";
10
+ import { FormInputLabel } from "./components/form-input-label";
11
+ import { FormErrorMessage } from "./components/form-error-message";
12
+ const FALLBACK_COPY = {
13
+ en: {
14
+ day: 'Pick a day',
15
+ time: 'Pick a time',
16
+ days: 'days available',
17
+ slots: 'slots',
18
+ idle: 'Choose a branch first',
19
+ empty: 'No times available at this branch',
20
+ error: "Couldn't load available times",
21
+ retry: 'Try again',
22
+ choose: 'Choose date & time',
23
+ loading: 'Loading times…',
24
+ },
25
+ ar: {
26
+ day: 'اختر اليوم',
27
+ time: 'اختر الوقت',
28
+ days: 'يوماً متاحاً',
29
+ slots: 'موعداً',
30
+ idle: 'اختر الفرع أولاً',
31
+ empty: 'لا توجد أوقات متاحة في هذا الفرع',
32
+ error: 'تعذّر تحميل الأوقات المتاحة',
33
+ retry: 'أعد المحاولة',
34
+ choose: 'اختر التاريخ والوقت',
35
+ loading: 'جارٍ تحميل الأوقات…',
36
+ },
37
+ ku: {
38
+ day: 'ڕۆژێک هەڵبژێرە',
39
+ time: 'کاتێک هەڵبژێرە',
40
+ days: 'ڕۆژی بەردەست',
41
+ slots: 'کات',
42
+ idle: 'سەرەتا لقێک هەڵبژێرە',
43
+ empty: 'هیچ کاتێکی بەردەست نییە لەم لقەدا',
44
+ error: 'نەتوانرا کاتە بەردەستەکان باربکرێن',
45
+ retry: 'دووبارە هەوڵ بدە',
46
+ choose: 'بەروار و کات هەڵبژێرە',
47
+ loading: 'کاتەکان باردەکرێن…',
48
+ },
49
+ ru: {
50
+ day: 'Выберите день',
51
+ time: 'Выберите время',
52
+ days: 'дней доступно',
53
+ slots: 'слотов',
54
+ idle: 'Сначала выберите филиал',
55
+ empty: 'В этом филиале нет свободного времени',
56
+ error: 'Не удалось загрузить свободное время',
57
+ retry: 'Повторить',
58
+ choose: 'Выберите дату и время',
59
+ loading: 'Загрузка времени…',
60
+ },
61
+ };
62
+ /**
63
+ * Branch-aware booking slot field.
64
+ *
65
+ * Presents as a normal dropdown — the same `form-input-select` trigger as every
66
+ * other select in the form — and portals its panel onto `document.body` through
67
+ * `shift-portal`, exactly as `shift-select` does.
68
+ *
69
+ * Standalone by design: `form` is optional. Drop `<branch-slot-picker>` on any
70
+ * page, in a PWA or in a native WebView, give it the four ids, and listen to
71
+ * `slotChange`.
72
+ */
73
+ export class BranchSlotPicker {
74
+ constructor() {
75
+ /** Field name. Only meaningful when `form` is supplied. */
76
+ this.name = 'bookingSlot';
77
+ /** How far ahead to ask. The endpoint caps its own response at 15 days. */
78
+ this.daysAhead = 30;
79
+ /** Gap between the trigger and the panel, matching shift-select's default. */
80
+ this.gap = 8;
81
+ this.isRequired = false;
82
+ this.isDisabled = false;
83
+ this.language = 'en';
84
+ this.localization = {};
85
+ this.status = 'idle';
86
+ this.days = [];
87
+ this.selectedDate = '';
88
+ this.selectedRaw = '';
89
+ this.isOpen = false;
90
+ this.dropdownAncestorClasses = '';
91
+ /**
92
+ * The day being browsed in the panel. Kept apart from `selectedDate` so that
93
+ * opening the panel, scrubbing through days and then dismissing it leaves the
94
+ * committed selection untouched.
95
+ */
96
+ this.draftDate = '';
97
+ this.dropdownEl = null;
98
+ this.lockedScrollY = 0;
99
+ this.boundKeyDown = (event) => this.handleKeyDown(event);
100
+ this.displayTime = (raw) => {
101
+ const total = this.minutesOf(raw);
102
+ const date = new Date(2000, 0, 1, Math.floor(total / 60), total % 60);
103
+ return new Intl.DateTimeFormat(this.intlLocales, { hour: 'numeric', minute: '2-digit' }).format(date);
104
+ };
105
+ this.formatDay = (date, options) => {
106
+ // Midday, not midnight: a midnight Date in a negative-offset zone rolls back
107
+ // a day, which silently mislabels every chip.
108
+ const [y, m, d] = date.split('-').map(x => parseInt(x, 10));
109
+ return new Intl.DateTimeFormat(this.intlLocales, options).format(new Date(y, m - 1, d, 12));
110
+ };
111
+ this.setDropdownRef = (el) => {
112
+ this.dropdownEl = el;
113
+ };
114
+ /** Mirrors shift-select: anchor to the trigger, flip up when space is short. */
115
+ this.adjustDropdownPosition = () => {
116
+ const dropdown = this.dropdownEl;
117
+ const trigger = this.getTriggerEl();
118
+ if (!dropdown || !trigger)
119
+ return;
120
+ // Sheet mode is viewport-anchored; CSS owns it entirely.
121
+ if (this.isSheet)
122
+ return;
123
+ const rect = trigger.getBoundingClientRect();
124
+ // Scrolled out of sight — a panel floating over unrelated content is worse
125
+ // than no panel.
126
+ if (!this.isTriggerInView(rect)) {
127
+ this.isOpen = false;
128
+ return;
129
+ }
130
+ const width = Math.max(rect.width, 288);
131
+ dropdown.style.setProperty('--branch-slot-width', `${width}px`);
132
+ const spaceBelow = window.innerHeight - rect.bottom - this.gap * 2;
133
+ const spaceAbove = rect.top - this.gap * 2;
134
+ const openUpwards = spaceBelow < dropdown.offsetHeight && spaceAbove > spaceBelow;
135
+ // Cap the panel to the room that actually exists. Without this the fixed
136
+ // 320px runs off-screen in landscape and with the keyboard up, and there is
137
+ // nothing to scroll to reach it.
138
+ dropdown.style.setProperty('--branch-slot-max-height', `${Math.max(160, Math.min(320, openUpwards ? spaceAbove : spaceBelow))}px`);
139
+ const height = dropdown.offsetHeight;
140
+ // Keep it on-screen horizontally — the panel has a min-width, so a field
141
+ // near the right edge would otherwise hang off it.
142
+ const left = Math.max(this.gap, Math.min(rect.left, window.innerWidth - width - this.gap));
143
+ dropdown.style.setProperty('--branch-slot-left', `${left}px`);
144
+ dropdown.style.setProperty('--branch-slot-top', `${openUpwards ? rect.top - height - this.gap : rect.bottom + this.gap}px`);
145
+ };
146
+ this.handleResize = () => {
147
+ if (this.isOpen)
148
+ this.adjustDropdownPosition();
149
+ };
150
+ this.handleScroll = (event) => {
151
+ if (!this.isOpen)
152
+ return;
153
+ // The sheet does not move with the page, and the page is locked anyway.
154
+ if (this.isSheet)
155
+ return;
156
+ const target = event.target;
157
+ if (this.dropdownEl && (this.dropdownEl === target || this.dropdownEl.contains(target)))
158
+ return;
159
+ this.adjustDropdownPosition();
160
+ };
161
+ this.closeOnOutsideClick = (event) => {
162
+ const path = event.composedPath();
163
+ if (path.includes(this.el))
164
+ return;
165
+ if (this.dropdownEl && path.includes(this.dropdownEl))
166
+ return;
167
+ this.isOpen = false;
168
+ };
169
+ this.toggle = () => {
170
+ if (this.isOpen)
171
+ this.isOpen = false;
172
+ else if (this.status === 'error')
173
+ this.load();
174
+ else
175
+ this.openDropdown();
176
+ };
177
+ this.handleDay = (date) => {
178
+ this.draftDate = date;
179
+ };
180
+ this.handleTime = (raw) => {
181
+ this.selectedDate = raw.split(' ')[0];
182
+ this.selectedRaw = raw;
183
+ this.isOpen = false;
184
+ // The form pulls values — it calls getValue() on every subscribed element at
185
+ // submit time — so there is nothing to push. This only fires the public
186
+ // event, which is what standalone hosts listen to.
187
+ this.slotChange.emit({ date: this.selectedDate, raw, value: this.toFormValue(raw) });
188
+ };
189
+ }
190
+ componentWillLoad() {
191
+ var _a;
192
+ (_a = this.form) === null || _a === void 0 ? void 0 : _a.subscribe(this.name, this);
193
+ this.load();
194
+ }
195
+ componentDidLoad() {
196
+ document.addEventListener('click', this.closeOnOutsideClick);
197
+ document.addEventListener('keydown', this.boundKeyDown);
198
+ window.addEventListener('resize', this.handleResize);
199
+ window.addEventListener('scroll', this.handleScroll, true);
200
+ // The panel is portaled out of the form, so theme classes have to travel
201
+ // with it or it renders unstyled against the host page.
202
+ this.dropdownAncestorClasses = `${this.name}-slot-picker ${getCustomClassesForPortal(this.el)}`;
203
+ }
204
+ disconnectedCallback() {
205
+ var _a, _b;
206
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
207
+ (_b = this.form) === null || _b === void 0 ? void 0 : _b.unsubscribe(this.name);
208
+ document.removeEventListener('click', this.closeOnOutsideClick);
209
+ document.removeEventListener('keydown', this.boundKeyDown);
210
+ window.removeEventListener('resize', this.handleResize);
211
+ window.removeEventListener('scroll', this.handleScroll, true);
212
+ // A teardown while the sheet is open would otherwise leave the page frozen.
213
+ this.releaseScroll();
214
+ }
215
+ onOpenChange(isOpen) {
216
+ // Only the sheet needs this. An anchored dropdown repositions on scroll and
217
+ // freezing the page under it would be wrong.
218
+ if (!this.isSheet)
219
+ return;
220
+ if (isOpen)
221
+ this.lockScroll();
222
+ else
223
+ this.releaseScroll();
224
+ }
225
+ /**
226
+ * Pinning the body position rather than just hiding overflow: on iOS,
227
+ * `overflow: hidden` alone still lets the page rubber-band behind the sheet.
228
+ */
229
+ lockScroll() {
230
+ if (document.body.style.position === 'fixed')
231
+ return;
232
+ this.lockedScrollY = window.scrollY;
233
+ Object.assign(document.body.style, { position: 'fixed', top: `-${this.lockedScrollY}px`, left: '0', right: '0', width: '100%' });
234
+ }
235
+ releaseScroll() {
236
+ if (document.body.style.position !== 'fixed')
237
+ return;
238
+ Object.assign(document.body.style, { position: '', top: '', left: '', right: '', width: '' });
239
+ window.scrollTo(0, this.lockedScrollY);
240
+ }
241
+ onTargetChange() {
242
+ // A different branch invalidates the whole selection, not just the times.
243
+ this.selectedDate = '';
244
+ this.selectedRaw = '';
245
+ this.draftDate = '';
246
+ this.isOpen = false;
247
+ this.load();
248
+ }
249
+ /** FormElement contract. */
250
+ reset(newValue) {
251
+ var _a;
252
+ this.defaultValue = (_a = newValue) !== null && _a !== void 0 ? _a : '';
253
+ this.selectedDate = '';
254
+ this.selectedRaw = '';
255
+ this.draftDate = '';
256
+ }
257
+ getValue() {
258
+ return this.selectedRaw ? this.toFormValue(this.selectedRaw) : this.defaultValue || '';
259
+ }
260
+ /** Lets a host force a refetch, e.g. after a token refresh. */
261
+ async refresh() {
262
+ this.load();
263
+ }
264
+ async openDropdown() {
265
+ var _a;
266
+ if (this.status === 'idle')
267
+ return;
268
+ this.draftDate = this.selectedDate || ((_a = this.days[0]) === null || _a === void 0 ? void 0 : _a.date) || '';
269
+ this.adjustDropdownPosition();
270
+ this.isOpen = true;
271
+ }
272
+ async closeDropdown() {
273
+ this.isOpen = false;
274
+ }
275
+ get isRtl() {
276
+ return this.language === 'ar' || this.language === 'ku';
277
+ }
278
+ get copy() {
279
+ var _a;
280
+ return (_a = FALLBACK_COPY[this.language]) !== null && _a !== void 0 ? _a : FALLBACK_COPY.en;
281
+ }
282
+ get intlLocales() {
283
+ // An array lets Intl fall back on its own when a locale is unavailable —
284
+ // ckb has patchy support in older Android WebViews.
285
+ if (this.language === 'ar')
286
+ return ['ar-IQ', 'ar', 'en-GB'];
287
+ if (this.language === 'ku')
288
+ return ['ckb-IQ', 'ckb', 'ar-IQ', 'en-GB'];
289
+ if (this.language === 'ru')
290
+ return ['ru-RU', 'en-GB'];
291
+ return ['en-GB'];
292
+ }
293
+ pad(n) {
294
+ return String(n).padStart(2, '0');
295
+ }
296
+ /** `2026-08-13 09:00 AM` → minutes since midnight. */
297
+ minutesOf(raw) {
298
+ var _a, _b;
299
+ const parts = raw.split(' ');
300
+ const clock = (_a = parts[1]) !== null && _a !== void 0 ? _a : '00:00';
301
+ const meridiem = ((_b = parts[2]) !== null && _b !== void 0 ? _b : '').toUpperCase();
302
+ const [h, m] = clock.split(':').map(x => parseInt(x, 10) || 0);
303
+ let hour = h % 12;
304
+ if (meridiem === 'PM')
305
+ hour += 12;
306
+ return hour * 60 + m;
307
+ }
308
+ toFormValue(raw) {
309
+ const date = raw.split(' ')[0];
310
+ const total = this.minutesOf(raw);
311
+ return `${date}T${this.pad(Math.floor(total / 60))}:${this.pad(total % 60)}`;
312
+ }
313
+ queryUrl() {
314
+ if (!this.calendarApi || !this.companyId || !this.branchId || !this.departmentId || !this.brandId)
315
+ return null;
316
+ const from = new Date();
317
+ const to = new Date();
318
+ to.setDate(to.getDate() + this.daysAhead);
319
+ const iso = (d) => `${d.getFullYear()}-${this.pad(d.getMonth() + 1)}-${this.pad(d.getDate())}`;
320
+ const qs = new URLSearchParams({
321
+ from: iso(from),
322
+ to: iso(to),
323
+ companyId: this.companyId,
324
+ branchId: this.branchId,
325
+ departmentId: this.departmentId,
326
+ brandId: this.brandId,
327
+ });
328
+ return `${this.calendarApi}${this.calendarApi.includes('?') ? '&' : '?'}${qs.toString()}`;
329
+ }
330
+ /**
331
+ * Overlapping work periods of equal priority make the endpoint emit the same
332
+ * slot more than once (branch 45 returns every time twice), and a merged
333
+ * response is not necessarily ordered. Both are fixed here rather than in the
334
+ * panel, so anything reading `days` gets clean data.
335
+ */
336
+ normalise(raw) {
337
+ return raw
338
+ .filter(entry => entry && entry.Date && Array.isArray(entry.Times) && entry.Times.length)
339
+ .map(entry => ({
340
+ date: entry.Date,
341
+ times: Array.from(new Set(entry.Times)).sort((a, b) => this.minutesOf(a) - this.minutesOf(b)),
342
+ }))
343
+ .sort((a, b) => a.date.localeCompare(b.date));
344
+ }
345
+ async load() {
346
+ var _a;
347
+ const url = this.queryUrl();
348
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
349
+ if (!url) {
350
+ this.status = 'idle';
351
+ this.days = [];
352
+ return;
353
+ }
354
+ this.abortController = new AbortController();
355
+ this.status = 'loading';
356
+ try {
357
+ const response = await fetch(url, {
358
+ signal: this.abortController.signal,
359
+ headers: { 'Accept-Language': this.language },
360
+ });
361
+ if (!response.ok)
362
+ throw new Error(`calendar ${response.status}`);
363
+ this.days = this.normalise(await response.json());
364
+ if (!this.days.length) {
365
+ this.status = 'empty';
366
+ return;
367
+ }
368
+ const preset = this.days.find(day => this.defaultValue && this.defaultValue.startsWith(day.date));
369
+ this.draftDate = (preset !== null && preset !== void 0 ? preset : this.days[0]).date;
370
+ this.status = 'ready';
371
+ }
372
+ catch (error) {
373
+ if ((error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
374
+ return;
375
+ this.status = 'error';
376
+ }
377
+ }
378
+ getTriggerEl() {
379
+ return this.el.getElementsByClassName('form-input-select')[0];
380
+ }
381
+ isTriggerInView(rect) {
382
+ return rect.bottom > 0 && rect.top < window.innerHeight && rect.right > 0 && rect.left < window.innerWidth;
383
+ }
384
+ /**
385
+ * Below this width the panel is a bottom sheet pinned to the viewport, so it
386
+ * is not anchored to anything and none of the positioning below applies. Kept
387
+ * in sync with the media query in branch-slot-dropdown.css.
388
+ */
389
+ get isSheet() {
390
+ return typeof window !== 'undefined' && window.matchMedia('(max-width: 599px)').matches;
391
+ }
392
+ handleKeyDown(event) {
393
+ if (!this.isOpen)
394
+ return;
395
+ if (event.key === 'Escape')
396
+ this.isOpen = false;
397
+ }
398
+ /** What the trigger shows: the committed slot, or why it cannot be opened. */
399
+ triggerText() {
400
+ if (this.status === 'idle')
401
+ return this.copy.idle;
402
+ if (this.status === 'loading')
403
+ return this.copy.loading;
404
+ if (this.status === 'empty')
405
+ return this.copy.empty;
406
+ if (this.status === 'error')
407
+ return this.copy.error;
408
+ if (!this.selectedRaw)
409
+ return '';
410
+ const day = this.formatDay(this.selectedDate, { weekday: 'short', day: 'numeric', month: 'short' });
411
+ return `${day} · ${this.displayTime(this.selectedRaw)}`;
412
+ }
413
+ render() {
414
+ var _a, _b, _c, _d, _e;
415
+ // Inside a form, required/disabled/error come from the form's own state, so
416
+ // this field validates and reports exactly like every other one. Standalone,
417
+ // there is no form to ask and the props stand on their own.
418
+ const state = (_a = this.form) === null || _a === void 0 ? void 0 : _a.getInputState(this.name);
419
+ const localised = this.form ? getInputLocalization(this, state === null || state === void 0 ? void 0 : state.meta, state === null || state === void 0 ? void 0 : state.errorMessage) : null;
420
+ const label = (localised === null || localised === void 0 ? void 0 : localised.label) || ((_c = (_b = this.localization) === null || _b === void 0 ? void 0 : _b[this.language]) === null || _c === void 0 ? void 0 : _c.label) || this.label;
421
+ const placeholder = (localised === null || localised === void 0 ? void 0 : localised.placeholder) || ((_e = (_d = this.localization) === null || _d === void 0 ? void 0 : _d[this.language]) === null || _e === void 0 ? void 0 : _e.placeholder) || this.copy.choose;
422
+ const isRequired = (state === null || state === void 0 ? void 0 : state.isRequired) || this.isRequired;
423
+ // Idle/loading/empty cannot be opened; error can, because the trigger then
424
+ // doubles as the retry affordance.
425
+ const blocked = this.isDisabled || (state === null || state === void 0 ? void 0 : state.disabled) || this.status === 'idle' || this.status === 'loading' || this.status === 'empty';
426
+ const dropdownProps = {
427
+ name: this.name,
428
+ days: this.days,
429
+ copy: this.copy,
430
+ status: this.status,
431
+ isOpen: this.isOpen,
432
+ idleText: this.copy.idle,
433
+ activeDate: this.draftDate,
434
+ handleDay: this.handleDay,
435
+ handleTime: this.handleTime,
436
+ handleRetry: () => this.load(),
437
+ handleDismiss: () => (this.isOpen = false),
438
+ selectedRaw: this.selectedRaw,
439
+ formatDay: this.formatDay,
440
+ displayTime: this.displayTime,
441
+ setElementRef: this.setDropdownRef,
442
+ direction: this.isRtl ? 'rtl' : 'ltr',
443
+ };
444
+ return (h(Host, { key: 'f25a68a643369d3071a1d1634882d50703ede14d', translate: "no" }, h("label", { key: 'fbfdec7c4a82efc2fe6dfe8508120baab17cbe09', part: `${this.name}`, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: blocked }) }, h(FormInputLabel, { key: 'f8b700c24e388e90ba72735f9b6f0fc40e71779c', name: this.name, label: label, isRequired: isRequired }), h("div", { key: '7cff4cd85d9ff56544fbb3ecbc985d171fcf2c68', part: `${this.name}-container form-input-container`, class: cn('form-input-container', { open: this.isOpen, disabled: blocked }) }, h("input", { key: 'd3f6d0e49d24550a960c3deb62fcdc7a80abfa06', type: "text", readOnly: true, disabled: blocked, value: this.triggerText(), placeholder: placeholder, onClick: this.toggle, part: `${this.name}-input-select form-input-select`, class: "form-input-style form-input-select branch-slot-trigger" }), h("div", { key: '913e0d8268f8e2ad2f1a7a121badbe6878ef4a50', part: `${this.name}-select-icon-container form-input-select-icon-container`, class: "form-input-select-icon-container" }, h(ArrowUpIcon, { key: '380c441c1ff629206f2490d63866c62bdbe1f1eb', part: `${this.name}-arrow-icon select-arrow`, class: "form-input-select-icon pointer-events-none! arrow cursor-pointer" })),
445
+ // Stencil only bundles a lazily-portaled component if it also sees
446
+ // the tag in a template. Same guard shift-select uses.
447
+ // @ts-ignore
448
+ false && h("branch-slot-dropdown", { key: '76a27a164f1fee2c0b0f9282108556a9318f3ae9' }), h("shift-portal", { key: 'ac4ad2c23dde76bc1091fba264faed0a591ab544', tag: "branch-slot-dropdown", inheritedClasses: this.dropdownAncestorClasses, componentProps: dropdownProps })), h(FormErrorMessage, { key: 'e6fbd13c4674de5801eeabb981998da37f82183f', name: this.name, isError: !!(state === null || state === void 0 ? void 0 : state.isError), errorMessage: (localised === null || localised === void 0 ? void 0 : localised.errorTextMessage) || '' }))));
449
+ }
450
+ static get is() { return "branch-slot-picker"; }
451
+ static get originalStyleUrls() {
452
+ return {
453
+ "$": ["branch-slot-picker.css"]
454
+ };
455
+ }
456
+ static get styleUrls() {
457
+ return {
458
+ "$": ["branch-slot-picker.css"]
459
+ };
460
+ }
461
+ static get properties() {
462
+ return {
463
+ "name": {
464
+ "type": "string",
465
+ "mutable": false,
466
+ "complexType": {
467
+ "original": "string",
468
+ "resolved": "string",
469
+ "references": {}
470
+ },
471
+ "required": false,
472
+ "optional": false,
473
+ "docs": {
474
+ "tags": [],
475
+ "text": "Field name. Only meaningful when `form` is supplied."
476
+ },
477
+ "getter": false,
478
+ "setter": false,
479
+ "reflect": false,
480
+ "attribute": "name",
481
+ "defaultValue": "'bookingSlot'"
482
+ },
483
+ "form": {
484
+ "type": "unknown",
485
+ "mutable": false,
486
+ "complexType": {
487
+ "original": "FormHook<any>",
488
+ "resolved": "FormHook<any>",
489
+ "references": {
490
+ "FormHook": {
491
+ "location": "import",
492
+ "path": "~features/form-hook/form-hook",
493
+ "id": "src/features/form-hook/form-hook.ts::FormHook",
494
+ "referenceLocation": "FormHook"
495
+ }
496
+ }
497
+ },
498
+ "required": false,
499
+ "optional": true,
500
+ "docs": {
501
+ "tags": [],
502
+ "text": "Optional \u2014 omit for standalone use and listen to `slotChange` instead."
503
+ },
504
+ "getter": false,
505
+ "setter": false
506
+ },
507
+ "calendarApi": {
508
+ "type": "string",
509
+ "mutable": false,
510
+ "complexType": {
511
+ "original": "string",
512
+ "resolved": "string",
513
+ "references": {}
514
+ },
515
+ "required": false,
516
+ "optional": false,
517
+ "docs": {
518
+ "tags": [],
519
+ "text": "Full URL of the calendar endpoint, e.g. `https://\u2026/api/public/calendar`."
520
+ },
521
+ "getter": false,
522
+ "setter": false,
523
+ "reflect": false,
524
+ "attribute": "calendar-api"
525
+ },
526
+ "companyId": {
527
+ "type": "string",
528
+ "mutable": false,
529
+ "complexType": {
530
+ "original": "string",
531
+ "resolved": "string",
532
+ "references": {}
533
+ },
534
+ "required": false,
535
+ "optional": false,
536
+ "docs": {
537
+ "tags": [],
538
+ "text": "Integration ids. The field stays idle until all four are present."
539
+ },
540
+ "getter": false,
541
+ "setter": false,
542
+ "reflect": false,
543
+ "attribute": "company-id"
544
+ },
545
+ "branchId": {
546
+ "type": "string",
547
+ "mutable": false,
548
+ "complexType": {
549
+ "original": "string",
550
+ "resolved": "string",
551
+ "references": {}
552
+ },
553
+ "required": false,
554
+ "optional": false,
555
+ "docs": {
556
+ "tags": [],
557
+ "text": ""
558
+ },
559
+ "getter": false,
560
+ "setter": false,
561
+ "reflect": false,
562
+ "attribute": "branch-id"
563
+ },
564
+ "departmentId": {
565
+ "type": "string",
566
+ "mutable": false,
567
+ "complexType": {
568
+ "original": "string",
569
+ "resolved": "string",
570
+ "references": {}
571
+ },
572
+ "required": false,
573
+ "optional": false,
574
+ "docs": {
575
+ "tags": [],
576
+ "text": ""
577
+ },
578
+ "getter": false,
579
+ "setter": false,
580
+ "reflect": false,
581
+ "attribute": "department-id"
582
+ },
583
+ "brandId": {
584
+ "type": "string",
585
+ "mutable": false,
586
+ "complexType": {
587
+ "original": "string",
588
+ "resolved": "string",
589
+ "references": {}
590
+ },
591
+ "required": false,
592
+ "optional": false,
593
+ "docs": {
594
+ "tags": [],
595
+ "text": ""
596
+ },
597
+ "getter": false,
598
+ "setter": false,
599
+ "reflect": false,
600
+ "attribute": "brand-id"
601
+ },
602
+ "daysAhead": {
603
+ "type": "number",
604
+ "mutable": false,
605
+ "complexType": {
606
+ "original": "number",
607
+ "resolved": "number",
608
+ "references": {}
609
+ },
610
+ "required": false,
611
+ "optional": false,
612
+ "docs": {
613
+ "tags": [],
614
+ "text": "How far ahead to ask. The endpoint caps its own response at 15 days."
615
+ },
616
+ "getter": false,
617
+ "setter": false,
618
+ "reflect": false,
619
+ "attribute": "days-ahead",
620
+ "defaultValue": "30"
621
+ },
622
+ "gap": {
623
+ "type": "number",
624
+ "mutable": false,
625
+ "complexType": {
626
+ "original": "number",
627
+ "resolved": "number",
628
+ "references": {}
629
+ },
630
+ "required": false,
631
+ "optional": false,
632
+ "docs": {
633
+ "tags": [],
634
+ "text": "Gap between the trigger and the panel, matching shift-select's default."
635
+ },
636
+ "getter": false,
637
+ "setter": false,
638
+ "reflect": false,
639
+ "attribute": "gap",
640
+ "defaultValue": "8"
641
+ },
642
+ "label": {
643
+ "type": "string",
644
+ "mutable": false,
645
+ "complexType": {
646
+ "original": "string",
647
+ "resolved": "string",
648
+ "references": {}
649
+ },
650
+ "required": false,
651
+ "optional": true,
652
+ "docs": {
653
+ "tags": [],
654
+ "text": ""
655
+ },
656
+ "getter": false,
657
+ "setter": false,
658
+ "reflect": false,
659
+ "attribute": "label"
660
+ },
661
+ "wrapperId": {
662
+ "type": "string",
663
+ "mutable": false,
664
+ "complexType": {
665
+ "original": "string",
666
+ "resolved": "string",
667
+ "references": {}
668
+ },
669
+ "required": false,
670
+ "optional": false,
671
+ "docs": {
672
+ "tags": [],
673
+ "text": ""
674
+ },
675
+ "getter": false,
676
+ "setter": false,
677
+ "reflect": false,
678
+ "attribute": "wrapper-id"
679
+ },
680
+ "wrapperClass": {
681
+ "type": "string",
682
+ "mutable": false,
683
+ "complexType": {
684
+ "original": "string",
685
+ "resolved": "string",
686
+ "references": {}
687
+ },
688
+ "required": false,
689
+ "optional": false,
690
+ "docs": {
691
+ "tags": [],
692
+ "text": ""
693
+ },
694
+ "getter": false,
695
+ "setter": false,
696
+ "reflect": false,
697
+ "attribute": "wrapper-class"
698
+ },
699
+ "isRequired": {
700
+ "type": "boolean",
701
+ "mutable": false,
702
+ "complexType": {
703
+ "original": "boolean",
704
+ "resolved": "boolean",
705
+ "references": {}
706
+ },
707
+ "required": false,
708
+ "optional": false,
709
+ "docs": {
710
+ "tags": [],
711
+ "text": ""
712
+ },
713
+ "getter": false,
714
+ "setter": false,
715
+ "reflect": false,
716
+ "attribute": "is-required",
717
+ "defaultValue": "false"
718
+ },
719
+ "isDisabled": {
720
+ "type": "boolean",
721
+ "mutable": false,
722
+ "complexType": {
723
+ "original": "boolean",
724
+ "resolved": "boolean",
725
+ "references": {}
726
+ },
727
+ "required": false,
728
+ "optional": false,
729
+ "docs": {
730
+ "tags": [],
731
+ "text": ""
732
+ },
733
+ "getter": false,
734
+ "setter": false,
735
+ "reflect": false,
736
+ "attribute": "is-disabled",
737
+ "defaultValue": "false"
738
+ },
739
+ "language": {
740
+ "type": "string",
741
+ "mutable": false,
742
+ "complexType": {
743
+ "original": "LanguageKeys",
744
+ "resolved": "\"ar\" | \"en\" | \"ku\" | \"ru\"",
745
+ "references": {
746
+ "LanguageKeys": {
747
+ "location": "import",
748
+ "path": "~features/multi-lingual",
749
+ "id": "src/features/multi-lingual/index.ts::LanguageKeys",
750
+ "referenceLocation": "LanguageKeys"
751
+ }
752
+ }
753
+ },
754
+ "required": false,
755
+ "optional": false,
756
+ "docs": {
757
+ "tags": [],
758
+ "text": ""
759
+ },
760
+ "getter": false,
761
+ "setter": false,
762
+ "reflect": false,
763
+ "attribute": "language",
764
+ "defaultValue": "'en'"
765
+ },
766
+ "localization": {
767
+ "type": "unknown",
768
+ "mutable": false,
769
+ "complexType": {
770
+ "original": "FormInputLocalization",
771
+ "resolved": "T",
772
+ "references": {
773
+ "FormInputLocalization": {
774
+ "location": "import",
775
+ "path": "~features/form-hook",
776
+ "id": "src/features/form-hook/index.ts::FormInputLocalization",
777
+ "referenceLocation": "FormInputLocalization"
778
+ }
779
+ }
780
+ },
781
+ "required": false,
782
+ "optional": true,
783
+ "docs": {
784
+ "tags": [],
785
+ "text": ""
786
+ },
787
+ "getter": false,
788
+ "setter": false,
789
+ "defaultValue": "{}"
790
+ },
791
+ "defaultValue": {
792
+ "type": "string",
793
+ "mutable": true,
794
+ "complexType": {
795
+ "original": "string",
796
+ "resolved": "string",
797
+ "references": {}
798
+ },
799
+ "required": false,
800
+ "optional": true,
801
+ "docs": {
802
+ "tags": [],
803
+ "text": "Preselects a slot, in the same `YYYY-MM-DDTHH:mm` form the field emits."
804
+ },
805
+ "getter": false,
806
+ "setter": false,
807
+ "reflect": false,
808
+ "attribute": "default-value"
809
+ }
810
+ };
811
+ }
812
+ static get states() {
813
+ return {
814
+ "status": {},
815
+ "days": {},
816
+ "selectedDate": {},
817
+ "selectedRaw": {},
818
+ "isOpen": {},
819
+ "dropdownAncestorClasses": {},
820
+ "draftDate": {}
821
+ };
822
+ }
823
+ static get events() {
824
+ return [{
825
+ "method": "slotChange",
826
+ "name": "slotChange",
827
+ "bubbles": true,
828
+ "cancelable": true,
829
+ "composed": true,
830
+ "docs": {
831
+ "tags": [],
832
+ "text": "Fires on every confirmed day+time selection. The standalone contract."
833
+ },
834
+ "complexType": {
835
+ "original": "BranchSlotSelection",
836
+ "resolved": "BranchSlotSelection",
837
+ "references": {
838
+ "BranchSlotSelection": {
839
+ "location": "local",
840
+ "path": "/home/vsts/work/1/s/ADP.WebComponents/adp-web-components/src/components/form-elements/branch-slot-picker.tsx",
841
+ "id": "src/components/form-elements/branch-slot-picker.tsx::BranchSlotSelection"
842
+ }
843
+ }
844
+ }
845
+ }];
846
+ }
847
+ static get methods() {
848
+ return {
849
+ "refresh": {
850
+ "complexType": {
851
+ "signature": "() => Promise<void>",
852
+ "parameters": [],
853
+ "references": {
854
+ "Promise": {
855
+ "location": "global",
856
+ "id": "global::Promise"
857
+ }
858
+ },
859
+ "return": "Promise<void>"
860
+ },
861
+ "docs": {
862
+ "text": "Lets a host force a refetch, e.g. after a token refresh.",
863
+ "tags": []
864
+ }
865
+ },
866
+ "openDropdown": {
867
+ "complexType": {
868
+ "signature": "() => Promise<void>",
869
+ "parameters": [],
870
+ "references": {
871
+ "Promise": {
872
+ "location": "global",
873
+ "id": "global::Promise"
874
+ }
875
+ },
876
+ "return": "Promise<void>"
877
+ },
878
+ "docs": {
879
+ "text": "",
880
+ "tags": []
881
+ }
882
+ },
883
+ "closeDropdown": {
884
+ "complexType": {
885
+ "signature": "() => Promise<void>",
886
+ "parameters": [],
887
+ "references": {
888
+ "Promise": {
889
+ "location": "global",
890
+ "id": "global::Promise"
891
+ }
892
+ },
893
+ "return": "Promise<void>"
894
+ },
895
+ "docs": {
896
+ "text": "",
897
+ "tags": []
898
+ }
899
+ }
900
+ };
901
+ }
902
+ static get elementRef() { return "el"; }
903
+ static get watchers() {
904
+ return [{
905
+ "propName": "isOpen",
906
+ "methodName": "onOpenChange"
907
+ }, {
908
+ "propName": "branchId",
909
+ "methodName": "onTargetChange"
910
+ }, {
911
+ "propName": "departmentId",
912
+ "methodName": "onTargetChange"
913
+ }, {
914
+ "propName": "brandId",
915
+ "methodName": "onTargetChange"
916
+ }, {
917
+ "propName": "companyId",
918
+ "methodName": "onTargetChange"
919
+ }];
920
+ }
921
+ }