@lookiero/checkout 8.13.2-beta.0 → 8.13.2-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.
@@ -141,7 +141,7 @@ const Item = ({ layout: Layout }) => {
141
141
  return React.createElement(Spinner, { testID: "spinner" });
142
142
  }
143
143
  return (React.createElement(ReturnQuestionFeedbackProvider, { key: checkoutItem.id, feedback: checkoutItem.feedbacks || {} },
144
- React.createElement(Layout, { header: header, scrollEnabled: !itemWithoutCustomerDecission, style: {
144
+ React.createElement(Layout, { footer: null, header: header, scrollEnabled: !itemWithoutCustomerDecission, style: {
145
145
  header: fiveItemsDiscount !== 0 ? style.headerWithDoubleHeight : style.header,
146
146
  scrollView: { height: itemWithoutCustomerDecission ? "100%" : "auto" },
147
147
  safeAreaView: isDesktopScreen ? style.safeAreaView : null,
@@ -2,11 +2,10 @@ import { PortalHost } from "@gorhom/portal";
2
2
  import React, { useCallback, useMemo } from "react";
3
3
  import { ScrollView } from "react-native";
4
4
  import { generatePath, useNavigate } from "react-router-native";
5
- import { Box, Button, Layout as AuroraLayout, Spinner, Text, View } from "@lookiero/aurora";
5
+ import { Box, Button, Layout as AuroraLayout, Spinner, Text, View, useDevice } from "@lookiero/aurora";
6
6
  import { useI18nMessage } from "@lookiero/i18n-react";
7
7
  import { CommandStatus } from "@lookiero/messaging-react";
8
8
  import { useLogger } from "@lookiero/sty-psp-logging";
9
- import { useScreenSize } from "@lookiero/sty-psp-ui";
10
9
  import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion";
11
10
  import { useReturnCheckoutItem } from "../../../../../domain/checkoutItem/react/useReturnCheckoutItem";
12
11
  import { useListReturnQuestionsByCheckoutItemId } from "../../../../../projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId";
@@ -42,8 +41,7 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
42
41
  const navigate = useNavigate();
43
42
  const basePath = useBasePath();
44
43
  const logger = useLogger();
45
- const screenSize = useScreenSize();
46
- const isDesktopScreen = screenSize !== "S";
44
+ const { screen } = useDevice();
47
45
  const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
48
46
  const descriptionText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
49
47
  const submitButtonText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
@@ -96,16 +94,16 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
96
94
  }
97
95
  return (React.createElement(ReturnQuestionItemProvider, { returnQuestionItems: returnQuestionItems },
98
96
  React.createElement(PortalHost, { name: RETURN_QUESTION_FORM_PORTAL_HOST_NAME }),
99
- React.createElement(Layout, { header: header, scrollEnabled: false, style: {
100
- header: style.header,
97
+ React.createElement(Layout, { footer: null, header: header, scrollEnabled: false, style: {
98
+ safeAreaView: style.safeAreaView,
101
99
  scrollView: style.scrollView,
102
- safeAreaView: isDesktopScreen ? style.safeAreaView : null,
100
+ header: style.header,
103
101
  } },
104
102
  React.createElement(ProductVariantPreview, { country: country, item: checkoutItem }),
105
103
  React.createElement(ScrollView, { showsVerticalScrollIndicator: false, testID: "return-questions-form" },
106
- React.createElement(AuroraLayout, { fullWidth: !isDesktopScreen, style: [style.layout, isDesktopScreen ? style.desktopLayoutSpacing : undefined] },
104
+ React.createElement(AuroraLayout, { fullWidth: !screen.L, style: [style.layout, screen.L ? style.desktopLayoutSpacing : undefined] },
107
105
  React.createElement(Box, { size: { L: "2/3" } },
108
- React.createElement(View, { style: [style.info, isDesktopScreen && style.desktopInfo] },
106
+ React.createElement(View, { style: [style.info, !screen.S && style.desktopInfo] },
109
107
  React.createElement(Text, { level: 3, heading: true }, titleText),
110
108
  React.createElement(Text, { level: 1, style: style.description, detail: true }, descriptionText)),
111
109
  React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
@@ -31,7 +31,7 @@ declare const style: {
31
31
  flex: number;
32
32
  };
33
33
  scrollView: {
34
- height: "100%";
34
+ flex: number;
35
35
  };
36
36
  submit: {
37
37
  backgroundColor: string;
@@ -35,8 +35,7 @@ const style = StyleSheet.create({
35
35
  flex: 1,
36
36
  },
37
37
  scrollView: {
38
- // flex: 1,
39
- height: "100%",
38
+ flex: 1,
40
39
  },
41
40
  submit: {
42
41
  backgroundColor: colorBgBase,
@@ -1 +1 @@
1
- export declare const VERSION = "8.13.2-beta.0";
1
+ export declare const VERSION = "8.13.2-beta.1";
@@ -1 +1 @@
1
- export const VERSION = "8.13.2-beta.0";
1
+ export const VERSION = "8.13.2-beta.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "8.13.2-beta.0",
3
+ "version": "8.13.2-beta.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": "false",
@@ -218,6 +218,7 @@ const Item: FC<ItemProps> = ({ layout: Layout }) => {
218
218
  return (
219
219
  <ReturnQuestionFeedbackProvider key={checkoutItem.id} feedback={checkoutItem.feedbacks || {}}>
220
220
  <Layout
221
+ footer={null}
221
222
  header={header}
222
223
  scrollEnabled={!itemWithoutCustomerDecission}
223
224
  style={{
@@ -37,8 +37,7 @@ const style = StyleSheet.create({
37
37
  flex: 1,
38
38
  },
39
39
  scrollView: {
40
- // flex: 1,
41
- height: "100%",
40
+ flex: 1,
42
41
  },
43
42
  submit: {
44
43
  backgroundColor: colorBgBase,
@@ -2,13 +2,13 @@ import { PortalHost } from "@gorhom/portal";
2
2
  import React, { FC, useCallback, useMemo } from "react";
3
3
  import { ScrollView } from "react-native";
4
4
  import { generatePath, useNavigate } from "react-router-native";
5
- import { Box, Button, Layout as AuroraLayout, Spinner, Text, View } from "@lookiero/aurora";
5
+ import { Box, Button, Layout as AuroraLayout, Spinner, Text, View, useDevice } from "@lookiero/aurora";
6
6
  import { useI18nMessage } from "@lookiero/i18n-react";
7
7
  import { CommandStatus } from "@lookiero/messaging-react";
8
8
  import { Country } from "@lookiero/sty-psp-locale";
9
9
  import { useLogger } from "@lookiero/sty-psp-logging";
10
10
  import { Segment } from "@lookiero/sty-psp-segment";
11
- import { Layout as UiLayout, useScreenSize } from "@lookiero/sty-psp-ui";
11
+ import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
12
12
  import { CheckoutProjection } from "../../../../../../projection/checkout/checkout";
13
13
  import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
14
14
  import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion";
@@ -67,8 +67,7 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
67
67
  const basePath = useBasePath();
68
68
  const logger = useLogger();
69
69
 
70
- const screenSize = useScreenSize();
71
- const isDesktopScreen = screenSize !== "S";
70
+ const { screen } = useDevice();
72
71
 
73
72
  const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
74
73
  const descriptionText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
@@ -143,23 +142,21 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
143
142
  <PortalHost name={RETURN_QUESTION_FORM_PORTAL_HOST_NAME} />
144
143
 
145
144
  <Layout
145
+ footer={null}
146
146
  header={header}
147
147
  scrollEnabled={false}
148
148
  style={{
149
- header: style.header,
149
+ safeAreaView: style.safeAreaView,
150
150
  scrollView: style.scrollView,
151
- safeAreaView: isDesktopScreen ? style.safeAreaView : null,
151
+ header: style.header,
152
152
  }}
153
153
  >
154
154
  <ProductVariantPreview country={country} item={checkoutItem} />
155
155
 
156
156
  <ScrollView showsVerticalScrollIndicator={false} testID="return-questions-form">
157
- <AuroraLayout
158
- fullWidth={!isDesktopScreen}
159
- style={[style.layout, isDesktopScreen ? style.desktopLayoutSpacing : undefined]}
160
- >
157
+ <AuroraLayout fullWidth={!screen.L} style={[style.layout, screen.L ? style.desktopLayoutSpacing : undefined]}>
161
158
  <Box size={{ L: "2/3" }}>
162
- <View style={[style.info, isDesktopScreen && style.desktopInfo]}>
159
+ <View style={[style.info, !screen.S && style.desktopInfo]}>
163
160
  <Text level={3} heading>
164
161
  {titleText}
165
162
  </Text>