adp-web-components 0.3.21 → 0.4.1

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 (386) hide show
  1. package/dist/cjs/branch-date-dropdown_17.cjs.entry.js +37 -37
  2. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +9 -9
  3. package/dist/cjs/flexible-container.cjs.entry.js +5 -23
  4. package/dist/cjs/form-checkbox.cjs.entry.js +2 -2
  5. package/dist/cjs/form-date-picker.cjs.entry.js +5 -5
  6. package/dist/cjs/form-input_7.cjs.entry.js +17 -17
  7. package/dist/cjs/form-switch.cjs.entry.js +2 -2
  8. package/dist/cjs/form-time-picker.cjs.entry.js +6 -6
  9. package/dist/cjs/{functions-COlPGX7F.js → functions-BoIF2xlx.js} +1 -1
  10. package/dist/cjs/general-form.cjs.entry.js +4 -4
  11. package/dist/cjs/general-inquiry-form.cjs.entry.js +4 -4
  12. package/dist/cjs/{get-local-language-rWhci9Es.js → get-local-language-BPRCaIar.js} +4 -4
  13. package/dist/cjs/{get-mock-files-Cceb_318.js → get-mock-files-Bi8eYFFc.js} +1 -1
  14. package/dist/cjs/information-table.cjs.entry.js +24 -12
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/loading-spinner.cjs.entry.js +2 -2
  17. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +3 -3
  18. package/dist/cjs/parents-with-tag-CV2Y9Chq.js +26 -0
  19. package/dist/cjs/part-lookup.cjs.entry.js +2 -2
  20. package/dist/cjs/reveal-below-CyYolTYX.js +127 -0
  21. package/dist/cjs/service-booking-form.cjs.entry.js +4 -4
  22. package/dist/cjs/shift-accordion.cjs.entry.js +1 -1
  23. package/dist/cjs/shift-checkbox.cjs.entry.js +2 -2
  24. package/dist/cjs/shift-components.cjs.js +1 -1
  25. package/dist/cjs/shift-slider.cjs.entry.js +1 -1
  26. package/dist/cjs/shift-switch.cjs.entry.js +2 -2
  27. package/dist/cjs/shift-tab-content.cjs.entry.js +2 -2
  28. package/dist/cjs/shift-tabs_2.cjs.entry.js +10 -10
  29. package/dist/cjs/ssc-lookup-form.cjs.entry.js +4 -4
  30. package/dist/cjs/test-drive-form.cjs.entry.js +4 -4
  31. package/dist/cjs/{type-BHyLb1S8.js → type-CTsARyVi.js} +63 -18
  32. package/dist/cjs/vehicle-accessories_8.cjs.entry.js +850 -209
  33. package/dist/cjs/vehicle-lookup.cjs.entry.js +56 -40
  34. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +4 -4
  35. package/dist/collection/collection-manifest.json +1 -1
  36. package/dist/collection/components/components/empty.css +1 -1
  37. package/dist/collection/components/components/flexible-container.css +1 -1
  38. package/dist/collection/components/components/flexible-container.js +2 -2
  39. package/dist/collection/components/components/information-table.css +1 -1
  40. package/dist/collection/components/components/information-table.js +21 -8
  41. package/dist/collection/components/components/loading-spinner.css +1 -1
  42. package/dist/collection/components/components/loading-spinner.js +1 -1
  43. package/dist/collection/components/components/shift-accordion.js +1 -1
  44. package/dist/collection/components/components/shift-checkbox.js +1 -1
  45. package/dist/collection/components/components/shift-portal.css +1 -1
  46. package/dist/collection/components/components/shift-select-dropdown.css +1 -1
  47. package/dist/collection/components/components/shift-select-dropdown.js +2 -2
  48. package/dist/collection/components/components/shift-select.css +1 -1
  49. package/dist/collection/components/components/shift-select.js +3 -3
  50. package/dist/collection/components/components/shift-slider.js +1 -1
  51. package/dist/collection/components/components/shift-switch.js +1 -1
  52. package/dist/collection/components/components/shift-tab-content.css +1 -1
  53. package/dist/collection/components/components/shift-tab-content.js +1 -1
  54. package/dist/collection/components/components/shift-tabs.css +1 -1
  55. package/dist/collection/components/components/shift-tabs.js +2 -2
  56. package/dist/collection/components/form-elements/branch-date-dropdown.js +2 -2
  57. package/dist/collection/components/form-elements/branch-date-picker.js +2 -2
  58. package/dist/collection/components/form-elements/branch-slot-dropdown.css +1 -1
  59. package/dist/collection/components/form-elements/branch-slot-dropdown.js +1 -1
  60. package/dist/collection/components/form-elements/branch-slot-picker.css +1 -1
  61. package/dist/collection/components/form-elements/branch-slot-picker.js +2 -2
  62. package/dist/collection/components/form-elements/form-checkbox.js +1 -1
  63. package/dist/collection/components/form-elements/form-date-picker-legacy.js +4 -4
  64. package/dist/collection/components/form-elements/form-dialog.js +1 -1
  65. package/dist/collection/components/form-elements/form-file.js +2 -2
  66. package/dist/collection/components/form-elements/form-input.js +2 -2
  67. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  68. package/dist/collection/components/form-elements/form-picker-input.js +2 -2
  69. package/dist/collection/components/form-elements/form-shadow-input.js +1 -1
  70. package/dist/collection/components/form-elements/form-stepper-control.js +2 -2
  71. package/dist/collection/components/form-elements/form-stepper-submit.js +2 -2
  72. package/dist/collection/components/form-elements/form-stepper.js +1 -1
  73. package/dist/collection/components/form-elements/form-structure-error.js +1 -1
  74. package/dist/collection/components/form-elements/form-submit.js +2 -2
  75. package/dist/collection/components/form-elements/form-switch.js +1 -1
  76. package/dist/collection/components/form-elements/form-text-area.js +2 -2
  77. package/dist/collection/components/form-elements/form-time-picker-legacy.js +5 -5
  78. package/dist/collection/components/form-elements/form-vin-input.js +2 -2
  79. package/dist/collection/components/forms/general-form.js +2 -2
  80. package/dist/collection/components/forms/general-inquiry.js +2 -2
  81. package/dist/collection/components/forms/service-booking.js +2 -2
  82. package/dist/collection/components/forms/ssc-lookup.js +2 -2
  83. package/dist/collection/components/forms/test-drive.js +2 -2
  84. package/dist/collection/components/forms/vehicle-quotation.js +2 -2
  85. package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
  86. package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
  87. package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
  88. package/dist/collection/components/part-lookup/distributor-lookup.js +2 -2
  89. package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
  90. package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
  91. package/dist/collection/components/part-lookup/manufacturer-part-lookup.js +1 -1
  92. package/dist/collection/components/part-lookup/part-lookup.css +1 -1
  93. package/dist/collection/components/vehicle-lookup/components/CoverageTimeline.js +5 -8
  94. package/dist/collection/components/vehicle-lookup/components/SscCampaigns.js +236 -0
  95. package/dist/collection/components/vehicle-lookup/components/glyphs.js +19 -0
  96. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  97. package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +3 -3
  98. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  99. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +61 -9
  100. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  101. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +6 -6
  102. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  103. package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +99 -59
  104. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  105. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.js +1 -1
  106. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  107. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +3 -3
  108. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  109. package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +2 -2
  110. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  111. package/dist/collection/components/vehicle-lookup/vehicle-specification.js +2 -2
  112. package/dist/collection/components/vehicle-lookup/vehicle-ssc.css +1 -0
  113. package/dist/collection/components/vehicle-lookup/{vehicle-warranty-details.js → vehicle-ssc.js} +614 -194
  114. package/dist/collection/components/vehicle-lookup/vehicle-warranty-timeline.css +1 -1
  115. package/dist/collection/components/vehicle-lookup/vehicle-warranty-timeline.js +5 -6
  116. package/dist/collection/components/vin-extractor/vin-extractor.js +1 -1
  117. package/dist/collection/features/vehicle-lookup-component/index.js +1 -0
  118. package/dist/collection/features/vehicle-lookup-component/request-headers.js +42 -0
  119. package/dist/collection/features/vehicle-lookup-component/vehicle-lookup-api-integration.js +9 -7
  120. package/dist/collection/global/lib/flexible-parents.js +46 -0
  121. package/dist/collection/global/lib/reveal-below.js +118 -0
  122. package/dist/collection/global/types/generated/vehicle-lookup/ssc-repair-trace-dto.js +1 -0
  123. package/dist/collection/global/types/generated/vehicle-lookup/ssc-repair-trace-labor-code-dto.js +1 -0
  124. package/dist/collection/global/types/generated/vehicle-lookup/ssc-repair-trace-labor-line-dto.js +1 -0
  125. package/dist/collection/global/types/generated/vehicle-lookup/ssc-repair-trace-warranty-claim-dto.js +1 -0
  126. package/dist/collection/locale-mapper.js +3 -3
  127. package/dist/collection/locales/vehicleLookup/ssc/type.js +70 -0
  128. package/dist/collection/locales/vehicleLookup/wrapper-type.js +2 -2
  129. package/dist/collection/templates/harness.js +3 -1
  130. package/dist/components/branch-date-dropdown.js +1 -1
  131. package/dist/components/branch-date-picker.js +1 -1
  132. package/dist/components/branch-slot-dropdown.js +1 -1
  133. package/dist/components/branch-slot-picker.js +1 -1
  134. package/dist/components/dead-stock-lookup.js +1 -1
  135. package/dist/components/distributor-lookup.js +1 -1
  136. package/dist/components/flexible-container.js +1 -1
  137. package/dist/components/form-checkbox.js +1 -1
  138. package/dist/components/form-date-picker.js +1 -1
  139. package/dist/components/form-dialog.js +1 -1
  140. package/dist/components/form-file.js +1 -1
  141. package/dist/components/form-input-preview.js +1 -1
  142. package/dist/components/form-input.js +1 -1
  143. package/dist/components/form-phone-number.js +1 -1
  144. package/dist/components/form-picker-input.js +1 -1
  145. package/dist/components/form-select.js +1 -1
  146. package/dist/components/form-shadow-input.js +1 -1
  147. package/dist/components/form-stepper-control.js +1 -1
  148. package/dist/components/form-stepper-submit.js +1 -1
  149. package/dist/components/form-stepper.js +1 -1
  150. package/dist/components/form-structure-error.js +1 -1
  151. package/dist/components/form-structure.js +1 -1
  152. package/dist/components/form-submit.js +1 -1
  153. package/dist/components/form-switch.js +1 -1
  154. package/dist/components/form-text-area.js +1 -1
  155. package/dist/components/form-time-picker.js +1 -1
  156. package/dist/components/form-vin-input.js +1 -1
  157. package/dist/components/general-form.js +1 -1
  158. package/dist/components/general-inquiry-form.js +1 -1
  159. package/dist/components/information-table.js +1 -1
  160. package/dist/components/loading-spinner.js +1 -1
  161. package/dist/components/manufacturer-lookup.js +1 -1
  162. package/dist/components/manufacturer-part-lookup.js +1 -1
  163. package/dist/components/{p-CDdYNb7K.js → p-3srybk04.js} +1 -1
  164. package/dist/components/{p-Dsu3xdDz.js → p-5PJtxaSF.js} +1 -1
  165. package/dist/components/{p-BoQgpmtN.js → p-8JAXcyx8.js} +1 -1
  166. package/dist/components/{p-CYuQunRn.js → p-B4vHwF1I.js} +1 -1
  167. package/dist/components/{p-nX_t9aCK.js → p-B7OLLrcA.js} +1 -1
  168. package/dist/components/{p-CU0gZwVU.js → p-BBZ9h1N0.js} +1 -1
  169. package/dist/components/p-BGkXfkCv.js +5 -0
  170. package/dist/components/{p-OdEwTuBq.js → p-BSU3azxv.js} +1 -1
  171. package/dist/components/{p-BwKzJeLy.js → p-BYRlvNii.js} +1 -1
  172. package/dist/components/p-B_1NtFJh.js +5 -0
  173. package/dist/components/{p-CmIFPUXD.js → p-BlpEaYNy.js} +1 -1
  174. package/dist/components/{p-DFKEx7TJ.js → p-BmqqvfSO.js} +1 -1
  175. package/dist/components/p-BoXPpy-O.js +5 -0
  176. package/dist/components/{p-Wfd6v4yE.js → p-Brn0yPz6.js} +1 -1
  177. package/dist/components/p-BtipOZUG.js +5 -0
  178. package/dist/components/{p-yWyKiQgx.js → p-BtsUnQg8.js} +1 -1
  179. package/dist/components/{p-C1I6zBo7.js → p-C2Rek_O6.js} +1 -1
  180. package/dist/components/{p-CE9wNugx.js → p-C9Yt2FEi.js} +1 -1
  181. package/dist/components/p-C9uBduBY.js +5 -0
  182. package/dist/components/{p-BgJljKxp.js → p-CCu0O_ud.js} +1 -1
  183. package/dist/components/p-CGg_zTw_.js +5 -0
  184. package/dist/components/p-CGrk6CsB.js +5 -0
  185. package/dist/components/p-CGuZmJQb.js +5 -0
  186. package/dist/components/{p-40jijfEq.js → p-CIoAFWwG.js} +1 -1
  187. package/dist/components/{p-Dl0BmrLe.js → p-CK4mf-4k.js} +1 -1
  188. package/dist/components/p-CP0ARfFD.js +5 -0
  189. package/dist/components/p-CP502WVr.js +5 -0
  190. package/dist/components/{p-DaQOYb2R.js → p-CRvBKqFL.js} +1 -1
  191. package/dist/components/{p-3450p9UN.js → p-C_JD7r43.js} +1 -1
  192. package/dist/components/{p-HpXp7TBt.js → p-ChBR-zl5.js} +1 -1
  193. package/dist/components/{p-CjQ2hRI-.js → p-Cpg1zisv.js} +1 -1
  194. package/dist/components/{p-CjdYtmBI.js → p-Cy8khSKP.js} +1 -1
  195. package/dist/components/{p-O0AragmD.js → p-D1uN8yoZ.js} +1 -1
  196. package/dist/components/p-D8f7alDh.js +5 -0
  197. package/dist/components/{p-CXigg5tn.js → p-DBaY1d1H.js} +1 -1
  198. package/dist/components/{p-BcbFXFPI.js → p-DUf2UXLh.js} +1 -1
  199. package/dist/components/p-DkPiQv-q.js +5 -0
  200. package/dist/components/{p-Ce2mazYo.js → p-DrF7UQxE.js} +1 -1
  201. package/dist/components/p-EdmsQERC.js +5 -0
  202. package/dist/components/{p-3kY-T9ID.js → p-J4ycJc9N.js} +1 -1
  203. package/dist/components/{p-Dd_3uKgv.js → p-Ju9wl6f3.js} +1 -1
  204. package/dist/components/p-M-Eh9oXr.js +5 -0
  205. package/dist/components/p-M8EGY8dT.js +5 -0
  206. package/dist/components/p-SFsQZegW.js +5 -0
  207. package/dist/components/{p-zeGxLJvE.js → p-Ub4_exfj.js} +1 -1
  208. package/dist/components/p-WIpbRULc.js +5 -0
  209. package/dist/components/p-Wj1ZYmiQ.js +5 -0
  210. package/dist/components/{p-DDhVlLOx.js → p-alNayf2Z.js} +1 -1
  211. package/dist/components/{p-BTt7sEhA.js → p-pTG13K0y.js} +1 -1
  212. package/dist/components/{p-BpHkd1L9.js → p-vuYBsCyI.js} +1 -1
  213. package/dist/components/p-ziEMlegx.js +5 -0
  214. package/dist/components/part-lookup.js +1 -1
  215. package/dist/components/service-booking-form.js +1 -1
  216. package/dist/components/shift-accordion.js +1 -1
  217. package/dist/components/shift-checkbox.js +1 -1
  218. package/dist/components/shift-portal.js +1 -1
  219. package/dist/components/shift-select-dropdown.js +1 -1
  220. package/dist/components/shift-select.js +1 -1
  221. package/dist/components/shift-slider.js +1 -1
  222. package/dist/components/shift-switch.js +1 -1
  223. package/dist/components/shift-tab-content.js +1 -1
  224. package/dist/components/shift-tabs.js +1 -1
  225. package/dist/components/ssc-lookup-form.js +1 -1
  226. package/dist/components/test-drive-form.js +1 -1
  227. package/dist/components/vehicle-accessories.js +1 -1
  228. package/dist/components/vehicle-claimable-items.js +1 -1
  229. package/dist/components/vehicle-item-claim-form.js +1 -1
  230. package/dist/components/vehicle-lookup.js +1 -1
  231. package/dist/components/vehicle-paint-thickness.js +1 -1
  232. package/dist/components/vehicle-quotation-form.js +1 -1
  233. package/dist/components/vehicle-sale-information.js +1 -1
  234. package/dist/components/vehicle-service-history.js +1 -1
  235. package/dist/components/vehicle-specification.js +1 -1
  236. package/dist/components/vehicle-ssc.d.ts +11 -0
  237. package/dist/components/vehicle-ssc.js +5 -0
  238. package/dist/components/vehicle-warranty-timeline.js +1 -1
  239. package/dist/components/vin-extractor.js +1 -1
  240. package/dist/esm/branch-date-dropdown_17.entry.js +37 -37
  241. package/dist/esm/dead-stock-lookup_3.entry.js +9 -9
  242. package/dist/esm/flexible-container.entry.js +4 -22
  243. package/dist/esm/form-checkbox.entry.js +2 -2
  244. package/dist/esm/form-date-picker.entry.js +5 -5
  245. package/dist/esm/form-input_7.entry.js +17 -17
  246. package/dist/esm/form-switch.entry.js +2 -2
  247. package/dist/esm/form-time-picker.entry.js +6 -6
  248. package/dist/esm/{functions-DJ_k25ew.js → functions-BtbnACx_.js} +1 -1
  249. package/dist/esm/general-form.entry.js +4 -4
  250. package/dist/esm/general-inquiry-form.entry.js +4 -4
  251. package/dist/esm/{get-local-language-Bx6zWD91.js → get-local-language-BOTR5Kxb.js} +4 -4
  252. package/dist/esm/{get-mock-files-BBSjMVMQ.js → get-mock-files-CI8h9TGH.js} +1 -1
  253. package/dist/esm/information-table.entry.js +22 -10
  254. package/dist/esm/loader.js +1 -1
  255. package/dist/esm/loading-spinner.entry.js +2 -2
  256. package/dist/esm/manufacturer-part-lookup.entry.js +3 -3
  257. package/dist/esm/parents-with-tag-WIpbRULc.js +24 -0
  258. package/dist/esm/part-lookup.entry.js +2 -2
  259. package/dist/esm/reveal-below-DWXRi5w3.js +124 -0
  260. package/dist/esm/service-booking-form.entry.js +4 -4
  261. package/dist/esm/shift-accordion.entry.js +1 -1
  262. package/dist/esm/shift-checkbox.entry.js +2 -2
  263. package/dist/esm/shift-components.js +1 -1
  264. package/dist/esm/shift-slider.entry.js +1 -1
  265. package/dist/esm/shift-switch.entry.js +2 -2
  266. package/dist/esm/shift-tab-content.entry.js +2 -2
  267. package/dist/esm/shift-tabs_2.entry.js +10 -10
  268. package/dist/esm/ssc-lookup-form.entry.js +4 -4
  269. package/dist/esm/test-drive-form.entry.js +4 -4
  270. package/dist/esm/{type-DEzFTlhs.js → type-CQsUzIOf.js} +63 -18
  271. package/dist/esm/vehicle-accessories_8.entry.js +850 -209
  272. package/dist/esm/vehicle-lookup.entry.js +56 -40
  273. package/dist/esm/vehicle-quotation-form.entry.js +4 -4
  274. package/dist/integration-manifest.json +38 -23
  275. package/dist/locales/vehicleLookup/ssc/ar.json +64 -0
  276. package/dist/locales/vehicleLookup/ssc/en.json +64 -0
  277. package/dist/locales/vehicleLookup/ssc/ku.json +64 -0
  278. package/dist/locales/vehicleLookup/ssc/ru.json +64 -0
  279. package/dist/locales/vehicleLookup/ssc/type.ts +68 -0
  280. package/dist/locales/vehicleLookup/wrapper-type.ts +2 -2
  281. package/dist/mocks/generated/broker-dealer/vehicle-lookup.json +40 -2
  282. package/dist/mocks/generated/standard-dealer/vehicle-lookup.json +61 -2
  283. package/dist/shift-components/{p-0398f3c4.entry.js → p-01ef46a4.entry.js} +1 -1
  284. package/dist/shift-components/p-1b7a0b56.entry.js +5 -0
  285. package/dist/shift-components/p-1d93dd0f.entry.js +5 -0
  286. package/dist/shift-components/{p-1a0b40e6.entry.js → p-22d7f148.entry.js} +1 -1
  287. package/dist/shift-components/{p-cc900265.entry.js → p-2e15bfc3.entry.js} +1 -1
  288. package/dist/shift-components/{p-e02f3a3f.entry.js → p-44bc2f4d.entry.js} +1 -1
  289. package/dist/shift-components/p-453a643a.entry.js +5 -0
  290. package/dist/shift-components/p-4818e499.entry.js +5 -0
  291. package/dist/shift-components/p-4e5448da.entry.js +5 -0
  292. package/dist/shift-components/p-529dc71d.entry.js +5 -0
  293. package/dist/shift-components/{p-c197b86b.entry.js → p-5ca9f913.entry.js} +1 -1
  294. package/dist/shift-components/p-615471cd.entry.js +5 -0
  295. package/dist/shift-components/{p-a1b97bce.entry.js → p-6704f14c.entry.js} +1 -1
  296. package/dist/shift-components/{p-020fbe81.entry.js → p-72d60d70.entry.js} +1 -1
  297. package/dist/shift-components/p-8623889b.entry.js +5 -0
  298. package/dist/shift-components/p-C68bG4KE.js +5 -0
  299. package/dist/shift-components/p-Tjvj6pk4.js +5 -0
  300. package/dist/shift-components/{p-3YRvA44H.js → p-Vn-59FWk.js} +1 -1
  301. package/dist/shift-components/p-WIpbRULc.js +5 -0
  302. package/dist/shift-components/{p-d23d9d1f.entry.js → p-b59814e8.entry.js} +1 -1
  303. package/dist/shift-components/{p-327774de.entry.js → p-be19d7ff.entry.js} +1 -1
  304. package/dist/shift-components/{p-8870420e.entry.js → p-c070868c.entry.js} +1 -1
  305. package/dist/shift-components/{p-165ff895.entry.js → p-cf09a231.entry.js} +1 -1
  306. package/dist/shift-components/{p-95a4096f.entry.js → p-d2619ed3.entry.js} +1 -1
  307. package/dist/shift-components/p-d47428d1.entry.js +5 -0
  308. package/dist/shift-components/{p-10882717.entry.js → p-d9498a58.entry.js} +1 -1
  309. package/dist/shift-components/{p-f30a355a.entry.js → p-da019c70.entry.js} +1 -1
  310. package/dist/shift-components/{p-c2512cb2.entry.js → p-dd104fca.entry.js} +1 -1
  311. package/dist/shift-components/{p-7e89d3fc.entry.js → p-de2f961f.entry.js} +1 -1
  312. package/dist/shift-components/p-dmBPGl8u.js +5 -0
  313. package/dist/shift-components/{p-7f2e2763.entry.js → p-f5c26761.entry.js} +1 -1
  314. package/dist/shift-components/{p-DwFtCPcT.js → p-wZPqPELt.js} +1 -1
  315. package/dist/shift-components/shift-components.esm.js +1 -1
  316. package/dist/stencil-docs.json +260 -102
  317. package/dist/types/components/components/information-table.d.ts +3 -0
  318. package/dist/types/components/vehicle-lookup/components/SscCampaigns.d.ts +128 -0
  319. package/dist/types/components/vehicle-lookup/components/glyphs.d.ts +15 -0
  320. package/dist/types/components/vehicle-lookup/vehicle-claimable-items.d.ts +6 -1
  321. package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +25 -6
  322. package/dist/types/components/vehicle-lookup/vehicle-ssc.d.ts +226 -0
  323. package/dist/types/components/vehicle-lookup/vehicle-warranty-timeline.d.ts +3 -4
  324. package/dist/types/components.d.ts +214 -43
  325. package/dist/types/features/vehicle-lookup-component/index.d.ts +1 -0
  326. package/dist/types/features/vehicle-lookup-component/interface.d.ts +8 -1
  327. package/dist/types/features/vehicle-lookup-component/request-headers.d.ts +40 -0
  328. package/dist/types/global/lib/flexible-parents.d.ts +16 -0
  329. package/dist/types/global/lib/reveal-below.d.ts +26 -0
  330. package/dist/types/global/types/generated/vehicle-lookup/ssc-dto.d.ts +3 -0
  331. package/dist/types/global/types/generated/vehicle-lookup/ssc-repair-trace-dto.d.ts +12 -0
  332. package/dist/types/global/types/generated/vehicle-lookup/ssc-repair-trace-labor-code-dto.d.ts +4 -0
  333. package/dist/types/global/types/generated/vehicle-lookup/ssc-repair-trace-labor-line-dto.d.ts +9 -0
  334. package/dist/types/global/types/generated/vehicle-lookup/ssc-repair-trace-warranty-claim-dto.d.ts +13 -0
  335. package/dist/types/locale-mapper.d.ts +2 -2
  336. package/dist/types/locales/vehicleLookup/serviceHistory/type.d.ts +2 -2
  337. package/dist/types/locales/vehicleLookup/ssc/type.d.ts +128 -0
  338. package/dist/types/locales/vehicleLookup/warrantyTimeline/type.d.ts +4 -4
  339. package/dist/types/locales/vehicleLookup/wrapper-type.d.ts +126 -36
  340. package/package.json +1 -1
  341. package/dist/cjs/arrow-icon-yMlETDbD.js +0 -11
  342. package/dist/collection/components/vehicle-lookup/components/CardsContainer.js +0 -12
  343. package/dist/collection/components/vehicle-lookup/components/StatusCard.js +0 -11
  344. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +0 -1
  345. package/dist/collection/locales/vehicleLookup/warranty/type.js +0 -25
  346. package/dist/components/p-BJrbtmnU.js +0 -5
  347. package/dist/components/p-BiTpOAiT.js +0 -5
  348. package/dist/components/p-BwcxrN3h.js +0 -5
  349. package/dist/components/p-CC5K40ze.js +0 -5
  350. package/dist/components/p-CUTQhKeo.js +0 -5
  351. package/dist/components/p-CsXGhc7r.js +0 -5
  352. package/dist/components/p-D1JLecvO.js +0 -5
  353. package/dist/components/p-DQSUv7pB.js +0 -5
  354. package/dist/components/p-DU9WzEFX.js +0 -5
  355. package/dist/components/p-DdgLsuaX.js +0 -5
  356. package/dist/components/p-DeeDRJ2C.js +0 -5
  357. package/dist/components/p-Dts2Iuoc.js +0 -5
  358. package/dist/components/p-DvcOTV3l.js +0 -5
  359. package/dist/components/p-UeoCFDF-.js +0 -5
  360. package/dist/components/p-g-v1c-Sz.js +0 -5
  361. package/dist/components/p-kvRYCMvP.js +0 -5
  362. package/dist/components/p-rW_ExFCn.js +0 -5
  363. package/dist/components/vehicle-warranty-details.d.ts +0 -11
  364. package/dist/components/vehicle-warranty-details.js +0 -5
  365. package/dist/esm/arrow-icon-DziuNOTp.js +0 -9
  366. package/dist/locales/vehicleLookup/warranty/ar.json +0 -24
  367. package/dist/locales/vehicleLookup/warranty/en.json +0 -24
  368. package/dist/locales/vehicleLookup/warranty/ku.json +0 -24
  369. package/dist/locales/vehicleLookup/warranty/ru.json +0 -24
  370. package/dist/locales/vehicleLookup/warranty/type.ts +0 -23
  371. package/dist/shift-components/p--hCDlSpp.js +0 -5
  372. package/dist/shift-components/p-1be40385.entry.js +0 -5
  373. package/dist/shift-components/p-79e08717.entry.js +0 -5
  374. package/dist/shift-components/p-7b1c5abb.entry.js +0 -5
  375. package/dist/shift-components/p-81257775.entry.js +0 -5
  376. package/dist/shift-components/p-8d205235.entry.js +0 -5
  377. package/dist/shift-components/p-BggCINTA.js +0 -5
  378. package/dist/shift-components/p-D1ioFMhR.js +0 -5
  379. package/dist/shift-components/p-a0dc1bcc.entry.js +0 -5
  380. package/dist/shift-components/p-bd1a0763.entry.js +0 -5
  381. package/dist/shift-components/p-ddf6c6f6.entry.js +0 -5
  382. package/dist/shift-components/p-e72947e0.entry.js +0 -5
  383. package/dist/types/components/vehicle-lookup/components/CardsContainer.d.ts +0 -12
  384. package/dist/types/components/vehicle-lookup/components/StatusCard.d.ts +0 -14
  385. package/dist/types/components/vehicle-lookup/vehicle-warranty-details.d.ts +0 -77
  386. package/dist/types/locales/vehicleLookup/warranty/type.d.ts +0 -38
