adp-web-components 0.3.12 → 0.3.14

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 (452) hide show
  1. package/dist/cjs/{add-icon-CF5SHPFy.js → add-icon-BaoMAIgg.js} +2 -4
  2. package/dist/cjs/{app-globals-CLG2l7G2.js → app-globals-DBRBLgev.js} +3 -2
  3. package/dist/cjs/arrow-icon-CJX1aUJ8.js +11 -0
  4. package/dist/cjs/arrow-up-icon-B3Z5Myqt.js +11 -0
  5. package/dist/cjs/calendar-days-icon-CsHz2cgV.js +11 -0
  6. package/dist/cjs/{check-icon-BZSYrNhm.js → check-icon-CqTKjw2o.js} +2 -3
  7. package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +53 -47
  8. package/dist/cjs/{decode-time-offset-iH1ebYUR.js → decode-time-offset-DOSaziv5.js} +1 -1
  9. package/dist/cjs/flexible-container.cjs.entry.js +14 -8
  10. package/dist/cjs/form-checkbox.cjs.entry.js +7 -7
  11. package/dist/cjs/form-date-picker.cjs.entry.js +12 -10
  12. package/dist/cjs/form-dialog_13.cjs.entry.js +200 -105
  13. package/dist/cjs/{form-error-message-BVlrmjov.js → form-error-message-K-KI154V.js} +4 -5
  14. package/dist/cjs/{form-input-PYkIVe7J.js → form-input-BBY_3Qk7.js} +8 -6
  15. package/dist/cjs/{form-input-label-CVEi7sIh.js → form-input-label-uhneFYXO.js} +4 -6
  16. package/dist/cjs/form-input_7.cjs.entry.js +56 -40
  17. package/dist/cjs/form-switch.cjs.entry.js +7 -7
  18. package/dist/cjs/form-time-picker.cjs.entry.js +13 -11
  19. package/dist/cjs/{functions-o-EQwu4V.js → functions-DBDDNNNX.js} +5 -11
  20. package/dist/cjs/general-form.cjs.entry.js +19 -15
  21. package/dist/cjs/general-inquiry-form.cjs.entry.js +19 -15
  22. package/dist/cjs/{get-custom-classes-for-portal-4AUxpteB.js → get-custom-classes-for-portal-NNOxAU3P.js} +2 -3
  23. package/dist/cjs/{get-language-from-url-BB87tzU5.js → get-language-from-url-9TyZFCRO.js} +5 -1
  24. package/dist/cjs/{get-local-language-BBAqu4vR.js → get-local-language-DjRj7WaF.js} +2 -2
  25. package/dist/cjs/{get-mock-files-JeY1_aCZ.js → get-mock-files-Br7Co-Fj.js} +2 -2
  26. package/dist/cjs/{index-H5Wezxcv.js → index-Bi6W8dMN.js} +492 -270
  27. package/dist/cjs/information-table.cjs.entry.js +7 -5
  28. package/dist/cjs/{loader-icon-DO2Fu65-.js → loader-icon-By94sKO7.js} +2 -10
  29. package/dist/cjs/loader.cjs.js +3 -3
  30. package/dist/cjs/loading-spinner.cjs.entry.js +4 -4
  31. package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +9 -7
  32. package/dist/cjs/{mappers-Cwx7L0MJ.js → mappers-DF2WCWpn.js} +5 -9
  33. package/dist/cjs/{material-card-DyHk88WR.js → material-card-BqsZgRVE.js} +4 -12
  34. package/dist/cjs/part-lookup.cjs.entry.js +11 -7
  35. package/dist/cjs/qr-code-scan-B-8WHa22.js +11 -0
  36. package/dist/cjs/service-booking-form.cjs.entry.js +19 -15
  37. package/dist/cjs/shift-accordion.cjs.entry.js +4 -4
  38. package/dist/cjs/shift-checkbox.cjs.entry.js +5 -5
  39. package/dist/cjs/shift-components.cjs.js +4 -4
  40. package/dist/cjs/shift-slider.cjs.entry.js +7 -5
  41. package/dist/cjs/shift-switch.cjs.entry.js +4 -4
  42. package/dist/cjs/shift-tab-content.cjs.entry.js +7 -5
  43. package/dist/cjs/shift-tabs_2.cjs.entry.js +25 -25
  44. package/dist/cjs/ssc-lookup-form.cjs.entry.js +19 -15
  45. package/dist/cjs/test-drive-form.cjs.entry.js +19 -15
  46. package/dist/cjs/{triangle-alert-B9UanYfs.js → triangle-alert-CN15U99s.js} +3 -11
  47. package/dist/cjs/{validation-jJwLyk27.js → validation-5ZUxalyW.js} +3 -1
  48. package/dist/cjs/vehicle-accessories_7.cjs.entry.js +100 -166
  49. package/dist/cjs/vehicle-info-layout-sV6altzn.js +12 -0
  50. package/dist/cjs/vehicle-lookup.cjs.entry.js +15 -9
  51. package/dist/cjs/vehicle-quotation-form.cjs.entry.js +16 -16
  52. package/dist/collection/collection-manifest.json +3 -2
  53. package/dist/collection/components/components/empty.css +1 -1
  54. package/dist/collection/components/components/flexible-container.css +1 -1
  55. package/dist/collection/components/components/flexible-container.js +10 -10
  56. package/dist/collection/components/components/information-table.css +1 -1
  57. package/dist/collection/components/components/information-table.js +11 -15
  58. package/dist/collection/components/components/loading-spinner.css +1 -1
  59. package/dist/collection/components/components/loading-spinner.js +3 -3
  60. package/dist/collection/components/components/shift-accordion.css +1 -1
  61. package/dist/collection/components/components/shift-accordion.js +5 -6
  62. package/dist/collection/components/components/shift-checkbox.js +13 -14
  63. package/dist/collection/components/components/shift-portal.css +1 -1
  64. package/dist/collection/components/components/shift-portal.js +3 -4
  65. package/dist/collection/components/components/shift-select-dropdown.css +1 -1
  66. package/dist/collection/components/components/shift-select-dropdown.js +23 -24
  67. package/dist/collection/components/components/shift-select.css +1 -1
  68. package/dist/collection/components/components/shift-select.js +47 -43
  69. package/dist/collection/components/components/shift-slider.js +3 -4
  70. package/dist/collection/components/components/shift-switch.js +13 -14
  71. package/dist/collection/components/components/shift-tab-content.css +1 -1
  72. package/dist/collection/components/components/shift-tab-content.js +3 -4
  73. package/dist/collection/components/components/shift-tabs.css +1 -1
  74. package/dist/collection/components/components/shift-tabs.js +10 -12
  75. package/dist/collection/components/form-elements/form-checkbox.js +17 -17
  76. package/dist/collection/components/form-elements/form-date-picker-legacy.js +26 -27
  77. package/dist/collection/components/form-elements/form-dialog.css +1 -1
  78. package/dist/collection/components/form-elements/form-dialog.js +7 -8
  79. package/dist/collection/components/form-elements/form-file.js +132 -60
  80. package/dist/collection/components/form-elements/form-input-preview.js +8 -8
  81. package/dist/collection/components/form-elements/form-input.js +29 -31
  82. package/dist/collection/components/form-elements/form-inputs.css +1 -1
  83. package/dist/collection/components/form-elements/form-phone-number.js +25 -25
  84. package/dist/collection/components/form-elements/form-picker-input.js +36 -37
  85. package/dist/collection/components/form-elements/form-select.js +37 -36
  86. package/dist/collection/components/form-elements/form-shadow-input.js +8 -8
  87. package/dist/collection/components/form-elements/form-stepper-control.js +16 -16
  88. package/dist/collection/components/form-elements/form-stepper-submit.js +18 -18
  89. package/dist/collection/components/form-elements/form-stepper.js +11 -11
  90. package/dist/collection/components/form-elements/form-structure-error.js +4 -3
  91. package/dist/collection/components/form-elements/form-structure.js +16 -16
  92. package/dist/collection/components/form-elements/form-submit.js +16 -16
  93. package/dist/collection/components/form-elements/form-switch.js +17 -17
  94. package/dist/collection/components/form-elements/form-text-area.js +21 -21
  95. package/dist/collection/components/form-elements/form-time-picker-legacy.js +26 -26
  96. package/dist/collection/components/form-elements/form-vin-input.js +31 -31
  97. package/dist/collection/components/forms/defaults/style.css +1 -1
  98. package/dist/collection/components/forms/defaults/validation.js +2 -1
  99. package/dist/collection/components/forms/general-form.js +22 -29
  100. package/dist/collection/components/forms/general-inquiry.js +22 -29
  101. package/dist/collection/components/forms/service-booking.js +22 -29
  102. package/dist/collection/components/forms/ssc-lookup.js +22 -29
  103. package/dist/collection/components/forms/test-drive.js +22 -29
  104. package/dist/collection/components/forms/vehicle-quotation/themes.css +1 -1
  105. package/dist/collection/components/forms/vehicle-quotation.js +22 -27
  106. package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
  107. package/dist/collection/components/part-lookup/dead-stock-lookup.js +41 -29
  108. package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
  109. package/dist/collection/components/part-lookup/distributor-lookup.js +49 -36
  110. package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
  111. package/dist/collection/components/part-lookup/manufacturer-lookup.js +41 -29
  112. package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
  113. package/dist/collection/components/part-lookup/manufacturer-part-lookup.js +24 -20
  114. package/dist/collection/components/part-lookup/part-lookup.css +1 -1
  115. package/dist/collection/components/part-lookup/part-lookup.js +36 -26
  116. package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
  117. package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +36 -27
  118. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
  119. package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +50 -40
  120. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
  121. package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +21 -21
  122. package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
  123. package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +26 -24
  124. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
  125. package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.js +35 -26
  126. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
  127. package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +37 -28
  128. package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
  129. package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +35 -26
  130. package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
  131. package/dist/collection/components/vehicle-lookup/vehicle-specification.js +35 -26
  132. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
  133. package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.js +55 -45
  134. package/dist/collection/components/vin-extractor/vin-extractor.css +1 -1
  135. package/dist/collection/components/vin-extractor/vin-extractor.js +26 -25
  136. package/dist/collection/features/form-hook/form-hook.js +4 -0
  137. package/dist/collection/features/form-hook/functions.js +2 -8
  138. package/dist/collection/features/form-hook/inputs/form-input.js +7 -5
  139. package/dist/components/dead-stock-lookup.js +1 -1
  140. package/dist/components/distributor-lookup.js +1 -1
  141. package/dist/components/flexible-container.js +1 -1
  142. package/dist/components/form-checkbox.js +1 -1
  143. package/dist/components/form-date-picker.js +1 -1
  144. package/dist/components/form-dialog.js +1 -1
  145. package/dist/components/form-file.js +1 -1
  146. package/dist/components/form-input-preview.js +1 -1
  147. package/dist/components/form-input.js +1 -1
  148. package/dist/components/form-phone-number.js +1 -1
  149. package/dist/components/form-picker-input.js +1 -1
  150. package/dist/components/form-select.js +1 -1
  151. package/dist/components/form-shadow-input.js +1 -1
  152. package/dist/components/form-stepper-control.js +1 -1
  153. package/dist/components/form-stepper-submit.js +1 -1
  154. package/dist/components/form-stepper.js +1 -1
  155. package/dist/components/form-structure-error.js +1 -1
  156. package/dist/components/form-structure.js +1 -1
  157. package/dist/components/form-submit.js +1 -1
  158. package/dist/components/form-switch.js +1 -1
  159. package/dist/components/form-text-area.js +1 -1
  160. package/dist/components/form-time-picker.js +1 -1
  161. package/dist/components/form-vin-input.js +1 -1
  162. package/dist/components/general-form.js +1 -1
  163. package/dist/components/general-inquiry-form.js +1 -1
  164. package/dist/components/index.d.ts +2 -0
  165. package/dist/components/index.js +1 -1
  166. package/dist/components/information-table.js +1 -1
  167. package/dist/components/loading-spinner.js +1 -1
  168. package/dist/components/manufacturer-lookup.js +1 -1
  169. package/dist/components/manufacturer-part-lookup.js +1 -1
  170. package/dist/components/p-0Leiluv7.js +5 -0
  171. package/dist/components/p-9zux5VXM.js +5 -0
  172. package/dist/components/p-A2T8KqHs.js +5 -0
  173. package/dist/components/p-ABcgwu6F.js +5 -0
  174. package/dist/components/p-B2ZE4oRD.js +5 -0
  175. package/dist/components/p-B5T-06-W.js +5 -0
  176. package/dist/components/p-B6_q3Jaz.js +5 -0
  177. package/dist/components/p-B6gnG2lN.js +5 -0
  178. package/dist/components/p-B6ib31CX.js +5 -0
  179. package/dist/components/p-BIeJEFM6.js +5 -0
  180. package/dist/components/p-BL5YkEz-.js +5 -0
  181. package/dist/components/p-BP6R1nYk.js +5 -0
  182. package/dist/components/{p-CtJ3xlmH.js → p-BTfZ7GAi.js} +1 -1
  183. package/dist/components/p-BUGOUxbr.js +5 -0
  184. package/dist/components/{p-BGqJcv0T.js → p-Bu1VjE_4.js} +1 -1
  185. package/dist/components/p-CCpbwft_.js +5 -0
  186. package/dist/components/p-CH5Rb3vr.js +5 -0
  187. package/dist/components/p-CK3C2jeL.js +5 -0
  188. package/dist/components/p-CN6RvIb-.js +5 -0
  189. package/dist/components/{p-Co3Ttxob.js → p-COyo4v_L.js} +1 -1
  190. package/dist/components/p-CRJSM0nN.js +5 -0
  191. package/dist/components/p-CYGQmS-P.js +5 -0
  192. package/dist/components/{p-C3f5RXYo.js → p-CbL2RmJ1.js} +1 -1
  193. package/dist/components/p-CgimfOQ7.js +5 -0
  194. package/dist/components/p-CsqoymFO.js +5 -0
  195. package/dist/components/p-DIMe8nY5.js +5 -0
  196. package/dist/components/p-DJ66XSRQ.js +5 -0
  197. package/dist/components/p-DJa_zubh.js +5 -0
  198. package/dist/components/p-DQopO8HS.js +5 -0
  199. package/dist/components/p-DTQIIqm5.js +5 -0
  200. package/dist/components/p-DWGSY0dp.js +5 -0
  201. package/dist/components/p-Dal_X4-W.js +5 -0
  202. package/dist/components/p-DdUaptEO.js +5 -0
  203. package/dist/components/{p-JkEomBDe.js → p-Dhy4YWgm.js} +1 -1
  204. package/dist/components/p-DlJAm0cB.js +5 -0
  205. package/dist/components/p-DoGNkDP-.js +5 -0
  206. package/dist/components/p-DwJkEi88.js +5 -0
  207. package/dist/components/p-SQ4fUegy.js +5 -0
  208. package/dist/components/p-WdDnbO6s.js +5 -0
  209. package/dist/components/p-Y2dufCGw.js +5 -0
  210. package/dist/components/{p-CbPeT4Wv.js → p-_i2jGDlH.js} +1 -1
  211. package/dist/components/p-emKMuKu4.js +5 -0
  212. package/dist/components/p-puPUmTHi.js +5 -0
  213. package/dist/components/p-qYvbkatn.js +5 -0
  214. package/dist/components/p-vYuOlXCR.js +5 -0
  215. package/dist/components/part-lookup.js +1 -1
  216. package/dist/components/service-booking-form.js +1 -1
  217. package/dist/components/shift-accordion.js +1 -1
  218. package/dist/components/shift-checkbox.js +1 -1
  219. package/dist/components/shift-portal.js +1 -1
  220. package/dist/components/shift-select-dropdown.js +1 -1
  221. package/dist/components/shift-select.js +1 -1
  222. package/dist/components/shift-slider.js +1 -1
  223. package/dist/components/shift-switch.js +1 -1
  224. package/dist/components/shift-tab-content.js +1 -1
  225. package/dist/components/shift-tabs.js +1 -1
  226. package/dist/components/ssc-lookup-form.js +1 -1
  227. package/dist/components/test-drive-form.js +1 -1
  228. package/dist/components/vehicle-accessories.js +1 -1
  229. package/dist/components/vehicle-claimable-items.js +1 -1
  230. package/dist/components/vehicle-item-claim-form.js +1 -1
  231. package/dist/components/vehicle-lookup.js +1 -1
  232. package/dist/components/vehicle-paint-thickness.js +1 -1
  233. package/dist/components/vehicle-quotation-form.js +1 -1
  234. package/dist/components/vehicle-sale-information.js +1 -1
  235. package/dist/components/vehicle-service-history.js +1 -1
  236. package/dist/components/vehicle-specification.js +1 -1
  237. package/dist/components/vehicle-warranty-details.js +1 -1
  238. package/dist/components/vin-extractor.js +1 -1
  239. package/dist/esm/{add-icon-1FhDJgrT.js → add-icon-DxQVyX6U.js} +2 -4
  240. package/dist/esm/app-globals-ci3rJxmu.js +10 -0
  241. package/dist/esm/arrow-icon-DRTeN2D5.js +9 -0
  242. package/dist/esm/arrow-up-icon-FAYFxG6c.js +9 -0
  243. package/dist/esm/calendar-days-icon-BOy0a_W-.js +9 -0
  244. package/dist/esm/{check-icon-mzFBdGKX.js → check-icon-BYK1ESZG.js} +2 -3
  245. package/dist/esm/dead-stock-lookup_3.entry.js +53 -47
  246. package/dist/esm/{decode-time-offset-Yzmqcv0-.js → decode-time-offset-ChO_PV6l.js} +1 -1
  247. package/dist/esm/flexible-container.entry.js +14 -8
  248. package/dist/esm/form-checkbox.entry.js +7 -7
  249. package/dist/esm/form-date-picker.entry.js +12 -10
  250. package/dist/esm/form-dialog_13.entry.js +200 -105
  251. package/dist/esm/{form-error-message-7rL_3zgN.js → form-error-message-YvMHko71.js} +4 -5
  252. package/dist/esm/{form-input-DAgayhNz.js → form-input-B8SwfkAd.js} +8 -6
  253. package/dist/esm/{form-input-label-C4MUngYi.js → form-input-label-cuvgzRcH.js} +4 -6
  254. package/dist/esm/form-input_7.entry.js +56 -40
  255. package/dist/esm/form-switch.entry.js +7 -7
  256. package/dist/esm/form-time-picker.entry.js +13 -11
  257. package/dist/esm/{functions-CVTPURU1.js → functions-DG73G3O6.js} +5 -11
  258. package/dist/esm/general-form.entry.js +19 -15
  259. package/dist/esm/general-inquiry-form.entry.js +19 -15
  260. package/dist/esm/{get-custom-classes-for-portal-CF78qKTL.js → get-custom-classes-for-portal-C4LvwyrX.js} +2 -3
  261. package/dist/esm/{get-language-from-url-BVbqyJmz.js → get-language-from-url-C1D-aPDq.js} +5 -1
  262. package/dist/esm/{get-local-language-ExQYUqwW.js → get-local-language-DsJgnZ5L.js} +2 -2
  263. package/dist/esm/{get-mock-files-D7WSQrLO.js → get-mock-files-_k2h1OdV.js} +2 -2
  264. package/dist/esm/{index-jNkxdTjc.js → index-Cg4V9l26.js} +493 -270
  265. package/dist/esm/information-table.entry.js +7 -5
  266. package/dist/esm/{loader-icon-C9goMj-j.js → loader-icon-B2ls1yXl.js} +2 -10
  267. package/dist/esm/loader.js +4 -4
  268. package/dist/esm/loading-spinner.entry.js +4 -4
  269. package/dist/esm/manufacturer-part-lookup.entry.js +9 -7
  270. package/dist/esm/{mappers-BR64PDWN.js → mappers-CeTQZn37.js} +5 -9
  271. package/dist/esm/{material-card-ZydeukMY.js → material-card-BMtefyp-.js} +4 -12
  272. package/dist/esm/part-lookup.entry.js +11 -7
  273. package/dist/esm/qr-code-scan-CktgNBSD.js +9 -0
  274. package/dist/esm/service-booking-form.entry.js +19 -15
  275. package/dist/esm/shift-accordion.entry.js +4 -4
  276. package/dist/esm/shift-checkbox.entry.js +5 -5
  277. package/dist/esm/shift-components.js +5 -5
  278. package/dist/esm/shift-slider.entry.js +7 -5
  279. package/dist/esm/shift-switch.entry.js +4 -4
  280. package/dist/esm/shift-tab-content.entry.js +7 -5
  281. package/dist/esm/shift-tabs_2.entry.js +25 -25
  282. package/dist/esm/ssc-lookup-form.entry.js +19 -15
  283. package/dist/esm/test-drive-form.entry.js +19 -15
  284. package/dist/esm/{triangle-alert-CVJ0-eRT.js → triangle-alert-D4H9aWiT.js} +3 -11
  285. package/dist/esm/{validation-oieVWBn1.js → validation-lB1iHxfZ.js} +3 -2
  286. package/dist/esm/vehicle-accessories_7.entry.js +100 -166
  287. package/dist/esm/vehicle-info-layout-DQ12Civq.js +10 -0
  288. package/dist/esm/vehicle-lookup.entry.js +15 -9
  289. package/dist/esm/vehicle-quotation-form.entry.js +16 -16
  290. package/dist/integration-manifest.json +13 -20
  291. package/dist/shift-components/p-04b02a2a.entry.js +5 -0
  292. package/dist/shift-components/{p-CyHqRBNl.js → p-08Pl1Pmo.js} +1 -1
  293. package/dist/shift-components/p-1416551c.entry.js +5 -0
  294. package/dist/shift-components/p-214259ae.entry.js +5 -0
  295. package/dist/shift-components/p-2b0e3d27.entry.js +5 -0
  296. package/dist/shift-components/p-2f764c75.entry.js +5 -0
  297. package/dist/shift-components/p-50819229.entry.js +5 -0
  298. package/dist/shift-components/p-56f69d7f.entry.js +5 -0
  299. package/dist/shift-components/p-64205a8d.entry.js +5 -0
  300. package/dist/shift-components/p-6a10c7ff.entry.js +5 -0
  301. package/dist/shift-components/p-79faecaa.entry.js +5 -0
  302. package/dist/shift-components/p-7ff0ea83.entry.js +5 -0
  303. package/dist/shift-components/p-8387da9d.entry.js +5 -0
  304. package/dist/shift-components/p-83a38f2f.entry.js +5 -0
  305. package/dist/shift-components/p-89853d6c.entry.js +5 -0
  306. package/dist/shift-components/p-8e478de8.entry.js +5 -0
  307. package/dist/shift-components/p-9c950549.entry.js +5 -0
  308. package/dist/shift-components/p-9fbdc7fd.entry.js +5 -0
  309. package/dist/shift-components/{p-BqIKtMjz.js → p-B8RCucpl.js} +1 -1
  310. package/dist/shift-components/{p-6VfKhHyc.js → p-BBmr0kTe.js} +1 -1
  311. package/dist/shift-components/{p-DqLLLv_z.js → p-BG5y01yj.js} +1 -1
  312. package/dist/shift-components/{p-D7tlaAVX.js → p-BVDXHvth.js} +1 -1
  313. package/dist/shift-components/{p-CRXqIT0k.js → p-BaC5C1YJ.js} +1 -1
  314. package/dist/shift-components/{p-BYqBwpb9.js → p-BpCf2ue6.js} +1 -1
  315. package/dist/shift-components/{p-WjikIqgU.js → p-BtLpOQVM.js} +1 -1
  316. package/dist/shift-components/p-C582V9TT.js +5 -0
  317. package/dist/shift-components/p-CEfxRHUk.js +5 -0
  318. package/dist/shift-components/{p-BUeE5BHf.js → p-CRd5RAng.js} +1 -1
  319. package/dist/shift-components/{p-BB4LQh2g.js → p-C_AHRam8.js} +1 -1
  320. package/dist/shift-components/p-Cg4V9l26.js +6 -0
  321. package/dist/shift-components/{p-DLnQ2n2n.js → p-CiA8HlYO.js} +1 -1
  322. package/dist/shift-components/{p-gbZBovQk.js → p-CtUQMviL.js} +1 -1
  323. package/dist/shift-components/p-D2XgNV12.js +5 -0
  324. package/dist/{components/p-BycIovNB.js → shift-components/p-D6ZxBLEm.js} +1 -1
  325. package/dist/shift-components/{p-DH9o3_cP.js → p-DlBduQTw.js} +1 -1
  326. package/dist/shift-components/{p-Dkfzp2fH.js → p-Dvl1mJ6N.js} +1 -1
  327. package/dist/shift-components/{p-CAlGd4kD.js → p-DwFWMVcD.js} +1 -1
  328. package/dist/shift-components/{p-6CGlGx2z.js → p-FFH7sR1n.js} +1 -1
  329. package/dist/shift-components/p-HI9vdFQP.js +5 -0
  330. package/dist/shift-components/p-acd9087d.entry.js +5 -0
  331. package/dist/{components/p-WfCxXt3e.js → shift-components/p-b4f9de18.entry.js} +1 -1
  332. package/dist/shift-components/p-bd772f48.entry.js +5 -0
  333. package/dist/shift-components/p-c3f88c4c.entry.js +5 -0
  334. package/dist/shift-components/{p-456a80bf.entry.js → p-cc3bdbd7.entry.js} +1 -1
  335. package/dist/shift-components/p-d5db4fb4.entry.js +5 -0
  336. package/dist/shift-components/p-d73f83a1.entry.js +5 -0
  337. package/dist/shift-components/p-e65d8cc3.entry.js +5 -0
  338. package/dist/shift-components/p-f148f0db.entry.js +5 -0
  339. package/dist/shift-components/{p-UBUcLzuM.js → p-pUYjpajc.js} +1 -1
  340. package/dist/shift-components/shift-components.esm.js +1 -1
  341. package/dist/stencil-docs.d.ts +37 -0
  342. package/dist/stencil-docs.json +539 -411
  343. package/dist/types/components/form-elements/form-file.d.ts +4 -0
  344. package/dist/types/components/forms/defaults/validation.d.ts +2 -0
  345. package/dist/types/components.d.ts +671 -118
  346. package/dist/types/features/multi-lingual/types.d.ts +4 -4
  347. package/dist/types/locales/forms/type.d.ts +4 -4
  348. package/dist/types/locales/partLookup/distributor/type.d.ts +2 -2
  349. package/dist/types/locales/partLookup/manufacturer/type.d.ts +2 -2
  350. package/dist/types/locales/partLookup/wrapper-type.d.ts +4 -4
  351. package/dist/types/locales/vehicleLookup/accessories/type.d.ts +6 -6
  352. package/dist/types/locales/vehicleLookup/claimableItems/type.d.ts +4 -4
  353. package/dist/types/locales/vehicleLookup/paintThickness/type.d.ts +4 -4
  354. package/dist/types/locales/vehicleLookup/serviceHistory/type.d.ts +4 -4
  355. package/dist/types/locales/vehicleLookup/wrapper-type.d.ts +16 -16
  356. package/dist/types/stencil-public-runtime.d.ts +158 -6
  357. package/package.json +2 -2
  358. package/dist/cjs/arrow-icon-ZTqfmBmE.js +0 -12
  359. package/dist/cjs/arrow-up-icon-eGUQ8IBP.js +0 -12
  360. package/dist/cjs/calendar-days-icon-Ugslrikt.js +0 -21
  361. package/dist/cjs/qr-code-scan-DIO-qSdh.js +0 -22
  362. package/dist/cjs/vehicle-info-layout-DSEDx5Ah.js +0 -17
  363. package/dist/components/p-5xxH8tbS.js +0 -5
  364. package/dist/components/p-B1G1Emsg.js +0 -5
  365. package/dist/components/p-B1rySNA6.js +0 -5
  366. package/dist/components/p-B7imL20E.js +0 -5
  367. package/dist/components/p-BD4roPIb.js +0 -5
  368. package/dist/components/p-BKBG7bI_.js +0 -5
  369. package/dist/components/p-BQ1t34rG.js +0 -5
  370. package/dist/components/p-BSQr-zbq.js +0 -5
  371. package/dist/components/p-BYDz61s7.js +0 -5
  372. package/dist/components/p-BZQYv_zg.js +0 -5
  373. package/dist/components/p-BhvdrqvQ.js +0 -5
  374. package/dist/components/p-Br0n06ak.js +0 -5
  375. package/dist/components/p-BshR1DsJ.js +0 -5
  376. package/dist/components/p-BxdK4hSV.js +0 -5
  377. package/dist/components/p-By567P_b.js +0 -5
  378. package/dist/components/p-Ca2-9IJS.js +0 -5
  379. package/dist/components/p-CfUO4dpy.js +0 -5
  380. package/dist/components/p-CjtTghsX.js +0 -5
  381. package/dist/components/p-Cl1El__H.js +0 -5
  382. package/dist/components/p-CtWBJGY9.js +0 -5
  383. package/dist/components/p-Cudi9LsD.js +0 -5
  384. package/dist/components/p-D7GqNvow.js +0 -5
  385. package/dist/components/p-DEI9cxLs.js +0 -5
  386. package/dist/components/p-DF3mal9n.js +0 -5
  387. package/dist/components/p-DFZphW5t.js +0 -5
  388. package/dist/components/p-DPd206Hi.js +0 -5
  389. package/dist/components/p-DZ2GsnAw.js +0 -5
  390. package/dist/components/p-Dm8bWcdH.js +0 -5
  391. package/dist/components/p-G9UmKW9m.js +0 -5
  392. package/dist/components/p-H9rpA_js.js +0 -5
  393. package/dist/components/p-NkzoTfD6.js +0 -5
  394. package/dist/components/p-Tej7fhZH.js +0 -5
  395. package/dist/components/p-VuUMWQot.js +0 -5
  396. package/dist/components/p-WQVJO8lK.js +0 -5
  397. package/dist/components/p-ecmObcUU.js +0 -5
  398. package/dist/components/p-tVYEiZTA.js +0 -5
  399. package/dist/components/p-xaFnNvO-.js +0 -5
  400. package/dist/esm/app-globals-iQ64oiU-.js +0 -9
  401. package/dist/esm/arrow-icon-CpbG2bMD.js +0 -10
  402. package/dist/esm/arrow-up-icon-CSgSH4zF.js +0 -10
  403. package/dist/esm/calendar-days-icon-FhJhuU8S.js +0 -19
  404. package/dist/esm/qr-code-scan-DUAfaPLZ.js +0 -20
  405. package/dist/esm/vehicle-info-layout-iwnuxQFr.js +0 -15
  406. package/dist/shift-components/p-066d1aa7.entry.js +0 -5
  407. package/dist/shift-components/p-0cd75c5d.entry.js +0 -5
  408. package/dist/shift-components/p-0ce901af.entry.js +0 -5
  409. package/dist/shift-components/p-12803c29.entry.js +0 -5
  410. package/dist/shift-components/p-29f31068.entry.js +0 -5
  411. package/dist/shift-components/p-2af2814d.entry.js +0 -5
  412. package/dist/shift-components/p-2e8a413a.entry.js +0 -5
  413. package/dist/shift-components/p-3911b357.entry.js +0 -5
  414. package/dist/shift-components/p-65d47c58.entry.js +0 -5
  415. package/dist/shift-components/p-6d0344c8.entry.js +0 -5
  416. package/dist/shift-components/p-73997c04.entry.js +0 -5
  417. package/dist/shift-components/p-7645500d.entry.js +0 -5
  418. package/dist/shift-components/p-9e405896.entry.js +0 -5
  419. package/dist/shift-components/p-BIk1ppUN.js +0 -5
  420. package/dist/shift-components/p-BY1wHcOT.js +0 -5
  421. package/dist/shift-components/p-BuurMgGN.js +0 -5
  422. package/dist/shift-components/p-C9T02-yz.js +0 -5
  423. package/dist/shift-components/p-a5ab9255.entry.js +0 -5
  424. package/dist/shift-components/p-a6b57150.entry.js +0 -5
  425. package/dist/shift-components/p-aaf49a7a.entry.js +0 -5
  426. package/dist/shift-components/p-ac7fcf6c.entry.js +0 -5
  427. package/dist/shift-components/p-b3eb2198.entry.js +0 -5
  428. package/dist/shift-components/p-bf5ff6d9.entry.js +0 -5
  429. package/dist/shift-components/p-bfdfdac5.entry.js +0 -5
  430. package/dist/shift-components/p-c41afd6a.entry.js +0 -5
  431. package/dist/shift-components/p-cf29fbbb.entry.js +0 -5
  432. package/dist/shift-components/p-e08bc5d9.entry.js +0 -5
  433. package/dist/shift-components/p-e9d552eb.entry.js +0 -5
  434. package/dist/shift-components/p-fc9c2c02.entry.js +0 -5
  435. package/dist/shift-components/p-jNkxdTjc.js +0 -6
  436. package/dist/shift-components/p-zUjGUnSs.js +0 -5
  437. /package/dist/components/{p-DN4c_zdE.js → p-5NIYyHI-.js} +0 -0
  438. /package/dist/components/{p-Cgt5s_xn.js → p-B6xZ__mT.js} +0 -0
  439. /package/dist/components/{p-DHfdaMCZ.js → p-BA1Id0rV.js} +0 -0
  440. /package/dist/components/{p-JSG4fAIl.js → p-BcYtRtiU.js} +0 -0
  441. /package/dist/components/{p-BG8YXzND.js → p-ByNlQjpu.js} +0 -0
  442. /package/dist/components/{p-BMqwfA7R.js → p-ByRA9Jio.js} +0 -0
  443. /package/dist/components/{p-BlqCKH24.js → p-BzsXkZqy.js} +0 -0
  444. /package/dist/components/{p-iTJ5pT2w.js → p-CILGkcfa.js} +0 -0
  445. /package/dist/components/{p-BHy4oEqB.js → p-CLdijNKL.js} +0 -0
  446. /package/dist/components/{p-8u5uhwdg.js → p-D9mmIizU.js} +0 -0
  447. /package/dist/components/{p-uiE7emGF.js → p-DRhkO-Ac.js} +0 -0
  448. /package/dist/components/{p-Co_hK-X8.js → p-D_ukwEEB.js} +0 -0
  449. /package/dist/components/{p-piZ41_ho.js → p-Df4xlD1R.js} +0 -0
  450. /package/dist/components/{p-Ce4X3l8Z.js → p-MGQ2O9as.js} +0 -0
  451. /package/dist/components/{p-pnQgLSsX.js → p-_nGOa2Au.js} +0 -0
  452. /package/dist/components/{p-ClpSwIg-.js → p-d7wdNFwt.js} +0 -0
