@lookiero/checkout 10.0.0-beta.1 → 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 +10 -18
- 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 +11 -20
- 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
package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { MatchersV3, PactV3 } from "@pact-foundation/pact";
|
|
2
|
-
import { fetchHttpPost } from "@lookiero/sty-psp-http";
|
|
3
|
-
import {
|
|
4
|
-
AUTH_TOKEN,
|
|
5
|
-
DEFAULT_PACT_OPTIONS,
|
|
6
|
-
DEFAULT_REQUEST_HEADERS,
|
|
7
|
-
DEFAULT_RESPONSE_HEADERS,
|
|
8
|
-
fromMockServerUrlToApiUrl,
|
|
9
|
-
} from "../../../../pact.config";
|
|
10
|
-
import { httpPaymentFlowPayloadByCheckoutIdView } from "./httpPaymentFlowPayloadByCheckoutIdView";
|
|
11
|
-
import {
|
|
12
|
-
paymentFlowPayloadForKeptItems,
|
|
13
|
-
paymentFlowPayloadForReturnedItems,
|
|
14
|
-
paymentFlowPayloadForReplacedItems,
|
|
15
|
-
} from "./paymentFlowPayload.mock";
|
|
16
|
-
|
|
17
|
-
const provider = new PactV3({
|
|
18
|
-
...DEFAULT_PACT_OPTIONS,
|
|
19
|
-
consumer: "STY-BOX_CHECKOUT-FRONT",
|
|
20
|
-
provider: "STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId",
|
|
21
|
-
});
|
|
22
|
-
const checkoutId = "e2490de5-5bd3-43d5-b7c4-526e33f71304";
|
|
23
|
-
const paymentFlowPayloadForKeptItemsResponse = {
|
|
24
|
-
result: paymentFlowPayloadForKeptItems,
|
|
25
|
-
};
|
|
26
|
-
const paymentFlowPayloadForReturnedItemsResponse = {
|
|
27
|
-
result: paymentFlowPayloadForReturnedItems,
|
|
28
|
-
};
|
|
29
|
-
const paymentFlowPayloadForReplacedItemsResponse = {
|
|
30
|
-
result: paymentFlowPayloadForReplacedItems,
|
|
31
|
-
};
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
33
|
-
// @ts-ignore
|
|
34
|
-
const EXPECTED_BODY_FOR_KEPT_ITEMS = MatchersV3.like(paymentFlowPayloadForKeptItemsResponse);
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
const EXPECTED_BODY_FOR_RETURNED_ITEMS = MatchersV3.like(paymentFlowPayloadForReturnedItemsResponse);
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
39
|
-
// @ts-ignore
|
|
40
|
-
const EXPECTED_BODY_FOR_REPLACED_ITEMS = MatchersV3.like(paymentFlowPayloadForReplacedItemsResponse);
|
|
41
|
-
describe("STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId API", () => {
|
|
42
|
-
it("returns a valid payment-flow payload for the given checkout id [KEPT items] ", () => {
|
|
43
|
-
provider
|
|
44
|
-
.given("a valid payment-flow payload for the given checkout id [KEPT items] ")
|
|
45
|
-
.uponReceiving("payment-flow payload projection")
|
|
46
|
-
.withRequest({
|
|
47
|
-
method: "POST",
|
|
48
|
-
path: "/api/view-payment-flow-payload-by-checkout-id",
|
|
49
|
-
headers: DEFAULT_REQUEST_HEADERS,
|
|
50
|
-
body: { checkoutId },
|
|
51
|
-
})
|
|
52
|
-
.willRespondWith({
|
|
53
|
-
status: 200,
|
|
54
|
-
headers: DEFAULT_RESPONSE_HEADERS,
|
|
55
|
-
body: EXPECTED_BODY_FOR_KEPT_ITEMS,
|
|
56
|
-
});
|
|
57
|
-
return provider.executeTest(async (mockserver) => {
|
|
58
|
-
const httpPost = fetchHttpPost({
|
|
59
|
-
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
60
|
-
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
61
|
-
device: "web",
|
|
62
|
-
version: "1.0.0",
|
|
63
|
-
});
|
|
64
|
-
const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
|
|
65
|
-
expect(response).toStrictEqual(paymentFlowPayloadForKeptItemsResponse.result);
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
it("returns a valid payment-flow payload for the given checkout id [RETURNED items] ", () => {
|
|
69
|
-
provider
|
|
70
|
-
.given("a valid payment-flow payload for the given checkout id [RETURNED items] ")
|
|
71
|
-
.uponReceiving("payment-flow payload projection")
|
|
72
|
-
.withRequest({
|
|
73
|
-
method: "POST",
|
|
74
|
-
path: "/api/view-payment-flow-payload-by-checkout-id",
|
|
75
|
-
headers: DEFAULT_REQUEST_HEADERS,
|
|
76
|
-
body: { checkoutId },
|
|
77
|
-
})
|
|
78
|
-
.willRespondWith({
|
|
79
|
-
status: 200,
|
|
80
|
-
headers: DEFAULT_RESPONSE_HEADERS,
|
|
81
|
-
body: EXPECTED_BODY_FOR_RETURNED_ITEMS,
|
|
82
|
-
});
|
|
83
|
-
return provider.executeTest(async (mockserver) => {
|
|
84
|
-
const httpPost = fetchHttpPost({
|
|
85
|
-
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
86
|
-
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
87
|
-
device: "web",
|
|
88
|
-
version: "1.0.0",
|
|
89
|
-
});
|
|
90
|
-
const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
|
|
91
|
-
expect(response).toStrictEqual(paymentFlowPayloadForReturnedItemsResponse.result);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
it("returns a valid payment-flow payload for the given checkout id [REPLACED items] ", () => {
|
|
95
|
-
provider
|
|
96
|
-
.given("a valid payment-flow payload for the given checkout id [REPLACED items] ")
|
|
97
|
-
.uponReceiving("payment-flow payload projection")
|
|
98
|
-
.withRequest({
|
|
99
|
-
method: "POST",
|
|
100
|
-
path: "/api/view-payment-flow-payload-by-checkout-id",
|
|
101
|
-
headers: DEFAULT_REQUEST_HEADERS,
|
|
102
|
-
body: { checkoutId },
|
|
103
|
-
})
|
|
104
|
-
.willRespondWith({
|
|
105
|
-
status: 200,
|
|
106
|
-
headers: DEFAULT_RESPONSE_HEADERS,
|
|
107
|
-
body: EXPECTED_BODY_FOR_REPLACED_ITEMS,
|
|
108
|
-
});
|
|
109
|
-
return provider.executeTest(async (mockserver) => {
|
|
110
|
-
const httpPost = fetchHttpPost({
|
|
111
|
-
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
112
|
-
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
113
|
-
device: "web",
|
|
114
|
-
version: "1.0.0",
|
|
115
|
-
});
|
|
116
|
-
const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
|
|
117
|
-
expect(response).toStrictEqual(paymentFlowPayloadForReplacedItemsResponse.result);
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { MatchersV3, PactV3 } from "@pact-foundation/pact";
|
|
2
|
-
import { fetchHttpPost } from "@lookiero/sty-psp-http";
|
|
3
|
-
import {
|
|
4
|
-
AUTH_TOKEN,
|
|
5
|
-
DEFAULT_PACT_OPTIONS,
|
|
6
|
-
DEFAULT_REQUEST_HEADERS,
|
|
7
|
-
DEFAULT_RESPONSE_HEADERS,
|
|
8
|
-
fromMockServerUrlToApiUrl,
|
|
9
|
-
} from "../../../../pact.config";
|
|
10
|
-
import { httpPricingByCheckoutIdView } from "./httpPricingByCheckoutIdView";
|
|
11
|
-
import { pricing } from "./pricing.mock";
|
|
12
|
-
|
|
13
|
-
const provider = new PactV3({
|
|
14
|
-
...DEFAULT_PACT_OPTIONS,
|
|
15
|
-
consumer: "STY-BOX_CHECKOUT-FRONT",
|
|
16
|
-
provider: "STY-BOX_CHECKOUT-BACK_ViewPricingByCheckoutId",
|
|
17
|
-
});
|
|
18
|
-
const checkoutId = "6f720954-8039-4bed-9596-34fc5a02131b";
|
|
19
|
-
const pricingResponse = {
|
|
20
|
-
result: pricing(),
|
|
21
|
-
};
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
const EXPECTED_BODY = MatchersV3.like(pricingResponse);
|
|
25
|
-
describe("STY-BOX_CHECKOUT-BACK_ViewPricingByCheckoutId API", () => {
|
|
26
|
-
it("returns a valid pricing for the given checkout", () => {
|
|
27
|
-
provider
|
|
28
|
-
.given("a valid pricing for the given checkout")
|
|
29
|
-
.uponReceiving("pricing projection")
|
|
30
|
-
.withRequest({
|
|
31
|
-
method: "POST",
|
|
32
|
-
path: "/api/view-pricing-by-checkout-id",
|
|
33
|
-
headers: DEFAULT_REQUEST_HEADERS,
|
|
34
|
-
body: { checkoutId },
|
|
35
|
-
})
|
|
36
|
-
.willRespondWith({
|
|
37
|
-
status: 200,
|
|
38
|
-
headers: DEFAULT_RESPONSE_HEADERS,
|
|
39
|
-
body: EXPECTED_BODY,
|
|
40
|
-
});
|
|
41
|
-
return provider.executeTest(async (mockserver) => {
|
|
42
|
-
const httpPost = fetchHttpPost({
|
|
43
|
-
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
44
|
-
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
45
|
-
device: "web",
|
|
46
|
-
version: "1.0.0",
|
|
47
|
-
});
|
|
48
|
-
const response = await httpPricingByCheckoutIdView({ httpPost })({
|
|
49
|
-
checkoutId,
|
|
50
|
-
signal: undefined,
|
|
51
|
-
});
|
|
52
|
-
expect(response).toStrictEqual(pricingResponse.result);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { MatchersV3, PactV3 } from "@pact-foundation/pact";
|
|
2
|
-
import { fetchHttpPost } from "@lookiero/sty-psp-http";
|
|
3
|
-
import {
|
|
4
|
-
AUTH_TOKEN,
|
|
5
|
-
DEFAULT_PACT_OPTIONS,
|
|
6
|
-
DEFAULT_REQUEST_HEADERS,
|
|
7
|
-
DEFAULT_RESPONSE_HEADERS,
|
|
8
|
-
fromMockServerUrlToApiUrl,
|
|
9
|
-
} from "../../../../pact.config";
|
|
10
|
-
import { httpReturnQuestionsByCheckoutItemIdView } from "./httpReturnQuestionsByCheckoutItemIdView";
|
|
11
|
-
import { returnQuestions } from "./returnQuestions.mock";
|
|
12
|
-
|
|
13
|
-
const provider = new PactV3({
|
|
14
|
-
...DEFAULT_PACT_OPTIONS,
|
|
15
|
-
consumer: "STY-BOX_CHECKOUT-FRONT",
|
|
16
|
-
provider: "STY-BOX_CHECKOUT-BACK_ListReturnQuestionsByCheckoutItemId",
|
|
17
|
-
});
|
|
18
|
-
const checkoutItemId = "52440ae5-7a4c-498b-8b35-08ecfde15776";
|
|
19
|
-
const returnQuestionsResponse = {
|
|
20
|
-
result: returnQuestions,
|
|
21
|
-
};
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
const EXPECTED_BODY = MatchersV3.like(returnQuestionsResponse);
|
|
25
|
-
describe("STY-BOX_CHECKOUT-BACK_ListReturnQuestionsByCheckoutItemId API", () => {
|
|
26
|
-
it("returns a valid return questions for the given checkout item id", () => {
|
|
27
|
-
provider
|
|
28
|
-
.given("a valid return questions for the given checkout item id")
|
|
29
|
-
.uponReceiving("return questions projection")
|
|
30
|
-
.withRequest({
|
|
31
|
-
method: "POST",
|
|
32
|
-
path: "/api/list-return-questions-by-checkout-item-id",
|
|
33
|
-
headers: DEFAULT_REQUEST_HEADERS,
|
|
34
|
-
body: { checkoutItemId },
|
|
35
|
-
})
|
|
36
|
-
.willRespondWith({
|
|
37
|
-
status: 200,
|
|
38
|
-
headers: DEFAULT_RESPONSE_HEADERS,
|
|
39
|
-
body: EXPECTED_BODY,
|
|
40
|
-
});
|
|
41
|
-
return provider.executeTest(async (mockserver) => {
|
|
42
|
-
const httpPost = fetchHttpPost({
|
|
43
|
-
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
44
|
-
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
45
|
-
device: "web",
|
|
46
|
-
version: "1.0.0",
|
|
47
|
-
});
|
|
48
|
-
const response = await httpReturnQuestionsByCheckoutItemIdView({ httpPost })({
|
|
49
|
-
checkoutItemId,
|
|
50
|
-
signal: undefined,
|
|
51
|
-
});
|
|
52
|
-
expect(response).toStrictEqual(returnQuestionsResponse.result);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
});
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode, RefObject } from "react";
|
|
2
|
-
import { LayoutChangeEvent, ScrollView, StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
|
|
4
|
-
interface LayoutStyle {
|
|
5
|
-
readonly safeAreaView: StyleProp<ViewStyle>;
|
|
6
|
-
readonly scrollView: StyleProp<ViewStyle>;
|
|
7
|
-
readonly header: StyleProp<ViewStyle>;
|
|
8
|
-
}
|
|
9
|
-
interface LayoutProps {
|
|
10
|
-
readonly children: ReactNode;
|
|
11
|
-
readonly header?: JSX.Element | null;
|
|
12
|
-
readonly footer?: JSX.Element | null;
|
|
13
|
-
readonly panel?: JSX.Element | null;
|
|
14
|
-
readonly stickyHeader?: boolean;
|
|
15
|
-
readonly stickyHeaderHiddenOnScroll?: boolean;
|
|
16
|
-
readonly scrollRef?: RefObject<ScrollView>;
|
|
17
|
-
readonly scrollEnabled?: boolean;
|
|
18
|
-
readonly style?: Partial<LayoutStyle>;
|
|
19
|
-
readonly onLayout?: (event: LayoutChangeEvent) => void;
|
|
20
|
-
}
|
|
21
|
-
type Layout = FC<LayoutProps>;
|
|
22
|
-
export type { Layout };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Platform, StyleSheet } from "react-native";
|
|
2
|
-
import { HEADER_HEIGHT } from "../../../../templates/header/Header.style";
|
|
3
|
-
|
|
4
|
-
const style = StyleSheet.create({
|
|
5
|
-
header: {
|
|
6
|
-
...Platform.select({
|
|
7
|
-
web: {
|
|
8
|
-
position: "sticky",
|
|
9
|
-
top: 0,
|
|
10
|
-
zIndex: 10,
|
|
11
|
-
height: HEADER_HEIGHT,
|
|
12
|
-
},
|
|
13
|
-
native: {
|
|
14
|
-
position: "relative",
|
|
15
|
-
height: HEADER_HEIGHT,
|
|
16
|
-
},
|
|
17
|
-
}),
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
export { style };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/prop-types */
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { View } from "react-native";
|
|
4
|
-
import { GestureHandlerRootView, ScrollView as RNGHScrollView } from "react-native-gesture-handler";
|
|
5
|
-
import { SafeAreaView } from "react-native-safe-area-context";
|
|
6
|
-
import { Footer as DefaultFooter } from "../../../templates/footer/Footer";
|
|
7
|
-
import { DefaultHeader } from "../../../templates/header/defaultHeader/DefaultHeader";
|
|
8
|
-
import { Footer } from "../components/footer/Footer";
|
|
9
|
-
import { Header } from "../components/header/Header";
|
|
10
|
-
import { style } from "./DummyLayout.style";
|
|
11
|
-
|
|
12
|
-
const DummyLayout = ({
|
|
13
|
-
children,
|
|
14
|
-
header = React.createElement(DefaultHeader, null),
|
|
15
|
-
footer = React.createElement(DefaultFooter, null),
|
|
16
|
-
panel,
|
|
17
|
-
style: customStyle,
|
|
18
|
-
scrollEnabled,
|
|
19
|
-
onLayout,
|
|
20
|
-
}) =>
|
|
21
|
-
React.createElement(
|
|
22
|
-
SafeAreaView,
|
|
23
|
-
{ style: [style.safeAreaView, customStyle?.safeAreaView] },
|
|
24
|
-
React.createElement(
|
|
25
|
-
GestureHandlerRootView,
|
|
26
|
-
{ style: { flex: 1 } },
|
|
27
|
-
React.createElement(
|
|
28
|
-
RNGHScrollView,
|
|
29
|
-
{
|
|
30
|
-
contentContainerStyle: [style.scrollView, customStyle?.scrollView],
|
|
31
|
-
scrollEnabled: scrollEnabled,
|
|
32
|
-
scrollEventThrottle: 16,
|
|
33
|
-
showsVerticalScrollIndicator: false,
|
|
34
|
-
stickyHeaderIndices: [0],
|
|
35
|
-
},
|
|
36
|
-
React.createElement(Header, null, header),
|
|
37
|
-
panel,
|
|
38
|
-
React.createElement(View, { style: style.children, onLayout: onLayout }, children),
|
|
39
|
-
),
|
|
40
|
-
),
|
|
41
|
-
React.createElement(Footer, null, footer),
|
|
42
|
-
);
|
|
43
|
-
export { DummyLayout };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useLocation } from "react-router-native";
|
|
3
|
-
import { Footer as AuroraFooter, FooterItem } from "@lookiero/aurora";
|
|
4
|
-
const Footer = () => {
|
|
5
|
-
const location = useLocation();
|
|
6
|
-
return (React.createElement(AuroraFooter, { value: location.pathname },
|
|
7
|
-
React.createElement(FooterItem, { icon: "box", text: "Inicio", value: "/" }),
|
|
8
|
-
React.createElement(FooterItem, { icon: "heart", text: "Look&Like", value: "/look-and-like" }),
|
|
9
|
-
React.createElement(FooterItem, { icon: "referrals", text: "Amigas", value: "/friends" }),
|
|
10
|
-
React.createElement(FooterItem, { icon: "eye_open", text: "Inspiraci\u00F3n", value: "/inspiration" }),
|
|
11
|
-
React.createElement(FooterItem, { icon: "inbox", notification: true, text: "Mensajes", value: "/messages" })));
|
|
12
|
-
};
|
|
13
|
-
export { Footer };
|
package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ButtonIcon } from "@lookiero/aurora";
|
|
3
|
-
import { Header } from "../Header";
|
|
4
|
-
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
5
|
-
import { Logo } from "../logo/Logo";
|
|
6
|
-
import { style } from "./DefaultHeader.style";
|
|
7
|
-
|
|
8
|
-
const DefaultHeader = ({ onPressMenu }) =>
|
|
9
|
-
React.createElement(
|
|
10
|
-
Header,
|
|
11
|
-
{ testID: "default-header" },
|
|
12
|
-
React.createElement(Logo, null),
|
|
13
|
-
React.createElement(ButtonIconPlaceholder, null),
|
|
14
|
-
React.createElement(ButtonIcon, {
|
|
15
|
-
name: "menu",
|
|
16
|
-
style: style.button,
|
|
17
|
-
testID: "menu-button-icon",
|
|
18
|
-
onPress: onPressMenu,
|
|
19
|
-
}),
|
|
20
|
-
);
|
|
21
|
-
export { DefaultHeader };
|
package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
2
|
-
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
|
|
4
|
-
const { space10 } = theme();
|
|
5
|
-
const style = StyleSheet.create({
|
|
6
|
-
button: {
|
|
7
|
-
alignSelf: "auto",
|
|
8
|
-
height: space10,
|
|
9
|
-
width: space10,
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
export { style };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
declare enum NewFeedbackExperimentVariation {
|
|
4
|
-
CONTROL = "control",
|
|
5
|
-
RETURN_PAGE = "return_page",
|
|
6
|
-
}
|
|
7
|
-
interface NewFeedbackExperimentProviderProps {
|
|
8
|
-
readonly children: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
declare const NewFeedbackExperimentProvider: FC<NewFeedbackExperimentProviderProps>;
|
|
11
|
-
declare const useNewFeedbackExperiment: () => NewFeedbackExperimentVariation;
|
|
12
|
-
export { useNewFeedbackExperiment, NewFeedbackExperimentProvider, NewFeedbackExperimentVariation };
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React, { createContext, useContext, useEffect, useMemo, useRef } from "react";
|
|
2
|
-
import invariant from "tiny-invariant";
|
|
3
|
-
import { Spinner } from "@lookiero/aurora";
|
|
4
|
-
import { useAssignedVariationByExperimentId } from "@lookiero/sty-psp-ab-testing";
|
|
5
|
-
import { useViewFirstAvailableCheckoutByCustomerId } from "../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
6
|
-
import { useTrackAssignedVariationByExperiment } from "../../tracking/useTrackAssignedVariationByExperiment";
|
|
7
|
-
import { useStaticInfo } from "./useStaticInfo";
|
|
8
|
-
|
|
9
|
-
var NewFeedbackExperimentVariation;
|
|
10
|
-
(function (NewFeedbackExperimentVariation) {
|
|
11
|
-
NewFeedbackExperimentVariation["CONTROL"] = "control";
|
|
12
|
-
NewFeedbackExperimentVariation["RETURN_PAGE"] = "return_page";
|
|
13
|
-
})(NewFeedbackExperimentVariation || (NewFeedbackExperimentVariation = {}));
|
|
14
|
-
const NewFeedbackExperimentContext = createContext(null);
|
|
15
|
-
const NewFeedbackExperimentProvider = ({ children }) => {
|
|
16
|
-
const {
|
|
17
|
-
kameleoon: {
|
|
18
|
-
experiments: {
|
|
19
|
-
newFeedback: { id: newFeedbackId, variations },
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
customer: { customerId, country, segment },
|
|
23
|
-
} = useStaticInfo();
|
|
24
|
-
const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
25
|
-
const { assignedVariation: newFeedbackVariation } = useAssignedVariationByExperimentId({
|
|
26
|
-
experimentId: newFeedbackId,
|
|
27
|
-
});
|
|
28
|
-
const trackAssignedVariation = useTrackAssignedVariationByExperiment({
|
|
29
|
-
checkoutId: checkout?.id,
|
|
30
|
-
country,
|
|
31
|
-
segment,
|
|
32
|
-
experimentId: newFeedbackId,
|
|
33
|
-
});
|
|
34
|
-
const value = useMemo(
|
|
35
|
-
() => ({
|
|
36
|
-
variation:
|
|
37
|
-
newFeedbackVariation?.id === Number(variations.v1)
|
|
38
|
-
? NewFeedbackExperimentVariation.RETURN_PAGE
|
|
39
|
-
: NewFeedbackExperimentVariation.CONTROL,
|
|
40
|
-
}),
|
|
41
|
-
[newFeedbackVariation?.id, variations.v1],
|
|
42
|
-
);
|
|
43
|
-
const assignedVariantTracked = useRef(false);
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
if (assignedVariantTracked.current || !newFeedbackVariation || !checkout?.id) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
trackAssignedVariation({ assignedVariation: newFeedbackVariation });
|
|
49
|
-
assignedVariantTracked.current = true;
|
|
50
|
-
}, [checkout?.id, newFeedbackVariation, trackAssignedVariation]);
|
|
51
|
-
if (!checkout) {
|
|
52
|
-
return React.createElement(Spinner, null);
|
|
53
|
-
}
|
|
54
|
-
return React.createElement(NewFeedbackExperimentContext.Provider, { value: value }, children);
|
|
55
|
-
};
|
|
56
|
-
const useNewFeedbackExperiment = () => {
|
|
57
|
-
const newFeedbackExperiment = useContext(NewFeedbackExperimentContext);
|
|
58
|
-
invariant(
|
|
59
|
-
newFeedbackExperiment,
|
|
60
|
-
"Your are trying to use the useNewFeedbackExperiment hook without wrapping your app with the <NewFeedbackExperimentProvider>.",
|
|
61
|
-
);
|
|
62
|
-
return newFeedbackExperiment.variation;
|
|
63
|
-
};
|
|
64
|
-
export { useNewFeedbackExperiment, NewFeedbackExperimentProvider, NewFeedbackExperimentVariation };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { EndpointFunction, FetchTranslationFuction } from "@lookiero/i18n";
|
|
2
|
-
|
|
3
|
-
interface FetchTranslationsFuntionArgs {
|
|
4
|
-
readonly translations: EndpointFunction[];
|
|
5
|
-
}
|
|
6
|
-
interface FetchTranslationsFuntion {
|
|
7
|
-
(args: FetchTranslationsFuntionArgs): FetchTranslationFuction;
|
|
8
|
-
}
|
|
9
|
-
declare const fetchTranslations: FetchTranslationsFuntion;
|
|
10
|
-
export { fetchTranslations };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { fetchFetchTranslation } from "@lookiero/i18n";
|
|
2
|
-
|
|
3
|
-
const fetchTranslations =
|
|
4
|
-
({ translations }) =>
|
|
5
|
-
async ({ locale }) => {
|
|
6
|
-
const translationsMessages = await Promise.all(
|
|
7
|
-
translations.map((endpoint) => fetchFetchTranslation({ endpoint })({ locale })),
|
|
8
|
-
);
|
|
9
|
-
return translationsMessages.reduce(
|
|
10
|
-
(acc, translationMessages) => ({
|
|
11
|
-
...acc,
|
|
12
|
-
...translationMessages,
|
|
13
|
-
}),
|
|
14
|
-
{},
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
export { fetchTranslations };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { EndpointFunction } from "@lookiero/i18n";
|
|
2
|
-
|
|
3
|
-
interface TranslationEndpointFunctionArgs {
|
|
4
|
-
readonly translationsUrl: string;
|
|
5
|
-
readonly translationsApiKey: string;
|
|
6
|
-
}
|
|
7
|
-
interface TranslationEndpointFunction {
|
|
8
|
-
(args: TranslationEndpointFunctionArgs): EndpointFunction;
|
|
9
|
-
}
|
|
10
|
-
declare const translationEndpoint: TranslationEndpointFunction;
|
|
11
|
-
type Project = "user-area-front" | "inventory-catalog" | "checkout";
|
|
12
|
-
interface TranslationExternalEndpointFunctionArgs {
|
|
13
|
-
readonly translationsUrl: string;
|
|
14
|
-
readonly projects: [project: Project, filter?: string][];
|
|
15
|
-
}
|
|
16
|
-
interface TranslationExternalEndpointFunction {
|
|
17
|
-
(args: TranslationExternalEndpointFunctionArgs): EndpointFunction;
|
|
18
|
-
}
|
|
19
|
-
declare const translationExternalEndpoint: TranslationExternalEndpointFunction;
|
|
20
|
-
export { translationEndpoint, translationExternalEndpoint };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Country } from "../../../projection/shared/country";
|
|
2
|
-
import { Locale } from "../../../projection/shared/locale";
|
|
3
|
-
|
|
4
|
-
const translationEndpoint =
|
|
5
|
-
({ translationsUrl, translationsApiKey }) =>
|
|
6
|
-
(locale) =>
|
|
7
|
-
`${translationsUrl}/${locale}?key=${translationsApiKey}&no-folding=true`;
|
|
8
|
-
const COUNTRY = {
|
|
9
|
-
[Locale.ES]: Country.ES,
|
|
10
|
-
[Locale.FR]: Country.FR,
|
|
11
|
-
[Locale.EN]: Country.GB,
|
|
12
|
-
[Locale.IT]: Country.IT,
|
|
13
|
-
[Locale.PT]: Country.PT,
|
|
14
|
-
[Locale.DE]: Country.DE,
|
|
15
|
-
[Locale.AT]: Country.AT,
|
|
16
|
-
[Locale.NL]: Country.NL,
|
|
17
|
-
[Locale.SE]: Country.SE,
|
|
18
|
-
};
|
|
19
|
-
const translationExternalEndpoint =
|
|
20
|
-
({ translationsUrl, projects }) =>
|
|
21
|
-
(locale) => {
|
|
22
|
-
const projectsQueryParam = projects
|
|
23
|
-
.map(([project, filter]) => `projectFilter=${project}${filter ? `:${filter}` : ""}`)
|
|
24
|
-
.join("&");
|
|
25
|
-
return `${translationsUrl}/${locale}/${COUNTRY[locale]}?${projectsQueryParam}`;
|
|
26
|
-
};
|
|
27
|
-
export { translationEndpoint, translationExternalEndpoint };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
|
|
3
|
-
interface CheckoutAccessibilityMiddlewareProps {
|
|
4
|
-
readonly customerId: string | undefined;
|
|
5
|
-
readonly onNotAccessible: () => void;
|
|
6
|
-
readonly loader?: JSX.Element;
|
|
7
|
-
readonly children: JSX.Element;
|
|
8
|
-
}
|
|
9
|
-
declare const CheckoutAccessibilityMiddleware: FC<CheckoutAccessibilityMiddlewareProps>;
|
|
10
|
-
export { CheckoutAccessibilityMiddleware };
|