@lookiero/checkout 2.4.1 → 3.0.0-beta.1

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.
Files changed (119) hide show
  1. package/dist/domain/checkoutBooking/event/createNotificationWhenCheckoutBookingExpired.d.ts +6 -0
  2. package/dist/domain/checkoutBooking/event/createNotificationWhenCheckoutBookingExpired.js +13 -0
  3. package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.d.ts +10 -0
  4. package/dist/infrastructure/domain/uiSetting/react/useIncrementIntroShownCount.js +11 -0
  5. package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.d.ts +6 -0
  6. package/dist/infrastructure/projection/uiSetting/react/useShouldIntroBeShown.js +7 -0
  7. package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.d.ts +6 -0
  8. package/dist/infrastructure/projection/uiSetting/react/useViewIntroShownCount.js +9 -0
  9. package/dist/infrastructure/ui/Root.d.ts +2 -1
  10. package/dist/infrastructure/ui/Root.js +2 -2
  11. package/dist/infrastructure/ui/components/layouts/layout/Layout.d.ts +11 -0
  12. package/dist/infrastructure/ui/components/layouts/layout/Layout.js +1 -0
  13. package/dist/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +6 -0
  14. package/dist/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +4 -0
  15. package/dist/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +6 -0
  16. package/dist/infrastructure/ui/components/layouts/layout/components/header/Header.js +5 -0
  17. package/dist/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +5 -0
  18. package/dist/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +21 -0
  19. package/dist/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +3 -0
  20. package/dist/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +15 -0
  21. package/dist/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +9 -0
  22. package/dist/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +10 -0
  23. package/dist/infrastructure/ui/components/templates/footer/Footer.d.ts +3 -0
  24. package/dist/infrastructure/ui/components/templates/footer/Footer.js +13 -0
  25. package/dist/infrastructure/ui/components/templates/header/Header.d.ts +5 -0
  26. package/dist/infrastructure/ui/components/templates/header/Header.js +5 -0
  27. package/dist/infrastructure/ui/components/templates/header/Header.style.d.ts +14 -0
  28. package/dist/infrastructure/ui/components/templates/header/Header.style.js +17 -0
  29. package/dist/infrastructure/ui/components/templates/header/buttonIconPlaceholder/ButtonIconPlaceholder.d.ts +3 -0
  30. package/dist/infrastructure/ui/components/templates/header/buttonIconPlaceholder/ButtonIconPlaceholder.js +5 -0
  31. package/dist/infrastructure/ui/components/templates/header/buttonIconPlaceholder/ButtonIconPlaceholder.style.d.ts +9 -0
  32. package/dist/infrastructure/ui/components/templates/header/buttonIconPlaceholder/ButtonIconPlaceholder.style.js +12 -0
  33. package/dist/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.d.ts +6 -0
  34. package/dist/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +24 -0
  35. package/dist/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +3 -0
  36. package/dist/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +11 -0
  37. package/dist/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +9 -0
  38. package/dist/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +12 -0
  39. package/dist/infrastructure/ui/components/templates/header/header/Header.d.ts +3 -0
  40. package/dist/infrastructure/ui/components/templates/header/header/Header.js +10 -0
  41. package/dist/infrastructure/ui/components/templates/header/header/Header.style.d.ts +9 -0
  42. package/dist/infrastructure/ui/components/templates/header/header/Header.style.js +12 -0
  43. package/dist/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.d.ts +6 -0
  44. package/dist/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +15 -0
  45. package/dist/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.d.ts +26 -0
  46. package/dist/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +35 -0
  47. package/dist/infrastructure/ui/components/templates/header/logo/Logo.d.ts +7 -0
  48. package/dist/infrastructure/ui/components/templates/header/logo/Logo.js +11 -0
  49. package/dist/infrastructure/ui/components/templates/header/logo/Logo.style.d.ts +7 -0
  50. package/dist/infrastructure/ui/components/templates/header/logo/Logo.style.js +8 -0
  51. package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.d.ts +13 -0
  52. package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.js +19 -0
  53. package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.style.ts.d.ts +6 -0
  54. package/dist/infrastructure/ui/components/templates/safeAreaScrollView/SafeAreaScrollView.style.ts.js +7 -0
  55. package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.d.ts +2 -0
  56. package/dist/infrastructure/ui/hooks/usePaymentInstrumentUpdateEvents.js +28 -0
  57. package/dist/infrastructure/ui/hooks/useToast.d.ts +11 -0
  58. package/dist/infrastructure/ui/hooks/useToast.js +49 -0
  59. package/dist/infrastructure/ui/routing/Routing.d.ts +2 -1
  60. package/dist/infrastructure/ui/routing/Routing.js +7 -7
  61. package/dist/infrastructure/ui/views/App.d.ts +0 -4
  62. package/dist/infrastructure/ui/views/App.js +2 -4
  63. package/dist/infrastructure/ui/views/checkout/Checkout.d.ts +2 -0
  64. package/dist/infrastructure/ui/views/checkout/Checkout.js +12 -6
  65. package/dist/infrastructure/ui/views/checkout/Checkout.style.d.ts +3 -0
  66. package/dist/infrastructure/ui/views/checkout/Checkout.style.js +3 -0
  67. package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.d.ts +7 -0
  68. package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.js +25 -0
  69. package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.style.d.ts +16 -0
  70. package/dist/infrastructure/ui/views/checkout/components/checkoutSuccessModal/CheckoutSuccessModal.style.js +19 -0
  71. package/dist/infrastructure/ui/views/feedback/Feedback.d.ts +2 -0
  72. package/dist/infrastructure/ui/views/feedback/Feedback.js +6 -6
  73. package/dist/infrastructure/ui/views/feedback/Feedback.style.d.ts +3 -0
  74. package/dist/infrastructure/ui/views/feedback/Feedback.style.js +4 -1
  75. package/dist/infrastructure/ui/views/intro/Intro.d.ts +6 -0
  76. package/dist/infrastructure/ui/views/intro/Intro.js +52 -0
  77. package/dist/infrastructure/ui/views/intro/Intro.style.d.ts +52 -0
  78. package/dist/infrastructure/ui/views/intro/Intro.style.js +55 -0
  79. package/dist/infrastructure/ui/views/item/Item.d.ts +2 -0
  80. package/dist/infrastructure/ui/views/item/Item.js +39 -3
  81. package/dist/infrastructure/ui/views/item/Item.style.d.ts +15 -0
  82. package/dist/infrastructure/ui/views/item/Item.style.js +18 -0
  83. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.d.ts +26 -0
  84. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.js +44 -0
  85. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.d.ts +45 -0
  86. package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.js +53 -0
  87. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.d.ts +7 -0
  88. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.js +25 -0
  89. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.d.ts +16 -0
  90. package/dist/infrastructure/ui/views/item/components/sizeChangeModal/SizeChangeModal.style.js +19 -0
  91. package/dist/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.js +2 -4
  92. package/dist/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.style.d.ts +3 -0
  93. package/dist/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.style.js +4 -1
  94. package/dist/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +5 -5
  95. package/dist/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.d.ts +6 -0
  96. package/dist/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.js +9 -0
  97. package/dist/infrastructure/ui/views/notFound/NotFound.d.ts +2 -0
  98. package/dist/infrastructure/ui/views/notFound/NotFound.js +9 -10
  99. package/dist/infrastructure/ui/views/notFound/NotFound.style.d.ts +1 -0
  100. package/dist/infrastructure/ui/views/notFound/NotFound.style.js +2 -1
  101. package/dist/infrastructure/ui/views/summary/Summary.d.ts +2 -0
  102. package/dist/infrastructure/ui/views/summary/Summary.js +11 -11
  103. package/dist/infrastructure/ui/views/summary/Summary.style.d.ts +3 -0
  104. package/dist/infrastructure/ui/views/summary/Summary.style.js +4 -1
  105. package/dist/shared/notifications/domain/notification/command/createNotification.d.ts +17 -0
  106. package/dist/shared/notifications/domain/notification/command/createNotification.js +7 -0
  107. package/dist/shared/notifications/infrastructure/domain/notification/react/useCreateNotification.d.ts +21 -0
  108. package/dist/shared/notifications/infrastructure/domain/notification/react/useCreateNotification.js +22 -0
  109. package/dist/shared/notifications/infrastructure/ui/components/NotificationItem.d.ts +12 -0
  110. package/dist/shared/notifications/infrastructure/ui/components/NotificationItem.js +24 -0
  111. package/dist/shared/notifications/infrastructure/ui/components/Notifications.d.ts +9 -0
  112. package/dist/shared/notifications/infrastructure/ui/components/Notifications.js +20 -0
  113. package/dist/shared/notifications/infrastructure/ui/components/Notifications.style.d.ts +36 -0
  114. package/dist/shared/notifications/infrastructure/ui/components/Notifications.style.js +31 -0
  115. package/dist/shared/tracking/infrastructure/usePageView.d.ts +13 -0
  116. package/dist/shared/tracking/infrastructure/usePageView.js +27 -0
  117. package/dist/shared/ui/components/atoms/error/Error.style.d.ts +6 -0
  118. package/dist/shared/ui/components/atoms/error/Error.style.js +9 -0
  119. package/package.json +1 -1