@@ -52,7 +52,7 @@ export class FormInput {
52
52
  const dialogContentIdentifier = cn('dialog-content');
53
53
  const closeButtonIdentifier = 'dialog-close-icon-button';
54
54
  const closeButtonIdentifierIcon = 'dialog-close-icon-button-icon';
55
- return (h(Host, { key: '8a3cdbf65c563bcbb6c4c05879d3bb047dcdf578', translate: "no" }, h("div", { key: 'ce49a5bffd6a5c7cca6aae6ab3ac4901eb45271d', part: dialogContainerIdentifier, dir: locale.sharedFormLocales.direction, class: dialogContainerIdentifier }, h("div", { key: '22ca629ea0e8525bf633aefd01cb3c4b3b3493c9', part: dialogWrapperIdentifier, class: dialogWrapperIdentifier }, h("button", { key: '57be63c19a44c643a64e4a9fea7b4826db9f8f3a', "aria-label": "Close the dialog", part: closeButtonIdentifier, onClick: this.closeDialog, type: "button", class: closeButtonIdentifier }, h(AddIcon, { key: 'a1706eb1cad4c33589a0f560598be8efeba7cdd1', class: closeButtonIdentifierIcon, part: closeButtonIdentifierIcon })), h("div", { key: 'ce32d616e07f879041d98a678c64a882016f9795', part: dialogContentIdentifier, class: dialogContentIdentifier }, this.isError && this.internalMessage, h("div", { key: 'ae21e822ba03984f2f2e7af997d33fdcbec7d6fb', style: { display: this.isError ? 'none' : 'block' } }, h("div", { key: 'ce69ae6cd0a209f7363f6770df41de04b5571fd9', class: successContainerIdentifier, part: successContainerIdentifier }, h("svg", { key: '90464c21230bdc993b3353cf0c527bc78dcf62ce', fill: "none", "stroke-width": "2", viewBox: "0 0 24 24", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", xmlns: "http://www.w3.org/2000/svg", part: successContainerIdentifierIcon, class: successContainerIdentifierIcon }, h("path", { key: '44d0319a4d66dd19f68d4eb08b7e259673f79161', d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }), h("path", { key: '9cdfb71a1258cb78f7b3e23af71a90d69427f72a', d: "m9 12 2 2 4-4" })), this.successMessage))), h("button", { key: '46ff97b11b57f6c7f91f2523a39b9537816887ae', part: buttonIdentifiers, type: "button", onClick: this.closeDialog, class: buttonIdentifiers }, this.closeText)))));
55
+ return (h(Host, { key: '46608d87b037b983200063012c4576c791ef799d', translate: "no" }, h("div", { key: 'c708eed600cf4f64dcc061d286cedbf90d14f4af', part: dialogContainerIdentifier, dir: locale.sharedFormLocales.direction, class: dialogContainerIdentifier }, h("div", { key: '5247dfe8906e5e4c348f4e9d47e81d2735ef35e4', part: dialogWrapperIdentifier, class: dialogWrapperIdentifier }, h("button", { key: '86e61e0f555e769c0082339a6e668d341e2fd68b', "aria-label": "Close the dialog", part: closeButtonIdentifier, onClick: this.closeDialog, type: "button", class: closeButtonIdentifier }, h(AddIcon, { key: '1a3d3edd3fb33504092a2d19f3fca1e9b4cf9a5d', class: closeButtonIdentifierIcon, part: closeButtonIdentifierIcon })), h("div", { key: 'bf547d341706d7eaa5a3a4eb1af0af2fdbac0d58', part: dialogContentIdentifier, class: dialogContentIdentifier }, this.isError && this.internalMessage, h("div", { key: '8583adf8fb3994026dfec93171c34091637ac746', style: { display: this.isError ? 'none' : 'block' } }, h("div", { key: '82b4975bde067cd97a349c40ec6022858d02e0db', class: successContainerIdentifier, part: successContainerIdentifier }, h("svg", { key: '988560e56a762e204e2324d26c09db92856fb5c4', fill: "none", "stroke-width": "2", viewBox: "0 0 24 24", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", xmlns: "http://www.w3.org/2000/svg", part: successContainerIdentifierIcon, class: successContainerIdentifierIcon }, h("path", { key: '0e191fba217387fe35b5b1600f441c5cdad30962', d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }), h("path", { key: '0b534f0886a7f4895df7648f72af4248173bf871', d: "m9 12 2 2 4-4" })), this.successMessage))), h("button", { key: 'fe8d0f49ab9934c19e9b2b3b077e4a76063b6462', part: buttonIdentifiers, type: "button", onClick: this.closeDialog, class: buttonIdentifiers }, this.closeText)))));
56
56
  }
57
57
  static get is() { return "form-dialog"; }
58
58
  static get encapsulation() { return "shadow"; }
@@ -70,7 +70,6 @@ export class FormInput {
70
70
  return {
71
71
  "message": {
72
72
  "type": "string",
73
- "attribute": "message",
74
73
  "mutable": false,
75
74
  "complexType": {
76
75
  "original": "string",
@@ -86,11 +85,11 @@ export class FormInput {
86
85
  "getter": false,
87
86
  "setter": false,
88
87
  "reflect": false,
88
+ "attribute": "message",
89
89
  "defaultValue": "''"
90
90
  },
91
91
  "form": {
92
92
  "type": "unknown",
93
- "attribute": "form",
94
93
  "mutable": false,
95
94
  "complexType": {
96
95
  "original": "FormHook<any>",
@@ -99,7 +98,8 @@ export class FormInput {
99
98
  "FormHook": {
100
99
  "location": "import",
101
100
  "path": "~features/form-hook",
102
- "id": "src/features/form-hook/index.ts::FormHook"
101
+ "id": "src/features/form-hook/index.ts::FormHook",
102
+ "referenceLocation": "FormHook"
103
103
  }
104
104
  }
105
105
  },
@@ -114,7 +114,6 @@ export class FormInput {
114
114
  },
115
115
  "closeText": {
116
116
  "type": "string",
117
- "attribute": "close-text",
118
117
  "mutable": false,
119
118
  "complexType": {
120
119
  "original": "string",
@@ -130,11 +129,11 @@ export class FormInput {
130
129
  "getter": false,
131
130
  "setter": false,
132
131
  "reflect": false,
132
+ "attribute": "close-text",
133
133
  "defaultValue": "''"
134
134
  },
135
135
  "isError": {
136
136
  "type": "boolean",
137
- "attribute": "is-error",
138
137
  "mutable": false,
139
138
  "complexType": {
140
139
  "original": "boolean",
@@ -150,11 +149,11 @@ export class FormInput {
150
149
  "getter": false,
151
150
  "setter": false,
152
151
  "reflect": false,
152
+ "attribute": "is-error",
153
153
  "defaultValue": "false"
154
154
  },
155
155
  "successMessage": {
156
156
  "type": "string",
157
- "attribute": "success-message",
158
157
  "mutable": false,
159
158
  "complexType": {
160
159
  "original": "string",
@@ -170,11 +169,11 @@ export class FormInput {
170
169
  "getter": false,
171
170
  "setter": false,
172
171
  "reflect": false,
172
+ "attribute": "success-message",
173
173
  "defaultValue": "''"
174
174
  },
175
175
  "dialogClosed": {
176
176
  "type": "unknown",
177
- "attribute": "dialog-closed",
178
177
  "mutable": false,
179
178
  "complexType": {
180
179
  "original": "() => void",
@@ -10,7 +10,7 @@ import { FormErrorMessage } from "./components/form-error-message";
10
10
  import { LoaderIcon } from "../../global/assets/loader-icon";
11
11
  import { TickIcon } from "../../global/assets/tick-icon";
12
12
  import { mixed } from "yup";
13
- import { meta, format, size, require, max } from "../forms/defaults/validation";
13
+ import { meta, format, size, require, max, upload } from "../forms/defaults/validation";
14
14
  const partKeyPrefix = 'form-file-';
15
15
  export class FormFile {
16
16
  constructor() {
@@ -26,7 +26,11 @@ export class FormFile {
26
26
  this.openFilePicker = () => {
27
27
  if (!this.fileInput)
28
28
  return;
29
- this.reset(); // clears old file + state
29
+ // Only clear the input value, so re-picking the same file still fires a change event.
30
+ // Visible state is left alone until a file actually arrives — clearing it here would
31
+ // swap the upload failure for a "required" error while the picker is still open, and
32
+ // would wipe a valid selection if the user cancels.
33
+ this.fileInput.value = '';
30
34
  this.fileInput.click();
31
35
  };
32
36
  this.handleFileChange = async (event) => {
@@ -43,7 +47,17 @@ export class FormFile {
43
47
  try {
44
48
  if (this.signUrl) {
45
49
  const signedFiles = await this.requestSignedUpload(limited);
46
- this.form.pendingRequests[this.name] = async () => await this.uploadToSignedUrl(limited, signedFiles);
50
+ this.form.pendingRequests[this.name] = async () => {
51
+ try {
52
+ await this.uploadWithRetry(limited, signedFiles);
53
+ }
54
+ catch (error) {
55
+ console.error(error);
56
+ this.setUploadError(error);
57
+ this.form.rerender({ inputName: this.name, rerenderForm: true });
58
+ throw error;
59
+ }
60
+ };
47
61
  }
48
62
  this.uploadState = 'success';
49
63
  this.syncValue([...limited]);
@@ -51,16 +65,9 @@ export class FormFile {
51
65
  target.files = dataTransfer.files;
52
66
  }
53
67
  catch (error) {
54
- this.sasFiles = [];
55
68
  console.error(error);
56
69
  target.files = dataTransfer.files;
57
- const [locale, language] = this.form.getFormLocale();
58
- this.uploadState = 'error';
59
- this.failedText = this.getFailureText(locale, language);
60
- this.syncValue();
61
- // @ts-ignore
62
- if (this.fileInput)
63
- this.fileInput.value = [];
70
+ this.setUploadError(error);
64
71
  }
65
72
  finally {
66
73
  this.stopGlobalLoading();
@@ -68,6 +75,9 @@ export class FormFile {
68
75
  };
69
76
  this.validate = () => {
70
77
  let validation = mixed().meta(meta(this.name));
78
+ // The record must never be created without its file, so an in-flight or failed upload blocks
79
+ // the whole form — including when this field is optional, where nothing else would stop it.
80
+ validation = validation.test(upload(this.name), upload(this.name), () => this.uploadState !== 'uploading' && this.uploadState !== 'error');
71
81
  if (this.required) {
72
82
  validation = validation.test(require(this.name), require(this.name), (value) => {
73
83
  if (!Array.isArray(value))
@@ -120,10 +130,13 @@ export class FormFile {
120
130
  this.form.unsubscribe(this.name);
121
131
  }
122
132
  reset() {
133
+ var _a, _b;
123
134
  this.stopGlobalLoading();
124
135
  if (this.fileInput)
125
136
  this.fileInput.value = '';
137
+ (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.pendingRequests) === null || _b === void 0 ? true : delete _b[this.name];
126
138
  this.fileName = '';
139
+ this.failedText = '';
127
140
  this.uploadState = 'idle';
128
141
  }
129
142
  startGlobalLoading() {
@@ -153,6 +166,51 @@ export class FormFile {
153
166
  var _a, _b, _c, _d;
154
167
  return ((_b = (_a = this.localization) === null || _a === void 0 ? void 0 : _a[language]) === null || _b === void 0 ? void 0 : _b.failure) || ((_d = (_c = locale === null || locale === void 0 ? void 0 : locale.sharedFormLocales) === null || _c === void 0 ? void 0 : _c.errors) === null || _d === void 0 ? void 0 : _d.wildCard) || 'Upload failed. Please try again.';
155
168
  }
169
+ // Tagged so setUploadError knows the text came from the server and is safe to show,
170
+ // unlike a network-level "Failed to fetch".
171
+ async responseError(response) {
172
+ const error = new Error(await this.getResponseError(response));
173
+ error.fromServer = true;
174
+ return error;
175
+ }
176
+ async getResponseError(response) {
177
+ var _a, _b, _c, _d, _e;
178
+ const [locale, language] = this.form.getFormLocale();
179
+ const fallback = this.getFailureText(locale, language);
180
+ const raw = await response.text().catch(() => '');
181
+ if (!raw.trim())
182
+ return fallback;
183
+ const contentType = response.headers.get('content-type') || '';
184
+ if (contentType.includes('json') || raw.trimStart().startsWith('{')) {
185
+ try {
186
+ const parsed = JSON.parse(raw);
187
+ const message = (_a = parsed === null || parsed === void 0 ? void 0 : parsed.message) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Message;
188
+ const text = (_d = (_c = (_b = message === null || message === void 0 ? void 0 : message.body) !== null && _b !== void 0 ? _b : message === null || message === void 0 ? void 0 : message.Body) !== null && _c !== void 0 ? _c : message === null || message === void 0 ? void 0 : message.title) !== null && _d !== void 0 ? _d : message === null || message === void 0 ? void 0 : message.Title;
189
+ if (typeof text === 'string' && text.trim())
190
+ return text.trim();
191
+ }
192
+ catch (_f) {
193
+ // fall through to the localized fallback
194
+ }
195
+ return fallback;
196
+ }
197
+ // Blob storage answers with XML: <Error><Code>..</Code><Message>..</Message></Error>
198
+ const xmlMessage = (_e = raw.match(/<Message>([\s\S]*?)<\/Message>/)) === null || _e === void 0 ? void 0 : _e[1];
199
+ const text = (xmlMessage || raw).trim().split('\n')[0].trim();
200
+ return text && text.length <= 300 ? text : fallback;
201
+ }
202
+ setUploadError(error) {
203
+ var _a, _b;
204
+ const [locale, language] = this.form.getFormLocale();
205
+ const message = typeof error === 'string' ? error : (error === null || error === void 0 ? void 0 : error.fromServer) ? error === null || error === void 0 ? void 0 : error.message : '';
206
+ (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.pendingRequests) === null || _b === void 0 ? true : delete _b[this.name];
207
+ this.sasFiles = [];
208
+ this.uploadState = 'error';
209
+ this.failedText = (message === null || message === void 0 ? void 0 : message.trim()) || this.getFailureText(locale, language);
210
+ this.syncValue();
211
+ if (this.fileInput)
212
+ this.fileInput.value = '';
213
+ }
156
214
  matchesAccept(value) {
157
215
  var _a;
158
216
  if (!this.accept)
@@ -189,7 +247,11 @@ export class FormFile {
189
247
  }
190
248
  async requestSignedUpload(files) {
191
249
  var _a, _b, _c;
192
- const formHeaders = { 'Content-Type': 'application/json' };
250
+ const [, language] = this.form.getFormLocale();
251
+ // Send an explicit single-value Accept-Language, matching every other backend call.
252
+ // Left unset, the browser sends its own weighted header (`en-US,en;q=0.9`) whenever more
253
+ // than one language is configured, which the backend cannot parse.
254
+ const formHeaders = { 'Content-Type': 'application/json', 'Accept-Language': language || 'en' };
193
255
  const recaptchaKey = (_c = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.context.structure) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.recaptchaKey;
194
256
  if (grecaptcha && recaptchaKey) {
195
257
  const token = await grecaptcha.execute(recaptchaKey, { action: 'submit' });
@@ -211,7 +273,7 @@ export class FormFile {
211
273
  method: this.signMethod || 'POST',
212
274
  });
213
275
  if (!response.ok)
214
- throw new Error('Failed to get signed upload URL');
276
+ throw await this.responseError(response);
215
277
  const json = await response.json();
216
278
  const list = (json === null || json === void 0 ? void 0 : json.entity) || (json === null || json === void 0 ? void 0 : json.Entity) || json;
217
279
  const arr = Array.isArray(list) ? list : Array.isArray(json) ? json : [];
@@ -233,21 +295,31 @@ export class FormFile {
233
295
  return signedFiles;
234
296
  }
235
297
  async uploadToSignedUrl(files, signedFiles) {
236
- files === null || files === void 0 ? void 0 : files.forEach(async (file, idx) => {
298
+ await Promise.all((files || []).map(async (file, idx) => {
237
299
  var _a, _b;
238
- try {
239
- const response = await fetch((_a = signedFiles === null || signedFiles === void 0 ? void 0 : signedFiles[idx]) === null || _a === void 0 ? void 0 : _a.uploadUrl, {
240
- method: 'PUT',
241
- headers: Object.assign({ 'Content-Type': file.type || 'application/octet-stream', 'x-ms-blob-type': 'BlockBlob' }, (_b = signedFiles === null || signedFiles === void 0 ? void 0 : signedFiles[idx]) === null || _b === void 0 ? void 0 : _b.headers),
242
- body: file,
243
- });
244
- if (!response.ok)
245
- console.error(response);
246
- }
247
- catch (error) {
248
- console.error(error);
249
- }
250
- });
300
+ const response = await fetch((_a = signedFiles === null || signedFiles === void 0 ? void 0 : signedFiles[idx]) === null || _a === void 0 ? void 0 : _a.uploadUrl, {
301
+ method: 'PUT',
302
+ headers: Object.assign({ 'Content-Type': file.type || 'application/octet-stream', 'x-ms-blob-type': 'BlockBlob' }, (_b = signedFiles === null || signedFiles === void 0 ? void 0 : signedFiles[idx]) === null || _b === void 0 ? void 0 : _b.headers),
303
+ body: file,
304
+ });
305
+ if (!response.ok)
306
+ throw await this.responseError(response);
307
+ }));
308
+ }
309
+ // The signature is minted when the file is picked, but only spent when the form is submitted,
310
+ // and an applicant can sit on a long form for longer than the SAS lives. A stale signature is
311
+ // by far the likeliest failure here, so mint a fresh one and try once more before giving up.
312
+ // Re-signing also refreshes the blob/url written onto the File objects, and the payload is
313
+ // serialised after this runs, so the record always points at what was actually uploaded.
314
+ async uploadWithRetry(files, signedFiles) {
315
+ try {
316
+ await this.uploadToSignedUrl(files, signedFiles);
317
+ }
318
+ catch (error) {
319
+ console.error(error);
320
+ const refreshed = await this.requestSignedUpload(files);
321
+ await this.uploadToSignedUrl(files, refreshed);
322
+ }
251
323
  }
252
324
  render() {
253
325
  const { disabled, isRequired, meta, isError, errorMessage } = this.form.getInputState(this.name);
@@ -259,11 +331,11 @@ export class FormFile {
259
331
  const isErrorState = this.uploadState !== 'uploading' && (!!this.failedText || isError);
260
332
  // @ts-ignore
261
333
  window === null || window === void 0 ? void 0 : window.s = this.form;
262
- return (h(Host, { key: '033ef0477c8517cbf1d413f4e7875ba55b34b9fe', translate: "no" }, h("label", { key: 'af39816aff5fe948b1f1e155728838827c20f928', part: `form-file ${this.name}`, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: disableInput }) }, h(FormInputLabel, { key: '99fec51d840cf6cb49cb1fe44d341fa8a90d26a1', name: this.name, isRequired: isRequired, label: label }), h("div", { key: '158cbec554ec2309fdae08a7aac2001510ce9713', part: `${this.name}-container form-input-container`, class: cn('form-input-container') }, h("input", { key: '971b5ada3aa44b76f027da692716cf9b625a0c01', type: "file", name: this.name, accept: this.accept, disabled: disableInput, multiple: this.maxUpload > 1, onChange: this.handleFileChange, part: `${this.name}-file-input form-file-input`, class: cn('form-file-input', `${partKeyPrefix}${this.name}-input`) }), h("button", { key: 'e76c83d66084c06007d24e674ec89bb6d25b1724', type: "button", disabled: disableInput, onClick: this.openFilePicker, part: `${this.name}-file-trigger form-file-trigger form-input`, title: showSpinner ? this.getLoadingText(locale, language) : displayText, class: cn('form-file-trigger form-input-style', {
334
+ return (h(Host, { key: '60c4d7e4c3c67addbd65d89ed5f601afba702847', translate: "no" }, h("label", { key: '1e2cd264583b15579ae1d3b1d76901a59ba72570', part: `form-file ${this.name}`, id: this.wrapperId, class: cn('form-input-label-container', this.wrapperClass, { disabled: disableInput }) }, h(FormInputLabel, { key: '76bfacc32501d26455a81634c4aa922d1892e5e8', name: this.name, isRequired: isRequired, label: label }), h("div", { key: '7caea635fc7e9a7505e1ac7c316ab19268eef580', part: `${this.name}-container form-input-container`, class: cn('form-input-container') }, h("input", { key: '0625ef13a5254d3de16e0403c2c3ea76f96e807f', type: "file", name: this.name, accept: this.accept, disabled: disableInput, multiple: this.maxUpload > 1, onChange: this.handleFileChange, part: `${this.name}-file-input form-file-input`, class: cn('form-file-input', `${partKeyPrefix}${this.name}-input`) }), h("button", { key: '44e249de81befc80561c7ff49e55d7567958447b', type: "button", disabled: disableInput, onClick: this.openFilePicker, part: `${this.name}-file-trigger form-file-trigger form-input`, title: showSpinner ? this.getLoadingText(locale, language) : displayText, class: cn('form-file-trigger form-input-style', {
263
335
  'form-input-error-style': isErrorState,
264
336
  'form-file-trigger-loading': showSpinner,
265
337
  'form-file-trigger-success': this.uploadState === 'success',
266
- }) }, h("span", { key: 'd2461ead64d452c824926e04a2f2b08075cf3aef', part: `${this.name}-file-text form-file-text`, class: "form-file-text" }, showSpinner ? this.getLoadingText(locale, language) : displayText), h("span", { key: '23460eb0dfdaf4c9123ca177f197505b081017d4', part: `${this.name}-file-icon form-file-icon`, class: "form-file-icon" }, showSpinner && h(LoaderIcon, { key: '22081ddee1bbeaaa69a51cf1d2beae708d7a166a', class: "form-file-spinner" }), !showSpinner && this.uploadState === 'success' && h(TickIcon, { key: '0fccc0b9b39f962577216161aedb237ebcdb58ed', class: "form-file-success-icon" })))), h(FormErrorMessage, { key: '92e43c9ad207349461243b8409974bb0f5458dd8', name: this.name, isError: isErrorState, errorMessage: this.failedText || errorTextMessage }))));
338
+ }) }, h("span", { key: 'ad3e337bdb4d6a4494ef9264fe35c755fe2e556c', part: `${this.name}-file-text form-file-text`, class: "form-file-text" }, showSpinner ? this.getLoadingText(locale, language) : displayText), h("span", { key: 'dacd0d4792606b11adda9d5cb6fe8e4b41b6e5c5', part: `${this.name}-file-icon form-file-icon`, class: "form-file-icon" }, showSpinner && h(LoaderIcon, { key: 'ed8838820648f7d6f9980bf7a3b33ad32a63d20c', class: "form-file-spinner" }), !showSpinner && this.uploadState === 'success' && h(TickIcon, { key: '6d26e5526a5cb9ccccfa9ba923808553b50f9af6', class: "form-file-success-icon" })))), h(FormErrorMessage, { key: '4b0e1e69ba22fd36d675a56ecce7e813574aeb34', name: this.name, isError: isErrorState, errorMessage: this.failedText || errorTextMessage }))));
267
339
  }
268
340
  static get is() { return "form-file"; }
269
341
  static get originalStyleUrls() {
@@ -280,7 +352,6 @@ export class FormFile {
280
352
  return {
281
353
  "name": {
282
354
  "type": "string",
283
- "attribute": "name",
284
355
  "mutable": false,
285
356
  "complexType": {
286
357
  "original": "string",
@@ -295,11 +366,11 @@ export class FormFile {
295
366
  },
296
367
  "getter": false,
297
368
  "setter": false,
298
- "reflect": false
369
+ "reflect": false,
370
+ "attribute": "name"
299
371
  },
300
372
  "wrapperId": {
301
373
  "type": "string",
302
- "attribute": "wrapper-id",
303
374
  "mutable": false,
304
375
  "complexType": {
305
376
  "original": "string",
@@ -314,11 +385,11 @@ export class FormFile {
314
385
  },
315
386
  "getter": false,
316
387
  "setter": false,
317
- "reflect": false
388
+ "reflect": false,
389
+ "attribute": "wrapper-id"
318
390
  },
319
391
  "form": {
320
392
  "type": "unknown",
321
- "attribute": "form",
322
393
  "mutable": false,
323
394
  "complexType": {
324
395
  "original": "FormHook<any>",
@@ -327,7 +398,8 @@ export class FormFile {
327
398
  "FormHook": {
328
399
  "location": "import",
329
400
  "path": "~features/form-hook",
330
- "id": "src/features/form-hook/index.ts::FormHook"
401
+ "id": "src/features/form-hook/index.ts::FormHook",
402
+ "referenceLocation": "FormHook"
331
403
  }
332
404
  }
333
405
  },
@@ -342,7 +414,6 @@ export class FormFile {
342
414
  },
343
415
  "isLoading": {
344
416
  "type": "boolean",
345
- "attribute": "is-loading",
346
417
  "mutable": false,
347
418
  "complexType": {
348
419
  "original": "boolean",
@@ -357,11 +428,11 @@ export class FormFile {
357
428
  },
358
429
  "getter": false,
359
430
  "setter": false,
360
- "reflect": false
431
+ "reflect": false,
432
+ "attribute": "is-loading"
361
433
  },
362
434
  "wrapperClass": {
363
435
  "type": "string",
364
- "attribute": "wrapper-class",
365
436
  "mutable": false,
366
437
  "complexType": {
367
438
  "original": "string",
@@ -376,11 +447,11 @@ export class FormFile {
376
447
  },
377
448
  "getter": false,
378
449
  "setter": false,
379
- "reflect": false
450
+ "reflect": false,
451
+ "attribute": "wrapper-class"
380
452
  },
381
453
  "isDisabled": {
382
454
  "type": "boolean",
383
- "attribute": "is-disabled",
384
455
  "mutable": false,
385
456
  "complexType": {
386
457
  "original": "boolean",
@@ -395,11 +466,11 @@ export class FormFile {
395
466
  },
396
467
  "getter": false,
397
468
  "setter": false,
398
- "reflect": false
469
+ "reflect": false,
470
+ "attribute": "is-disabled"
399
471
  },
400
472
  "accept": {
401
473
  "type": "string",
402
- "attribute": "accept",
403
474
  "mutable": false,
404
475
  "complexType": {
405
476
  "original": "string",
@@ -414,11 +485,11 @@ export class FormFile {
414
485
  },
415
486
  "getter": false,
416
487
  "setter": false,
417
- "reflect": false
488
+ "reflect": false,
489
+ "attribute": "accept"
418
490
  },
419
491
  "maxSize": {
420
492
  "type": "number",
421
- "attribute": "max-size",
422
493
  "mutable": false,
423
494
  "complexType": {
424
495
  "original": "number",
@@ -433,11 +504,11 @@ export class FormFile {
433
504
  },
434
505
  "getter": false,
435
506
  "setter": false,
436
- "reflect": false
507
+ "reflect": false,
508
+ "attribute": "max-size"
437
509
  },
438
510
  "required": {
439
511
  "type": "boolean",
440
- "attribute": "required",
441
512
  "mutable": false,
442
513
  "complexType": {
443
514
  "original": "boolean",
@@ -452,11 +523,11 @@ export class FormFile {
452
523
  },
453
524
  "getter": false,
454
525
  "setter": false,
455
- "reflect": false
526
+ "reflect": false,
527
+ "attribute": "required"
456
528
  },
457
529
  "signUrl": {
458
530
  "type": "string",
459
- "attribute": "sign-url",
460
531
  "mutable": false,
461
532
  "complexType": {
462
533
  "original": "string",
@@ -471,11 +542,11 @@ export class FormFile {
471
542
  },
472
543
  "getter": false,
473
544
  "setter": false,
474
- "reflect": false
545
+ "reflect": false,
546
+ "attribute": "sign-url"
475
547
  },
476
548
  "maxUpload": {
477
549
  "type": "number",
478
- "attribute": "max-upload",
479
550
  "mutable": false,
480
551
  "complexType": {
481
552
  "original": "number",
@@ -491,11 +562,11 @@ export class FormFile {
491
562
  "getter": false,
492
563
  "setter": false,
493
564
  "reflect": false,
565
+ "attribute": "max-upload",
494
566
  "defaultValue": "1"
495
567
  },
496
568
  "signMethod": {
497
569
  "type": "string",
498
- "attribute": "sign-method",
499
570
  "mutable": false,
500
571
  "complexType": {
501
572
  "original": "'POST' | 'PUT'",
@@ -511,11 +582,11 @@ export class FormFile {
511
582
  "getter": false,
512
583
  "setter": false,
513
584
  "reflect": false,
585
+ "attribute": "sign-method",
514
586
  "defaultValue": "'POST'"
515
587
  },
516
588
  "signPrefix": {
517
589
  "type": "string",
518
- "attribute": "sign-prefix",
519
590
  "mutable": false,
520
591
  "complexType": {
521
592
  "original": "string",
@@ -530,11 +601,11 @@ export class FormFile {
530
601
  },
531
602
  "getter": false,
532
603
  "setter": false,
533
- "reflect": false
604
+ "reflect": false,
605
+ "attribute": "sign-prefix"
534
606
  },
535
607
  "accountName": {
536
608
  "type": "string",
537
- "attribute": "account-name",
538
609
  "mutable": false,
539
610
  "complexType": {
540
611
  "original": "string",
@@ -549,11 +620,11 @@ export class FormFile {
549
620
  },
550
621
  "getter": false,
551
622
  "setter": false,
552
- "reflect": false
623
+ "reflect": false,
624
+ "attribute": "account-name"
553
625
  },
554
626
  "containerName": {
555
627
  "type": "string",
556
- "attribute": "container-name",
557
628
  "mutable": false,
558
629
  "complexType": {
559
630
  "original": "string",
@@ -568,20 +639,21 @@ export class FormFile {
568
639
  },
569
640
  "getter": false,
570
641
  "setter": false,
571
- "reflect": false
642
+ "reflect": false,
643
+ "attribute": "container-name"
572
644
  },
573
645
  "localization": {
574
646
  "type": "unknown",
575
- "attribute": "localization",
576
647
  "mutable": false,
577
648
  "complexType": {
578
649
  "original": "FormInputLocalization<{\n uploading?: string;\n upload?: string;\n failure?: string;\n success?: string;\n }>",
579
- "resolved": "{ [lang: string]: { label?: string; placeholder?: string; require?: string; format?: string; minMessage: string; maxMessage: string; betweenMessage: string; } & { uploading?: string; upload?: string; failure?: string; success?: string; }; }",
650
+ "resolved": "{ uploading?: string; upload?: string; failure?: string; success?: string; }",
580
651
  "references": {
581
652
  "FormInputLocalization": {
582
653
  "location": "import",
583
654
  "path": "~features/form-hook",
584
- "id": "src/features/form-hook/index.ts::FormInputLocalization"
655
+ "id": "src/features/form-hook/index.ts::FormInputLocalization",
656
+ "referenceLocation": "FormInputLocalization"
585
657
  }
586
658
  }
587
659
  },
@@ -48,7 +48,6 @@ export class FormStepper {
48
48
  return {
49
49
  "name": {
50
50
  "type": "string",
51
- "attribute": "name",
52
51
  "mutable": false,
53
52
  "complexType": {
54
53
  "original": "string",
@@ -63,11 +62,11 @@ export class FormStepper {
63
62
  },
64
63
  "getter": false,
65
64
  "setter": false,
66
- "reflect": false
65
+ "reflect": false,
66
+ "attribute": "name"
67
67
  },
68
68
  "props": {
69
69
  "type": "any",
70
- "attribute": "props",
71
70
  "mutable": false,
72
71
  "complexType": {
73
72
  "original": "any",
@@ -83,11 +82,11 @@ export class FormStepper {
83
82
  "getter": false,
84
83
  "setter": false,
85
84
  "reflect": false,
85
+ "attribute": "props",
86
86
  "defaultValue": "{}"
87
87
  },
88
88
  "form": {
89
89
  "type": "unknown",
90
- "attribute": "form",
91
90
  "mutable": false,
92
91
  "complexType": {
93
92
  "original": "FormHook<any>",
@@ -96,7 +95,8 @@ export class FormStepper {
96
95
  "FormHook": {
97
96
  "location": "import",
98
97
  "path": "~features/form-hook",
99
- "id": "src/features/form-hook/index.ts::FormHook"
98
+ "id": "src/features/form-hook/index.ts::FormHook",
99
+ "referenceLocation": "FormHook"
100
100
  }
101
101
  }
102
102
  },
@@ -111,16 +111,16 @@ export class FormStepper {
111
111
  },
112
112
  "localization": {
113
113
  "type": "unknown",
114
- "attribute": "localization",
115
114
  "mutable": false,
116
115
  "complexType": {
117
116
  "original": "FormInputLocalization<{ value?: string }>",
118
- "resolved": "{ [lang: string]: { label?: string; placeholder?: string; require?: string; format?: string; minMessage: string; maxMessage: string; betweenMessage: string; } & { value?: string; }; }",
117
+ "resolved": "{ value?: string; }",
119
118
  "references": {
120
119
  "FormInputLocalization": {
121
120
  "location": "import",
122
121
  "path": "~features/form-hook",
123
- "id": "src/features/form-hook/index.ts::FormInputLocalization"
122
+ "id": "src/features/form-hook/index.ts::FormInputLocalization",
123
+ "referenceLocation": "FormInputLocalization"
124
124
  }
125
125
  }
126
126
  },