@@ -2,35 +2,92 @@
2
2
  * Built by ShiftSoftware
3
3
  * Copyright (c)
4
4
  */
5
- import { Host, h } from "@stencil/core";
5
+ import { Host, forceUpdate, h } from "@stencil/core";
6
6
  import cn from "../../global/lib/cn";
7
- import warrantySchema from "../../locales/vehicleLookup/warranty/type";
8
- import CardsContainer from "./components/CardsContainer";
9
- import XIcon from "~assets/x-mark.svg";
10
- import CheckIcon from "~assets/check.svg";
7
+ import { revealBelow } from "../../global/lib/reveal-below";
8
+ import { createHeightChangeAnnouncer } from "../../global/lib/flexible-parents";
9
+ import sscSchema from "../../locales/vehicleLookup/ssc/type";
10
+ import { SscCampaigns, openDrawerKey, panelBody, sscTraceKey } from "./components/SscCampaigns";
11
11
  import { VehicleInfoLayout } from "../../features/vehicle-info-layout/index";
12
12
  import { smartInvokable } from "../../features/blazor-ref/index";
13
- import { setVehicleLookupData, setVehicleLookupErrorState } from "../../features/vehicle-lookup-component/vehicle-lookup-api-integration";
13
+ import { resolveRequestHeaders, setVehicleLookupData, setVehicleLookupErrorState, } from "../../features/vehicle-lookup-component/index";
14
14
  import { getLocaleLanguage, getSharedLocal, sharedLocalesSchema } from "../../features/multi-lingual/index";
