@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.
- package/dist/src/infrastructure/ui/views/item/Item.js +1 -1
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +7 -9
- 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 +1 -2
- 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/item/Item.tsx +1 -0
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +1 -2
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +8 -11
|
@@ -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
|
|
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
|
-
|
|
97
|
+
React.createElement(Layout, { footer: null, header: header, scrollEnabled: false, style: {
|
|
98
|
+
safeAreaView: style.safeAreaView,
|
|
101
99
|
scrollView: style.scrollView,
|
|
102
|
-
|
|
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: !
|
|
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,
|
|
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 }),
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "8.13.2-beta.
|
|
1
|
+
export declare const VERSION = "8.13.2-beta.1";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "8.13.2-beta.
|
|
1
|
+
export const VERSION = "8.13.2-beta.1";
|
package/package.json
CHANGED
|
@@ -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={{
|
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 } 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
|
|
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
|
|
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
|
-
|
|
149
|
+
safeAreaView: style.safeAreaView,
|
|
150
150
|
scrollView: style.scrollView,
|
|
151
|
-
|
|
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,
|
|
159
|
+
<View style={[style.info, !screen.S && style.desktopInfo]}>
|
|
163
160
|
<Text level={3} heading>
|
|
164
161
|
{titleText}
|
|
165
162
|
</Text>
|