@lookiero/checkout 1.1.4 → 1.1.5

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.
@@ -5,11 +5,11 @@ import { theme } from "../../theme/theme";
5
5
  import { style } from "./SafeAreaScrollView.style.ts";
6
6
  const { spaceXXXL } = theme();
7
7
  const SafeAreaScrollView = ({ children, footer, edges = ["top", "left", "right"], style: customStyle, scrollerPaddingTop = 0, }) => {
8
- const { top: safeAreaInsetTop, bottom: safeAreaInsetBottom } = useSafeAreaInsets();
8
+ const { bottom: safeAreaInsetBottom } = useSafeAreaInsets();
9
9
  return (React.createElement(SafeAreaView, { edges: edges, style: [style.safeAreaView, customStyle?.safeAreaView] },
10
10
  React.createElement(ScrollView, { contentContainerStyle: [
11
11
  {
12
- paddingTop: safeAreaInsetTop + scrollerPaddingTop,
12
+ paddingTop: scrollerPaddingTop,
13
13
  paddingBottom: safeAreaInsetBottom + (Platform.OS === "android" ? spaceXXXL : 0),
14
14
  },
15
15
  customStyle?.scrollView,
@@ -2,7 +2,7 @@ import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Tex
2
2
  import { useI18nMessage } from "@lookiero/i18n-react";
3
3
  import { QueryStatus } from "@lookiero/messaging-react";
4
4
  import React, { useCallback, useMemo } from "react";
5
- import { Platform, View } from "react-native";
5
+ import { View } from "react-native";
6
6
  import { useNavigate } from "react-router-native";
7
7
  import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
8
8
  import { useTrackPageView } from "../../../../shared/tracking/infrastructure/useTrackPageView";
@@ -50,7 +50,7 @@ const Checkout = ({ children, customerId, country, useRedirect }) => {
50
50
  if (!dependenciesLoaded)
51
51
  return React.createElement(Spinner, null);
52
52
  return (React.createElement(React.Fragment, null,
53
- React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0 },
53
+ React.createElement(SafeAreaScrollView, { scrollerPaddingTop: HEADER_HEIGHT },
54
54
  React.createElement(Body, { style: { column: style.bodyColumn } },
55
55
  hasReplacedCheckoutItem && (React.createElement(View, { style: style.deliveryBannerContainer },
56
56
  React.createElement(DeliveryBanner, null))),
@@ -1,6 +1,5 @@
1
1
  import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
2
2
  import React, { useCallback, useEffect, useRef } from "react";
3
- import { Platform } from "react-native";
4
3
  import { CheckoutQuestionType } from "../../../../projection/checkoutQuestion/checkoutQuestion";
5
4
  import { useLogger } from "../../../../shared/logging/useLogger";
6
5
  import { useTrackChangeFeedback } from "../../../../shared/tracking/infrastructure/useTrackChangeFeedback";
@@ -76,7 +75,7 @@ const Feedback = ({ customerId, country }) => {
76
75
  if (!dependenciesLoaded)
77
76
  return React.createElement(Spinner, null);
78
77
  return (React.createElement(CheckoutQuestionFeedbackProvider, { feedback: {}, onChanged: handleOnChangedFeedback },
79
- React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0 },
78
+ React.createElement(SafeAreaScrollView, { scrollerPaddingTop: HEADER_HEIGHT },
80
79
  React.createElement(Body, { style: { column: style.bodyColumn } },
81
80
  React.createElement(CheckoutQuestionsForm, { checkoutQuestions: checkoutQuestions || [], submitButtonDisabled: giveCheckoutFeedbackStatus === CommandStatus.LOADING, onSubmit: handleOnSubmit })))));
82
81
  };
@@ -1,6 +1,6 @@
1
1
  import { CommandStatus } from "@lookiero/messaging-react";
2
2
  import React, { useCallback } from "react";
3
- import { Platform, View } from "react-native";
3
+ import { 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";
@@ -36,7 +36,7 @@ const ItemWithCustomerDecission = ({ country, checkoutId, checkoutItem, returnQu
36
36
  if (!dependenciesLoaded) {
37
37
  return React.createElement(Spinner, null);
38
38
  }
39
- return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0 },
39
+ return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: HEADER_HEIGHT },
40
40
  React.createElement(Body, null,
41
41
  React.createElement(CustomerDecissionBanner, { checkoutItemStatus: checkoutItem.status, onPress: resetItem }),
42
42
  React.createElement(ProductVariant, { checkoutId: checkoutId, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant }, checkoutItem.status === CheckoutItemStatus.RETURNED && (React.createElement(View, { style: style.feedbackContainer },
@@ -60,7 +60,7 @@ const ItemWithoutCustomerDecission = ({ country, checkoutId, checkoutItem, booke
60
60
  }
61
61
  return (React.createElement(React.Fragment, null,
62
62
  React.createElement(SizeWithoutStockModal, { visible: sizeWithoutStockModalVisible, onDismiss: handleOnHideSizeWithoutStockModal }),
63
- React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0, footer: React.createElement(ItemActions, { country: country, currentProductVariant: currentProductVariant, productVariants: bookedProductsVariants?.productVariants, onKeep: handleOnKeep, onLayout: handleOnStickyLayout, onReplace: handleOnReplace, onReturn: onReturn, onSizeSelectorPress: handleOnShowSizeWithoutStockModal }) },
63
+ 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 }) },
64
64
  React.createElement(Body, null,
65
65
  React.createElement(ProductVariant, { checkoutId: checkoutId, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, style: { content: { paddingBottom: Platform.OS === "web" ? spaceXL : stickyHeight } } })))));
66
66
  };
@@ -3,7 +3,7 @@ import { Text } from "@lookiero/aurora-next/build/components/primitives/Text/Tex
3
3
  import { useI18nMessage } from "@lookiero/i18n-react";
4
4
  import { QueryStatus } from "@lookiero/messaging-react";
5
5
  import React, { useCallback } from "react";
6
- import { Image, Platform } from "react-native";
6
+ import { Image } from "react-native";
7
7
  import { useNavigate } from "react-router-native";
8
8
  import { useTrackPageView } from "../../../../shared/tracking/infrastructure/useTrackPageView";
9
9
  import { AspectRatioView } from "../../../../shared/ui/components/atoms/aspectRatioView/AspectRatioView";
@@ -33,7 +33,7 @@ const NotFound = ({ customerId, country }) => {
33
33
  const dependenciesLoaded = dependenciesLoadedStatuses.includes(checkoutStatus);
34
34
  if (!dependenciesLoaded)
35
35
  return React.createElement(Spinner, null);
36
- return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0, style: { scrollView: style.container } },
36
+ return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: HEADER_HEIGHT, style: { scrollView: style.container } },
37
37
  React.createElement(Body, { style: { column: style.bodyColumn } },
38
38
  React.createElement(AspectRatioView, { aspectRatio: 1.25 },
39
39
  React.createElement(Image, { resizeMode: "contain", source: require("../../../../public/images/not-found.png"), style: style.image, testID: "not-found-image" })),
@@ -85,7 +85,7 @@ const Summary = ({ customerId, country }) => {
85
85
  dependenciesLoadedStatuses.includes(fiveItemsDiscountStatus);
86
86
  if (!dependenciesLoaded)
87
87
  return React.createElement(Spinner, null);
88
- return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: Platform.OS === "web" || Platform.OS === "android" ? HEADER_HEIGHT : 0, footer: pricing && (React.createElement(StickyPricing, { collapsed: pricingCollapsed, pricing: pricing, totalCheckoutItemsKept: checkoutItemsKept?.length || 0, onLayout: Platform.OS !== "web" ? handleOnPricingLayout : undefined, onPress: handleOnPressPricing, onSubmit: handleOnSubmit })) },
88
+ return (React.createElement(SafeAreaScrollView, { scrollerPaddingTop: HEADER_HEIGHT, footer: pricing && (React.createElement(StickyPricing, { collapsed: pricingCollapsed, pricing: pricing, totalCheckoutItemsKept: checkoutItemsKept?.length || 0, onLayout: Platform.OS !== "web" ? handleOnPricingLayout : undefined, onPress: handleOnPressPricing, onSubmit: handleOnSubmit })) },
89
89
  React.createElement(Body, { style: { row: { paddingBottom: pricingHeight || spaceXL } } },
90
90
  fiveItemsDiscount !== 0 && React.createElement(FiveItemsDiscountBanner, { fiveItemsDiscount: fiveItemsDiscount }),
91
91
  React.createElement(View, { style: style.content },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [