@lookiero/checkout 10.0.0-beta.2 → 10.0.0-beta.4
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/index.js +2 -1
- package/dist/src/Expo.js +2 -0
- package/dist/src/ExpoRoot.js +3 -2
- package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.js +2 -1
- package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.js +3 -2
- package/dist/src/infrastructure/ui/components/atoms/price/Price.js +3 -0
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +7 -3
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.d.ts +18 -2
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.js +14 -2
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.js +2 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.js +2 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +4 -3
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.d.ts +0 -1
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.js +0 -1
- 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 +3 -2
- 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 +3 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +3 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +2 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +5 -4
- 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 +4 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.d.ts +0 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.js +0 -1
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +2 -2
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +2 -2
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +2 -2
- package/dist/src/infrastructure/ui/hooks/useCheckoutFlow.js +9 -9
- package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.d.ts +1 -1
- package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +55 -22
- package/dist/src/infrastructure/ui/i18n/i18n.d.ts +2 -1
- package/dist/src/infrastructure/ui/i18n/i18n.js +2 -1
- package/dist/src/infrastructure/ui/test/render.js +4 -2
- package/dist/src/infrastructure/ui/views/App.js +2 -1
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +3 -3
- 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/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +3 -3
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +11 -5
- 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 +1 -0
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +2 -1
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +4 -4
- package/dist/src/infrastructure/ui/views/return/components/price/Price.js +3 -0
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +3 -3
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +4 -4
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +2 -1
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +4 -4
- package/dist/src/infrastructure/ui/views/summary/Summary.js +4 -4
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +3 -2
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +8 -6
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +5 -5
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/index.ts +2 -1
- package/jest.config.js +2 -2
- package/package.json +9 -9
- package/src/Expo.tsx +3 -0
- package/src/ExpoRoot.tsx +3 -2
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.ts +3 -2
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.tsx +3 -2
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/__snapshots__/FiveItemsDiscountBanner.test.tsx.snap +1 -1
- package/src/infrastructure/ui/components/atoms/price/Price.tsx +3 -0
- 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 +25 -4
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +13 -7
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.tsx +2 -1
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.tsx +2 -1
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +0 -1
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +4 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +3 -3
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +3 -2
- 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 +3 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +3 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +2 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +6 -5
- 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 +0 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +4 -2
- 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 +2 -2
- package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +1 -1
- package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +302 -0
- package/src/infrastructure/ui/hooks/useCheckoutFlow.tsx +9 -9
- package/src/infrastructure/ui/i18n/i18n.ts +3 -1
- package/src/infrastructure/ui/test/render.tsx +6 -3
- package/src/infrastructure/ui/views/App.tsx +2 -1
- package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +51 -40
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +3 -3
- 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/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.tsx +2 -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 +11 -5
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +160 -88
- 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 +244 -128
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.ts +2 -1
- 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 +10 -8
- 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 +75 -41
- package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +105 -102
- package/src/infrastructure/ui/views/return/components/price/Price.tsx +3 -0
- 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 +2 -1
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +4 -4
- 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 +4 -4
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +3 -2
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +154 -82
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +8 -6
- 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/dist/pact.config.d.ts +0 -21
- package/dist/pact.config.js +0 -16
- package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -55
- package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -116
- package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -56
- package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -51
- package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -51
- package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -51
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -13
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -19
- package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -56
- package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -57
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -55
- package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -120
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -55
- package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
- package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -55
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -22
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -7
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -5
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -7
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -6
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -20
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -4
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -43
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +0 -14
- package/dist/src/infrastructure/ui/components/templates/footer/Footer.d.ts +0 -3
- package/dist/src/infrastructure/ui/components/templates/footer/Footer.js +0 -13
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -7
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -21
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -12
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -12
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -64
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -10
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -17
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -20
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -27
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -10
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -27
- package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
- package/dist/src/infrastructure/ui/views/App.style.js +0 -8
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -11
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -12
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -64
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -16
- package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
- package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -44
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -14
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -28
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -11
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -26
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -21
- package/dist/src/projection/shared/country.d.ts +0 -14
- package/dist/src/projection/shared/country.js +0 -15
- package/dist/src/projection/shared/customer.d.ts +0 -9
- package/dist/src/projection/shared/customer.js +0 -1
- package/dist/src/projection/shared/locale.d.ts +0 -12
- package/dist/src/projection/shared/locale.js +0 -13
- package/dist/src/projection/shared/order.d.ts +0 -6
- package/dist/src/projection/shared/order.js +0 -1
- package/dist/src/projection/shared/price.d.ts +0 -11
- package/dist/src/projection/shared/price.js +0 -1
- package/dist/src/projection/shared/size.d.ts +0 -21
- package/dist/src/projection/shared/size.js +0 -4
- package/dist/src/projection/shared/subscription.d.ts +0 -2
- package/dist/src/projection/shared/subscription.js +0 -1
- package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.d.ts +0 -15
- package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.js +0 -16
- package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -11
- package/dist/src/shared/ui/components/atoms/error/Error.js +0 -6
- package/dist/src/shared/ui/components/atoms/field/Field.d.ts +0 -14
- package/dist/src/shared/ui/components/atoms/field/Field.js +0 -29
- package/dist/src/shared/ui/components/atoms/field/Field.style.d.ts +0 -16
- package/dist/src/shared/ui/components/atoms/field/Field.style.js +0 -19
- package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +0 -24
- package/dist/src/shared/ui/components/molecules/inputField/InputField.js +0 -28
- package/dist/src/shared/ui/components/molecules/inputField/InputField.style.d.ts +0 -29
- package/dist/src/shared/ui/components/molecules/inputField/InputField.style.js +0 -37
- package/src/infrastructure/ui/components/templates/footer/Footer.test.tsx +0 -15
- package/src/infrastructure/ui/components/templates/footer/Footer.tsx +0 -19
- package/src/infrastructure/ui/components/templates/footer/__snapshots__/Footer.test.tsx.snap +0 -1127
- package/src/infrastructure/ui/hooks/useCheckoutFlow.test.ts +0 -297
- package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.test.tsx +0 -126
|
@@ -1,15 +1,29 @@
|
|
|
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";
|
|
4
5
|
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
5
6
|
import { useSubmitCheckout as useSubmitCheckoutCommand } from "../../domain/checkout/react/useSubmitCheckout";
|
|
6
7
|
import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
|
|
7
8
|
import { I18nMessages } from "../i18n/i18n";
|
|
8
|
-
import {
|
|
9
|
+
import { useQueryBus } from "./useQueryBus";
|
|
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 = {}));
|
|
9
21
|
const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onError, onSuccess, logger, }) => {
|
|
22
|
+
const queryBus = useQueryBus();
|
|
10
23
|
const [submitCheckoutCommand, submitCheckoutCommandStatus] = useSubmitCheckoutCommand({ checkoutId, logger });
|
|
11
24
|
const [blockCheckoutBooking, blockCheckoutBookingStatus] = useBlockCheckoutBooking({ checkoutBookingId, logger });
|
|
12
25
|
const [createNotification] = useCreateToastNotification({ contextId: MESSAGING_CONTEXT_ID, logger });
|
|
26
|
+
const [checkoutBookingExpired, setCheckoutBookingExpired] = useState(false);
|
|
13
27
|
const [startLegacyBoxCheckoutStatus, setStartLegacyBoxCheckoutStatus] = useState("idle");
|
|
14
28
|
const submitCheckout = useCallback(async ({ paymentFlowPayload, sizeChangeEnabled }) => {
|
|
15
29
|
try {
|
|
@@ -18,27 +32,40 @@ const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onEr
|
|
|
18
32
|
catch (error) {
|
|
19
33
|
return;
|
|
20
34
|
}
|
|
21
|
-
|
|
35
|
+
const checkoutBooking = await queryBus(viewCheckoutBookingById({ checkoutBookingId }));
|
|
36
|
+
if (checkoutBooking?.isExpired) {
|
|
37
|
+
setCheckoutBookingExpired(true);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
paymentFlowRef.current?.startLegacyBoxCheckout(
|
|
22
41
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
23
42
|
// @ts-ignore
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
paymentFlowPayload, async ({ status, toaster, final }) => {
|
|
44
|
+
setStartLegacyBoxCheckoutStatus("loading");
|
|
45
|
+
if (final) {
|
|
46
|
+
if (status === ChargeStatus.EXECUTED) {
|
|
47
|
+
setStartLegacyBoxCheckoutStatus("success");
|
|
48
|
+
await submitCheckoutCommand();
|
|
49
|
+
onSuccess?.();
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
createNotification({
|
|
53
|
+
level: NotificationLevel.ERROR,
|
|
54
|
+
bodyI18nKey: toaster?.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR,
|
|
55
|
+
});
|
|
56
|
+
setStartLegacyBoxCheckoutStatus("error");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
39
59
|
});
|
|
40
|
-
}, [
|
|
41
|
-
|
|
60
|
+
}, [
|
|
61
|
+
queryBus,
|
|
62
|
+
checkoutBookingId,
|
|
63
|
+
paymentFlowRef,
|
|
64
|
+
blockCheckoutBooking,
|
|
65
|
+
submitCheckoutCommand,
|
|
66
|
+
onSuccess,
|
|
67
|
+
createNotification,
|
|
68
|
+
]);
|
|
42
69
|
const status = useMemo(() => {
|
|
43
70
|
if (blockCheckoutBookingStatus === CommandStatus.LOADING ||
|
|
44
71
|
startLegacyBoxCheckoutStatus === "loading" ||
|
|
@@ -48,17 +75,23 @@ const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onEr
|
|
|
48
75
|
if (blockCheckoutBookingStatus === CommandStatus.SUCCESS &&
|
|
49
76
|
startLegacyBoxCheckoutStatus === "success" &&
|
|
50
77
|
submitCheckoutCommandStatus === CommandStatus.SUCCESS) {
|
|
51
|
-
onSuccess();
|
|
52
78
|
return "success";
|
|
53
79
|
}
|
|
54
80
|
if (blockCheckoutBookingStatus === CommandStatus.ERROR ||
|
|
55
81
|
startLegacyBoxCheckoutStatus === "error" ||
|
|
56
|
-
submitCheckoutCommandStatus === CommandStatus.ERROR
|
|
82
|
+
submitCheckoutCommandStatus === CommandStatus.ERROR ||
|
|
83
|
+
checkoutBookingExpired) {
|
|
57
84
|
onError();
|
|
58
85
|
return "error";
|
|
59
86
|
}
|
|
60
87
|
return "idle";
|
|
61
|
-
}, [
|
|
88
|
+
}, [
|
|
89
|
+
blockCheckoutBookingStatus,
|
|
90
|
+
startLegacyBoxCheckoutStatus,
|
|
91
|
+
submitCheckoutCommandStatus,
|
|
92
|
+
checkoutBookingExpired,
|
|
93
|
+
onError,
|
|
94
|
+
]);
|
|
62
95
|
return [submitCheckout, status];
|
|
63
96
|
};
|
|
64
97
|
export { useSubmitCheckout };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
declare const DOMAIN = "CheckoutI18n";
|
|
1
2
|
declare const COLOR_I18N_PREFIX = "catalog.color.";
|
|
2
3
|
declare enum I18nMessages {
|
|
3
4
|
TOAST_GENERIC_ERROR = "toast_generic_error",
|
|
@@ -56,4 +57,4 @@ declare enum I18nMessages {
|
|
|
56
57
|
FEEDBACK_BUTTON = "feedback.button",
|
|
57
58
|
CHECKOUT_TOAST_BOOKING_EXPIRED = "checkout.toast_booking_expired"
|
|
58
59
|
}
|
|
59
|
-
export { I18nMessages, COLOR_I18N_PREFIX };
|
|
60
|
+
export { DOMAIN, I18nMessages, COLOR_I18N_PREFIX };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const DOMAIN = "CheckoutI18n";
|
|
1
2
|
// TODO: deprecated?
|
|
2
3
|
const COLOR_I18N_PREFIX = "catalog.color.";
|
|
3
4
|
var I18nMessages;
|
|
@@ -58,4 +59,4 @@ var I18nMessages;
|
|
|
58
59
|
I18nMessages["FEEDBACK_BUTTON"] = "feedback.button";
|
|
59
60
|
I18nMessages["CHECKOUT_TOAST_BOOKING_EXPIRED"] = "checkout.toast_booking_expired";
|
|
60
61
|
})(I18nMessages || (I18nMessages = {}));
|
|
61
|
-
export { I18nMessages, COLOR_I18N_PREFIX };
|
|
62
|
+
export { DOMAIN, I18nMessages, COLOR_I18N_PREFIX };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { render } from "@testing-library/react-native";
|
|
2
2
|
import { mock } from "jest-mock-extended";
|
|
3
3
|
import React, { Fragment } from "react";
|
|
4
|
-
import { IntlProvider } from "react-intl";
|
|
5
4
|
import { Aurora } from "@lookiero/aurora";
|
|
5
|
+
import { createI18nProvider } from "@lookiero/i18n-react";
|
|
6
6
|
import { LoggerProvider } from "@lookiero/sty-psp-logging";
|
|
7
|
+
import { DOMAIN } from "../i18n/i18n";
|
|
8
|
+
const I18nProvider = createI18nProvider({ domain: DOMAIN });
|
|
7
9
|
const renderWrapper = ({ locale, messages = {}, wrapper: Wrapper = Fragment, logger = mock() }) =>
|
|
8
10
|
// eslint-disable-next-line react/display-name, react/prop-types
|
|
9
11
|
({ children }) => (React.createElement(Aurora, null,
|
|
10
|
-
React.createElement(
|
|
12
|
+
React.createElement(I18nProvider, { locale: locale, messages: messages, onError: () => void 0 },
|
|
11
13
|
React.createElement(LoggerProvider, { logger: logger },
|
|
12
14
|
React.createElement(Wrapper, null, children)))));
|
|
13
15
|
const renderWithProviders = (ui, { locale, messages, wrapper } = { locale: "en" }) => render(ui, { wrapper: renderWrapper({ locale, messages, wrapper }) });
|
|
@@ -5,10 +5,11 @@ import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
|
5
5
|
import { Notifications } from "@lookiero/sty-psp-notifications";
|
|
6
6
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
7
7
|
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
8
|
+
import { DOMAIN } from "../i18n/i18n";
|
|
8
9
|
const { colorBgBase } = theme();
|
|
9
10
|
const App = ({ children }) => (React.createElement(SafeAreaProvider, null,
|
|
10
11
|
React.createElement(StatusBar, { backgroundColor: colorBgBase, barStyle: "dark-content", translucent: true }),
|
|
11
|
-
React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID, portalHostName: "Checkout" }),
|
|
12
|
+
React.createElement(Notifications, { contextId: MESSAGING_CONTEXT_ID, domain: DOMAIN, portalHostName: "Checkout" }),
|
|
12
13
|
React.createElement(PortalHost, { name: "Checkout" }),
|
|
13
14
|
children));
|
|
14
15
|
export { App };
|
|
@@ -17,7 +17,7 @@ import { Body } from "../../components/layouts/body/Body";
|
|
|
17
17
|
import { CheckoutHeader } from "../../components/templates/header/checkoutHeader/CheckoutHeader";
|
|
18
18
|
import { useCheckoutFlow } from "../../hooks/useCheckoutFlow";
|
|
19
19
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
20
|
-
import { I18nMessages } from "../../i18n/i18n";
|
|
20
|
+
import { DOMAIN, I18nMessages } from "../../i18n/i18n";
|
|
21
21
|
import { Routes } from "../../routing/routes";
|
|
22
22
|
import { ProductVariant } from "../shared/components/productVariant/ProductVariant";
|
|
23
23
|
import { Pricing } from "../summary/components/pricing/Pricing";
|
|
@@ -26,8 +26,8 @@ import { DeliveryBanner } from "./components/deliveryBanner/DeliveryBanner";
|
|
|
26
26
|
import { PaymentInstrument } from "./components/paymentInstrument/PaymentInstrument";
|
|
27
27
|
const Checkout = ({ layout: Layout, order, subscription, getAuthToken, useRedirect, onCheckoutFlowSuccess, }) => {
|
|
28
28
|
const { customer: { customerId, country, segment }, basePath, } = useStaticInfo();
|
|
29
|
-
const titleText = useI18nMessage({ id: I18nMessages.CHECKOUT_TITLE });
|
|
30
|
-
const submitButtonText = useI18nMessage({ id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
29
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_TITLE });
|
|
30
|
+
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
31
31
|
const { screen } = useDevice();
|
|
32
32
|
const [pricingHeight, setPricingHeight] = useState(0);
|
|
33
33
|
const handleOnPricingLayout = useCallback(({ height }) => setPricingHeight(height), []);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
2
2
|
import { useNavigate } from "react-router-native";
|
|
3
3
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
4
|
-
import { PaymentFlow
|
|
4
|
+
import { PaymentFlow } from "@lookiero/payments-front";
|
|
5
5
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
6
6
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
7
7
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
@@ -10,21 +10,21 @@ import { useViewPaymentFlowPayloadByCheckoutId } from "../../../../../projection
|
|
|
10
10
|
import { useViewPricingByCheckoutId } from "../../../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
11
11
|
import { TrackingPage } from "../../../../../tracking/tracking";
|
|
12
12
|
import { useTrackCheckout } from "../../../../../tracking/useTrackCheckout";
|
|
13
|
-
import { useCheckoutFlow } from "../../../../hooks/useCheckoutFlow";
|
|
14
13
|
import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
14
|
+
import { useSubmitCheckout } from "../../../../hooks/useSubmitCheckout";
|
|
15
15
|
import { Routes } from "../../../../routing/routes";
|
|
16
16
|
import { useBasePath } from "../../../../routing/useBasePath";
|
|
17
17
|
const CheckoutPaymentModal = ({ coupon, isFirstOrder, subscription, orderNumber, getAuthToken, onCheckoutSubmitted, }) => {
|
|
18
18
|
const paymentFlowRef = useRef(null);
|
|
19
19
|
const logger = useLogger();
|
|
20
20
|
const { customer: { customerId, country, segment }, } = useStaticInfo();
|
|
21
|
-
const [
|
|
21
|
+
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
22
22
|
const [paymentFlowPayload] = useViewPaymentFlowPayloadByCheckoutId({
|
|
23
|
-
checkoutId:
|
|
23
|
+
checkoutId: checkout?.id,
|
|
24
24
|
});
|
|
25
|
-
const [sizeChangeEnabled] = useViewIsSizeChangeEnabledByCheckoutId({ checkoutId:
|
|
25
|
+
const [sizeChangeEnabled] = useViewIsSizeChangeEnabledByCheckoutId({ checkoutId: checkout?.id });
|
|
26
26
|
const [pricing] = useViewPricingByCheckoutId({
|
|
27
|
-
checkoutId:
|
|
27
|
+
checkoutId: checkout?.id,
|
|
28
28
|
queryOptions: { refetchOnMount: true },
|
|
29
29
|
});
|
|
30
30
|
const [authToken, setAuthToken] = useState();
|
|
@@ -36,13 +36,13 @@ const CheckoutPaymentModal = ({ coupon, isFirstOrder, subscription, orderNumber,
|
|
|
36
36
|
const navigate = useNavigate();
|
|
37
37
|
const trackCheckout = useTrackCheckout({
|
|
38
38
|
page: TrackingPage.CHECKOUT,
|
|
39
|
-
checkoutId:
|
|
39
|
+
checkoutId: checkout?.id,
|
|
40
40
|
country,
|
|
41
41
|
segment,
|
|
42
42
|
});
|
|
43
43
|
const handleOnSubmitCheckoutError = useCallback(() => navigate(`${basePath}/${Routes.CHECKOUT}`, { replace: true }), [basePath, navigate]);
|
|
44
44
|
const handleOnSubmitCheckoutSuccess = useCallback(() => {
|
|
45
|
-
const checkoutItemsKept =
|
|
45
|
+
const checkoutItemsKept = checkout?.items.filter((checkoutItem) => checkoutItem.status === CheckoutItemStatus.KEPT || checkoutItem.status === CheckoutItemStatus.REPLACED);
|
|
46
46
|
const totalReplacedFor = checkoutItemsKept?.filter(({ replacedFor }) => Boolean(replacedFor)).length || 0;
|
|
47
47
|
trackCheckout({
|
|
48
48
|
totalCheckoutItemsKept: checkoutItemsKept?.length || 0,
|
|
@@ -57,7 +57,7 @@ const CheckoutPaymentModal = ({ coupon, isFirstOrder, subscription, orderNumber,
|
|
|
57
57
|
});
|
|
58
58
|
onCheckoutSubmitted?.();
|
|
59
59
|
}, [
|
|
60
|
-
|
|
60
|
+
checkout?.items,
|
|
61
61
|
coupon,
|
|
62
62
|
customerId,
|
|
63
63
|
isFirstOrder,
|
|
@@ -68,9 +68,9 @@ const CheckoutPaymentModal = ({ coupon, isFirstOrder, subscription, orderNumber,
|
|
|
68
68
|
subscription,
|
|
69
69
|
trackCheckout,
|
|
70
70
|
]);
|
|
71
|
-
const [
|
|
72
|
-
checkoutId:
|
|
73
|
-
checkoutBookingId:
|
|
71
|
+
const [submitCheckout] = useSubmitCheckout({
|
|
72
|
+
checkoutId: checkout?.id,
|
|
73
|
+
checkoutBookingId: checkout?.checkoutBookingId,
|
|
74
74
|
paymentFlowRef,
|
|
75
75
|
onError: handleOnSubmitCheckoutError,
|
|
76
76
|
onSuccess: handleOnSubmitCheckoutSuccess,
|
|
@@ -78,13 +78,13 @@ const CheckoutPaymentModal = ({ coupon, isFirstOrder, subscription, orderNumber,
|
|
|
78
78
|
});
|
|
79
79
|
useEffect(() => {
|
|
80
80
|
if (paymentFlowPayload && sizeChangeEnabled !== undefined && pricing !== undefined) {
|
|
81
|
-
|
|
81
|
+
submitCheckout({ paymentFlowPayload, sizeChangeEnabled });
|
|
82
82
|
}
|
|
83
|
-
}, [paymentFlowPayload, pricing, sizeChangeEnabled,
|
|
83
|
+
}, [paymentFlowPayload, pricing, sizeChangeEnabled, submitCheckout]);
|
|
84
84
|
const dependenciesLoadedStatuses = [QueryStatus.ERROR, QueryStatus.SUCCESS];
|
|
85
|
-
const dependenciesLoaded = (dependenciesLoadedStatuses.includes(checkoutStatus) ||
|
|
85
|
+
const dependenciesLoaded = (dependenciesLoadedStatuses.includes(checkoutStatus) || checkout) && authToken;
|
|
86
86
|
if (!dependenciesLoaded)
|
|
87
87
|
return null;
|
|
88
|
-
return React.createElement(PaymentFlow, { ref: paymentFlowRef,
|
|
88
|
+
return React.createElement(PaymentFlow, { ref: paymentFlowRef, token: authToken });
|
|
89
89
|
};
|
|
90
90
|
export { CheckoutPaymentModal };
|
package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ALIGN, InfoBox, INFOBOX_TYPE, useDevice } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
4
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
5
5
|
const DeliveryBanner = () => {
|
|
6
6
|
const { screen } = useDevice();
|
|
7
|
-
return (React.createElement(InfoBox, { contentAlign: screen.L ? ALIGN.CENTER : undefined, testID: "delivery-banner", text: useI18nMessage({ id: I18nMessages.CHECKOUT_DELIVERY_BANNER }), type: INFOBOX_TYPE.SQUARED }));
|
|
7
|
+
return (React.createElement(InfoBox, { contentAlign: screen.L ? ALIGN.CENTER : undefined, testID: "delivery-banner", text: useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_DELIVERY_BANNER }), type: INFOBOX_TYPE.SQUARED }));
|
|
8
8
|
};
|
|
9
9
|
export { DeliveryBanner };
|
|
@@ -11,7 +11,7 @@ import { HostDefaultCheckoutQuestionItem } from "../../../../components/organism
|
|
|
11
11
|
import { HostSelectCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem";
|
|
12
12
|
import { IconCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem";
|
|
13
13
|
import { TextareaCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem";
|
|
14
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
14
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
15
15
|
const checkoutQuestionItems = {
|
|
16
16
|
[CheckoutQuestionType.HOST_DEFAULT]: HostDefaultCheckoutQuestionItem,
|
|
17
17
|
[CheckoutQuestionType.HOST_TEXTAREA]: HostDefaultCheckoutQuestionItem,
|
|
@@ -21,7 +21,7 @@ const checkoutQuestionItems = {
|
|
|
21
21
|
[CheckoutQuestionType.BUTTON]: ButtonCheckoutQuestionItem,
|
|
22
22
|
};
|
|
23
23
|
const CheckoutQuestionsForm = ({ checkoutQuestions, submitButtonDisabled, onSubmit, }) => {
|
|
24
|
-
const buttonText = useI18nMessage({ id: I18nMessages.FEEDBACK_BUTTON });
|
|
24
|
+
const buttonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.FEEDBACK_BUTTON });
|
|
25
25
|
const feedback = useCheckoutQuestionFeedback();
|
|
26
26
|
const handlePress = useCallback(() => onSubmit(feedback), [feedback, onSubmit]);
|
|
27
27
|
const filteredCheckoutQuestions = useMemo(() => {
|
|
@@ -4,7 +4,7 @@ import { InfoBox, Text } from "@lookiero/aurora";
|
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
7
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
7
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
8
8
|
import { style } from "./CustomerDecissionBanner.style";
|
|
9
9
|
const i18nMessageForCheckoutItemStatus = {
|
|
10
10
|
[CheckoutItemStatus.KEPT]: I18nMessages.ITEM_BANNER_CUSTOMER_KEPT_DECISSION,
|
|
@@ -12,8 +12,8 @@ const i18nMessageForCheckoutItemStatus = {
|
|
|
12
12
|
[CheckoutItemStatus.RETURNED]: I18nMessages.ITEM_BANNER_CUSTOMER_RETURNED_DECISSION,
|
|
13
13
|
};
|
|
14
14
|
const CustomerDecissionBanner = ({ checkoutItemStatus, onPress }) => {
|
|
15
|
-
const decissionText = useI18nMessage({ id: i18nMessageForCheckoutItemStatus[checkoutItemStatus] });
|
|
16
|
-
const bannerButtonText = useI18nMessage({ id: I18nMessages.ITEM_BANNER_BUTTON });
|
|
15
|
+
const decissionText = useI18nMessage({ domain: DOMAIN, id: i18nMessageForCheckoutItemStatus[checkoutItemStatus] });
|
|
16
|
+
const bannerButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_BANNER_BUTTON });
|
|
17
17
|
const screenSize = useScreenSize();
|
|
18
18
|
const isSmallScreen = screenSize === "S";
|
|
19
19
|
return (React.createElement(View, { style: [style.container, isSmallScreen ? style.smallContainer : null] },
|
|
@@ -3,13 +3,19 @@ import { View } from "react-native";
|
|
|
3
3
|
import { ALIGN, Button, BUTTON_VARIANT, Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
6
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
7
7
|
import { style } from "./GetOutOfCheckoutModal.style";
|
|
8
8
|
const GetOutOfCheckoutModal = ({ visible, onDismiss, onConfirm }) => {
|
|
9
|
-
const titleText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_TITLE });
|
|
10
|
-
const descriptionText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION });
|
|
11
|
-
const dismissButtonText = useI18nMessage({
|
|
12
|
-
|
|
9
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_TITLE });
|
|
10
|
+
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION });
|
|
11
|
+
const dismissButtonText = useI18nMessage({
|
|
12
|
+
domain: DOMAIN,
|
|
13
|
+
id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DISMISS_BUTTON,
|
|
14
|
+
});
|
|
15
|
+
const confirmButtonText = useI18nMessage({
|
|
16
|
+
domain: DOMAIN,
|
|
17
|
+
id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_CONFIRM_BUTTON,
|
|
18
|
+
});
|
|
13
19
|
return (React.createElement(Modal, { portalHostName: "Checkout", visible: visible, onClose: onDismiss },
|
|
14
20
|
React.createElement(View, { style: style.modalContent },
|
|
15
21
|
React.createElement(Text, { align: ALIGN.CENTER, level: 1, style: style.title }, titleText),
|
|
@@ -5,14 +5,14 @@ import { useI18nMessage } from "@lookiero/i18n-react";
|
|
|
5
5
|
import { Sticky } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { size } from "../../../../../../projection/size/size";
|
|
7
7
|
import { Body } from "../../../../components/layouts/body/Body";
|
|
8
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
8
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
9
9
|
import { SelectModal } from "../selectModal/SelectModal";
|
|
10
10
|
import { style } from "./ItemActions.style";
|
|
11
11
|
const ItemActions = ({ productVariants, currentProductVariant, country, onShowSizeWithoutStockModal = () => void 0, onKeep, onReplace, onReturn, onLayout, }) => {
|
|
12
12
|
const [modalVisible, setModalVisible] = useState(false);
|
|
13
|
-
const changeSizeButtonText = useI18nMessage({ id: I18nMessages.ITEM_CHANGE_SIZE_BUTTON });
|
|
14
|
-
const keepButtonText = useI18nMessage({ id: I18nMessages.ITEM_KEEP_BUTTON });
|
|
15
|
-
const returnButtonText = useI18nMessage({ id: I18nMessages.ITEM_RETURN_BUTTON });
|
|
13
|
+
const changeSizeButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_CHANGE_SIZE_BUTTON });
|
|
14
|
+
const keepButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_KEEP_BUTTON });
|
|
15
|
+
const returnButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_RETURN_BUTTON });
|
|
16
16
|
const sizeSelectorOptions = useMemo(() => (productVariants || []).map((productVariant) => ({
|
|
17
17
|
label: size({ size: productVariant.size, country }),
|
|
18
18
|
value: productVariant.id,
|
|
@@ -5,11 +5,11 @@ import { useI18nMessage } from "@lookiero/i18n-react";
|
|
|
5
5
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { size } from "../../../../../../projection/size/size";
|
|
7
7
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
8
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
8
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
9
9
|
import { style } from "./ProductVariantDescription.style";
|
|
10
10
|
const ProductVariantDescription = ({ brand, name, price, size: sizeProjection, country, }) => {
|
|
11
|
-
const sizeText = useI18nMessage({ id: I18nMessages.ITEM_SIZE });
|
|
12
|
-
const uniqueText = useI18nMessage({ id: I18nMessages.ITEM_UNIQUE });
|
|
11
|
+
const sizeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_SIZE });
|
|
12
|
+
const uniqueText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_UNIQUE });
|
|
13
13
|
const screenDevice = useScreenSize();
|
|
14
14
|
const isDesktopScreen = screenDevice !== "S";
|
|
15
15
|
return (React.createElement(View, { style: [style.container, isDesktopScreen ? null : style.smallContainer] },
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const { space4, space6 } = theme();
|
|
3
|
+
const { space1, space4, space6 } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
5
|
brand: {
|
|
6
6
|
flex: 1,
|
|
7
|
+
gap: space1,
|
|
7
8
|
},
|
|
8
9
|
container: {
|
|
9
10
|
width: "100%",
|
|
@@ -7,7 +7,7 @@ import { ReturnQuestions } from "../../../../components/organisms/returnQuestion
|
|
|
7
7
|
import { ReturnQuestionItemProvider, } from "../../../../components/organisms/returnQuestions/behaviors/useReturnQuestionItem";
|
|
8
8
|
import { HostDefaultReturnQuestionFeedbackItem } from "../../../../components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem";
|
|
9
9
|
import { ReturnQuestionFeedbackItem } from "../../../../components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem";
|
|
10
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
10
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
11
11
|
import { style } from "./ReturnQuestionsFeedback.style";
|
|
12
12
|
const returnQuestionItems = {
|
|
13
13
|
[ReturnQuestionType.HOST_DEFAULT]: HostDefaultReturnQuestionFeedbackItem,
|
|
@@ -18,7 +18,7 @@ const returnQuestionItems = {
|
|
|
18
18
|
[ReturnQuestionType.OPTION]: ReturnQuestionFeedbackItem,
|
|
19
19
|
};
|
|
20
20
|
const ReturnQuestionsFeedback = ({ returnQuestions, onEditFeedback }) => {
|
|
21
|
-
const titleText = useI18nMessage({ id: I18nMessages.FEEDBACK_TITLE });
|
|
21
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.FEEDBACK_TITLE });
|
|
22
22
|
return (React.createElement(View, null,
|
|
23
23
|
React.createElement(View, { style: style.titleContainer },
|
|
24
24
|
React.createElement(Text, { level: 2 }, titleText),
|
|
@@ -3,12 +3,12 @@ import { View } from "react-native";
|
|
|
3
3
|
import { Button, Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
6
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
7
7
|
import { style } from "./SizeWithoutStockModal.style";
|
|
8
8
|
const SizeWithoutStockModal = ({ visible, onDismiss }) => {
|
|
9
|
-
const titleText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_TITLE });
|
|
10
|
-
const descriptionText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION });
|
|
11
|
-
const buttonText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
|
|
9
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_TITLE });
|
|
10
|
+
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION });
|
|
11
|
+
const buttonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
|
|
12
12
|
return (React.createElement(Modal, { portalHostName: "Checkout", visible: visible, showCloseButton: true, onClose: onDismiss },
|
|
13
13
|
React.createElement(View, { style: style.modalContent },
|
|
14
14
|
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
@@ -2,15 +2,18 @@ import React from "react";
|
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nNumber } from "@lookiero/i18n-react";
|
|
5
|
+
import { DOMAIN } from "../../../../i18n/i18n";
|
|
5
6
|
import { style } from "./Price.style";
|
|
6
7
|
const Price = ({ price, withPercentage = false }) => {
|
|
7
8
|
const isDiscounted = price.discountedPrice && price.discountedPrice.percentage > 0;
|
|
8
9
|
const productPrice = useI18nNumber({
|
|
10
|
+
domain: DOMAIN,
|
|
9
11
|
value: price.amount / 100,
|
|
10
12
|
style: "currency",
|
|
11
13
|
currency: price.currency,
|
|
12
14
|
});
|
|
13
15
|
const productDiscountedPrice = useI18nNumber({
|
|
16
|
+
domain: DOMAIN,
|
|
14
17
|
value: (price.discountedPrice?.amount || 0) / 100,
|
|
15
18
|
style: "currency",
|
|
16
19
|
currency: price.currency,
|
|
@@ -5,14 +5,14 @@ import { useI18nMessage } from "@lookiero/i18n-react";
|
|
|
5
5
|
import { Column, Row } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { size } from "../../../../../../projection/size/size";
|
|
7
7
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
8
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
8
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
9
9
|
import { Price } from "../price/Price";
|
|
10
10
|
import { IMAGE_SIZE, style } from "./ProductVariantPreview.style";
|
|
11
11
|
const ProductVariantPreview = ({ item, country }) => {
|
|
12
12
|
const cdnImageUrl = useMediaImage();
|
|
13
13
|
const { screen } = useDevice();
|
|
14
|
-
const sizeText = useI18nMessage({ id: I18nMessages.ITEM_SIZE });
|
|
15
|
-
const uniqueText = useI18nMessage({ id: I18nMessages.ITEM_UNIQUE });
|
|
14
|
+
const sizeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_SIZE });
|
|
15
|
+
const uniqueText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_UNIQUE });
|
|
16
16
|
const { productVariant: { media, brand, name, size: sizeProjection }, price, } = item;
|
|
17
17
|
const mainImage = media.find((mediaElement) => mediaElement.perspective === "MAIN");
|
|
18
18
|
return (React.createElement(View, { style: [style.wrapper, !screen.S && style.mobileWrapper], testID: "product-variant-preview" },
|
|
@@ -25,7 +25,7 @@ import { RadioReturnQuestionItem } from "../../../../components/organisms/return
|
|
|
25
25
|
import { TextareaReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem";
|
|
26
26
|
import { ItemDetailHeader } from "../../../../components/templates/header/itemDetailHeader/ItemDetailHeader";
|
|
27
27
|
import { useStaticInfo } from "../../../../hooks/useStaticInfo";
|
|
28
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
28
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
29
29
|
import { Routes } from "../../../../routing/routes";
|
|
30
30
|
import { ProductVariantPreview } from "../productVariantPreview/ProductVariantPreview";
|
|
31
31
|
import { style } from "./ReturnQuestionsForm.style";
|
|
@@ -43,9 +43,9 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
43
43
|
const { basePath } = useStaticInfo();
|
|
44
44
|
const logger = useLogger();
|
|
45
45
|
const { screen } = useDevice();
|
|
46
|
-
const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
|
|
47
|
-
const descriptionText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
|
|
48
|
-
const submitButtonText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
|
|
46
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_TITLE });
|
|
47
|
+
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
|
|
48
|
+
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
|
|
49
49
|
const feedback = useReturnQuestionFeedback();
|
|
50
50
|
const [returnQuestions] = useListReturnQuestionsByCheckoutItemId({
|
|
51
51
|
checkoutItemId: checkoutItem.id,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
import { HEADER_HEIGHT } from "../../../../components/templates/header/Header.style";
|
|
4
|
-
const { borderRadius5, colorBgPrimaryLight, colorBgBase, colorTextMedium, space4, space6, space8 } = theme();
|
|
4
|
+
const { borderRadius5, colorBgPrimaryLight, colorBgBase, colorTextMedium, space1, space4, space6, space8 } = theme();
|
|
5
5
|
const style = StyleSheet.create({
|
|
6
6
|
background: {
|
|
7
7
|
backgroundColor: colorBgPrimaryLight,
|
|
@@ -25,6 +25,7 @@ const style = StyleSheet.create({
|
|
|
25
25
|
},
|
|
26
26
|
info: {
|
|
27
27
|
backgroundColor: colorBgBase,
|
|
28
|
+
gap: space1,
|
|
28
29
|
paddingBottom: space4,
|
|
29
30
|
paddingHorizontal: space6,
|
|
30
31
|
paddingTop: space8,
|
|
@@ -7,12 +7,12 @@ import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/
|
|
|
7
7
|
import { size } from "../../../../../../projection/size/size";
|
|
8
8
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
9
9
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
10
|
-
import { COLOR_I18N_PREFIX, I18nMessages } from "../../../../i18n/i18n";
|
|
10
|
+
import { COLOR_I18N_PREFIX, DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
11
11
|
import { IMAGE_WIDTH, style } from "./ProductVariant.style";
|
|
12
12
|
const ProductVariant = ({ media, brand, name, price, size: sizeProjection, color, status, country, style: customStyle, onPress, }) => {
|
|
13
|
-
const uniqueText = useI18nMessage({ id: I18nMessages.ITEM_UNIQUE });
|
|
14
|
-
const colorLabel = useI18nMessage({ id: color.name, prefix: COLOR_I18N_PREFIX });
|
|
15
|
-
const sizeChangeText = useI18nMessage({ id: I18nMessages.PRODUCT_VARIANT_SIZE_CHANGE });
|
|
13
|
+
const uniqueText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_UNIQUE });
|
|
14
|
+
const colorLabel = useI18nMessage({ domain: DOMAIN, id: color.name, prefix: COLOR_I18N_PREFIX });
|
|
15
|
+
const sizeChangeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.PRODUCT_VARIANT_SIZE_CHANGE });
|
|
16
16
|
const cdnImageUrl = useMediaImage();
|
|
17
17
|
return (React.createElement(Pressable, { pointerEvents: onPress ? "auto" : "none", style: style.container, testID: "product-variant", onPress: onPress },
|
|
18
18
|
React.createElement(View, { style: style.row },
|
|
@@ -16,7 +16,7 @@ import { useTrackPressPricing } from "../../../tracking/useTrackPressPricing";
|
|
|
16
16
|
import { FiveItemsDiscountBanner } from "../../components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner";
|
|
17
17
|
import { Body } from "../../components/layouts/body/Body";
|
|
18
18
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
19
|
-
import { I18nMessages } from "../../i18n/i18n";
|
|
19
|
+
import { DOMAIN, I18nMessages } from "../../i18n/i18n";
|
|
20
20
|
import { Routes } from "../../routing/routes";
|
|
21
21
|
import { style } from "./Summary.style";
|
|
22
22
|
import { CollapsiblePricing } from "./components/collapsiblePricing/CollapsiblePricing";
|
|
@@ -24,9 +24,9 @@ const Summary = ({ layout: Layout, children }) => {
|
|
|
24
24
|
const { customer: { customerId, country, segment }, } = useStaticInfo();
|
|
25
25
|
const [pricingCollapsed, setPricingCollapsed] = useState(true);
|
|
26
26
|
const [pricingHeight, setPricingHeight] = useState(0);
|
|
27
|
-
const titleText = useI18nMessage({ id: I18nMessages.SUMMARY_TITLE });
|
|
28
|
-
const descriptionText = useI18nMessage({ id: I18nMessages.SUMMARY_DESCRIPTION });
|
|
29
|
-
const submitButtonText = useI18nMessage({ id: I18nMessages.SUMMARY_SUBMIT_BUTTON });
|
|
27
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_TITLE });
|
|
28
|
+
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_DESCRIPTION });
|
|
29
|
+
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_SUBMIT_BUTTON });
|
|
30
30
|
const { screen } = useDevice();
|
|
31
31
|
const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
32
32
|
const [pricing, pricingStatus] = useViewPricingByCheckoutId({ checkoutId: checkout?.id });
|
package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js
CHANGED
|
@@ -4,13 +4,14 @@ import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-na
|
|
|
4
4
|
import { Button, Icon, Text } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
7
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
7
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
8
8
|
import { Pricing } from "../pricing/Pricing";
|
|
9
9
|
import { style } from "./CollapsiblePricing.style";
|
|
10
10
|
const CollapsiblePricing = ({ pricing, totalCheckoutItemsKept, collapsible = true, collapsed = false, submitButtonText, onPress = () => void 0, onSubmit, }) => {
|
|
11
11
|
const { pendingToPay } = pricing;
|
|
12
|
-
const totalText = useI18nMessage({ id: I18nMessages.SUMMARY_TOTAL });
|
|
12
|
+
const totalText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_TOTAL });
|
|
13
13
|
const totalCheckoutItemsKeptText = useI18nMessage({
|
|
14
|
+
domain: DOMAIN,
|
|
14
15
|
id: I18nMessages.SUMMARY_TOTAL_ITEMS_KEPT,
|
|
15
16
|
values: { items: totalCheckoutItemsKept.toString() },
|
|
16
17
|
});
|