@lookiero/checkout 9.14.0 → 10.0.0-beta.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/fake-dependencies/@lookiero/payments-front/index.d.ts +8 -6
- package/dist/fake-dependencies/@lookiero/payments-front/index.js +7 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -2
- package/dist/pact.config.d.ts +21 -0
- package/dist/pact.config.js +16 -0
- package/dist/public/public/assets/adaptive-icon.png +0 -0
- package/dist/public/public/assets/favicon.png +0 -0
- package/dist/public/public/assets/icon.png +0 -0
- package/dist/public/public/assets/splash.png +0 -0
- package/dist/public/public/images/not-found.png +0 -0
- package/dist/src/Expo.js +0 -2
- package/dist/src/ExpoRoot.js +19 -15
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.d.ts +1 -1
- package/dist/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.js +2 -0
- package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +55 -0
- package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +116 -0
- package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +56 -0
- package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +51 -0
- package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +51 -0
- package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +51 -0
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +13 -0
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +19 -0
- package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +56 -0
- package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +57 -0
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +55 -0
- package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +120 -0
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +55 -0
- package/dist/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.d.ts +1 -1
- package/dist/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.js +2 -1
- package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +1 -0
- package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +55 -0
- package/dist/src/infrastructure/tracking/tracking.d.ts +2 -2
- package/dist/src/infrastructure/tracking/useTrackCheckout.d.ts +10 -17
- package/dist/src/infrastructure/tracking/useTrackCheckout.js +27 -12
- package/dist/src/infrastructure/ui/Root.d.ts +6 -6
- package/dist/src/infrastructure/ui/Root.js +2 -3
- package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.js +1 -2
- package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.js +2 -3
- package/dist/src/infrastructure/ui/components/atoms/price/Price.js +0 -3
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +22 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +1 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +7 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +5 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +7 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +6 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +4 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +20 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +4 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +43 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +12 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +14 -0
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +3 -7
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.d.ts +2 -18
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.js +2 -14
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.js +1 -2
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.js +1 -2
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +3 -4
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.js +1 -0
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +3 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +2 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +4 -4
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +2 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +2 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +1 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +4 -5
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +6 -6
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +3 -4
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.js +1 -0
- package/dist/src/infrastructure/ui/components/templates/footer/Footer.d.ts +3 -0
- package/dist/src/infrastructure/ui/components/templates/footer/Footer.js +13 -0
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +2 -2
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +7 -0
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +21 -0
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +8 -0
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +12 -0
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +2 -2
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +4 -4
- package/dist/src/infrastructure/ui/hooks/useCheckoutFlow.d.ts +26 -0
- package/dist/src/infrastructure/ui/hooks/useCheckoutFlow.js +135 -0
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +12 -0
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +64 -0
- package/dist/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.d.ts +3 -2
- package/dist/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.js +17 -26
- package/dist/src/infrastructure/ui/hooks/useStaticInfo.d.ts +2 -0
- package/dist/src/infrastructure/ui/hooks/useStaticInfo.js +2 -2
- package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.d.ts +1 -1
- package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +22 -55
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +10 -0
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +17 -0
- package/dist/src/infrastructure/ui/i18n/i18n.d.ts +2 -2
- package/dist/src/infrastructure/ui/i18n/i18n.js +2 -2
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +20 -0
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +27 -0
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +10 -0
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +27 -0
- package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.js +3 -14
- package/dist/src/infrastructure/ui/routing/Routing.d.ts +5 -5
- package/dist/src/infrastructure/ui/routing/Routing.js +8 -18
- package/dist/src/infrastructure/ui/routing/routes.d.ts +0 -1
- package/dist/src/infrastructure/ui/routing/routes.js +0 -1
- package/dist/src/infrastructure/ui/test/render.js +3 -7
- package/dist/src/infrastructure/ui/views/App.js +5 -7
- package/dist/src/infrastructure/ui/views/App.style.d.ts +6 -0
- package/dist/src/infrastructure/ui/views/App.style.js +8 -0
- package/dist/src/infrastructure/ui/views/checkout/Checkout.d.ts +7 -2
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +24 -15
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +3 -0
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +3 -0
- package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.js +16 -16
- package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js +2 -2
- package/dist/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.js +7 -7
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +2 -2
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +7 -0
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +11 -0
- package/dist/src/infrastructure/ui/views/item/Item.js +1 -3
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +3 -3
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +5 -11
- package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +4 -4
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +3 -3
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +0 -1
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +1 -2
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +12 -0
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +64 -0
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +12 -0
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +16 -0
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +4 -4
- package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +40 -0
- package/dist/src/infrastructure/ui/views/return/Return.style.js +44 -0
- package/dist/src/infrastructure/ui/views/return/components/price/Price.js +0 -3
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +3 -3
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +6 -6
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -1
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +1 -2
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +4 -4
- package/dist/src/infrastructure/ui/views/summary/Summary.js +5 -6
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +2 -3
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +6 -8
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +14 -0
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +28 -0
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +7 -0
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +11 -0
- package/dist/src/infrastructure/ui/views/summaryTabs/SummaryTabs.js +1 -3
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +5 -5
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +26 -0
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +21 -0
- package/dist/src/projection/customer/customer.d.ts +2 -0
- package/dist/src/projection/order/order.d.ts +1 -1
- package/dist/src/projection/shared/country.d.ts +14 -0
- package/dist/src/projection/shared/country.js +15 -0
- package/dist/src/projection/shared/customer.d.ts +9 -0
- package/dist/src/projection/shared/customer.js +1 -0
- package/dist/src/projection/shared/locale.d.ts +12 -0
- package/dist/src/projection/shared/locale.js +13 -0
- package/dist/src/projection/shared/order.d.ts +6 -0
- package/dist/src/projection/shared/order.js +1 -0
- package/dist/src/projection/shared/price.d.ts +11 -0
- package/dist/src/projection/shared/price.js +1 -0
- package/dist/src/projection/shared/size.d.ts +21 -0
- package/dist/src/projection/shared/size.js +4 -0
- package/dist/src/projection/shared/subscription.d.ts +2 -0
- package/dist/src/projection/shared/subscription.js +1 -0
- package/dist/src/projection/subscription/subscription.d.ts +1 -1
- package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.d.ts +15 -0
- package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.js +16 -0
- package/dist/src/shared/ui/components/atoms/error/Error.d.ts +11 -0
- package/dist/src/shared/ui/components/atoms/error/Error.js +6 -0
- package/dist/src/shared/ui/components/atoms/field/Field.d.ts +14 -0
- package/dist/src/shared/ui/components/atoms/field/Field.js +29 -0
- package/dist/src/shared/ui/components/atoms/field/Field.style.d.ts +16 -0
- package/dist/src/shared/ui/components/atoms/field/Field.style.js +19 -0
- package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +24 -0
- package/dist/src/shared/ui/components/molecules/inputField/InputField.js +28 -0
- package/dist/src/shared/ui/components/molecules/inputField/InputField.style.d.ts +29 -0
- package/dist/src/shared/ui/components/molecules/inputField/InputField.style.js +37 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/fake-dependencies/@lookiero/payments-front/index.tsx +32 -9
- package/index.ts +11 -5
- package/jest.config.js +2 -2
- package/package.json +9 -9
- package/src/Expo.tsx +0 -3
- package/src/ExpoRoot.tsx +44 -38
- package/src/infrastructure/domain/checkoutBooking/react/useBlockCheckoutBooking.ts +4 -1
- package/src/infrastructure/projection/pricing/react/useViewPricingByCheckoutId.ts +3 -2
- package/src/infrastructure/tracking/tracking.ts +2 -2
- package/src/infrastructure/tracking/useTrackCheckout.ts +66 -56
- package/src/infrastructure/ui/Root.tsx +9 -9
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.ts +2 -3
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.tsx +2 -3
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/__snapshots__/FiveItemsDiscountBanner.test.tsx.snap +1 -1
- package/src/infrastructure/ui/components/atoms/price/Price.tsx +0 -3
- package/src/infrastructure/ui/components/atoms/price/__snapshots__/Price.test.tsx.snap +3 -3
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.ts +4 -25
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +7 -13
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.tsx +1 -2
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.tsx +1 -2
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +1 -0
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +2 -4
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +3 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +2 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +5 -5
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +2 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +2 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +1 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +5 -6
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +7 -7
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.ts +1 -0
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +2 -4
- package/src/infrastructure/ui/components/templates/footer/Footer.test.tsx +15 -0
- package/src/infrastructure/ui/components/templates/footer/Footer.tsx +19 -0
- package/src/infrastructure/ui/components/templates/footer/__snapshots__/Footer.test.tsx.snap +1127 -0
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +2 -2
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +1 -1
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +2 -2
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +1 -1
- package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +5 -4
- package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +1 -1
- package/src/infrastructure/ui/hooks/{useSubmitCheckout.test.ts → useCheckoutFlow.test.ts} +1 -1
- package/src/infrastructure/ui/hooks/useCheckoutFlow.tsx +212 -0
- package/src/infrastructure/ui/hooks/usePaymentInstrumentEvents.ts +18 -60
- package/src/infrastructure/ui/hooks/useStaticInfo.tsx +4 -2
- package/src/infrastructure/ui/i18n/i18n.ts +2 -3
- package/src/infrastructure/ui/routing/CheckoutMiddleware.test.tsx +3 -3
- package/src/infrastructure/ui/routing/CheckoutMiddleware.tsx +3 -17
- package/src/infrastructure/ui/routing/Routing.tsx +25 -39
- package/src/infrastructure/ui/routing/routes.ts +0 -1
- package/src/infrastructure/ui/test/render.tsx +4 -10
- package/src/infrastructure/ui/views/App.tsx +5 -14
- package/src/infrastructure/ui/views/checkout/Checkout.style.ts +3 -0
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +55 -18
- package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.test.tsx +116 -121
- package/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.tsx +2 -2
- package/src/infrastructure/ui/views/checkout/components/deliveryBanner/__snapshots__/DeliveryBanner.test.tsx.snap +1 -1
- package/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.tsx +8 -8
- package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.tsx +2 -2
- package/src/infrastructure/ui/views/item/Item.tsx +1 -2
- package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.tsx +3 -3
- package/src/infrastructure/ui/views/item/components/banner/__snapshots__/CustomerDecissionBanner.test.tsx.snap +3 -3
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +5 -11
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +88 -160
- package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +4 -4
- package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +128 -244
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.ts +1 -2
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +3 -3
- package/src/infrastructure/ui/views/item/components/productVariantDescription/__snapshots__/ProductVariantDescription.test.tsx.snap +8 -10
- package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +30 -30
- package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +2 -2
- package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +1 -1
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +4 -4
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +41 -75
- package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +102 -105
- package/src/infrastructure/ui/views/return/components/price/Price.tsx +0 -3
- package/src/infrastructure/ui/views/return/components/price/__snapshots__/Price.test.tsx.snap +3 -3
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +3 -3
- package/src/infrastructure/ui/views/return/components/productVariantPreview/__snapshots__/ProductVariantPreview.test.tsx.snap +1 -1
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +1 -2
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +6 -6
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +4 -4
- package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +30 -30
- package/src/infrastructure/ui/views/summary/Summary.tsx +5 -6
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +2 -3
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +82 -154
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +6 -8
- package/src/infrastructure/ui/views/summaryTabs/SummaryTabs.tsx +1 -2
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +5 -5
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +62 -62
- package/src/projection/customer/customer.ts +2 -0
- package/src/projection/order/order.ts +1 -1
- package/src/projection/subscription/subscription.ts +1 -1
- package/src/infrastructure/ui/hooks/useSubmitCheckout.ts +0 -169
- package/src/infrastructure/ui/routing/useBasePath.test.tsx +0 -19
- package/src/infrastructure/ui/routing/useBasePath.tsx +0 -24
- package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.tsx +0 -125
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useLocation } from "react-router-native";
|
|
3
|
+
import { Footer as AuroraFooter, FooterItem } from "@lookiero/aurora";
|
|
4
|
+
const Footer = () => {
|
|
5
|
+
const location = useLocation();
|
|
6
|
+
return (React.createElement(AuroraFooter, { value: location.pathname },
|
|
7
|
+
React.createElement(FooterItem, { icon: "box", text: "Inicio", value: "/" }),
|
|
8
|
+
React.createElement(FooterItem, { icon: "heart", text: "Look&Like", value: "/look-and-like" }),
|
|
9
|
+
React.createElement(FooterItem, { icon: "referrals", text: "Amigas", value: "/friends" }),
|
|
10
|
+
React.createElement(FooterItem, { icon: "eye_open", text: "Inspiraci\u00F3n", value: "/inspiration" }),
|
|
11
|
+
React.createElement(FooterItem, { icon: "inbox", notification: true, text: "Mensajes", value: "/messages" })));
|
|
12
|
+
};
|
|
13
|
+
export { Footer };
|
package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonIcon, Text } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
-
import {
|
|
4
|
+
import { I18nMessages } from "../../../../i18n/i18n";
|
|
5
5
|
import { Header } from "../Header";
|
|
6
6
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
7
7
|
import { style } from "./CheckoutHeader.style";
|
|
8
8
|
const CheckoutHeader = ({ onBack }) => {
|
|
9
|
-
const title = useI18nMessage({
|
|
9
|
+
const title = useI18nMessage({ id: I18nMessages.HEADER_COMPLETE_CHECKOUT_TITLE });
|
|
10
10
|
return (React.createElement(Header, { testID: "checkout-header" },
|
|
11
11
|
React.createElement(ButtonIcon, { name: "arrow_left", style: style.button, testID: "arrow-left-button-icon", onPress: onBack }),
|
|
12
12
|
React.createElement(Text, { level: 3, action: true }, title),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonIcon } from "@lookiero/aurora";
|
|
3
|
+
import { Header } from "../Header";
|
|
4
|
+
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
5
|
+
import { Logo } from "../logo/Logo";
|
|
6
|
+
import { style } from "./DefaultHeader.style";
|
|
7
|
+
|
|
8
|
+
const DefaultHeader = ({ onPressMenu }) =>
|
|
9
|
+
React.createElement(
|
|
10
|
+
Header,
|
|
11
|
+
{ testID: "default-header" },
|
|
12
|
+
React.createElement(Logo, null),
|
|
13
|
+
React.createElement(ButtonIconPlaceholder, null),
|
|
14
|
+
React.createElement(ButtonIcon, {
|
|
15
|
+
name: "menu",
|
|
16
|
+
style: style.button,
|
|
17
|
+
testID: "menu-button-icon",
|
|
18
|
+
onPress: onPressMenu,
|
|
19
|
+
}),
|
|
20
|
+
);
|
|
21
|
+
export { DefaultHeader };
|
package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
+
|
|
4
|
+
const { space10 } = theme();
|
|
5
|
+
const style = StyleSheet.create({
|
|
6
|
+
button: {
|
|
7
|
+
alignSelf: "auto",
|
|
8
|
+
height: space10,
|
|
9
|
+
width: space10,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
export { style };
|
package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ButtonIcon, Text } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
-
import {
|
|
4
|
+
import { I18nMessages } from "../../../../i18n/i18n";
|
|
5
5
|
import { Header } from "../Header";
|
|
6
6
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
7
7
|
import { style } from "./ItemDetailHeader.style";
|
|
8
8
|
const ItemDetailHeader = ({ onBack }) => {
|
|
9
|
-
const title = useI18nMessage({
|
|
9
|
+
const title = useI18nMessage({ id: I18nMessages.HEADER_CHECKOUT_TITLE });
|
|
10
10
|
return (React.createElement(Header, { testID: "item-detail-header" },
|
|
11
11
|
React.createElement(ButtonIconPlaceholder, null),
|
|
12
12
|
React.createElement(Text, { level: 3, action: true }, title),
|
|
@@ -2,18 +2,18 @@ import React, { useCallback } from "react";
|
|
|
2
2
|
import { generatePath, useNavigate } from "react-router-native";
|
|
3
3
|
import { ButtonIcon, Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
-
import {
|
|
5
|
+
import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
6
|
+
import { I18nMessages } from "../../../../i18n/i18n";
|
|
6
7
|
import { Routes } from "../../../../routing/routes";
|
|
7
|
-
import { useBasePath } from "../../../../routing/useBasePath";
|
|
8
8
|
import { Header } from "../Header";
|
|
9
9
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
10
10
|
import style from "./ItemHeader.style";
|
|
11
11
|
const ItemHeader = ({ items, item, onNext, onPrevious }) => {
|
|
12
|
-
const title = useI18nMessage({
|
|
12
|
+
const title = useI18nMessage({ id: I18nMessages.HEADER_CHECKOUT_TITLE });
|
|
13
13
|
const itemIndex = items.indexOf(item);
|
|
14
14
|
const isFirstItem = itemIndex === 0;
|
|
15
15
|
const isLastItem = itemIndex === items.length - 1;
|
|
16
|
-
const basePath =
|
|
16
|
+
const { basePath } = useStaticInfo();
|
|
17
17
|
const navigate = useNavigate();
|
|
18
18
|
const navigateToPreviousItem = useCallback(() => {
|
|
19
19
|
const previousItemIndex = itemIndex === 0 ? items.length - 1 : itemIndex - 1;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { CheckoutProjection } from "../../../projection/checkout/checkout";
|
|
3
|
+
import { OrderProjection } from "../../../projection/order/order";
|
|
4
|
+
import { SubscriptionProjection } from "../../../projection/subscription/subscription";
|
|
5
|
+
type CheckoutFlowStatus = "idle" | "loading" | "success" | "error";
|
|
6
|
+
interface CheckoutFlowFunction {
|
|
7
|
+
(): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
type CheckoutFlowReturn = [
|
|
10
|
+
checkoutFlow: CheckoutFlowFunction,
|
|
11
|
+
checkoutFlowStatus: CheckoutFlowStatus,
|
|
12
|
+
paymentFlow: ReactNode
|
|
13
|
+
];
|
|
14
|
+
interface UseCheckoutFlowArgs {
|
|
15
|
+
readonly checkout: CheckoutProjection | undefined;
|
|
16
|
+
readonly order: OrderProjection;
|
|
17
|
+
readonly subscription: SubscriptionProjection;
|
|
18
|
+
readonly getAuthToken: () => Promise<string>;
|
|
19
|
+
readonly onSuccess: () => void;
|
|
20
|
+
}
|
|
21
|
+
interface UseCheckoutFlowFunction {
|
|
22
|
+
(args: UseCheckoutFlowArgs): CheckoutFlowReturn;
|
|
23
|
+
}
|
|
24
|
+
declare const useCheckoutFlow: UseCheckoutFlowFunction;
|
|
25
|
+
export type { CheckoutFlowStatus };
|
|
26
|
+
export { useCheckoutFlow };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
import { CommandStatus } from "@lookiero/messaging-react";
|
|
3
|
+
import { PaymentFlow, Section } from "@lookiero/payments-front";
|
|
4
|
+
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
5
|
+
import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
|
|
6
|
+
import { viewCheckoutBookingById, } from "../../../projection/checkoutBooking/viewCheckoutBookingById";
|
|
7
|
+
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
8
|
+
import { useSubmitCheckout as useSubmitCheckoutCommand } from "../../domain/checkout/react/useSubmitCheckout";
|
|
9
|
+
import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
|
|
10
|
+
import { useViewIsSizeChangeEnabledByCheckoutId } from "../../projection/checkout/react/useViewIsSizeChangeEnabledByCheckoutId";
|
|
11
|
+
import { useViewPaymentFlowPayloadByCheckoutId } from "../../projection/payment/react/useViewPaymentFlowPayloadByCheckoutId";
|
|
12
|
+
import { useViewPricingByCheckoutId } from "../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
13
|
+
import { useTrackCheckout } from "../../tracking/useTrackCheckout";
|
|
14
|
+
import { I18nMessages } from "../i18n/i18n";
|
|
15
|
+
import { Routes } from "../routing/routes";
|
|
16
|
+
import { usePaymentInstrumentEvents } from "./usePaymentInstrumentEvents";
|
|
17
|
+
import { useQueryBus } from "./useQueryBus";
|
|
18
|
+
import { useStaticInfo } from "./useStaticInfo";
|
|
19
|
+
const useCheckoutFlow = ({ checkout: checkoutProjection, order: orderProjection, subscription: subscriptionProjection, getAuthToken, onSuccess, }) => {
|
|
20
|
+
const logger = useLogger();
|
|
21
|
+
const queryBus = useQueryBus();
|
|
22
|
+
const { customer: { customerId, country, segment, name, email }, basePath, } = useStaticInfo();
|
|
23
|
+
const paymentFlowRef = useRef(null);
|
|
24
|
+
const [paymentFlowPayload] = useViewPaymentFlowPayloadByCheckoutId({
|
|
25
|
+
checkoutId: checkoutProjection?.id,
|
|
26
|
+
});
|
|
27
|
+
const [sizeChangeEnabled] = useViewIsSizeChangeEnabledByCheckoutId({ checkoutId: checkoutProjection?.id });
|
|
28
|
+
const [pricing] = useViewPricingByCheckoutId({
|
|
29
|
+
checkoutId: checkoutProjection?.id,
|
|
30
|
+
queryOptions: { refetchOnMount: true },
|
|
31
|
+
});
|
|
32
|
+
const [submitCheckoutCommand, submitCheckoutCommandStatus] = useSubmitCheckoutCommand({
|
|
33
|
+
checkoutId: checkoutProjection?.id,
|
|
34
|
+
logger,
|
|
35
|
+
});
|
|
36
|
+
const [blockCheckoutBooking, blockCheckoutBookingStatus] = useBlockCheckoutBooking({
|
|
37
|
+
checkoutBookingId: checkoutProjection?.checkoutBookingId,
|
|
38
|
+
logger,
|
|
39
|
+
});
|
|
40
|
+
const [createNotification] = useCreateToastNotification({ contextId: MESSAGING_CONTEXT_ID, logger });
|
|
41
|
+
const [checkoutBookingExpired, setCheckoutBookingExpired] = useState(false);
|
|
42
|
+
const [startLegacyBoxCheckoutStatus, setStartLegacyBoxCheckoutStatus] = useState("idle");
|
|
43
|
+
const [authToken, setAuthToken] = useState();
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
const loadAuthToken = async () => setAuthToken(await getAuthToken());
|
|
46
|
+
loadAuthToken();
|
|
47
|
+
}, [getAuthToken]);
|
|
48
|
+
const trackCheckout = useTrackCheckout({
|
|
49
|
+
checkout: checkoutProjection,
|
|
50
|
+
order: orderProjection,
|
|
51
|
+
pricing,
|
|
52
|
+
subscription: subscriptionProjection,
|
|
53
|
+
userId: customerId,
|
|
54
|
+
country,
|
|
55
|
+
segment,
|
|
56
|
+
});
|
|
57
|
+
const checkoutFlow = useCallback(async () => {
|
|
58
|
+
try {
|
|
59
|
+
sizeChangeEnabled && (await blockCheckoutBooking());
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (checkoutProjection?.checkoutBookingId) {
|
|
65
|
+
const checkoutBooking = await queryBus(viewCheckoutBookingById({ checkoutBookingId: checkoutProjection?.checkoutBookingId }));
|
|
66
|
+
if (checkoutBooking?.isExpired) {
|
|
67
|
+
setCheckoutBookingExpired(true);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
setStartLegacyBoxCheckoutStatus("loading");
|
|
72
|
+
paymentFlowRef.current?.startLegacyBoxCheckout({
|
|
73
|
+
...paymentFlowPayload,
|
|
74
|
+
userInformation: { email, name },
|
|
75
|
+
returnUrl: `${basePath}/${Routes.CHECKOUT}`,
|
|
76
|
+
});
|
|
77
|
+
}, [
|
|
78
|
+
checkoutProjection?.checkoutBookingId,
|
|
79
|
+
paymentFlowPayload,
|
|
80
|
+
email,
|
|
81
|
+
name,
|
|
82
|
+
basePath,
|
|
83
|
+
sizeChangeEnabled,
|
|
84
|
+
blockCheckoutBooking,
|
|
85
|
+
queryBus,
|
|
86
|
+
]);
|
|
87
|
+
const handleOnCheckoutFlowSuccess = useCallback(() => {
|
|
88
|
+
trackCheckout();
|
|
89
|
+
onSuccess();
|
|
90
|
+
}, [onSuccess, trackCheckout]);
|
|
91
|
+
const onPaymentSuccess = useCallback(async () => {
|
|
92
|
+
setStartLegacyBoxCheckoutStatus("success");
|
|
93
|
+
await submitCheckoutCommand();
|
|
94
|
+
createNotification({
|
|
95
|
+
bodyI18nKey: I18nMessages.CHECKOUT_TOAST_PAYMENT_SUCCESS,
|
|
96
|
+
level: NotificationLevel.SUCCESS,
|
|
97
|
+
});
|
|
98
|
+
}, [createNotification, submitCheckoutCommand]);
|
|
99
|
+
const onPaymentError = useCallback((payload) => {
|
|
100
|
+
setStartLegacyBoxCheckoutStatus("error");
|
|
101
|
+
createNotification({
|
|
102
|
+
bodyI18nKey: payload.metadata?.toaster?.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
|
|
103
|
+
level: NotificationLevel.ERROR,
|
|
104
|
+
});
|
|
105
|
+
}, [createNotification]);
|
|
106
|
+
usePaymentInstrumentEvents({ onSuccess: onPaymentSuccess, onError: onPaymentError });
|
|
107
|
+
const checkoutFlowStatus = useMemo(() => {
|
|
108
|
+
if (blockCheckoutBookingStatus === CommandStatus.LOADING ||
|
|
109
|
+
startLegacyBoxCheckoutStatus === "loading" ||
|
|
110
|
+
submitCheckoutCommandStatus === CommandStatus.LOADING) {
|
|
111
|
+
return "loading";
|
|
112
|
+
}
|
|
113
|
+
if (blockCheckoutBookingStatus === CommandStatus.SUCCESS &&
|
|
114
|
+
startLegacyBoxCheckoutStatus === "success" &&
|
|
115
|
+
submitCheckoutCommandStatus === CommandStatus.SUCCESS) {
|
|
116
|
+
return "success";
|
|
117
|
+
}
|
|
118
|
+
if (blockCheckoutBookingStatus === CommandStatus.ERROR ||
|
|
119
|
+
startLegacyBoxCheckoutStatus === "error" ||
|
|
120
|
+
submitCheckoutCommandStatus === CommandStatus.ERROR ||
|
|
121
|
+
checkoutBookingExpired) {
|
|
122
|
+
return "error";
|
|
123
|
+
}
|
|
124
|
+
return "idle";
|
|
125
|
+
}, [blockCheckoutBookingStatus, startLegacyBoxCheckoutStatus, submitCheckoutCommandStatus, checkoutBookingExpired]);
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
if (checkoutFlowStatus !== "success") {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
handleOnCheckoutFlowSuccess();
|
|
131
|
+
}, [handleOnCheckoutFlowSuccess, checkoutFlowStatus]);
|
|
132
|
+
const paymentFlow = useMemo(() => (authToken ? React.createElement(PaymentFlow, { ref: paymentFlowRef, section: Section.BOX_CHECKOUT, token: authToken }) : null), [authToken]);
|
|
133
|
+
return useMemo(() => [checkoutFlow, checkoutFlowStatus, paymentFlow], [checkoutFlow, paymentFlow, checkoutFlowStatus]);
|
|
134
|
+
};
|
|
135
|
+
export { useCheckoutFlow };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
declare enum NewFeedbackExperimentVariation {
|
|
4
|
+
CONTROL = "control",
|
|
5
|
+
RETURN_PAGE = "return_page",
|
|
6
|
+
}
|
|
7
|
+
interface NewFeedbackExperimentProviderProps {
|
|
8
|
+
readonly children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const NewFeedbackExperimentProvider: FC<NewFeedbackExperimentProviderProps>;
|
|
11
|
+
declare const useNewFeedbackExperiment: () => NewFeedbackExperimentVariation;
|
|
12
|
+
export { useNewFeedbackExperiment, NewFeedbackExperimentProvider, NewFeedbackExperimentVariation };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { createContext, useContext, useEffect, useMemo, useRef } from "react";
|
|
2
|
+
import invariant from "tiny-invariant";
|
|
3
|
+
import { Spinner } from "@lookiero/aurora";
|
|
4
|
+
import { useAssignedVariationByExperimentId } from "@lookiero/sty-psp-ab-testing";
|
|
5
|
+
import { useViewFirstAvailableCheckoutByCustomerId } from "../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
6
|
+
import { useTrackAssignedVariationByExperiment } from "../../tracking/useTrackAssignedVariationByExperiment";
|
|
7
|
+
import { useStaticInfo } from "./useStaticInfo";
|
|
8
|
+
|
|
9
|
+
var NewFeedbackExperimentVariation;
|
|
10
|
+
(function (NewFeedbackExperimentVariation) {
|
|
11
|
+
NewFeedbackExperimentVariation["CONTROL"] = "control";
|
|
12
|
+
NewFeedbackExperimentVariation["RETURN_PAGE"] = "return_page";
|
|
13
|
+
})(NewFeedbackExperimentVariation || (NewFeedbackExperimentVariation = {}));
|
|
14
|
+
const NewFeedbackExperimentContext = createContext(null);
|
|
15
|
+
const NewFeedbackExperimentProvider = ({ children }) => {
|
|
16
|
+
const {
|
|
17
|
+
kameleoon: {
|
|
18
|
+
experiments: {
|
|
19
|
+
newFeedback: { id: newFeedbackId, variations },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
customer: { customerId, country, segment },
|
|
23
|
+
} = useStaticInfo();
|
|
24
|
+
const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
25
|
+
const { assignedVariation: newFeedbackVariation } = useAssignedVariationByExperimentId({
|
|
26
|
+
experimentId: newFeedbackId,
|
|
27
|
+
});
|
|
28
|
+
const trackAssignedVariation = useTrackAssignedVariationByExperiment({
|
|
29
|
+
checkoutId: checkout?.id,
|
|
30
|
+
country,
|
|
31
|
+
segment,
|
|
32
|
+
experimentId: newFeedbackId,
|
|
33
|
+
});
|
|
34
|
+
const value = useMemo(
|
|
35
|
+
() => ({
|
|
36
|
+
variation:
|
|
37
|
+
newFeedbackVariation?.id === Number(variations.v1)
|
|
38
|
+
? NewFeedbackExperimentVariation.RETURN_PAGE
|
|
39
|
+
: NewFeedbackExperimentVariation.CONTROL,
|
|
40
|
+
}),
|
|
41
|
+
[newFeedbackVariation?.id, variations.v1],
|
|
42
|
+
);
|
|
43
|
+
const assignedVariantTracked = useRef(false);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (assignedVariantTracked.current || !newFeedbackVariation || !checkout?.id) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
trackAssignedVariation({ assignedVariation: newFeedbackVariation });
|
|
49
|
+
assignedVariantTracked.current = true;
|
|
50
|
+
}, [checkout?.id, newFeedbackVariation, trackAssignedVariation]);
|
|
51
|
+
if (!checkout) {
|
|
52
|
+
return React.createElement(Spinner, null);
|
|
53
|
+
}
|
|
54
|
+
return React.createElement(NewFeedbackExperimentContext.Provider, { value: value }, children);
|
|
55
|
+
};
|
|
56
|
+
const useNewFeedbackExperiment = () => {
|
|
57
|
+
const newFeedbackExperiment = useContext(NewFeedbackExperimentContext);
|
|
58
|
+
invariant(
|
|
59
|
+
newFeedbackExperiment,
|
|
60
|
+
"Your are trying to use the useNewFeedbackExperiment hook without wrapping your app with the <NewFeedbackExperimentProvider>.",
|
|
61
|
+
);
|
|
62
|
+
return newFeedbackExperiment.variation;
|
|
63
|
+
};
|
|
64
|
+
export { useNewFeedbackExperiment, NewFeedbackExperimentProvider, NewFeedbackExperimentVariation };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PaymentPayload } from "@lookiero/payments-front";
|
|
2
2
|
interface UsePaymentInstrumentEventsFunctionArgs {
|
|
3
|
-
readonly
|
|
3
|
+
readonly onSuccess: (payload: PaymentPayload) => void;
|
|
4
|
+
readonly onError: (payload: PaymentPayload) => void;
|
|
4
5
|
}
|
|
5
6
|
interface UsePaymentInstrumentEventsFunction {
|
|
6
7
|
(args: UsePaymentInstrumentEventsFunctionArgs): void;
|
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { I18nMessages } from "../i18n/i18n";
|
|
6
|
-
const PAYMENT_ERROR = "ERROR";
|
|
7
|
-
const PAYMENT_SUCCESS = "PAYMENT_INSTRUMENT_UPDATED";
|
|
8
|
-
const usePaymentInstrumentEvents = ({ logger }) => {
|
|
9
|
-
const { subscribe, unsubscribe } = useEvent();
|
|
10
|
-
const [createNotification] = useCreateToastNotification({ contextId: MESSAGING_CONTEXT_ID, logger });
|
|
11
|
-
const onSuccess = useCallback(({ message }) => createNotification({ bodyI18nKey: message.id, level: NotificationLevel.SUCCESS }), [createNotification]);
|
|
12
|
-
const onError = useCallback(({ error }) => {
|
|
13
|
-
if (error.toaster) {
|
|
14
|
-
createNotification({
|
|
15
|
-
bodyI18nKey: error.toaster.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
|
|
16
|
-
level: NotificationLevel.ERROR,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}, [createNotification]);
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { Section, usePaymentStatusManager } from "@lookiero/payments-front";
|
|
3
|
+
const usePaymentInstrumentEvents = ({ onSuccess, onError }) => {
|
|
4
|
+
const refreshStatus = usePaymentStatusManager(Section.BOX_CHECKOUT);
|
|
20
5
|
useEffect(() => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
6
|
+
const { isLoading, consumePayload } = refreshStatus;
|
|
7
|
+
if (isLoading) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
consumePayload((payload) => {
|
|
11
|
+
if (payload.success) {
|
|
12
|
+
onSuccess(payload);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
onError(payload);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}, [onError, onSuccess, refreshStatus]);
|
|
28
19
|
};
|
|
29
20
|
export { usePaymentInstrumentEvents };
|
|
@@ -4,11 +4,13 @@ import { KameleoonEnvironment } from "../../ab-testing/kameleoonEnvironment";
|
|
|
4
4
|
interface StaticInfo {
|
|
5
5
|
readonly kameleoon: KameleoonEnvironment;
|
|
6
6
|
readonly customer: Customer;
|
|
7
|
+
readonly basePath: string;
|
|
7
8
|
}
|
|
8
9
|
interface StaticInfoProviderProps {
|
|
9
10
|
readonly children: ReactNode;
|
|
10
11
|
readonly kameleoon: KameleoonEnvironment;
|
|
11
12
|
readonly customer: Customer;
|
|
13
|
+
readonly basePath: string;
|
|
12
14
|
}
|
|
13
15
|
declare const StaticInfoProvider: FC<StaticInfoProviderProps>;
|
|
14
16
|
declare const useStaticInfo: () => StaticInfo;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { createContext, useContext, useMemo } from "react";
|
|
2
2
|
import invariant from "tiny-invariant";
|
|
3
3
|
const StaticInfoContext = createContext(null);
|
|
4
|
-
const StaticInfoProvider = ({ children, kameleoon, customer }) => {
|
|
5
|
-
const value = useMemo(() => ({ kameleoon, customer }), [customer, kameleoon]);
|
|
4
|
+
const StaticInfoProvider = ({ children, kameleoon, customer, basePath }) => {
|
|
5
|
+
const value = useMemo(() => ({ kameleoon, customer, basePath }), [customer, kameleoon, basePath]);
|
|
6
6
|
return React.createElement(StaticInfoContext.Provider, { value: value }, children);
|
|
7
7
|
};
|
|
8
8
|
const useStaticInfo = () => {
|
|
@@ -16,7 +16,7 @@ interface UseSubmitCheckoutFunctionArgs {
|
|
|
16
16
|
readonly checkoutBookingId: string;
|
|
17
17
|
readonly paymentFlowRef: RefObject<PaymentFlowRef>;
|
|
18
18
|
readonly onError: () => void;
|
|
19
|
-
readonly onSuccess
|
|
19
|
+
readonly onSuccess: () => void;
|
|
20
20
|
readonly logger: Logger;
|
|
21
21
|
}
|
|
22
22
|
interface UseSubmitCheckoutFunction {
|
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from "react";
|
|
2
2
|
import { CommandStatus } from "@lookiero/messaging-react";
|
|
3
3
|
import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
|
|
4
|
-
import { viewCheckoutBookingById, } from "../../../projection/checkoutBooking/viewCheckoutBookingById";
|
|
5
4
|
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
6
5
|
import { useSubmitCheckout as useSubmitCheckoutCommand } from "../../domain/checkout/react/useSubmitCheckout";
|
|
7
6
|
import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
|
|
8
7
|
import { I18nMessages } from "../i18n/i18n";
|
|
9
|
-
import {
|
|
10
|
-
var ChargeStatus;
|
|
11
|
-
(function (ChargeStatus) {
|
|
12
|
-
ChargeStatus["EXECUTED"] = "EXECUTED";
|
|
13
|
-
ChargeStatus["REQUIRES_ACTION"] = "REQUIRES_ACTION";
|
|
14
|
-
ChargeStatus["REQUIRED_ACTION_CANCELLED"] = "REQUIRED_ACTION_CANCELLED";
|
|
15
|
-
ChargeStatus["REJECTED"] = "REJECTED";
|
|
16
|
-
ChargeStatus["CANCELLED"] = "CANCELLED";
|
|
17
|
-
ChargeStatus["TO_CONFIRM"] = "TO_CONFIRM";
|
|
18
|
-
ChargeStatus["ERROR"] = "ERROR";
|
|
19
|
-
ChargeStatus["UNKNOWN"] = "UNKNOWN";
|
|
20
|
-
})(ChargeStatus || (ChargeStatus = {}));
|
|
8
|
+
import { usePaymentInstrumentEvents } from "./usePaymentInstrumentEvents";
|
|
21
9
|
const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onError, onSuccess, logger, }) => {
|
|
22
|
-
const queryBus = useQueryBus();
|
|
23
10
|
const [submitCheckoutCommand, submitCheckoutCommandStatus] = useSubmitCheckoutCommand({ checkoutId, logger });
|
|
24
11
|
const [blockCheckoutBooking, blockCheckoutBookingStatus] = useBlockCheckoutBooking({ checkoutBookingId, logger });
|
|
25
12
|
const [createNotification] = useCreateToastNotification({ contextId: MESSAGING_CONTEXT_ID, logger });
|
|
26
|
-
const [checkoutBookingExpired, setCheckoutBookingExpired] = useState(false);
|
|
27
13
|
const [startLegacyBoxCheckoutStatus, setStartLegacyBoxCheckoutStatus] = useState("idle");
|
|
28
14
|
const submitCheckout = useCallback(async ({ paymentFlowPayload, sizeChangeEnabled }) => {
|
|
29
15
|
try {
|
|
@@ -32,40 +18,27 @@ const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onEr
|
|
|
32
18
|
catch (error) {
|
|
33
19
|
return;
|
|
34
20
|
}
|
|
35
|
-
|
|
36
|
-
if (checkoutBooking?.isExpired) {
|
|
37
|
-
setCheckoutBookingExpired(true);
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
paymentFlowRef.current?.startLegacyBoxCheckout(
|
|
21
|
+
setStartLegacyBoxCheckoutStatus("loading");
|
|
41
22
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
42
23
|
// @ts-ignore
|
|
43
|
-
paymentFlowPayload
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
24
|
+
paymentFlowRef.current?.startLegacyBoxCheckout(paymentFlowPayload);
|
|
25
|
+
}, [paymentFlowRef, blockCheckoutBooking]);
|
|
26
|
+
const onPaymentSuccess = useCallback(async () => {
|
|
27
|
+
setStartLegacyBoxCheckoutStatus("success");
|
|
28
|
+
await submitCheckoutCommand();
|
|
29
|
+
createNotification({
|
|
30
|
+
bodyI18nKey: I18nMessages.CHECKOUT_TOAST_PAYMENT_SUCCESS,
|
|
31
|
+
level: NotificationLevel.SUCCESS,
|
|
32
|
+
});
|
|
33
|
+
}, [createNotification, submitCheckoutCommand]);
|
|
34
|
+
const onPaymentError = useCallback((payload) => {
|
|
35
|
+
setStartLegacyBoxCheckoutStatus("error");
|
|
36
|
+
createNotification({
|
|
37
|
+
bodyI18nKey: payload.metadata?.toaster?.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
|
|
38
|
+
level: NotificationLevel.ERROR,
|
|
59
39
|
});
|
|
60
|
-
}, [
|
|
61
|
-
|
|
62
|
-
checkoutBookingId,
|
|
63
|
-
paymentFlowRef,
|
|
64
|
-
blockCheckoutBooking,
|
|
65
|
-
submitCheckoutCommand,
|
|
66
|
-
onSuccess,
|
|
67
|
-
createNotification,
|
|
68
|
-
]);
|
|
40
|
+
}, [createNotification]);
|
|
41
|
+
usePaymentInstrumentEvents({ onSuccess: onPaymentSuccess, onError: onPaymentError });
|
|
69
42
|
const status = useMemo(() => {
|
|
70
43
|
if (blockCheckoutBookingStatus === CommandStatus.LOADING ||
|
|
71
44
|
startLegacyBoxCheckoutStatus === "loading" ||
|
|
@@ -75,23 +48,17 @@ const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onEr
|
|
|
75
48
|
if (blockCheckoutBookingStatus === CommandStatus.SUCCESS &&
|
|
76
49
|
startLegacyBoxCheckoutStatus === "success" &&
|
|
77
50
|
submitCheckoutCommandStatus === CommandStatus.SUCCESS) {
|
|
51
|
+
onSuccess();
|
|
78
52
|
return "success";
|
|
79
53
|
}
|
|
80
54
|
if (blockCheckoutBookingStatus === CommandStatus.ERROR ||
|
|
81
55
|
startLegacyBoxCheckoutStatus === "error" ||
|
|
82
|
-
submitCheckoutCommandStatus === CommandStatus.ERROR
|
|
83
|
-
checkoutBookingExpired) {
|
|
56
|
+
submitCheckoutCommandStatus === CommandStatus.ERROR) {
|
|
84
57
|
onError();
|
|
85
58
|
return "error";
|
|
86
59
|
}
|
|
87
60
|
return "idle";
|
|
88
|
-
}, [
|
|
89
|
-
blockCheckoutBookingStatus,
|
|
90
|
-
startLegacyBoxCheckoutStatus,
|
|
91
|
-
submitCheckoutCommandStatus,
|
|
92
|
-
checkoutBookingExpired,
|
|
93
|
-
onError,
|
|
94
|
-
]);
|
|
61
|
+
}, [blockCheckoutBookingStatus, startLegacyBoxCheckoutStatus, submitCheckoutCommandStatus, onSuccess, onError]);
|
|
95
62
|
return [submitCheckout, status];
|
|
96
63
|
};
|
|
97
64
|
export { useSubmitCheckout };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EndpointFunction, FetchTranslationFuction } from "@lookiero/i18n";
|
|
2
|
+
|
|
3
|
+
interface FetchTranslationsFuntionArgs {
|
|
4
|
+
readonly translations: EndpointFunction[];
|
|
5
|
+
}
|
|
6
|
+
interface FetchTranslationsFuntion {
|
|
7
|
+
(args: FetchTranslationsFuntionArgs): FetchTranslationFuction;
|
|
8
|
+
}
|
|
9
|
+
declare const fetchTranslations: FetchTranslationsFuntion;
|
|
10
|
+
export { fetchTranslations };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { fetchFetchTranslation } from "@lookiero/i18n";
|
|
2
|
+
|
|
3
|
+
const fetchTranslations =
|
|
4
|
+
({ translations }) =>
|
|
5
|
+
async ({ locale }) => {
|
|
6
|
+
const translationsMessages = await Promise.all(
|
|
7
|
+
translations.map((endpoint) => fetchFetchTranslation({ endpoint })({ locale })),
|
|
8
|
+
);
|
|
9
|
+
return translationsMessages.reduce(
|
|
10
|
+
(acc, translationMessages) => ({
|
|
11
|
+
...acc,
|
|
12
|
+
...translationMessages,
|
|
13
|
+
}),
|
|
14
|
+
{},
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
export { fetchTranslations };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
declare const DOMAIN = "CheckoutI18n";
|
|
2
1
|
declare const COLOR_I18N_PREFIX = "catalog.color.";
|
|
3
2
|
declare enum I18nMessages {
|
|
4
3
|
TOAST_GENERIC_ERROR = "toast_generic_error",
|
|
@@ -47,6 +46,7 @@ declare enum I18nMessages {
|
|
|
47
46
|
CHECKOUT_TITLE = "checkout.title",
|
|
48
47
|
CHECKOUT_PAY_BUTTON = "checkout.pay_button",
|
|
49
48
|
CHECKOUT_TOAST_PAYMENT_ERROR = "checkout.toast_payment_error",
|
|
49
|
+
CHECKOUT_TOAST_PAYMENT_SUCCESS = "checkout.toast_payment_success",
|
|
50
50
|
CHECKOUT_SUCCESS_MODAL_TITLE = "checkout.success_modal_title",
|
|
51
51
|
CHECKOUT_SUCCESS_MODAL_DESCRIPTION = "checkout.success_modal_description",
|
|
52
52
|
CHECKOUT_SUCCESS_MODAL_BUTTON = "checkout.success_modal_button",
|
|
@@ -56,4 +56,4 @@ declare enum I18nMessages {
|
|
|
56
56
|
FEEDBACK_BUTTON = "feedback.button",
|
|
57
57
|
CHECKOUT_TOAST_BOOKING_EXPIRED = "checkout.toast_booking_expired"
|
|
58
58
|
}
|
|
59
|
-
export {
|
|
59
|
+
export { I18nMessages, COLOR_I18N_PREFIX };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const DOMAIN = "CheckoutI18n";
|
|
2
1
|
// TODO: deprecated?
|
|
3
2
|
const COLOR_I18N_PREFIX = "catalog.color.";
|
|
4
3
|
var I18nMessages;
|
|
@@ -49,6 +48,7 @@ var I18nMessages;
|
|
|
49
48
|
I18nMessages["CHECKOUT_TITLE"] = "checkout.title";
|
|
50
49
|
I18nMessages["CHECKOUT_PAY_BUTTON"] = "checkout.pay_button";
|
|
51
50
|
I18nMessages["CHECKOUT_TOAST_PAYMENT_ERROR"] = "checkout.toast_payment_error";
|
|
51
|
+
I18nMessages["CHECKOUT_TOAST_PAYMENT_SUCCESS"] = "checkout.toast_payment_success";
|
|
52
52
|
I18nMessages["CHECKOUT_SUCCESS_MODAL_TITLE"] = "checkout.success_modal_title";
|
|
53
53
|
I18nMessages["CHECKOUT_SUCCESS_MODAL_DESCRIPTION"] = "checkout.success_modal_description";
|
|
54
54
|
I18nMessages["CHECKOUT_SUCCESS_MODAL_BUTTON"] = "checkout.success_modal_button";
|
|
@@ -58,4 +58,4 @@ var I18nMessages;
|
|
|
58
58
|
I18nMessages["FEEDBACK_BUTTON"] = "feedback.button";
|
|
59
59
|
I18nMessages["CHECKOUT_TOAST_BOOKING_EXPIRED"] = "checkout.toast_booking_expired";
|
|
60
60
|
})(I18nMessages || (I18nMessages = {}));
|
|
61
|
-
export {
|
|
61
|
+
export { I18nMessages, COLOR_I18N_PREFIX };
|