@@ -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 };
@@ -1,8 +1,10 @@
1
1
  import { FC } from "react";
2
2
  import { Country } from "../../../../projection/shared/country";
3
+ import { Layout } from "../../components/layouts/layout/Layout";
3
4
  interface ItemProps {
4
5
  readonly customerId: string;
5
6
  readonly country: Country;
7
+ readonly layout: Layout;
6
8
  }
7
9
  declare const Item: FC<ItemProps>;
8
10
  export { Item };
@@ -1,9 +1,12 @@
1
1
  import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
2
2
  import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
3
- import { useParams } from "react-router-native";
3
+ import { useMatch, useNavigate, useParams } from "react-router-native";
4
4
  import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
5
5
  import { useLogger } from "../../../../shared/logging/useLogger";
6
6
  import { useTrackItemPageView } from "../../../../shared/tracking/infrastructure/useTrackItemPageView";
7
+ import { useTrackPressBack } from "../../../../shared/tracking/infrastructure/useTrackPressBack";
8
+ import { useTrackPressNext } from "../../../../shared/tracking/infrastructure/useTrackPressNext";
9
+ import { useTrackPressPrevious } from "../../../../shared/tracking/infrastructure/useTrackPressPrevious";
7
10
  import { useTrackReturnItem } from "../../../../shared/tracking/infrastructure/useTrackReturnItem";
