@lookiero/checkout 6.5.0-beta.4 → 6.5.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 +3 -2
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +4 -0
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +6 -1
- 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 +1 -1
- package/src/infrastructure/ab-testing/kameleoonEnvironment.ts +3 -3
- package/src/infrastructure/ui/components/templates/header/__snapshots__/Header.test.tsx.snap +1 -0
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +132 -141
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +4 -1
- package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +3 -2
- package/src/infrastructure/ui/views/checkout/Checkout.style.ts +6 -1
- package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +1 -1
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +6 -5
- package/src/infrastructure/ui/views/feedback/Feedback.test.tsx +1 -1
- package/src/infrastructure/ui/views/item/Item.test.tsx +1 -1
- 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/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +2 -2
- package/src/infrastructure/ui/views/summary/Summary.test.tsx +1 -1
- package/src/infrastructure/ui/views/summary/Summary.tsx +5 -5
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.test.tsx +2 -2
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +19 -13
- package/dist/public/public/assets/adaptive-icon.png +0 -0
- package/dist/public/public/assets/favicon.png +0 -0
- package/dist/public/public/assets/icon.png +0 -0
- package/dist/public/public/assets/splash.png +0 -0
- package/dist/public/public/images/not-found.png +0 -0
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -21
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -6
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -4
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -6
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -5
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -19
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -3
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -18
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +0 -13
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -6
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -11
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -11
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -13
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -9
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -10
- /package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/{Pricing.test.tsx.snap → CollapsiblePricing.test.tsx.snap} +0 -0
|
@@ -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,8 @@ 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
|
+
header: style.header,
|
|
72
73
|
scrollView: style.scrollView,
|
|
73
74
|
} },
|
|
74
75
|
React.createElement(ScrollView, { showsVerticalScrollIndicator: false },
|
|
@@ -18,6 +18,9 @@ declare const style: {
|
|
|
18
18
|
desktopResume: {
|
|
19
19
|
borderRadius: number;
|
|
20
20
|
};
|
|
21
|
+
header: {
|
|
22
|
+
height: number;
|
|
23
|
+
};
|
|
21
24
|
paymentSelector: {
|
|
22
25
|
marginTop: number;
|
|
23
26
|
};
|
|
@@ -26,6 +29,7 @@ declare const style: {
|
|
|
26
29
|
};
|
|
27
30
|
princingWrapperSmall: {
|
|
28
31
|
backgroundColor: string;
|
|
32
|
+
paddingBottom: number;
|
|
29
33
|
};
|
|
30
34
|
resume: any;
|
|
31
35
|
scrollView: {
|
|
@@ -1,6 +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, space2, space3, space4, space6, space12, space16 } = theme();
|
|
4
5
|
const style = StyleSheet.create({
|
|
5
6
|
contentWrapper: {
|
|
6
7
|
backgroundColor: colorBgBase,
|
|
@@ -21,6 +22,9 @@ const style = StyleSheet.create({
|
|
|
21
22
|
desktopResume: {
|
|
22
23
|
borderRadius: borderRadius4,
|
|
23
24
|
},
|
|
25
|
+
header: {
|
|
26
|
+
height: HEADER_HEIGHT,
|
|
27
|
+
},
|
|
24
28
|
paymentSelector: {
|
|
25
29
|
marginTop: space6,
|
|
26
30
|
},
|
|
@@ -29,6 +33,7 @@ const style = StyleSheet.create({
|
|
|
29
33
|
},
|
|
30
34
|
princingWrapperSmall: {
|
|
31
35
|
backgroundColor: colorBgPrimaryLight,
|
|
36
|
+
paddingBottom: space2,
|
|
32
37
|
},
|
|
33
38
|
resume: {
|
|
34
39
|
overflow: "hidden",
|
|
@@ -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.0
|
|
1
|
+
export declare const VERSION = "6.5.0";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "6.5.0
|
|
1
|
+
export const VERSION = "6.5.0";
|
package/package.json
CHANGED
|
@@ -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
|
|
|
@@ -33,181 +33,172 @@ exports[`CheckoutHeader template matches the snapshot 1`] = `
|
|
|
33
33
|
style={
|
|
34
34
|
[
|
|
35
35
|
{
|
|
36
|
+
"alignItems": "center",
|
|
37
|
+
"backgroundColor": "#FFFFFF",
|
|
38
|
+
"flexDirection": "row",
|
|
39
|
+
"flexGrow": 0,
|
|
40
|
+
"flexWrap": "nowrap",
|
|
41
|
+
"height": 48,
|
|
42
|
+
"justifyContent": "space-between",
|
|
43
|
+
"overflow": "visible",
|
|
44
|
+
"paddingHorizontal": 8,
|
|
36
45
|
"width": "100%",
|
|
37
46
|
},
|
|
47
|
+
undefined,
|
|
38
48
|
]
|
|
39
49
|
}
|
|
50
|
+
testID="checkout-header"
|
|
40
51
|
>
|
|
41
52
|
<View
|
|
53
|
+
accessibilityRole="button"
|
|
54
|
+
accessibilityState={
|
|
55
|
+
{
|
|
56
|
+
"busy": undefined,
|
|
57
|
+
"checked": undefined,
|
|
58
|
+
"disabled": undefined,
|
|
59
|
+
"expanded": undefined,
|
|
60
|
+
"selected": undefined,
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
accessibilityValue={
|
|
64
|
+
{
|
|
65
|
+
"max": undefined,
|
|
66
|
+
"min": undefined,
|
|
67
|
+
"now": undefined,
|
|
68
|
+
"text": undefined,
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
accessible={true}
|
|
72
|
+
collapsable={false}
|
|
73
|
+
focusable={true}
|
|
74
|
+
onBlur={[Function]}
|
|
75
|
+
onClick={[Function]}
|
|
76
|
+
onFocus={[Function]}
|
|
77
|
+
onResponderGrant={[Function]}
|
|
78
|
+
onResponderMove={[Function]}
|
|
79
|
+
onResponderRelease={[Function]}
|
|
80
|
+
onResponderTerminate={[Function]}
|
|
81
|
+
onResponderTerminationRequest={[Function]}
|
|
82
|
+
onStartShouldSetResponder={[Function]}
|
|
42
83
|
style={
|
|
43
84
|
[
|
|
85
|
+
[
|
|
86
|
+
{
|
|
87
|
+
"_container": {
|
|
88
|
+
"overflow": "hidden",
|
|
89
|
+
},
|
|
90
|
+
"_pressed": {
|
|
91
|
+
"bottom": 0,
|
|
92
|
+
"left": 0,
|
|
93
|
+
"right": 0,
|
|
94
|
+
"top": 0,
|
|
95
|
+
},
|
|
96
|
+
"alignSelf": "auto",
|
|
97
|
+
"container": {
|
|
98
|
+
"overflow": "hidden",
|
|
99
|
+
},
|
|
100
|
+
"height": 40,
|
|
101
|
+
"overflow": "visible",
|
|
102
|
+
"padding": 8,
|
|
103
|
+
"pressed": {
|
|
104
|
+
"bottom": 0,
|
|
105
|
+
"left": 0,
|
|
106
|
+
"right": 0,
|
|
107
|
+
"top": 0,
|
|
108
|
+
},
|
|
109
|
+
"width": 40,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
44
112
|
{
|
|
45
|
-
"
|
|
46
|
-
"backgroundColor": "#FFFFFF",
|
|
47
|
-
"flexDirection": "row",
|
|
48
|
-
"flexGrow": 0,
|
|
49
|
-
"flexWrap": "nowrap",
|
|
50
|
-
"justifyContent": "space-between",
|
|
51
|
-
"overflow": "visible",
|
|
52
|
-
"paddingHorizontal": 8,
|
|
53
|
-
"width": "100%",
|
|
113
|
+
"opacity": 1,
|
|
54
114
|
},
|
|
55
|
-
undefined,
|
|
56
115
|
]
|
|
57
116
|
}
|
|
58
|
-
testID="
|
|
117
|
+
testID="arrow-left-button-icon"
|
|
59
118
|
>
|
|
60
119
|
<View
|
|
61
|
-
accessibilityRole="button"
|
|
62
|
-
accessibilityState={
|
|
63
|
-
{
|
|
64
|
-
"busy": undefined,
|
|
65
|
-
"checked": undefined,
|
|
66
|
-
"disabled": undefined,
|
|
67
|
-
"expanded": undefined,
|
|
68
|
-
"selected": undefined,
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
accessibilityValue={
|
|
72
|
-
{
|
|
73
|
-
"max": undefined,
|
|
74
|
-
"min": undefined,
|
|
75
|
-
"now": undefined,
|
|
76
|
-
"text": undefined,
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
accessible={true}
|
|
80
|
-
collapsable={false}
|
|
81
|
-
focusable={true}
|
|
82
|
-
onBlur={[Function]}
|
|
83
|
-
onClick={[Function]}
|
|
84
|
-
onFocus={[Function]}
|
|
85
|
-
onResponderGrant={[Function]}
|
|
86
|
-
onResponderMove={[Function]}
|
|
87
|
-
onResponderRelease={[Function]}
|
|
88
|
-
onResponderTerminate={[Function]}
|
|
89
|
-
onResponderTerminationRequest={[Function]}
|
|
90
|
-
onStartShouldSetResponder={[Function]}
|
|
91
120
|
style={
|
|
92
121
|
[
|
|
93
|
-
[
|
|
94
|
-
{
|
|
95
|
-
"_container": {
|
|
96
|
-
"overflow": "hidden",
|
|
97
|
-
},
|
|
98
|
-
"_pressed": {
|
|
99
|
-
"bottom": 0,
|
|
100
|
-
"left": 0,
|
|
101
|
-
"right": 0,
|
|
102
|
-
"top": 0,
|
|
103
|
-
},
|
|
104
|
-
"alignSelf": "flex-start",
|
|
105
|
-
"container": {
|
|
106
|
-
"overflow": "hidden",
|
|
107
|
-
},
|
|
108
|
-
"height": 40,
|
|
109
|
-
"overflow": "visible",
|
|
110
|
-
"padding": 8,
|
|
111
|
-
"pressed": {
|
|
112
|
-
"bottom": 0,
|
|
113
|
-
"left": 0,
|
|
114
|
-
"right": 0,
|
|
115
|
-
"top": 0,
|
|
116
|
-
},
|
|
117
|
-
"width": 40,
|
|
118
|
-
},
|
|
119
|
-
],
|
|
120
122
|
{
|
|
121
|
-
"
|
|
123
|
+
"position": "relative",
|
|
122
124
|
},
|
|
123
125
|
]
|
|
124
126
|
}
|
|
125
|
-
testID="arrow-left-button-icon"
|
|
126
127
|
>
|
|
127
|
-
<
|
|
128
|
+
<Text
|
|
129
|
+
accessibilityElementsHidden={true}
|
|
130
|
+
allowFontScaling={false}
|
|
131
|
+
importantForAccessibility="no"
|
|
132
|
+
selectable={false}
|
|
128
133
|
style={
|
|
129
134
|
[
|
|
130
135
|
{
|
|
131
|
-
"
|
|
136
|
+
"color": "#0C0A0A",
|
|
137
|
+
"fontFamily": "auroraicons",
|
|
138
|
+
"fontSize": 24,
|
|
139
|
+
"fontStyle": "normal",
|
|
140
|
+
"fontWeight": "normal",
|
|
141
|
+
"height": 24,
|
|
142
|
+
"width": 24,
|
|
132
143
|
},
|
|
133
144
|
]
|
|
134
145
|
}
|
|
135
146
|
>
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
147
|
+
|
|
148
|
+
</Text>
|
|
149
|
+
<View
|
|
150
|
+
collapsable={false}
|
|
151
|
+
style={
|
|
152
|
+
{
|
|
153
|
+
"backgroundColor": "#F45545",
|
|
154
|
+
"borderColor": "#FFFFFF",
|
|
155
|
+
"borderRadius": 9999,
|
|
156
|
+
"borderWidth": 2,
|
|
157
|
+
"height": 10,
|
|
158
|
+
"position": "absolute",
|
|
159
|
+
"right": 0,
|
|
160
|
+
"top": 0,
|
|
161
|
+
"transform": [
|
|
143
162
|
{
|
|
144
|
-
"
|
|
145
|
-
"fontFamily": "auroraicons",
|
|
146
|
-
"fontSize": 24,
|
|
147
|
-
"fontStyle": "normal",
|
|
148
|
-
"fontWeight": "normal",
|
|
149
|
-
"height": 24,
|
|
150
|
-
"width": 24,
|
|
163
|
+
"scale": 0,
|
|
151
164
|
},
|
|
152
|
-
]
|
|
153
|
-
|
|
154
|
-
>
|
|
155
|
-
|
|
156
|
-
</Text>
|
|
157
|
-
<View
|
|
158
|
-
collapsable={false}
|
|
159
|
-
style={
|
|
160
|
-
{
|
|
161
|
-
"backgroundColor": "#F45545",
|
|
162
|
-
"borderColor": "#FFFFFF",
|
|
163
|
-
"borderRadius": 9999,
|
|
164
|
-
"borderWidth": 2,
|
|
165
|
-
"height": 10,
|
|
166
|
-
"position": "absolute",
|
|
167
|
-
"right": 0,
|
|
168
|
-
"top": 0,
|
|
169
|
-
"transform": [
|
|
170
|
-
{
|
|
171
|
-
"scale": 0,
|
|
172
|
-
},
|
|
173
|
-
],
|
|
174
|
-
"width": 10,
|
|
175
|
-
}
|
|
165
|
+
],
|
|
166
|
+
"width": 10,
|
|
176
167
|
}
|
|
177
|
-
|
|
178
|
-
|
|
168
|
+
}
|
|
169
|
+
/>
|
|
179
170
|
</View>
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"color": "#0C0A0A",
|
|
187
|
-
"fontFamily": "AreaNormal-Extrabold",
|
|
188
|
-
"fontSize": 15,
|
|
189
|
-
"letterSpacing": -0.2,
|
|
190
|
-
"lineHeight": 20,
|
|
191
|
-
"paddingBottom": 0,
|
|
192
|
-
"paddingLeft": 0,
|
|
193
|
-
"paddingRight": 0,
|
|
194
|
-
"paddingTop": 2,
|
|
195
|
-
},
|
|
196
|
-
]
|
|
197
|
-
}
|
|
198
|
-
>
|
|
199
|
-
header.complete_checkout_title
|
|
200
|
-
</Text>
|
|
201
|
-
<View
|
|
202
|
-
style={
|
|
171
|
+
</View>
|
|
172
|
+
<Text
|
|
173
|
+
allowFontScaling={false}
|
|
174
|
+
selectable={false}
|
|
175
|
+
style={
|
|
176
|
+
[
|
|
203
177
|
{
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
|
|
178
|
+
"color": "#0C0A0A",
|
|
179
|
+
"fontFamily": "AreaNormal-Extrabold",
|
|
180
|
+
"fontSize": 15,
|
|
181
|
+
"letterSpacing": -0.2,
|
|
182
|
+
"lineHeight": 20,
|
|
183
|
+
"paddingBottom": 0,
|
|
184
|
+
"paddingLeft": 0,
|
|
185
|
+
"paddingRight": 0,
|
|
186
|
+
"paddingTop": 2,
|
|
187
|
+
},
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
>
|
|
191
|
+
header.complete_checkout_title
|
|
192
|
+
</Text>
|
|
193
|
+
<View
|
|
194
|
+
style={
|
|
195
|
+
{
|
|
196
|
+
"flexGrow": 0,
|
|
197
|
+
"height": 40,
|
|
198
|
+
"width": 40,
|
|
208
199
|
}
|
|
209
|
-
|
|
210
|
-
|
|
200
|
+
}
|
|
201
|
+
/>
|
|
211
202
|
</View>
|
|
212
203
|
</View>
|
|
213
204
|
`;
|
|
@@ -38,6 +38,7 @@ exports[`ItemDetailHeader template matches the snapshot 1`] = `
|
|
|
38
38
|
"flexDirection": "row",
|
|
39
39
|
"flexGrow": 0,
|
|
40
40
|
"flexWrap": "nowrap",
|
|
41
|
+
"height": 48,
|
|
41
42
|
"justifyContent": "space-between",
|
|
42
43
|
"overflow": "visible",
|
|
43
44
|
"paddingHorizontal": 8,
|
|
@@ -122,10 +123,11 @@ exports[`ItemDetailHeader template matches the snapshot 1`] = `
|
|
|
122
123
|
"right": 0,
|
|
123
124
|
"top": 0,
|
|
124
125
|
},
|
|
125
|
-
"alignSelf": "
|
|
126
|
+
"alignSelf": "auto",
|
|
126
127
|
"container": {
|
|
127
128
|
"overflow": "hidden",
|
|
128
129
|
},
|
|
130
|
+
"height": 40,
|
|
129
131
|
"overflow": "visible",
|
|
130
132
|
"padding": 8,
|
|
131
133
|
"pressed": {
|
|
@@ -134,6 +136,7 @@ exports[`ItemDetailHeader template matches the snapshot 1`] = `
|
|
|
134
136
|
"right": 0,
|
|
135
137
|
"top": 0,
|
|
136
138
|
},
|
|
139
|
+
"width": 40,
|
|
137
140
|
},
|
|
138
141
|
],
|
|
139
142
|
{
|
|
@@ -38,6 +38,7 @@ exports[`ItemHeader template matches the snapshot 1`] = `
|
|
|
38
38
|
"flexDirection": "row",
|
|
39
39
|
"flexGrow": 0,
|
|
40
40
|
"flexWrap": "nowrap",
|
|
41
|
+
"height": 48,
|
|
41
42
|
"justifyContent": "space-between",
|
|
42
43
|
"overflow": "visible",
|
|
43
44
|
"paddingHorizontal": 8,
|
|
@@ -92,7 +93,7 @@ exports[`ItemHeader template matches the snapshot 1`] = `
|
|
|
92
93
|
"right": 0,
|
|
93
94
|
"top": 0,
|
|
94
95
|
},
|
|
95
|
-
"alignSelf": "
|
|
96
|
+
"alignSelf": "auto",
|
|
96
97
|
"container": {
|
|
97
98
|
"overflow": "hidden",
|
|
98
99
|
},
|
|
@@ -233,7 +234,7 @@ exports[`ItemHeader template matches the snapshot 1`] = `
|
|
|
233
234
|
"right": 0,
|
|
234
235
|
"top": 0,
|
|
235
236
|
},
|
|
236
|
-
"alignSelf": "
|
|
237
|
+
"alignSelf": "auto",
|
|
237
238
|
"container": {
|
|
238
239
|
"overflow": "hidden",
|
|
239
240
|
},
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { StyleSheet, Platform } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
+
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
3
4
|
|
|
4
|
-
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space3, space4, space6, space12, space16 } = theme();
|
|
5
|
+
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space2, space3, space4, space6, space12, space16 } = theme();
|
|
5
6
|
|
|
6
7
|
const style = StyleSheet.create({
|
|
7
8
|
contentWrapper: {
|
|
@@ -23,6 +24,9 @@ const style = StyleSheet.create({
|
|
|
23
24
|
desktopResume: {
|
|
24
25
|
borderRadius: borderRadius4,
|
|
25
26
|
},
|
|
27
|
+
header: {
|
|
28
|
+
height: HEADER_HEIGHT,
|
|
29
|
+
},
|
|
26
30
|
paymentSelector: {
|
|
27
31
|
marginTop: space6,
|
|
28
32
|
},
|
|
@@ -31,6 +35,7 @@ const style = StyleSheet.create({
|
|
|
31
35
|
},
|
|
32
36
|
princingWrapperSmall: {
|
|
33
37
|
backgroundColor: colorBgPrimaryLight,
|
|
38
|
+
paddingBottom: space2,
|
|
34
39
|
},
|
|
35
40
|
resume: {
|
|
36
41
|
overflow: "hidden",
|
|
@@ -2,13 +2,13 @@ import { fireEvent } from "@testing-library/react-native";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
4
4
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
5
|
+
import { DummyLayout } from "@lookiero/sty-psp-ui";
|
|
5
6
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
7
|
import { Country } from "../../../../projection/shared/country";
|
|
7
8
|
import { checkout } from "../../../projection/checkout/checkout.mock";
|
|
8
9
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
9
10
|
import { pricing } from "../../../projection/pricing/pricing.mock";
|
|
10
11
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
11
|
-
import { DummyLayout } from "../../components/layouts/layout/dummyLayout/DummyLayout";
|
|
12
12
|
import { I18nMessages } from "../../i18n/i18n";
|
|
13
13
|
import { Routes } from "../../routing/routes";
|
|
14
14
|
import { render } from "../../test/render";
|
|
@@ -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,10 +99,11 @@ 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={{
|
|
106
|
+
header: style.header,
|
|
106
107
|
scrollView: style.scrollView,
|
|
107
108
|
}}
|
|
108
109
|
>
|
|
@@ -171,7 +172,7 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: LocalLayout, useRedirec
|
|
|
171
172
|
) : null}
|
|
172
173
|
|
|
173
174
|
{children}
|
|
174
|
-
</
|
|
175
|
+
</UiLayout>
|
|
175
176
|
);
|
|
176
177
|
};
|
|
177
178
|
|
|
@@ -2,6 +2,7 @@ import { fireEvent } from "@testing-library/react-native";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
4
4
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
5
|
+
import { DummyLayout } from "@lookiero/sty-psp-ui";
|
|
5
6
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
7
|
import { Country } from "../../../../projection/shared/country";
|
|
7
8
|
import { useGiveCheckoutFeedback } from "../../../domain/checkoutFeedback/react/useGiveCheckoutFeedback";
|
|
@@ -9,7 +10,6 @@ import { checkout } from "../../../projection/checkout/checkout.mock";
|
|
|
9
10
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
10
11
|
import { checkoutQuestions as checkoutQuestionsMock } from "../../../projection/checkoutQuestion/checkoutQuestions.mock";
|
|
11
12
|
import { useListCheckoutQuestionsByCheckoutId } from "../../../projection/checkoutQuestion/react/useListCheckoutQuestionsByCheckoutId";
|
|
12
|
-
import { DummyLayout } from "../../components/layouts/layout/dummyLayout/DummyLayout";
|
|
13
13
|
import { I18nMessages } from "../../i18n/i18n";
|
|
14
14
|
import { render } from "../../test/render";
|
|
15
15
|
import { Feedback } from "./Feedback";
|
|
@@ -2,6 +2,7 @@ import { fireEvent, RenderAPI, waitFor, screen, within } from "@testing-library/
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
4
4
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
5
|
+
import { DummyLayout } from "@lookiero/sty-psp-ui";
|
|
5
6
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
7
|
import { Country } from "../../../../projection/shared/country";
|
|
7
8
|
import { useBookCheckoutBookingForCheckoutItem } from "../../../domain/checkoutBooking/react/useBookCheckoutBookingForCheckoutItem";
|
|
@@ -18,7 +19,6 @@ import { useViewIsSizeChangeEnabledByCheckoutId } from "../../../projection/chec
|
|
|
18
19
|
import { useListReturnQuestionsByCheckoutItemId } from "../../../projection/returnQuestion/react/useListReturnQuestionsByCheckoutItemId";
|
|
19
20
|
import { returnQuestions as mockReturnQuestions } from "../../../projection/returnQuestion/returnQuestions.mock";
|
|
20
21
|
import { useTrackItemPageView } from "../../../tracking/useTrackItemPageView";
|
|
21
|
-
import { DummyLayout } from "../../components/layouts/layout/dummyLayout/DummyLayout";
|
|
22
22
|
import { I18nMessages } from "../../i18n/i18n";
|
|
23
23
|
import { render } from "../../test/render";
|
|
24
24
|
import { Item } from "./Item";
|
|
@@ -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>
|
|
@@ -63,7 +63,7 @@ exports[`ProductVariant component matches the snapshot for a non-unique size: no
|
|
|
63
63
|
style={
|
|
64
64
|
{
|
|
65
65
|
"alignItems": "flex-end",
|
|
66
|
-
"borderBottomColor": "#
|
|
66
|
+
"borderBottomColor": "#F8F7F7",
|
|
67
67
|
"borderBottomWidth": 1,
|
|
68
68
|
"flexDirection": "row",
|
|
69
69
|
"justifyContent": "space-between",
|
|
@@ -306,7 +306,7 @@ exports[`ProductVariant component matches the snapshot for an unique size: uniqu
|
|
|
306
306
|
style={
|
|
307
307
|
{
|
|
308
308
|
"alignItems": "flex-end",
|
|
309
|
-
"borderBottomColor": "#
|
|
309
|
+
"borderBottomColor": "#F8F7F7",
|
|
310
310
|
"borderBottomWidth": 1,
|
|
311
311
|
"flexDirection": "row",
|
|
312
312
|
"justifyContent": "space-between",
|
|
@@ -3,6 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { Text } from "react-native";
|
|
4
4
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
5
5
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
6
|
+
import { DummyLayout } from "@lookiero/sty-psp-ui";
|
|
6
7
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
7
8
|
import { Country } from "../../../../projection/shared/country";
|
|
8
9
|
import { checkout } from "../../../projection/checkout/checkout.mock";
|
|
@@ -10,7 +11,6 @@ import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/c
|
|
|
10
11
|
import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
|
|
11
12
|
import { pricing } from "../../../projection/pricing/pricing.mock";
|
|
12
13
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
13
|
-
import { DummyLayout } from "../../components/layouts/layout/dummyLayout/DummyLayout";
|
|
14
14
|
import { I18nMessages } from "../../i18n/i18n";
|
|
15
15
|
import { render } from "../../test/render";
|
|
16
16
|
import { Summary } from "./Summary";
|
|
@@ -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
|
|
|
@@ -4,7 +4,7 @@ import { PricingProjection } from "../../../../../../projection/pricing/pricing"
|
|
|
4
4
|
import { pricing as pricingFunction } from "../../../../../projection/pricing/pricing.mock";
|
|
5
5
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
6
6
|
import { render } from "../../../../test/render";
|
|
7
|
-
import {
|
|
7
|
+
import { CollapsiblePricing } from "./CollapsiblePricing";
|
|
8
8
|
|
|
9
9
|
const mockOnPress = jest.fn();
|
|
10
10
|
const mockOnSubmit = jest.fn();
|
|
@@ -25,7 +25,7 @@ const renderPricing: RenderPricingFunction = ({
|
|
|
25
25
|
pricing = pricingFunction(),
|
|
26
26
|
} = {}) =>
|
|
27
27
|
render(
|
|
28
|
-
<
|
|
28
|
+
<CollapsiblePricing
|
|
29
29
|
collapsed={collapsed}
|
|
30
30
|
collapsible={collapsible}
|
|
31
31
|
pricing={pricing}
|
|
@@ -51,10 +51,15 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
51
51
|
"paddingHorizontal": 24,
|
|
52
52
|
},
|
|
53
53
|
false,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
[
|
|
55
|
+
{
|
|
56
|
+
"borderBottomColor": "#DAD8D8",
|
|
57
|
+
"borderBottomWidth": 1,
|
|
58
|
+
"justifyContent": "flex-start",
|
|
59
|
+
"paddingHorizontal": 16,
|
|
60
|
+
},
|
|
61
|
+
false,
|
|
62
|
+
],
|
|
58
63
|
]
|
|
59
64
|
}
|
|
60
65
|
testID="tab-list"
|
|
@@ -109,9 +114,9 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
109
114
|
{
|
|
110
115
|
"color": "#0C0A0A",
|
|
111
116
|
"fontFamily": "AreaNormal-Extrabold",
|
|
112
|
-
"fontSize":
|
|
117
|
+
"fontSize": 13,
|
|
113
118
|
"letterSpacing": -0.2,
|
|
114
|
-
"lineHeight":
|
|
119
|
+
"lineHeight": 17,
|
|
115
120
|
"paddingBottom": 0,
|
|
116
121
|
"paddingLeft": 0,
|
|
117
122
|
"paddingRight": 0,
|
|
@@ -173,9 +178,9 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
173
178
|
{
|
|
174
179
|
"color": "#837C7C",
|
|
175
180
|
"fontFamily": "AreaNormal-Extrabold",
|
|
176
|
-
"fontSize":
|
|
181
|
+
"fontSize": 13,
|
|
177
182
|
"letterSpacing": -0.2,
|
|
178
|
-
"lineHeight":
|
|
183
|
+
"lineHeight": 17,
|
|
179
184
|
"paddingBottom": 0,
|
|
180
185
|
"paddingLeft": 0,
|
|
181
186
|
"paddingRight": 0,
|
|
@@ -211,7 +216,8 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
211
216
|
style={
|
|
212
217
|
{
|
|
213
218
|
"opacity": 0,
|
|
214
|
-
"
|
|
219
|
+
"paddingBottom": 24,
|
|
220
|
+
"paddingHorizontal": 24,
|
|
215
221
|
"paddingTop": 8,
|
|
216
222
|
}
|
|
217
223
|
}
|
|
@@ -342,7 +348,7 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
342
348
|
style={
|
|
343
349
|
{
|
|
344
350
|
"alignItems": "flex-end",
|
|
345
|
-
"borderBottomColor": "#
|
|
351
|
+
"borderBottomColor": "#F8F7F7",
|
|
346
352
|
"borderBottomWidth": 1,
|
|
347
353
|
"flexDirection": "row",
|
|
348
354
|
"justifyContent": "space-between",
|
|
@@ -557,7 +563,7 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
557
563
|
style={
|
|
558
564
|
{
|
|
559
565
|
"alignItems": "flex-end",
|
|
560
|
-
"borderBottomColor": "#
|
|
566
|
+
"borderBottomColor": "#F8F7F7",
|
|
561
567
|
"borderBottomWidth": 1,
|
|
562
568
|
"flexDirection": "row",
|
|
563
569
|
"justifyContent": "space-between",
|
|
@@ -821,7 +827,7 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
821
827
|
style={
|
|
822
828
|
{
|
|
823
829
|
"alignItems": "flex-end",
|
|
824
|
-
"borderBottomColor": "#
|
|
830
|
+
"borderBottomColor": "#F8F7F7",
|
|
825
831
|
"borderBottomWidth": 1,
|
|
826
832
|
"flexDirection": "row",
|
|
827
833
|
"justifyContent": "space-between",
|
|
@@ -1036,7 +1042,7 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
1036
1042
|
style={
|
|
1037
1043
|
{
|
|
1038
1044
|
"alignItems": "flex-end",
|
|
1039
|
-
"borderBottomColor": "#
|
|
1045
|
+
"borderBottomColor": "#F8F7F7",
|
|
1040
1046
|
"borderBottomWidth": 1,
|
|
1041
1047
|
"flexDirection": "row",
|
|
1042
1048
|
"justifyContent": "space-between",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode, RefObject } from "react";
|
|
2
|
-
import { LayoutChangeEvent, ScrollView, StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
interface LayoutStyle {
|
|
4
|
-
readonly safeAreaView: StyleProp<ViewStyle>;
|
|
5
|
-
readonly scrollView: StyleProp<ViewStyle>;
|
|
6
|
-
readonly header: StyleProp<ViewStyle>;
|
|
7
|
-
}
|
|
8
|
-
interface LayoutProps {
|
|
9
|
-
readonly children: ReactNode;
|
|
10
|
-
readonly header?: JSX.Element | null;
|
|
11
|
-
readonly footer?: JSX.Element | null;
|
|
12
|
-
readonly panel?: JSX.Element | null;
|
|
13
|
-
readonly stickyHeader?: boolean;
|
|
14
|
-
readonly stickyHeaderHiddenOnScroll?: boolean;
|
|
15
|
-
readonly scrollRef?: RefObject<ScrollView>;
|
|
16
|
-
readonly scrollEnabled?: boolean;
|
|
17
|
-
readonly style?: Partial<LayoutStyle>;
|
|
18
|
-
readonly onLayout?: (event: LayoutChangeEvent) => void;
|
|
19
|
-
}
|
|
20
|
-
type Layout = FC<LayoutProps>;
|
|
21
|
-
export type { Layout };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Platform, StyleSheet } from "react-native";
|
|
2
|
-
import { HEADER_HEIGHT } from "../../../../templates/header/Header.style";
|
|
3
|
-
const style = StyleSheet.create({
|
|
4
|
-
header: {
|
|
5
|
-
...Platform.select({
|
|
6
|
-
web: {
|
|
7
|
-
position: "sticky",
|
|
8
|
-
top: 0,
|
|
9
|
-
zIndex: 10,
|
|
10
|
-
height: HEADER_HEIGHT,
|
|
11
|
-
},
|
|
12
|
-
native: {
|
|
13
|
-
position: "relative",
|
|
14
|
-
height: HEADER_HEIGHT,
|
|
15
|
-
},
|
|
16
|
-
}),
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
export { style };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/prop-types */
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { View } from "react-native";
|
|
4
|
-
import { GestureHandlerRootView, ScrollView as RNGHScrollView } from "react-native-gesture-handler";
|
|
5
|
-
import { SafeAreaView } from "react-native-safe-area-context";
|
|
6
|
-
import { Footer as DefaultFooter } from "../../../templates/footer/Footer";
|
|
7
|
-
import { DefaultHeader } from "../../../templates/header/defaultHeader/DefaultHeader";
|
|
8
|
-
import { Footer } from "../components/footer/Footer";
|
|
9
|
-
import { Header } from "../components/header/Header";
|
|
10
|
-
import { style } from "./DummyLayout.style";
|
|
11
|
-
const DummyLayout = ({ children, header = React.createElement(DefaultHeader, null), footer = React.createElement(DefaultFooter, null), panel, style: customStyle, scrollEnabled, onLayout, }) => (React.createElement(SafeAreaView, { style: [style.safeAreaView, customStyle?.safeAreaView] },
|
|
12
|
-
React.createElement(GestureHandlerRootView, { style: { flex: 1 } },
|
|
13
|
-
React.createElement(RNGHScrollView, { contentContainerStyle: [style.scrollView, customStyle?.scrollView], scrollEnabled: scrollEnabled, scrollEventThrottle: 16, showsVerticalScrollIndicator: false, stickyHeaderIndices: [0] },
|
|
14
|
-
React.createElement(Header, null, header),
|
|
15
|
-
panel,
|
|
16
|
-
React.createElement(View, { style: style.children, onLayout: onLayout }, children))),
|
|
17
|
-
React.createElement(Footer, null, footer)));
|
|
18
|
-
export { DummyLayout };
|
package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ButtonIcon } from "@lookiero/aurora";
|
|
3
|
-
import { Header } from "../Header";
|
|
4
|
-
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
5
|
-
import { Logo } from "../logo/Logo";
|
|
6
|
-
import { style } from "./DefaultHeader.style";
|
|
7
|
-
const DefaultHeader = ({ onPressMenu }) => (React.createElement(Header, { testID: "default-header" },
|
|
8
|
-
React.createElement(Logo, null),
|
|
9
|
-
React.createElement(ButtonIconPlaceholder, null),
|
|
10
|
-
React.createElement(ButtonIcon, { name: "menu", style: style.button, testID: "menu-button-icon", onPress: onPressMenu })));
|
|
11
|
-
export { DefaultHeader };
|
package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
2
|
-
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
const { space10 } = theme();
|
|
4
|
-
const style = StyleSheet.create({
|
|
5
|
-
button: {
|
|
6
|
-
alignSelf: "auto",
|
|
7
|
-
height: space10,
|
|
8
|
-
width: space10,
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
export { style };
|
package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FC } from "react";
|
|
2
|
-
import { LayoutRectangle } from "react-native";
|
|
3
|
-
import { PricingProjection } from "../../../../../../projection/pricing/pricing";
|
|
4
|
-
interface StickyPricingProps {
|
|
5
|
-
readonly pricing: PricingProjection;
|
|
6
|
-
readonly totalCheckoutItemsKept: number;
|
|
7
|
-
readonly collapsed: boolean;
|
|
8
|
-
readonly onPress: () => void;
|
|
9
|
-
readonly onSubmit: () => void;
|
|
10
|
-
readonly onLayout?: ({ width, height }: LayoutRectangle) => void;
|
|
11
|
-
}
|
|
12
|
-
declare const StickyPricing: FC<StickyPricingProps>;
|
|
13
|
-
export { StickyPricing };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Sticky } from "@lookiero/sty-psp-ui";
|
|
3
|
-
import { Body } from "../../../../components/layouts/body/Body";
|
|
4
|
-
import { Pricing } from "../pricing/Pricing";
|
|
5
|
-
import { style } from "./StickyPricing.style";
|
|
6
|
-
const StickyPricing = ({ pricing, totalCheckoutItemsKept, collapsed, onPress, onSubmit, onLayout, }) => (React.createElement(Sticky, { style: style.sticky, onLayout: onLayout },
|
|
7
|
-
React.createElement(Body, null,
|
|
8
|
-
React.createElement(Pricing, { balanceDiscount: pricing.balanceDiscount, collapsed: collapsed, discount: pricing.discount, discountPercentage: pricing.discountPercentage, pendingToPay: pricing.pendingToPay, service: pricing.service, subtotal: pricing.subtotal, totalCheckoutItemsKept: totalCheckoutItemsKept, onPress: onPress, onSubmit: onSubmit }))));
|
|
9
|
-
export { StickyPricing };
|