@loczer/storefront-sdk 0.242.0 → 0.244.0
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/StorefrontProvider.d.ts +1 -1
- package/dist/StorefrontProvider.d.ts.map +1 -1
- package/dist/StorefrontProvider.js +4 -1
- package/dist/chunks/_virtual/_rolldown/{runtime-B5ovbsoX.js → runtime-DpZa9pCg.js} +2 -2
- package/dist/chunks/node_modules/@emotion/is-prop-valid/dist/{emotion-is-prop-valid.esm-6voMhWrN.js → emotion-is-prop-valid.esm-D9ze9ppN.js} +2 -2
- package/dist/chunks/node_modules/@emotion/memoize/dist/{emotion-memoize.esm-CbcNHeNh.js → emotion-memoize.esm-sGdSSg82.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/components/AnimatePresence/{PopChild-DVb6X_PO.js → PopChild-C8mc9qQ1.js} +2 -2
- package/dist/chunks/node_modules/framer-motion/dist/es/components/AnimatePresence/{PresenceChild-DyihLa7p.js → PresenceChild-DpkfTOqF.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/components/AnimatePresence/{index-DmhaitYv.js → index-CCinwqZ4.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/gestures/drag/{VisualElementDragControls-BP560JFy.js → VisualElementDragControls-ehmc8ew3.js} +4 -4
- package/dist/chunks/node_modules/framer-motion/dist/es/gestures/drag/{index-DH25rbJs.js → index-J8tZUjyC.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/gestures/{focus-D5PGq15I.js → focus-QRFsm9N6.js} +2 -2
- package/dist/chunks/node_modules/framer-motion/dist/es/gestures/pan/{PanSession-DQk2Dv3G.js → PanSession-sLXp8p5d.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/gestures/pan/{index-CSmtHc88.js → index-Xxp3TAsP.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/motion/features/animation/{index-BxVBcgYs.js → index-sdX-6EwE.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/motion/features/{animations-D8nAGh1h.js → animations-Do3vJ57n.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/motion/features/{definitions-D5AEjfKY.js → definitions-CrLGvrIW.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/motion/features/{drag-Ilu0wLsZ.js → drag-D43Pfu5N.js} +3 -3
- package/dist/chunks/node_modules/framer-motion/dist/es/motion/features/{gestures-NOCelRjM.js → gestures-d_VvxeG9.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/motion/features/{layout-B_FwT4yv.js → layout-CH7VeP6a.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/motion/features/{load-features-BzH6YCRU.js → load-features-Dc-tYT1C.js} +2 -2
- package/dist/chunks/node_modules/framer-motion/dist/es/motion/{index-Nj9omPyM.js → index-BzvHDqTG.js} +6 -6
- package/dist/chunks/node_modules/framer-motion/dist/es/motion/utils/{use-motion-ref-B42kEDKi.js → use-motion-ref-b2ngB2oB.js} +6 -5
- package/dist/chunks/node_modules/framer-motion/dist/es/render/components/{create-proxy-CkstUqll.js → create-proxy-b3I_Abov.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/render/components/motion/{feature-bundle-DUpS38r2.js → feature-bundle-BPees4f2.js} +4 -4
- package/dist/chunks/node_modules/framer-motion/dist/es/render/components/motion/{proxy-DXxjnqei.js → proxy-CHoQ_ZRl.js} +3 -3
- package/dist/chunks/node_modules/framer-motion/dist/es/render/dom/{create-visual-element-Da4IYVeR.js → create-visual-element-P5BfE5c-.js} +2 -2
- package/dist/chunks/node_modules/framer-motion/dist/es/render/dom/{use-render-vjqx3wpA.js → use-render-XDKV9hl7.js} +3 -3
- package/dist/chunks/node_modules/framer-motion/dist/es/render/dom/utils/{filter-props-8AWb0Fmy.js → filter-props-BHmAkqZq.js} +3 -3
- package/dist/chunks/node_modules/framer-motion/dist/es/render/html/{use-html-visual-state-B0BxPJ3u.js → use-html-visual-state-BwoylOjP.js} +1 -1
- package/dist/chunks/node_modules/framer-motion/dist/es/render/html/{use-props-D5zID_2s.js → use-props-DKjpQtOA.js} +2 -2
- package/dist/chunks/node_modules/framer-motion/dist/es/render/svg/{use-props-MZrwg07L.js → use-props-BHBzwG-y.js} +2 -2
- package/dist/chunks/node_modules/framer-motion/dist/es/render/svg/{use-svg-visual-state-pJSuuPIs.js → use-svg-visual-state-RrEwe-Jg.js} +1 -1
- package/dist/chunks/node_modules/mapbox-gl/dist/{mapbox-gl-C3MzR-4r.js → mapbox-gl-lLYGzV1T.js} +3453 -3389
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/{AsyncMotionValueAnimation-CaTU1DM6.js → AsyncMotionValueAnimation-QkWJcmvx.js} +3 -3
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/{JSAnimation-zfqrUSXR.js → JSAnimation-B3EkibvU.js} +5 -5
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/{NativeAnimation-CfiXAYmD.js → NativeAnimation-PX7uv064.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/{NativeAnimationExtended-BKiHRnbh.js → NativeAnimationExtended-DUr-8pW-.js} +3 -3
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/animate/{single-value-66TFY3Ue.js → single-value-ylYRBACN.js} +2 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/generators/{inertia-CSs70-4B.js → inertia-B4eMgMD9.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/generators/{keyframes-B8KsYraP.js → keyframes-BX4MJrAc.js} +4 -4
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/generators/{spring-CEJsZ0ds.js → spring-C_F1KfbZ.js} +20 -18
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/interfaces/{motion-value-Dpez8dQD.js → motion-value-BmihEEW1.js} +2 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/interfaces/{visual-element-DZ-rOn58.js → visual-element-CtkP5Gn5.js} +2 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/interfaces/{visual-element-target-C0xS2WGG.js → visual-element-target-DpGNCPE4.js} +2 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/interfaces/{visual-element-variant-B35oZvml.js → visual-element-variant-CxSEFpTW.js} +3 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/keyframes/{DOMKeyframesResolver-_h9E3nwl.js → DOMKeyframesResolver-iSzLXXCF.js} +7 -5
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/keyframes/utils/{make-none-animatable-DZ2uKxwT.js → make-none-animatable-BInq-is-.js} +2 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/utils/{can-animate-8-JdOSKl.js → can-animate-CIdIqiWo.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/utils/{is-animatable-C5hoiztj.js → is-animatable-BGX1Yix6.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/animation/utils/{replace-transition-type-BMiDtDGg.js → replace-transition-type-BVc4She4.js} +3 -3
- package/dist/chunks/node_modules/motion-dom/dist/es/projection/animation/{mix-values-CI36Bvu8.js → mix-values-CUtXHDNv.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/projection/node/{DocumentProjectionNode-DO5yRSLp.js → DocumentProjectionNode-a4NjIj1Z.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/projection/node/{HTMLProjectionNode-DPNJVDRP.js → HTMLProjectionNode-COUG5JKF.js} +2 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/projection/node/{create-projection-node-23wDIc4D.js → create-projection-node-DfFGqLfO.js} +10 -10
- package/dist/chunks/node_modules/motion-dom/dist/es/projection/styles/{scale-border-radius-o5vW8fHp.js → scale-border-radius-B3d55250.js} +4 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/projection/styles/{scale-box-shadow-BhjA57xW.js → scale-box-shadow-CXM1wetm.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/projection/styles/{scale-correction-Dqs0DG_x.js → scale-correction-DYAhjuKS.js} +2 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/render/{VisualElement-Q2WcJv6t.js → VisualElement-D4anjFHe.js} +8 -8
- package/dist/chunks/node_modules/motion-dom/dist/es/render/dom/{DOMVisualElement-C0PGIt5i.js → DOMVisualElement-mXFQzxeX.js} +2 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/render/html/{HTMLVisualElement-BlmAcWaG.js → HTMLVisualElement-BC0DN7kN.js} +3 -3
- package/dist/chunks/node_modules/motion-dom/dist/es/render/html/utils/{build-styles-d8t31XT-.js → build-styles-C4WRC_7w.js} +4 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/render/html/utils/{scrape-motion-values-Dnanh7Pq.js → scrape-motion-values-Clsn6hBW.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/render/svg/{SVGVisualElement-CQOmrr3k.js → SVGVisualElement-BZJThkam.js} +4 -4
- package/dist/chunks/node_modules/motion-dom/dist/es/render/svg/utils/{build-attrs-CfRsHEuP.js → build-attrs-BP0WdL-f.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/render/svg/utils/{scrape-motion-values-BZpmWNaV.js → scrape-motion-values-BV3zag64.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/render/utils/{animation-state-DDMO-7FQ.js → animation-state-7nc5cyDt.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/render/utils/{is-forced-motion-value-DJbn-QIQ.js → is-forced-motion-value-na4PRH8B.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/render/utils/{motion-values-BofpGQv9.js → motion-values-Jxbijqm2.js} +9 -7
- package/dist/chunks/node_modules/motion-dom/dist/es/render/utils/reduced-motion/{index-CBQsVFcz.js → index-C6y6_rcH.js} +6 -4
- package/dist/chunks/node_modules/motion-dom/dist/es/render/utils/{setters-CAm56hbR.js → setters-cb40O846.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/resize/{handle-element-C0cdHgCp.js → handle-element-CZXdtHtQ.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/resize/{index-BxIqM2kA.js → index-B0TFHCzC.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/utils/{interpolate-CzC1L8ZO.js → interpolate-DaT00cIL.js} +6 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/utils/mix/{complex-BHS_05I4.js → complex-Dzjn5Hlx.js} +3 -3
- package/dist/chunks/node_modules/motion-dom/dist/es/utils/mix/{index-BRygSkxI.js → index-BTEusiQo.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/value/{index-Bwg0vVXH.js → index-DDb4jJZH.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/value/types/complex/{filter-ClIAXOZw.js → filter-9zFmXawI.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/value/types/complex/{index-grhmCqMW.js → index-kIkrRR12.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/value/types/complex/{mask-BwJciot3.js → mask-D3jErLqD.js} +1 -1
- package/dist/chunks/node_modules/motion-dom/dist/es/value/types/maps/{defaults-CUGdDi7c.js → defaults-DaVNIt_-.js} +2 -2
- package/dist/chunks/node_modules/motion-dom/dist/es/value/types/utils/{animatable-none-48Tgfh--.js → animatable-none-CG-S6RYF.js} +4 -4
- package/dist/chunks/node_modules/motion-dom/dist/es/value/types/utils/{find-DcyXW-Sp.js → find-lgXuo3rG.js} +1 -1
- package/dist/chunks/node_modules/motion-utils/dist/es/easing/utils/{map-ldz_Xg06.js → map-Bo5YYj4g.js} +2 -2
- package/dist/chunks/node_modules/motion-utils/dist/es/{subscription-manager-B1v5ik_R.js → subscription-manager-B_Ro4fGW.js} +6 -4
- package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/date/index-DOKIsFm0.js +1 -0
- package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/date/{mini-CSEBo1ZP.js → mini-BrzKaarB.js} +32 -17
- package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/index-DnORfqv6.js +4 -0
- package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/tz/index-T2rXFLAn.js +1 -0
- package/dist/chunks/pkg/booking-engine/dist/{pricing-BJaynUu_.js → pricing-kF_if7gh.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{base-booking-D9S-zS-D.js → base-booking-CDvf2otC.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/schemas/{insurance-v2GZHSVq.js → insurance-DPNjf8J2.js} +1 -1
- package/dist/chunks/pkg/booking-engine/dist/{schemas-B82mPOxs.js → schemas-C4LrjyTw.js} +2 -2
- package/dist/chunks/pkg/booking-engine/dist/utils/{schedule-ssRov9xe.js → schedule-BxFtoe9n.js} +2 -2
- package/dist/chunks/pkg/booking-engine/dist/utils/{timezone-B6XIbBPz.js → timezone-JBbwrzTd.js} +2 -2
- package/dist/chunks/pkg/ui/dist/{Dialog-CczmPDwY.js → Dialog-C7SJ1avA.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Drawer/{index-Dp62Y2o5.js → index-CFC5ZQKl.js} +1 -1
- package/dist/chunks/pkg/ui/dist/Map/{MapContent-BgCi-wZr.js → MapContent-CHNOF5Mh.js} +3 -3
- package/dist/chunks/pkg/ui/dist/{Map-DCNW_9J_.js → Map-cFpsMPLn.js} +1 -1
- package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-Q8O5Rjfq.js → MorphingModalWizard-DlRlB0NU.js} +1 -1
- package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-BJ0RG6gh.js → ResponsiveDialog-g_bq80AX.js} +2 -2
- package/dist/chunks/pkg/ui/dist/lib/{body-pointer-events-DLBTed3C.js → body-pointer-events-E0eBpW9g.js} +1 -1
- package/dist/components/AboutSection/index.d.ts +1 -1
- package/dist/components/AboutSection/index.d.ts.map +1 -1
- package/dist/components/AddressAutocompleteInput/index.js +1 -1
- package/dist/components/AdminFloatingButton/AdminFloatingButton.d.ts +1 -1
- package/dist/components/AdminFloatingButton/AdminFloatingButton.d.ts.map +1 -1
- package/dist/components/BikeProductCard/index.d.ts +1 -1
- package/dist/components/BikeProductCard/index.d.ts.map +1 -1
- package/dist/components/BookingBikeQuickAddCard/index.d.ts +1 -1
- package/dist/components/BookingBikeQuickAddCard/index.d.ts.map +1 -1
- package/dist/components/BookingBikeQuickAddCard/index.js +2 -2
- package/dist/components/BookingBikeVariantDialog/index.d.ts +1 -1
- package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
- package/dist/components/BookingBikeVariantDialog/index.js +2 -2
- package/dist/components/BookingFlowPageLayout/index.d.ts +1 -1
- package/dist/components/BookingFlowPageLayout/index.d.ts.map +1 -1
- package/dist/components/BookingFlowSteps/index.d.ts +1 -1
- package/dist/components/BookingFlowSteps/index.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/BookingPeriodContext.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/BookingPeriodContext.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +3 -3
- package/dist/components/BookingPeriodSelector/components/BookingPeriodFieldErrorMessage.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingPeriodFieldErrorMessage.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/ModalDayPickerField.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/ModalDayPickerField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/ModalDayPickerField.js +2 -2
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts +2 -2
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +5 -5
- package/dist/components/BookingPeriodSelector/index.d.ts +1 -1
- package/dist/components/BookingPeriodSelector/index.d.ts.map +1 -1
- package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +20 -16
- package/dist/components/ContactSection/index.d.ts +1 -1
- package/dist/components/ContactSection/index.d.ts.map +1 -1
- package/dist/components/ContactSection/index.js +69 -69
- package/dist/components/ContractSaleDocument/AcceptanceModal.d.ts +1 -1
- package/dist/components/ContractSaleDocument/AcceptanceModal.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.d.ts +1 -1
- package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/Invoice.d.ts +1 -1
- package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/PageFooter.d.ts +1 -1
- package/dist/components/ContractSaleDocument/PageFooter.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/PageHeader.d.ts +1 -1
- package/dist/components/ContractSaleDocument/PageHeader.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/SignatureModal.d.ts +1 -1
- package/dist/components/ContractSaleDocument/SignatureModal.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/TermsAndConditionsContent.d.ts +1 -1
- package/dist/components/ContractSaleDocument/TermsAndConditionsContent.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/ThumbnailSidebar.d.ts +1 -1
- package/dist/components/ContractSaleDocument/ThumbnailSidebar.d.ts.map +1 -1
- package/dist/components/DelayedReveal/index.d.ts +2 -2
- package/dist/components/DelayedReveal/index.d.ts.map +1 -1
- package/dist/components/DeliveryAddressSelector/index.d.ts +1 -1
- package/dist/components/DeliveryAddressSelector/index.d.ts.map +1 -1
- package/dist/components/FaqSection/index.d.ts +1 -1
- package/dist/components/FaqSection/index.d.ts.map +1 -1
- package/dist/components/Footer/BusinessHours.d.ts +1 -1
- package/dist/components/Footer/BusinessHours.d.ts.map +1 -1
- package/dist/components/Footer/BusinessHours.js +12 -12
- package/dist/components/Footer/BusinessHoursOverviewDialog.d.ts +1 -1
- package/dist/components/Footer/BusinessHoursOverviewDialog.d.ts.map +1 -1
- package/dist/components/Footer/BusinessHoursOverviewDialog.js +1 -1
- package/dist/components/Footer/businessHoursStatus.js +1 -1
- package/dist/components/Footer/index.d.ts +1 -1
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/FulfillmentSection/index.d.ts +1 -1
- package/dist/components/FulfillmentSection/index.d.ts.map +1 -1
- package/dist/components/FulfillmentSection/index.js +1 -1
- package/dist/components/Header/index.d.ts +1 -1
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Itineraries/ItinerariesSection.d.ts +1 -1
- package/dist/components/Itineraries/ItinerariesSection.d.ts.map +1 -1
- package/dist/components/Itineraries/ItineraryListItem.d.ts +1 -1
- package/dist/components/Itineraries/ItineraryListItem.d.ts.map +1 -1
- package/dist/components/Itineraries/ItineraryRouteMap.d.ts +1 -1
- package/dist/components/Itineraries/ItineraryRouteMap.d.ts.map +1 -1
- package/dist/components/LanguageSelector/index.d.ts +1 -1
- package/dist/components/LanguageSelector/index.d.ts.map +1 -1
- package/dist/components/Layout/index.d.ts +1 -1
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Map/index.js +1 -1
- package/dist/components/PlatformFooter/index.d.ts +1 -1
- package/dist/components/PlatformFooter/index.d.ts.map +1 -1
- package/dist/components/PlaygroundDevFloatingButton/index.d.ts +1 -1
- package/dist/components/PlaygroundDevFloatingButton/index.d.ts.map +1 -1
- package/dist/components/PoweredByLoczerBadge/index.d.ts +1 -1
- package/dist/components/PoweredByLoczerBadge/index.d.ts.map +1 -1
- package/dist/components/ProductPriceBadge/index.d.ts +1 -1
- package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
- package/dist/components/ProductPriceBadge/index.js +2 -2
- package/dist/components/ProductWarningNotice/index.d.ts +1 -1
- package/dist/components/ProductWarningNotice/index.d.ts.map +1 -1
- package/dist/components/SignatureInput/index.js +1 -1
- package/dist/components/SignatureInput.d.ts +1 -1
- package/dist/components/SignatureInput.d.ts.map +1 -1
- package/dist/components/StepSectionTitle/index.d.ts +1 -1
- package/dist/components/StepSectionTitle/index.d.ts.map +1 -1
- package/dist/components/StorefrontCancellationPolicyNotice/index.d.ts +1 -1
- package/dist/components/StorefrontCancellationPolicyNotice/index.d.ts.map +1 -1
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +1 -1
- package/dist/components/StorefrontCartPanel/index.d.ts +1 -1
- package/dist/components/StorefrontCartPanel/index.d.ts.map +1 -1
- package/dist/components/StorefrontInformationDocument/index.d.ts +2 -2
- package/dist/components/StorefrontInformationDocument/index.d.ts.map +1 -1
- package/dist/components/StorefrontInsuranceNotice/index.d.ts +1 -1
- package/dist/components/StorefrontInsuranceNotice/index.d.ts.map +1 -1
- package/dist/components/StorefrontInsuranceNotice/index.js +1 -1
- package/dist/components/StorefrontPopupMessages/index.d.ts +1 -1
- package/dist/components/StorefrontPopupMessages/index.d.ts.map +1 -1
- package/dist/components/StorefrontPopupMessages/index.js +2 -2
- package/dist/components/TestimonialsSection/index.d.ts +2 -1
- package/dist/components/TestimonialsSection/index.d.ts.map +1 -1
- package/dist/components/TestimonialsSection/index.js +16 -16
- package/dist/components/WhatsAppFloatingButton/WhatsAppFloatingButton.d.ts +1 -1
- package/dist/components/WhatsAppFloatingButton/WhatsAppFloatingButton.d.ts.map +1 -1
- package/dist/components/payment/MollieCardFieldsForm.d.ts +1 -1
- package/dist/components/payment/MollieCardFieldsForm.d.ts.map +1 -1
- package/dist/components/payment/StripeCardFieldsForm.d.ts +1 -1
- package/dist/components/payment/StripeCardFieldsForm.d.ts.map +1 -1
- package/dist/i18n/I18nProvider.d.ts +1 -1
- package/dist/i18n/I18nProvider.d.ts.map +1 -1
- package/dist/i18n/I18nProvider.js +3 -3
- package/dist/i18n/en.d.ts +1 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +2 -1
- package/dist/i18n/fr.d.ts +1 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +2 -1
- package/dist/index.d.ts +59 -56
- package/dist/index.js +3 -3
- package/dist/lib/booking-period.js +3 -3
- package/dist/lib/booking.js +7 -7
- package/dist/lib/cart.d.ts +1 -1
- package/dist/lib/cart.d.ts.map +1 -1
- package/dist/lib/cart.js +1 -1
- package/dist/lib/checkoutSubmit.d.ts +4 -0
- package/dist/lib/checkoutSubmit.d.ts.map +1 -1
- package/dist/lib/checkoutSubmit.js +17 -9
- package/dist/lib/contractSaleDocumentApi.d.ts +22 -22
- package/dist/lib/floatingButtonCollision.js +1 -1
- package/dist/lib/pricing.js +2 -2
- package/dist/lib/storefrontAddress.js +1 -1
- package/dist/pages/BookingPage.d.ts +1 -1
- package/dist/pages/BookingPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.d.ts +1 -1
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +199 -199
- package/dist/pages/CheckoutPaymentPage.d.ts +1 -1
- package/dist/pages/CheckoutPaymentPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPaymentPage.js +168 -167
- package/dist/pages/CheckoutSuccessPage.d.ts +1 -1
- package/dist/pages/CheckoutSuccessPage.d.ts.map +1 -1
- package/dist/pages/CheckoutSuccessPage.js +37 -25
- package/dist/pages/ContractSaleDocumentPage.d.ts +1 -1
- package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
- package/dist/pages/ContractSaleDocumentPage.js +9 -6
- package/dist/pages/ErrorPage.d.ts +1 -1
- package/dist/pages/ErrorPage.d.ts.map +1 -1
- package/dist/pages/HomePage.d.ts +1 -1
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +1 -1
- package/dist/pages/InsuranceTermsPage.d.ts +1 -1
- package/dist/pages/InsuranceTermsPage.d.ts.map +1 -1
- package/dist/pages/InsuranceTermsPage.js +2 -2
- package/dist/pages/ItinerariesPage.d.ts +1 -1
- package/dist/pages/ItinerariesPage.d.ts.map +1 -1
- package/dist/pages/ItineraryDetailsPage.d.ts +1 -1
- package/dist/pages/ItineraryDetailsPage.d.ts.map +1 -1
- package/dist/pages/NotFoundPage.d.ts +1 -1
- package/dist/pages/NotFoundPage.d.ts.map +1 -1
- package/dist/pages/PaymentLinkPage.d.ts +1 -1
- package/dist/pages/PaymentLinkPage.d.ts.map +1 -1
- package/dist/pages/PaymentLinkSuccessPage.d.ts +1 -1
- package/dist/pages/PaymentLinkSuccessPage.d.ts.map +1 -1
- package/dist/pages/ProductPage.d.ts +1 -1
- package/dist/pages/ProductPage.d.ts.map +1 -1
- package/dist/pages/ProductPage.js +8 -8
- package/dist/pages/RentalTermsPage.d.ts +1 -1
- package/dist/pages/RentalTermsPage.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutBookingPeriodSummary.d.ts +1 -1
- package/dist/pages/checkout/components/CheckoutBookingPeriodSummary.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutCouponCard.d.ts +1 -1
- package/dist/pages/checkout/components/CheckoutCouponCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts +1 -1
- package/dist/pages/checkout/components/CheckoutDetailsCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutDetailsCard.js +1 -1
- package/dist/pages/checkout/components/CheckoutInsuranceCard.d.ts +1 -1
- package/dist/pages/checkout/components/CheckoutInsuranceCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts +1 -1
- package/dist/pages/checkout/components/CheckoutLoadingSkeleton.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutMobileSummaryDrawer.d.ts +1 -1
- package/dist/pages/checkout/components/CheckoutMobileSummaryDrawer.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutPaymentCard.d.ts +1 -1
- package/dist/pages/checkout/components/CheckoutPaymentCard.d.ts.map +1 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts +1 -1
- package/dist/pages/checkout/components/CheckoutSummaryColumn.d.ts.map +1 -1
- package/dist/pages/checkout/components/MollieCheckoutForm.d.ts +1 -1
- package/dist/pages/checkout/components/MollieCheckoutForm.d.ts.map +1 -1
- package/dist/pages/checkout/components/StripeCheckoutForm.d.ts +1 -1
- package/dist/pages/checkout/components/StripeCheckoutForm.d.ts.map +1 -1
- package/dist/pages/itineraries/ElevationProfile.d.ts +1 -1
- package/dist/pages/itineraries/ElevationProfile.d.ts.map +1 -1
- package/dist/pages/itineraries/ElevationProfile.js +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/storefront.css +1 -1
- package/dist/storefrontSchemas.d.ts +3 -3
- package/dist/storefrontSchemas.js +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/card.d.ts +7 -7
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/day-picker.d.ts +1 -1
- package/dist/ui/day-picker.d.ts.map +1 -1
- package/dist/ui/drawer.d.ts +14 -15
- package/dist/ui/drawer.d.ts.map +1 -1
- package/dist/ui/drawer.js +119 -143
- package/dist/ui/form.d.ts +8 -8
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/theme.d.ts +1 -1
- package/dist/ui/theme.d.ts.map +1 -1
- package/dist/ui/tooltip.d.ts +2 -2
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/package.json +16 -16
- package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/date/index-DAbcklF5.js +0 -1
- package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/index--u3Qf-qy.js +0 -4
- package/dist/chunks/pkg/booking-engine/dist/node_modules/@date-fns/tz/tz/index-CEcibV-H.js +0 -1
|
@@ -2,31 +2,31 @@ import { applyBookingParamsToSearch as e, getBookingParamsFromSearch as t, pickB
|
|
|
2
2
|
import { useStorefrontCart as ee } from "../lib/cart.js";
|
|
3
3
|
import { calculateBookingRentalUnitSummary as te, getPricingUnitLabel as ne } from "../lib/pricing.js";
|
|
4
4
|
import { buildStorefrontCartSummary as re } from "../lib/cartSummary.js";
|
|
5
|
-
import { ROUTE as ie,
|
|
6
|
-
import { ROUTE as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { useStorefront as
|
|
5
|
+
import { ROUTE as ie, addCheckoutBookingNumberToPath as ae, responseSchema as oe } from "../lib/checkoutSubmit.js";
|
|
6
|
+
import { ROUTE as se, buildStorefrontAvailabilityKey as ce, getStorefrontAvailabilityIssue as le, getValidStorefrontAvailabilitySchedule as ue, responseSchema as de } from "../lib/storefrontAvailability.js";
|
|
7
|
+
import { Button as fe } from "../ui/button.js";
|
|
8
|
+
import { useStorefront as pe, useStorefrontProducts as me } from "../StorefrontContext.js";
|
|
9
9
|
import { toast as a } from "../lib/toast.js";
|
|
10
10
|
import { apiPost as o } from "../lib/apiCall.js";
|
|
11
|
-
import { FulfillmentSection as
|
|
12
|
-
import { BookingFlowPageLayout as
|
|
13
|
-
import { Spinner as
|
|
14
|
-
import { ROUTE as
|
|
15
|
-
import { ROUTE as
|
|
16
|
-
import { CheckoutDetailsCard as
|
|
17
|
-
import { CheckoutInsuranceCard as
|
|
18
|
-
import { CheckoutLoadingSkeleton as
|
|
19
|
-
import { CheckoutMobileSummaryDrawer as
|
|
20
|
-
import { CheckoutSummaryColumn as
|
|
21
|
-
import { checkoutFormSchema as
|
|
22
|
-
import { useEffect as s, useMemo as c, useRef as
|
|
11
|
+
import { FulfillmentSection as he } from "../components/FulfillmentSection/index.js";
|
|
12
|
+
import { BookingFlowPageLayout as ge } from "../components/BookingFlowPageLayout/index.js";
|
|
13
|
+
import { Spinner as _e } from "../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
|
|
14
|
+
import { ROUTE as ve, responseSchema as ye } from "../lib/checkoutPaymentDecision.js";
|
|
15
|
+
import { ROUTE as be, responseSchema as xe } from "../lib/checkoutVerifyCoupon.js";
|
|
16
|
+
import { CheckoutDetailsCard as Se } from "./checkout/components/CheckoutDetailsCard.js";
|
|
17
|
+
import { CheckoutInsuranceCard as Ce } from "./checkout/components/CheckoutInsuranceCard.js";
|
|
18
|
+
import { CheckoutLoadingSkeleton as we } from "./checkout/components/CheckoutLoadingSkeleton.js";
|
|
19
|
+
import { CheckoutMobileSummaryDrawer as Te } from "./checkout/components/CheckoutMobileSummaryDrawer.js";
|
|
20
|
+
import { CheckoutSummaryColumn as Ee } from "./checkout/components/CheckoutSummaryColumn.js";
|
|
21
|
+
import { checkoutFormSchema as De } from "./checkout/types.js";
|
|
22
|
+
import { useEffect as s, useMemo as c, useRef as Oe, useState as l } from "react";
|
|
23
23
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
24
|
-
import { Link as
|
|
25
|
-
import { useTranslation as
|
|
26
|
-
import { AlertTriangle as
|
|
27
|
-
import { useForm as
|
|
24
|
+
import { Link as ke, useNavigate as Ae, useParams as je, useSearchParams as Me } from "@rpcbase/router";
|
|
25
|
+
import { useTranslation as Ne } from "react-i18next";
|
|
26
|
+
import { AlertTriangle as Pe, ArrowLeft as Fe } from "lucide-react";
|
|
27
|
+
import { useForm as Ie, zodResolver as Le } from "@rpcbase/form";
|
|
28
28
|
//#region src/pages/CheckoutPage.tsx
|
|
29
|
-
var
|
|
29
|
+
var Re = .2, f = (e, t, n) => {
|
|
30
30
|
try {
|
|
31
31
|
return new Intl.NumberFormat(n, {
|
|
32
32
|
style: "currency",
|
|
@@ -35,7 +35,7 @@ var Le = .2, f = (e, t, n) => {
|
|
|
35
35
|
} catch {
|
|
36
36
|
return `${(e / 100).toFixed(2)} ${t.toUpperCase()}`;
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, ze = (e, t) => {
|
|
39
39
|
try {
|
|
40
40
|
return new Intl.NumberFormat(t, {
|
|
41
41
|
style: "percent",
|
|
@@ -47,103 +47,103 @@ var Le = .2, f = (e, t, n) => {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
function p() {
|
|
50
|
-
let { t: p, i18n: m } =
|
|
50
|
+
let { t: p, i18n: m } = Ne(), { storefrontConfiguration: h } = pe(), Be = h.workspace?.workspaceLanguage, { bikes: g, accessories: Ve } = me(), { storeSlug: _ } = je(), [v, He] = Me(), Ue = Ae(), { items: We, itemCount: Ge, isReady: Ke, setQuantity: qe, removeItem: Je, beginCheckoutSubmission: Ye, confirmCheckoutPaymentSession: Xe, clearCheckoutSession: Ze, clear: Qe } = ee(), [y, $e] = l(!1), b = Oe(!1), [x, S] = l(null), [et, C] = l(!1), [w, T] = l(null), tt = v.get("coupon") ?? v.get("code") ?? "", [nt, E] = l(tt), [rt, it] = l(tt.trim()), [D, O] = l(null), [at, k] = l(null), [A, j] = l(!1), [ot, M] = l(null), [st, N] = l(null), [P, ct] = l(!1), [F, lt] = l(!1), ut = n(v).toString(), dt = c(() => r(new URLSearchParams(ut), _), [ut, _]), I = h.settings.fulfillmentModes.includes("delivery"), ft = h.settings.deliveryDisabledReason.trim(), pt = I || ft.length > 0, mt = h.shop.address?.trim() ?? "", L = c(() => {
|
|
51
51
|
let e = t(dt, {
|
|
52
52
|
startTime: "",
|
|
53
53
|
endTime: ""
|
|
54
54
|
});
|
|
55
|
-
return e.fulfillment === "delivery" && !
|
|
55
|
+
return e.fulfillment === "delivery" && !I ? {
|
|
56
56
|
...e,
|
|
57
57
|
fulfillment: "pickup"
|
|
58
58
|
} : e;
|
|
59
|
-
}, [dt,
|
|
60
|
-
items:
|
|
59
|
+
}, [dt, I]), R = c(() => ue(L), [L]), z = h.bookingEngine.pricing, ht = te(L, z, h.bookingEngine.shop.timeZone), gt = ne(z.baseUnit, p), _t = ht?.billableUnitCount, B = c(() => re({
|
|
60
|
+
items: We,
|
|
61
61
|
language: m.language,
|
|
62
|
-
fallbackLanguage:
|
|
62
|
+
fallbackLanguage: Be,
|
|
63
63
|
products: {
|
|
64
64
|
bikes: g,
|
|
65
|
-
accessories:
|
|
65
|
+
accessories: Ve
|
|
66
66
|
},
|
|
67
|
-
priceUnit:
|
|
67
|
+
priceUnit: z.baseUnit,
|
|
68
68
|
billableUnitCount: _t
|
|
69
69
|
}), [
|
|
70
|
-
|
|
70
|
+
Ve,
|
|
71
71
|
g,
|
|
72
72
|
_t,
|
|
73
73
|
m.language,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
]),
|
|
74
|
+
We,
|
|
75
|
+
z.baseUnit,
|
|
76
|
+
Be
|
|
77
|
+
]), V = c(() => B.lines.map((e) => ({
|
|
78
78
|
productId: e.checkoutProductId,
|
|
79
79
|
productVariantId: e.productVariantId,
|
|
80
80
|
quantity: e.quantity
|
|
81
|
-
})), [
|
|
81
|
+
})), [B.lines]), [vt, H] = l([]), [U, W] = l(!1);
|
|
82
82
|
s(() => {
|
|
83
|
-
if (!_ ||
|
|
84
|
-
|
|
83
|
+
if (!_ || V.length === 0) {
|
|
84
|
+
H([]), W(!1);
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
|
-
if (!
|
|
88
|
-
|
|
87
|
+
if (!R) {
|
|
88
|
+
H([]), W(!1);
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
let e = !1;
|
|
92
|
-
return
|
|
92
|
+
return W(!0), H([]), (async () => {
|
|
93
93
|
try {
|
|
94
|
-
let t = await o(
|
|
94
|
+
let t = await o(se, {
|
|
95
95
|
storeSlug: _,
|
|
96
|
-
schedule:
|
|
97
|
-
products:
|
|
98
|
-
}), n =
|
|
96
|
+
schedule: R,
|
|
97
|
+
products: V
|
|
98
|
+
}), n = de.parse(t);
|
|
99
99
|
if (e) return;
|
|
100
|
-
|
|
100
|
+
H(n.success ? n.availability ?? [] : []);
|
|
101
101
|
} catch (t) {
|
|
102
102
|
if (e) return;
|
|
103
|
-
console.error("Failed to load checkout cart availability", t),
|
|
103
|
+
console.error("Failed to load checkout cart availability", t), H([]);
|
|
104
104
|
} finally {
|
|
105
|
-
e ||
|
|
105
|
+
e || W(!1);
|
|
106
106
|
}
|
|
107
107
|
})(), () => {
|
|
108
108
|
e = !0;
|
|
109
109
|
};
|
|
110
110
|
}, [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
L.endDate,
|
|
112
|
+
L.endTime,
|
|
113
|
+
L.startDate,
|
|
114
|
+
L.startTime,
|
|
115
|
+
R,
|
|
116
|
+
V,
|
|
117
117
|
_
|
|
118
118
|
]);
|
|
119
|
-
let yt = c(() => new Map(vt.map((e) => [
|
|
120
|
-
...
|
|
121
|
-
lines:
|
|
122
|
-
let t = yt.get(
|
|
119
|
+
let yt = c(() => new Map(vt.map((e) => [ce(e.productId, e.productVariantId), e])), [vt]), bt = c(() => ({
|
|
120
|
+
...B,
|
|
121
|
+
lines: B.lines.map((e) => {
|
|
122
|
+
let t = yt.get(ce(e.checkoutProductId, e.productVariantId)), n = t ? le(t) : e.availabilityStatus === "OUT_OF_STOCK" ? "unavailable" : void 0;
|
|
123
123
|
return {
|
|
124
124
|
...e,
|
|
125
|
-
insufficientCapacity: !
|
|
126
|
-
availabilityIssue:
|
|
125
|
+
insufficientCapacity: !U && n !== void 0,
|
|
126
|
+
availabilityIssue: U ? void 0 : n
|
|
127
127
|
};
|
|
128
128
|
})
|
|
129
129
|
}), [
|
|
130
130
|
yt,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
]),
|
|
131
|
+
U,
|
|
132
|
+
B
|
|
133
|
+
]), G = c(() => B.lines.map((e) => ({
|
|
134
134
|
kind: e.kind,
|
|
135
135
|
productId: e.checkoutProductId,
|
|
136
136
|
productVariantId: e.productVariantId,
|
|
137
137
|
quantity: e.quantity
|
|
138
|
-
})), [
|
|
138
|
+
})), [B.lines]), xt = new Map(g.map((e) => [e.checkoutProductId?.trim() || e.id, e])), K = B.lines.flatMap((e) => {
|
|
139
139
|
let t = xt.get(e.checkoutProductId);
|
|
140
140
|
return t?.insurance?.enabled ? [{
|
|
141
141
|
quantity: e.quantity,
|
|
142
142
|
pricePerDayMinor: t.insurance.pricePerDayMinor,
|
|
143
143
|
deductibleAmountMinor: t.insurance.deductibleAmountMinor
|
|
144
144
|
}] : [];
|
|
145
|
-
}),
|
|
146
|
-
resolver:
|
|
145
|
+
}), q = h.modules?.insurance?.enabled === !0 && K.length > 0, J = q && F, St = K.reduce((e, t) => e + t.pricePerDayMinor * t.quantity, 0), Ct = K.reduce((e, t) => Math.max(e, t.deductibleAmountMinor), 0), wt = B.totalMinor ?? 0, Y = at?.totalMinor ?? wt, X = at?.insuranceSubtotalMinor ?? 0, Tt = D?.discountAmountMinor ?? 0, Z = e(new URLSearchParams(), L).toString(), Q = `/${_ ?? ""}/booking${Z ? `?${Z}` : ""}`, Et = `/${_ ?? ""}/checkout${Z ? `?${Z}` : ""}`, Dt = Ie({
|
|
146
|
+
resolver: Le(De),
|
|
147
147
|
defaultValues: {
|
|
148
148
|
fullName: "",
|
|
149
149
|
email: "",
|
|
@@ -152,183 +152,183 @@ function p() {
|
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
154
|
s(() => {
|
|
155
|
-
i(_,
|
|
156
|
-
}, [
|
|
157
|
-
!
|
|
158
|
-
}, [
|
|
159
|
-
let
|
|
155
|
+
i(_, L);
|
|
156
|
+
}, [L, _]), s(() => {
|
|
157
|
+
!q && F && lt(!1);
|
|
158
|
+
}, [F, q]);
|
|
159
|
+
let Ot = (t) => {
|
|
160
160
|
let n = {
|
|
161
|
-
...
|
|
161
|
+
...L,
|
|
162
162
|
...t
|
|
163
163
|
}, r = e(v, n);
|
|
164
|
-
r.toString() !== v.toString() && (
|
|
164
|
+
r.toString() !== v.toString() && (He(r, { replace: !0 }), i(_, r));
|
|
165
165
|
};
|
|
166
166
|
s(() => {
|
|
167
|
-
if (!_ ||
|
|
168
|
-
|
|
167
|
+
if (!_ || G.length === 0 || !R) {
|
|
168
|
+
O(null), k(null), j(!1), M(null), N(null);
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
|
-
let e =
|
|
172
|
-
return
|
|
171
|
+
let e = rt.trim(), t = e.length === 0 && !P, n = !1;
|
|
172
|
+
return j(!0), N(null), M(null), (async () => {
|
|
173
173
|
try {
|
|
174
|
-
let r = await o(
|
|
174
|
+
let r = await o(be, {
|
|
175
175
|
storeSlug: _,
|
|
176
|
-
schedule:
|
|
177
|
-
items:
|
|
176
|
+
schedule: R,
|
|
177
|
+
items: G,
|
|
178
178
|
couponCode: e || void 0,
|
|
179
179
|
includeAutoApply: t,
|
|
180
|
-
insuranceAccepted:
|
|
181
|
-
}), i =
|
|
180
|
+
insuranceAccepted: J
|
|
181
|
+
}), i = xe.parse(r);
|
|
182
182
|
if (n) return;
|
|
183
|
-
if (
|
|
183
|
+
if (k(typeof i.subtotalMinor == "number" && typeof i.totalMinor == "number" ? {
|
|
184
184
|
subtotalMinor: i.subtotalMinor,
|
|
185
185
|
totalMinor: i.totalMinor,
|
|
186
186
|
lateReturnSurchargeMinor: i.lateReturnSurchargeMinor,
|
|
187
187
|
insuranceSubtotalMinor: i.insuranceSubtotalMinor,
|
|
188
188
|
insuranceBillableDays: i.insuranceBillableDays
|
|
189
189
|
} : null), !i.success) {
|
|
190
|
-
|
|
190
|
+
O(null), N(i.message || p("checkout_coupon_invalid"));
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
|
-
|
|
193
|
+
O(i.coupon ?? null), i.coupon && (i.coupon.autoApplied && e.length === 0 ? (E(i.coupon.code), M(p("checkout_coupon_auto_applied", { code: i.coupon.code }))) : M(p("checkout_coupon_manual_applied")));
|
|
194
194
|
} catch (e) {
|
|
195
195
|
if (n) return;
|
|
196
|
-
console.error("Failed to verify checkout coupon", e),
|
|
196
|
+
console.error("Failed to verify checkout coupon", e), O(null), k(null), N(p("checkout_coupon_error"));
|
|
197
197
|
} finally {
|
|
198
|
-
n ||
|
|
198
|
+
n || j(!1);
|
|
199
199
|
}
|
|
200
200
|
})(), () => {
|
|
201
201
|
n = !0;
|
|
202
202
|
};
|
|
203
203
|
}, [
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
204
|
+
P,
|
|
205
|
+
L.endDate,
|
|
206
|
+
L.endTime,
|
|
207
|
+
L.startDate,
|
|
208
|
+
L.startTime,
|
|
209
|
+
R,
|
|
210
|
+
G,
|
|
211
|
+
J,
|
|
212
212
|
_,
|
|
213
|
-
|
|
213
|
+
rt,
|
|
214
214
|
p
|
|
215
215
|
]), s(() => {
|
|
216
|
-
if (!_ ||
|
|
217
|
-
|
|
216
|
+
if (!_ || B.lines.length === 0 || !R) {
|
|
217
|
+
S(null), T(null), C(!1);
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
220
|
let e = !1;
|
|
221
|
-
return
|
|
221
|
+
return C(!0), T(null), (async () => {
|
|
222
222
|
try {
|
|
223
|
-
let t = await o(
|
|
223
|
+
let t = await o(ve, {
|
|
224
224
|
storeSlug: _,
|
|
225
|
-
schedule:
|
|
226
|
-
estimatedTotalMinor:
|
|
227
|
-
insuranceAmountMinor:
|
|
228
|
-
}), n =
|
|
225
|
+
schedule: R,
|
|
226
|
+
estimatedTotalMinor: Y,
|
|
227
|
+
insuranceAmountMinor: X
|
|
228
|
+
}), n = ye.parse(t);
|
|
229
229
|
if (e) return;
|
|
230
230
|
if (!n.success || !n.decision) {
|
|
231
|
-
|
|
231
|
+
S(null), T(n.message || p("checkout_payment_error"));
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
|
-
|
|
234
|
+
S(n.decision);
|
|
235
235
|
} catch (t) {
|
|
236
236
|
if (e) return;
|
|
237
|
-
console.error("Failed to load checkout payment decision", t),
|
|
237
|
+
console.error("Failed to load checkout payment decision", t), S(null), T(p("checkout_payment_error"));
|
|
238
238
|
} finally {
|
|
239
|
-
e ||
|
|
239
|
+
e || C(!1);
|
|
240
240
|
}
|
|
241
241
|
})(), () => {
|
|
242
242
|
e = !0;
|
|
243
243
|
};
|
|
244
244
|
}, [
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
J,
|
|
251
|
-
z.lines.length,
|
|
245
|
+
L.endDate,
|
|
246
|
+
L.endTime,
|
|
247
|
+
L.startDate,
|
|
248
|
+
L.startTime,
|
|
249
|
+
R,
|
|
252
250
|
Y,
|
|
251
|
+
B.lines.length,
|
|
252
|
+
X,
|
|
253
253
|
_,
|
|
254
254
|
p
|
|
255
255
|
]);
|
|
256
|
-
let $ =
|
|
257
|
-
if (!_ ||
|
|
258
|
-
$e(!0),
|
|
259
|
-
let t =
|
|
256
|
+
let $ = x?.currency ?? "EUR", kt = f(Y, $, m.language), At = Math.max(0, Y - X), jt = Math.round(At / 1.2), Mt = jt + X, Nt = Math.max(0, At - jt), Pt = f(Mt, $, m.language), Ft = f(Nt, $, m.language), It = ze(Re, m.language), Lt = X > 0 ? f(X, $, m.language) : void 0, Rt = x?.amountToCollectMinor ?? 0, zt = x?.shouldCollectOnlinePayment === !0 && Rt > 0, Bt = Dt.handleSubmit(async (e) => {
|
|
257
|
+
if (!_ || G.length === 0 || !R || b.current) return;
|
|
258
|
+
$e(!0), b.current = !0;
|
|
259
|
+
let t = Ye();
|
|
260
260
|
try {
|
|
261
261
|
let n = await o(ie, {
|
|
262
262
|
storeSlug: _,
|
|
263
263
|
checkoutSessionId: t.checkoutSessionId,
|
|
264
264
|
replacesCheckoutSessionId: t.replacesCheckoutSessionId,
|
|
265
|
-
schedule:
|
|
266
|
-
fulfillment:
|
|
267
|
-
startAddress:
|
|
268
|
-
endAddress:
|
|
269
|
-
couponCode:
|
|
270
|
-
couponAutoApplied: !
|
|
271
|
-
insuranceAccepted:
|
|
265
|
+
schedule: R,
|
|
266
|
+
fulfillment: L.fulfillment,
|
|
267
|
+
startAddress: L.fulfillment === "delivery" ? L.startAddress : void 0,
|
|
268
|
+
endAddress: L.fulfillment === "delivery" ? L.endAddress : void 0,
|
|
269
|
+
couponCode: D?.code,
|
|
270
|
+
couponAutoApplied: !P && D?.autoApplied,
|
|
271
|
+
insuranceAccepted: J,
|
|
272
272
|
customer: {
|
|
273
273
|
name: e.fullName,
|
|
274
274
|
email: e.email,
|
|
275
275
|
phone: e.phone,
|
|
276
276
|
notes: e.notes
|
|
277
277
|
},
|
|
278
|
-
items:
|
|
279
|
-
}), r =
|
|
278
|
+
items: G
|
|
279
|
+
}), r = oe.parse(n);
|
|
280
280
|
if (!r.success || !r.checkout) {
|
|
281
|
-
|
|
281
|
+
Ze(), a.error(r.message || p("checkout_payment_error"));
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
r.checkout.requiresPayment ?
|
|
284
|
+
r.checkout.requiresPayment ? Xe(r.checkout.checkoutSessionId ?? t.checkoutSessionId) : a.success(p("checkout_success_toast")), await Ue(ae(r.checkout.nextPath, r.checkout.bookingExternalId)), r.checkout.requiresPayment || Qe();
|
|
285
285
|
} catch (e) {
|
|
286
286
|
console.error("Failed to submit storefront checkout", e), a.error(p("checkout_payment_error"));
|
|
287
287
|
} finally {
|
|
288
|
-
|
|
288
|
+
b.current = !1, $e(!1);
|
|
289
289
|
}
|
|
290
|
-
}),
|
|
291
|
-
|
|
292
|
-
},
|
|
290
|
+
}), Vt = p(zt ? "checkout_continue_to_payment" : "checkout_submit"), Ht = p(zt ? "checkout_mobile_continue_to_payment" : "checkout_mobile_submit"), Ut = L.fulfillment === "delivery" && L.startAddress.trim().length === 0, Wt = !y && !et && !w && !U && !A && !st && !!x && !!R && !Ut && G.length > 0, Gt = () => {
|
|
291
|
+
Wt && Bt();
|
|
292
|
+
}, Kt = ({ className: e, presentation: t, stickyTopClassName: n } = {}) => /* @__PURE__ */ u(Ee, {
|
|
293
293
|
className: e,
|
|
294
294
|
lines: bt.lines,
|
|
295
|
-
itemCount:
|
|
295
|
+
itemCount: Ge,
|
|
296
296
|
baseUnitLabel: gt,
|
|
297
|
-
bookingSubtotalLabel:
|
|
298
|
-
vatAmountLabel:
|
|
299
|
-
vatRateLabel:
|
|
300
|
-
bookingTotalLabel:
|
|
301
|
-
bookingPeriod:
|
|
302
|
-
bookingPath:
|
|
303
|
-
startDate:
|
|
304
|
-
startTime:
|
|
305
|
-
endDate:
|
|
306
|
-
endTime:
|
|
297
|
+
bookingSubtotalLabel: Pt,
|
|
298
|
+
vatAmountLabel: Ft,
|
|
299
|
+
vatRateLabel: It,
|
|
300
|
+
bookingTotalLabel: kt,
|
|
301
|
+
bookingPeriod: R ? {
|
|
302
|
+
bookingPath: Q,
|
|
303
|
+
startDate: R.startDate,
|
|
304
|
+
startTime: R.startTime,
|
|
305
|
+
endDate: R.endDate,
|
|
306
|
+
endTime: R.endTime
|
|
307
307
|
} : void 0,
|
|
308
308
|
presentation: t,
|
|
309
309
|
stickyTopClassName: n,
|
|
310
|
-
onQuantityChange:
|
|
311
|
-
onRemove:
|
|
310
|
+
onQuantityChange: qe,
|
|
311
|
+
onRemove: Je,
|
|
312
312
|
coupon: {
|
|
313
|
-
code:
|
|
314
|
-
appliedCode:
|
|
315
|
-
discountLabel:
|
|
313
|
+
code: nt,
|
|
314
|
+
appliedCode: D?.code,
|
|
315
|
+
discountLabel: D && Tt > 0 ? f(Tt, $, m.language) : null,
|
|
316
316
|
message: ot,
|
|
317
317
|
error: st,
|
|
318
|
-
loading:
|
|
319
|
-
disabled:
|
|
318
|
+
loading: A,
|
|
319
|
+
disabled: y,
|
|
320
320
|
onCodeChange: (e) => {
|
|
321
|
-
|
|
321
|
+
E(e), N(null), M(null);
|
|
322
322
|
},
|
|
323
323
|
onApply: () => {
|
|
324
|
-
ct(!1),
|
|
324
|
+
ct(!1), it(nt.trim());
|
|
325
325
|
},
|
|
326
326
|
onRemove: () => {
|
|
327
|
-
|
|
327
|
+
E(""), it(""), O(null), k(null), N(null), M(null), ct(!0);
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
});
|
|
331
|
-
return
|
|
331
|
+
return Ke ? B.lines.length === 0 ? /* @__PURE__ */ u("div", {
|
|
332
332
|
className: "mx-auto max-w-3xl px-4 py-10 sm:px-6",
|
|
333
333
|
children: /* @__PURE__ */ d("div", {
|
|
334
334
|
className: "rounded-xl border border-slate-200 bg-white p-4 shadow-sm",
|
|
@@ -343,11 +343,11 @@ function p() {
|
|
|
343
343
|
}),
|
|
344
344
|
/* @__PURE__ */ u("div", {
|
|
345
345
|
className: "mt-6",
|
|
346
|
-
children: /* @__PURE__ */ u(
|
|
347
|
-
to:
|
|
348
|
-
children: /* @__PURE__ */ d(
|
|
346
|
+
children: /* @__PURE__ */ u(ke, {
|
|
347
|
+
to: Q,
|
|
348
|
+
children: /* @__PURE__ */ d(fe, {
|
|
349
349
|
className: "gap-2",
|
|
350
|
-
children: [/* @__PURE__ */ u(
|
|
350
|
+
children: [/* @__PURE__ */ u(Fe, {
|
|
351
351
|
className: "h-4 w-4",
|
|
352
352
|
"aria-hidden": "true"
|
|
353
353
|
}), /* @__PURE__ */ u("span", { children: p("back_to_booking") })]
|
|
@@ -356,11 +356,11 @@ function p() {
|
|
|
356
356
|
})
|
|
357
357
|
]
|
|
358
358
|
})
|
|
359
|
-
}) : /* @__PURE__ */ d(
|
|
359
|
+
}) : /* @__PURE__ */ d(ge, {
|
|
360
360
|
currentStep: "checkout",
|
|
361
|
-
bookingPath:
|
|
361
|
+
bookingPath: Q,
|
|
362
362
|
checkoutPath: Et,
|
|
363
|
-
backPath:
|
|
363
|
+
backPath: Q,
|
|
364
364
|
backLabel: p("back_to_booking"),
|
|
365
365
|
children: [/* @__PURE__ */ d("div", {
|
|
366
366
|
className: "grid gap-6 pb-24 lg:grid-cols-12 lg:pb-0",
|
|
@@ -371,7 +371,7 @@ function p() {
|
|
|
371
371
|
className: "text-xl font-semibold tracking-tight text-slate-950",
|
|
372
372
|
children: /* @__PURE__ */ u("span", { children: p("checkout_title") })
|
|
373
373
|
}),
|
|
374
|
-
|
|
374
|
+
R ? null : /* @__PURE__ */ u("p", {
|
|
375
375
|
role: "alert",
|
|
376
376
|
className: "mt-3 text-sm text-destructive",
|
|
377
377
|
children: /* @__PURE__ */ u("span", { children: p("booking_time_slots_required") })
|
|
@@ -381,76 +381,76 @@ function p() {
|
|
|
381
381
|
children: [
|
|
382
382
|
pt ? /* @__PURE__ */ u("div", {
|
|
383
383
|
className: "rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
|
|
384
|
-
children: /* @__PURE__ */ u(
|
|
385
|
-
value:
|
|
386
|
-
onValueChange: (e) =>
|
|
384
|
+
children: /* @__PURE__ */ u(he, {
|
|
385
|
+
value: L.fulfillment,
|
|
386
|
+
onValueChange: (e) => Ot({ fulfillment: e }),
|
|
387
387
|
pickupAddress: mt,
|
|
388
|
-
deliveryEnabled:
|
|
388
|
+
deliveryEnabled: I,
|
|
389
389
|
deliveryDisabledReason: ft,
|
|
390
|
-
startAddress:
|
|
391
|
-
onStartAddressChange: (e) =>
|
|
392
|
-
endAddress:
|
|
393
|
-
onEndAddressChange: (e) =>
|
|
390
|
+
startAddress: L.startAddress,
|
|
391
|
+
onStartAddressChange: (e) => Ot({ startAddress: e }),
|
|
392
|
+
endAddress: L.endAddress,
|
|
393
|
+
onEndAddressChange: (e) => Ot({ endAddress: e }),
|
|
394
394
|
showPickupAddressWhenPickupOnly: !1,
|
|
395
395
|
testIdPrefix: "storefront-checkout-fulfillment"
|
|
396
396
|
})
|
|
397
397
|
}) : null,
|
|
398
|
-
/* @__PURE__ */ u(
|
|
398
|
+
/* @__PURE__ */ u(Se, {
|
|
399
399
|
form: Dt,
|
|
400
|
-
onSubmit:
|
|
400
|
+
onSubmit: Gt
|
|
401
401
|
}),
|
|
402
|
-
|
|
403
|
-
accepted:
|
|
404
|
-
disabled:
|
|
402
|
+
q ? /* @__PURE__ */ u(Ce, {
|
|
403
|
+
accepted: J,
|
|
404
|
+
disabled: y || A,
|
|
405
405
|
dailyAmountLabel: f(St, $, m.language),
|
|
406
|
-
totalAmountLabel:
|
|
407
|
-
billableDays:
|
|
406
|
+
totalAmountLabel: Lt,
|
|
407
|
+
billableDays: at?.insuranceBillableDays,
|
|
408
408
|
deductibleLabel: Ct > 0 ? f(Ct, $, m.language) : void 0,
|
|
409
409
|
onAcceptedChange: lt
|
|
410
410
|
}) : null,
|
|
411
|
-
|
|
411
|
+
et ? /* @__PURE__ */ d("div", {
|
|
412
412
|
className: "flex items-center gap-2 text-sm text-slate-600",
|
|
413
413
|
role: "status",
|
|
414
|
-
children: [/* @__PURE__ */ u(
|
|
414
|
+
children: [/* @__PURE__ */ u(_e, {
|
|
415
415
|
className: "size-4",
|
|
416
416
|
"aria-hidden": "true"
|
|
417
417
|
}), /* @__PURE__ */ u("span", { children: p("checkout_payment_loading") })]
|
|
418
418
|
}) : null,
|
|
419
|
-
|
|
419
|
+
w ? /* @__PURE__ */ d("div", {
|
|
420
420
|
className: "flex items-start gap-2 rounded-md bg-destructive p-3 text-sm text-destructive-foreground shadow-sm",
|
|
421
421
|
role: "alert",
|
|
422
|
-
children: [/* @__PURE__ */ u(
|
|
422
|
+
children: [/* @__PURE__ */ u(Pe, {
|
|
423
423
|
className: "mt-0.5 h-4 w-4",
|
|
424
424
|
"aria-hidden": "true"
|
|
425
|
-
}), /* @__PURE__ */ u("span", { children:
|
|
425
|
+
}), /* @__PURE__ */ u("span", { children: w })]
|
|
426
426
|
}) : null,
|
|
427
|
-
/* @__PURE__ */ u(
|
|
427
|
+
/* @__PURE__ */ u(fe, {
|
|
428
428
|
type: "button",
|
|
429
429
|
size: "lg",
|
|
430
|
-
onClick:
|
|
431
|
-
disabled: !
|
|
430
|
+
onClick: Gt,
|
|
431
|
+
disabled: !Wt,
|
|
432
432
|
className: "mt-4 hidden w-fit lg:inline-flex",
|
|
433
|
-
children: /* @__PURE__ */ u("span", { children:
|
|
433
|
+
children: /* @__PURE__ */ u("span", { children: Vt })
|
|
434
434
|
}),
|
|
435
|
-
|
|
435
|
+
Ut ? /* @__PURE__ */ u("p", {
|
|
436
436
|
className: "text-sm text-slate-600",
|
|
437
437
|
children: /* @__PURE__ */ u("span", { children: p("checkout_delivery_address_required") })
|
|
438
438
|
}) : null
|
|
439
439
|
]
|
|
440
440
|
})
|
|
441
441
|
]
|
|
442
|
-
}),
|
|
443
|
-
}), /* @__PURE__ */ u(
|
|
444
|
-
canSubmit:
|
|
445
|
-
compactSubmitLabel:
|
|
446
|
-
itemCount:
|
|
447
|
-
submitLabel:
|
|
448
|
-
totalLabel:
|
|
449
|
-
onSubmit:
|
|
450
|
-
children:
|
|
442
|
+
}), Kt({ className: "hidden lg:block" })]
|
|
443
|
+
}), /* @__PURE__ */ u(Te, {
|
|
444
|
+
canSubmit: Wt,
|
|
445
|
+
compactSubmitLabel: Ht,
|
|
446
|
+
itemCount: Ge,
|
|
447
|
+
submitLabel: Vt,
|
|
448
|
+
totalLabel: kt,
|
|
449
|
+
onSubmit: Gt,
|
|
450
|
+
children: Kt({ presentation: "flat" })
|
|
451
451
|
})]
|
|
452
|
-
}) : /* @__PURE__ */ u(
|
|
453
|
-
bookingPath:
|
|
452
|
+
}) : /* @__PURE__ */ u(we, {
|
|
453
|
+
bookingPath: Q,
|
|
454
454
|
checkoutPath: Et
|
|
455
455
|
});
|
|
456
456
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function CheckoutPaymentPage(): import("react
|
|
1
|
+
export default function CheckoutPaymentPage(): import("react").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=CheckoutPaymentPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckoutPaymentPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPaymentPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckoutPaymentPage.d.ts","sourceRoot":"","sources":["../../src/pages/CheckoutPaymentPage.tsx"],"names":[],"mappings":"AAwGA,MAAM,CAAC,OAAO,UAAU,mBAAmB,gCA2Z1C"}
|