@lookiero/checkout 8.13.1-beta.0 → 8.13.2-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/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +8 -6
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +2 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +2 -1
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +11 -7
|
@@ -2,10 +2,11 @@ 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
|
|
5
|
+
import { Box, Button, Layout as AuroraLayout, Spinner, Text, View } 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";
|
|
9
10
|
import { ReturnQuestionType } from "../../../../../../projection/returnQuestion/returnQuestion";
|
|
10
11
|
import { useReturnCheckoutItem } from "../../../../../domain/checkoutItem/react/useReturnCheckoutItem";
|
|
11
12
|
import { useListReturnQuestionsByCheckoutItemId } from "../../../../../projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId";
|
|
@@ -41,7 +42,8 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
41
42
|
const navigate = useNavigate();
|
|
42
43
|
const basePath = useBasePath();
|
|
43
44
|
const logger = useLogger();
|
|
44
|
-
const
|
|
45
|
+
const screenSize = useScreenSize();
|
|
46
|
+
const isDesktopScreen = screenSize !== "S";
|
|
45
47
|
const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
|
|
46
48
|
const descriptionText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
|
|
47
49
|
const submitButtonText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_SUBMIT_BUTTON });
|
|
@@ -95,15 +97,15 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
95
97
|
return (React.createElement(ReturnQuestionItemProvider, { returnQuestionItems: returnQuestionItems },
|
|
96
98
|
React.createElement(PortalHost, { name: RETURN_QUESTION_FORM_PORTAL_HOST_NAME }),
|
|
97
99
|
React.createElement(Layout, { header: header, scrollEnabled: false, style: {
|
|
98
|
-
safeAreaView: style.safeAreaView,
|
|
99
|
-
scrollView: style.scrollView,
|
|
100
100
|
header: style.header,
|
|
101
|
+
scrollView: style.scrollView,
|
|
102
|
+
safeAreaView: isDesktopScreen ? style.safeAreaView : null,
|
|
101
103
|
} },
|
|
102
104
|
React.createElement(ProductVariantPreview, { country: country, item: checkoutItem }),
|
|
103
105
|
React.createElement(ScrollView, { showsVerticalScrollIndicator: false, testID: "return-questions-form" },
|
|
104
|
-
React.createElement(AuroraLayout, { fullWidth: !
|
|
106
|
+
React.createElement(AuroraLayout, { fullWidth: !isDesktopScreen, style: [style.layout, isDesktopScreen ? style.desktopLayoutSpacing : undefined] },
|
|
105
107
|
React.createElement(Box, { size: { L: "2/3" } },
|
|
106
|
-
React.createElement(View, { style: [style.info,
|
|
108
|
+
React.createElement(View, { style: [style.info, isDesktopScreen && style.desktopInfo] },
|
|
107
109
|
React.createElement(Text, { level: 3, heading: true }, titleText),
|
|
108
110
|
React.createElement(Text, { level: 1, style: style.description, detail: true }, descriptionText)),
|
|
109
111
|
React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "8.13.
|
|
1
|
+
export declare const VERSION = "8.13.2-beta.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "8.13.
|
|
1
|
+
export const VERSION = "8.13.2-beta.0";
|
package/package.json
CHANGED
package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx
CHANGED
|
@@ -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
|
|
5
|
+
import { Box, Button, Layout as AuroraLayout, Spinner, Text, View } 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 } from "@lookiero/sty-psp-ui";
|
|
11
|
+
import { Layout as UiLayout, useScreenSize } 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,7 +67,8 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
|
|
|
67
67
|
const basePath = useBasePath();
|
|
68
68
|
const logger = useLogger();
|
|
69
69
|
|
|
70
|
-
const
|
|
70
|
+
const screenSize = useScreenSize();
|
|
71
|
+
const isDesktopScreen = screenSize !== "S";
|
|
71
72
|
|
|
72
73
|
const titleText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_TITLE });
|
|
73
74
|
const descriptionText = useI18nMessage({ id: I18nMessages.RETURN_QUESTIONS_DESCRIPTION });
|
|
@@ -145,17 +146,20 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
|
|
|
145
146
|
header={header}
|
|
146
147
|
scrollEnabled={false}
|
|
147
148
|
style={{
|
|
148
|
-
safeAreaView: style.safeAreaView,
|
|
149
|
-
scrollView: style.scrollView,
|
|
150
149
|
header: style.header,
|
|
150
|
+
scrollView: style.scrollView,
|
|
151
|
+
safeAreaView: isDesktopScreen ? style.safeAreaView : null,
|
|
151
152
|
}}
|
|
152
153
|
>
|
|
153
154
|
<ProductVariantPreview country={country} item={checkoutItem} />
|
|
154
155
|
|
|
155
156
|
<ScrollView showsVerticalScrollIndicator={false} testID="return-questions-form">
|
|
156
|
-
<AuroraLayout
|
|
157
|
+
<AuroraLayout
|
|
158
|
+
fullWidth={!isDesktopScreen}
|
|
159
|
+
style={[style.layout, isDesktopScreen ? style.desktopLayoutSpacing : undefined]}
|
|
160
|
+
>
|
|
157
161
|
<Box size={{ L: "2/3" }}>
|
|
158
|
-
<View style={[style.info,
|
|
162
|
+
<View style={[style.info, isDesktopScreen && style.desktopInfo]}>
|
|
159
163
|
<Text level={3} heading>
|
|
160
164
|
{titleText}
|
|
161
165
|
</Text>
|