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.
- package/dist/cjs/{add-icon-CF5SHPFy.js → add-icon-BaoMAIgg.js} +2 -4
- package/dist/cjs/{app-globals-CLG2l7G2.js → app-globals-DBRBLgev.js} +3 -2
- package/dist/cjs/arrow-icon-CJX1aUJ8.js +11 -0
- package/dist/cjs/arrow-up-icon-B3Z5Myqt.js +11 -0
- package/dist/cjs/calendar-days-icon-CsHz2cgV.js +11 -0
- package/dist/cjs/{check-icon-BZSYrNhm.js → check-icon-CqTKjw2o.js} +2 -3
- package/dist/cjs/dead-stock-lookup_3.cjs.entry.js +53 -47
- package/dist/cjs/{decode-time-offset-iH1ebYUR.js → decode-time-offset-DOSaziv5.js} +1 -1
- package/dist/cjs/flexible-container.cjs.entry.js +14 -8
- package/dist/cjs/form-checkbox.cjs.entry.js +7 -7
- package/dist/cjs/form-date-picker.cjs.entry.js +12 -10
- package/dist/cjs/form-dialog_13.cjs.entry.js +200 -105
- package/dist/cjs/{form-error-message-BVlrmjov.js → form-error-message-K-KI154V.js} +4 -5
- package/dist/cjs/{form-input-PYkIVe7J.js → form-input-BBY_3Qk7.js} +8 -6
- package/dist/cjs/{form-input-label-CVEi7sIh.js → form-input-label-uhneFYXO.js} +4 -6
- package/dist/cjs/form-input_7.cjs.entry.js +56 -40
- package/dist/cjs/form-switch.cjs.entry.js +7 -7
- package/dist/cjs/form-time-picker.cjs.entry.js +13 -11
- package/dist/cjs/{functions-o-EQwu4V.js → functions-DBDDNNNX.js} +5 -11
- package/dist/cjs/general-form.cjs.entry.js +19 -15
- package/dist/cjs/general-inquiry-form.cjs.entry.js +19 -15
- package/dist/cjs/{get-custom-classes-for-portal-4AUxpteB.js → get-custom-classes-for-portal-NNOxAU3P.js} +2 -3
- package/dist/cjs/{get-language-from-url-BB87tzU5.js → get-language-from-url-9TyZFCRO.js} +5 -1
- package/dist/cjs/{get-local-language-BBAqu4vR.js → get-local-language-DjRj7WaF.js} +2 -2
- package/dist/cjs/{get-mock-files-JeY1_aCZ.js → get-mock-files-Br7Co-Fj.js} +2 -2
- package/dist/cjs/{index-H5Wezxcv.js → index-Bi6W8dMN.js} +492 -270
- package/dist/cjs/information-table.cjs.entry.js +7 -5
- package/dist/cjs/{loader-icon-DO2Fu65-.js → loader-icon-By94sKO7.js} +2 -10
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/loading-spinner.cjs.entry.js +4 -4
- package/dist/cjs/manufacturer-part-lookup.cjs.entry.js +9 -7
- package/dist/cjs/{mappers-Cwx7L0MJ.js → mappers-DF2WCWpn.js} +5 -9
- package/dist/cjs/{material-card-DyHk88WR.js → material-card-BqsZgRVE.js} +4 -12
- package/dist/cjs/part-lookup.cjs.entry.js +11 -7
- package/dist/cjs/qr-code-scan-B-8WHa22.js +11 -0
- package/dist/cjs/service-booking-form.cjs.entry.js +19 -15
- package/dist/cjs/shift-accordion.cjs.entry.js +4 -4
- package/dist/cjs/shift-checkbox.cjs.entry.js +5 -5
- package/dist/cjs/shift-components.cjs.js +4 -4
- package/dist/cjs/shift-slider.cjs.entry.js +7 -5
- package/dist/cjs/shift-switch.cjs.entry.js +4 -4
- package/dist/cjs/shift-tab-content.cjs.entry.js +7 -5
- package/dist/cjs/shift-tabs_2.cjs.entry.js +25 -25
- package/dist/cjs/ssc-lookup-form.cjs.entry.js +19 -15
- package/dist/cjs/test-drive-form.cjs.entry.js +19 -15
- package/dist/cjs/{triangle-alert-B9UanYfs.js → triangle-alert-CN15U99s.js} +3 -11
- package/dist/cjs/{validation-jJwLyk27.js → validation-5ZUxalyW.js} +3 -1
- package/dist/cjs/vehicle-accessories_7.cjs.entry.js +100 -166
- package/dist/cjs/vehicle-info-layout-sV6altzn.js +12 -0
- package/dist/cjs/vehicle-lookup.cjs.entry.js +15 -9
- package/dist/cjs/vehicle-quotation-form.cjs.entry.js +16 -16
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/components/empty.css +1 -1
- package/dist/collection/components/components/flexible-container.css +1 -1
- package/dist/collection/components/components/flexible-container.js +10 -10
- package/dist/collection/components/components/information-table.css +1 -1
- package/dist/collection/components/components/information-table.js +11 -15
- package/dist/collection/components/components/loading-spinner.css +1 -1
- package/dist/collection/components/components/loading-spinner.js +3 -3
- package/dist/collection/components/components/shift-accordion.css +1 -1
- package/dist/collection/components/components/shift-accordion.js +5 -6
- package/dist/collection/components/components/shift-checkbox.js +13 -14
- package/dist/collection/components/components/shift-portal.css +1 -1
- package/dist/collection/components/components/shift-portal.js +3 -4
- package/dist/collection/components/components/shift-select-dropdown.css +1 -1
- package/dist/collection/components/components/shift-select-dropdown.js +23 -24
- package/dist/collection/components/components/shift-select.css +1 -1
- package/dist/collection/components/components/shift-select.js +47 -43
- package/dist/collection/components/components/shift-slider.js +3 -4
- package/dist/collection/components/components/shift-switch.js +13 -14
- package/dist/collection/components/components/shift-tab-content.css +1 -1
- package/dist/collection/components/components/shift-tab-content.js +3 -4
- package/dist/collection/components/components/shift-tabs.css +1 -1
- package/dist/collection/components/components/shift-tabs.js +10 -12
- package/dist/collection/components/form-elements/form-checkbox.js +17 -17
- package/dist/collection/components/form-elements/form-date-picker-legacy.js +26 -27
- package/dist/collection/components/form-elements/form-dialog.css +1 -1
- package/dist/collection/components/form-elements/form-dialog.js +7 -8
- package/dist/collection/components/form-elements/form-file.js +132 -60
- package/dist/collection/components/form-elements/form-input-preview.js +8 -8
- package/dist/collection/components/form-elements/form-input.js +29 -31
- package/dist/collection/components/form-elements/form-inputs.css +1 -1
- package/dist/collection/components/form-elements/form-phone-number.js +25 -25
- package/dist/collection/components/form-elements/form-picker-input.js +36 -37
- package/dist/collection/components/form-elements/form-select.js +37 -36
- package/dist/collection/components/form-elements/form-shadow-input.js +8 -8
- package/dist/collection/components/form-elements/form-stepper-control.js +16 -16
- package/dist/collection/components/form-elements/form-stepper-submit.js +18 -18
- package/dist/collection/components/form-elements/form-stepper.js +11 -11
- package/dist/collection/components/form-elements/form-structure-error.js +4 -3
- package/dist/collection/components/form-elements/form-structure.js +16 -16
- package/dist/collection/components/form-elements/form-submit.js +16 -16
- package/dist/collection/components/form-elements/form-switch.js +17 -17
- package/dist/collection/components/form-elements/form-text-area.js +21 -21
- package/dist/collection/components/form-elements/form-time-picker-legacy.js +26 -26
- package/dist/collection/components/form-elements/form-vin-input.js +31 -31
- package/dist/collection/components/forms/defaults/style.css +1 -1
- package/dist/collection/components/forms/defaults/validation.js +2 -1
- package/dist/collection/components/forms/general-form.js +22 -29
- package/dist/collection/components/forms/general-inquiry.js +22 -29
- package/dist/collection/components/forms/service-booking.js +22 -29
- package/dist/collection/components/forms/ssc-lookup.js +22 -29
- package/dist/collection/components/forms/test-drive.js +22 -29
- package/dist/collection/components/forms/vehicle-quotation/themes.css +1 -1
- package/dist/collection/components/forms/vehicle-quotation.js +22 -27
- package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -1
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +41 -29
- package/dist/collection/components/part-lookup/distributor-lookup.css +1 -1
- package/dist/collection/components/part-lookup/distributor-lookup.js +49 -36
- package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -1
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +41 -29
- package/dist/collection/components/part-lookup/manufacturer-part-lookup.css +1 -1
- package/dist/collection/components/part-lookup/manufacturer-part-lookup.js +24 -20
- package/dist/collection/components/part-lookup/part-lookup.css +1 -1
- package/dist/collection/components/part-lookup/part-lookup.js +36 -26
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-accessories.js +36 -27
- package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-claimable-items.js +50 -40
- package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-item-claim-form.js +21 -21
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +26 -24
- package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-paint-thickness.js +35 -26
- package/dist/collection/components/vehicle-lookup/vehicle-sale-information.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-sale-information.js +37 -28
- package/dist/collection/components/vehicle-lookup/vehicle-service-history.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-service-history.js +35 -26
- package/dist/collection/components/vehicle-lookup/vehicle-specification.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-specification.js +35 -26
- package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.css +1 -1
- package/dist/collection/components/vehicle-lookup/vehicle-warranty-details.js +55 -45
- package/dist/collection/components/vin-extractor/vin-extractor.css +1 -1
- package/dist/collection/components/vin-extractor/vin-extractor.js +26 -25
- package/dist/collection/features/form-hook/form-hook.js +4 -0
- package/dist/collection/features/form-hook/functions.js +2 -8
- package/dist/collection/features/form-hook/inputs/form-input.js +7 -5
- package/dist/components/dead-stock-lookup.js +1 -1
- package/dist/components/distributor-lookup.js +1 -1
- package/dist/components/flexible-container.js +1 -1
- package/dist/components/form-checkbox.js +1 -1
- package/dist/components/form-date-picker.js +1 -1
- package/dist/components/form-dialog.js +1 -1
- package/dist/components/form-file.js +1 -1
- package/dist/components/form-input-preview.js +1 -1
- package/dist/components/form-input.js +1 -1
- package/dist/components/form-phone-number.js +1 -1
- package/dist/components/form-picker-input.js +1 -1
- package/dist/components/form-select.js +1 -1
- package/dist/components/form-shadow-input.js +1 -1
- package/dist/components/form-stepper-control.js +1 -1
- package/dist/components/form-stepper-submit.js +1 -1
- package/dist/components/form-stepper.js +1 -1
- package/dist/components/form-structure-error.js +1 -1
- package/dist/components/form-structure.js +1 -1
- package/dist/components/form-submit.js +1 -1
- package/dist/components/form-switch.js +1 -1
- package/dist/components/form-text-area.js +1 -1
- package/dist/components/form-time-picker.js +1 -1
- package/dist/components/form-vin-input.js +1 -1
- package/dist/components/general-form.js +1 -1
- package/dist/components/general-inquiry-form.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/information-table.js +1 -1
- package/dist/components/loading-spinner.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/manufacturer-part-lookup.js +1 -1
- package/dist/components/p-0Leiluv7.js +5 -0
- package/dist/components/p-9zux5VXM.js +5 -0
- package/dist/components/p-A2T8KqHs.js +5 -0
- package/dist/components/p-ABcgwu6F.js +5 -0
- package/dist/components/p-B2ZE4oRD.js +5 -0
- package/dist/components/p-B5T-06-W.js +5 -0
- package/dist/components/p-B6_q3Jaz.js +5 -0
- package/dist/components/p-B6gnG2lN.js +5 -0
- package/dist/components/p-B6ib31CX.js +5 -0
- package/dist/components/p-BIeJEFM6.js +5 -0
- package/dist/components/p-BL5YkEz-.js +5 -0
- package/dist/components/p-BP6R1nYk.js +5 -0
- package/dist/components/{p-CtJ3xlmH.js → p-BTfZ7GAi.js} +1 -1
- package/dist/components/p-BUGOUxbr.js +5 -0
- package/dist/components/{p-BGqJcv0T.js → p-Bu1VjE_4.js} +1 -1
- package/dist/components/p-CCpbwft_.js +5 -0
- package/dist/components/p-CH5Rb3vr.js +5 -0
- package/dist/components/p-CK3C2jeL.js +5 -0
- package/dist/components/p-CN6RvIb-.js +5 -0
- package/dist/components/{p-Co3Ttxob.js → p-COyo4v_L.js} +1 -1
- package/dist/components/p-CRJSM0nN.js +5 -0
- package/dist/components/p-CYGQmS-P.js +5 -0
- package/dist/components/{p-C3f5RXYo.js → p-CbL2RmJ1.js} +1 -1
- package/dist/components/p-CgimfOQ7.js +5 -0
- package/dist/components/p-CsqoymFO.js +5 -0
- package/dist/components/p-DIMe8nY5.js +5 -0
- package/dist/components/p-DJ66XSRQ.js +5 -0
- package/dist/components/p-DJa_zubh.js +5 -0
- package/dist/components/p-DQopO8HS.js +5 -0
- package/dist/components/p-DTQIIqm5.js +5 -0
- package/dist/components/p-DWGSY0dp.js +5 -0
- package/dist/components/p-Dal_X4-W.js +5 -0
- package/dist/components/p-DdUaptEO.js +5 -0
- package/dist/components/{p-JkEomBDe.js → p-Dhy4YWgm.js} +1 -1
- package/dist/components/p-DlJAm0cB.js +5 -0
- package/dist/components/p-DoGNkDP-.js +5 -0
- package/dist/components/p-DwJkEi88.js +5 -0
- package/dist/components/p-SQ4fUegy.js +5 -0
- package/dist/components/p-WdDnbO6s.js +5 -0
- package/dist/components/p-Y2dufCGw.js +5 -0
- package/dist/components/{p-CbPeT4Wv.js → p-_i2jGDlH.js} +1 -1
- package/dist/components/p-emKMuKu4.js +5 -0
- package/dist/components/p-puPUmTHi.js +5 -0
- package/dist/components/p-qYvbkatn.js +5 -0
- package/dist/components/p-vYuOlXCR.js +5 -0
- package/dist/components/part-lookup.js +1 -1
- package/dist/components/service-booking-form.js +1 -1
- package/dist/components/shift-accordion.js +1 -1
- package/dist/components/shift-checkbox.js +1 -1
- package/dist/components/shift-portal.js +1 -1
- package/dist/components/shift-select-dropdown.js +1 -1
- package/dist/components/shift-select.js +1 -1
- package/dist/components/shift-slider.js +1 -1
- package/dist/components/shift-switch.js +1 -1
- package/dist/components/shift-tab-content.js +1 -1
- package/dist/components/shift-tabs.js +1 -1
- package/dist/components/ssc-lookup-form.js +1 -1
- package/dist/components/test-drive-form.js +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-claimable-items.js +1 -1
- package/dist/components/vehicle-item-claim-form.js +1 -1
- package/dist/components/vehicle-lookup.js +1 -1
- package/dist/components/vehicle-paint-thickness.js +1 -1
- package/dist/components/vehicle-quotation-form.js +1 -1
- package/dist/components/vehicle-sale-information.js +1 -1
- package/dist/components/vehicle-service-history.js +1 -1
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/vehicle-warranty-details.js +1 -1
- package/dist/components/vin-extractor.js +1 -1
- package/dist/esm/{add-icon-1FhDJgrT.js → add-icon-DxQVyX6U.js} +2 -4
- package/dist/esm/app-globals-ci3rJxmu.js +10 -0
- package/dist/esm/arrow-icon-DRTeN2D5.js +9 -0
- package/dist/esm/arrow-up-icon-FAYFxG6c.js +9 -0
- package/dist/esm/calendar-days-icon-BOy0a_W-.js +9 -0
- package/dist/esm/{check-icon-mzFBdGKX.js → check-icon-BYK1ESZG.js} +2 -3
- package/dist/esm/dead-stock-lookup_3.entry.js +53 -47
- package/dist/esm/{decode-time-offset-Yzmqcv0-.js → decode-time-offset-ChO_PV6l.js} +1 -1
- package/dist/esm/flexible-container.entry.js +14 -8
- package/dist/esm/form-checkbox.entry.js +7 -7
- package/dist/esm/form-date-picker.entry.js +12 -10
- package/dist/esm/form-dialog_13.entry.js +200 -105
- package/dist/esm/{form-error-message-7rL_3zgN.js → form-error-message-YvMHko71.js} +4 -5
- package/dist/esm/{form-input-DAgayhNz.js → form-input-B8SwfkAd.js} +8 -6
- package/dist/esm/{form-input-label-C4MUngYi.js → form-input-label-cuvgzRcH.js} +4 -6
- package/dist/esm/form-input_7.entry.js +56 -40
- package/dist/esm/form-switch.entry.js +7 -7
- package/dist/esm/form-time-picker.entry.js +13 -11
- package/dist/esm/{functions-CVTPURU1.js → functions-DG73G3O6.js} +5 -11
- package/dist/esm/general-form.entry.js +19 -15
- package/dist/esm/general-inquiry-form.entry.js +19 -15
- package/dist/esm/{get-custom-classes-for-portal-CF78qKTL.js → get-custom-classes-for-portal-C4LvwyrX.js} +2 -3
- package/dist/esm/{get-language-from-url-BVbqyJmz.js → get-language-from-url-C1D-aPDq.js} +5 -1
- package/dist/esm/{get-local-language-ExQYUqwW.js → get-local-language-DsJgnZ5L.js} +2 -2
- package/dist/esm/{get-mock-files-D7WSQrLO.js → get-mock-files-_k2h1OdV.js} +2 -2
- package/dist/esm/{index-jNkxdTjc.js → index-Cg4V9l26.js} +493 -270
- package/dist/esm/information-table.entry.js +7 -5
- package/dist/esm/{loader-icon-C9goMj-j.js → loader-icon-B2ls1yXl.js} +2 -10
- package/dist/esm/loader.js +4 -4
- package/dist/esm/loading-spinner.entry.js +4 -4
- package/dist/esm/manufacturer-part-lookup.entry.js +9 -7
- package/dist/esm/{mappers-BR64PDWN.js → mappers-CeTQZn37.js} +5 -9
- package/dist/esm/{material-card-ZydeukMY.js → material-card-BMtefyp-.js} +4 -12
- package/dist/esm/part-lookup.entry.js +11 -7
- package/dist/esm/qr-code-scan-CktgNBSD.js +9 -0
- package/dist/esm/service-booking-form.entry.js +19 -15
- package/dist/esm/shift-accordion.entry.js +4 -4
- package/dist/esm/shift-checkbox.entry.js +5 -5
- package/dist/esm/shift-components.js +5 -5
- package/dist/esm/shift-slider.entry.js +7 -5
- package/dist/esm/shift-switch.entry.js +4 -4
- package/dist/esm/shift-tab-content.entry.js +7 -5
- package/dist/esm/shift-tabs_2.entry.js +25 -25
- package/dist/esm/ssc-lookup-form.entry.js +19 -15
- package/dist/esm/test-drive-form.entry.js +19 -15
- package/dist/esm/{triangle-alert-CVJ0-eRT.js → triangle-alert-D4H9aWiT.js} +3 -11
- package/dist/esm/{validation-oieVWBn1.js → validation-lB1iHxfZ.js} +3 -2
- package/dist/esm/vehicle-accessories_7.entry.js +100 -166
- package/dist/esm/vehicle-info-layout-DQ12Civq.js +10 -0
- package/dist/esm/vehicle-lookup.entry.js +15 -9
- package/dist/esm/vehicle-quotation-form.entry.js +16 -16
- package/dist/integration-manifest.json +13 -20
- package/dist/shift-components/p-04b02a2a.entry.js +5 -0
- package/dist/shift-components/{p-CyHqRBNl.js → p-08Pl1Pmo.js} +1 -1
- package/dist/shift-components/p-1416551c.entry.js +5 -0
- package/dist/shift-components/p-214259ae.entry.js +5 -0
- package/dist/shift-components/p-2b0e3d27.entry.js +5 -0
- package/dist/shift-components/p-2f764c75.entry.js +5 -0
- package/dist/shift-components/p-50819229.entry.js +5 -0
- package/dist/shift-components/p-56f69d7f.entry.js +5 -0
- package/dist/shift-components/p-64205a8d.entry.js +5 -0
- package/dist/shift-components/p-6a10c7ff.entry.js +5 -0
- package/dist/shift-components/p-79faecaa.entry.js +5 -0
- package/dist/shift-components/p-7ff0ea83.entry.js +5 -0
- package/dist/shift-components/p-8387da9d.entry.js +5 -0
- package/dist/shift-components/p-83a38f2f.entry.js +5 -0
- package/dist/shift-components/p-89853d6c.entry.js +5 -0
- package/dist/shift-components/p-8e478de8.entry.js +5 -0
- package/dist/shift-components/p-9c950549.entry.js +5 -0
- package/dist/shift-components/p-9fbdc7fd.entry.js +5 -0
- package/dist/shift-components/{p-BqIKtMjz.js → p-B8RCucpl.js} +1 -1
- package/dist/shift-components/{p-6VfKhHyc.js → p-BBmr0kTe.js} +1 -1
- package/dist/shift-components/{p-DqLLLv_z.js → p-BG5y01yj.js} +1 -1
- package/dist/shift-components/{p-D7tlaAVX.js → p-BVDXHvth.js} +1 -1
- package/dist/shift-components/{p-CRXqIT0k.js → p-BaC5C1YJ.js} +1 -1
- package/dist/shift-components/{p-BYqBwpb9.js → p-BpCf2ue6.js} +1 -1
- package/dist/shift-components/{p-WjikIqgU.js → p-BtLpOQVM.js} +1 -1
- package/dist/shift-components/p-C582V9TT.js +5 -0
- package/dist/shift-components/p-CEfxRHUk.js +5 -0
- package/dist/shift-components/{p-BUeE5BHf.js → p-CRd5RAng.js} +1 -1
- package/dist/shift-components/{p-BB4LQh2g.js → p-C_AHRam8.js} +1 -1
- package/dist/shift-components/p-Cg4V9l26.js +6 -0
- package/dist/shift-components/{p-DLnQ2n2n.js → p-CiA8HlYO.js} +1 -1
- package/dist/shift-components/{p-gbZBovQk.js → p-CtUQMviL.js} +1 -1
- package/dist/shift-components/p-D2XgNV12.js +5 -0
- package/dist/{components/p-BycIovNB.js → shift-components/p-D6ZxBLEm.js} +1 -1
- package/dist/shift-components/{p-DH9o3_cP.js → p-DlBduQTw.js} +1 -1
- package/dist/shift-components/{p-Dkfzp2fH.js → p-Dvl1mJ6N.js} +1 -1
- package/dist/shift-components/{p-CAlGd4kD.js → p-DwFWMVcD.js} +1 -1
- package/dist/shift-components/{p-6CGlGx2z.js → p-FFH7sR1n.js} +1 -1
- package/dist/shift-components/p-HI9vdFQP.js +5 -0
- package/dist/shift-components/p-acd9087d.entry.js +5 -0
- package/dist/{components/p-WfCxXt3e.js → shift-components/p-b4f9de18.entry.js} +1 -1
- package/dist/shift-components/p-bd772f48.entry.js +5 -0
- package/dist/shift-components/p-c3f88c4c.entry.js +5 -0
- package/dist/shift-components/{p-456a80bf.entry.js → p-cc3bdbd7.entry.js} +1 -1
- package/dist/shift-components/p-d5db4fb4.entry.js +5 -0
- package/dist/shift-components/p-d73f83a1.entry.js +5 -0
- package/dist/shift-components/p-e65d8cc3.entry.js +5 -0
- package/dist/shift-components/p-f148f0db.entry.js +5 -0
- package/dist/shift-components/{p-UBUcLzuM.js → p-pUYjpajc.js} +1 -1
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/stencil-docs.d.ts +37 -0
- package/dist/stencil-docs.json +539 -411
- package/dist/types/components/form-elements/form-file.d.ts +4 -0
- package/dist/types/components/forms/defaults/validation.d.ts +2 -0
- package/dist/types/components.d.ts +671 -118
- package/dist/types/features/multi-lingual/types.d.ts +4 -4
- package/dist/types/locales/forms/type.d.ts +4 -4
- package/dist/types/locales/partLookup/distributor/type.d.ts +2 -2
- package/dist/types/locales/partLookup/manufacturer/type.d.ts +2 -2
- package/dist/types/locales/partLookup/wrapper-type.d.ts +4 -4
- package/dist/types/locales/vehicleLookup/accessories/type.d.ts +6 -6
- package/dist/types/locales/vehicleLookup/claimableItems/type.d.ts +4 -4
- package/dist/types/locales/vehicleLookup/paintThickness/type.d.ts +4 -4
- package/dist/types/locales/vehicleLookup/serviceHistory/type.d.ts +4 -4
- package/dist/types/locales/vehicleLookup/wrapper-type.d.ts +16 -16
- package/dist/types/stencil-public-runtime.d.ts +158 -6
- package/package.json +2 -2
- package/dist/cjs/arrow-icon-ZTqfmBmE.js +0 -12
- package/dist/cjs/arrow-up-icon-eGUQ8IBP.js +0 -12
- package/dist/cjs/calendar-days-icon-Ugslrikt.js +0 -21
- package/dist/cjs/qr-code-scan-DIO-qSdh.js +0 -22
- package/dist/cjs/vehicle-info-layout-DSEDx5Ah.js +0 -17
- package/dist/components/p-5xxH8tbS.js +0 -5
- package/dist/components/p-B1G1Emsg.js +0 -5
- package/dist/components/p-B1rySNA6.js +0 -5
- package/dist/components/p-B7imL20E.js +0 -5
- package/dist/components/p-BD4roPIb.js +0 -5
- package/dist/components/p-BKBG7bI_.js +0 -5
- package/dist/components/p-BQ1t34rG.js +0 -5
- package/dist/components/p-BSQr-zbq.js +0 -5
- package/dist/components/p-BYDz61s7.js +0 -5
- package/dist/components/p-BZQYv_zg.js +0 -5
- package/dist/components/p-BhvdrqvQ.js +0 -5
- package/dist/components/p-Br0n06ak.js +0 -5
- package/dist/components/p-BshR1DsJ.js +0 -5
- package/dist/components/p-BxdK4hSV.js +0 -5
- package/dist/components/p-By567P_b.js +0 -5
- package/dist/components/p-Ca2-9IJS.js +0 -5
- package/dist/components/p-CfUO4dpy.js +0 -5
- package/dist/components/p-CjtTghsX.js +0 -5
- package/dist/components/p-Cl1El__H.js +0 -5
- package/dist/components/p-CtWBJGY9.js +0 -5
- package/dist/components/p-Cudi9LsD.js +0 -5
- package/dist/components/p-D7GqNvow.js +0 -5
- package/dist/components/p-DEI9cxLs.js +0 -5
- package/dist/components/p-DF3mal9n.js +0 -5
- package/dist/components/p-DFZphW5t.js +0 -5
- package/dist/components/p-DPd206Hi.js +0 -5
- package/dist/components/p-DZ2GsnAw.js +0 -5
- package/dist/components/p-Dm8bWcdH.js +0 -5
- package/dist/components/p-G9UmKW9m.js +0 -5
- package/dist/components/p-H9rpA_js.js +0 -5
- package/dist/components/p-NkzoTfD6.js +0 -5
- package/dist/components/p-Tej7fhZH.js +0 -5
- package/dist/components/p-VuUMWQot.js +0 -5
- package/dist/components/p-WQVJO8lK.js +0 -5
- package/dist/components/p-ecmObcUU.js +0 -5
- package/dist/components/p-tVYEiZTA.js +0 -5
- package/dist/components/p-xaFnNvO-.js +0 -5
- package/dist/esm/app-globals-iQ64oiU-.js +0 -9
- package/dist/esm/arrow-icon-CpbG2bMD.js +0 -10
- package/dist/esm/arrow-up-icon-CSgSH4zF.js +0 -10
- package/dist/esm/calendar-days-icon-FhJhuU8S.js +0 -19
- package/dist/esm/qr-code-scan-DUAfaPLZ.js +0 -20
- package/dist/esm/vehicle-info-layout-iwnuxQFr.js +0 -15
- package/dist/shift-components/p-066d1aa7.entry.js +0 -5
- package/dist/shift-components/p-0cd75c5d.entry.js +0 -5
- package/dist/shift-components/p-0ce901af.entry.js +0 -5
- package/dist/shift-components/p-12803c29.entry.js +0 -5
- package/dist/shift-components/p-29f31068.entry.js +0 -5
- package/dist/shift-components/p-2af2814d.entry.js +0 -5
- package/dist/shift-components/p-2e8a413a.entry.js +0 -5
- package/dist/shift-components/p-3911b357.entry.js +0 -5
- package/dist/shift-components/p-65d47c58.entry.js +0 -5
- package/dist/shift-components/p-6d0344c8.entry.js +0 -5
- package/dist/shift-components/p-73997c04.entry.js +0 -5
- package/dist/shift-components/p-7645500d.entry.js +0 -5
- package/dist/shift-components/p-9e405896.entry.js +0 -5
- package/dist/shift-components/p-BIk1ppUN.js +0 -5
- package/dist/shift-components/p-BY1wHcOT.js +0 -5
- package/dist/shift-components/p-BuurMgGN.js +0 -5
- package/dist/shift-components/p-C9T02-yz.js +0 -5
- package/dist/shift-components/p-a5ab9255.entry.js +0 -5
- package/dist/shift-components/p-a6b57150.entry.js +0 -5
- package/dist/shift-components/p-aaf49a7a.entry.js +0 -5
- package/dist/shift-components/p-ac7fcf6c.entry.js +0 -5
- package/dist/shift-components/p-b3eb2198.entry.js +0 -5
- package/dist/shift-components/p-bf5ff6d9.entry.js +0 -5
- package/dist/shift-components/p-bfdfdac5.entry.js +0 -5
- package/dist/shift-components/p-c41afd6a.entry.js +0 -5
- package/dist/shift-components/p-cf29fbbb.entry.js +0 -5
- package/dist/shift-components/p-e08bc5d9.entry.js +0 -5
- package/dist/shift-components/p-e9d552eb.entry.js +0 -5
- package/dist/shift-components/p-fc9c2c02.entry.js +0 -5
- package/dist/shift-components/p-jNkxdTjc.js +0 -6
- package/dist/shift-components/p-zUjGUnSs.js +0 -5
- /package/dist/components/{p-DN4c_zdE.js → p-5NIYyHI-.js} +0 -0
- /package/dist/components/{p-Cgt5s_xn.js → p-B6xZ__mT.js} +0 -0
- /package/dist/components/{p-DHfdaMCZ.js → p-BA1Id0rV.js} +0 -0
- /package/dist/components/{p-JSG4fAIl.js → p-BcYtRtiU.js} +0 -0
- /package/dist/components/{p-BG8YXzND.js → p-ByNlQjpu.js} +0 -0
- /package/dist/components/{p-BMqwfA7R.js → p-ByRA9Jio.js} +0 -0
- /package/dist/components/{p-BlqCKH24.js → p-BzsXkZqy.js} +0 -0
- /package/dist/components/{p-iTJ5pT2w.js → p-CILGkcfa.js} +0 -0
- /package/dist/components/{p-BHy4oEqB.js → p-CLdijNKL.js} +0 -0
- /package/dist/components/{p-8u5uhwdg.js → p-D9mmIizU.js} +0 -0
- /package/dist/components/{p-uiE7emGF.js → p-DRhkO-Ac.js} +0 -0
- /package/dist/components/{p-Co_hK-X8.js → p-D_ukwEEB.js} +0 -0
- /package/dist/components/{p-piZ41_ho.js → p-Df4xlD1R.js} +0 -0
- /package/dist/components/{p-Ce4X3l8Z.js → p-MGQ2O9as.js} +0 -0
- /package/dist/components/{p-pnQgLSsX.js → p-_nGOa2Au.js} +0 -0
- /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: '
|
|
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
|
-
|
|
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 () =>
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
298
|
+
await Promise.all((files || []).map(async (file, idx) => {
|
|
237
299
|
var _a, _b;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
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: '
|
|
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: '
|
|
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": "{
|
|
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": "{
|
|
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
|
},
|