@lookiero/checkout 10.0.0-beta.2 → 10.0.0-beta.3
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/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 +7 -8
- 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,10 +1,13 @@
|
|
|
1
1
|
import { fireEvent } from "@testing-library/react-native";
|
|
2
|
-
import React from "react";
|
|
2
|
+
import React, { ReactNode } from "react";
|
|
3
|
+
import { View } from "react-native";
|
|
3
4
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
4
5
|
import { Country } from "@lookiero/sty-psp-locale";
|
|
5
6
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
6
7
|
import { DummyLayout } from "@lookiero/sty-psp-ui";
|
|
7
8
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
9
|
+
import { OrderProjection } from "../../../../projection/order/order";
|
|
10
|
+
import { SubscriptionProjection } from "../../../../projection/subscription/subscription";
|
|
8
11
|
import { checkout } from "../../../projection/checkout/checkout.mock";
|
|
9
12
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
10
13
|
import { pricing } from "../../../projection/pricing/pricing.mock";
|
|
@@ -14,7 +17,9 @@ import { Routes } from "../../routing/routes";
|
|
|
14
17
|
import { render } from "../../test/render";
|
|
15
18
|
import { Checkout } from "./Checkout";
|
|
16
19
|
|
|
20
|
+
const getAuthToken = () => Promise.resolve("token");
|
|
17
21
|
const customerId = "a8fff6d7-708c-41a7-b42a-58c5706d33df";
|
|
22
|
+
const basePath = "/checkout";
|
|
18
23
|
const country = Country.ES;
|
|
19
24
|
const segment = Segment.WOMEN;
|
|
20
25
|
const mockCheckout = checkout({
|
|
@@ -26,46 +31,29 @@ const mockCheckout = checkout({
|
|
|
26
31
|
{ status: CheckoutItemStatus.REPLACED },
|
|
27
32
|
],
|
|
28
33
|
});
|
|
34
|
+
const order: OrderProjection = {
|
|
35
|
+
orderNumber: 12345,
|
|
36
|
+
isFirstOrder: false,
|
|
37
|
+
coupon: null,
|
|
38
|
+
};
|
|
39
|
+
const subscription: SubscriptionProjection = "o";
|
|
29
40
|
const mockUseRedirect = jest.fn(() => ({ returnUrl: "https://web2.dev.aws.lookiero.es/user/" }));
|
|
30
41
|
|
|
31
|
-
jest.
|
|
32
|
-
|
|
42
|
+
const mockOnSuccess = jest.fn();
|
|
43
|
+
const mockCheckoutFlow = jest.fn();
|
|
44
|
+
const paymentFlowTestId = "payment-flow";
|
|
45
|
+
const mockPaymentFlowComponent: ReactNode = <View testID={paymentFlowTestId}>PaymentFlow</View>;
|
|
46
|
+
jest.mock("../../hooks/useCheckoutFlow", () => ({
|
|
47
|
+
useCheckoutFlow: () => [mockCheckoutFlow, QueryStatus.SUCCESS, mockPaymentFlowComponent],
|
|
33
48
|
}));
|
|
34
49
|
|
|
50
|
+
jest.mock("../../hooks/useStaticInfo", () => ({
|
|
51
|
+
useStaticInfo: () => ({ customer: { customerId, country, segment }, basePath }),
|
|
52
|
+
}));
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
54
|
+
jest.mock("./components/paymentInstrument/PaymentInstrument", () => ({ PaymentInstrument: () => null }));
|
|
35
55
|
jest.mock("../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId");
|
|
36
56
|
jest.mock("../../../projection/pricing/react/useViewPricingByCheckoutId");
|
|
37
|
-
jest.mock("../../hooks/usePaymentInstrumentEvents");
|
|
38
|
-
|
|
39
|
-
const mockStartLegacyBoxCheckout = jest.fn();
|
|
40
|
-
jest.mock("@lookiero/payments-front", () => {
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
42
|
-
const { useImperativeHandle, forwardRef } = require("react");
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
CheckoutStatus: {
|
|
46
|
-
REJECTED: "REJECTED",
|
|
47
|
-
ERROR: "ERROR",
|
|
48
|
-
FULFILLED: "FULFILLED",
|
|
49
|
-
},
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
51
|
-
// @ts-ignore
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention, react/display-name
|
|
53
|
-
PaymentFlow: forwardRef((params, ref) => {
|
|
54
|
-
useImperativeHandle(ref, () => ({
|
|
55
|
-
startLegacyBoxCheckout: mockStartLegacyBoxCheckout,
|
|
56
|
-
}));
|
|
57
|
-
|
|
58
|
-
return null;
|
|
59
|
-
}),
|
|
60
|
-
PaymentMethod: {
|
|
61
|
-
["GOOGLE_PAY"]: "google_pay",
|
|
62
|
-
},
|
|
63
|
-
Section: {
|
|
64
|
-
["BOX_CHECKOUT"]: "box-checkout",
|
|
65
|
-
},
|
|
66
|
-
PaymentInstrumentSelect: jest.fn(() => <></>),
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
57
|
|
|
70
58
|
const mockTrackPressContinue = jest.fn();
|
|
71
59
|
jest.mock("../../../tracking/useTrackPressContinue", () => ({
|
|
@@ -84,13 +72,25 @@ jest.mock("react-router-native", () => ({
|
|
|
84
72
|
useNavigate: () => mockUseNavigate,
|
|
85
73
|
}));
|
|
86
74
|
|
|
75
|
+
beforeEach(() => {
|
|
76
|
+
mockCheckoutFlow.mockClear();
|
|
77
|
+
mockTrackPressContinue.mockClear();
|
|
78
|
+
mockTrackPressBack.mockClear();
|
|
79
|
+
});
|
|
80
|
+
|
|
87
81
|
describe("Checkout view", () => {
|
|
88
82
|
it("renders correctly", async () => {
|
|
89
83
|
(useViewFirstAvailableCheckoutByCustomerId as jest.Mock).mockReturnValue([mockCheckout, QueryStatus.SUCCESS]);
|
|
90
84
|
(useViewPricingByCheckoutId as jest.Mock).mockReturnValue([pricing(), QueryStatus.SUCCESS]);
|
|
91
|
-
|
|
92
85
|
const { findByText, getAllByTestId, getByText, getByTestId } = render(
|
|
93
|
-
<Checkout
|
|
86
|
+
<Checkout
|
|
87
|
+
getAuthToken={getAuthToken}
|
|
88
|
+
layout={DummyLayout}
|
|
89
|
+
order={order}
|
|
90
|
+
subscription={subscription}
|
|
91
|
+
useRedirect={mockUseRedirect}
|
|
92
|
+
onCheckoutFlowSuccess={mockOnSuccess}
|
|
93
|
+
/>,
|
|
94
94
|
);
|
|
95
95
|
|
|
96
96
|
expect(await findByText(I18nMessages.CHECKOUT_TITLE)).toBeTruthy();
|
|
@@ -111,15 +111,17 @@ describe("Checkout view", () => {
|
|
|
111
111
|
expect(getByText(I18nMessages.SUMMARY_FEE)).toBeTruthy();
|
|
112
112
|
expect(getByText("-€10.00")).toBeTruthy();
|
|
113
113
|
|
|
114
|
+
expect(getByTestId(paymentFlowTestId)).toBeTruthy();
|
|
115
|
+
|
|
114
116
|
expect(getByText(I18nMessages.CHECKOUT_PAY_BUTTON)).toBeTruthy();
|
|
115
117
|
fireEvent.press(getByText(I18nMessages.CHECKOUT_PAY_BUTTON));
|
|
116
118
|
expect(mockTrackPressContinue).toHaveBeenCalled();
|
|
117
|
-
expect(
|
|
119
|
+
expect(mockCheckoutFlow).toHaveBeenCalled();
|
|
118
120
|
|
|
119
121
|
expect(getByTestId("checkout-header")).toBeTruthy();
|
|
120
122
|
fireEvent.press(getByTestId("arrow-left-button-icon"));
|
|
121
123
|
expect(mockTrackPressBack).toHaveBeenCalled();
|
|
122
|
-
expect(mockUseNavigate).toHaveBeenCalledWith(
|
|
124
|
+
expect(mockUseNavigate).toHaveBeenCalledWith(`${basePath}/${Routes.SUMMARY}`);
|
|
123
125
|
});
|
|
124
126
|
|
|
125
127
|
it("does not render a delivery banner", async () => {
|
|
@@ -135,7 +137,16 @@ describe("Checkout view", () => {
|
|
|
135
137
|
(useViewFirstAvailableCheckoutByCustomerId as jest.Mock).mockReturnValue([mockCheckout, QueryStatus.SUCCESS]);
|
|
136
138
|
(useViewPricingByCheckoutId as jest.Mock).mockReturnValue([pricing(), QueryStatus.SUCCESS]);
|
|
137
139
|
|
|
138
|
-
const { findByText, queryByText } = render(
|
|
140
|
+
const { findByText, queryByText } = render(
|
|
141
|
+
<Checkout
|
|
142
|
+
getAuthToken={getAuthToken}
|
|
143
|
+
layout={DummyLayout}
|
|
144
|
+
order={order}
|
|
145
|
+
subscription={subscription}
|
|
146
|
+
useRedirect={mockUseRedirect}
|
|
147
|
+
onCheckoutFlowSuccess={mockOnSuccess}
|
|
148
|
+
/>,
|
|
149
|
+
);
|
|
139
150
|
|
|
140
151
|
expect(await findByText(I18nMessages.CHECKOUT_TITLE)).toBeTruthy();
|
|
141
152
|
|
|
@@ -19,7 +19,7 @@ import { Body } from "../../components/layouts/body/Body";
|
|
|
19
19
|
import { CheckoutHeader } from "../../components/templates/header/checkoutHeader/CheckoutHeader";
|
|
20
20
|
import { useCheckoutFlow } from "../../hooks/useCheckoutFlow";
|
|
21
21
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
22
|
-
import { I18nMessages } from "../../i18n/i18n";
|
|
22
|
+
import { DOMAIN, I18nMessages } from "../../i18n/i18n";
|
|
23
23
|
import { Routes } from "../../routing/routes";
|
|
24
24
|
import { ProductVariant } from "../shared/components/productVariant/ProductVariant";
|
|
25
25
|
import { Pricing } from "../summary/components/pricing/Pricing";
|
|
@@ -48,8 +48,8 @@ const Checkout: FC<CheckoutProps> = ({
|
|
|
48
48
|
customer: { customerId, country, segment },
|
|
49
49
|
basePath,
|
|
50
50
|
} = useStaticInfo();
|
|
51
|
-
const titleText = useI18nMessage({ id: I18nMessages.CHECKOUT_TITLE });
|
|
52
|
-
const submitButtonText = useI18nMessage({ id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
51
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_TITLE });
|
|
52
|
+
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
53
53
|
const { screen } = useDevice();
|
|
54
54
|
const [pricingHeight, setPricingHeight] = useState(0);
|
|
55
55
|
const handleOnPricingLayout = useCallback(({ height }: LayoutRectangle) => setPricingHeight(height), []);
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
|
|
6
6
|
const DeliveryBanner = () => {
|
|
7
7
|
const { screen } = useDevice();
|
|
@@ -10,7 +10,7 @@ const DeliveryBanner = () => {
|
|
|
10
10
|
<InfoBox
|
|
11
11
|
contentAlign={screen.L ? ALIGN.CENTER : undefined}
|
|
12
12
|
testID="delivery-banner"
|
|
13
|
-
text={useI18nMessage({ id: I18nMessages.CHECKOUT_DELIVERY_BANNER })}
|
|
13
|
+
text={useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_DELIVERY_BANNER })}
|
|
14
14
|
type={INFOBOX_TYPE.SQUARED}
|
|
15
15
|
/>
|
|
16
16
|
);
|
|
@@ -18,7 +18,7 @@ import { HostDefaultCheckoutQuestionItem } from "../../../../components/organism
|
|
|
18
18
|
import { HostSelectCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem";
|
|
19
19
|
import { IconCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem";
|
|
20
20
|
import { TextareaCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem";
|
|
21
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
21
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
22
22
|
|
|
23
23
|
const checkoutQuestionItems: CheckoutQuestionItems = {
|
|
24
24
|
[CheckoutQuestionType.HOST_DEFAULT]: HostDefaultCheckoutQuestionItem,
|
|
@@ -39,7 +39,7 @@ const CheckoutQuestionsForm: FC<CheckoutQuestionsFormProps> = ({
|
|
|
39
39
|
submitButtonDisabled,
|
|
40
40
|
onSubmit,
|
|
41
41
|
}) => {
|
|
42
|
-
const buttonText = useI18nMessage({ id: I18nMessages.FEEDBACK_BUTTON });
|
|
42
|
+
const buttonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.FEEDBACK_BUTTON });
|
|
43
43
|
|
|
44
44
|
const feedback = useCheckoutQuestionFeedback();
|
|
45
45
|
const handlePress = useCallback(() => onSubmit(feedback), [feedback, onSubmit]);
|
|
@@ -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
|
|
|
10
10
|
type CustomerDecissionBannerStatus = Exclude<CheckoutItemStatus, CheckoutItemStatus.INITIAL>;
|
|
@@ -20,8 +20,8 @@ interface CustomerDecissionBannerProps {
|
|
|
20
20
|
readonly onPress: () => void;
|
|
21
21
|
}
|
|
22
22
|
const CustomerDecissionBanner: FC<CustomerDecissionBannerProps> = ({ checkoutItemStatus, onPress }) => {
|
|
23
|
-
const decissionText = useI18nMessage({ id: i18nMessageForCheckoutItemStatus[checkoutItemStatus] });
|
|
24
|
-
const bannerButtonText = useI18nMessage({ id: I18nMessages.ITEM_BANNER_BUTTON });
|
|
23
|
+
const decissionText = useI18nMessage({ domain: DOMAIN, id: i18nMessageForCheckoutItemStatus[checkoutItemStatus] });
|
|
24
|
+
const bannerButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_BANNER_BUTTON });
|
|
25
25
|
const screenSize = useScreenSize();
|
|
26
26
|
const isSmallScreen = screenSize === "S";
|
|
27
27
|
|
|
@@ -89,7 +89,7 @@ exports[`CustomerDecissionBanner component matches the snapshot for a KEPT check
|
|
|
89
89
|
"paddingBottom": 0,
|
|
90
90
|
"paddingLeft": 0,
|
|
91
91
|
"paddingRight": 0,
|
|
92
|
-
"paddingTop":
|
|
92
|
+
"paddingTop": 4,
|
|
93
93
|
},
|
|
94
94
|
]
|
|
95
95
|
}
|
|
@@ -258,7 +258,7 @@ exports[`CustomerDecissionBanner component matches the snapshot for a REPLACED c
|
|
|
258
258
|
"paddingBottom": 0,
|
|
259
259
|
"paddingLeft": 0,
|
|
260
260
|
"paddingRight": 0,
|
|
261
|
-
"paddingTop":
|
|
261
|
+
"paddingTop": 4,
|
|
262
262
|
},
|
|
263
263
|
]
|
|
264
264
|
}
|
|
@@ -427,7 +427,7 @@ exports[`CustomerDecissionBanner component matches the snapshot for a RETURNED c
|
|
|
427
427
|
"paddingBottom": 0,
|
|
428
428
|
"paddingLeft": 0,
|
|
429
429
|
"paddingRight": 0,
|
|
430
|
-
"paddingTop":
|
|
430
|
+
"paddingTop": 4,
|
|
431
431
|
},
|
|
432
432
|
]
|
|
433
433
|
}
|
package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx
CHANGED
|
@@ -3,7 +3,7 @@ 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
|
|
|
9
9
|
interface GetOutOfCheckoutModalProps {
|
|
@@ -12,10 +12,16 @@ interface GetOutOfCheckoutModalProps {
|
|
|
12
12
|
readonly onConfirm: () => void;
|
|
13
13
|
}
|
|
14
14
|
const GetOutOfCheckoutModal: FC<GetOutOfCheckoutModalProps> = ({ visible, onDismiss, onConfirm }) => {
|
|
15
|
-
const titleText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_TITLE });
|
|
16
|
-
const descriptionText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION });
|
|
17
|
-
const dismissButtonText = useI18nMessage({
|
|
18
|
-
|
|
15
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_TITLE });
|
|
16
|
+
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DESCRIPTION });
|
|
17
|
+
const dismissButtonText = useI18nMessage({
|
|
18
|
+
domain: DOMAIN,
|
|
19
|
+
id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_DISMISS_BUTTON,
|
|
20
|
+
});
|
|
21
|
+
const confirmButtonText = useI18nMessage({
|
|
22
|
+
domain: DOMAIN,
|
|
23
|
+
id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_CONFIRM_BUTTON,
|
|
24
|
+
});
|
|
19
25
|
|
|
20
26
|
return (
|
|
21
27
|
<Modal portalHostName="Checkout" visible={visible} onClose={onDismiss}>
|
|
@@ -217,7 +217,7 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
|
|
|
217
217
|
"paddingBottom": 0,
|
|
218
218
|
"paddingLeft": 0,
|
|
219
219
|
"paddingRight": 0,
|
|
220
|
-
"paddingTop":
|
|
220
|
+
"paddingTop": 0,
|
|
221
221
|
"width": "100%",
|
|
222
222
|
},
|
|
223
223
|
]
|
|
@@ -270,20 +270,13 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
|
|
|
270
270
|
"right": 0,
|
|
271
271
|
"top": 0,
|
|
272
272
|
},
|
|
273
|
-
"alignContent": "center",
|
|
274
273
|
"alignSelf": "flex-start",
|
|
275
|
-
"backgroundColor": "#0C0A0A",
|
|
276
|
-
"borderRadius": 9999,
|
|
277
274
|
"container": {
|
|
278
275
|
"overflow": "hidden",
|
|
279
276
|
},
|
|
280
277
|
"flex": 0,
|
|
281
278
|
"height": 64,
|
|
282
|
-
"justifyContent": "center",
|
|
283
279
|
"overflow": "hidden",
|
|
284
|
-
"paddingLeft": 24,
|
|
285
|
-
"paddingRight": 24,
|
|
286
|
-
"position": "relative",
|
|
287
280
|
"pressed": {
|
|
288
281
|
"bottom": 0,
|
|
289
282
|
"left": 0,
|
|
@@ -299,57 +292,98 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
|
|
|
299
292
|
]
|
|
300
293
|
}
|
|
301
294
|
>
|
|
302
|
-
<
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
295
|
+
<ViewManagerAdapter_ExpoLinearGradient
|
|
296
|
+
colors={
|
|
297
|
+
[
|
|
298
|
+
4278979082,
|
|
299
|
+
4278979082,
|
|
300
|
+
]
|
|
301
|
+
}
|
|
302
|
+
endPoint={
|
|
303
|
+
[
|
|
304
|
+
1,
|
|
305
|
+
0,
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
startPoint={
|
|
309
|
+
[
|
|
310
|
+
0,
|
|
311
|
+
1,
|
|
312
|
+
]
|
|
315
313
|
}
|
|
316
|
-
/>
|
|
317
|
-
<View
|
|
318
314
|
style={
|
|
319
315
|
[
|
|
320
316
|
{
|
|
321
|
-
"
|
|
322
|
-
"
|
|
317
|
+
"alignContent": "center",
|
|
318
|
+
"height": 64,
|
|
323
319
|
"justifyContent": "center",
|
|
320
|
+
"overflow": "hidden",
|
|
321
|
+
"paddingLeft": 24,
|
|
322
|
+
"paddingRight": 24,
|
|
323
|
+
"position": "relative",
|
|
324
|
+
},
|
|
325
|
+
{},
|
|
326
|
+
undefined,
|
|
327
|
+
undefined,
|
|
328
|
+
false,
|
|
329
|
+
{
|
|
330
|
+
"borderRadius": 9999,
|
|
324
331
|
},
|
|
325
332
|
]
|
|
326
333
|
}
|
|
327
334
|
>
|
|
328
|
-
<
|
|
329
|
-
|
|
330
|
-
|
|
335
|
+
<View
|
|
336
|
+
collapsable={false}
|
|
337
|
+
pointerEvents="none"
|
|
338
|
+
style={
|
|
339
|
+
{
|
|
340
|
+
"backgroundColor": "#716A6B",
|
|
341
|
+
"height": "300%",
|
|
342
|
+
"left": 0,
|
|
343
|
+
"opacity": 0.7,
|
|
344
|
+
"position": "absolute",
|
|
345
|
+
"top": 0,
|
|
346
|
+
"width": "0%",
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
/>
|
|
350
|
+
<View
|
|
331
351
|
style={
|
|
332
352
|
[
|
|
333
353
|
{
|
|
334
|
-
"
|
|
335
|
-
"
|
|
336
|
-
"
|
|
337
|
-
"letterSpacing": -0.2,
|
|
338
|
-
"lineHeight": 20,
|
|
339
|
-
"paddingBottom": 0,
|
|
340
|
-
"paddingLeft": 0,
|
|
341
|
-
"paddingRight": 0,
|
|
342
|
-
"paddingTop": 2,
|
|
343
|
-
"textAlign": "center",
|
|
344
|
-
"textTransform": "uppercase",
|
|
345
|
-
"width": "100%",
|
|
354
|
+
"alignItems": "center",
|
|
355
|
+
"flexDirection": "row",
|
|
356
|
+
"justifyContent": "center",
|
|
346
357
|
},
|
|
347
358
|
]
|
|
348
359
|
}
|
|
349
360
|
>
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
361
|
+
<Text
|
|
362
|
+
allowFontScaling={false}
|
|
363
|
+
selectable={false}
|
|
364
|
+
style={
|
|
365
|
+
[
|
|
366
|
+
{
|
|
367
|
+
"color": "#0C0A0A",
|
|
368
|
+
"fontFamily": "AreaNormal-Extrabold",
|
|
369
|
+
"fontSize": 15,
|
|
370
|
+
"letterSpacing": -0.2,
|
|
371
|
+
"lineHeight": 20,
|
|
372
|
+
"paddingBottom": 0,
|
|
373
|
+
"paddingLeft": 0,
|
|
374
|
+
"paddingRight": 0,
|
|
375
|
+
"paddingTop": 0,
|
|
376
|
+
"textAlign": "center",
|
|
377
|
+
"textTransform": "uppercase",
|
|
378
|
+
"width": "100%",
|
|
379
|
+
},
|
|
380
|
+
]
|
|
381
|
+
}
|
|
382
|
+
>
|
|
383
|
+
get_out_of_checkout_modal.dismiss_button
|
|
384
|
+
</Text>
|
|
385
|
+
</View>
|
|
386
|
+
</ViewManagerAdapter_ExpoLinearGradient>
|
|
353
387
|
</View>
|
|
354
388
|
<View
|
|
355
389
|
accessibilityRole="button"
|
|
@@ -396,24 +430,14 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
|
|
|
396
430
|
"right": 0,
|
|
397
431
|
"top": 0,
|
|
398
432
|
},
|
|
399
|
-
"alignContent": "center",
|
|
400
433
|
"alignSelf": "flex-start",
|
|
401
|
-
"backgroundColor": "#FFFFFF",
|
|
402
|
-
"borderColor": "#0C0A0A",
|
|
403
|
-
"borderRadius": 9999,
|
|
404
|
-
"borderStyle": "solid",
|
|
405
|
-
"borderWidth": 2,
|
|
406
434
|
"container": {
|
|
407
435
|
"overflow": "hidden",
|
|
408
436
|
},
|
|
409
437
|
"flex": 0,
|
|
410
438
|
"height": 64,
|
|
411
|
-
"justifyContent": "center",
|
|
412
439
|
"marginTop": 32,
|
|
413
440
|
"overflow": "hidden",
|
|
414
|
-
"paddingLeft": 24,
|
|
415
|
-
"paddingRight": 24,
|
|
416
|
-
"position": "relative",
|
|
417
441
|
"pressed": {
|
|
418
442
|
"bottom": 0,
|
|
419
443
|
"left": 0,
|
|
@@ -429,57 +453,105 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
|
|
|
429
453
|
]
|
|
430
454
|
}
|
|
431
455
|
>
|
|
432
|
-
<
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
456
|
+
<ViewManagerAdapter_ExpoLinearGradient
|
|
457
|
+
colors={
|
|
458
|
+
[
|
|
459
|
+
4294967295,
|
|
460
|
+
4294967295,
|
|
461
|
+
]
|
|
462
|
+
}
|
|
463
|
+
endPoint={
|
|
464
|
+
[
|
|
465
|
+
1,
|
|
466
|
+
0,
|
|
467
|
+
]
|
|
468
|
+
}
|
|
469
|
+
startPoint={
|
|
470
|
+
[
|
|
471
|
+
0,
|
|
472
|
+
1,
|
|
473
|
+
]
|
|
445
474
|
}
|
|
446
|
-
/>
|
|
447
|
-
<View
|
|
448
475
|
style={
|
|
449
476
|
[
|
|
450
477
|
{
|
|
451
|
-
"
|
|
452
|
-
"
|
|
478
|
+
"alignContent": "center",
|
|
479
|
+
"height": 64,
|
|
453
480
|
"justifyContent": "center",
|
|
481
|
+
"overflow": "hidden",
|
|
482
|
+
"paddingLeft": 24,
|
|
483
|
+
"paddingRight": 24,
|
|
484
|
+
"position": "relative",
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"borderColor": "#0C0A0A",
|
|
488
|
+
"borderStyle": "solid",
|
|
489
|
+
"borderWidth": 2,
|
|
490
|
+
"height": 64,
|
|
491
|
+
"paddingLeft": 24,
|
|
492
|
+
"paddingRight": 24,
|
|
493
|
+
},
|
|
494
|
+
undefined,
|
|
495
|
+
undefined,
|
|
496
|
+
false,
|
|
497
|
+
{
|
|
498
|
+
"borderRadius": 9999,
|
|
454
499
|
},
|
|
455
500
|
]
|
|
456
501
|
}
|
|
457
502
|
>
|
|
458
|
-
<
|
|
459
|
-
|
|
460
|
-
|
|
503
|
+
<View
|
|
504
|
+
collapsable={false}
|
|
505
|
+
pointerEvents="none"
|
|
506
|
+
style={
|
|
507
|
+
{
|
|
508
|
+
"backgroundColor": "#B7B3B3",
|
|
509
|
+
"height": "300%",
|
|
510
|
+
"left": 0,
|
|
511
|
+
"opacity": 0.7,
|
|
512
|
+
"position": "absolute",
|
|
513
|
+
"top": 0,
|
|
514
|
+
"width": "0%",
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
/>
|
|
518
|
+
<View
|
|
461
519
|
style={
|
|
462
520
|
[
|
|
463
521
|
{
|
|
464
|
-
"
|
|
465
|
-
"
|
|
466
|
-
"
|
|
467
|
-
"letterSpacing": -0.2,
|
|
468
|
-
"lineHeight": 20,
|
|
469
|
-
"paddingBottom": 0,
|
|
470
|
-
"paddingLeft": 0,
|
|
471
|
-
"paddingRight": 0,
|
|
472
|
-
"paddingTop": 2,
|
|
473
|
-
"textAlign": "center",
|
|
474
|
-
"textTransform": "uppercase",
|
|
475
|
-
"width": "100%",
|
|
522
|
+
"alignItems": "center",
|
|
523
|
+
"flexDirection": "row",
|
|
524
|
+
"justifyContent": "center",
|
|
476
525
|
},
|
|
477
526
|
]
|
|
478
527
|
}
|
|
479
528
|
>
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
529
|
+
<Text
|
|
530
|
+
allowFontScaling={false}
|
|
531
|
+
selectable={false}
|
|
532
|
+
style={
|
|
533
|
+
[
|
|
534
|
+
{
|
|
535
|
+
"color": "#0C0A0A",
|
|
536
|
+
"fontFamily": "AreaNormal-Extrabold",
|
|
537
|
+
"fontSize": 15,
|
|
538
|
+
"letterSpacing": -0.2,
|
|
539
|
+
"lineHeight": 20,
|
|
540
|
+
"paddingBottom": 0,
|
|
541
|
+
"paddingLeft": 0,
|
|
542
|
+
"paddingRight": 0,
|
|
543
|
+
"paddingTop": 0,
|
|
544
|
+
"textAlign": "center",
|
|
545
|
+
"textTransform": "uppercase",
|
|
546
|
+
"width": "100%",
|
|
547
|
+
},
|
|
548
|
+
]
|
|
549
|
+
}
|
|
550
|
+
>
|
|
551
|
+
get_out_of_checkout_modal.confirm_button
|
|
552
|
+
</Text>
|
|
553
|
+
</View>
|
|
554
|
+
</ViewManagerAdapter_ExpoLinearGradient>
|
|
483
555
|
</View>
|
|
484
556
|
</View>
|
|
485
557
|
</View>
|
|
@@ -7,7 +7,7 @@ import { Sticky } from "@lookiero/sty-psp-ui";
|
|
|
7
7
|
import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
|
|
8
8
|
import { size } from "../../../../../../projection/size/size";
|
|
9
9
|
import { Body } from "../../../../components/layouts/body/Body";
|
|
10
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
10
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
11
11
|
import { SelectModal } from "../selectModal/SelectModal";
|
|
12
12
|
import { style } from "./ItemActions.style";
|
|
13
13
|
|
|
@@ -33,9 +33,9 @@ const ItemActions: FC<ItemActionsProps> = ({
|
|
|
33
33
|
}) => {
|
|
34
34
|
const [modalVisible, setModalVisible] = useState(false);
|
|
35
35
|
|
|
36
|
-
const changeSizeButtonText = useI18nMessage({ id: I18nMessages.ITEM_CHANGE_SIZE_BUTTON });
|
|
37
|
-
const keepButtonText = useI18nMessage({ id: I18nMessages.ITEM_KEEP_BUTTON });
|
|
38
|
-
const returnButtonText = useI18nMessage({ id: I18nMessages.ITEM_RETURN_BUTTON });
|
|
36
|
+
const changeSizeButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_CHANGE_SIZE_BUTTON });
|
|
37
|
+
const keepButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_KEEP_BUTTON });
|
|
38
|
+
const returnButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_RETURN_BUTTON });
|
|
39
39
|
|
|
40
40
|
const sizeSelectorOptions = useMemo(
|
|
41
41
|
() =>
|