@lookiero/checkout 9.12.0 → 9.13.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.js +2 -1
- package/dist/src/ExpoRoot.js +5 -4
- package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.js +2 -1
- package/dist/src/infrastructure/ui/components/atoms/price/Price.js +3 -0
- package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +2 -1
- 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 +3 -2
- 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 +3 -2
- 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/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/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/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/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/package.json +5 -6
- package/src/ExpoRoot.tsx +5 -4
- package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.tsx +3 -2
- package/src/infrastructure/ui/components/atoms/price/Price.tsx +3 -0
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +2 -1
- 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.tsx +3 -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.tsx +3 -2
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +2 -2
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +2 -2
- package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +2 -2
- 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.tsx +3 -3
- package/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.tsx +2 -2
- 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/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +11 -5
- package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +4 -4
- package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +3 -3
- package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +2 -2
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +4 -4
- package/src/infrastructure/ui/views/return/components/price/Price.tsx +3 -0
- package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +3 -3
- 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/summary/Summary.tsx +4 -4
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +3 -2
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +8 -6
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +5 -5
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
import React, { useCallback } from "react";
|
|
3
3
|
import { View } from "react-native";
|
|
4
4
|
import { Text } from "@lookiero/aurora";
|
|
5
|
-
import { useI18nMessage,
|
|
5
|
+
import { useI18nMessage, useI18n } from "@lookiero/i18n-react";
|
|
6
6
|
import { ReturnQuestionType } from "../../../../../../../projection/returnQuestion/returnQuestion.constants";
|
|
7
|
-
import { I18nMessages } from "../../../../../i18n/i18n";
|
|
7
|
+
import { DOMAIN, I18nMessages } from "../../../../../i18n/i18n";
|
|
8
8
|
import { useReturnQuestionFeedback } from "../../behaviors/useReturnQuestionFeedback";
|
|
9
9
|
import { feedbackForReturnQuestion } from "../../util/returnQuestionFeedback";
|
|
10
10
|
import { ReturnQuestionItem } from "../ReturnQuestionItem";
|
|
11
11
|
import { style } from "./ReturnQuestionFeedbackItem.style";
|
|
12
12
|
|
|
13
13
|
const ReturnQuestionFeedbackItem: ReturnQuestionItem<ReturnQuestionType.HOST_DEFAULT> = ({ returnQuestion }) => {
|
|
14
|
-
const titleText = useI18nMessage({ id: returnQuestion.translationKey });
|
|
15
|
-
const unansweredText = useI18nMessage({ id: I18nMessages.FEEDBACK_UNANSWERED });
|
|
14
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: returnQuestion.translationKey });
|
|
15
|
+
const unansweredText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.FEEDBACK_UNANSWERED });
|
|
16
16
|
|
|
17
17
|
const returnQuestionFeedback = useReturnQuestionFeedback();
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
20
20
|
const translate = useCallback(
|
|
21
|
-
(returnQuestionName: string) =>
|
|
22
|
-
[
|
|
21
|
+
(returnQuestionName: string) => formatMessage({ id: returnQuestionName, defaultMessage: returnQuestionName }),
|
|
22
|
+
[formatMessage],
|
|
23
23
|
);
|
|
24
24
|
const feedback = feedbackForReturnQuestion({ feedback: returnQuestionFeedback, returnQuestion, translate }).join(
|
|
25
25
|
" / ",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { View } from "@lookiero/aurora";
|
|
4
|
-
import {
|
|
4
|
+
import { useI18n } from "@lookiero/i18n-react";
|
|
5
5
|
import { InputField, TextInput } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { ReturnQuestionType } from "../../../../../../../projection/returnQuestion/returnQuestion.constants";
|
|
7
|
+
import { DOMAIN } from "../../../../../i18n/i18n";
|
|
7
8
|
import { useReturnQuestionFeedbackForReturnQuestion } from "../../behaviors/useReturnQuestionFeedback";
|
|
8
9
|
import { ReturnQuestionItem } from "../ReturnQuestionItem";
|
|
9
10
|
import { style } from "./TextareaReturnQuestionItem.style";
|
|
@@ -13,7 +14,7 @@ const TextareaReturnQuestionItem: ReturnQuestionItem<ReturnQuestionType.TEXTAREA
|
|
|
13
14
|
returnQuestionParent,
|
|
14
15
|
testID,
|
|
15
16
|
}) => {
|
|
16
|
-
const { formatMessage } =
|
|
17
|
+
const { formatMessage } = useI18n({ domain: DOMAIN });
|
|
17
18
|
|
|
18
19
|
const placeholderText = useMemo(
|
|
19
20
|
() => (returnQuestion.metadata.placeholder ? formatMessage({ id: returnQuestion.metadata.placeholder }) : ""),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FC } from "react";
|
|
2
2
|
import { ButtonIcon, Text } 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
|
import { Header } from "../Header";
|
|
6
6
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
7
7
|
import { style } from "./CheckoutHeader.style";
|
|
@@ -11,7 +11,7 @@ interface CheckoutHeaderProps {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
const CheckoutHeader: FC<CheckoutHeaderProps> = ({ onBack }) => {
|
|
14
|
-
const title = useI18nMessage({ id: I18nMessages.HEADER_COMPLETE_CHECKOUT_TITLE });
|
|
14
|
+
const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_COMPLETE_CHECKOUT_TITLE });
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<Header testID="checkout-header">
|
package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FC } from "react";
|
|
2
2
|
import { ButtonIcon, Text } 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
|
import { Header } from "../Header";
|
|
6
6
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
7
7
|
import { style } from "./ItemDetailHeader.style";
|
|
@@ -10,7 +10,7 @@ interface ItemDetailHeaderProps {
|
|
|
10
10
|
readonly onBack: () => void;
|
|
11
11
|
}
|
|
12
12
|
const ItemDetailHeader: FC<ItemDetailHeaderProps> = ({ onBack }) => {
|
|
13
|
-
const title = useI18nMessage({ id: I18nMessages.HEADER_CHECKOUT_TITLE });
|
|
13
|
+
const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_CHECKOUT_TITLE });
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<Header testID="item-detail-header">
|
|
@@ -4,7 +4,7 @@ import { generatePath, useNavigate } from "react-router-native";
|
|
|
4
4
|
import { ButtonIcon, Text } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
7
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
7
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
8
8
|
import { Routes } from "../../../../routing/routes";
|
|
9
9
|
import { useBasePath } from "../../../../routing/useBasePath";
|
|
10
10
|
import { Header } from "../Header";
|
|
@@ -34,7 +34,7 @@ interface ItemHeaderProps {
|
|
|
34
34
|
readonly onPrevious?: OnPreviousItemFunction;
|
|
35
35
|
}
|
|
36
36
|
const ItemHeader: FC<ItemHeaderProps> = ({ items, item, onNext, onPrevious }) => {
|
|
37
|
-
const title = useI18nMessage({ id: I18nMessages.HEADER_CHECKOUT_TITLE });
|
|
37
|
+
const title = useI18nMessage({ domain: DOMAIN, id: I18nMessages.HEADER_CHECKOUT_TITLE });
|
|
38
38
|
const itemIndex = items.indexOf(item);
|
|
39
39
|
const isFirstItem = itemIndex === 0;
|
|
40
40
|
const isLastItem = itemIndex === items.length - 1;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const DOMAIN = "CheckoutI18n";
|
|
2
|
+
|
|
1
3
|
// TODO: deprecated?
|
|
2
4
|
const COLOR_I18N_PREFIX = "catalog.color.";
|
|
3
5
|
|
|
@@ -58,4 +60,4 @@ enum I18nMessages {
|
|
|
58
60
|
CHECKOUT_TOAST_BOOKING_EXPIRED = "checkout.toast_booking_expired",
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
export { I18nMessages, COLOR_I18N_PREFIX };
|
|
63
|
+
export { DOMAIN, I18nMessages, COLOR_I18N_PREFIX };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { render, RenderAPI } from "@testing-library/react-native";
|
|
2
2
|
import { mock } from "jest-mock-extended";
|
|
3
3
|
import React, { FC, Fragment, ReactElement } from "react";
|
|
4
|
-
import { IntlProvider } from "react-intl";
|
|
5
4
|
import { Aurora } from "@lookiero/aurora";
|
|
5
|
+
import { createI18nProvider } from "@lookiero/i18n-react";
|
|
6
6
|
import { TranslationMessages } from "@lookiero/i18n/domain/translation/model/translationMessages";
|
|
7
7
|
import { Logger, LoggerProvider } from "@lookiero/sty-psp-logging";
|
|
8
|
+
import { DOMAIN } from "../i18n/i18n";
|
|
8
9
|
import { BasePathProvider } from "../routing/useBasePath";
|
|
9
10
|
|
|
11
|
+
const I18nProvider = createI18nProvider({ domain: DOMAIN });
|
|
12
|
+
|
|
10
13
|
interface RenderArgs {
|
|
11
14
|
readonly locale?: string;
|
|
12
15
|
readonly messages?: TranslationMessages;
|
|
@@ -24,13 +27,13 @@ const renderWrapper: RenderWrapperFunction =
|
|
|
24
27
|
// eslint-disable-next-line react/display-name, react/prop-types
|
|
25
28
|
({ children }) => (
|
|
26
29
|
<Aurora>
|
|
27
|
-
<
|
|
30
|
+
<I18nProvider locale={locale as string} messages={messages} onError={() => void 0}>
|
|
28
31
|
<LoggerProvider logger={logger}>
|
|
29
32
|
<BasePathProvider basePath="">
|
|
30
33
|
<Wrapper>{children}</Wrapper>
|
|
31
34
|
</BasePathProvider>
|
|
32
35
|
</LoggerProvider>
|
|
33
|
-
</
|
|
36
|
+
</I18nProvider>
|
|
34
37
|
</Aurora>
|
|
35
38
|
);
|
|
36
39
|
|
|
@@ -6,6 +6,7 @@ import { PortalProvider as AuroraPortalProvider } from "@lookiero/aurora";
|
|
|
6
6
|
import { Notifications } from "@lookiero/sty-psp-notifications";
|
|
7
7
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
8
8
|
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
9
|
+
import { DOMAIN } from "../i18n/i18n";
|
|
9
10
|
|
|
10
11
|
const { colorBgBase } = theme();
|
|
11
12
|
|
|
@@ -17,7 +18,7 @@ const App: FC<AppProps> = ({ children }) => (
|
|
|
17
18
|
<SafeAreaProvider>
|
|
18
19
|
<PortalProvider rootHostName="Checkout">
|
|
19
20
|
<StatusBar backgroundColor={colorBgBase} barStyle="dark-content" translucent />
|
|
20
|
-
<Notifications contextId={MESSAGING_CONTEXT_ID} portalHostName="Checkout" />
|
|
21
|
+
<Notifications contextId={MESSAGING_CONTEXT_ID} domain={DOMAIN} portalHostName="Checkout" />
|
|
21
22
|
{/*
|
|
22
23
|
We are using the Aurora's PortalProvider at this level for notifications to work properly.
|
|
23
24
|
|
|
@@ -15,7 +15,7 @@ import { useTrackPressContinue } from "../../../tracking/useTrackPressContinue";
|
|
|
15
15
|
import { Body } from "../../components/layouts/body/Body";
|
|
16
16
|
import { CheckoutHeader } from "../../components/templates/header/checkoutHeader/CheckoutHeader";
|
|
17
17
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
18
|
-
import { I18nMessages } from "../../i18n/i18n";
|
|
18
|
+
import { DOMAIN, I18nMessages } from "../../i18n/i18n";
|
|
19
19
|
import { Routes } from "../../routing/routes";
|
|
20
20
|
import { useBasePath } from "../../routing/useBasePath";
|
|
21
21
|
import { ProductVariant } from "../shared/components/productVariant/ProductVariant";
|
|
@@ -34,8 +34,8 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: Layout, useRedirect })
|
|
|
34
34
|
const {
|
|
35
35
|
customer: { customerId, country, segment },
|
|
36
36
|
} = useStaticInfo();
|
|
37
|
-
const titleText = useI18nMessage({ id: I18nMessages.CHECKOUT_TITLE });
|
|
38
|
-
const submitButtonText = useI18nMessage({ id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
37
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_TITLE });
|
|
38
|
+
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
39
39
|
const { screen } = useDevice();
|
|
40
40
|
const [pricingHeight, setPricingHeight] = useState(0);
|
|
41
41
|
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
|
|
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}>
|
|
@@ -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
|
() =>
|
|
@@ -7,7 +7,7 @@ import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
|
7
7
|
import { PriceProjection } from "../../../../../../projection/price/price";
|
|
8
8
|
import { SizeProjection, size } from "../../../../../../projection/size/size";
|
|
9
9
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
10
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
10
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
11
11
|
import { style } from "./ProductVariantDescription.style";
|
|
12
12
|
|
|
13
13
|
interface ProductVariantDescriptionProps {
|
|
@@ -24,8 +24,8 @@ const ProductVariantDescription: FC<ProductVariantDescriptionProps> = ({
|
|
|
24
24
|
size: sizeProjection,
|
|
25
25
|
country,
|
|
26
26
|
}) => {
|
|
27
|
-
const sizeText = useI18nMessage({ id: I18nMessages.ITEM_SIZE });
|
|
28
|
-
const uniqueText = useI18nMessage({ id: I18nMessages.ITEM_UNIQUE });
|
|
27
|
+
const sizeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_SIZE });
|
|
28
|
+
const uniqueText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_UNIQUE });
|
|
29
29
|
const screenDevice = useScreenSize();
|
|
30
30
|
const isDesktopScreen = screenDevice !== "S";
|
|
31
31
|
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "../../../../components/organisms/returnQuestions/behaviors/useReturnQuestionItem";
|
|
12
12
|
import { HostDefaultReturnQuestionFeedbackItem } from "../../../../components/organisms/returnQuestions/components/hostDefaultReturnQuestionFeedbackItem/HostDefaultReturnQuestionFeedbackItem";
|
|
13
13
|
import { ReturnQuestionFeedbackItem } from "../../../../components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem";
|
|
14
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
14
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
15
15
|
import { style } from "./ReturnQuestionsFeedback.style";
|
|
16
16
|
|
|
17
17
|
const returnQuestionItems: ReturnQuestionItems = {
|
|
@@ -29,7 +29,7 @@ interface ReturnQuestionsFeedbackProps {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
const ReturnQuestionsFeedback: FC<ReturnQuestionsFeedbackProps> = ({ returnQuestions, onEditFeedback }) => {
|
|
32
|
-
const titleText = useI18nMessage({ id: I18nMessages.FEEDBACK_TITLE });
|
|
32
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.FEEDBACK_TITLE });
|
|
33
33
|
|
|
34
34
|
return (
|
|
35
35
|
<View>
|
package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { View } from "react-native";
|
|
|
3
3
|
import { Button, Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { Modal } from "@lookiero/sty-psp-ui";
|
|
6
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
6
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
7
7
|
import { style } from "./SizeWithoutStockModal.style";
|
|
8
8
|
|
|
9
9
|
interface SizeWithoutStockModalProps {
|
|
@@ -11,9 +11,9 @@ interface SizeWithoutStockModalProps {
|
|
|
11
11
|
readonly onDismiss: () => void;
|
|
12
12
|
}
|
|
13
13
|
const SizeWithoutStockModal: FC<SizeWithoutStockModalProps> = ({ visible, onDismiss }) => {
|
|
14
|
-
const titleText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_TITLE });
|
|
15
|
-
const descriptionText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION });
|
|
16
|
-
const buttonText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
|
|
14
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_TITLE });
|
|
15
|
+
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_DESCRIPTION });
|
|
16
|
+
const buttonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<Modal portalHostName="Checkout" visible={visible} showCloseButton onClose={onDismiss}>
|
|
@@ -3,6 +3,7 @@ import { View } from "react-native";
|
|
|
3
3
|
import { Text } from "@lookiero/aurora";
|
|
4
4
|
import { useI18nNumber } from "@lookiero/i18n-react";
|
|
5
5
|
import { PriceProjection } from "../../../../../../projection/price/price";
|
|
6
|
+
import { DOMAIN } from "../../../../i18n/i18n";
|
|
6
7
|
import { style } from "./Price.style";
|
|
7
8
|
|
|
8
9
|
interface PriceProps {
|
|
@@ -12,11 +13,13 @@ interface PriceProps {
|
|
|
12
13
|
const Price: FC<PriceProps> = ({ price, withPercentage = false }) => {
|
|
13
14
|
const isDiscounted = price.discountedPrice && price.discountedPrice.percentage > 0;
|
|
14
15
|
const productPrice = useI18nNumber({
|
|
16
|
+
domain: DOMAIN,
|
|
15
17
|
value: price.amount / 100,
|
|
16
18
|
style: "currency",
|
|
17
19
|
currency: price.currency,
|
|
18
20
|
});
|
|
19
21
|
const productDiscountedPrice = useI18nNumber({
|
|
22
|
+
domain: DOMAIN,
|
|
20
23
|
value: (price.discountedPrice?.amount || 0) / 100,
|
|
21
24
|
style: "currency",
|
|
22
25
|
currency: price.currency,
|
|
@@ -7,7 +7,7 @@ import { Column, Row } from "@lookiero/sty-psp-ui";
|
|
|
7
7
|
import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
8
8
|
import { size } from "../../../../../../projection/size/size";
|
|
9
9
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
10
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
10
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
11
11
|
import { Price } from "../price/Price";
|
|
12
12
|
import { IMAGE_SIZE, style } from "./ProductVariantPreview.style";
|
|
13
13
|
|
|
@@ -20,8 +20,8 @@ const ProductVariantPreview: FC<ProductVariantPreviewProps> = ({ item, country }
|
|
|
20
20
|
const cdnImageUrl = useMediaImage();
|
|
21
21
|
const { screen } = useDevice();
|
|
22
22
|
|
|
23
|
-
const sizeText = useI18nMessage({ id: I18nMessages.ITEM_SIZE });
|
|
24
|
-
const uniqueText = useI18nMessage({ id: I18nMessages.ITEM_UNIQUE });
|
|
23
|
+
const sizeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_SIZE });
|
|
24
|
+
const uniqueText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_UNIQUE });
|
|
25
25
|
|
|
26
26
|
const {
|
|
27
27
|
productVariant: { media, brand, name, size: sizeProjection },
|
package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx
CHANGED
|
@@ -32,7 +32,7 @@ import { HostStackReturnQuestionItem } from "../../../../components/organisms/re
|
|
|
32
32
|
import { RadioReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem";
|
|
33
33
|
import { TextareaReturnQuestionItem } from "../../../../components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem";
|
|
34
34
|
import { ItemDetailHeader } from "../../../../components/templates/header/itemDetailHeader/ItemDetailHeader";
|
|
35
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
35
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
36
36
|
import { Routes } from "../../../../routing/routes";
|
|
37
37
|
import { useBasePath } from "../../../../routing/useBasePath";
|
|
38
38
|
import { ProductVariantPreview } from "../productVariantPreview/ProductVariantPreview";
|
|
@@ -70,9 +70,9 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
|
|
|
70
70
|
|
|
71
71
|
const { screen } = useDevice();
|
|
72
72
|
|
|
73
|
-
const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
|
|
74
|
-
const descriptionText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
|
|
75
|
-
const submitButtonText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
|
|
73
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_TITLE });
|
|
74
|
+
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
|
|
75
|
+
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
|
|
76
76
|
|
|
77
77
|
const feedback = useReturnQuestionFeedback();
|
|
78
78
|
const [returnQuestions] = useListReturnQuestionsByCheckoutItemId({
|
|
@@ -10,7 +10,7 @@ import { PriceProjection } from "../../../../../../projection/price/price";
|
|
|
10
10
|
import { size, SizeProjection } from "../../../../../../projection/size/size";
|
|
11
11
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
12
12
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
13
|
-
import { COLOR_I18N_PREFIX, I18nMessages } from "../../../../i18n/i18n";
|
|
13
|
+
import { COLOR_I18N_PREFIX, DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
14
14
|
import { IMAGE_WIDTH, style } from "./ProductVariant.style";
|
|
15
15
|
|
|
16
16
|
interface ProductVariantStyle {
|
|
@@ -41,9 +41,9 @@ const ProductVariant: FC<ProductVariantProps> = ({
|
|
|
41
41
|
style: customStyle,
|
|
42
42
|
onPress,
|
|
43
43
|
}) => {
|
|
44
|
-
const uniqueText = useI18nMessage({ id: I18nMessages.ITEM_UNIQUE });
|
|
45
|
-
const colorLabel = useI18nMessage({ id: color.name, prefix: COLOR_I18N_PREFIX });
|
|
46
|
-
const sizeChangeText = useI18nMessage({ id: I18nMessages.PRODUCT_VARIANT_SIZE_CHANGE });
|
|
44
|
+
const uniqueText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.ITEM_UNIQUE });
|
|
45
|
+
const colorLabel = useI18nMessage({ domain: DOMAIN, id: color.name, prefix: COLOR_I18N_PREFIX });
|
|
46
|
+
const sizeChangeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.PRODUCT_VARIANT_SIZE_CHANGE });
|
|
47
47
|
|
|
48
48
|
const cdnImageUrl = useMediaImage();
|
|
49
49
|
|
|
@@ -16,7 +16,7 @@ import { useTrackPressPricing } from "../../../tracking/useTrackPressPricing";
|
|
|
16
16
|
import { FiveItemsDiscountBanner } from "../../components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner";
|
|
17
17
|
import { Body } from "../../components/layouts/body/Body";
|
|
18
18
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
19
|
-
import { I18nMessages } from "../../i18n/i18n";
|
|
19
|
+
import { DOMAIN, I18nMessages } from "../../i18n/i18n";
|
|
20
20
|
import { Routes } from "../../routing/routes";
|
|
21
21
|
import { useBasePath } from "../../routing/useBasePath";
|
|
22
22
|
import { style } from "./Summary.style";
|
|
@@ -33,9 +33,9 @@ const Summary: FC<SummaryProps> = ({ layout: Layout, children }) => {
|
|
|
33
33
|
} = useStaticInfo();
|
|
34
34
|
const [pricingCollapsed, setPricingCollapsed] = useState(true);
|
|
35
35
|
const [pricingHeight, setPricingHeight] = useState(0);
|
|
36
|
-
const titleText = useI18nMessage({ id: I18nMessages.SUMMARY_TITLE });
|
|
37
|
-
const descriptionText = useI18nMessage({ id: I18nMessages.SUMMARY_DESCRIPTION });
|
|
38
|
-
const submitButtonText = useI18nMessage({ id: I18nMessages.SUMMARY_SUBMIT_BUTTON });
|
|
36
|
+
const titleText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_TITLE });
|
|
37
|
+
const descriptionText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_DESCRIPTION });
|
|
38
|
+
const submitButtonText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_SUBMIT_BUTTON });
|
|
39
39
|
const { screen } = useDevice();
|
|
40
40
|
|
|
41
41
|
const [checkout] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { Button, Icon, Text } from "@lookiero/aurora";
|
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { PricingProjection } from "../../../../../../projection/pricing/pricing";
|
|
7
7
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
8
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
8
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
9
9
|
import { Pricing } from "../pricing/Pricing";
|
|
10
10
|
import { style } from "./CollapsiblePricing.style";
|
|
11
11
|
|
|
@@ -29,8 +29,9 @@ const CollapsiblePricing: FC<CollapsiblePricingProps> = ({
|
|
|
29
29
|
}) => {
|
|
30
30
|
const { pendingToPay } = pricing;
|
|
31
31
|
|
|
32
|
-
const totalText = useI18nMessage({ id: I18nMessages.SUMMARY_TOTAL });
|
|
32
|
+
const totalText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_TOTAL });
|
|
33
33
|
const totalCheckoutItemsKeptText = useI18nMessage({
|
|
34
|
+
domain: DOMAIN,
|
|
34
35
|
id: I18nMessages.SUMMARY_TOTAL_ITEMS_KEPT,
|
|
35
36
|
values: { items: totalCheckoutItemsKept.toString() },
|
|
36
37
|
});
|
|
@@ -4,7 +4,7 @@ import { Text } from "@lookiero/aurora";
|
|
|
4
4
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
5
|
import { PricingProjection } from "../../../../../../projection/pricing/pricing";
|
|
6
6
|
import { Price } from "../../../../components/atoms/price/Price";
|
|
7
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
7
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
8
8
|
import { style } from "./Pricing.style";
|
|
9
9
|
|
|
10
10
|
interface RowProps {
|
|
@@ -30,19 +30,21 @@ interface PricingProps {
|
|
|
30
30
|
const Pricing: FC<PricingProps> = ({ pricing, totalCheckoutItemsKept }) => {
|
|
31
31
|
const { pendingToPay, subtotal, balanceDiscount, discount, discountPercentage = 0, service } = pricing;
|
|
32
32
|
|
|
33
|
-
const totalText = useI18nMessage({ id: I18nMessages.SUMMARY_TOTAL });
|
|
33
|
+
const totalText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_TOTAL });
|
|
34
34
|
const totalCheckoutItemsKeptText = useI18nMessage({
|
|
35
|
+
domain: DOMAIN,
|
|
35
36
|
id: I18nMessages.SUMMARY_TOTAL_ITEMS_KEPT,
|
|
36
37
|
values: { items: totalCheckoutItemsKept.toString() },
|
|
37
38
|
});
|
|
38
|
-
const subtotalText = useI18nMessage({ id: I18nMessages.SUMMARY_SUBTOTAL });
|
|
39
|
-
const freeText = useI18nMessage({ id: I18nMessages.SUMMARY_FREE });
|
|
39
|
+
const subtotalText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_SUBTOTAL });
|
|
40
|
+
const freeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_FREE });
|
|
40
41
|
const discountText = useI18nMessage({
|
|
42
|
+
domain: DOMAIN,
|
|
41
43
|
id: I18nMessages.SUMMARY_DISCOUNT,
|
|
42
44
|
values: { discount: discountPercentage?.toString() },
|
|
43
45
|
});
|
|
44
|
-
const creditText = useI18nMessage({ id: I18nMessages.SUMMARY_CREDIT });
|
|
45
|
-
const feeText = useI18nMessage({ id: I18nMessages.SUMMARY_FEE });
|
|
46
|
+
const creditText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_CREDIT });
|
|
47
|
+
const feeText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_FEE });
|
|
46
48
|
|
|
47
49
|
return (
|
|
48
50
|
<View>
|
package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
CheckoutItemProjection,
|
|
11
11
|
} from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
12
12
|
import { PriceProjection } from "../../../../../../projection/price/price";
|
|
13
|
-
import { I18nMessages } from "../../../../i18n/i18n";
|
|
13
|
+
import { DOMAIN, I18nMessages } from "../../../../i18n/i18n";
|
|
14
14
|
import { ProductVariant, ProductVariantStyle } from "../../../shared/components/productVariant/ProductVariant";
|
|
15
15
|
import { style } from "./CheckoutItemsTabs.style";
|
|
16
16
|
|
|
@@ -65,11 +65,11 @@ const CheckoutItemsTabs: FC<CheckoutItemsTabsProps> = ({
|
|
|
65
65
|
onChanged,
|
|
66
66
|
}) => {
|
|
67
67
|
const { screen } = useDevice();
|
|
68
|
-
const keepTabText = useI18nMessage({ id: I18nMessages.SUMMARY_KEEP_TAB });
|
|
69
|
-
const returnTabText = useI18nMessage({ id: I18nMessages.SUMMARY_RETURN_TAB });
|
|
68
|
+
const keepTabText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_KEEP_TAB });
|
|
69
|
+
const returnTabText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_RETURN_TAB });
|
|
70
70
|
|
|
71
|
-
const keepEmptyText = useI18nMessage({ id: I18nMessages.SUMMARY_KEEP_EMPTY });
|
|
72
|
-
const returnEmptyText = useI18nMessage({ id: I18nMessages.SUMMARY_RETURN_EMPTY });
|
|
71
|
+
const keepEmptyText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_KEEP_EMPTY });
|
|
72
|
+
const returnEmptyText = useI18nMessage({ domain: DOMAIN, id: I18nMessages.SUMMARY_RETURN_EMPTY });
|
|
73
73
|
|
|
74
74
|
const handleOnPressItem = useCallback((checkoutItemId: string) => onPressItem(checkoutItemId), [onPressItem]);
|
|
75
75
|
|