15
- export class VehicleWarrantyDetails {
15
+ const RECAPTCHA_SCRIPT_SRC = 'https://www.google.com/recaptcha/api.js?render=explicit';
16
+ /** The --settle token (lookup-tokens.css) when the stylesheet cannot be read, as in tests. */
17
+ const DEFAULT_SETTLE_MS = 320;
18
+ const isAbort = (error) => (error === null || error === void 0 ? void 0 : error.name) === 'AbortError';
19
+ /**
20
+ * The Special Service Campaigns (safety recalls) affecting a vehicle, and nothing else: warranty
21
+ * coverage lives in <vehicle-warranty-timeline>. Replaces the campaign half of the retired
22
+ * <vehicle-warranty-details>.
23
+ *
24
+ * A vehicle is on exactly one of two paths, and the panel must never mix them (the rule is spelled
25
+ * out on `panelVerdict` in ./components/SscCampaigns.tsx and in
26
+ * .shift/repos/adp/web-components/vehicle-lookup-invariants.md):
27
+ *
28
+ * - authorized (in the distributor's records): the campaign list is the verdict;
29
+ * - unauthorized: the distributor has no records, so the only verdict is the manufacturer's
30
+ * answer to the reCAPTCHA-gated check — a yes/no, no list. Until it arrives the panel says the
31
+ * vehicle is not in the records and asserts nothing else.
32
+ *
33
+ * A third state is neither: a wrapper that only counts the SSC tab's own request as a campaign
34
+ * check (`sscQueryString`) tells this panel through `skipLookup` that a vehicle was looked up
35
+ * without it. The panel then says the check was not run and offers to run it, rather than sitting
36
+ * blank next to a VIN as if the vehicle had no campaigns.
37
+ *
38
+ * With `show-trace`, every campaign row can open the evidence behind its repair status: the labor
39
+ * codes accepted for the campaign, every warranty claim on the vehicle with how it was judged, and
40
+ * the service-history lines that matched. The trace is fetched on first use with `?trace=ssc`, so
41
+ * the ordinary lookup response stays small and the host can gate the detail behind a permission.
42
+ *
43
+ * Every state change is a movement (lookup-motion.css): the outgoing content stays rendered while
44
+ * the body shuts over it, and the incoming content is swapped in only while the body is shut. The
45
+ * shared lookup helper waits a second before it asks the server, which is what guarantees the body
46
+ * has settled shut before a response can land.
47
+ */
48
+ export class VehicleSsc {
16
49
  constructor() {
17
50
  // #region Localization
18
51
  this.language = 'en';
19
- this.locale = Object.assign({ sharedLocales: sharedLocalesSchema.getDefault() }, warrantySchema.getDefault());
52
+ this.locale = Object.assign({ sharedLocales: sharedLocalesSchema.getDefault() }, sscSchema.getDefault());
20
53
  // #endregion
21
54
  // #region Vehicle info layout prop
22
55
  this.coreOnly = false;
23
56
  this.disableVinValidation = false;
24
57
  this.headers = {};
25
58
  this.queryString = '';
59
+ /**
60
+ * Appended to the campaign lookup request only, never to the trace request. A wrapper passes its
61
+ * `sscQueryString` — typically a lookup-logging flag — here rather than into `queryString`, so
62
+ * opening a campaign's evidence (a re-read of a lookup that was already logged) is never counted
63
+ * as another lookup. The host's endpoint must refuse to log traced requests as well.
64
+ */
65
+ this.lookupQueryString = '';
66
+ /** Name of a [JSInvokable] method on the Blazor reference that answers with the current headers. */
67
+ this.blazorRequestHeadersProvider = '';
26
68
  this.isError = false;
27
69
  this.isLoading = false;
70
+ /** The panel is on its way to empty: the sheen is on and the body is shutting over its content. */
71
+ this.leaving = false;
72
+ this.leaveGeneration = 0;
73
+ /**
74
+ * The body's last non-empty content, kept while the body is shut so the content slides away
75
+ * with it instead of vanishing the frame the state changes. Dropped once the body has settled.
76
+ */
77
+ this.retainedBody = 'none';
78
+ this.runSkippedLookup = () => {
79
+ const vin = this.skippedVin;
80
+ if (!vin)
81
+ return;
82
+ void this.fetchVin(vin);
83
+ };
28
84
  // #endregion
29
- // #region Component Logic
30
- this.showSsc = false;
85
+ // #region Component props
86
+ /** Shows a per-campaign "why this status?" control. The host gates it on its own permission check; the trace lists claim and invoice details. */
87
+ this.showTrace = false;
31
88
  this.recaptchaKey = '';
89
+ /** Renders a click-to-pass stand-in for the reCAPTCHA widget. Implied by `isDev`; the real widget is only ever used in production mode. */
32
90
  this.mockRecaptcha = false;
33
- this.showWarranty = false;
34
91
  this.unauthorizedSscLookupBaseUrl = '';
35
92
  this.unauthorizedSscLookupQueryString = '';
36
93
  this.cityId = null;
@@ -44,8 +101,10 @@ export class VehicleWarrantyDetails {
44
101
  this.customerName = null;
45
102
  this.customerPhone = null;
46
103
  this.customerEmail = null;
104
+ // #endregion
105
+ // #region Manufacturer check (unauthorized vehicles)
106
+ /** The check is offered: the vehicle is unauthorized and the host configured a site key. */
47
107
  this.showRecaptcha = false;
48
- this.unInvoicedByBrokerName = null;
49
108
  this.checkingUnauthorizedSSC = false;
50
109
  this.devRecaptchaChecked = false;
51
110
  this.recaptchaRes = null;
@@ -55,42 +114,77 @@ export class VehicleWarrantyDetails {
55
114
  if (!this.mockRecaptchaTrigger)
56
115
  return;
57
116
  this.devRecaptchaChecked = true;
58
- await this.mockRecaptchaTrigger();
117
+ try {
118
+ await this.mockRecaptchaTrigger();
119
+ }
120
+ catch (error) {
121
+ if (!isAbort(error))
122
+ console.error('SSC manufacturer check failed', error);
123
+ }
59
124
  };
60
125
  this.syncRecaptchaPosition = () => {
61
- if (!this.recaptchaPlaceholderRef || !this.showRecaptcha)
126
+ this.positionRAF = undefined;
127
+ const portal = this.recaptchaPortalEl;
128
+ if (!portal || portal.style.display === 'none')
62
129
  return;
63
- const rect = this.recaptchaPlaceholderRef.getBoundingClientRect();
64
- this.recaptchaPortalEl.style.top = `${rect.top}px`;
65
- this.recaptchaPortalEl.style.left = `${rect.left}px`;
66
- const opacity = this.getAncestorOpacity();
67
- this.recaptchaPortalEl.style.opacity = String(opacity);
68
- this.recaptchaPortalEl.style.pointerEvents = opacity < 0.1 ? 'none' : 'auto';
130
+ const placeholder = this.recaptchaPlaceholderRef;
131
+ let opacity = 0;
132
+ if (placeholder && placeholder.isConnected !== false) {
133
+ const rect = placeholder.getBoundingClientRect();
134
+ portal.style.top = `${rect.top}px`;
135
+ portal.style.left = `${rect.left}px`;
136
+ opacity = this.getAncestorOpacity();
137
+ }
138
+ portal.style.opacity = String(opacity);
139
+ portal.style.pointerEvents = opacity < 0.1 ? 'none' : 'auto';
69
140
  this.positionRAF = requestAnimationFrame(this.syncRecaptchaPosition);
70
141
  };
142
+ this.traces = {};
143
+ this.traceLoading = false;
144
+ this.toggleTrace = async (key) => {
145
+ var _a, _b;
146
+ if (this.openTraceKey === key) {
147
+ this.openTraceKey = undefined;
148
+ return;
149
+ }
150
+ this.openTraceKey = key;
151
+ const vin = (_a = this.vehicleLookup) === null || _a === void 0 ? void 0 : _a.vin;
152
+ if (!vin)
153
+ return;
154
+ // A response that already carries traces (a host that turned the option on for this caller,
155
+ // or mock data) needs no second request.
156
+ const seeded = Object.fromEntries((((_b = this.vehicleLookup) === null || _b === void 0 ? void 0 : _b.ssc) || []).map((item, index) => [sscTraceKey(item, index), item === null || item === void 0 ? void 0 : item.trace]).filter(([, trace]) => !!trace));
157
+ if (this.tracesVin !== vin && Object.keys(seeded).length) {
158
+ this.traces = seeded;
159
+ this.tracesVin = vin;
160
+ }
161
+ if (this.traces[key] || this.tracesVin === vin)
162
+ return;
163
+ await this.loadTraces(vin);
164
+ };
71
165
  }
72
166
  async componentWillLoad() {
73
167
  await this.changeLanguage(this.language);
74
168
  }
75
169
  async changeLanguage(newLanguage) {
76
- const [sharedLocales, locale] = await Promise.all([getSharedLocal(newLanguage), getLocaleLanguage(newLanguage, 'vehicleLookup.warranty', warrantySchema)]);
170
+ const [sharedLocales, locale] = await Promise.all([getSharedLocal(newLanguage), getLocaleLanguage(newLanguage, 'vehicleLookup.ssc', sscSchema)]);
77
171
  this.locale = Object.assign({ sharedLocales }, locale);
78
172
  }
79
173
  async setMockData(newMockData) {
80
174
  this.mockData = newMockData;
81
175
  }
82
176
  async fetchVin(newData, headers = {}) {
83
- this.recaptchaRes = null;
84
- this.showRecaptcha = false;
85
- clearInterval(this.recaptchaIntervalRef);
177
+ this.leaveGeneration++;
178
+ this.skippedVin = undefined;
179
+ this.resetTraces();
180
+ // The check's machinery stops now; its widget stays on screen so it leaves with the body.
181
+ this.suspendManufacturerCheck();
86
182
  await setVehicleLookupData(this, newData, headers, {
87
183
  beforeAssignment: async (response, { scopedTimeoutRef }) => {
88
- var _a, _b, _c;
89
- if (((_a = response === null || response === void 0 ? void 0 : response.saleInformation) === null || _a === void 0 ? void 0 : _a.broker) !== null && ((_c = (_b = response === null || response === void 0 ? void 0 : response.saleInformation) === null || _b === void 0 ? void 0 : _b.broker) === null || _c === void 0 ? void 0 : _c.invoiceDate) === null)
90
- this.unInvoicedByBrokerName = response.saleInformation.broker.brokerName;
91
- else
92
- this.unInvoicedByBrokerName = null;
93
- await this.handleInitializingRecaptcha(response, scopedTimeoutRef);
184
+ // By now the body has settled shut (the helper's one-second wait outlasts --settle), so
185
+ // the previous vehicle's check can go and the next one's be prepared unseen.
186
+ this.resetManufacturerCheck();
187
+ this.prepareManufacturerCheck(response, scopedTimeoutRef);
94
188
  return response;
95
189
  },
96
190
  });
@@ -98,30 +192,239 @@ export class VehicleWarrantyDetails {
98
192
  async setErrorMessage(message) {
99
193
  setVehicleLookupErrorState(this, message);
100
194
  }
195
+ /** Back to "no vehicle": the body shuts over what it holds, then the panel is emptied unseen. */
101
196
  async clearData() {
197
+ await this.leave();
198
+ this.emptyPanel();
199
+ }
200
+ /**
201
+ * The other panels were given a vehicle but this one's own lookup was not run for it — a wrapper
202
+ * with `sscQueryString` only counts the SSC tab's own request as a campaign check. The panel says
203
+ * so and offers to run the check itself; the VIN is kept for that.
204
+ */
205
+ async skipLookup(vin) {
206
+ if (!this.vehicleLookup && this.skippedVin === vin)
207
+ return;
208
+ await this.leave();
209
+ this.emptyPanel();
210
+ this.skippedVin = vin;
211
+ }
212
+ onLoadingChange(newValue) {
213
+ smartInvokable.bind(this)(this.loadingStateChange, newValue);
214
+ }
215
+ /** How long a state change takes to settle: the --settle token plus a margin for the frame it starts on. */
216
+ settleMs() {
217
+ const raw = typeof getComputedStyle === 'function' ? getComputedStyle(this.el).getPropertyValue('--settle') : '';
218
+ const parsed = parseFloat(raw);
219
+ return (Number.isFinite(parsed) && parsed > 0 ? parsed : DEFAULT_SETTLE_MS) + 40;
220
+ }
221
+ /**
222
+ * Puts the chip and lead on the sheen, shuts the body over whatever it holds, and resolves once
223
+ * they have settled — so the caller can swap the content while nothing is on screen. Resolves at
224
+ * once when there is nothing to leave. A lookup started meanwhile takes over.
225
+ */
226
+ async leave() {
227
+ var _a;
228
+ const generation = ++this.leaveGeneration;
229
+ if (!this.vehicleLookup && !this.skippedVin && !this.isError)
230
+ return;
231
+ clearTimeout(this.networkTimeoutRef);
232
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
233
+ this.suspendManufacturerCheck();
234
+ this.leaving = true;
235
+ await new Promise(resolve => setTimeout(resolve, this.settleMs()));
236
+ if (generation === this.leaveGeneration)
237
+ this.leaving = false;
238
+ }
239
+ emptyPanel() {
102
240
  this.vehicleLookup = undefined;
103
- this.recaptchaRes = null;
104
- this.showRecaptcha = false;
105
- this.devRecaptchaChecked = false;
106
- this.checkingUnauthorizedSSC = false;
107
241
  this.isError = false;
108
242
  this.errorMessage = undefined;
109
243
  this.isLoading = false;
110
- clearInterval(this.recaptchaIntervalRef);
244
+ this.skippedVin = undefined;
245
+ this.resetManufacturerCheck();
246
+ this.resetTraces();
111
247
  }
112
- onLoadingChange(newValue) {
113
- smartInvokable.bind(this)(this.loadingStateChange, newValue);
248
+ componentDidRender() {
249
+ var _a, _b, _c;
250
+ this.followOpenDrawer();
251
+ const state = this.panelState();
252
+ const body = panelBody(state);
253
+ const signature = [
254
+ this.isLoading || this.leaving,
255
+ body,
256
+ this.retainedBody,
257
+ this.openTraceKey,
258
+ this.traceLoading,
259
+ this.traceError,
260
+ this.checkingUnauthorizedSSC,
261
+ this.showRecaptcha,
262
+ (_a = this.vehicleLookup) === null || _a === void 0 ? void 0 : _a.vin,
263
+ this.skippedVin,
264
+ (_b = this.recaptchaRes) === null || _b === void 0 ? void 0 : _b.status,
265
+ ].join('|');
266
+ const changed = this.layoutSignature !== undefined && this.layoutSignature !== signature;
267
+ this.layoutSignature = signature;
268
+ if (!changed)
269
+ return;
270
+ (_c = this.heightAnnouncer) !== null && _c !== void 0 ? _c : (this.heightAnnouncer = createHeightChangeAnnouncer(this.el));
271
+ this.heightAnnouncer.announce(this.settleMs() + 80);
272
+ }
273
+ /** Remembers what the body shows, and forgets it a settle after the body shut. */
274
+ retainBody(body) {
275
+ if (body !== 'none') {
276
+ this.retainedBody = body;
277
+ clearTimeout(this.retainTimer);
278
+ this.retainTimer = undefined;
279
+ return;
280
+ }
281
+ if (this.retainedBody !== 'none' && !this.retainTimer) {
282
+ this.retainTimer = setTimeout(() => {
283
+ this.retainTimer = undefined;
284
+ this.retainedBody = 'none';
285
+ forceUpdate(this);
286
+ }, this.settleMs());
287
+ }
114
288
  }
115
289
  async setBlazorRef(newBlazorRef) {
116
290
  this.blazorRef = newBlazorRef;
117
291
  }
292
+ /**
293
+ * Development never shows Google's widget. The stand-in is the default whenever `isDev` is on, and
294
+ * the real widget is created lazily, only when a production-mode lookup actually needs it — so a
295
+ * host that flips `isDev` after the element mounted (the dev showcase does) still gets the mock,
296
+ * instead of a real widget rendered at mount time sitting on top of a mock that never polls it.
297
+ */
118
298
  get useMockRecaptchaWidget() {
119
299
  return this.isDev || this.mockRecaptcha;
120
300
  }
301
+ onRecaptchaModeChange() {
302
+ this.syncRealRecaptchaVisibility();
303
+ }
304
+ /** Stops the check from answering — polling, the stand-in's trigger, a request in flight — without touching what is on screen. */
305
+ suspendManufacturerCheck() {
306
+ clearInterval(this.recaptchaIntervalRef);
307
+ this.mockRecaptchaTrigger = undefined;
308
+ }
309
+ /** Back to "nothing asked yet" — every new lookup, once the previous check has left the screen, and a cleared panel start here. */
310
+ resetManufacturerCheck() {
311
+ this.suspendManufacturerCheck();
312
+ clearTimeout(this.recaptchaHideTimer);
313
+ this.recaptchaRes = null;
314
+ this.showRecaptcha = false;
315
+ this.checkingUnauthorizedSSC = false;
316
+ this.devRecaptchaChecked = false;
317
+ this.hideRealRecaptcha();
318
+ }
319
+ /**
320
+ * Offers the check for an unauthorized vehicle. Not awaited by the lookup: loading Google's script
321
+ * must not delay the vehicle landing on screen, so the real widget is armed in the background and
322
+ * checked against the lookup generation before it starts polling.
323
+ */
324
+ prepareManufacturerCheck(newVehicleLookup, scopedTimeoutRef) {
325
+ if ((newVehicleLookup === null || newVehicleLookup === void 0 ? void 0 : newVehicleLookup.isAuthorized) !== false || this.recaptchaKey === '') {
326
+ this.showRecaptcha = false;
327
+ return;
328
+ }
329
+ this.showRecaptcha = true;
330
+ if (this.useMockRecaptchaWidget) {
331
+ this.mockRecaptchaTrigger = () => this.runUnauthorizedSscLookup(newVehicleLookup, 'mock-recaptcha-token', scopedTimeoutRef);
332
+ return;
333
+ }
334
+ void this.armRealRecaptcha(newVehicleLookup, scopedTimeoutRef);
335
+ }
336
+ async armRealRecaptcha(newVehicleLookup, scopedTimeoutRef) {
337
+ try {
338
+ await this.ensureRealRecaptcha();
339
+ }
340
+ catch (error) {
341
+ console.error('reCAPTCHA could not be loaded', error);
342
+ return;
343
+ }
344
+ // A newer lookup, a cleared panel or a flip to mock mode while the script loaded: this one is stale.
345
+ if (this.networkTimeoutRef !== scopedTimeoutRef || !this.showRecaptcha || this.useMockRecaptchaWidget)
346
+ return;
347
+ if (this.recaptchaWidgetId !== undefined)
348
+ grecaptcha.reset(this.recaptchaWidgetId);
349
+ this.syncRealRecaptchaVisibility();
350
+ clearInterval(this.recaptchaIntervalRef);
351
+ this.recaptchaIntervalRef = setInterval(async () => {
352
+ const recaptchaResponse = grecaptcha.getResponse(this.recaptchaWidgetId);
353
+ if (!recaptchaResponse)
354
+ return;
355
+ clearInterval(this.recaptchaIntervalRef);
356
+ try {
357
+ await this.runUnauthorizedSscLookup(newVehicleLookup, recaptchaResponse, scopedTimeoutRef);
358
+ }
359
+ catch (error) {
360
+ if (!isAbort(error))
361
+ console.error('SSC manufacturer check failed', error);
362
+ }
363
+ }, 500);
364
+ }
365
+ /** Loads Google's script and renders the widget into a body-level portal, once per element. */
366
+ ensureRealRecaptcha() {
367
+ if (!this.recaptchaReady) {
368
+ this.recaptchaReady = new Promise((resolve, reject) => {
369
+ if (!this.recaptchaPortalEl) {
370
+ this.recaptchaPortalEl = document.createElement('div');
371
+ this.recaptchaPortalEl.style.cssText = 'position: fixed; z-index: 1; display: none;';
372
+ document.body.appendChild(this.recaptchaPortalEl);
373
+ }
374
+ const renderWidget = () => grecaptcha.ready(() => {
375
+ this.recaptchaWidgetId = grecaptcha.render(this.recaptchaPortalEl, { sitekey: this.recaptchaKey });
376
+ resolve();
377
+ });
378
+ if (typeof grecaptcha !== 'undefined' && typeof (grecaptcha === null || grecaptcha === void 0 ? void 0 : grecaptcha.render) === 'function') {
379
+ renderWidget();
380
+ return;
381
+ }
382
+ const script = document.createElement('script');
383
+ script.src = RECAPTCHA_SCRIPT_SRC;
384
+ script.async = true;
385
+ script.defer = true;
386
+ script.onload = renderWidget;
387
+ script.onerror = () => {
388
+ this.recaptchaReady = undefined;
389
+ reject(new Error('reCAPTCHA script failed to load'));
390
+ };
391
+ document.head.appendChild(script);
392
+ });
393
+ }
394
+ return this.recaptchaReady;
395
+ }
396
+ hideRealRecaptcha() {
397
+ this.stopFollowingPlaceholder();
398
+ clearTimeout(this.recaptchaHideTimer);
399
+ if (this.recaptchaPortalEl)
400
+ this.recaptchaPortalEl.style.display = 'none';
401
+ }
402
+ /**
403
+ * The real widget is visible only while a production-mode check is offered and unanswered. It
404
+ * lives outside the shadow root, so the body cannot clip it as it shuts; instead it follows the
405
+ * body's opacity (see `getAncestorOpacity`) and is only taken down once the body has settled.
406
+ */
407
+ syncRealRecaptchaVisibility() {
408
+ if (!this.recaptchaPortalEl)
409
+ return;
410
+ if (this.showRecaptcha && !this.recaptchaRes && !this.useMockRecaptchaWidget) {
411
+ clearTimeout(this.recaptchaHideTimer);
412
+ this.recaptchaPortalEl.style.display = 'block';
413
+ this.followPlaceholder();
414
+ return;
415
+ }
416
+ clearTimeout(this.recaptchaHideTimer);
417
+ this.recaptchaHideTimer = setTimeout(() => this.hideRealRecaptcha(), this.settleMs());
418
+ }
419
+ onRecaptchaStateChange() {
420
+ this.syncRealRecaptchaVisibility();
421
+ }
121
422
  async runUnauthorizedSscLookup(newVehicleLookup, recaptchaToken, scopedTimeoutRef) {
122
423
  this.checkingUnauthorizedSSC = true;
123
424
  if (this.isDev) {
124
425
  await new Promise(r => setTimeout(r, 3000));
426
+ if (this.networkTimeoutRef !== scopedTimeoutRef)
427
+ return;
125
428
  this.checkingUnauthorizedSSC = false;
126
429
  const randomValue = Math.random();
127
430
  const devSscLookupStatus = randomValue < 0.33 ? 0 : randomValue > 0.33 && randomValue < 0.66 ? 2 : 1;
@@ -131,162 +434,200 @@ export class VehicleWarrantyDetails {
131
434
  smartInvokable.bind(this)(this.unauthorizedSscLookupResponse, devSscLookupStatus);
132
435
  return;
133
436
  }
437
+ // Resolved at call time: the token handed over with the search may have expired by the time
438
+ // the visitor completes the captcha.
439
+ const headers = await resolveRequestHeaders(this);
134
440
  const response = await fetch(`${this.unauthorizedSscLookupBaseUrl}${newVehicleLookup === null || newVehicleLookup === void 0 ? void 0 : newVehicleLookup.vin}/${newVehicleLookup === null || newVehicleLookup === void 0 ? void 0 : newVehicleLookup.sscLogId}?${this.unauthorizedSscLookupQueryString}`, {
135
441
  signal: this.abortController.signal,
136
- headers: Object.assign(Object.assign({}, this.headers), { 'Ssc-Recaptcha-Token': recaptchaToken }),
442
+ headers: Object.assign(Object.assign({}, headers), { 'Ssc-Recaptcha-Token': recaptchaToken }),
137
443
  });
138
444
  const vinResponse = await response.json();
139
- if (vinResponse && this.networkTimeoutRef === scopedTimeoutRef) {
140
- this.checkingUnauthorizedSSC = false;
141
- this.recaptchaRes = {
142
- status: vinResponse.sscLookupStatus === 0
143
- ? 'noRecall'
144
- : vinResponse.sscLookupStatus === 1
145
- ? 'recallExists'
146
- : vinResponse.sscLookupStatus === 2
147
- ? 'noApplicableVehicleFound'
148
- : null,
149
- };
150
- smartInvokable.bind(this)(this.unauthorizedSscLookupResponse, vinResponse.sscLookupStatus);
151
- }
152
- else
153
- throw new Error('wrongResponseFormat');
154
- }
155
- async handleInitializingRecaptcha(newVehicleLookup, scopedTimeoutRef) {
156
- if ((newVehicleLookup === null || newVehicleLookup === void 0 ? void 0 : newVehicleLookup.isAuthorized) === false && this.showSsc && this.recaptchaKey !== '') {
157
- this.devRecaptchaChecked = false;
158
- if (this.useMockRecaptchaWidget) {
159
- this.mockRecaptchaTrigger = () => this.runUnauthorizedSscLookup(newVehicleLookup, 'mock-recaptcha-token', scopedTimeoutRef);
160
- this.showRecaptcha = true;
161
- return;
162
- }
163
- if (this.recaptchaWidgetId !== undefined) {
164
- grecaptcha.reset(this.recaptchaWidgetId);
165
- }
166
- this.recaptchaIntervalRef = setInterval(async () => {
167
- const recaptchaResponse = grecaptcha.getResponse(this.recaptchaWidgetId);
168
- if (recaptchaResponse) {
169
- clearInterval(this.recaptchaIntervalRef);
170
- await this.runUnauthorizedSscLookup(newVehicleLookup, recaptchaResponse, scopedTimeoutRef);
171
- }
172
- }, 500);
173
- this.showRecaptcha = true;
174
- }
175
- else {
176
- this.showRecaptcha = false;
177
- }
178
- }
179
- async componentDidLoad() {
180
- if (this.useMockRecaptchaWidget)
445
+ // A newer lookup started while the manufacturer was answering: this answer is for a vehicle no longer shown.
446
+ if (this.networkTimeoutRef !== scopedTimeoutRef)
181
447
  return;
182
- if (this.recaptchaKey !== '') {
183
- this.recaptchaPortalEl = document.createElement('div');
184
- this.recaptchaPortalEl.style.cssText = 'position: fixed; z-index: 1; display: none;';
185
- document.body.appendChild(this.recaptchaPortalEl);
186
- const script = document.createElement('script');
187
- script.src = 'https://www.google.com/recaptcha/api.js?render=explicit';
188
- script.async = true;
189
- script.defer = true;
190
- script.onload = () => {
191
- grecaptcha.ready(() => {
192
- this.recaptchaWidgetId = grecaptcha.render(this.recaptchaPortalEl, { sitekey: this.recaptchaKey });
193
- });
194
- };
195
- document.head.appendChild(script);
196
- }
448
+ if (!vinResponse)
449
+ throw new Error('wrongResponseFormat');
450
+ this.checkingUnauthorizedSSC = false;
451
+ this.recaptchaRes = {
452
+ status: vinResponse.sscLookupStatus === 0 ? 'noRecall' : vinResponse.sscLookupStatus === 1 ? 'recallExists' : vinResponse.sscLookupStatus === 2 ? 'noApplicableVehicleFound' : null,
453
+ };
454
+ smartInvokable.bind(this)(this.unauthorizedSscLookupResponse, vinResponse.sscLookupStatus);
197
455
  }
198
456
  disconnectedCallback() {
199
- cancelAnimationFrame(this.positionRAF);
457
+ var _a, _b;
458
+ (_a = this.heightAnnouncer) === null || _a === void 0 ? void 0 : _a.dispose();
459
+ this.stopFollowingDrawer();
460
+ this.stopFollowingPlaceholder();
200
461
  clearInterval(this.recaptchaIntervalRef);
462
+ clearTimeout(this.recaptchaHideTimer);
463
+ clearTimeout(this.retainTimer);
464
+ (_b = this.traceAbortController) === null || _b === void 0 ? void 0 : _b.abort();
201
465
  if (this.recaptchaPortalEl) {
202
466
  this.recaptchaPortalEl.remove();
467
+ this.recaptchaPortalEl = undefined;
468
+ this.recaptchaReady = undefined;
469
+ this.recaptchaWidgetId = undefined;
203
470
  }
204
471
  }
205
- onShowRecaptchaChange(show) {
206
- if (!this.recaptchaPortalEl)
472
+ /**
473
+ * Keeps the widget over its placeholder for as long as it is shown: one frame at a time, one loop
474
+ * at a time. The placeholder is not always on the page while the widget is. A lookup made after
475
+ * an answered check prepares the next check while the body is shut over nothing — the last
476
+ * check's block left with the body once the manufacturer had answered — and the placeholder only
477
+ * returns with the render that lands the vehicle. So the loop must not end when the placeholder
478
+ * is missing: it keeps the widget out of sight and out of reach until the placeholder is back,
479
+ * then takes its place. A loop that ended there left the portal shown but stranded, at the
480
+ * opacity the body had when it faded out: an invisible widget under a prompt to complete it.
481
+ */
482
+ followPlaceholder() {
483
+ if (this.positionRAF !== undefined)
207
484
  return;
208
- if (show) {
209
- this.recaptchaPortalEl.style.display = 'block';
210
- this.syncRecaptchaPosition();
211
- }
212
- else {
213
- this.recaptchaPortalEl.style.display = 'none';
485
+ this.syncRecaptchaPosition();
486
+ }
487
+ stopFollowingPlaceholder() {
488
+ if (this.positionRAF !== undefined)
214
489
  cancelAnimationFrame(this.positionRAF);
215
- }
490
+ this.positionRAF = undefined;
216
491
  }
492
+ /**
493
+ * How see-through the widget's place on the page is: the product of every ancestor's opacity,
494
+ * from the placeholder up through this shadow root (the body fading as it shuts) and on up the
495
+ * host page (a tab sliding out). The portal copies it, so the real widget leaves with the panel.
496
+ */
217
497
  getAncestorOpacity() {
218
- let el = this.el.parentElement;
219
- while (el && el !== document.body) {
220
- const opacity = parseFloat(getComputedStyle(el).opacity);
221
- if (opacity < 1)
222
- return opacity;
223
- el = el.parentElement;
498
+ let opacity = 1;
499
+ const walk = (from, until) => {
500
+ for (let el = from; el && el !== until; el = el.parentElement) {
501
+ const own = parseFloat(getComputedStyle(el).opacity);
502
+ if (!Number.isNaN(own))
503
+ opacity *= own;
504
+ }
505
+ };
506
+ walk(this.recaptchaPlaceholderRef, null);
507
+ walk(this.el, document.body);
508
+ return opacity;
509
+ }
510
+ resetTraces() {
511
+ var _a;
512
+ (_a = this.traceAbortController) === null || _a === void 0 ? void 0 : _a.abort();
513
+ this.stopFollowingDrawer();
514
+ this.openTraceKey = undefined;
515
+ this.traces = {};
516
+ this.tracesVin = undefined;
517
+ this.traceLoading = false;
518
+ this.traceError = undefined;
519
+ }
520
+ async loadTraces(vin) {
521
+ var _a, _b;
522
+ (_a = this.traceAbortController) === null || _a === void 0 ? void 0 : _a.abort();
523
+ this.traceAbortController = new AbortController();
524
+ const { signal } = this.traceAbortController;
525
+ this.traceLoading = true;
526
+ this.traceError = undefined;
527
+ try {
528
+ let response;
529
+ if (this.isDev) {
530
+ response = (_b = this.mockData) === null || _b === void 0 ? void 0 : _b[vin];
531
+ }
532
+ else {
533
+ if (!this.baseUrl)
534
+ throw new Error('noBaseUrl');
535
+ // KPI integrity: built from queryString alone. lookupQueryString (a wrapper's logging flag)
536
+ // must never join a trace request — this is a re-read, not a lookup. vehicle-ssc.spec.tsx pins it.
537
+ const query = [this.queryString, 'trace=ssc'].filter(Boolean).join('&');
538
+ const headers = await resolveRequestHeaders(this);
539
+ const httpResponse = await fetch(`${this.baseUrl}${vin}?${query}`, { headers, signal });
540
+ if (!httpResponse.ok)
541
+ throw new Error(`HTTP ${httpResponse.status}`);
542
+ response = (await httpResponse.json());
543
+ }
544
+ if (signal.aborted)
545
+ return;
546
+ const traces = {};
547
+ ((response === null || response === void 0 ? void 0 : response.ssc) || []).forEach((item, index) => {
548
+ if (item === null || item === void 0 ? void 0 : item.trace)
549
+ traces[sscTraceKey(item, index)] = item.trace;
550
+ });
551
+ this.traces = traces;
552
+ this.tracesVin = vin;
553
+ this.traceError = Object.keys(traces).length ? undefined : this.locale.traceUnavailable;
554
+ }
555
+ catch (error) {
556
+ if (isAbort(error))
557
+ return;
558
+ console.error('SSC trace fetch failed', error);
559
+ this.traceError = this.locale.traceFailed;
560
+ }
561
+ finally {
562
+ if (!signal.aborted)
563
+ this.traceLoading = false;
224
564
  }
225
- return 1;
565
+ }
566
+ /**
567
+ * When a row's evidence opens, brings the row to the top of the page and keeps it there while the
568
+ * drawer slides open beneath it — as an expanded service-history line does — so the reader is
569
+ * looking at the evidence they asked for and not at the drawer's edge below the fold. Runs after
570
+ * every render and acts only when the open drawer changes; closing it, or leaving, lets go.
571
+ */
572
+ followOpenDrawer() {
573
+ var _a, _b, _c;
574
+ const key = openDrawerKey({
575
+ campaigns: (_a = this.vehicleLookup) === null || _a === void 0 ? void 0 : _a.ssc,
576
+ showTrace: this.showTrace,
577
+ openTraceKey: this.openTraceKey,
578
+ traces: this.traces,
579
+ traceLoading: this.traceLoading,
580
+ });
581
+ if (key === this.followedDrawer)
582
+ return;
583
+ this.stopFollowingDrawer();
584
+ this.followedDrawer = key;
585
+ if (!key)
586
+ return;
587
+ const row = Array.from((_c = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelectorAll('.ssc-row')) !== null && _c !== void 0 ? _c : []).find(el => el.getAttribute('data-trace-key') === key);
588
+ if (row)
589
+ this.stopFollowing = revealBelow(row, this.settleMs());
590
+ }
591
+ stopFollowingDrawer() {
592
+ var _a;
593
+ (_a = this.stopFollowing) === null || _a === void 0 ? void 0 : _a.call(this);
594
+ this.stopFollowing = undefined;
595
+ this.followedDrawer = undefined;
226
596
  }
227
597
  // #endregion
228
- render() {
229
- var _a, _b, _c, _d, _e, _f, _g;
230
- const tableHeaders = [
231
- {
232
- nowrap: true,
233
- key: 'sscTableCode',
234
- label: this.locale.sscTableCode,
235
- },
236
- {
237
- key: 'sscTableDescription',
238
- label: this.locale.sscTableDescription,
239
- },
240
- {
241
- nowrap: true,
242
- key: 'sscTableRepairStatus',
243
- label: this.locale.sscTableRepairStatus,
244
- },
245
- {
246
- key: 'sscTableOPCode',
247
- label: this.locale.sscTableOPCode,
248
- },
249
- {
250
- key: 'sscTablePartNumber',
251
- label: this.locale.sscTablePartNumber,
252
- },
253
- ];
254
- const rows = !((_a = this.vehicleLookup) === null || _a === void 0 ? void 0 : _a.ssc)
255
- ? []
256
- : (_b = this.vehicleLookup) === null || _b === void 0 ? void 0 : _b.ssc.map(sscItem => ({
257
- sscTableCode: sscItem === null || sscItem === void 0 ? void 0 : sscItem.sscCode,
258
- sscTableDescription: sscItem === null || sscItem === void 0 ? void 0 : sscItem.description,
259
- sscTableRepairStatus: () => (h("div", { class: "table-cell-container" }, h("img", { class: "table-status-icon", src: (sscItem === null || sscItem === void 0 ? void 0 : sscItem.repaired) ? CheckIcon : XIcon }), " ", sscItem === null || sscItem === void 0 ? void 0 :
260
- sscItem.repairDate)),
261
- sscTableOPCode: () => (h("div", { class: "table-cell-container table-cell-labors-container" }, (sscItem === null || sscItem === void 0 ? void 0 : sscItem.labors.length)
262
- ? sscItem === null || sscItem === void 0 ? void 0 : sscItem.labors.map(labor => (h("div", { key: labor === null || labor === void 0 ? void 0 : labor.laborCode, class: "success" }, labor === null || labor === void 0 ? void 0 : labor.laborCode)))
263
- : '...')),
264
- sscTablePartNumber: () => (h("div", { class: "table-cell-container table-cell-parts-container" }, (sscItem === null || sscItem === void 0 ? void 0 : sscItem.parts.length)
265
- ? sscItem === null || sscItem === void 0 ? void 0 : sscItem.parts.map(part => {
266
- // Three availability states: in stock (green check), not in stock (red cross), or not checked
267
- // — no Hub stock scope, or a repaired recall — which shows neutral grey with no icon.
268
- const state = (part === null || part === void 0 ? void 0 : part.isAvailable) === true ? 'available' : (part === null || part === void 0 ? void 0 : part.isAvailable) === false ? 'unavailable' : 'unchecked';
269
- return (h("div", { key: part === null || part === void 0 ? void 0 : part.partNumber, class: cn('part-chip', state) }, state !== 'unchecked' && h("img", { class: "part-chip-icon", src: state === 'available' ? CheckIcon : XIcon }), h("span", null, part === null || part === void 0 ? void 0 : part.partNumber)));
270
- })
271
- : '...')),
272
- }));
273
- const templateRow = {
274
- sscTableOPCode: () => h("div", { class: "h-[25px]" }),
275
- sscTablePartNumber: () => h("div", { class: "h-[25px]" }),
276
- sscTableRepairStatus: () => h("div", { class: "h-[25px]" }),
598
+ panelState() {
599
+ var _a, _b, _c;
600
+ return {
601
+ locale: this.locale,
602
+ vehicleLoaded: !!this.vehicleLookup,
603
+ authorized: (_a = this.vehicleLookup) === null || _a === void 0 ? void 0 : _a.isAuthorized,
604
+ campaigns: (_b = this.vehicleLookup) === null || _b === void 0 ? void 0 : _b.ssc,
605
+ skipped: !!this.skippedVin,
606
+ checkAvailable: this.recaptchaKey !== '',
607
+ checkStatus: (_c = this.recaptchaRes) === null || _c === void 0 ? void 0 : _c.status,
277
608
  };
278
- return (h(Host, { translate: "no" }, h(VehicleInfoLayout, { isError: this.isError, coreOnly: this.coreOnly, isLoading: this.isLoading, header: (_c = this.vehicleLookup) === null || _c === void 0 ? void 0 : _c.vin, direction: this.locale.sharedLocales.direction, errorMessage: this.locale.sharedLocales.errors[this.errorMessage] || this.locale.sharedLocales.errors.wildCard }, h("div", { class: "p-[16px]" }, this.showWarranty && (h(CardsContainer, { isLoading: this.isLoading, warrantyLocale: this.locale, vehicleInformation: this.vehicleLookup, isAuthorized: (_d = this.vehicleLookup) === null || _d === void 0 ? void 0 : _d.isAuthorized, unInvoicedByBrokerName: this.unInvoicedByBrokerName })), h("div", { class: "h-[8px]" }), h("flexible-container", { isOpened: this.showRecaptcha, classes: cn('w-fit mx-auto shift-skeleton', { loading: !this.showRecaptcha || this.isLoading }) }, h("div", { style: { height: 'auto' }, class: "recaptcha-container" }, this.useMockRecaptchaWidget ? (h("div", { ref: el => (this.recaptchaPlaceholderRef = el), onClick: this.handleDevRecaptchaClick, class: cn('dev-recaptcha', { 'dev-recaptcha-disabled': this.devRecaptchaChecked }) }, h("div", { class: cn('dev-recaptcha-checkbox', { checked: this.devRecaptchaChecked }) }, this.devRecaptchaChecked && h("span", { class: "dev-recaptcha-checkmark" }, "\u2713")), h("div", { class: "dev-recaptcha-label" }, "I'm not a robot"), h("div", { class: "dev-recaptcha-brand" }, h("div", { class: "dev-recaptcha-brand-name" }, "reCAPTCHA"), h("div", { class: "dev-recaptcha-brand-mock" }, "(dev mock)")))) : (h("div", { ref: el => (this.recaptchaPlaceholderRef = el), style: { minWidth: '302px', minHeight: '76px' } }))), this.recaptchaRes && (h("div", { class: cn('recaptcha-response', ((_e = this.recaptchaRes) === null || _e === void 0 ? void 0 : _e.status) === 'recallExists' ? 'reject-card ' : ((_f = this.recaptchaRes) === null || _f === void 0 ? void 0 : _f.status) === 'noRecall' ? 'success-card ' : 'warning-card ') }, this.locale[(_g = this.recaptchaRes) === null || _g === void 0 ? void 0 : _g.status])))), h("flexible-container", { isOpened: this.checkingUnauthorizedSSC, classes: "w-fit mx-auto" }, h("div", { class: "pt-[16px]" }, h("div", { class: "flex shift-skeleton flex-col gap-[8px]" }, h("strong", null, this.locale.checkingTMC), h("div", { class: "relative pt-[40px]" }, h("loading-spinner", { isLoading: this.checkingUnauthorizedSSC }))))), this.showSsc && (h("div", { class: "mt-[32px] w-full" }, h("div", { class: "bg-[#f6f6f6] h-[50px] flex items-center justify-center px-[16px] font-bold text-[18px]" }, this.locale.sscCampings), h("div", { class: "overflow-x-auto" }, h("information-table", { allowAutoWidth: true, isLoading: this.isLoading, templateRow: templateRow, rows: rows, headers: tableHeaders })))))));
279
609
  }
280
- static get is() { return "vehicle-warranty-details"; }
610
+ render() {
611
+ var _a, _b;
612
+ const state = this.panelState();
613
+ this.retainBody(panelBody(state));
614
+ // The widget block for an unauthorized vehicle: the stand-in or the real widget's anchor. It
615
+ // stays rendered after the manufacturer has answered — the body shuts over it and it leaves
616
+ // with the body — and is dropped with the check on the next lookup. Rendered by the campaigns
617
+ // panel inside its "check" body only, so it can never sit beside a list.
618
+ const manufacturerCheck = this.showRecaptcha && (h("div", { key: '8cb63f1750f05b0f36e9b486cfb6bbf89c4b6eae', class: "ssc-check-widget" }, h("div", { key: '4774d8aeb17072c120f69f9e0f0d8a7ea5c71efc', class: "recaptcha-container" }, this.useMockRecaptchaWidget ? (h("div", { ref: el => (this.recaptchaPlaceholderRef = el), onClick: this.handleDevRecaptchaClick, class: cn('dev-recaptcha', { 'dev-recaptcha-disabled': this.devRecaptchaChecked }) }, h("div", { class: cn('dev-recaptcha-checkbox', { checked: this.devRecaptchaChecked }) }, this.devRecaptchaChecked && h("span", { class: "dev-recaptcha-checkmark" }, "\u2713")), h("div", { class: "dev-recaptcha-label" }, "I'm not a robot"), h("div", { class: "dev-recaptcha-brand" }, h("div", { class: "dev-recaptcha-brand-name" }, "reCAPTCHA"), h("div", { class: "dev-recaptcha-brand-mock" }, "(dev mock)")))) : (h("div", { ref: el => (this.recaptchaPlaceholderRef = el), style: { minWidth: '302px', minHeight: '76px' } })))));
619
+ return (h(Host, { key: 'adc7327489f71a98f4b42367b6d3c19e8b4a04da', translate: "no" }, h(VehicleInfoLayout, { key: 'fc845d210446475bbe84c8fd5e36b3c3feac84a0', isError: this.isError, coreOnly: this.coreOnly, isLoading: this.isLoading, header: (_b = (_a = this.vehicleLookup) === null || _a === void 0 ? void 0 : _a.vin) !== null && _b !== void 0 ? _b : this.skippedVin, direction: this.locale.sharedLocales.direction, errorMessage: this.locale.sharedLocales.errors[this.errorMessage] || this.locale.sharedLocales.errors.wildCard }, h("div", { key: '7778b04a77db9d212a53dea6d0b0f392d723019d', class: "ssc-panel", dir: this.locale.sharedLocales.direction }, h(SscCampaigns, Object.assign({ key: 'bd0bb8307bb534e94e785060f38322ca899794df' }, state, { loading: this.isLoading || this.leaving, checking: this.checkingUnauthorizedSSC, retainedBody: this.retainedBody, onRunLookup: this.runSkippedLookup, showTrace: this.showTrace, openTraceKey: this.openTraceKey, traces: this.traces, traceLoading: this.traceLoading, traceError: this.traceError, onToggleTrace: this.toggleTrace }), manufacturerCheck)))));
620
+ }
621
+ static get is() { return "vehicle-ssc"; }
281
622
  static get encapsulation() { return "shadow"; }
282
623
  static get originalStyleUrls() {
283
624
  return {
284
- "$": ["vehicle-warranty-details.css"]
625
+ "$": ["vehicle-ssc.css"]
285
626
  };
286
627
  }
287
628
  static get styleUrls() {
288
629
  return {
289
- "$": ["vehicle-warranty-details.css"]
630
+ "$": ["vehicle-ssc.css"]
290
631
  };
291
632
  }
292
633
  static get properties() {
@@ -408,7 +749,7 @@ export class VehicleWarrantyDetails {
408
749
  "optional": false,
409
750
  "docs": {
410
751
  "tags": [],
411
- "text": ""
752
+ "text": "Static headers the host set on the element. The floor every request starts from."
412
753
  },
413
754
  "getter": false,
414
755
  "setter": false,
@@ -434,6 +775,70 @@ export class VehicleWarrantyDetails {
434
775
  "attribute": "query-string",
435
776
  "defaultValue": "''"
436
777
  },
778
+ "lookupQueryString": {
779
+ "type": "string",
780
+ "mutable": false,
781
+ "complexType": {
782
+ "original": "string",
783
+ "resolved": "string",
784
+ "references": {}
785
+ },
786
+ "required": false,
787
+ "optional": false,
788
+ "docs": {
789
+ "tags": [],
790
+ "text": "Appended to the campaign lookup request only, never to the trace request. A wrapper passes its\n`sscQueryString` \u2014 typically a lookup-logging flag \u2014 here rather than into `queryString`, so\nopening a campaign's evidence (a re-read of a lookup that was already logged) is never counted\nas another lookup. The host's endpoint must refuse to log traced requests as well."
791
+ },
792
+ "getter": false,
793
+ "setter": false,
794
+ "reflect": false,
795
+ "attribute": "lookup-query-string",
796
+ "defaultValue": "''"
797
+ },
798
+ "requestHeadersProvider": {
799
+ "type": "unknown",
800
+ "mutable": false,
801
+ "complexType": {
802
+ "original": "RequestHeadersProvider",
803
+ "resolved": "() => object | Promise<object>",
804
+ "references": {
805
+ "RequestHeadersProvider": {
806
+ "location": "import",
807
+ "path": "~features/vehicle-lookup-component",
808
+ "id": "src/features/vehicle-lookup-component/index.ts::RequestHeadersProvider",
809
+ "referenceLocation": "RequestHeadersProvider"
810
+ }
811
+ }
812
+ },
813
+ "required": false,
814
+ "optional": true,
815
+ "docs": {
816
+ "tags": [],
817
+ "text": "Asked for the current headers before every request this component makes itself; lets a host refresh its token on demand."
818
+ },
819
+ "getter": false,
820
+ "setter": false
821
+ },
822
+ "blazorRequestHeadersProvider": {
823
+ "type": "string",
824
+ "mutable": false,
825
+ "complexType": {
826
+ "original": "string",
827
+ "resolved": "string",
828
+ "references": {}
829
+ },
830
+ "required": false,
831
+ "optional": false,
832
+ "docs": {
833
+ "tags": [],
834
+ "text": "Name of a [JSInvokable] method on the Blazor reference that answers with the current headers."
835
+ },
836
+ "getter": false,
837
+ "setter": false,
838
+ "reflect": false,
839
+ "attribute": "blazor-request-headers-provider",
840
+ "defaultValue": "''"
841
+ },
437
842
  "errorCallback": {
438
843
  "type": "string",
439
844
  "mutable": false,
@@ -550,7 +955,7 @@ export class VehicleWarrantyDetails {
550
955
  "reflect": false,
551
956
  "attribute": "unauthorized-ssc-lookup-response"
552
957
  },
553
- "showSsc": {
958
+ "showTrace": {
554
959
  "type": "boolean",
555
960
  "mutable": false,
556
961
  "complexType": {
@@ -562,12 +967,12 @@ export class VehicleWarrantyDetails {
562
967
  "optional": false,
563
968
  "docs": {
564
969
  "tags": [],
565
- "text": ""
970
+ "text": "Shows a per-campaign \"why this status?\" control. The host gates it on its own permission check; the trace lists claim and invoice details."
566
971
  },
567
972
  "getter": false,
568
973
  "setter": false,
569
974
  "reflect": false,
570
- "attribute": "show-ssc",
975
+ "attribute": "show-trace",
571
976
  "defaultValue": "false"
572
977
  },
573
978
  "recaptchaKey": {
@@ -602,7 +1007,7 @@ export class VehicleWarrantyDetails {
602
1007
  "optional": false,
603
1008
  "docs": {
604
1009
  "tags": [],
605
- "text": ""
1010
+ "text": "Renders a click-to-pass stand-in for the reCAPTCHA widget. Implied by `isDev`; the real widget is only ever used in production mode."
606
1011
  },
607
1012
  "getter": false,
608
1013
  "setter": false,
@@ -610,26 +1015,6 @@ export class VehicleWarrantyDetails {
610
1015
  "attribute": "mock-recaptcha",
611
1016
  "defaultValue": "false"
612
1017
  },
613
- "showWarranty": {
614
- "type": "boolean",
615
- "mutable": false,
616
- "complexType": {
617
- "original": "boolean",
618
- "resolved": "boolean",
619
- "references": {}
620
- },
621
- "required": false,
622
- "optional": false,
623
- "docs": {
624
- "tags": [],
625
- "text": ""
626
- },
627
- "getter": false,
628
- "setter": false,
629
- "reflect": false,
630
- "attribute": "show-warranty",
631
- "defaultValue": "false"
632
- },
633
1018
  "unauthorizedSscLookupBaseUrl": {
634
1019
  "type": "string",
635
1020
  "mutable": false,
@@ -899,12 +1284,17 @@ export class VehicleWarrantyDetails {
899
1284
  "errorMessage": {},
900
1285
  "isLoading": {},
901
1286
  "vehicleLookup": {},
1287
+ "skippedVin": {},
1288
+ "leaving": {},
902
1289
  "blazorRef": {},
903
1290
  "showRecaptcha": {},
904
- "unInvoicedByBrokerName": {},
905
1291
  "checkingUnauthorizedSSC": {},
906
1292
  "devRecaptchaChecked": {},
907
- "recaptchaRes": {}
1293
+ "recaptchaRes": {},
1294
+ "openTraceKey": {},
1295
+ "traces": {},
1296
+ "traceLoading": {},
1297
+ "traceError": {}
908
1298
  };
909
1299
  }
910
1300
  static get methods() {
@@ -1007,7 +1397,28 @@ export class VehicleWarrantyDetails {
1007
1397
  "return": "Promise<void>"
1008
1398
  },
1009
1399
  "docs": {
1010
- "text": "",
1400
+ "text": "Back to \"no vehicle\": the body shuts over what it holds, then the panel is emptied unseen.",
1401
+ "tags": []
1402
+ }
1403
+ },
1404
+ "skipLookup": {
1405
+ "complexType": {
1406
+ "signature": "(vin: string) => Promise<void>",
1407
+ "parameters": [{
1408
+ "name": "vin",
1409
+ "type": "string",
1410
+ "docs": ""
1411
+ }],
1412
+ "references": {
1413
+ "Promise": {
1414
+ "location": "global",
1415
+ "id": "global::Promise"
1416
+ }
1417
+ },
1418
+ "return": "Promise<void>"
1419
+ },
1420
+ "docs": {
1421
+ "text": "The other panels were given a vehicle but this one's own lookup was not run for it \u2014 a wrapper\nwith `sscQueryString` only counts the SSC tab's own request as a campaign check. The panel says\nso and offers to run the check itself; the VIN is kept for that.",
1011
1422
  "tags": []
1012
1423
  }
1013
1424
  },
@@ -1048,9 +1459,18 @@ export class VehicleWarrantyDetails {
1048
1459
  }, {
1049
1460
  "propName": "isLoading",
1050
1461
  "methodName": "onLoadingChange"
1462
+ }, {
1463
+ "propName": "isDev",
1464
+ "methodName": "onRecaptchaModeChange"
1465
+ }, {
1466
+ "propName": "mockRecaptcha",
1467
+ "methodName": "onRecaptchaModeChange"
1051
1468
  }, {
1052
1469
  "propName": "showRecaptcha",
1053
- "methodName": "onShowRecaptchaChange"
1470
+ "methodName": "onRecaptchaStateChange"
1471
+ }, {
1472
+ "propName": "recaptchaRes",
1473
+ "methodName": "onRecaptchaStateChange"
1054
1474
  }];
1055
1475
  }
1056
1476
  }