@lookiero/checkout 3.8.0-beta.13 → 3.8.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/domain/checkoutBooking/event/createNotificationWhenCheckoutBookingExpired.d.ts +6 -0
- package/dist/domain/checkoutBooking/event/createNotificationWhenCheckoutBookingExpired.js +13 -0
- package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.d.ts +10 -0
- package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.js +11 -0
- package/dist/infrastructure/projection/checkout/checkout.js +0 -14
- package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.d.ts +6 -0
- package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.js +7 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.d.ts +6 -0
- package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.js +9 -0
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.js +1 -1
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/components/CheckoutQuestionItem.d.ts +1 -0
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.js +3 -3
- package/dist/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +1 -0
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.d.ts +13 -0
- package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.js +19 -0
- package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.style.ts.d.ts +6 -0
- package/dist/infrastructure/ui/components/templates/SafeAreaScrollView.style.ts.js +7 -0
- package/dist/infrastructure/ui/components/templates/header/header/Header.d.ts +3 -0
- package/dist/infrastructure/ui/components/templates/header/header/Header.js +10 -0
- package/dist/infrastructure/ui/components/templates/header/header/Header.style.d.ts +9 -0
- package/dist/infrastructure/ui/components/templates/header/header/Header.style.js +12 -0
- package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.d.ts +13 -0
- package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.js +19 -0
- package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.style.ts.d.ts +6 -0
- package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.style.ts.js +7 -0
- package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.d.ts +2 -0
- package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.js +28 -0
- package/dist/infrastructure/ui/hooks/useToast.d.ts +11 -0
- package/dist/infrastructure/ui/hooks/useToast.js +49 -0
- package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.d.ts +7 -0
- package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.js +25 -0
- package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.style.d.ts +16 -0
- package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.style.js +19 -0
- package/dist/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +1 -1
- package/dist/infrastructure/ui/views/intro/Intro.d.ts +6 -0
- package/dist/infrastructure/ui/views/intro/Intro.js +52 -0
- package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +52 -0
- package/dist/infrastructure/ui/views/intro/Intro.style.js +55 -0
- package/dist/infrastructure/ui/views/item/Item.style.d.ts +15 -0
- package/dist/infrastructure/ui/views/item/Item.style.js +18 -0
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +6 -4
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +10 -3
- package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +10 -3
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.js +4 -3
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.d.ts +3 -0
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.style.js +3 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.d.ts +26 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.js +44 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.d.ts +45 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.js +53 -0
- package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js +10 -9
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.d.ts +1 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.style.js +1 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +3 -2
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +3 -0
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +3 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.d.ts +7 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.js +25 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.d.ts +16 -0
- package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.js +19 -0
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +4 -3
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.d.ts +10 -3
- package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.style.js +10 -3
- package/dist/infrastructure/ui/views/item/views/productVariant/ProductVariant.style.d.ts +1 -0
- package/dist/infrastructure/ui/views/item/views/productVariant/ProductVariant.style.js +2 -1
- package/dist/infrastructure/ui/views/navigation/Navigation.d.ts +21 -0
- package/dist/infrastructure/ui/views/navigation/Navigation.js +45 -0
- package/dist/infrastructure/ui/views/navigation/Navigation.style.d.ts +5 -0
- package/dist/infrastructure/ui/views/navigation/Navigation.style.js +30 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Header.d.ts +46 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Header.js +120 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Header.style.d.ts +31 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Header.style.js +34 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Logo.d.ts +7 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Logo.js +11 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Logo.style.d.ts +7 -0
- package/dist/infrastructure/ui/views/navigation/components/header/Logo.style.js +8 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.d.ts +12 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.js +24 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.d.ts +15 -0
- package/dist/infrastructure/ui/views/summary/components/checkoutItemsTabs/CheckoutItemsTabs.style.js +18 -0
- package/dist/infrastructure/ui/views/summary/components/pricing/Pricing.js +8 -7
- package/dist/infrastructure/ui/views/summary/components/pricing/Pricing.style.d.ts +6 -0
- package/dist/infrastructure/ui/views/summary/components/pricing/Pricing.style.js +6 -0
- package/dist/shared/notifications/domain/notification/command/createNotification.d.ts +17 -0
- package/dist/shared/notifications/domain/notification/command/createNotification.js +7 -0
- package/dist/shared/notifications/infrastructure/domain/notification/react/useCreateNotification.d.ts +21 -0
- package/dist/shared/notifications/infrastructure/domain/notification/react/useCreateNotification.js +22 -0
- package/dist/shared/notifications/infrastructure/ui/components/NotificationItem.d.ts +12 -0
- package/dist/shared/notifications/infrastructure/ui/components/NotificationItem.js +24 -0
- package/dist/shared/notifications/infrastructure/ui/components/Notifications.d.ts +9 -0
- package/dist/shared/notifications/infrastructure/ui/components/Notifications.js +20 -0
- package/dist/shared/notifications/infrastructure/ui/components/Notifications.style.d.ts +36 -0
- package/dist/shared/notifications/infrastructure/ui/components/Notifications.style.js +31 -0
- package/dist/shared/notifications/infrastructure/ui/components/modalNotifications/ModalNotificationItem.js +4 -3
- package/dist/shared/notifications/infrastructure/ui/components/modalNotifications/ModalNotificationItem.style.d.ts +10 -3
- package/dist/shared/notifications/infrastructure/ui/components/modalNotifications/ModalNotificationItem.style.js +10 -3
- package/dist/shared/tracking/infrastructure/usePageView.d.ts +13 -0
- package/dist/shared/tracking/infrastructure/usePageView.js +27 -0
- package/dist/shared/ui/components/atoms/error/Error.style.d.ts +6 -0
- package/dist/shared/ui/components/atoms/error/Error.style.js +9 -0
- package/dist/shared/ui/components/atoms/input/Input.js +2 -2
- package/dist/shared/ui/components/layouts/modal/Modal.js +1 -1
- package/dist/shared/ui/components/layouts/slider/Bullets.js +4 -3
- package/dist/shared/ui/components/molecules/selectField/SelectField.js +3 -3
- package/package.json +1 -7
- package/dist/infrastructure/ui/components/layouts/layout/dummyLayout/useScrollViewRef.d.ts +0 -15
- package/dist/infrastructure/ui/components/layouts/layout/dummyLayout/useScrollViewRef.js +0 -14
- package/dist/shared/ui/components/layouts/carousel/Carousel.d.ts +0 -11
- package/dist/shared/ui/components/layouts/carousel/Carousel.js +0 -31
- package/dist/shared/ui/components/layouts/carousel/Carousel.style.d.ts +0 -15
- package/dist/shared/ui/components/layouts/carousel/Carousel.style.js +0 -7
- package/dist/shared/ui/components/layouts/carousel/Carousel2.d.ts +0 -25
- package/dist/shared/ui/components/layouts/carousel/Carousel2.js +0 -69
- package/dist/shared/ui/components/layouts/carousel/DragComponent.d.ts +0 -3
- package/dist/shared/ui/components/layouts/carousel/DragComponent.js +0 -48
- package/dist/shared/ui/components/layouts/slider/Bullets2.d.ts +0 -10
- package/dist/shared/ui/components/layouts/slider/Bullets2.js +0 -30
- package/dist/shared/ui/components/layouts/slider/SliderDots.d.ts +0 -8
- package/dist/shared/ui/components/layouts/slider/SliderDots.js +0 -16
- package/dist/shared/ui/components/layouts/slider/SliderDots.style.d.ts +0 -12
- package/dist/shared/ui/components/layouts/slider/SliderDots.style.js +0 -15
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Button } from "@lookiero/aurora-next/build/components/atoms/Button/Button";
|
|
2
|
+
import { Icon } from "@lookiero/aurora-next/build/components/primitives/Icon/Icon";
|
|
3
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
4
|
+
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
|
+
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { Platform, View } from "react-native";
|
|
8
|
+
import { Spinner } from "../../../../shared/ui/components/atoms/spinner/Spinner";
|
|
9
|
+
import { useIncrementIntroShownCount } from "../../../domain/uiSetting/react/useIncrementIntroShownCount";
|
|
10
|
+
import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
|
|
11
|
+
import { Body } from "../../components/layouts/body/Body";
|
|
12
|
+
import { SafeAreaScrollView } from "../../components/templates/SafeAreaScrollView";
|
|
13
|
+
import { I18nMessages } from "../../i18n/i18n";
|
|
14
|
+
import { HEADER_HEIGHT } from "../navigation/components/header/Header.style";
|
|
15
|
+
import { style } from "./Intro.style";
|
|
16
|
+
const Bullet = ({ text }) => (React.createElement(View, { style: style.bullet },
|
|
17
|
+
React.createElement(Icon, { name: "rounded-tick", style: style.tickIcon }),
|
|
18
|
+
React.createElement(Text, { level: 2, detail: true }, text)));
|
|
19
|
+
const Intro = ({ customerId }) => {
|
|
20
|
+
const titleText = useI18nMessage({ id: I18nMessages.INTRO_TITLE });
|
|
21
|
+
const subTitleText = useI18nMessage({ id: I18nMessages.INTRO_SUBTITLE });
|
|
22
|
+
const discountText = useI18nMessage({ id: I18nMessages.INTRO_DISCOUNT });
|
|
23
|
+
const bulletOneText = useI18nMessage({ id: I18nMessages.INTRO_BULLET_ONE });
|
|
24
|
+
const bulletTwoText = useI18nMessage({ id: I18nMessages.INTRO_BULLET_TWO });
|
|
25
|
+
const bulletThreeText = useI18nMessage({ id: I18nMessages.INTRO_BULLET_THREE });
|
|
26
|
+
const buttonText = useI18nMessage({ id: I18nMessages.INTRO_BUTTON });
|
|
27
|
+
const [fiveItemsDiscount, fiveItemsDiscountStatus] = useViewFiveItemsDiscountByCustomerId({
|
|
28
|
+
customerId,
|
|
29
|
+
});
|
|
30
|
+
const [incrementIntroShownCount, incrementIntroShownCountStatus] = useIncrementIntroShownCount();
|
|
31
|
+
if (fiveItemsDiscountStatus === QueryStatus.LOADING)
|
|
32
|
+
return React.createElement(Spinner, null);
|
|
33
|
+
return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0 },
|
|
34
|
+
React.createElement(Body, { style: { column: style.bodyColumn } },
|
|
35
|
+
React.createElement(View, { style: style.intro },
|
|
36
|
+
React.createElement(View, { style: style.content },
|
|
37
|
+
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
38
|
+
React.createElement(Text, { level: 3, style: style.subtitle, body: true }, subTitleText),
|
|
39
|
+
fiveItemsDiscount !== 0 && (React.createElement(View, { style: style.discountContainer },
|
|
40
|
+
React.createElement(View, { style: style.discount },
|
|
41
|
+
React.createElement(Text, { level: 2, heading: true },
|
|
42
|
+
"- ",
|
|
43
|
+
fiveItemsDiscount),
|
|
44
|
+
React.createElement(Text, { level: 3, style: style.percentage, heading: true }, "%")),
|
|
45
|
+
React.createElement(Text, { level: 3, body: true }, discountText))),
|
|
46
|
+
React.createElement(View, { style: style.description },
|
|
47
|
+
React.createElement(Bullet, { text: bulletOneText }),
|
|
48
|
+
React.createElement(Bullet, { text: bulletTwoText }),
|
|
49
|
+
React.createElement(Bullet, { text: bulletThreeText }))),
|
|
50
|
+
React.createElement(Button, { disabled: incrementIntroShownCountStatus === CommandStatus.LOADING, onPress: incrementIntroShownCount }, buttonText)))));
|
|
51
|
+
};
|
|
52
|
+
export { Intro };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare const style: {
|
|
2
|
+
bodyColumn: {
|
|
3
|
+
paddingHorizontal: number;
|
|
4
|
+
};
|
|
5
|
+
bullet: {
|
|
6
|
+
alignItems: "center";
|
|
7
|
+
flexDirection: "row";
|
|
8
|
+
marginVertical: number;
|
|
9
|
+
};
|
|
10
|
+
content: {
|
|
11
|
+
alignItems: "center";
|
|
12
|
+
};
|
|
13
|
+
description: {
|
|
14
|
+
borderWidth: number;
|
|
15
|
+
marginBottom: number;
|
|
16
|
+
padding: number;
|
|
17
|
+
width: string;
|
|
18
|
+
};
|
|
19
|
+
discount: {
|
|
20
|
+
alignItems: "flex-end";
|
|
21
|
+
flexDirection: "row";
|
|
22
|
+
justifyContent: "center";
|
|
23
|
+
marginBottom: number;
|
|
24
|
+
};
|
|
25
|
+
discountContainer: {
|
|
26
|
+
alignItems: "center";
|
|
27
|
+
backgroundColor: string;
|
|
28
|
+
marginBottom: number;
|
|
29
|
+
padding: number;
|
|
30
|
+
textAlign: "center";
|
|
31
|
+
width: string;
|
|
32
|
+
};
|
|
33
|
+
intro: {
|
|
34
|
+
flex: number;
|
|
35
|
+
justifyContent: "space-between";
|
|
36
|
+
};
|
|
37
|
+
percentage: {
|
|
38
|
+
marginLeft: number;
|
|
39
|
+
};
|
|
40
|
+
subtitle: {
|
|
41
|
+
marginBottom: number;
|
|
42
|
+
textAlign: "center";
|
|
43
|
+
};
|
|
44
|
+
tickIcon: {
|
|
45
|
+
marginRight: number;
|
|
46
|
+
};
|
|
47
|
+
title: {
|
|
48
|
+
marginBottom: number;
|
|
49
|
+
textAlign: "center";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export { style };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../theme/theme";
|
|
3
|
+
const { borderSize, colorAccent, spaceXS, spaceS, spaceM, spaceL, spaceXL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
bodyColumn: {
|
|
6
|
+
paddingHorizontal: spaceXL,
|
|
7
|
+
},
|
|
8
|
+
bullet: {
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
flexDirection: "row",
|
|
11
|
+
marginVertical: spaceS,
|
|
12
|
+
},
|
|
13
|
+
content: {
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
},
|
|
16
|
+
description: {
|
|
17
|
+
borderWidth: borderSize,
|
|
18
|
+
marginBottom: spaceXL,
|
|
19
|
+
padding: spaceM,
|
|
20
|
+
width: "100%",
|
|
21
|
+
},
|
|
22
|
+
discount: {
|
|
23
|
+
alignItems: "flex-end",
|
|
24
|
+
flexDirection: "row",
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
marginBottom: spaceS,
|
|
27
|
+
},
|
|
28
|
+
discountContainer: {
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
backgroundColor: colorAccent,
|
|
31
|
+
marginBottom: spaceL,
|
|
32
|
+
padding: spaceM,
|
|
33
|
+
textAlign: "center",
|
|
34
|
+
width: "100%",
|
|
35
|
+
},
|
|
36
|
+
intro: {
|
|
37
|
+
flex: 1,
|
|
38
|
+
justifyContent: "space-between",
|
|
39
|
+
},
|
|
40
|
+
percentage: {
|
|
41
|
+
marginLeft: spaceXS,
|
|
42
|
+
},
|
|
43
|
+
subtitle: {
|
|
44
|
+
marginBottom: spaceXL,
|
|
45
|
+
textAlign: "center",
|
|
46
|
+
},
|
|
47
|
+
tickIcon: {
|
|
48
|
+
marginRight: spaceS,
|
|
49
|
+
},
|
|
50
|
+
title: {
|
|
51
|
+
marginBottom: spaceM,
|
|
52
|
+
textAlign: "center",
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
export { style };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const style: {
|
|
2
|
+
content: {
|
|
3
|
+
paddingHorizontal: number;
|
|
4
|
+
};
|
|
5
|
+
feedbackContainer: {
|
|
6
|
+
borderTopColor: string;
|
|
7
|
+
borderTopWidth: number;
|
|
8
|
+
marginVertical: number;
|
|
9
|
+
};
|
|
10
|
+
sliderContainer: {
|
|
11
|
+
marginBottom: number;
|
|
12
|
+
minHeight: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export { style };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../theme/theme";
|
|
3
|
+
const { borderSize, colorGrayscaleM, spaceXL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
content: {
|
|
6
|
+
paddingHorizontal: spaceXL,
|
|
7
|
+
},
|
|
8
|
+
feedbackContainer: {
|
|
9
|
+
borderTopColor: colorGrayscaleM,
|
|
10
|
+
borderTopWidth: borderSize,
|
|
11
|
+
marginVertical: spaceXL,
|
|
12
|
+
},
|
|
13
|
+
sliderContainer: {
|
|
14
|
+
marginBottom: spaceXL,
|
|
15
|
+
minHeight: 500,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
export { style };
|
package/dist/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js
CHANGED
|
@@ -12,9 +12,11 @@ const GetOutOfCheckoutModal = ({ visible, onDismiss, onConfirm }) => {
|
|
|
12
12
|
const confirmButtonText = useI18nMessage({ id: I18nMessages.GET_OUT_OF_CHECKOUT_MODAL_CONFIRM_BUTTON });
|
|
13
13
|
return (React.createElement(Modal, { visible: visible, onClose: onDismiss },
|
|
14
14
|
React.createElement(View, { style: style.modal },
|
|
15
|
-
React.createElement(Text, { align: ALIGN.CENTER, level: 1 }, titleText),
|
|
16
|
-
React.createElement(Text, { level: 3, style: style.
|
|
17
|
-
React.createElement(Button, { style: style.button, onPress: onDismiss },
|
|
18
|
-
|
|
15
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 1, style: style.title }, titleText),
|
|
16
|
+
React.createElement(Text, { level: 3, style: style.description }, descriptionText),
|
|
17
|
+
React.createElement(Button, { style: style.button, onPress: onDismiss },
|
|
18
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, dismissButtonText)),
|
|
19
|
+
React.createElement(Button, { style: [style.button, style.confirmButton], variant: BUTTON_VARIANT.SECONDARY, onPress: onConfirm },
|
|
20
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, confirmButtonText)))));
|
|
19
21
|
};
|
|
20
22
|
export { GetOutOfCheckoutModal };
|
|
@@ -2,15 +2,22 @@ declare const style: {
|
|
|
2
2
|
button: {
|
|
3
3
|
flex: number;
|
|
4
4
|
};
|
|
5
|
+
buttonText: {
|
|
6
|
+
width: string;
|
|
7
|
+
};
|
|
5
8
|
confirmButton: {
|
|
6
9
|
marginTop: number;
|
|
7
10
|
};
|
|
11
|
+
description: {
|
|
12
|
+
marginVertical: number;
|
|
13
|
+
textAlign: "center";
|
|
14
|
+
width: string;
|
|
15
|
+
};
|
|
8
16
|
modal: {
|
|
9
17
|
padding: number;
|
|
10
18
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
textAlign: "center";
|
|
19
|
+
title: {
|
|
20
|
+
width: string;
|
|
14
21
|
};
|
|
15
22
|
};
|
|
16
23
|
export { style };
|
|
@@ -5,15 +5,22 @@ const style = StyleSheet.create({
|
|
|
5
5
|
button: {
|
|
6
6
|
flex: 0,
|
|
7
7
|
},
|
|
8
|
+
buttonText: {
|
|
9
|
+
width: "100%",
|
|
10
|
+
},
|
|
8
11
|
confirmButton: {
|
|
9
12
|
marginTop: spaceXL,
|
|
10
13
|
},
|
|
14
|
+
description: {
|
|
15
|
+
marginVertical: spaceXL,
|
|
16
|
+
textAlign: "center",
|
|
17
|
+
width: "100%",
|
|
18
|
+
},
|
|
11
19
|
modal: {
|
|
12
20
|
padding: spaceXL,
|
|
13
21
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
textAlign: "center",
|
|
22
|
+
title: {
|
|
23
|
+
width: "100%",
|
|
17
24
|
},
|
|
18
25
|
});
|
|
19
26
|
export { style };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, BUTTON_VARIANT } from "@lookiero/aurora";
|
|
1
|
+
import { ALIGN, Button, BUTTON_VARIANT, Text } from "@lookiero/aurora";
|
|
2
2
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
3
3
|
import React, { useMemo } from "react";
|
|
4
4
|
import { View } from "react-native";
|
|
@@ -20,7 +20,7 @@ const ItemActions = ({ productVariants, currentProductVariant, country, onSizeSe
|
|
|
20
20
|
(sizeSelectorOptions.length === 1 && sizeSelectorOptions[0]?.value === currentProductVariant.id), [sizeSelectorOptions, currentProductVariant.id]);
|
|
21
21
|
return (React.createElement(Sticky, { onLayout: onLayout },
|
|
22
22
|
React.createElement(Body, { style: { column: style.container } },
|
|
23
|
-
React.createElement(Button, { onPress: onKeep }, keepButtonText),
|
|
23
|
+
React.createElement(Button, { testID: "keep-button", onPress: onKeep }, keepButtonText),
|
|
24
24
|
React.createElement(View, { style: style.row },
|
|
25
25
|
!currentProductVariant.size.unique && productVariants && (React.createElement(SelectField, { ...(disabledSizeSelector && {
|
|
26
26
|
onPress: onSizeSelectorPress,
|
|
@@ -29,6 +29,7 @@ const ItemActions = ({ productVariants, currentProductVariant, country, onSizeSe
|
|
|
29
29
|
inputField: { input: disabledSizeSelector && style.inputDisabled },
|
|
30
30
|
}, onChange: onReplace })),
|
|
31
31
|
React.createElement(View, { style: style.returnButtonContainer },
|
|
32
|
-
React.createElement(Button, { variant: BUTTON_VARIANT.SECONDARY, onPress: onReturn },
|
|
32
|
+
React.createElement(Button, { testID: "return-button", variant: BUTTON_VARIANT.SECONDARY, onPress: onReturn },
|
|
33
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, returnButtonText)))))));
|
|
33
34
|
};
|
|
34
35
|
export { ItemActions };
|
|
@@ -2,6 +2,9 @@ import { StyleSheet } from "react-native";
|
|
|
2
2
|
import { theme } from "../../../../theme/theme";
|
|
3
3
|
const { colorGrayscaleL, spaceL, spaceXL } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
|
+
buttonText: {
|
|
6
|
+
width: "100%",
|
|
7
|
+
},
|
|
5
8
|
container: {
|
|
6
9
|
paddingHorizontal: spaceXL,
|
|
7
10
|
},
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { ImageStyle, StyleProp } from "react-native";
|
|
3
|
+
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
4
|
+
import { ColorProjection, MediaProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
5
|
+
import { Country } from "../../../../../../projection/shared/country";
|
|
6
|
+
import { PriceProjection } from "../../../../../../projection/shared/price";
|
|
7
|
+
import { SizeProjection } from "../../../../../../projection/shared/size";
|
|
8
|
+
interface ProductVariantStyle {
|
|
9
|
+
readonly image: StyleProp<ImageStyle>;
|
|
10
|
+
}
|
|
11
|
+
interface ProductVariantProps {
|
|
12
|
+
readonly media: MediaProjection[];
|
|
13
|
+
readonly brand: string;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly price: PriceProjection;
|
|
16
|
+
readonly size: SizeProjection;
|
|
17
|
+
readonly color: ColorProjection;
|
|
18
|
+
readonly status?: CheckoutItemStatus;
|
|
19
|
+
readonly discarded?: boolean;
|
|
20
|
+
readonly country: Country;
|
|
21
|
+
readonly style?: Partial<ProductVariantStyle>;
|
|
22
|
+
readonly onPress?: () => void;
|
|
23
|
+
}
|
|
24
|
+
declare const ProductVariant: FC<ProductVariantProps>;
|
|
25
|
+
export type { ProductVariantStyle };
|
|
26
|
+
export { ProductVariant };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
2
|
+
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Image, Pressable, View } from "react-native";
|
|
5
|
+
import Svg, { Line } from "react-native-svg";
|
|
6
|
+
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
7
|
+
import { size } from "../../../../../../projection/shared/size";
|
|
8
|
+
import { Icon } from "../../../../../../shared/ui/components/atoms/icon/Icon";
|
|
9
|
+
import { Price } from "../../../../components/atoms/price/Price";
|
|
10
|
+
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
11
|
+
import { COLOR_I18N_PREFIX, I18nMessages } from "../../../../i18n/i18n";
|
|
12
|
+
import { theme } from "../../../../theme/theme";
|
|
13
|
+
import { IMAGE_WIDTH, style } from "./ProductVariant.style";
|
|
14
|
+
const { colorContent } = theme();
|
|
15
|
+
const ProductVariant = ({ media, brand, name, price, size: sizeProjection, color, status, discarded, country, style: customStyle, onPress, }) => {
|
|
16
|
+
const uniqueText = useI18nMessage({ id: I18nMessages.ITEM_UNIQUE });
|
|
17
|
+
const colorLabel = useI18nMessage({ id: color.label, prefix: COLOR_I18N_PREFIX });
|
|
18
|
+
const sizeChangeText = useI18nMessage({ id: I18nMessages.PRODUCT_VARIANT_SIZE_CHANGE });
|
|
19
|
+
const cdnImageUrl = useMediaImage();
|
|
20
|
+
return (React.createElement(Pressable, { pointerEvents: onPress ? "auto" : "none", style: style.container, testID: "product-variant", onPress: onPress },
|
|
21
|
+
React.createElement(View, { style: style.row },
|
|
22
|
+
React.createElement(View, null,
|
|
23
|
+
React.createElement(Image, { resizeMode: "contain", style: [style.media, customStyle?.image], testID: "product-variant-media", source: {
|
|
24
|
+
uri: cdnImageUrl({
|
|
25
|
+
url: media[0]?.url,
|
|
26
|
+
width: IMAGE_WIDTH,
|
|
27
|
+
}),
|
|
28
|
+
} }),
|
|
29
|
+
discarded && (React.createElement(Svg, { preserveAspectRatio: "none", stroke: colorContent, style: style.discarded, testID: "discarded", viewBox: "0 0 100 100" },
|
|
30
|
+
React.createElement(Line, { vectorEffect: "non-scaling-stroke", x1: "100", x2: "0", y1: "0", y2: "100" })))),
|
|
31
|
+
React.createElement(View, { style: style.descriptionContainer },
|
|
32
|
+
React.createElement(View, null,
|
|
33
|
+
React.createElement(Text, { level: 2, style: style.brand, detail: true }, brand),
|
|
34
|
+
React.createElement(Text, { level: 2, detail: true }, name),
|
|
35
|
+
React.createElement(Text, { level: 2, style: style.priceAndColor, detail: true },
|
|
36
|
+
sizeProjection.unique ? uniqueText : size({ size: sizeProjection, country }),
|
|
37
|
+
" / ",
|
|
38
|
+
colorLabel),
|
|
39
|
+
status === CheckoutItemStatus.REPLACED && (React.createElement(View, { style: style.sizeChange },
|
|
40
|
+
React.createElement(Text, { level: 3, style: style.sizeChangeText, detail: true }, sizeChangeText)))),
|
|
41
|
+
React.createElement(Price, { price: price, variant: "detail" }))),
|
|
42
|
+
onPress && React.createElement(Icon, { name: "arrow-right" })));
|
|
43
|
+
};
|
|
44
|
+
export { ProductVariant };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare const IMAGE_WIDTH = 96;
|
|
2
|
+
declare const style: {
|
|
3
|
+
brand: {
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
6
|
+
container: {
|
|
7
|
+
flexDirection: "row";
|
|
8
|
+
justifyContent: "space-between";
|
|
9
|
+
};
|
|
10
|
+
descriptionContainer: {
|
|
11
|
+
justifyContent: "space-between";
|
|
12
|
+
marginLeft: number;
|
|
13
|
+
};
|
|
14
|
+
discarded: {
|
|
15
|
+
height: string;
|
|
16
|
+
left: number;
|
|
17
|
+
position: "absolute";
|
|
18
|
+
top: number;
|
|
19
|
+
width: string;
|
|
20
|
+
zIndex: number;
|
|
21
|
+
};
|
|
22
|
+
media: {
|
|
23
|
+
borderColor: string;
|
|
24
|
+
borderWidth: number;
|
|
25
|
+
height: number;
|
|
26
|
+
width: number;
|
|
27
|
+
};
|
|
28
|
+
priceAndColor: {
|
|
29
|
+
color: string;
|
|
30
|
+
};
|
|
31
|
+
row: {
|
|
32
|
+
flexDirection: "row";
|
|
33
|
+
};
|
|
34
|
+
sizeChange: {
|
|
35
|
+
width?: string | undefined;
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
marginTop: number;
|
|
38
|
+
paddingHorizontal: number;
|
|
39
|
+
paddingVertical: number;
|
|
40
|
+
};
|
|
41
|
+
sizeChangeText: {
|
|
42
|
+
textTransform: "uppercase";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export { style, IMAGE_WIDTH };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Platform, StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { borderSize, colorGrayscaleL, colorInfo, spaceXS, spaceS, spaceM } = theme();
|
|
4
|
+
const IMAGE_WIDTH = 96;
|
|
5
|
+
const IMAGE_HEIGHT = 120;
|
|
6
|
+
const style = StyleSheet.create({
|
|
7
|
+
brand: {
|
|
8
|
+
color: colorGrayscaleL,
|
|
9
|
+
},
|
|
10
|
+
container: {
|
|
11
|
+
flexDirection: "row",
|
|
12
|
+
justifyContent: "space-between",
|
|
13
|
+
},
|
|
14
|
+
descriptionContainer: {
|
|
15
|
+
justifyContent: "space-between",
|
|
16
|
+
marginLeft: spaceS,
|
|
17
|
+
},
|
|
18
|
+
discarded: {
|
|
19
|
+
height: "100%",
|
|
20
|
+
left: 0,
|
|
21
|
+
position: "absolute",
|
|
22
|
+
top: 0,
|
|
23
|
+
width: "100%",
|
|
24
|
+
zIndex: 10,
|
|
25
|
+
},
|
|
26
|
+
media: {
|
|
27
|
+
borderColor: colorGrayscaleL,
|
|
28
|
+
borderWidth: borderSize,
|
|
29
|
+
height: IMAGE_HEIGHT,
|
|
30
|
+
width: IMAGE_WIDTH,
|
|
31
|
+
},
|
|
32
|
+
priceAndColor: {
|
|
33
|
+
color: colorGrayscaleL,
|
|
34
|
+
},
|
|
35
|
+
row: {
|
|
36
|
+
flexDirection: "row",
|
|
37
|
+
},
|
|
38
|
+
sizeChange: {
|
|
39
|
+
backgroundColor: colorInfo,
|
|
40
|
+
marginTop: spaceM,
|
|
41
|
+
paddingHorizontal: spaceS,
|
|
42
|
+
paddingVertical: spaceXS,
|
|
43
|
+
...Platform.select({
|
|
44
|
+
web: {
|
|
45
|
+
width: "fit-content",
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
sizeChangeText: {
|
|
50
|
+
textTransform: "uppercase",
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
export { style, IMAGE_WIDTH };
|
package/dist/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import React, { useCallback } from "react";
|
|
1
|
+
import React, { useCallback, useState } from "react";
|
|
2
2
|
import { Image } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
import { Bullets } from "../../../../../../shared/ui/components/layouts/slider/Bullets";
|
|
3
|
+
import { Slider } from "../../../../../../shared/ui/components/layouts/slider/Slider";
|
|
5
4
|
import { useMediaImage } from "../../../../hooks/useMediaImage";
|
|
6
5
|
import { style } from "./ProductVariantSlider.style";
|
|
7
6
|
const ProductVariantSlider = ({ producVariantMedia, onChanged }) => {
|
|
8
7
|
const cdnImageUrl = useMediaImage();
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const [active, setActive] = useState(0);
|
|
9
|
+
const handleOnActiveChanged = useCallback((activeIndex) => {
|
|
10
|
+
setActive(activeIndex);
|
|
11
|
+
onChanged?.(activeIndex);
|
|
12
|
+
}, [onChanged]);
|
|
13
|
+
return (React.createElement(Slider, { active: active, onChanged: handleOnActiveChanged }, producVariantMedia.map((media) => (React.createElement(Image, { key: media.perspective, resizeMode: "contain", style: style.image, testID: "product-variant-image", source: {
|
|
11
14
|
uri: cdnImageUrl({
|
|
12
|
-
url:
|
|
15
|
+
url: media.url,
|
|
13
16
|
width: 600,
|
|
14
17
|
}),
|
|
15
|
-
} }))
|
|
16
|
-
const renderBullets = useCallback(({ activeIndex, count, onChange }) => React.createElement(Bullets, { activeIndex: activeIndex, count: count, onChange: onChange }), []);
|
|
17
|
-
return (React.createElement(Carousel2, { bullets: renderBullets, data: producVariantMedia, onActiveIndexChanged: handleOnActiveChanged }, renderItem));
|
|
18
|
+
} })))));
|
|
18
19
|
};
|
|
19
20
|
export { ProductVariantSlider };
|
package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PortalHost } from "@gorhom/portal";
|
|
2
|
-
import { Button, Text } from "@lookiero/aurora";
|
|
2
|
+
import { ALIGN, Button, Text } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
4
|
import React, { useCallback } from "react";
|
|
5
5
|
import { View } from "react-native";
|
|
@@ -35,6 +35,7 @@ const ReturnQuestionsForm = ({ returnQuestions, visible, onSubmit, onClose }) =>
|
|
|
35
35
|
React.createElement(View, { style: style.returnQuestionsContainer },
|
|
36
36
|
React.createElement(Text, { level: 2, style: style.title }, titleText),
|
|
37
37
|
React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
|
|
38
|
-
React.createElement(Button, { style: style.submit, onPress: handleOnSubmit },
|
|
38
|
+
React.createElement(Button, { style: style.submit, testID: "return-questions-button", onPress: handleOnSubmit },
|
|
39
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, submitButtonText))))));
|
|
39
40
|
};
|
|
40
41
|
export { ReturnQuestionsForm };
|
|
@@ -2,6 +2,9 @@ import { StyleSheet } from "react-native";
|
|
|
2
2
|
import { theme } from "../../../../theme/theme";
|
|
3
3
|
const { spaceS, spaceXL } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
|
+
buttonText: {
|
|
6
|
+
width: "100%",
|
|
7
|
+
},
|
|
5
8
|
returnQuestionsContainer: {
|
|
6
9
|
paddingHorizontal: spaceXL,
|
|
7
10
|
},
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Button } from "@lookiero/aurora-next/build/components/atoms/Button/Button";
|
|
2
|
+
import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Text";
|
|
3
|
+
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
import { Modal } from "../../../../../../shared/ui/components/layouts/modal/Modal";
|
|
7
|
+
import { I18nMessages } from "../../../../i18n/i18n";
|
|
8
|
+
import { style } from "./SizeChangeModal.style";
|
|
9
|
+
const SizeChangeModal = ({ visible, onDismiss }) => {
|
|
10
|
+
const titleText = useI18nMessage({ id: I18nMessages.SIZE_CHANGE_MODAL_TITLE });
|
|
11
|
+
const descriptionText = useI18nMessage({ id: I18nMessages.SIZE_CHANGE_MODAL_DESCRIPTION });
|
|
12
|
+
const buttonText = useI18nMessage({ id: I18nMessages.SIZE_CHANGE_MODAL_BUTTON });
|
|
13
|
+
return (React.createElement(Modal, { visible: visible, onClose: onDismiss },
|
|
14
|
+
React.createElement(View, { style: style.modal },
|
|
15
|
+
React.createElement(Text, { level: 1, style: style.modalTitle, body: true }, titleText),
|
|
16
|
+
React.createElement(Text, { level: 3, style: style.modalDescription, body: true }, descriptionText),
|
|
17
|
+
React.createElement(Button
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
, {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
style: style.button, onPress: onDismiss }, buttonText))));
|
|
24
|
+
};
|
|
25
|
+
export { SizeChangeModal };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { spaceXL } = theme();
|
|
4
|
+
const style = StyleSheet.create({
|
|
5
|
+
button: {
|
|
6
|
+
flex: 0,
|
|
7
|
+
},
|
|
8
|
+
modal: {
|
|
9
|
+
padding: spaceXL,
|
|
10
|
+
},
|
|
11
|
+
modalDescription: {
|
|
12
|
+
marginVertical: spaceXL,
|
|
13
|
+
textAlign: "center",
|
|
14
|
+
},
|
|
15
|
+
modalTitle: {
|
|
16
|
+
textAlign: "center",
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
export { style };
|