8
11
  import { Spinner } from "../../../../shared/ui/components/atoms/spinner/Spinner";
9
12
  import { useBookCheckoutBookingForCheckoutItem } from "../../../domain/checkoutBooking/react/useBookCheckoutBookingForCheckoutItem";
@@ -14,10 +17,14 @@ import { useViewIsSizeChangeEnabledByCheckoutId } from "../../../projection/chec
14
17
  import { useListReturnQuestionsByCheckoutItemId } from "../../../projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId";
15
18
  import { TrackingPage } from "../../../tracking/tracking";
16
19
  import { ReturnQuestionFeedbackProvider } from "../../components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback";
20
+ import { ItemDetailHeader } from "../../components/templates/header/itemDetailHeader/ItemDetailHeader";
21
+ import { ItemHeader } from "../../components/templates/header/itemHeader/ItemHeader";
22
+ import { Routes } from "../../routing/routes";
23
+ import { useBasePath } from "../../routing/useBasePath";
17
24
  import { ReturnQuestionsForm } from "./components/returnQuestionsForm/ReturnQuestionsForm";
18
25
  import { ItemWithCustomerDecission, } from "./views/itemWithCustomerDecission/ItemWithCustomerDecission";
19
26
  import { ItemWithoutCustomerDecission, } from "./views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission";
