@lookiero/checkout 6.5.0-beta.1 → 6.5.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/infrastructure/ui/views/item/Item.js +4 -4
- package/dist/src/infrastructure/ui/views/item/Item.style.d.ts +3 -3
- package/dist/src/infrastructure/ui/views/item/Item.style.js +4 -3
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +4 -3
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.d.ts +0 -1
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.js +1 -1
- package/dist/src/infrastructure/ui/views/summary/Summary.js +14 -13
- package/dist/src/infrastructure/ui/views/summary/Summary.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/views/summary/Summary.style.js +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +3 -3
- package/src/infrastructure/ui/views/item/Item.style.ts +4 -3
- package/src/infrastructure/ui/views/item/Item.tsx +20 -20
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.ts +1 -1
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +13 -11
- package/src/infrastructure/ui/views/summary/Summary.style.ts +1 -0
- package/src/infrastructure/ui/views/summary/Summary.tsx +38 -34
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
2
|
import { generatePath, useMatch, useNavigate, useParams } from "react-router-native";
|
|
4
3
|
import { Box, Spinner } from "@lookiero/aurora";
|
|
5
4
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
@@ -170,10 +169,11 @@ const Item = ({ layout: Layout }) => {
|
|
|
170
169
|
return React.createElement(Spinner, { testID: "spinner" });
|
|
171
170
|
}
|
|
172
171
|
return (React.createElement(ReturnQuestionFeedbackProvider, { key: checkoutItem.id, feedback: checkoutItem.feedbacks || {} },
|
|
173
|
-
React.createElement(Layout, { header: header, style: {
|
|
172
|
+
React.createElement(Layout, { header: header, scrollEnabled: !itemWithoutCustomerDecission, style: {
|
|
173
|
+
header: fiveItemsDiscount !== 0 && style.headerWithDoubleHeight,
|
|
174
|
+
scrollView: { height: itemWithoutCustomerDecission ? "100%" : "auto" },
|
|
174
175
|
safeAreaView: isDesktopScreen ? style.safeAreaView : null,
|
|
175
|
-
} },
|
|
176
|
-
React.createElement(View, { style: [style.content, fiveItemsDiscount !== 0 && style.fiveItemsDiscountPadding] }, itemWithoutCustomerDecission ? (React.createElement(ItemWithoutCustomerDecission, { bookedProductsVariants: bookedProductsVariants, checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, onReturn: redirectToReturnPage ? goToReturnPage : showReturnQuestions })) : (React.createElement(ItemWithCustomerDecission, { checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, returnQuestions: returnQuestions, onEditFeedback: redirectToReturnPage ? goToReturnPage : showReturnQuestions })))),
|
|
176
|
+
} }, itemWithoutCustomerDecission ? (React.createElement(ItemWithoutCustomerDecission, { bookedProductsVariants: bookedProductsVariants, checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, onReturn: redirectToReturnPage ? goToReturnPage : showReturnQuestions })) : (React.createElement(ItemWithCustomerDecission, { checkoutId: checkout.id, checkoutItem: checkoutItem, currentProductVariant: currentProductVariant, returnQuestions: returnQuestions, onEditFeedback: redirectToReturnPage ? goToReturnPage : showReturnQuestions }))),
|
|
177
177
|
!redirectToReturnPage ? (React.createElement(ReturnQuestionsForm, { returnQuestions: returnQuestions, visible: returnQuestionsVisible, onClose: hideReturnQuestions, onSubmit: returnItem })) : null));
|
|
178
178
|
};
|
|
179
179
|
export { Item };
|
|
@@ -1,13 +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";
|
|
3
4
|
const { colorBgPrimaryLight, space12 } = theme();
|
|
4
5
|
const style = StyleSheet.create({
|
|
5
|
-
content: {
|
|
6
|
-
flex: 1,
|
|
7
|
-
},
|
|
8
6
|
fiveItemsDiscountPadding: {
|
|
9
7
|
paddingTop: space12,
|
|
10
8
|
},
|
|
9
|
+
headerWithDoubleHeight: {
|
|
10
|
+
height: HEADER_HEIGHT * 2,
|
|
11
|
+
},
|
|
11
12
|
headerWrapper: {
|
|
12
13
|
display: "flex",
|
|
13
14
|
flexDirection: "column",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useState } from "react";
|
|
2
|
-
import { Platform } from "react-native";
|
|
2
|
+
import { Platform, ScrollView } 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";
|
|
@@ -63,8 +63,9 @@ const ItemWithoutCustomerDecission = ({ checkoutId, checkoutItem, bookedProducts
|
|
|
63
63
|
}
|
|
64
64
|
return (React.createElement(React.Fragment, null,
|
|
65
65
|
React.createElement(SizeWithoutStockModal, { visible: sizeWithoutStockModalVisible, onDismiss: handleOnHideSizeWithoutStockModal }),
|
|
66
|
-
React.createElement(
|
|
67
|
-
React.createElement(
|
|
66
|
+
React.createElement(ScrollView, { showsVerticalScrollIndicator: false },
|
|
67
|
+
React.createElement(Body, { style: { row: style.container } },
|
|
68
|
+
React.createElement(ProductVariant, { checkoutId: checkoutId, checkoutItem: checkoutItem, country: country, currentProductVariant: currentProductVariant, segment: segment, style: { content: { paddingBottom: Platform.OS === "web" ? space6 : stickyHeight } } }))),
|
|
68
69
|
React.createElement(ItemActions, { country: country, currentProductVariant: currentProductVariant, productVariants: bookedProductsVariants?.productVariants, onKeep: handleOnKeep, onLayout: handleOnStickyLayout, onReplace: handleOnReplace, onReturn: onReturn, onShowSizeWithoutStockModal: handleOnShowSizeWithoutStockModal })));
|
|
69
70
|
};
|
|
70
71
|
export { ItemWithoutCustomerDecission };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
2
|
-
import { Platform, View } from "react-native";
|
|
2
|
+
import { Platform, ScrollView, View } from "react-native";
|
|
3
3
|
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";
|
|
@@ -79,20 +79,21 @@ const Summary = ({ layout: LocalLayout, children }) => {
|
|
|
79
79
|
if (!dependenciesLoaded) {
|
|
80
80
|
return React.createElement(Spinner, null);
|
|
81
81
|
}
|
|
82
|
-
return (React.createElement(LocalLayout, { style: {
|
|
82
|
+
return (React.createElement(LocalLayout, { scrollEnabled: false, style: {
|
|
83
83
|
scrollView: style.scrollView,
|
|
84
84
|
} },
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
React.createElement(
|
|
88
|
-
React.createElement(
|
|
89
|
-
React.createElement(View, { style:
|
|
90
|
-
React.createElement(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
React.createElement(
|
|
95
|
-
React.createElement(
|
|
85
|
+
React.createElement(ScrollView, { showsVerticalScrollIndicator: false },
|
|
86
|
+
fiveItemsDiscount !== 0 && React.createElement(FiveItemsDiscountBanner, { fiveItemsDiscount: fiveItemsDiscount }),
|
|
87
|
+
React.createElement(Layout, { fullWidth: !screen.L, style: [screen.L && style.desktopLayoutSpacing, !screen.L && { paddingBottom: pricingHeight }] },
|
|
88
|
+
React.createElement(Box, { size: { L: "2/3" }, style: screen.L && style.desktopListSpacing },
|
|
89
|
+
React.createElement(View, { style: [style.contentWrapper, screen.L && style.desktopContentWrapper] },
|
|
90
|
+
React.createElement(View, { style: !screen.L && style.mobileInfo },
|
|
91
|
+
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
92
|
+
React.createElement(Text, { level: 3, style: style.description }, descriptionText)),
|
|
93
|
+
children)),
|
|
94
|
+
pricing && screen.L ? (React.createElement(Box, { size: { L: "1/3" }, style: [style.resume, screen.L ? style.desktopResume : style.mobileResume] },
|
|
95
|
+
React.createElement(View, { style: style.princingWrapper },
|
|
96
|
+
React.createElement(CollapsiblePricing, { collapsed: false, collapsible: false, pricing: pricing, submitButtonText: submitButtonText, totalCheckoutItemsKept: totalCheckoutItemsKept, onSubmit: handleOnSubmit })))) : null)),
|
|
96
97
|
pricing && !screen.L ? (React.createElement(Sticky, { style: style.sticky, onLayout: Platform.OS !== "web" ? handleOnPricingLayout : undefined },
|
|
97
98
|
React.createElement(Body, null,
|
|
98
99
|
React.createElement(CollapsiblePricing, { collapsed: pricingCollapsed, pricing: pricing, submitButtonText: submitButtonText, totalCheckoutItemsKept: totalCheckoutItemsKept, onPress: handleOnPressPricing, onSubmit: handleOnSubmit })))) : null));
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "6.5.0-beta.
|
|
1
|
+
export declare const VERSION = "6.5.0-beta.3";
|
package/dist/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "6.5.0-beta.
|
|
1
|
+
export const VERSION = "6.5.0-beta.3";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "6.5.0-beta.
|
|
3
|
+
"version": "6.5.0-beta.3",
|
|
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.
|
|
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.
|
|
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,15 +1,16 @@
|
|
|
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";
|
|
3
4
|
|
|
4
5
|
const { colorBgPrimaryLight, space12 } = theme();
|
|
5
6
|
|
|
6
7
|
const style = StyleSheet.create({
|
|
7
|
-
content: {
|
|
8
|
-
flex: 1,
|
|
9
|
-
},
|
|
10
8
|
fiveItemsDiscountPadding: {
|
|
11
9
|
paddingTop: space12,
|
|
12
10
|
},
|
|
11
|
+
headerWithDoubleHeight: {
|
|
12
|
+
height: HEADER_HEIGHT * 2,
|
|
13
|
+
},
|
|
13
14
|
headerWrapper: {
|
|
14
15
|
display: "flex",
|
|
15
16
|
flexDirection: "column",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { FC, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
2
|
import { generatePath, useMatch, useNavigate, useParams } from "react-router-native";
|
|
4
3
|
import { Box, Spinner } from "@lookiero/aurora";
|
|
5
4
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
@@ -254,29 +253,30 @@ const Item: FC<ItemProps> = ({ layout: Layout }) => {
|
|
|
254
253
|
<ReturnQuestionFeedbackProvider key={checkoutItem.id} feedback={checkoutItem.feedbacks || {}}>
|
|
255
254
|
<Layout
|
|
256
255
|
header={header}
|
|
256
|
+
scrollEnabled={!itemWithoutCustomerDecission}
|
|
257
257
|
style={{
|
|
258
|
+
header: fiveItemsDiscount !== 0 && style.headerWithDoubleHeight,
|
|
259
|
+
scrollView: { height: itemWithoutCustomerDecission ? "100%" : "auto" },
|
|
258
260
|
safeAreaView: isDesktopScreen ? style.safeAreaView : null,
|
|
259
261
|
}}
|
|
260
262
|
>
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
)}
|
|
279
|
-
</View>
|
|
263
|
+
{itemWithoutCustomerDecission ? (
|
|
264
|
+
<ItemWithoutCustomerDecission
|
|
265
|
+
bookedProductsVariants={bookedProductsVariants as BookedProductsVariantsProjection}
|
|
266
|
+
checkoutId={checkout.id}
|
|
267
|
+
checkoutItem={checkoutItem as CheckoutItemWithoutCustomerDecission}
|
|
268
|
+
currentProductVariant={currentProductVariant}
|
|
269
|
+
onReturn={redirectToReturnPage ? goToReturnPage : showReturnQuestions}
|
|
270
|
+
/>
|
|
271
|
+
) : (
|
|
272
|
+
<ItemWithCustomerDecission
|
|
273
|
+
checkoutId={checkout.id}
|
|
274
|
+
checkoutItem={checkoutItem as CheckoutItemWithCustomerDecission}
|
|
275
|
+
currentProductVariant={currentProductVariant}
|
|
276
|
+
returnQuestions={returnQuestions}
|
|
277
|
+
onEditFeedback={redirectToReturnPage ? goToReturnPage : showReturnQuestions}
|
|
278
|
+
/>
|
|
279
|
+
)}
|
|
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 } from "react-native";
|
|
2
|
+
import { LayoutRectangle, Platform, ScrollView } 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,16 +104,18 @@ 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
|
-
|
|
107
|
+
<ScrollView showsVerticalScrollIndicator={false}>
|
|
108
|
+
<Body style={{ row: style.container }}>
|
|
109
|
+
<ProductVariant
|
|
110
|
+
checkoutId={checkoutId}
|
|
111
|
+
checkoutItem={checkoutItem}
|
|
112
|
+
country={country}
|
|
113
|
+
currentProductVariant={currentProductVariant}
|
|
114
|
+
segment={segment}
|
|
115
|
+
style={{ content: { paddingBottom: Platform.OS === "web" ? space6 : stickyHeight } }}
|
|
116
|
+
/>
|
|
117
|
+
</Body>
|
|
118
|
+
</ScrollView>
|
|
117
119
|
|
|
118
120
|
<ItemActions
|
|
119
121
|
country={country}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC, ReactNode, useCallback, useEffect, useMemo, useState } from "react";
|
|
2
|
-
import { LayoutRectangle, Platform, View } from "react-native";
|
|
2
|
+
import { LayoutRectangle, Platform, ScrollView, View } from "react-native";
|
|
3
3
|
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";
|
|
@@ -111,45 +111,49 @@ const Summary: FC<SummaryProps> = ({ layout: LocalLayout, children }) => {
|
|
|
111
111
|
|
|
112
112
|
return (
|
|
113
113
|
<LocalLayout
|
|
114
|
+
scrollEnabled={false}
|
|
114
115
|
style={{
|
|
115
116
|
scrollView: style.scrollView,
|
|
116
117
|
}}
|
|
117
118
|
>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
<View style={
|
|
127
|
-
<
|
|
128
|
-
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
{
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
</Box>
|
|
138
|
-
{pricing && screen.L ? (
|
|
139
|
-
<Box size={{ L: "1/3" }} style={[style.resume, screen.L ? style.desktopResume : style.mobileResume]}>
|
|
140
|
-
<View style={style.princingWrapper}>
|
|
141
|
-
<CollapsiblePricing
|
|
142
|
-
collapsed={false}
|
|
143
|
-
collapsible={false}
|
|
144
|
-
pricing={pricing}
|
|
145
|
-
submitButtonText={submitButtonText}
|
|
146
|
-
totalCheckoutItemsKept={totalCheckoutItemsKept}
|
|
147
|
-
onSubmit={handleOnSubmit}
|
|
148
|
-
/>
|
|
119
|
+
<ScrollView showsVerticalScrollIndicator={false}>
|
|
120
|
+
{fiveItemsDiscount !== 0 && <FiveItemsDiscountBanner fiveItemsDiscount={fiveItemsDiscount} />}
|
|
121
|
+
|
|
122
|
+
<Layout
|
|
123
|
+
fullWidth={!screen.L}
|
|
124
|
+
style={[screen.L && style.desktopLayoutSpacing, !screen.L && { paddingBottom: pricingHeight }]}
|
|
125
|
+
>
|
|
126
|
+
<Box size={{ L: "2/3" }} style={screen.L && style.desktopListSpacing}>
|
|
127
|
+
<View style={[style.contentWrapper, screen.L && style.desktopContentWrapper]}>
|
|
128
|
+
<View style={!screen.L && style.mobileInfo}>
|
|
129
|
+
<Text level={3} style={style.title} heading>
|
|
130
|
+
{titleText}
|
|
131
|
+
</Text>
|
|
132
|
+
<Text level={3} style={style.description}>
|
|
133
|
+
{descriptionText}
|
|
134
|
+
</Text>
|
|
135
|
+
</View>
|
|
136
|
+
|
|
137
|
+
{children}
|
|
149
138
|
</View>
|
|
150
139
|
</Box>
|
|
151
|
-
|
|
152
|
-
|
|
140
|
+
|
|
141
|
+
{pricing && screen.L ? (
|
|
142
|
+
<Box size={{ L: "1/3" }} style={[style.resume, screen.L ? style.desktopResume : style.mobileResume]}>
|
|
143
|
+
<View style={style.princingWrapper}>
|
|
144
|
+
<CollapsiblePricing
|
|
145
|
+
collapsed={false}
|
|
146
|
+
collapsible={false}
|
|
147
|
+
pricing={pricing}
|
|
148
|
+
submitButtonText={submitButtonText}
|
|
149
|
+
totalCheckoutItemsKept={totalCheckoutItemsKept}
|
|
150
|
+
onSubmit={handleOnSubmit}
|
|
151
|
+
/>
|
|
152
|
+
</View>
|
|
153
|
+
</Box>
|
|
154
|
+
) : null}
|
|
155
|
+
</Layout>
|
|
156
|
+
</ScrollView>
|
|
153
157
|
|
|
154
158
|
{pricing && !screen.L ? (
|
|
155
159
|
<Sticky style={style.sticky} onLayout={Platform.OS !== "web" ? handleOnPricingLayout : undefined}>
|