@lookiero/checkout 3.5.0-beta.0 → 3.6.0-beta.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/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/header/itemHeader/ItemHeader.js +2 -1
- 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/{views/header/components/Logo.style.js → components/templates/safeAreaScrollView/SafeAreaScrollView.style.ts.js} +2 -3
- package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.d.ts +2 -0
- package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.js +28 -0
- package/dist/infrastructure/ui/views/intro/Intro.js +1 -1
- package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +0 -3
- package/dist/infrastructure/ui/views/intro/Intro.style.js +0 -3
- 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.js +1 -1
- 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/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/summary/components/pricing/Pricing.js +5 -4
- 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/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/package.json +1 -1
- package/dist/domain/checkout/command/markCheckoutAsPaid.d.ts +0 -13
- package/dist/domain/checkout/command/markCheckoutAsPaid.js +0 -4
- package/dist/domain/checkout/model/checkoutPaid.d.ts +0 -13
- package/dist/domain/checkout/model/checkoutPaid.js +0 -4
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsMarkAsPaid.d.ts +0 -5
- package/dist/infrastructure/domain/checkout/model/httpCheckoutsMarkAsPaid.js +0 -13
- package/dist/infrastructure/domain/checkout/react/useMarkCheckoutAsPaid.d.ts +0 -13
- package/dist/infrastructure/domain/checkout/react/useMarkCheckoutAsPaid.js +0 -16
- package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.d.ts +0 -13
- package/dist/infrastructure/domain/checkoutBooking/react/useBookCheckouBookingForCheckoutItem.js +0 -14
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.d.ts +0 -12
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/httpBookedSizeChangeProductsVariantsForCheckoutItemView.js +0 -9
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.d.ts +0 -10
- package/dist/infrastructure/projection/bookedSizeChangeProductsVariants/react/useViewBookedSizeChangeProductsVariantsForCheckoutItem.js +0 -12
- package/dist/infrastructure/projection/checkoutFeedback/httpCheckoutFeedbackByCheckoutIdView.d.ts +0 -12
- package/dist/infrastructure/projection/checkoutFeedback/httpCheckoutFeedbackByCheckoutIdView.js +0 -9
- package/dist/infrastructure/ui/views/App.style.d.ts +0 -4
- package/dist/infrastructure/ui/views/App.style.js +0 -16
- package/dist/infrastructure/ui/views/header/Header.d.ts +0 -15
- package/dist/infrastructure/ui/views/header/Header.js +0 -90
- package/dist/infrastructure/ui/views/header/Header.style.d.ts +0 -35
- package/dist/infrastructure/ui/views/header/Header.style.js +0 -38
- package/dist/infrastructure/ui/views/header/components/Logo.d.ts +0 -7
- package/dist/infrastructure/ui/views/header/components/Logo.js +0 -11
- package/dist/infrastructure/ui/views/header/components/Logo.style.d.ts +0 -7
- package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.d.ts +0 -10
- package/dist/projection/bookedSizeChangeProductsVariants/bookedSizeChangeProductsVariants.js +0 -1
- package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.d.ts +0 -25
- package/dist/projection/bookedSizeChangeProductsVariants/viewBookedSizeChangeProductVariantsForCheckoutItem.js +0 -8
- package/dist/projection/checkoutFeedback/viewCheckoutFeedbackByCheckoutId.d.ts +0 -25
- package/dist/projection/checkoutFeedback/viewCheckoutFeedbackByCheckoutId.js +0 -8
- package/dist/shared/logging/location.d.ts +0 -3
- package/dist/shared/logging/location.js +0 -5
- package/dist/shared/logging/matchRoutes.d.ts +0 -3
- package/dist/shared/logging/matchRoutes.js +0 -7
- package/dist/shared/logging/reactRouterV6Instrumentation/reactRouterV6Instrumentation.native.d.ts +0 -29
- package/dist/shared/logging/reactRouterV6Instrumentation/reactRouterV6Instrumentation.native.js +0 -134
- package/dist/shared/logging/reactRouterV6Instrumentation/transactionContext.d.ts +0 -22
- package/dist/shared/logging/reactRouterV6Instrumentation/transactionContext.js +0 -15
- package/dist/shared/logging/reactRouterV6Instrumentation.native.d.ts +0 -27
- package/dist/shared/logging/reactRouterV6Instrumentation.native.js +0 -115
- package/dist/shared/notifications/domain/notification/command/removeNotification.tes.d.ts +0 -1
- package/dist/shared/notifications/domain/notification/command/removeNotification.tes.js +0 -9
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonIcon } from "../../../../../../shared/ui/components/molecules/buttonIcon/ButtonIcon";
|
|
3
|
+
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
4
|
+
import { Logo } from "../logo/Logo";
|
|
5
|
+
import { style } from "./Header.style";
|
|
6
|
+
const Header = () => (React.createElement(React.Fragment, null,
|
|
7
|
+
React.createElement(Logo, { style: style.logo }),
|
|
8
|
+
React.createElement(ButtonIconPlaceholder, null),
|
|
9
|
+
React.createElement(ButtonIcon, { name: "menu", testID: "menu-button-icon", onPress: () => void 0 })));
|
|
10
|
+
export { Header };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
|
+
import { theme } from "../../../../theme/theme";
|
|
3
|
+
const { spaceXXXL } = theme();
|
|
4
|
+
const HEADER_HEIGHT = spaceXXXL;
|
|
5
|
+
const style = StyleSheet.create({
|
|
6
|
+
logo: {
|
|
7
|
+
left: 0,
|
|
8
|
+
position: "absolute",
|
|
9
|
+
top: 0,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
export { style, HEADER_HEIGHT };
|
|
@@ -3,12 +3,13 @@ import { useI18nMessage } from "@lookiero/i18n-react";
|
|
|
3
3
|
import React, { useCallback } from "react";
|
|
4
4
|
import { generatePath, useNavigate } from "react-router-native";
|
|
5
5
|
import { ButtonIcon } from "../../../../../../shared/ui/components/molecules/buttonIcon/ButtonIcon";
|
|
6
|
+
import { I18nMessages } from "../../../../i18n/i18n";
|
|
6
7
|
import { Routes } from "../../../../routing/routes";
|
|
7
8
|
import { useBasePath } from "../../../../routing/useBasePath";
|
|
8
9
|
import { Header } from "../Header";
|
|
9
10
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
10
11
|
const ItemHeader = ({ items, item, onNext, onPrevious }) => {
|
|
11
|
-
const title = useI18nMessage({ id:
|
|
12
|
+
const title = useI18nMessage({ id: I18nMessages.HEADER_CHECKOUT_TITLE });
|
|
12
13
|
const itemIndex = items.indexOf(item);
|
|
13
14
|
const isFirstItem = itemIndex === 0;
|
|
14
15
|
const isLastItem = itemIndex === items.length - 1;
|
package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
import { Edge } from "react-native-safe-area-context";
|
|
4
|
+
type SafeAreaScrollViewStyle = "safeAreaView" | "scrollView";
|
|
5
|
+
interface SafeAreaScrollViewProps {
|
|
6
|
+
readonly children: ReactNode;
|
|
7
|
+
readonly footer?: ReactNode;
|
|
8
|
+
readonly scrollerPaddingTop?: number;
|
|
9
|
+
readonly edges?: Edge[];
|
|
10
|
+
readonly style?: Partial<Record<SafeAreaScrollViewStyle, StyleProp<ViewStyle>>>;
|
|
11
|
+
}
|
|
12
|
+
declare const SafeAreaScrollView: FC<SafeAreaScrollViewProps>;
|
|
13
|
+
export { SafeAreaScrollView };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ScrollView } from "react-native";
|
|
3
|
+
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
|
+
import { theme } from "../../../theme/theme.js";
|
|
5
|
+
import { style } from "./SafeAreaScrollView.style.ts";
|
|
6
|
+
const { spaceXXL } = theme();
|
|
7
|
+
const SafeAreaScrollView = ({ children, footer, edges = ["top", "left", "right"], style: customStyle, scrollerPaddingTop = 0, }) => {
|
|
8
|
+
const { bottom: safeAreaInsetBottom } = useSafeAreaInsets();
|
|
9
|
+
return (React.createElement(SafeAreaView, { edges: edges, style: [style.safeAreaView, customStyle?.safeAreaView] },
|
|
10
|
+
React.createElement(ScrollView, { contentContainerStyle: [
|
|
11
|
+
{
|
|
12
|
+
paddingTop: scrollerPaddingTop,
|
|
13
|
+
paddingBottom: safeAreaInsetBottom + spaceXXL,
|
|
14
|
+
},
|
|
15
|
+
customStyle?.scrollView,
|
|
16
|
+
] }, children),
|
|
17
|
+
footer));
|
|
18
|
+
};
|
|
19
|
+
export { SafeAreaScrollView };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useEvent } from "@lookiero/event";
|
|
2
|
+
import { useCallback, useEffect } from "react";
|
|
3
|
+
import { useCreateNotification } from "../../../shared/notifications";
|
|
4
|
+
import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
|
|
5
|
+
import { I18nMessages } from "../i18n/i18n";
|
|
6
|
+
import { useToast } from "./useToast";
|
|
7
|
+
const PAYMENT_ERROR = "ERROR";
|
|
8
|
+
const PAYMENT_SUCCESS = "PAYMENT_INSTRUMENT_UPDATED";
|
|
9
|
+
const usePaymentInstrumentUpdateEvents = () => {
|
|
10
|
+
const { subscribe, unsubscribe } = useEvent();
|
|
11
|
+
const { showError, showSuccess } = useToast();
|
|
12
|
+
const [createNotification] = useCreateNotification({ contextId: MESSAGING_CONTEXT_ID });
|
|
13
|
+
const onSuccess = useCallback(({ message }) => showSuccess({ message: message.id }), [showSuccess]);
|
|
14
|
+
const onError = useCallback(({ error }) => {
|
|
15
|
+
if (error.toaster) {
|
|
16
|
+
showError({ message: error.toaster.id || I18nMessages.CHECKOUT_TOAST_PAYMENT_ERROR });
|
|
17
|
+
}
|
|
18
|
+
}, [showError]);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
subscribe({ event: PAYMENT_ERROR }, onError);
|
|
21
|
+
subscribe({ event: PAYMENT_SUCCESS }, onSuccess);
|
|
22
|
+
return () => {
|
|
23
|
+
unsubscribe({ event: PAYMENT_ERROR }, onError);
|
|
24
|
+
unsubscribe({ event: PAYMENT_SUCCESS }, onSuccess);
|
|
25
|
+
};
|
|
26
|
+
}, [subscribe, unsubscribe, createNotification, onError, onSuccess]);
|
|
27
|
+
};
|
|
28
|
+
export { usePaymentInstrumentUpdateEvents };
|
|
@@ -30,7 +30,7 @@ const Intro = ({ customerId }) => {
|
|
|
30
30
|
const [incrementIntroShownCount, incrementIntroShownCountStatus] = useIncrementIntroShownCount();
|
|
31
31
|
if (fiveItemsDiscountStatus === QueryStatus.LOADING)
|
|
32
32
|
return React.createElement(Spinner, null);
|
|
33
|
-
return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0
|
|
33
|
+
return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0 },
|
|
34
34
|
React.createElement(Body, { style: { column: style.bodyColumn } },
|
|
35
35
|
React.createElement(View, { style: style.intro },
|
|
36
36
|
React.createElement(View, { style: style.content },
|
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, { 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
|
},
|
|
@@ -14,7 +14,7 @@ import { IMAGE_WIDTH, style } from "./ProductVariant.style";
|
|
|
14
14
|
const { colorContent } = theme();
|
|
15
15
|
const ProductVariant = ({ media, brand, name, price, size: sizeProjection, color, status, discarded, country, style: customStyle, onPress, }) => {
|
|
16
16
|
const uniqueText = useI18nMessage({ id: I18nMessages.ITEM_UNIQUE });
|
|
17
|
-
const colorLabel = useI18nMessage({ id: color.
|
|
17
|
+
const colorLabel = useI18nMessage({ id: color.label, prefix: COLOR_I18N_PREFIX });
|
|
18
18
|
const sizeChangeText = useI18nMessage({ id: I18nMessages.PRODUCT_VARIANT_SIZE_CHANGE });
|
|
19
19
|
const cdnImageUrl = useMediaImage();
|
|
20
20
|
return (React.createElement(Pressable, { pointerEvents: onPress ? "auto" : "none", style: style.container, testID: "product-variant", onPress: onPress },
|
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, 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
|
},
|
package/dist/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js
CHANGED
|
@@ -11,8 +11,9 @@ const SizeWithoutStockModal = ({ visible, onDismiss }) => {
|
|
|
11
11
|
const buttonText = useI18nMessage({ id: I18nMessages.SIZE_WITHOUT_STOCK_MODAL_BUTTON });
|
|
12
12
|
return (React.createElement(Modal, { visible: visible, onClose: onDismiss },
|
|
13
13
|
React.createElement(View, { style: style.modal },
|
|
14
|
-
React.createElement(Text, { align: ALIGN.CENTER, level: 1 }, titleText),
|
|
15
|
-
React.createElement(Text, { level: 3, style: style.
|
|
16
|
-
React.createElement(Button, { style: style.button, onPress: onDismiss },
|
|
14
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 1, style: style.title }, titleText),
|
|
15
|
+
React.createElement(Text, { level: 3, style: style.description }, descriptionText),
|
|
16
|
+
React.createElement(Button, { style: style.button, onPress: onDismiss },
|
|
17
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, buttonText)))));
|
|
17
18
|
};
|
|
18
19
|
export { SizeWithoutStockModal };
|
|
@@ -2,12 +2,19 @@ declare const style: {
|
|
|
2
2
|
button: {
|
|
3
3
|
flex: number;
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
buttonText: {
|
|
6
|
+
width: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
description: {
|
|
9
9
|
marginVertical: number;
|
|
10
10
|
textAlign: "center";
|
|
11
|
+
width: string;
|
|
12
|
+
};
|
|
13
|
+
modal: {
|
|
14
|
+
padding: number;
|
|
15
|
+
};
|
|
16
|
+
title: {
|
|
17
|
+
width: string;
|
|
11
18
|
};
|
|
12
19
|
};
|
|
13
20
|
export { style };
|
|
@@ -5,12 +5,19 @@ const style = StyleSheet.create({
|
|
|
5
5
|
button: {
|
|
6
6
|
flex: 0,
|
|
7
7
|
},
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
buttonText: {
|
|
9
|
+
width: "100%",
|
|
10
10
|
},
|
|
11
|
-
|
|
11
|
+
description: {
|
|
12
12
|
marginVertical: spaceXL,
|
|
13
13
|
textAlign: "center",
|
|
14
|
+
width: "100%",
|
|
15
|
+
},
|
|
16
|
+
modal: {
|
|
17
|
+
padding: spaceXL,
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
width: "100%",
|
|
14
21
|
},
|
|
15
22
|
});
|
|
16
23
|
export { style };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, Text } from "@lookiero/aurora";
|
|
1
|
+
import { ALIGN, Button, Text } from "@lookiero/aurora";
|
|
2
2
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
3
3
|
import { animated, useSpring } from "@react-spring/native";
|
|
4
4
|
import React from "react";
|
|
@@ -33,14 +33,15 @@ const Pricing = ({ pendingToPay, subtotal, balanceDiscount, discount, discountPe
|
|
|
33
33
|
return (React.createElement(Pressable, { testID: "pricing", onPress: collapsible ? onPress : null },
|
|
34
34
|
collapsible && (React.createElement(View, { style: style.iconContainer }, collapsed ? (React.createElement(ArrowUp, { stroke: colorGrayscaleS, style: style.icon, testID: "arrow-up" })) : (React.createElement(ArrowDown, { stroke: colorGrayscaleS, style: style.icon, testID: "arrow-down" })))),
|
|
35
35
|
collapsed && collapsible ? (React.createElement(animated.View, { style: [style.collapsed, { opacity: collapsedStyle.opacitiy }] },
|
|
36
|
-
React.createElement(View,
|
|
36
|
+
React.createElement(View, { style: style.collapsedContent },
|
|
37
37
|
React.createElement(Text, { level: 1, style: style.totalCollapsed, detail: true },
|
|
38
38
|
totalText,
|
|
39
39
|
" ",
|
|
40
40
|
totalCheckoutItemsKeptText),
|
|
41
41
|
React.createElement(Price, { price: pendingToPay, variant: "detail" })),
|
|
42
|
-
React.createElement(View,
|
|
43
|
-
React.createElement(Button, { busy: busy, small: true, onPress: onSubmit },
|
|
42
|
+
React.createElement(View, { style: style.collapsedContent },
|
|
43
|
+
React.createElement(Button, { busy: busy, small: true, onPress: onSubmit },
|
|
44
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, submitButtonText))))) : (React.createElement(animated.View, { style: { opacity: notCollapsedStyle.opacitiy } },
|
|
44
45
|
React.createElement(Row, { text: `${subtotalText} ${totalCheckoutItemsKeptText}` },
|
|
45
46
|
React.createElement(Price, { price: subtotal, variant: "subtotal" })),
|
|
46
47
|
discount && discount.amount !== 0 && (React.createElement(Row, { text: discountText },
|
|
@@ -2,10 +2,16 @@ import { StyleSheet } from "react-native";
|
|
|
2
2
|
import { theme } from "../../../../theme/theme";
|
|
3
3
|
const { colorContent, spaceXS, spaceL } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
|
+
buttonText: {
|
|
6
|
+
width: "100%",
|
|
7
|
+
},
|
|
5
8
|
collapsed: {
|
|
6
9
|
flexDirection: "row",
|
|
7
10
|
justifyContent: "space-between",
|
|
8
11
|
},
|
|
12
|
+
collapsedContent: {
|
|
13
|
+
flex: 1,
|
|
14
|
+
},
|
|
9
15
|
divider: {
|
|
10
16
|
backgroundColor: colorContent,
|
|
11
17
|
height: 1,
|
|
@@ -24,8 +24,9 @@ const ModalNotificationItem = ({ visible, notification, onRemove, testID = "moda
|
|
|
24
24
|
}, [notification.id, onRemove]);
|
|
25
25
|
return (React.createElement(Modal, { testID: testID, visible: visible, onClose: handleOnClose },
|
|
26
26
|
React.createElement(View, { style: style.modal },
|
|
27
|
-
React.createElement(Text, { align: ALIGN.CENTER, level: 1 }, titleText),
|
|
28
|
-
React.createElement(Text, { level: 3, style: style.
|
|
29
|
-
React.createElement(Button, { style: style.button, onPress: handleOnClose },
|
|
27
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 1, style: style.title }, titleText),
|
|
28
|
+
React.createElement(Text, { level: 3, style: style.description }, bodyText),
|
|
29
|
+
React.createElement(Button, { style: style.button, onPress: handleOnClose },
|
|
30
|
+
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, acceptText)))));
|
|
30
31
|
};
|
|
31
32
|
export { ModalNotificationItem };
|
|
@@ -2,12 +2,19 @@ declare const style: {
|
|
|
2
2
|
button: {
|
|
3
3
|
flex: number;
|
|
4
4
|
};
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
buttonText: {
|
|
6
|
+
width: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
description: {
|
|
9
9
|
marginVertical: number;
|
|
10
10
|
textAlign: "center";
|
|
11
|
+
width: string;
|
|
12
|
+
};
|
|
13
|
+
modal: {
|
|
14
|
+
padding: number;
|
|
15
|
+
};
|
|
16
|
+
title: {
|
|
17
|
+
width: string;
|
|
11
18
|
};
|
|
12
19
|
};
|
|
13
20
|
export { style };
|
|
@@ -5,12 +5,19 @@ const style = StyleSheet.create({
|
|
|
5
5
|
button: {
|
|
6
6
|
flex: 0,
|
|
7
7
|
},
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
buttonText: {
|
|
9
|
+
width: "100%",
|
|
10
10
|
},
|
|
11
|
-
|
|
11
|
+
description: {
|
|
12
12
|
marginVertical: spaceXL,
|
|
13
13
|
textAlign: "center",
|
|
14
|
+
width: "100%",
|
|
15
|
+
},
|
|
16
|
+
modal: {
|
|
17
|
+
padding: spaceXL,
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
width: "100%",
|
|
14
21
|
},
|
|
15
22
|
});
|
|
16
23
|
export { style };
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Command } from "@lookiero/messaging";
|
|
2
|
-
declare const MARK_CHECKOUT_AS_PAID = "mark_checkout_as_paid";
|
|
3
|
-
interface MarkCheckoutAsPaidPayload {
|
|
4
|
-
readonly aggregateId: string;
|
|
5
|
-
}
|
|
6
|
-
interface MarkCheckoutAsPaid extends Command<typeof MARK_CHECKOUT_AS_PAID>, MarkCheckoutAsPaidPayload {
|
|
7
|
-
}
|
|
8
|
-
interface MarkCheckoutAsPaidFunction {
|
|
9
|
-
(payload: MarkCheckoutAsPaidPayload): MarkCheckoutAsPaid;
|
|
10
|
-
}
|
|
11
|
-
declare const markCheckoutAsPaid: MarkCheckoutAsPaidFunction;
|
|
12
|
-
export type { MarkCheckoutAsPaid };
|
|
13
|
-
export { MARK_CHECKOUT_AS_PAID, markCheckoutAsPaid };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DomainEvent } from "@lookiero/messaging";
|
|
2
|
-
declare const CHECKOUT_PAID = "checkout_paid";
|
|
3
|
-
interface CheckoutPaidPayload {
|
|
4
|
-
readonly aggregateId: string;
|
|
5
|
-
}
|
|
6
|
-
interface CheckoutPaid extends DomainEvent<typeof CHECKOUT_PAID>, CheckoutPaidPayload {
|
|
7
|
-
}
|
|
8
|
-
interface CheckoutPaidFunction {
|
|
9
|
-
(payload: CheckoutPaidPayload): CheckoutPaid;
|
|
10
|
-
}
|
|
11
|
-
declare const checkoutPaid: CheckoutPaidFunction;
|
|
12
|
-
export type { CheckoutPaid };
|
|
13
|
-
export { CHECKOUT_PAID, checkoutPaid };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CHECKOUT_PAID } from "../../../../domain/checkout/model/checkoutPaid";
|
|
2
|
-
const isCheckoutPaid = (event) => event.name === CHECKOUT_PAID;
|
|
3
|
-
const httpCheckoutsMarkAsPaid = ({ httpPost }) => async ({ aggregateId, domainEvents }) => {
|
|
4
|
-
const checkoutPaid = domainEvents.find(isCheckoutPaid);
|
|
5
|
-
if (!checkoutPaid) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
await httpPost({
|
|
9
|
-
endpoint: "/mark-checkout-as-paid",
|
|
10
|
-
body: { checkoutId: aggregateId },
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
export { httpCheckoutsMarkAsPaid };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CommandStatus } from "@lookiero/messaging-react";
|
|
2
|
-
interface MarkAsPaidFunction {
|
|
3
|
-
(): Promise<void>;
|
|
4
|
-
}
|
|
5
|
-
type UseMarkCheckoutAsPaid = [markAsPaid: MarkAsPaidFunction, status: CommandStatus];
|
|
6
|
-
interface UseMarkCheckoutAsPaidFunctionArgs {
|
|
7
|
-
readonly checkoutId?: string;
|
|
8
|
-
}
|
|
9
|
-
interface UseMarkCheckoutAsPaidFunction {
|
|
10
|
-
(args: UseMarkCheckoutAsPaidFunctionArgs): UseMarkCheckoutAsPaid;
|
|
11
|
-
}
|
|
12
|
-
declare const useMarkCheckoutAsPaid: UseMarkCheckoutAsPaidFunction;
|
|
13
|
-
export { useMarkCheckoutAsPaid };
|