20
- const Item = ({ customerId, country }) => {
27
+ const Item = ({ customerId, country, layout: Layout }) => {
21
28
  const logger = useLogger();
22
29
  const { id } = useParams();
23
30
  const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
@@ -90,6 +97,35 @@ const Item = ({ customerId, country }) => {
90
97
  replaceableFor,
91
98
  unique: checkoutItem.productVariant.size.unique,
92
99
  });
100
+ const trackPressNext = useTrackPressNext();
101
+ const handleOnNext = useCallback(({ from, to }) => trackPressNext({
102
+ page: TrackingPage.ITEM,
103
+ country,
104
+ checkoutId: checkout?.id,
105
+ from,
106
+ to,
107
+ }), [checkout?.id, country, trackPressNext]);
108
+ const trackPressPrevious = useTrackPressPrevious();
109
+ const handleOnPrevious = useCallback(({ from, to }) => trackPressPrevious({
110
+ page: TrackingPage.ITEM,
111
+ country,
112
+ checkoutId: checkout?.id,
113
+ from,
114
+ to,
115
+ }), [checkout?.id, country, trackPressPrevious]);
116
+ const trackPressBack = useTrackPressBack();
117
+ const navigate = useNavigate();
118
+ const handleOnBack = useCallback(() => {
119
+ trackPressBack({
120
+ page: TrackingPage.ITEM,
121
+ country,
122
+ checkoutId: checkout?.id,
123
+ });
124
+ navigate(-1);
125
+ }, [checkout?.id, country, navigate, trackPressBack]);
126
+ const basePath = useBasePath();
127
+ const itemDetailRouteMatch = useMatch(`${basePath}/${Routes.ITEM_DETAIL}`);
128
+ const header = useMemo(() => itemDetailRouteMatch ? (React.createElement(ItemDetailHeader, { onBack: handleOnBack })) : (React.createElement(ItemHeader, { item: checkoutItem, items: checkout?.items, onNext: handleOnNext, onPrevious: handleOnPrevious })), [checkout?.items, checkoutItem, handleOnBack, handleOnNext, handleOnPrevious, itemDetailRouteMatch]);
93
129
  const dependenciesLoaded = checkoutStatus !== QueryStatus.LOADING &&
94
130
  checkout &&
95
131
  checkoutItem &&
@@ -103,7 +139,7 @@ const Item = ({ customerId, country }) => {
103
139
  return React.createElement(Spinner, null);
104
140
  }
105
141
  return (React.createElement(ReturnQuestionFeedbackProvider, { feedback: checkoutItem.feedbacks || {} },
106
- checkoutItem.status === CheckoutItemStatus.INITIAL ? (React.createElement(ItemWithoutCustomerDecission, { bookedProductsVariants: bookedProductsVariants, checkoutId: checkout.id, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, onReturn: showReturnQuestions })) : (React.createElement(ItemWithCustomerDecission, { checkoutId: checkout.id, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, returnQuestions: returnQuestions, onEditFeedback: showReturnQuestions })),
142
+ React.createElement(Layout, { header: header }, checkoutItem.status === CheckoutItemStatus.INITIAL ? (React.createElement(ItemWithoutCustomerDecission, { bookedProductsVariants: bookedProductsVariants, checkoutId: checkout.id, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, onReturn: showReturnQuestions })) : (React.createElement(ItemWithCustomerDecission, { checkoutId: checkout.id, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, returnQuestions: returnQuestions, onEditFeedback: showReturnQuestions }))),
107
143
  React.createElement(ReturnQuestionsForm, { returnQuestions: returnQuestions, visible: returnQuestionsVisible, onClose: hideReturnQuestions, onSubmit: returnItem })));
108
144
  };
109
145
  export { Item };
@@ -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 };
@@ -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 };
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ interface SizeChangeModalProps {
3
+ readonly visible: boolean;
4
+ readonly onDismiss: () => void;
5
+ }
6
+ declare const SizeChangeModal: FC<SizeChangeModalProps>;
7
+ export { SizeChangeModal };
@@ -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,16 @@
1
+ declare const style: {
2
+ button: {
3
+ flex: number;
4
+ };
5
+ modal: {
6
+ padding: number;
7
+ };
8
+ modalDescription: {
9
+ marginVertical: number;
10
+ textAlign: "center";
11
+ };
12
+ modalTitle: {
13
+ textAlign: "center";
14
+ };
15
+ };
16
+ export { style };
@@ -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 };
@@ -1,6 +1,6 @@
1
1
  import { CommandStatus } from "@lookiero/messaging-react";
