@lookiero/checkout 7.2.0-beta.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -2
- package/dist/src/ExpoRoot.js +11 -11
- package/dist/src/infrastructure/projection/pricing/pricing.d.ts +1 -1
- package/dist/src/infrastructure/tracking/tracking.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackChangeFeedback.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackCheckout.d.ts +2 -2
- package/dist/src/infrastructure/tracking/useTrackImageView.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackItemPageView.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackKeepItem.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackPageView.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackPressBack.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackPressContinue.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackPressItem.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackPressNext.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackPressPrevious.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackPressPricing.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackReplaceItem.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackResetItem.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackReturnItem.d.ts +1 -1
- package/dist/src/infrastructure/tracking/useTrackTabView.d.ts +1 -1
- package/dist/src/infrastructure/ui/Root.d.ts +5 -4
- package/dist/src/infrastructure/ui/Root.js +1 -1
- package/dist/src/infrastructure/ui/components/atoms/price/Price.d.ts +1 -1
- package/dist/src/infrastructure/ui/hooks/useStaticInfo.d.ts +1 -1
- package/dist/src/infrastructure/ui/routing/Routing.d.ts +5 -4
- package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.d.ts +3 -3
- package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +1 -1
- package/dist/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/return/components/price/Price.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +1 -1
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.d.ts +3 -3
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +1 -1
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.d.ts +1 -1
- package/dist/src/projection/bookedProductsVariants/bookedProductsVariants.d.ts +1 -1
- package/dist/src/projection/checkoutItem/checkoutItem.d.ts +2 -2
- package/dist/src/projection/pricing/pricing.d.ts +1 -1
- package/dist/src/projection/{shared → size}/size.d.ts +1 -1
- package/dist/src/projection/{shared → size}/size.js +1 -1
- package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +1 -1
- package/dist/src/shared/ui/components/molecules/inputField/InputField.js +1 -2
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/index.ts +4 -5
- package/package.json +4 -4
- package/src/ExpoRoot.tsx +15 -13
- package/src/infrastructure/domain/checkoutItem/model/httpCheckoutItems.test.ts +1 -1
- package/src/infrastructure/projection/pricing/pricing.ts +1 -1
- package/src/infrastructure/tracking/tracking.ts +1 -1
- package/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.test.ts +1 -1
- package/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.ts +1 -1
- package/src/infrastructure/tracking/useTrackChangeFeedback.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackChangeFeedback.ts +1 -1
- package/src/infrastructure/tracking/useTrackCheckout.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackCheckout.ts +2 -2
- package/src/infrastructure/tracking/useTrackImageView.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackImageView.ts +1 -1
- package/src/infrastructure/tracking/useTrackItemPageView.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackItemPageView.ts +1 -1
- package/src/infrastructure/tracking/useTrackKeepItem.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackKeepItem.ts +1 -1
- package/src/infrastructure/tracking/useTrackPageView.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackPageView.ts +1 -1
- package/src/infrastructure/tracking/useTrackPressBack.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackPressBack.ts +1 -1
- package/src/infrastructure/tracking/useTrackPressContinue.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackPressContinue.ts +1 -1
- package/src/infrastructure/tracking/useTrackPressItem.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackPressItem.ts +1 -1
- package/src/infrastructure/tracking/useTrackPressNext.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackPressNext.ts +1 -1
- package/src/infrastructure/tracking/useTrackPressPrevious.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackPressPrevious.ts +1 -1
- package/src/infrastructure/tracking/useTrackPressPricing.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackPressPricing.ts +1 -1
- package/src/infrastructure/tracking/useTrackReplaceItem.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackReplaceItem.ts +1 -1
- package/src/infrastructure/tracking/useTrackResetItem.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackResetItem.ts +1 -1
- package/src/infrastructure/tracking/useTrackReturnItem.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackReturnItem.ts +1 -1
- package/src/infrastructure/tracking/useTrackTabView.test.tsx +1 -1
- package/src/infrastructure/tracking/useTrackTabView.ts +1 -1
- package/src/infrastructure/ui/Root.tsx +6 -5
- package/src/infrastructure/ui/components/atoms/price/Price.test.tsx +1 -1
- package/src/infrastructure/ui/components/atoms/price/Price.tsx +1 -1
- package/src/infrastructure/ui/hooks/useStaticInfo.test.tsx +1 -1
- package/src/infrastructure/ui/hooks/useStaticInfo.tsx +1 -1
- package/src/infrastructure/ui/routing/Routing.tsx +5 -4
- package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +1 -1
- package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.test.tsx +1 -1
- package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.tsx +1 -1
- package/src/infrastructure/ui/views/feedback/Feedback.test.tsx +1 -1
- package/src/infrastructure/ui/views/item/Item.test.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.test.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +2 -2
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.test.tsx +1 -1
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +3 -3
- package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.test.tsx +1 -1
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.test.tsx +1 -1
- package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.test.tsx +1 -1
- package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.tsx +1 -1
- package/src/infrastructure/ui/views/return/components/price/Price.test.tsx +1 -1
- package/src/infrastructure/ui/views/return/components/price/Price.tsx +1 -1
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +2 -2
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +1 -1
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.test.tsx +1 -1
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +3 -3
- package/src/infrastructure/ui/views/summary/Summary.test.tsx +1 -1
- package/src/infrastructure/ui/views/summaryTabs/SummaryTabs.test.tsx +1 -1
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.test.tsx +1 -1
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +2 -2
- package/src/projection/bookedProductsVariants/bookedProductsVariants.ts +1 -1
- package/src/projection/checkoutItem/checkoutItem.ts +2 -2
- package/src/projection/pricing/pricing.ts +1 -1
- package/src/projection/{shared → size}/size.test.ts +1 -1
- package/src/projection/{shared → size}/size.ts +1 -1
- package/src/shared/ui/components/molecules/inputField/InputField.tsx +1 -2
- package/dist/public/public/assets/adaptive-icon.png +0 -0
- package/dist/public/public/assets/favicon.png +0 -0
- package/dist/public/public/assets/icon.png +0 -0
- package/dist/public/public/assets/splash.png +0 -0
- package/dist/public/public/images/not-found.png +0 -0
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -10
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -17
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -21
- 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 -6
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -4
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -6
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -5
- 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 -19
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -3
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -18
- 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 -13
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -6
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -11
- 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 -11
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -11
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -49
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -9
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -9
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -19
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -21
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -9
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -21
- 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 -10
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -11
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -40
- 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 -15
- package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
- package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -43
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -13
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -9
- 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 -10
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -17
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -13
- package/dist/src/projection/shared/country.d.ts +0 -14
- package/dist/src/projection/shared/country.js +0 -15
- package/dist/src/projection/shared/locale.d.ts +0 -12
- package/dist/src/projection/shared/locale.js +0 -13
- package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -10
- package/dist/src/shared/ui/components/atoms/error/Error.js +0 -4
- package/src/infrastructure/ui/i18n/fetchTranslations.test.ts +0 -29
- package/src/infrastructure/ui/i18n/fetchTranslations.ts +0 -27
- package/src/infrastructure/ui/i18n/translationEndpoint.test.ts +0 -13
- package/src/infrastructure/ui/i18n/translationEndpoint.ts +0 -50
- package/src/projection/shared/country.ts +0 -15
- package/src/projection/shared/locale.ts +0 -13
- package/src/shared/ui/components/atoms/error/Error.test.tsx +0 -11
- package/src/shared/ui/components/atoms/error/Error.tsx +0 -18
- package/src/shared/ui/components/atoms/error/__snapshots__/Error.test.tsx.snap +0 -54
- /package/dist/src/projection/{shared → customer}/customer.d.ts +0 -0
- /package/dist/src/projection/{shared → customer}/customer.js +0 -0
- /package/dist/src/projection/{shared → order}/order.d.ts +0 -0
- /package/dist/src/projection/{shared → order}/order.js +0 -0
- /package/dist/src/projection/{shared → price}/price.d.ts +0 -0
- /package/dist/src/projection/{shared → price}/price.js +0 -0
- /package/dist/src/projection/{shared → subscription}/subscription.d.ts +0 -0
- /package/dist/src/projection/{shared → subscription}/subscription.js +0 -0
- /package/src/projection/{shared → customer}/customer.ts +0 -0
- /package/src/projection/{shared → order}/order.ts +0 -0
- /package/src/projection/{shared → price}/price.ts +0 -0
- /package/src/projection/{shared → subscription}/subscription.ts +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { fireEvent, RenderAPI } from "@testing-library/react-native";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
3
4
|
import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
|
|
4
5
|
import { CheckoutItemProductVariantProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
5
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
6
6
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
7
7
|
import { render } from "../../../../test/render";
|
|
8
8
|
import { ItemActions } from "./ItemActions";
|
|
@@ -2,10 +2,10 @@ import React, { FC, useCallback, useMemo, useState } from "react";
|
|
|
2
2
|
import { LayoutRectangle, View } from "react-native";
|
|
3
3
|
import { Button, BUTTON_VARIANT } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
5
6
|
import { Sticky } from "@lookiero/sty-psp-ui";
|
|
6
7
|
import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
|
|
7
|
-
import {
|
|
8
|
-
import { size } from "../../../../../../projection/shared/size";
|
|
8
|
+
import { size } from "../../../../../../projection/size/size";
|
|
9
9
|
import { Body } from "../../../../components/layouts/body/Body";
|
|
10
10
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
11
11
|
import { SelectModal } from "../selectModal/SelectModal";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
2
3
|
import { Currency } from "../../../../../../domain/checkoutItem/model/currency";
|
|
3
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
4
4
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
5
5
|
import { render } from "../../../../test/render";
|
|
6
6
|
import { ProductVariantDescription } from "./ProductVariantDescription";
|
|
@@ -2,10 +2,10 @@ import React, { FC } from "react";
|
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { COLOR, Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
5
6
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { size, SizeProjection } from "../../../../../../projection/shared/size";
|
|
7
|
+
import { PriceProjection } from "../../../../../../projection/price/price";
|
|
8
|
+
import { SizeProjection, size } from "../../../../../../projection/size/size";
|
|
9
9
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
10
10
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
11
11
|
import { style } from "./ProductVariantDescription.style";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { fireEvent, RenderAPI } from "@testing-library/react-native";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CommandStatus } from "@lookiero/messaging-react";
|
|
4
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
4
5
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
5
6
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
7
7
|
import { useResetCheckoutItem } from "../../../../../domain/checkoutItem/react/useResetCheckoutItem";
|
|
8
8
|
import { checkoutItem } from "../../../../../projection/checkoutItem/checkoutItem.mock";
|
|
9
9
|
import { returnQuestions as mockReturnQuestions } from "../../../../../projection/returnQuestion/returnQuestions.mock";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { fireEvent, RenderAPI, within } from "@testing-library/react-native";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CommandStatus } from "@lookiero/messaging-react";
|
|
4
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
4
5
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
5
6
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
7
|
import { BookedProductsVariantsProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
|
|
7
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
8
8
|
import { useKeepCheckoutItem } from "../../../../../domain/checkoutItem/react/useKeepCheckoutItem";
|
|
9
9
|
import { useReplaceCheckoutItem } from "../../../../../domain/checkoutItem/react/useReplaceCheckoutItem";
|
|
10
10
|
import { bookedProductsVariants as mockBookedProductsVariants } from "../../../../../projection/bookedProductsVariants/bookedProductsVariants.mock";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RenderAPI, fireEvent } from "@testing-library/react-native";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
3
4
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
4
5
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
5
6
|
import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
|
|
6
7
|
import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
7
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
8
8
|
import { checkoutItem } from "../../../../../projection/checkoutItem/checkoutItem.mock";
|
|
9
9
|
import { render } from "../../../../test/render";
|
|
10
10
|
import { ProductVariant } from "./ProductVariant";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC, ReactNode, useCallback, useEffect } from "react";
|
|
2
2
|
import { StyleProp, View, ViewStyle } from "react-native";
|
|
3
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
3
4
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
4
5
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
5
6
|
import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
|
|
@@ -8,7 +9,6 @@ import {
|
|
|
8
9
|
MediaPerspective,
|
|
9
10
|
MediaProjection,
|
|
10
11
|
} from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
11
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
12
12
|
import { TrackingPage } from "../../../../../tracking/tracking";
|
|
13
13
|
import { useTrackImageView } from "../../../../../tracking/useTrackImageView";
|
|
14
14
|
import { ProductVariantDescription } from "../../components/productVariantDescription/ProductVariantDescription";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Currency } from "../../../../../../domain/checkoutItem/model/currency";
|
|
3
|
-
import { PriceProjection } from "../../../../../../projection/
|
|
3
|
+
import { PriceProjection } from "../../../../../../projection/price/price";
|
|
4
4
|
import { render } from "../../../../test/render";
|
|
5
5
|
import { Price } from "./Price";
|
|
6
6
|
|
|
@@ -2,7 +2,7 @@ import React, { FC } from "react";
|
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nNumber } from "@lookiero/i18n-react";
|
|
5
|
-
import { PriceProjection } from "../../../../../../projection/
|
|
5
|
+
import { PriceProjection } from "../../../../../../projection/price/price";
|
|
6
6
|
import { style } from "./Price.style";
|
|
7
7
|
|
|
8
8
|
interface PriceProps {
|
|
@@ -2,10 +2,10 @@ import React, { FC } from "react";
|
|
|
2
2
|
import { Image } from "react-native";
|
|
3
3
|
import { COLOR, Text, View, useDevice } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
5
6
|
import { Column, Row } from "@lookiero/sty-psp-ui";
|
|
6
7
|
import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
7
|
-
import {
|
|
8
|
-
import { size } from "../../../../../../projection/shared/size";
|
|
8
|
+
import { size } from "../../../../../../projection/size/size";
|
|
9
9
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
10
10
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
11
11
|
import { Price } from "../price/Price";
|
package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx
CHANGED
|
@@ -5,13 +5,13 @@ import { generatePath, useNavigate } from "react-router-native";
|
|
|
5
5
|
import { Box, Button, Layout as AuroraLayout, Spinner, Text, View, useDevice } from "@lookiero/aurora";
|
|
6
6
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
7
7
|
import { CommandStatus } from "@lookiero/messaging-react";
|
|
8
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
8
9
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
9
10
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
10
11
|
import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
|
|
11
12
|
import { CheckoutProjection } from "../../../../../../projection/checkout/checkout";
|
|
12
13
|
import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
13
14
|
import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion";
|
|
14
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
15
15
|
import { useReturnCheckoutItem } from "../../../../../domain/checkoutItem/react/useReturnCheckoutItem";
|
|
16
16
|
import { useListReturnQuestionsByCheckoutItemId } from "../../../../../projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId";
|
|
17
17
|
import { TrackingPage } from "../../../../../tracking/tracking";
|
package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.test.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { fireEvent } from "@testing-library/react-native";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
3
4
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
4
5
|
import { Currency } from "../../../../../../domain/checkoutItem/model/currency";
|
|
5
6
|
import { ColorProjection, MediaPerspective } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
6
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
7
7
|
import { COLOR_I18N_PREFIX, I18nMessages } from "../../../../i18n/i18n";
|
|
8
8
|
import { render } from "../../../../test/render";
|
|
9
9
|
import { ProductVariant } from "./ProductVariant";
|
|
@@ -2,11 +2,11 @@ import React, { FC } from "react";
|
|
|
2
2
|
import { Image, ImageStyle, Pressable, StyleProp, View } from "react-native";
|
|
3
3
|
import { COLOR, Icon, Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
5
6
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
7
|
import { ColorProjection, MediaProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { SizeProjection, size } from "../../../../../../projection/shared/size";
|
|
8
|
+
import { PriceProjection } from "../../../../../../projection/price/price";
|
|
9
|
+
import { size, SizeProjection } from "../../../../../../projection/size/size";
|
|
10
10
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
11
11
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
12
12
|
import { COLOR_I18N_PREFIX, I18nMessages } from "../../../../i18n/i18n";
|
|
@@ -2,10 +2,10 @@ import { fireEvent } from "@testing-library/react-native";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Text } from "react-native";
|
|
4
4
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
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";
|
|
8
|
-
import { Country } from "../../../../projection/shared/country";
|
|
9
9
|
import { checkout } from "../../../projection/checkout/checkout.mock";
|
|
10
10
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
11
11
|
import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { fireEvent, waitFor } from "@testing-library/react-native";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
4
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
4
5
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
5
6
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
|
-
import { Country } from "../../../../projection/shared/country";
|
|
7
7
|
import { checkout } from "../../../projection/checkout/checkout.mock";
|
|
8
8
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
9
9
|
import { render } from "../../test/render";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { fireEvent } from "@testing-library/react-native";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
3
4
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
4
5
|
import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
5
|
-
import { Country } from "../../../../../../projection/shared/country";
|
|
6
6
|
import { checkoutItem } from "../../../../../projection/checkoutItem/checkoutItem.mock";
|
|
7
7
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
8
8
|
import { render } from "../../../../test/render";
|
package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx
CHANGED
|
@@ -2,14 +2,14 @@ import React, { FC, useCallback, useMemo } from "react";
|
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { Text, useDevice } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { Country } from "@lookiero/sty-psp-locale";
|
|
5
6
|
import { RenderItemFunction, Tabs } from "@lookiero/sty-psp-ui";
|
|
6
7
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
7
8
|
import {
|
|
8
9
|
CheckoutItemProductVariantProjection,
|
|
9
10
|
CheckoutItemProjection,
|
|
10
11
|
} from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
11
|
-
import {
|
|
12
|
-
import { PriceProjection } from "../../../../../../projection/shared/price";
|
|
12
|
+
import { PriceProjection } from "../../../../../../projection/price/price";
|
|
13
13
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
14
14
|
import { ProductVariant, ProductVariantStyle } from "../../../shared/components/productVariant/ProductVariant";
|
|
15
15
|
import { style } from "./CheckoutItemsTabs.style";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CheckoutItemStatus } from "../../domain/checkoutItem/model/checkoutItem";
|
|
2
2
|
import { FeedbackProjection } from "../feedback/feedback";
|
|
3
|
-
import { PriceProjection } from "../
|
|
4
|
-
import { SizeProjection } from "../
|
|
3
|
+
import { PriceProjection } from "../price/price";
|
|
4
|
+
import { SizeProjection } from "../size/size";
|
|
5
5
|
|
|
6
6
|
enum MediaPerspective {
|
|
7
7
|
BACK = "BACK",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { FC, useCallback, useState } from "react";
|
|
2
2
|
import { StyleProp, TextStyle, View, ViewStyle } from "react-native";
|
|
3
3
|
import { COLOR, Icon, IconName, Input, InputProperties } from "@lookiero/aurora";
|
|
4
|
-
import { theme } from "@lookiero/sty-psp-ui";
|
|
5
|
-
import { Error, ErrorStyle } from "../../atoms/error/Error";
|
|
4
|
+
import { Error, ErrorStyle, theme } from "@lookiero/sty-psp-ui";
|
|
6
5
|
import { Field, FieldStyle } from "../../atoms/field/Field";
|
|
7
6
|
import { style } from "./InputField.style";
|
|
8
7
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { UseQueryFunctionResult } from "@lookiero/messaging-react";
|
|
2
|
-
import { IsCheckoutAccessibleByCustomerIdProjection } from "../../../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
|
|
3
|
-
interface UseViewIsCheckoutAccessibleByCustomerIdFunctionArgs {
|
|
4
|
-
readonly customerId: string | undefined;
|
|
5
|
-
}
|
|
6
|
-
interface UseViewIsCheckoutAccessibleByCustomerIdFunction {
|
|
7
|
-
(args: UseViewIsCheckoutAccessibleByCustomerIdFunctionArgs): UseQueryFunctionResult<IsCheckoutAccessibleByCustomerIdProjection>;
|
|
8
|
-
}
|
|
9
|
-
declare const useViewIsCheckoutAccessibleByCustomerId: UseViewIsCheckoutAccessibleByCustomerIdFunction;
|
|
10
|
-
export { useViewIsCheckoutAccessibleByCustomerId };
|
package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { useQuery } from "@lookiero/messaging-react";
|
|
2
|
-
import { isCheckoutFeedbackGiven } from "../../../../domain/checkoutFeedback/model/checkoutFeedbackGiven";
|
|
3
|
-
import { viewIsCheckoutAccessibleByCustomerId, } from "../../../../projection/checkout/viewIsCheckoutAccessibleByCustomerId";
|
|
4
|
-
import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
5
|
-
const useViewIsCheckoutAccessibleByCustomerId = ({ customerId }) => useQuery({
|
|
6
|
-
query: viewIsCheckoutAccessibleByCustomerId({ customerId }),
|
|
7
|
-
contextId: MESSAGING_CONTEXT_ID,
|
|
8
|
-
invalidation: isCheckoutFeedbackGiven,
|
|
9
|
-
options: {
|
|
10
|
-
refetchOnMount: "always",
|
|
11
|
-
staleTime: Infinity,
|
|
12
|
-
retry: false,
|
|
13
|
-
refetchOnWindowFocus: false,
|
|
14
|
-
cacheTime: 0,
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
export { useViewIsCheckoutAccessibleByCustomerId };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode, RefObject } from "react";
|
|
2
|
-
import { LayoutChangeEvent, ScrollView, StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
interface LayoutStyle {
|
|
4
|
-
readonly safeAreaView: StyleProp<ViewStyle>;
|
|
5
|
-
readonly scrollView: StyleProp<ViewStyle>;
|
|
6
|
-
readonly header: StyleProp<ViewStyle>;
|
|
7
|
-
}
|
|
8
|
-
interface LayoutProps {
|
|
9
|
-
readonly children: ReactNode;
|
|
10
|
-
readonly header?: JSX.Element | null;
|
|
11
|
-
readonly footer?: JSX.Element | null;
|
|
12
|
-
readonly panel?: JSX.Element | null;
|
|
13
|
-
readonly stickyHeader?: boolean;
|
|
14
|
-
readonly stickyHeaderHiddenOnScroll?: boolean;
|
|
15
|
-
readonly scrollRef?: RefObject<ScrollView>;
|
|
16
|
-
readonly scrollEnabled?: boolean;
|
|
17
|
-
readonly style?: Partial<LayoutStyle>;
|
|
18
|
-
readonly onLayout?: (event: LayoutChangeEvent) => void;
|
|
19
|
-
}
|
|
20
|
-
type Layout = FC<LayoutProps>;
|
|
21
|
-
export type { Layout };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Platform, StyleSheet } from "react-native";
|
|
2
|
-
import { HEADER_HEIGHT } from "../../../../templates/header/Header.style";
|
|
3
|
-
const style = StyleSheet.create({
|
|
4
|
-
header: {
|
|
5
|
-
...Platform.select({
|
|
6
|
-
web: {
|
|
7
|
-
position: "sticky",
|
|
8
|
-
top: 0,
|
|
9
|
-
zIndex: 10,
|
|
10
|
-
height: HEADER_HEIGHT,
|
|
11
|
-
},
|
|
12
|
-
native: {
|
|
13
|
-
position: "relative",
|
|
14
|
-
height: HEADER_HEIGHT,
|
|
15
|
-
},
|
|
16
|
-
}),
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
export { style };
|
|
@@ -1,18 +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
|
-
const DummyLayout = ({ children, header = React.createElement(DefaultHeader, null), footer = React.createElement(DefaultFooter, null), panel, style: customStyle, scrollEnabled, onLayout, }) => (React.createElement(SafeAreaView, { style: [style.safeAreaView, customStyle?.safeAreaView] },
|
|
12
|
-
React.createElement(GestureHandlerRootView, { style: { flex: 1 } },
|
|
13
|
-
React.createElement(RNGHScrollView, { contentContainerStyle: [style.scrollView, customStyle?.scrollView], scrollEnabled: scrollEnabled, scrollEventThrottle: 16, showsVerticalScrollIndicator: false, stickyHeaderIndices: [0] },
|
|
14
|
-
React.createElement(Header, null, header),
|
|
15
|
-
panel,
|
|
16
|
-
React.createElement(View, { style: style.children, onLayout: onLayout }, children))),
|
|
17
|
-
React.createElement(Footer, null, footer)));
|
|
18
|
-
export { DummyLayout };
|
package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js
DELETED
|
@@ -1,11 +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
|
-
const DefaultHeader = ({ onPressMenu }) => (React.createElement(Header, { testID: "default-header" },
|
|
8
|
-
React.createElement(Logo, null),
|
|
9
|
-
React.createElement(ButtonIconPlaceholder, null),
|
|
10
|
-
React.createElement(ButtonIcon, { name: "menu", style: style.button, testID: "menu-button-icon", onPress: onPressMenu })));
|
|
11
|
-
export { DefaultHeader };
|
package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
2
|
-
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const { space10 } = theme();
|
|
4
|
-
const style = StyleSheet.create({
|
|
5
|
-
button: {
|
|
6
|
-
alignSelf: "auto",
|
|
7
|
-
height: space10,
|
|
8
|
-
width: space10,
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
export { style };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode } from "react";
|
|
2
|
-
declare enum NewFeedbackExperimentVariation {
|
|
3
|
-
CONTROL = "control",
|
|
4
|
-
RETURN_PAGE = "return_page"
|
|
5
|
-
}
|
|
6
|
-
interface NewFeedbackExperimentProviderProps {
|
|
7
|
-
readonly children: ReactNode;
|
|
8
|
-
}
|
|
9
|
-
declare const NewFeedbackExperimentProvider: FC<NewFeedbackExperimentProviderProps>;
|
|
10
|
-
declare const useNewFeedbackExperiment: () => NewFeedbackExperimentVariation;
|
|
11
|
-
export { useNewFeedbackExperiment, NewFeedbackExperimentProvider, NewFeedbackExperimentVariation };
|
|
@@ -1,49 +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
|
-
var NewFeedbackExperimentVariation;
|
|
9
|
-
(function (NewFeedbackExperimentVariation) {
|
|
10
|
-
NewFeedbackExperimentVariation["CONTROL"] = "control";
|
|
11
|
-
NewFeedbackExperimentVariation["RETURN_PAGE"] = "return_page";
|
|
12
|
-
})(NewFeedbackExperimentVariation || (NewFeedbackExperimentVariation = {}));
|
|
13
|
-
const NewFeedbackExperimentContext = createContext(null);
|
|
14
|
-
const NewFeedbackExperimentProvider = ({ children }) => {
|
|
15
|
-
const { kameleoon: { experiments: { newFeedback: { id: newFeedbackId, variations }, }, }, customer: { customerId, country, segment }, } = useStaticInfo();
|
|
16
|
-
const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
17
|
-
const { assignedVariation: newFeedbackVariation } = useAssignedVariationByExperimentId({
|
|
18
|
-
experimentId: newFeedbackId,
|
|
19
|
-
});
|
|
20
|
-
const trackAssignedVariation = useTrackAssignedVariationByExperiment({
|
|
21
|
-
checkoutId: checkout?.id,
|
|
22
|
-
country,
|
|
23
|
-
segment,
|
|
24
|
-
experimentId: newFeedbackId,
|
|
25
|
-
});
|
|
26
|
-
const value = useMemo(() => ({
|
|
27
|
-
variation: newFeedbackVariation?.id === Number(variations.v1)
|
|
28
|
-
? NewFeedbackExperimentVariation.RETURN_PAGE
|
|
29
|
-
: NewFeedbackExperimentVariation.CONTROL,
|
|
30
|
-
}), [newFeedbackVariation?.id, variations.v1]);
|
|
31
|
-
const assignedVariantTracked = useRef(false);
|
|
32
|
-
useEffect(() => {
|
|
33
|
-
if (assignedVariantTracked.current || !newFeedbackVariation || !checkout?.id) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
trackAssignedVariation({ assignedVariation: newFeedbackVariation });
|
|
37
|
-
assignedVariantTracked.current = true;
|
|
38
|
-
}, [checkout?.id, newFeedbackVariation, trackAssignedVariation]);
|
|
39
|
-
if (!checkout) {
|
|
40
|
-
return React.createElement(Spinner, null);
|
|
41
|
-
}
|
|
42
|
-
return React.createElement(NewFeedbackExperimentContext.Provider, { value: value }, children);
|
|
43
|
-
};
|
|
44
|
-
const useNewFeedbackExperiment = () => {
|
|
45
|
-
const newFeedbackExperiment = useContext(NewFeedbackExperimentContext);
|
|
46
|
-
invariant(newFeedbackExperiment, "Your are trying to use the useNewFeedbackExperiment hook without wrapping your app with the <NewFeedbackExperimentProvider>.");
|
|
47
|
-
return newFeedbackExperiment.variation;
|
|
48
|
-
};
|
|
49
|
-
export { useNewFeedbackExperiment, NewFeedbackExperimentProvider, NewFeedbackExperimentVariation };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EndpointFunction, FetchTranslationFuction } from "@lookiero/i18n";
|
|
2
|
-
interface FetchTranslationsFuntionArgs {
|
|
3
|
-
readonly translations: EndpointFunction[];
|
|
4
|
-
}
|
|
5
|
-
interface FetchTranslationsFuntion {
|
|
6
|
-
(args: FetchTranslationsFuntionArgs): FetchTranslationFuction;
|
|
7
|
-
}
|
|
8
|
-
declare const fetchTranslations: FetchTranslationsFuntion;
|
|
9
|
-
export { fetchTranslations };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { fetchFetchTranslation } from "@lookiero/i18n";
|
|
2
|
-
const fetchTranslations = ({ translations }) => async ({ locale }) => {
|
|
3
|
-
const translationsMessages = await Promise.all(translations.map((endpoint) => fetchFetchTranslation({ endpoint })({ locale })));
|
|
4
|
-
return translationsMessages.reduce((acc, translationMessages) => ({
|
|
5
|
-
...acc,
|
|
6
|
-
...translationMessages,
|
|
7
|
-
}), {});
|
|
8
|
-
};
|
|
9
|
-
export { fetchTranslations };
|