@lookiero/checkout 6.5.0-beta.5 → 6.5.1-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/ab-testing/kameleoonEnvironment.d.ts +3 -3
- package/dist/src/infrastructure/ui/views/checkout/Checkout.d.ts +2 -2
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +2 -2
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +2 -1
- package/dist/src/infrastructure/ui/views/feedback/Feedback.js +5 -2
- package/dist/src/infrastructure/ui/views/feedback/Feedback.style.d.ts +5 -4
- package/dist/src/infrastructure/ui/views/feedback/Feedback.style.js +7 -6
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +1 -4
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.js +0 -1
- package/dist/src/infrastructure/ui/views/return/Return.d.ts +2 -2
- package/dist/src/infrastructure/ui/views/return/Return.js +4 -4
- package/dist/src/infrastructure/ui/views/summary/Summary.d.ts +2 -2
- package/dist/src/infrastructure/ui/views/summary/Summary.js +2 -2
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +3 -3
- package/src/infrastructure/ab-testing/kameleoonEnvironment.ts +3 -3
- package/src/infrastructure/ui/views/checkout/Checkout.style.ts +2 -1
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +5 -5
- package/src/infrastructure/ui/views/feedback/Feedback.style.ts +7 -6
- package/src/infrastructure/ui/views/feedback/Feedback.tsx +5 -3
- package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.tsx +3 -7
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.ts +0 -1
- package/src/infrastructure/ui/views/return/Return.tsx +8 -8
- package/src/infrastructure/ui/views/summary/Summary.tsx +5 -5
- package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.ts +0 -13
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
interface Experiment
|
|
1
|
+
interface Experiment {
|
|
2
2
|
readonly id: string;
|
|
3
|
-
readonly variations: Record<
|
|
3
|
+
readonly variations: Record<string, string>;
|
|
4
4
|
}
|
|
5
5
|
interface KameleoonEnvironment {
|
|
6
6
|
readonly siteCode: string;
|
|
7
7
|
readonly experiments: {
|
|
8
|
-
readonly newFeedback: Experiment
|
|
8
|
+
readonly newFeedback: Experiment;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
export type { KameleoonEnvironment };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FC, ReactNode } from "react";
|
|
2
|
-
import { Layout as
|
|
2
|
+
import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
|
|
3
3
|
interface CheckoutProps {
|
|
4
4
|
readonly children?: ReactNode;
|
|
5
|
-
readonly layout:
|
|
5
|
+
readonly layout: UiLayout;
|
|
6
6
|
readonly useRedirect: () => Record<string, string>;
|
|
7
7
|
}
|
|
8
8
|
declare const Checkout: FC<CheckoutProps>;
|
|
@@ -23,7 +23,7 @@ import { Pricing } from "../summary/components/pricing/Pricing";
|
|
|
23
23
|
import { style } from "./Checkout.style";
|
|
24
24
|
import { DeliveryBanner } from "./components/deliveryBanner/DeliveryBanner";
|
|
25
25
|
import { PaymentInstrument } from "./components/paymentInstrument/PaymentInstrument";
|
|
26
|
-
const Checkout = ({ children, layout:
|
|
26
|
+
const Checkout = ({ children, layout: UiLayout, useRedirect }) => {
|
|
27
27
|
const { customer: { customerId, country, segment }, } = useStaticInfo();
|
|
28
28
|
const titleText = useI18nMessage({ id: I18nMessages.CHECKOUT_TITLE });
|
|
29
29
|
const submitButtonText = useI18nMessage({ id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
@@ -68,7 +68,7 @@ const Checkout = ({ children, layout: LocalLayout, useRedirect }) => {
|
|
|
68
68
|
if (!dependenciesLoaded) {
|
|
69
69
|
return React.createElement(Spinner, null);
|
|
70
70
|
}
|
|
71
|
-
return (React.createElement(
|
|
71
|
+
return (React.createElement(UiLayout, { header: React.createElement(CheckoutHeader, { onBack: handleOnBack }), scrollEnabled: false, style: {
|
|
72
72
|
header: style.header,
|
|
73
73
|
scrollView: style.scrollView,
|
|
74
74
|
} },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet, Platform } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
|
-
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space3, space4, space6, space12, space16 } = theme();
|
|
4
|
+
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space2, space3, space4, space6, space12, space16 } = theme();
|
|
5
5
|
const style = StyleSheet.create({
|
|
6
6
|
contentWrapper: {
|
|
7
7
|
backgroundColor: colorBgBase,
|
|
@@ -33,6 +33,7 @@ const style = StyleSheet.create({
|
|
|
33
33
|
},
|
|
34
34
|
princingWrapperSmall: {
|
|
35
35
|
backgroundColor: colorBgPrimaryLight,
|
|
36
|
+
paddingBottom: space2,
|
|
36
37
|
},
|
|
37
38
|
resume: {
|
|
38
39
|
overflow: "hidden",
|
|
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useRef } from "react";
|
|
|
2
2
|
import { Spinner } from "@lookiero/aurora";
|
|
3
3
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
4
4
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
5
|
+
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
5
6
|
import { CheckoutQuestionType } from "../../../../projection/checkoutQuestion/checkoutQuestion";
|
|
6
7
|
import { useGiveCheckoutFeedback } from "../../../domain/checkoutFeedback/react/useGiveCheckoutFeedback";
|
|
7
8
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
@@ -17,6 +18,8 @@ import { style } from "./Feedback.style";
|
|
|
17
18
|
import { CheckoutQuestionsForm } from "./components/checkoutQuestionsForm/CheckoutQuestionsForm";
|
|
18
19
|
const Feedback = ({ layout: Layout }) => {
|
|
19
20
|
const logger = useLogger();
|
|
21
|
+
const screenSize = useScreenSize();
|
|
22
|
+
const isDesktop = screenSize === "L";
|
|
20
23
|
const { customer: { customerId, country, segment }, } = useStaticInfo();
|
|
21
24
|
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
22
25
|
const [checkoutQuestions, checkoutQuestionsStatus] = useListCheckoutQuestionsByCheckoutId({
|
|
@@ -78,8 +81,8 @@ const Feedback = ({ layout: Layout }) => {
|
|
|
78
81
|
if (!dependenciesLoaded)
|
|
79
82
|
return React.createElement(Spinner, null);
|
|
80
83
|
return (React.createElement(CheckoutQuestionFeedbackProvider, { feedback: {}, onChanged: handleOnChangedFeedback },
|
|
81
|
-
React.createElement(Layout,
|
|
82
|
-
React.createElement(Body, { style: {
|
|
84
|
+
React.createElement(Layout, null,
|
|
85
|
+
React.createElement(Body, { style: { row: [style.container, isDesktop && style.containerDesktop] } },
|
|
83
86
|
React.createElement(CheckoutQuestionsForm, { checkoutQuestions: checkoutQuestions || [], submitButtonDisabled: giveCheckoutFeedbackStatus === CommandStatus.LOADING, onSubmit: handleOnSubmit })))));
|
|
84
87
|
};
|
|
85
88
|
export { Feedback };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
declare const style: {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
container: {
|
|
3
|
+
justifyContent: "flex-start";
|
|
4
4
|
paddingHorizontal: number;
|
|
5
|
+
paddingVertical: number;
|
|
5
6
|
};
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
containerDesktop: {
|
|
8
|
+
paddingHorizontal: number;
|
|
8
9
|
};
|
|
9
10
|
};
|
|
10
11
|
export { style };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const {
|
|
3
|
+
const { space3, space6, space8 } = theme();
|
|
4
4
|
const style = StyleSheet.create({
|
|
5
|
-
bodyColumn: {
|
|
6
|
-
paddingBottom: space8,
|
|
7
|
-
paddingHorizontal: space8,
|
|
8
|
-
},
|
|
9
5
|
container: {
|
|
10
|
-
|
|
6
|
+
justifyContent: "flex-start",
|
|
7
|
+
paddingHorizontal: space6,
|
|
8
|
+
paddingVertical: space8,
|
|
9
|
+
},
|
|
10
|
+
containerDesktop: {
|
|
11
|
+
paddingHorizontal: space3,
|
|
11
12
|
},
|
|
12
13
|
});
|
|
13
14
|
export { style };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useCallback, useMemo } from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
2
|
import { Button } from "@lookiero/aurora";
|
|
4
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
4
|
import { CheckoutQuestionType, } from "../../../../../../projection/checkoutQuestion/checkoutQuestion";
|
|
@@ -12,7 +11,6 @@ import { HostSelectCheckoutQuestionItem } from "../../../../components/organisms
|
|
|
12
11
|
import { IconCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem";
|
|
13
12
|
import { TextareaCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem";
|
|
14
13
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
15
|
-
import { style } from "./CheckoutQuestionsForm.style";
|
|
16
14
|
const checkoutQuestionItems = {
|
|
17
15
|
[CheckoutQuestionType.HOST_DEFAULT]: HostDefaultCheckoutQuestionItem,
|
|
18
16
|
[CheckoutQuestionType.HOST_TEXTAREA]: HostDefaultCheckoutQuestionItem,
|
|
@@ -33,7 +31,6 @@ const CheckoutQuestionsForm = ({ checkoutQuestions, submitButtonDisabled, onSubm
|
|
|
33
31
|
return (React.createElement(React.Fragment, null,
|
|
34
32
|
React.createElement(CheckoutQuestionItemProvider, { checkoutQuestionItems: checkoutQuestionItems },
|
|
35
33
|
React.createElement(CheckoutQuestions, { checkoutQuestions: filteredCheckoutQuestions })),
|
|
36
|
-
React.createElement(
|
|
37
|
-
React.createElement(Button, { busy: submitButtonDisabled, testID: "checkout-feedback-button", onPress: handlePress }, buttonText))));
|
|
34
|
+
React.createElement(Button, { busy: submitButtonDisabled, testID: "checkout-feedback-button", onPress: handlePress }, buttonText)));
|
|
38
35
|
};
|
|
39
36
|
export { CheckoutQuestionsForm };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
|
-
import { Layout as
|
|
2
|
+
import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
|
|
3
3
|
interface ReturnProps {
|
|
4
|
-
readonly layout:
|
|
4
|
+
readonly layout: UiLayout;
|
|
5
5
|
}
|
|
6
6
|
declare const Return: FC<ReturnProps>;
|
|
7
7
|
export { Return };
|
|
@@ -38,7 +38,7 @@ const returnQuestionItems = {
|
|
|
38
38
|
[ReturnQuestionType.TEXTAREA]: TextareaReturnQuestionItem,
|
|
39
39
|
[ReturnQuestionType.OPTION]: RadioReturnQuestionItem,
|
|
40
40
|
};
|
|
41
|
-
const ReturnForm = ({ checkout, checkoutItem, country, segment, layout:
|
|
41
|
+
const ReturnForm = ({ checkout, checkoutItem, country, segment, layout: UiLayout }) => {
|
|
42
42
|
const { screen } = useDevice();
|
|
43
43
|
const navigate = useNavigate();
|
|
44
44
|
const logger = useLogger();
|
|
@@ -110,7 +110,7 @@ const ReturnForm = ({ checkout, checkoutItem, country, segment, layout: LocalLay
|
|
|
110
110
|
}
|
|
111
111
|
return (React.createElement(ReturnQuestionItemProvider, { returnQuestionItems: returnQuestionItems },
|
|
112
112
|
React.createElement(PortalHost, { name: "return-question-form-portal" }),
|
|
113
|
-
React.createElement(
|
|
113
|
+
React.createElement(UiLayout, { header: header, scrollEnabled: false, style: {
|
|
114
114
|
safeAreaView: style.safeAreaView,
|
|
115
115
|
scrollView: style.scrollView,
|
|
116
116
|
} },
|
|
@@ -125,7 +125,7 @@ const ReturnForm = ({ checkout, checkoutItem, country, segment, layout: LocalLay
|
|
|
125
125
|
React.createElement(View, { style: style.submit },
|
|
126
126
|
React.createElement(Button, { testID: "return-questions-button", onPress: handleOnSubmit }, submitButtonText))))))));
|
|
127
127
|
};
|
|
128
|
-
const Return = ({ layout:
|
|
128
|
+
const Return = ({ layout: UiLayout }) => {
|
|
129
129
|
const { id } = useParams();
|
|
130
130
|
const { customer: { customerId, country, segment }, } = useStaticInfo();
|
|
131
131
|
const [checkout, checkoutStatus] = useViewFirstAvailableCheckoutByCustomerId({ customerId });
|
|
@@ -135,6 +135,6 @@ const Return = ({ layout: LocalLayout }) => {
|
|
|
135
135
|
return React.createElement(Spinner, null);
|
|
136
136
|
}
|
|
137
137
|
return (React.createElement(ReturnQuestionFeedbackProvider, { key: checkoutItem.id, feedback: checkoutItem.feedbacks || {} },
|
|
138
|
-
React.createElement(ReturnForm, { checkout: checkout, checkoutItem: checkoutItem, country: country, layout:
|
|
138
|
+
React.createElement(ReturnForm, { checkout: checkout, checkoutItem: checkoutItem, country: country, layout: UiLayout, segment: segment })));
|
|
139
139
|
};
|
|
140
140
|
export { Return };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC, ReactNode } from "react";
|
|
2
|
-
import { Layout as
|
|
2
|
+
import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
|
|
3
3
|
interface SummaryProps {
|
|
4
|
-
readonly layout:
|
|
4
|
+
readonly layout: UiLayout;
|
|
5
5
|
readonly children: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
declare const Summary: FC<SummaryProps>;
|
|
@@ -21,7 +21,7 @@ import { Routes } from "../../routing/routes";
|
|
|
21
21
|
import { useBasePath } from "../../routing/useBasePath";
|
|
22
22
|
import { style } from "./Summary.style";
|
|
23
23
|
import { CollapsiblePricing } from "./components/collapsiblePricing/CollapsiblePricing";
|
|
24
|
-
const Summary = ({ layout:
|
|
24
|
+
const Summary = ({ layout: UiLayout, children }) => {
|
|
25
25
|
const { customer: { customerId, country, segment }, } = useStaticInfo();
|
|
26
26
|
const [pricingCollapsed, setPricingCollapsed] = useState(true);
|
|
27
27
|
const [pricingHeight, setPricingHeight] = useState(0);
|
|
@@ -79,7 +79,7 @@ const Summary = ({ layout: LocalLayout, children }) => {
|
|
|
79
79
|
if (!dependenciesLoaded) {
|
|
80
80
|
return React.createElement(Spinner, null);
|
|
81
81
|
}
|
|
82
|
-
return (React.createElement(
|
|
82
|
+
return (React.createElement(UiLayout, { scrollEnabled: false, style: {
|
|
83
83
|
header: style.header,
|
|
84
84
|
scrollView: style.scrollView,
|
|
85
85
|
} },
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "6.5.
|
|
1
|
+
export declare const VERSION = "6.5.1-beta.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "6.5.
|
|
1
|
+
export const VERSION = "6.5.1-beta.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "6.5.
|
|
3
|
+
"version": "6.5.1-beta.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": "false",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"@lookiero/sty-psp-i18n": "^0.1.7",
|
|
22
22
|
"@lookiero/sty-psp-locale": "^0.2.1",
|
|
23
23
|
"@lookiero/sty-psp-logging": "^0.2.2",
|
|
24
|
-
"@lookiero/sty-psp-notifications": "^0.5.8
|
|
24
|
+
"@lookiero/sty-psp-notifications": "^0.5.8",
|
|
25
25
|
"@lookiero/sty-psp-react-native": "^0.2.0",
|
|
26
26
|
"@lookiero/sty-psp-segment": "^0.1.1",
|
|
27
27
|
"@lookiero/sty-psp-storage": "^0.1.3",
|
|
28
28
|
"@lookiero/sty-psp-tracking": "^0.1.6",
|
|
29
|
-
"@lookiero/sty-psp-ui": "^0.5.5
|
|
29
|
+
"@lookiero/sty-psp-ui": "^0.5.5",
|
|
30
30
|
"@lookiero/sty-psp-ui-settings": "^0.1.1",
|
|
31
31
|
"@lookiero/sty-psp-units": "^0.1.1",
|
|
32
32
|
"@lookiero/sty-psp-uuid": "^0.1.0",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
interface Experiment
|
|
1
|
+
interface Experiment {
|
|
2
2
|
readonly id: string;
|
|
3
|
-
readonly variations: Record<
|
|
3
|
+
readonly variations: Record<string, string>;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
interface KameleoonEnvironment {
|
|
7
7
|
readonly siteCode: string;
|
|
8
8
|
readonly experiments: {
|
|
9
|
-
readonly newFeedback: Experiment
|
|
9
|
+
readonly newFeedback: Experiment;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@ import { StyleSheet, Platform } from "react-native";
|
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
4
|
|
|
5
|
-
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space3, space4, space6, space12, space16 } = theme();
|
|
5
|
+
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space2, space3, space4, space6, space12, space16 } = theme();
|
|
6
6
|
|
|
7
7
|
const style = StyleSheet.create({
|
|
8
8
|
contentWrapper: {
|
|
@@ -35,6 +35,7 @@ const style = StyleSheet.create({
|
|
|
35
35
|
},
|
|
36
36
|
princingWrapperSmall: {
|
|
37
37
|
backgroundColor: colorBgPrimaryLight,
|
|
38
|
+
paddingBottom: space2,
|
|
38
39
|
},
|
|
39
40
|
resume: {
|
|
40
41
|
overflow: "hidden",
|
|
@@ -4,7 +4,7 @@ import { useNavigate } from "react-router-native";
|
|
|
4
4
|
import { Box, Button, Layout, Spinner, Text, useDevice } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
|
-
import { Layout as
|
|
7
|
+
import { Layout as UiLayout, Sticky } from "@lookiero/sty-psp-ui";
|
|
8
8
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
9
9
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
10
10
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
@@ -26,11 +26,11 @@ import { PaymentInstrument } from "./components/paymentInstrument/PaymentInstrum
|
|
|
26
26
|
|
|
27
27
|
interface CheckoutProps {
|
|
28
28
|
readonly children?: ReactNode;
|
|
29
|
-
readonly layout:
|
|
29
|
+
readonly layout: UiLayout;
|
|
30
30
|
readonly useRedirect: () => Record<string, string>;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
const Checkout: FC<CheckoutProps> = ({ children, layout:
|
|
33
|
+
const Checkout: FC<CheckoutProps> = ({ children, layout: UiLayout, useRedirect }) => {
|
|
34
34
|
const {
|
|
35
35
|
customer: { customerId, country, segment },
|
|
36
36
|
} = useStaticInfo();
|
|
@@ -99,7 +99,7 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: LocalLayout, useRedirec
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
return (
|
|
102
|
-
<
|
|
102
|
+
<UiLayout
|
|
103
103
|
header={<CheckoutHeader onBack={handleOnBack} />}
|
|
104
104
|
scrollEnabled={false}
|
|
105
105
|
style={{
|
|
@@ -172,7 +172,7 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: LocalLayout, useRedirec
|
|
|
172
172
|
) : null}
|
|
173
173
|
|
|
174
174
|
{children}
|
|
175
|
-
</
|
|
175
|
+
</UiLayout>
|
|
176
176
|
);
|
|
177
177
|
};
|
|
178
178
|
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
|
|
4
|
-
const {
|
|
4
|
+
const { space3, space6, space8 } = theme();
|
|
5
5
|
|
|
6
6
|
const style = StyleSheet.create({
|
|
7
|
-
bodyColumn: {
|
|
8
|
-
paddingBottom: space8,
|
|
9
|
-
paddingHorizontal: space8,
|
|
10
|
-
},
|
|
11
7
|
container: {
|
|
12
|
-
|
|
8
|
+
justifyContent: "flex-start",
|
|
9
|
+
paddingHorizontal: space6,
|
|
10
|
+
paddingVertical: space8,
|
|
11
|
+
},
|
|
12
|
+
containerDesktop: {
|
|
13
|
+
paddingHorizontal: space3,
|
|
13
14
|
},
|
|
14
15
|
});
|
|
15
16
|
|
|
@@ -2,7 +2,7 @@ import React, { FC, useCallback, useEffect, useRef } from "react";
|
|
|
2
2
|
import { Spinner } from "@lookiero/aurora";
|
|
3
3
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
4
4
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
5
|
-
import { Layout } from "@lookiero/sty-psp-ui";
|
|
5
|
+
import { Layout, useScreenSize } from "@lookiero/sty-psp-ui";
|
|
6
6
|
import { CheckoutFeedbackProjection } from "../../../../projection/checkoutFeedback/checkoutFeedback";
|
|
7
7
|
import { CheckoutQuestionType } from "../../../../projection/checkoutQuestion/checkoutQuestion";
|
|
8
8
|
import { useGiveCheckoutFeedback } from "../../../domain/checkoutFeedback/react/useGiveCheckoutFeedback";
|
|
@@ -33,6 +33,8 @@ interface FeedbackProps {
|
|
|
33
33
|
|
|
34
34
|
const Feedback: FC<FeedbackProps> = ({ layout: Layout }) => {
|
|
35
35
|
const logger = useLogger();
|
|
36
|
+
const screenSize = useScreenSize();
|
|
37
|
+
const isDesktop = screenSize === "L";
|
|
36
38
|
const {
|
|
37
39
|
customer: { customerId, country, segment },
|
|
38
40
|
} = useStaticInfo();
|
|
@@ -114,8 +116,8 @@ const Feedback: FC<FeedbackProps> = ({ layout: Layout }) => {
|
|
|
114
116
|
|
|
115
117
|
return (
|
|
116
118
|
<CheckoutQuestionFeedbackProvider feedback={{}} onChanged={handleOnChangedFeedback}>
|
|
117
|
-
<Layout
|
|
118
|
-
<Body style={{
|
|
119
|
+
<Layout>
|
|
120
|
+
<Body style={{ row: [style.container, isDesktop && style.containerDesktop] }}>
|
|
119
121
|
<CheckoutQuestionsForm
|
|
120
122
|
checkoutQuestions={checkoutQuestions || []}
|
|
121
123
|
submitButtonDisabled={giveCheckoutFeedbackStatus === CommandStatus.LOADING}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { FC, useCallback, useMemo } from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
2
|
import { Button } from "@lookiero/aurora";
|
|
4
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
5
4
|
import { CheckoutFeedbackProjection } from "../../../../../../projection/checkoutFeedback/checkoutFeedback";
|
|
@@ -19,7 +18,6 @@ import { HostSelectCheckoutQuestionItem } from "../../../../components/organisms
|
|
|
19
18
|
import { IconCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem";
|
|
20
19
|
import { TextareaCheckoutQuestionItem } from "../../../../components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem";
|
|
21
20
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
22
|
-
import { style } from "./CheckoutQuestionsForm.style";
|
|
23
21
|
|
|
24
22
|
const checkoutQuestionItems: CheckoutQuestionItems = {
|
|
25
23
|
[CheckoutQuestionType.HOST_DEFAULT]: HostDefaultCheckoutQuestionItem,
|
|
@@ -61,11 +59,9 @@ const CheckoutQuestionsForm: FC<CheckoutQuestionsFormProps> = ({
|
|
|
61
59
|
<CheckoutQuestions checkoutQuestions={filteredCheckoutQuestions} />
|
|
62
60
|
</CheckoutQuestionItemProvider>
|
|
63
61
|
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
</Button>
|
|
68
|
-
</View>
|
|
62
|
+
<Button busy={submitButtonDisabled} testID="checkout-feedback-button" onPress={handlePress}>
|
|
63
|
+
{buttonText}
|
|
64
|
+
</Button>
|
|
69
65
|
</>
|
|
70
66
|
);
|
|
71
67
|
};
|
|
@@ -7,7 +7,7 @@ import { useI18nMessage } from "@lookiero/i18n-react";
|
|
|
7
7
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
8
8
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
9
9
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
10
|
-
import { Layout as
|
|
10
|
+
import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
|
|
11
11
|
import { CheckoutProjection } from "../../../../projection/checkout/checkout";
|
|
12
12
|
import { CheckoutItemProjection } from "../../../../projection/checkoutItem/checkoutItem";
|
|
13
13
|
import { FeedbackProjection } from "../../../../projection/feedback/feedback";
|
|
@@ -56,11 +56,11 @@ interface ReturnFormProps {
|
|
|
56
56
|
readonly checkoutItem: CheckoutItemProjection;
|
|
57
57
|
readonly country: Country;
|
|
58
58
|
readonly segment: Segment;
|
|
59
|
-
readonly layout:
|
|
59
|
+
readonly layout: UiLayout;
|
|
60
60
|
readonly checkout: CheckoutProjection;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
const ReturnForm: FC<ReturnFormProps> = ({ checkout, checkoutItem, country, segment, layout:
|
|
63
|
+
const ReturnForm: FC<ReturnFormProps> = ({ checkout, checkoutItem, country, segment, layout: UiLayout }) => {
|
|
64
64
|
const { screen } = useDevice();
|
|
65
65
|
const navigate = useNavigate();
|
|
66
66
|
const logger = useLogger();
|
|
@@ -163,7 +163,7 @@ const ReturnForm: FC<ReturnFormProps> = ({ checkout, checkoutItem, country, segm
|
|
|
163
163
|
return (
|
|
164
164
|
<ReturnQuestionItemProvider returnQuestionItems={returnQuestionItems}>
|
|
165
165
|
<PortalHost name="return-question-form-portal" />
|
|
166
|
-
<
|
|
166
|
+
<UiLayout
|
|
167
167
|
header={header}
|
|
168
168
|
scrollEnabled={false}
|
|
169
169
|
style={{
|
|
@@ -195,16 +195,16 @@ const ReturnForm: FC<ReturnFormProps> = ({ checkout, checkoutItem, country, segm
|
|
|
195
195
|
</Box>
|
|
196
196
|
</Layout>
|
|
197
197
|
</ScrollView>
|
|
198
|
-
</
|
|
198
|
+
</UiLayout>
|
|
199
199
|
</ReturnQuestionItemProvider>
|
|
200
200
|
);
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
interface ReturnProps {
|
|
204
|
-
readonly layout:
|
|
204
|
+
readonly layout: UiLayout;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
const Return: FC<ReturnProps> = ({ layout:
|
|
207
|
+
const Return: FC<ReturnProps> = ({ layout: UiLayout }) => {
|
|
208
208
|
const { id } = useParams();
|
|
209
209
|
const {
|
|
210
210
|
customer: { customerId, country, segment },
|
|
@@ -223,7 +223,7 @@ const Return: FC<ReturnProps> = ({ layout: LocalLayout }) => {
|
|
|
223
223
|
checkout={checkout}
|
|
224
224
|
checkoutItem={checkoutItem}
|
|
225
225
|
country={country}
|
|
226
|
-
layout={
|
|
226
|
+
layout={UiLayout}
|
|
227
227
|
segment={segment}
|
|
228
228
|
/>
|
|
229
229
|
</ReturnQuestionFeedbackProvider>
|
|
@@ -4,7 +4,7 @@ import { generatePath, useMatch, useNavigate } from "react-router-native";
|
|
|
4
4
|
import { Box, Text, Layout, useDevice, Spinner } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
|
-
import { Layout as
|
|
7
|
+
import { Layout as UiLayout, Sticky } from "@lookiero/sty-psp-ui";
|
|
8
8
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
9
9
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
10
10
|
import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
|
|
@@ -23,11 +23,11 @@ import { style } from "./Summary.style";
|
|
|
23
23
|
import { CollapsiblePricing } from "./components/collapsiblePricing/CollapsiblePricing";
|
|
24
24
|
|
|
25
25
|
interface SummaryProps {
|
|
26
|
-
readonly layout:
|
|
26
|
+
readonly layout: UiLayout;
|
|
27
27
|
readonly children: ReactNode;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const Summary: FC<SummaryProps> = ({ layout:
|
|
30
|
+
const Summary: FC<SummaryProps> = ({ layout: UiLayout, children }) => {
|
|
31
31
|
const {
|
|
32
32
|
customer: { customerId, country, segment },
|
|
33
33
|
} = useStaticInfo();
|
|
@@ -110,7 +110,7 @@ const Summary: FC<SummaryProps> = ({ layout: LocalLayout, children }) => {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
return (
|
|
113
|
-
<
|
|
113
|
+
<UiLayout
|
|
114
114
|
scrollEnabled={false}
|
|
115
115
|
style={{
|
|
116
116
|
header: style.header,
|
|
@@ -170,7 +170,7 @@ const Summary: FC<SummaryProps> = ({ layout: LocalLayout, children }) => {
|
|
|
170
170
|
</Body>
|
|
171
171
|
</Sticky>
|
|
172
172
|
) : null}
|
|
173
|
-
</
|
|
173
|
+
</UiLayout>
|
|
174
174
|
);
|
|
175
175
|
};
|
|
176
176
|
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
2
|
-
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
|
|
4
|
-
const { space6, space8 } = theme();
|
|
5
|
-
|
|
6
|
-
const style = StyleSheet.create({
|
|
7
|
-
buttonContainer: {
|
|
8
|
-
paddingHorizontal: space6,
|
|
9
|
-
paddingVertical: space8,
|
|
10
|
-
},
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export { style };
|