2
2
  import React, { useCallback } from "react";
3
- import { View } from "react-native";
3
+ import { ScrollView, View } from "react-native";
4
4
  import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
5
5
  import { useLogger } from "../../../../../../shared/logging/useLogger";
6
6
  import { useTrackResetItem } from "../../../../../../shared/tracking/infrastructure/useTrackResetItem";
@@ -8,8 +8,6 @@ import { Spinner } from "../../../../../../shared/ui/components/atoms/spinner/Sp
8
8
  import { useResetCheckoutItem } from "../../../../../domain/checkoutItem/react/useResetCheckoutItem";
9
9
  import { TrackingPage } from "../../../../../tracking/tracking";
10
10
  import { Body } from "../../../../components/layouts/body/Body";
11
- import { SafeAreaScrollView } from "../../../../components/templates/SafeAreaScrollView";
12
- import { HEADER_HEIGHT } from "../../../navigation/components/header/Header.style";
13
11
  import { CustomerDecissionBanner, } from "../../components/banner/CustomerDecissionBanner";
14
12
  import { ReturnQuestionsFeedback } from "../../components/returnQuestionsFeedback/ReturnQuestionsFeedback";
15
13
  import { ProductVariant } from "../../views/productVariant/ProductVariant";
@@ -36,7 +34,7 @@ const ItemWithCustomerDecission = ({ country, checkoutId, checkoutItem, returnQu
36
34
  if (!dependenciesLoaded) {
37
35
  return React.createElement(Spinner, null);
38
36
  }
39
- return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: HEADER_HEIGHT },
37
+ return (React.createElement(ScrollView, { contentContainerStyle: style.container, showsVerticalScrollIndicator: false },
40
38
  React.createElement(Body, null,
41
39
  React.createElement(CustomerDecissionBanner, { checkoutItemStatus: checkoutItem.status, onPress: resetItem }),
42
40
  React.createElement(ProductVariant, { checkoutId: checkoutId, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant }, checkoutItem.status === CheckoutItemStatus.RETURNED && (React.createElement(View, { style: style.feedbackContainer },
@@ -1,4 +1,7 @@
1
1
  declare const style: {
2
+ container: {
3
+ paddingBottom: number;
4
+ };
2
5
  feedbackContainer: {
3
6
  borderTopColor: string;
4
7
  borderTopWidth: number;
@@ -1,7 +1,10 @@
1
1
  import { StyleSheet } from "react-native";
2
2
  import { theme } from "../../../../theme/theme";
3
- const { borderSize, colorGrayscaleM, spaceXL } = theme();
3
+ const { borderSize, colorGrayscaleM, spaceXL, spaceXXL } = theme();
4
4
  const style = StyleSheet.create({
5
+ container: {
6
+ paddingBottom: spaceXXL,
7
+ },
5
8
  feedbackContainer: {
6
9
  borderTopColor: colorGrayscaleM,
7
10
  borderTopWidth: borderSize,
@@ -1,6 +1,6 @@
1
1
  import { CommandStatus } from "@lookiero/messaging-react";
2
2
  import React, { useCallback, useState } from "react";
3
- import { Platform } from "react-native";
3
+ import { Platform, ScrollView } from "react-native";
4
4
  import "../../../../../../projection/checkout/viewFirstAvailableCheckoutByCustomerId";
5
5
  import { useLogger } from "../../../../../../shared/logging/useLogger";
6
6
  import { useTrackKeepItem } from "../../../../../../shared/tracking/infrastructure/useTrackKeepItem";
@@ -10,11 +10,10 @@ import { useKeepCheckoutItem } from "../../../../../domain/checkoutItem/react/us
10
10
  import { useReplaceCheckoutItem } from "../../../../../domain/checkoutItem/react/useReplaceCheckoutItem";
11
11
  import { TrackingPage } from "../../../../../tracking/tracking";
12
12
  import { Body } from "../../../../components/layouts/body/Body";
13
- import { SafeAreaScrollView } from "../../../../components/templates/SafeAreaScrollView";
14
- import { HEADER_HEIGHT } from "../../../navigation/components/header/Header.style";
15
13
  import { ItemActions } from "../../components/itemActions/ItemActions";
16
14
  import { SizeWithoutStockModal } from "../../components/sizeWithoutStockModal/SizeWithoutStockModal";
17
15
  import { ProductVariant } from "../productVariant/ProductVariant";
16
+ import { style } from "./ItemWithoutCustomerDecission.style";
18
17
  const ItemWithoutCustomerDecission = ({ country, checkoutId, checkoutItem, bookedProductsVariants, currentProductVariant, onReturn, }) => {
19
18
  const logger = useLogger();
20
19
  /* KeepCheckoutItem */
@@ -58,8 +57,9 @@ const ItemWithoutCustomerDecission = ({ country, checkoutId, checkoutItem, booke
58
57
  }
59
58
  return (React.createElement(React.Fragment, null,
60
59
  React.createElement(SizeWithoutStockModal, { visible: sizeWithoutStockModalVisible, onDismiss: handleOnHideSizeWithoutStockModal }),
61
- React.createElement(SafeAreaScrollView, { scrollerPaddingTop: HEADER_HEIGHT, footer: React.createElement(ItemActions, { country: country, currentProductVariant: currentProductVariant, productVariants: bookedProductsVariants?.productVariants, onKeep: handleOnKeep, onLayout: handleOnStickyLayout, onReplace: handleOnReplace, onReturn: onReturn, onSizeSelectorPress: handleOnShowSizeWithoutStockModal }) },
60
+ React.createElement(ScrollView, { contentContainerStyle: style.container, showsVerticalScrollIndicator: false },
62
61
  React.createElement(Body, null,
63
- React.createElement(ProductVariant, { checkoutId: checkoutId, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, style: { content: { paddingBottom: Platform.OS === "web" ? 0 : stickyHeight } } })))));
62
+ React.createElement(ProductVariant, { checkoutId: checkoutId, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, style: { content: { paddingBottom: Platform.OS === "web" ? 0 : stickyHeight } } }))),
63
+ React.createElement(ItemActions, { country: country, currentProductVariant: currentProductVariant, productVariants: bookedProductsVariants?.productVariants, onKeep: handleOnKeep, onLayout: handleOnStickyLayout, onReplace: handleOnReplace, onReturn: onReturn, onSizeSelectorPress: handleOnShowSizeWithoutStockModal })));
64
64
  };
65
65
  export { ItemWithoutCustomerDecission };
@@ -0,0 +1,6 @@
1
+ declare const style: {
2
+ container: {
3
+ paddingBottom: number;
4
+ };
5
+ };
6
+ export { style };
@@ -0,0 +1,9 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { theme } from "../../../../theme/theme";
3
+ const { spaceXXL } = theme();
4
+ const style = StyleSheet.create({
5
+ container: {
6
+ paddingBottom: spaceXXL,
7
+ },
8
+ });
9
+ export { style };
@@ -1,8 +1,10 @@
1
1
  import { FC } from "react";
2
2
  import { Country } from "../../../../projection/shared/country";
3
+ import { Layout } from "../../components/layouts/layout/Layout";
3
4
  interface NotFoundProps {
4
5
  readonly customerId: string;
5
6
  readonly country: Country;
7
+ readonly layout: Layout;
6
8
  }
7
9
  declare const NotFound: FC<NotFoundProps>;
8
10
  export { NotFound };
@@ -2,7 +2,7 @@ import { Button, Text } from "@lookiero/aurora";
2
2
  import { useI18nMessage } from "@lookiero/i18n-react";
3
3
  import { QueryStatus } from "@lookiero/messaging-react";
4
4
  import React, { useCallback } from "react";
5
- import { Image } from "react-native";
5
+ import { Image, ScrollView } from "react-native";
6
6
  import { useNavigate } from "react-router-native";
7
7
  import { useTrackPageView } from "../../../../shared/tracking/infrastructure/useTrackPageView";
8
8
  import { AspectRatioView } from "../../../../shared/ui/components/atoms/aspectRatioView/AspectRatioView";
@@ -10,13 +10,11 @@ import { Spinner } from "../../../../shared/ui/components/atoms/spinner/Spinner"
10
10
  import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
11
11
  import { TrackingPage } from "../../../tracking/tracking";
12
12
  import { Body } from "../../components/layouts/body/Body";
13
- import { SafeAreaScrollView } from "../../components/templates/SafeAreaScrollView";
14
13
  import { I18nMessages } from "../../i18n/i18n";
15
14
  import { Routes } from "../../routing/routes";
16
15
  import { useBasePath } from "../../routing/useBasePath";
17
- import { HEADER_HEIGHT } from "../navigation/components/header/Header.style";
18
16
  import { style } from "./NotFound.style";
19
- const NotFound = ({ customerId, country }) => {
17
+ const NotFound = ({ customerId, country, layout: Layout }) => {
20
18
  const descriptionText = useI18nMessage({ id: I18nMessages.NOT_FOUND_DESCRIPTION });
21
19
  const buttonText = useI18nMessage({ id: I18nMessages.NOT_FOUND_BUTTON });
22
20
  const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
@@ -32,11 +30,12 @@ const NotFound = ({ customerId, country }) => {
32
30
  const dependenciesLoaded = dependenciesLoadedStatuses.includes(checkoutStatus);
33
31
  if (!dependenciesLoaded)
34
32
  return React.createElement(Spinner, null);
35
- return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: HEADER_HEIGHT, style: { scrollView: style.container } },
36
- React.createElement(Body, { style: { column: style.bodyColumn } },
37
- React.createElement(AspectRatioView, { aspectRatio: 1.25 },
38
- React.createElement(Image, { resizeMode: "contain", source: require("../../../../public/images/not-found.png"), style: style.image, testID: "not-found-image" })),
39
- React.createElement(Text, { level: 1, style: style.description }, descriptionText),
40
- React.createElement(Button, { onPress: handleOnPress }, buttonText))));
33
+ return (React.createElement(Layout, null,
34
+ React.createElement(ScrollView, { contentContainerStyle: style.container, showsVerticalScrollIndicator: false },
35
+ React.createElement(Body, { style: { column: style.bodyColumn } },
36
+ React.createElement(AspectRatioView, { aspectRatio: 1.25 },
37
+ React.createElement(Image, { resizeMode: "contain", source: require("../../../../public/images/not-found.png"), style: style.image, testID: "not-found-image" })),
38
+ React.createElement(Text, { level: 1, style: style.description }, descriptionText),
39
+ React.createElement(Button, { onPress: handleOnPress }, buttonText)))));
41
40
  };
42
41
  export { NotFound };
@@ -4,6 +4,7 @@ declare const style: {
4
4
  };
5
5
  container: {
6
6
  flex: number;
7
+ paddingBottom: number;
7
8
  };
8
9
  description: {
9
10
  marginBottom: number;
@@ -1,12 +1,13 @@
1
1
  import { StyleSheet } from "react-native";
2
2
  import { theme } from "../../theme/theme";
3
- const { spaceXL } = theme();
3
+ const { spaceXL, spaceXXL } = theme();
4
4
  const style = StyleSheet.create({
5
5
  bodyColumn: {
6
6
  paddingHorizontal: spaceXL,
7
7
  },
8
8
  container: {
9
9
  flex: 1,
10
+ paddingBottom: spaceXXL,
10
11
  },
11
12
  description: {
12
13
  marginBottom: spaceXL,
@@ -1,8 +1,10 @@
1
1
  import { FC } from "react";
2
2
  import { Country } from "../../../../projection/shared/country";
3
+ import { Layout } from "../../components/layouts/layout/Layout";
3
4
  interface SummaryProps {
4
5
  readonly customerId: string;
5
6
  readonly country: Country;
7
+ readonly layout: Layout;
6
8
  }
7
9
  declare const Summary: FC<SummaryProps>;
8
10
  export { Summary };