@lookiero/checkout 6.4.0 → 6.5.0-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/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/ExpoRoot.js +1 -1
- package/dist/src/infrastructure/ui/Root.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/templates/header/Header.js +3 -6
- package/dist/src/infrastructure/ui/components/templates/header/Header.style.d.ts +3 -2
- package/dist/src/infrastructure/ui/components/templates/header/Header.style.js +4 -3
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +6 -7
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.style.d.ts +2 -1
- package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.style.js +2 -1
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +2 -1
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +8 -0
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +11 -0
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +2 -1
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.style.d.ts +8 -0
- package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.style.js +11 -0
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.js +1 -0
- package/dist/src/infrastructure/ui/routing/Routing.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/checkout/Checkout.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +9 -9
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +5 -18
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +7 -21
- package/dist/src/infrastructure/ui/views/feedback/Feedback.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/feedback/Feedback.js +1 -1
- package/dist/src/infrastructure/ui/views/feedback/Feedback.style.d.ts +0 -3
- package/dist/src/infrastructure/ui/views/feedback/Feedback.style.js +0 -4
- package/dist/src/infrastructure/ui/views/item/Item.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/Item.js +4 -4
- package/dist/src/infrastructure/ui/views/item/Item.style.d.ts +4 -4
- package/dist/src/infrastructure/ui/views/item/Item.style.js +5 -6
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +3 -4
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.js +1 -0
- package/dist/src/infrastructure/ui/views/return/Return.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/return/Return.js +0 -1
- package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -3
- package/dist/src/infrastructure/ui/views/return/Return.style.js +1 -5
- package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.js +2 -2
- package/dist/src/infrastructure/ui/views/summary/Summary.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/summary/Summary.js +19 -18
- package/dist/src/infrastructure/ui/views/summary/Summary.style.d.ts +4 -4
- package/dist/src/infrastructure/ui/views/summary/Summary.style.js +7 -8
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.d.ts +13 -0
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +33 -0
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.style.d.ts +18 -0
- package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.style.js +21 -0
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.d.ts +2 -14
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +15 -28
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.style.d.ts +0 -15
- package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.style.js +1 -16
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -1
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +2 -2
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +6 -2
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.style.d.ts +10 -1
- package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.style.js +13 -4
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/src/ExpoRoot.tsx +1 -1
- package/src/infrastructure/ui/Root.tsx +1 -1
- package/src/infrastructure/ui/components/templates/header/Header.style.ts +4 -3
- package/src/infrastructure/ui/components/templates/header/Header.tsx +7 -11
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.style.ts +2 -1
- package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +10 -11
- package/src/infrastructure/ui/{views/summary/components/stickyPricing/StickyPricing.style.ts → components/templates/header/itemDetailHeader/ItemDetailHeader.style.ts} +5 -4
- package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +2 -1
- package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.style.ts +1 -0
- package/src/infrastructure/ui/routing/Routing.tsx +1 -1
- package/src/infrastructure/ui/views/checkout/Checkout.style.ts +7 -21
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +13 -22
- package/src/infrastructure/ui/views/feedback/Feedback.style.ts +0 -4
- package/src/infrastructure/ui/views/feedback/Feedback.tsx +2 -2
- package/src/infrastructure/ui/views/item/Item.style.ts +5 -6
- package/src/infrastructure/ui/views/item/Item.tsx +21 -21
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.ts +1 -0
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +11 -13
- package/src/infrastructure/ui/views/return/Return.style.ts +1 -5
- package/src/infrastructure/ui/views/return/Return.tsx +1 -2
- package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.ts +2 -1
- package/src/infrastructure/ui/views/summary/Summary.style.ts +8 -7
- package/src/infrastructure/ui/views/summary/Summary.tsx +50 -55
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.style.ts +24 -0
- package/src/infrastructure/ui/views/summary/components/{pricing/Pricing.test.tsx → collapsiblePricing/CollapsiblePricing.test.tsx} +2 -7
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +81 -0
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.style.ts +1 -16
- package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +34 -94
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.style.ts +13 -4
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +6 -2
- package/src/infrastructure/ui/components/layouts/layout/Layout.ts +0 -25
- package/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.test.tsx +0 -40
- package/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.tsx +0 -9
- package/src/infrastructure/ui/components/layouts/layout/components/footer/__snapshots__/Footer.test.tsx.snap +0 -36
- package/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.ts +0 -21
- package/src/infrastructure/ui/components/layouts/layout/components/header/Header.test.tsx +0 -26
- package/src/infrastructure/ui/components/layouts/layout/components/header/Header.tsx +0 -10
- package/src/infrastructure/ui/components/layouts/layout/components/header/__snapshots__/Header.test.tsx.snap +0 -45
- package/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.ts +0 -15
- package/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.test.tsx +0 -66
- package/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.tsx +0 -45
- package/src/infrastructure/ui/components/layouts/layout/dummyLayout/__snapshots__/DummyLayout.test.tsx.snap +0 -1349
- package/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.test.tsx +0 -23
- package/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.tsx +0 -18
- package/src/infrastructure/ui/components/templates/header/defaultHeader/__snapshots__/DefaultHeader.test.tsx.snap +0 -195
- package/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.tsx +0 -46
- /package/src/infrastructure/ui/views/summary/components/{pricing → collapsiblePricing}/__snapshots__/Pricing.test.tsx.snap +0 -0
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import React, { FC } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonIcon, Text } from "@lookiero/aurora";
|
|
3
3
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
4
4
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
5
5
|
import { Header } from "../Header";
|
|
6
6
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
7
|
-
import style from "./CheckoutHeader.style";
|
|
7
|
+
import { style } from "./CheckoutHeader.style";
|
|
8
8
|
|
|
9
9
|
interface CheckoutHeaderProps {
|
|
10
10
|
readonly onBack?: () => void;
|
|
11
11
|
}
|
|
12
|
+
|
|
12
13
|
const CheckoutHeader: FC<CheckoutHeaderProps> = ({ onBack }) => {
|
|
13
14
|
const title = useI18nMessage({ id: I18nMessages.HEADER_COMPLETE_CHECKOUT_TITLE });
|
|
14
15
|
|
|
15
16
|
return (
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</Header>
|
|
24
|
-
</Box>
|
|
17
|
+
<Header testID="checkout-header">
|
|
18
|
+
<ButtonIcon name="arrow_left" style={style.button} testID="arrow-left-button-icon" onPress={onBack} />
|
|
19
|
+
<Text level={3} action>
|
|
20
|
+
{title}
|
|
21
|
+
</Text>
|
|
22
|
+
<ButtonIconPlaceholder />
|
|
23
|
+
</Header>
|
|
25
24
|
);
|
|
26
25
|
};
|
|
27
26
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
|
|
4
|
-
const {
|
|
4
|
+
const { space10 } = theme();
|
|
5
5
|
|
|
6
6
|
const style = StyleSheet.create({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
button: {
|
|
8
|
+
alignSelf: "auto",
|
|
9
|
+
height: space10,
|
|
10
|
+
width: space10,
|
|
10
11
|
},
|
|
11
12
|
});
|
|
12
13
|
|
package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { useI18nMessage } from "@lookiero/i18n-react";
|
|
|
4
4
|
import { I18nMessages } from "../../../../i18n/i18n";
|
|
5
5
|
import { Header } from "../Header";
|
|
6
6
|
import { ButtonIconPlaceholder } from "../buttonIconPlaceholder/ButtonIconPlaceholder";
|
|
7
|
+
import { style } from "./ItemDetailHeader.style";
|
|
7
8
|
|
|
8
9
|
interface ItemDetailHeaderProps {
|
|
9
10
|
readonly onBack: () => void;
|
|
@@ -17,7 +18,7 @@ const ItemDetailHeader: FC<ItemDetailHeaderProps> = ({ onBack }) => {
|
|
|
17
18
|
<Text level={3} action>
|
|
18
19
|
{title}
|
|
19
20
|
</Text>
|
|
20
|
-
<ButtonIcon name="close" testID="close-button-icon" onPress={onBack} />
|
|
21
|
+
<ButtonIcon name="close" style={style.button} testID="close-button-icon" onPress={onBack} />
|
|
21
22
|
</Header>
|
|
22
23
|
);
|
|
23
24
|
};
|
|
@@ -3,11 +3,11 @@ import { Navigate, Outlet, useRoutes as reactRouterUseRoutes } from "react-route
|
|
|
3
3
|
import { Spinner } from "@lookiero/aurora";
|
|
4
4
|
import { I18n } from "@lookiero/i18n-react";
|
|
5
5
|
import { Kameleoon } from "@lookiero/sty-psp-ab-testing";
|
|
6
|
+
import { Layout } from "@lookiero/sty-psp-ui";
|
|
6
7
|
import { Customer } from "../../../projection/shared/customer";
|
|
7
8
|
import { Order } from "../../../projection/shared/order";
|
|
8
9
|
import { Subscription } from "../../../projection/shared/subscription";
|
|
9
10
|
import { KameleoonEnvironment } from "../../ab-testing/kameleoonEnvironment";
|
|
10
|
-
import { Layout } from "../components/layouts/layout/Layout";
|
|
11
11
|
import { NewFeedbackExperimentProvider } from "../hooks/useNewFeedbackExperiment";
|
|
12
12
|
import { StaticInfoProvider } from "../hooks/useStaticInfo";
|
|
13
13
|
import { App } from "../views/App";
|
|
@@ -1,20 +1,18 @@
|
|
|
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";
|
|
4
3
|
|
|
5
|
-
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space4, space6,
|
|
4
|
+
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space4, space6, space12, space16, space24 } = theme();
|
|
6
5
|
|
|
7
6
|
const style = StyleSheet.create({
|
|
8
7
|
contentWrapper: {
|
|
9
8
|
backgroundColor: colorBgBase,
|
|
10
9
|
flexGrow: 0,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
deliveryBannerContainer: {
|
|
14
|
-
marginBottom: space6,
|
|
10
|
+
paddingHorizontal: space6,
|
|
11
|
+
paddingVertical: space6,
|
|
15
12
|
},
|
|
16
13
|
desktopContentWrapper: {
|
|
17
14
|
borderRadius: borderRadius4,
|
|
15
|
+
paddingVertical: space12,
|
|
18
16
|
},
|
|
19
17
|
desktopLayoutSpacing: {
|
|
20
18
|
paddingVertical: space12,
|
|
@@ -25,20 +23,8 @@ const style = StyleSheet.create({
|
|
|
25
23
|
desktopResume: {
|
|
26
24
|
borderRadius: borderRadius4,
|
|
27
25
|
},
|
|
28
|
-
header: {
|
|
29
|
-
backgroundColor: colorBgBase,
|
|
30
|
-
height: HEADER_HEIGHT,
|
|
31
|
-
},
|
|
32
|
-
mobileInfo: {
|
|
33
|
-
paddingHorizontal: space6,
|
|
34
|
-
paddingTop: space6,
|
|
35
|
-
},
|
|
36
26
|
paymentSelector: {
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
pricingContainer: {
|
|
40
|
-
paddingHorizontal: space6,
|
|
41
|
-
paddingVertical: space8,
|
|
27
|
+
marginTop: space6,
|
|
42
28
|
},
|
|
43
29
|
princingWrapper: {
|
|
44
30
|
padding: space6,
|
|
@@ -49,7 +35,7 @@ const style = StyleSheet.create({
|
|
|
49
35
|
...Platform.select({
|
|
50
36
|
web: {
|
|
51
37
|
position: "sticky",
|
|
52
|
-
top:
|
|
38
|
+
top: space24,
|
|
53
39
|
alignSelf: "flex-start",
|
|
54
40
|
},
|
|
55
41
|
}),
|
|
@@ -59,7 +45,7 @@ const style = StyleSheet.create({
|
|
|
59
45
|
backgroundColor: colorBgPrimaryLight,
|
|
60
46
|
},
|
|
61
47
|
title: {
|
|
62
|
-
|
|
48
|
+
marginBottom: space4,
|
|
63
49
|
},
|
|
64
50
|
});
|
|
65
51
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { FC, ReactNode, useCallback, useMemo } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { useNavigate } from "react-router-native";
|
|
4
|
-
import { Box, Layout, Spinner, Text, useDevice } from "@lookiero/aurora";
|
|
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 LocalLayout } from "@lookiero/sty-psp-ui";
|
|
7
8
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
8
9
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
9
10
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
@@ -11,7 +12,6 @@ import { TrackingPage } from "../../../tracking/tracking";
|
|
|
11
12
|
import { useTrackPageView } from "../../../tracking/useTrackPageView";
|
|
12
13
|
import { useTrackPressBack } from "../../../tracking/useTrackPressBack";
|
|
13
14
|
import { useTrackPressContinue } from "../../../tracking/useTrackPressContinue";
|
|
14
|
-
import { Layout as LocalLayout } from "../../components/layouts/layout/Layout";
|
|
15
15
|
import { CheckoutHeader } from "../../components/templates/header/checkoutHeader/CheckoutHeader";
|
|
16
16
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
17
17
|
import { I18nMessages } from "../../i18n/i18n";
|
|
@@ -99,18 +99,13 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: LocalLayout, useRedirec
|
|
|
99
99
|
<LocalLayout
|
|
100
100
|
header={<CheckoutHeader onBack={handleOnBack} />}
|
|
101
101
|
style={{
|
|
102
|
-
header: style.header,
|
|
103
102
|
scrollView: style.scrollView,
|
|
104
103
|
}}
|
|
105
104
|
>
|
|
106
105
|
{hasReplacedCheckoutItem && <DeliveryBanner />}
|
|
107
106
|
<Layout fullWidth={!screen.L} style={screen.L && style.desktopLayoutSpacing}>
|
|
108
|
-
<Box size={{ L: "2/3" }} style={screen.L
|
|
109
|
-
<View style={[style.contentWrapper, screen.L
|
|
110
|
-
<View style={style.paymentSelector}>
|
|
111
|
-
<PaymentInstrument useRedirect={useRedirect} />
|
|
112
|
-
</View>
|
|
113
|
-
|
|
107
|
+
<Box size={{ L: "2/3" }} style={screen.L && style.desktopListSpacing}>
|
|
108
|
+
<View style={[style.contentWrapper, screen.L && style.desktopContentWrapper]}>
|
|
114
109
|
<Text level={3} style={style.title} heading>
|
|
115
110
|
{titleText}
|
|
116
111
|
</Text>
|
|
@@ -133,24 +128,20 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: LocalLayout, useRedirec
|
|
|
133
128
|
/>
|
|
134
129
|
</View>
|
|
135
130
|
))}
|
|
131
|
+
|
|
132
|
+
<View style={style.paymentSelector}>
|
|
133
|
+
<PaymentInstrument useRedirect={useRedirect} />
|
|
134
|
+
</View>
|
|
136
135
|
</View>
|
|
137
136
|
</Box>
|
|
138
137
|
|
|
139
|
-
<Box size={{ L: "1/3" }} style={[style.resume, screen.L
|
|
138
|
+
<Box size={{ L: "1/3" }} style={[style.resume, screen.L && style.desktopResume]}>
|
|
140
139
|
{pricing ? (
|
|
141
140
|
<View style={style.princingWrapper}>
|
|
142
|
-
<Pricing
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
discountPercentage={pricing.discountPercentage}
|
|
147
|
-
pendingToPay={pricing.pendingToPay}
|
|
148
|
-
service={pricing.service}
|
|
149
|
-
submitButtonText={submitButtonText}
|
|
150
|
-
subtotal={pricing.subtotal}
|
|
151
|
-
totalCheckoutItemsKept={checkoutItemsKept?.length || 0}
|
|
152
|
-
onSubmit={handleOnSubmit}
|
|
153
|
-
/>
|
|
141
|
+
<Pricing pricing={pricing} totalCheckoutItemsKept={checkoutItemsKept?.length || 0} />
|
|
142
|
+
<Button testID="confirm-checkout-button" onPress={handleOnSubmit}>
|
|
143
|
+
{submitButtonText}
|
|
144
|
+
</Button>
|
|
154
145
|
</View>
|
|
155
146
|
) : null}
|
|
156
147
|
</Box>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
3
|
|
|
5
4
|
const { space8, space10 } = theme();
|
|
6
5
|
|
|
@@ -12,9 +11,6 @@ const style = StyleSheet.create({
|
|
|
12
11
|
container: {
|
|
13
12
|
paddingBottom: space10,
|
|
14
13
|
},
|
|
15
|
-
header: {
|
|
16
|
-
height: HEADER_HEIGHT,
|
|
17
|
-
},
|
|
18
14
|
});
|
|
19
15
|
|
|
20
16
|
export { style };
|
|
@@ -2,6 +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
6
|
import { CheckoutFeedbackProjection } from "../../../../projection/checkoutFeedback/checkoutFeedback";
|
|
6
7
|
import { CheckoutQuestionType } from "../../../../projection/checkoutQuestion/checkoutQuestion";
|
|
7
8
|
import { useGiveCheckoutFeedback } from "../../../domain/checkoutFeedback/react/useGiveCheckoutFeedback";
|
|
@@ -12,7 +13,6 @@ import { useTrackChangeFeedback } from "../../../tracking/useTrackChangeFeedback
|
|
|
12
13
|
import { useTrackPageView } from "../../../tracking/useTrackPageView";
|
|
13
14
|
import { useTrackPressContinue } from "../../../tracking/useTrackPressContinue";
|
|
14
15
|
import { Body } from "../../components/layouts/body/Body";
|
|
15
|
-
import { Layout } from "../../components/layouts/layout/Layout";
|
|
16
16
|
import { CheckoutQuestionFeedbackProvider } from "../../components/organisms/checkoutQuestions/behaviors/useCheckoutQuestionFeedback";
|
|
17
17
|
import { useStaticInfo } from "../../hooks/useStaticInfo";
|
|
18
18
|
import { style } from "./Feedback.style";
|
|
@@ -114,7 +114,7 @@ const Feedback: FC<FeedbackProps> = ({ layout: Layout }) => {
|
|
|
114
114
|
|
|
115
115
|
return (
|
|
116
116
|
<CheckoutQuestionFeedbackProvider feedback={{}} onChanged={handleOnChangedFeedback}>
|
|
117
|
-
<Layout style={{
|
|
117
|
+
<Layout style={{ scrollView: style.container }}>
|
|
118
118
|
<Body style={{ column: style.bodyColumn }}>
|
|
119
119
|
<CheckoutQuestionsForm
|
|
120
120
|
checkoutQuestions={checkoutQuestions || []}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
3
|
|
|
5
|
-
const { colorBgPrimaryLight } = theme();
|
|
4
|
+
const { colorBgPrimaryLight, space12 } = theme();
|
|
6
5
|
|
|
7
6
|
const style = StyleSheet.create({
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
content: {
|
|
8
|
+
flex: 1,
|
|
10
9
|
},
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
fiveItemsDiscountPadding: {
|
|
11
|
+
paddingTop: space12,
|
|
13
12
|
},
|
|
14
13
|
headerWrapper: {
|
|
15
14
|
display: "flex",
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
2
3
|
import { generatePath, useMatch, useNavigate, useParams } from "react-router-native";
|
|
3
4
|
import { Box, Spinner } from "@lookiero/aurora";
|
|
4
5
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
5
6
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
6
7
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
8
|
+
import { Layout } from "@lookiero/sty-psp-ui";
|
|
7
9
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
8
10
|
import {
|
|
9
11
|
BookedProductsVariantsProjection,
|
|
@@ -25,7 +27,6 @@ import { useTrackPressNext } from "../../../tracking/useTrackPressNext";
|
|
|
25
27
|
import { useTrackPressPrevious } from "../../../tracking/useTrackPressPrevious";
|
|
26
28
|
import { useTrackReturnItem } from "../../../tracking/useTrackReturnItem";
|
|
27
29
|
import { FiveItemsDiscountBanner } from "../../components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner";
|
|
28
|
-
import { Layout } from "../../components/layouts/layout/Layout";
|
|
29
30
|
import { ReturnQuestionFeedbackProvider } from "../../components/organisms/returnQuestions/behaviors/useReturnQuestionFeedback";
|
|
30
31
|
import { ItemDetailHeader } from "../../components/templates/header/itemDetailHeader/ItemDetailHeader";
|
|
31
32
|
import { ItemHeader } from "../../components/templates/header/itemHeader/ItemHeader";
|
|
@@ -253,30 +254,29 @@ const Item: FC<ItemProps> = ({ layout: Layout }) => {
|
|
|
253
254
|
<ReturnQuestionFeedbackProvider key={checkoutItem.id} feedback={checkoutItem.feedbacks || {}}>
|
|
254
255
|
<Layout
|
|
255
256
|
header={header}
|
|
256
|
-
scrollEnabled={!itemWithoutCustomerDecission}
|
|
257
257
|
style={{
|
|
258
|
-
header: fiveItemsDiscount !== 0 ? style.headerWithDoubleHeight : style.header,
|
|
259
|
-
scrollView: { height: itemWithoutCustomerDecission ? "100%" : "auto" },
|
|
260
258
|
safeAreaView: isDesktopScreen ? style.safeAreaView : null,
|
|
261
259
|
}}
|
|
262
260
|
>
|
|
263
|
-
{
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
261
|
+
<View style={[style.content, fiveItemsDiscount !== 0 && style.fiveItemsDiscountPadding]}>
|
|
262
|
+
{itemWithoutCustomerDecission ? (
|
|
263
|
+
<ItemWithoutCustomerDecission
|
|
264
|
+
bookedProductsVariants={bookedProductsVariants as BookedProductsVariantsProjection}
|
|
265
|
+
checkoutId={checkout.id}
|
|
266
|
+
checkoutItem={checkoutItem as CheckoutItemWithoutCustomerDecission}
|
|
267
|
+
currentProductVariant={currentProductVariant}
|
|
268
|
+
onReturn={redirectToReturnPage ? goToReturnPage : showReturnQuestions}
|
|
269
|
+
/>
|
|
270
|
+
) : (
|
|
271
|
+
<ItemWithCustomerDecission
|
|
272
|
+
checkoutId={checkout.id}
|
|
273
|
+
checkoutItem={checkoutItem as CheckoutItemWithCustomerDecission}
|
|
274
|
+
currentProductVariant={currentProductVariant}
|
|
275
|
+
returnQuestions={returnQuestions}
|
|
276
|
+
onEditFeedback={redirectToReturnPage ? goToReturnPage : showReturnQuestions}
|
|
277
|
+
/>
|
|
278
|
+
)}
|
|
279
|
+
</View>
|
|
280
280
|
</Layout>
|
|
281
281
|
|
|
282
282
|
{!redirectToReturnPage ? (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC, useCallback, useState } from "react";
|
|
2
|
-
import { LayoutRectangle, Platform
|
|
2
|
+
import { LayoutRectangle, Platform } from "react-native";
|
|
3
3
|
import { Spinner } from "@lookiero/aurora";
|
|
4
4
|
import { CommandStatus } from "@lookiero/messaging-react";
|
|
5
5
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
@@ -104,18 +104,16 @@ const ItemWithoutCustomerDecission: FC<ItemWithoutCustomerDecissionProps> = ({
|
|
|
104
104
|
<>
|
|
105
105
|
<SizeWithoutStockModal visible={sizeWithoutStockModalVisible} onDismiss={handleOnHideSizeWithoutStockModal} />
|
|
106
106
|
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
</Body>
|
|
118
|
-
</ScrollView>
|
|
107
|
+
<Body style={{ row: style.container }}>
|
|
108
|
+
<ProductVariant
|
|
109
|
+
checkoutId={checkoutId}
|
|
110
|
+
checkoutItem={checkoutItem}
|
|
111
|
+
country={country}
|
|
112
|
+
currentProductVariant={currentProductVariant}
|
|
113
|
+
segment={segment}
|
|
114
|
+
style={{ content: { paddingBottom: Platform.OS === "web" ? space6 : stickyHeight } }}
|
|
115
|
+
/>
|
|
116
|
+
</Body>
|
|
119
117
|
|
|
120
118
|
<ItemActions
|
|
121
119
|
country={country}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
3
|
|
|
5
|
-
const { borderRadius5, colorBgPrimaryLight, colorBgBase, colorTextMedium,
|
|
4
|
+
const { borderRadius5, colorBgPrimaryLight, colorBgBase, colorTextMedium, space4, space6, space8 } = theme();
|
|
6
5
|
|
|
7
6
|
const style = StyleSheet.create({
|
|
8
7
|
description: {
|
|
@@ -15,9 +14,6 @@ const style = StyleSheet.create({
|
|
|
15
14
|
desktopLayoutSpacing: {
|
|
16
15
|
paddingVertical: space8,
|
|
17
16
|
},
|
|
18
|
-
header: {
|
|
19
|
-
height: HEADER_HEIGHT - space2,
|
|
20
|
-
},
|
|
21
17
|
headerWrapper: {
|
|
22
18
|
display: "flex",
|
|
23
19
|
flexDirection: "column",
|
|
@@ -7,6 +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 LocalLayout } from "@lookiero/sty-psp-ui";
|
|
10
11
|
import { CheckoutProjection } from "../../../../projection/checkout/checkout";
|
|
11
12
|
import { CheckoutItemProjection } from "../../../../projection/checkoutItem/checkoutItem";
|
|
12
13
|
import { FeedbackProjection } from "../../../../projection/feedback/feedback";
|
|
@@ -20,7 +21,6 @@ import { useTrackPageView } from "../../../tracking/useTrackPageView";
|
|
|
20
21
|
import { useTrackPressNext } from "../../../tracking/useTrackPressNext";
|
|
21
22
|
import { useTrackPressPrevious } from "../../../tracking/useTrackPressPrevious";
|
|
22
23
|
import { useTrackReturnItem } from "../../../tracking/useTrackReturnItem";
|
|
23
|
-
import { Layout as LocalLayout } from "../../components/layouts/layout/Layout";
|
|
24
24
|
import { ReturnQuestions } from "../../components/organisms/returnQuestions/ReturnQuestions";
|
|
25
25
|
import {
|
|
26
26
|
ReturnQuestionFeedbackProvider,
|
|
@@ -167,7 +167,6 @@ const ReturnForm: FC<ReturnFormProps> = ({ checkout, checkoutItem, country, segm
|
|
|
167
167
|
header={header}
|
|
168
168
|
scrollEnabled={false}
|
|
169
169
|
style={{
|
|
170
|
-
header: style.header,
|
|
171
170
|
safeAreaView: style.safeAreaView,
|
|
172
171
|
scrollView: style.scrollView,
|
|
173
172
|
}}
|
package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.style.ts
CHANGED
|
@@ -7,6 +7,7 @@ const {
|
|
|
7
7
|
borderRadiusFull,
|
|
8
8
|
borderWidth2,
|
|
9
9
|
colorBorderInput,
|
|
10
|
+
colorBgPrimaryLight,
|
|
10
11
|
space05,
|
|
11
12
|
space1,
|
|
12
13
|
space2,
|
|
@@ -19,7 +20,7 @@ const IMAGE_HEIGHT = 132;
|
|
|
19
20
|
const style = StyleSheet.create({
|
|
20
21
|
container: {
|
|
21
22
|
alignItems: "flex-end",
|
|
22
|
-
borderBottomColor:
|
|
23
|
+
borderBottomColor: colorBgPrimaryLight,
|
|
23
24
|
borderBottomWidth: 1,
|
|
24
25
|
flexDirection: "row",
|
|
25
26
|
justifyContent: "space-between",
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { Platform, StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
|
-
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
3
|
|
|
5
4
|
const {
|
|
6
5
|
colorTextMedium,
|
|
7
6
|
colorText,
|
|
8
7
|
colorBgPrimaryLight,
|
|
9
8
|
space2,
|
|
9
|
+
space3,
|
|
10
10
|
space4,
|
|
11
11
|
space6,
|
|
12
12
|
space12,
|
|
13
13
|
space16,
|
|
14
|
+
space24,
|
|
14
15
|
borderRadius4,
|
|
15
16
|
colorBgBase,
|
|
16
17
|
} = theme();
|
|
@@ -22,7 +23,7 @@ const style = StyleSheet.create({
|
|
|
22
23
|
},
|
|
23
24
|
description: {
|
|
24
25
|
color: colorTextMedium,
|
|
25
|
-
marginBottom:
|
|
26
|
+
marginBottom: space6,
|
|
26
27
|
},
|
|
27
28
|
desktopContentWrapper: {
|
|
28
29
|
borderRadius: borderRadius4,
|
|
@@ -38,9 +39,6 @@ const style = StyleSheet.create({
|
|
|
38
39
|
desktopResume: {
|
|
39
40
|
borderRadius: borderRadius4,
|
|
40
41
|
},
|
|
41
|
-
header: {
|
|
42
|
-
height: HEADER_HEIGHT,
|
|
43
|
-
},
|
|
44
42
|
mobileInfo: {
|
|
45
43
|
paddingHorizontal: space6,
|
|
46
44
|
paddingTop: space6,
|
|
@@ -66,7 +64,7 @@ const style = StyleSheet.create({
|
|
|
66
64
|
...Platform.select({
|
|
67
65
|
web: {
|
|
68
66
|
position: "sticky",
|
|
69
|
-
top:
|
|
67
|
+
top: space24,
|
|
70
68
|
alignSelf: "flex-start",
|
|
71
69
|
},
|
|
72
70
|
}),
|
|
@@ -74,7 +72,10 @@ const style = StyleSheet.create({
|
|
|
74
72
|
} as any,
|
|
75
73
|
scrollView: {
|
|
76
74
|
backgroundColor: colorBgPrimaryLight,
|
|
77
|
-
|
|
75
|
+
},
|
|
76
|
+
sticky: {
|
|
77
|
+
paddingBottom: space4,
|
|
78
|
+
paddingTop: space3,
|
|
78
79
|
},
|
|
79
80
|
title: {
|
|
80
81
|
marginBottom: space2,
|