@lookiero/checkout 6.5.0-beta.5 → 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 +2 -2
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.d.ts +1 -0
- package/dist/src/infrastructure/ui/views/checkout/Checkout.style.js +2 -1
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.js +0 -1
- package/dist/src/infrastructure/ui/views/return/Return.d.ts +2 -2
- package/dist/src/infrastructure/ui/views/return/Return.js +4 -4
- package/dist/src/infrastructure/ui/views/summary/Summary.d.ts +2 -2
- package/dist/src/infrastructure/ui/views/summary/Summary.js +2 -2
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +3 -3
- package/src/infrastructure/ab-testing/kameleoonEnvironment.ts +3 -3
- package/src/infrastructure/ui/views/checkout/Checkout.style.ts +2 -1
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +5 -5
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.style.ts +0 -1
- package/src/infrastructure/ui/views/return/Return.tsx +8 -8
- package/src/infrastructure/ui/views/summary/Summary.tsx +5 -5
- package/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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
interface Experiment
|
|
1
|
+
interface Experiment {
|
|
2
2
|
readonly id: string;
|
|
3
|
-
readonly variations: Record<
|
|
3
|
+
readonly variations: Record<string, string>;
|
|
4
4
|
}
|
|
5
5
|
interface KameleoonEnvironment {
|
|
6
6
|
readonly siteCode: string;
|
|
7
7
|
readonly experiments: {
|
|
8
|
-
readonly newFeedback: Experiment
|
|
8
|
+
readonly newFeedback: Experiment;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
export type { KameleoonEnvironment };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FC, ReactNode } from "react";
|
|
2
|
-
import { Layout as
|
|
2
|
+
import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
|
|
3
3
|
interface CheckoutProps {
|
|
4
4
|
readonly children?: ReactNode;
|
|
5
|
-
readonly layout:
|
|
5
|
+
readonly layout: UiLayout;
|
|
6
6
|
readonly useRedirect: () => Record<string, string>;
|
|
7
7
|
}
|
|
8
8
|
declare const Checkout: FC<CheckoutProps>;
|
|
@@ -23,7 +23,7 @@ import { Pricing } from "../summary/components/pricing/Pricing";
|
|
|
23
23
|
import { style } from "./Checkout.style";
|
|
24
24
|
import { DeliveryBanner } from "./components/deliveryBanner/DeliveryBanner";
|
|
25
25
|
import { PaymentInstrument } from "./components/paymentInstrument/PaymentInstrument";
|
|
26
|
-
const Checkout = ({ children, layout:
|
|
26
|
+
const Checkout = ({ children, layout: UiLayout, useRedirect }) => {
|
|
27
27
|
const { customer: { customerId, country, segment }, } = useStaticInfo();
|
|
28
28
|
const titleText = useI18nMessage({ id: I18nMessages.CHECKOUT_TITLE });
|
|
29
29
|
const submitButtonText = useI18nMessage({ id: I18nMessages.CHECKOUT_PAY_BUTTON });
|
|
@@ -68,7 +68,7 @@ const Checkout = ({ children, layout: LocalLayout, useRedirect }) => {
|
|
|
68
68
|
if (!dependenciesLoaded) {
|
|
69
69
|
return React.createElement(Spinner, null);
|
|
70
70
|
}
|
|
71
|
-
return (React.createElement(
|
|
71
|
+
return (React.createElement(UiLayout, { header: React.createElement(CheckoutHeader, { onBack: handleOnBack }), scrollEnabled: false, style: {
|
|
72
72
|
header: style.header,
|
|
73
73
|
scrollView: style.scrollView,
|
|
74
74
|
} },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet, Platform } from "react-native";
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
|
-
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space3, space4, space6, space12, space16 } = theme();
|
|
4
|
+
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space2, space3, space4, space6, space12, space16 } = theme();
|
|
5
5
|
const style = StyleSheet.create({
|
|
6
6
|
contentWrapper: {
|
|
7
7
|
backgroundColor: colorBgBase,
|
|
@@ -33,6 +33,7 @@ const style = StyleSheet.create({
|
|
|
33
33
|
},
|
|
34
34
|
princingWrapperSmall: {
|
|
35
35
|
backgroundColor: colorBgPrimaryLight,
|
|
36
|
+
paddingBottom: space2,
|
|
36
37
|
},
|
|
37
38
|
resume: {
|
|
38
39
|
overflow: "hidden",
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "6.5.0
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": "false",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"@lookiero/sty-psp-i18n": "^0.1.7",
|
|
22
22
|
"@lookiero/sty-psp-locale": "^0.2.1",
|
|
23
23
|
"@lookiero/sty-psp-logging": "^0.2.2",
|
|
24
|
-
"@lookiero/sty-psp-notifications": "^0.5.8
|
|
24
|
+
"@lookiero/sty-psp-notifications": "^0.5.8",
|
|
25
25
|
"@lookiero/sty-psp-react-native": "^0.2.0",
|
|
26
26
|
"@lookiero/sty-psp-segment": "^0.1.1",
|
|
27
27
|
"@lookiero/sty-psp-storage": "^0.1.3",
|
|
28
28
|
"@lookiero/sty-psp-tracking": "^0.1.6",
|
|
29
|
-
"@lookiero/sty-psp-ui": "^0.5.5
|
|
29
|
+
"@lookiero/sty-psp-ui": "^0.5.5",
|
|
30
30
|
"@lookiero/sty-psp-ui-settings": "^0.1.1",
|
|
31
31
|
"@lookiero/sty-psp-units": "^0.1.1",
|
|
32
32
|
"@lookiero/sty-psp-uuid": "^0.1.0",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
interface Experiment
|
|
1
|
+
interface Experiment {
|
|
2
2
|
readonly id: string;
|
|
3
|
-
readonly variations: Record<
|
|
3
|
+
readonly variations: Record<string, string>;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
interface KameleoonEnvironment {
|
|
7
7
|
readonly siteCode: string;
|
|
8
8
|
readonly experiments: {
|
|
9
|
-
readonly newFeedback: Experiment
|
|
9
|
+
readonly newFeedback: Experiment;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@ import { StyleSheet, Platform } from "react-native";
|
|
|
2
2
|
import { theme } from "@lookiero/sty-psp-ui";
|
|
3
3
|
import { HEADER_HEIGHT } from "../../components/templates/header/Header.style";
|
|
4
4
|
|
|
5
|
-
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space3, space4, space6, space12, space16 } = theme();
|
|
5
|
+
const { borderRadius4, colorBgPrimaryLight, colorBgBase, space2, space3, space4, space6, space12, space16 } = theme();
|
|
6
6
|
|
|
7
7
|
const style = StyleSheet.create({
|
|
8
8
|
contentWrapper: {
|
|
@@ -35,6 +35,7 @@ const style = StyleSheet.create({
|
|
|
35
35
|
},
|
|
36
36
|
princingWrapperSmall: {
|
|
37
37
|
backgroundColor: colorBgPrimaryLight,
|
|
38
|
+
paddingBottom: space2,
|
|
38
39
|
},
|
|
39
40
|
resume: {
|
|
40
41
|
overflow: "hidden",
|
|
@@ -4,7 +4,7 @@ import { useNavigate } from "react-router-native";
|
|
|
4
4
|
import { Box, Button, Layout, Spinner, Text, useDevice } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
|
-
import { Layout as
|
|
7
|
+
import { Layout as UiLayout, Sticky } from "@lookiero/sty-psp-ui";
|
|
8
8
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
9
9
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
10
10
|
import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
|
|
@@ -26,11 +26,11 @@ import { PaymentInstrument } from "./components/paymentInstrument/PaymentInstrum
|
|
|
26
26
|
|
|
27
27
|
interface CheckoutProps {
|
|
28
28
|
readonly children?: ReactNode;
|
|
29
|
-
readonly layout:
|
|
29
|
+
readonly layout: UiLayout;
|
|
30
30
|
readonly useRedirect: () => Record<string, string>;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
const Checkout: FC<CheckoutProps> = ({ children, layout:
|
|
33
|
+
const Checkout: FC<CheckoutProps> = ({ children, layout: UiLayout, useRedirect }) => {
|
|
34
34
|
const {
|
|
35
35
|
customer: { customerId, country, segment },
|
|
36
36
|
} = useStaticInfo();
|
|
@@ -99,7 +99,7 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: LocalLayout, useRedirec
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
return (
|
|
102
|
-
<
|
|
102
|
+
<UiLayout
|
|
103
103
|
header={<CheckoutHeader onBack={handleOnBack} />}
|
|
104
104
|
scrollEnabled={false}
|
|
105
105
|
style={{
|
|
@@ -172,7 +172,7 @@ const Checkout: FC<CheckoutProps> = ({ children, layout: LocalLayout, useRedirec
|
|
|
172
172
|
) : null}
|
|
173
173
|
|
|
174
174
|
{children}
|
|
175
|
-
</
|
|
175
|
+
</UiLayout>
|
|
176
176
|
);
|
|
177
177
|
};
|
|
178
178
|
|
|
@@ -7,7 +7,7 @@ import { useI18nMessage } from "@lookiero/i18n-react";
|
|
|
7
7
|
import { CommandStatus, QueryStatus } from "@lookiero/messaging-react";
|
|
8
8
|
import { useLogger } from "@lookiero/sty-psp-logging";
|
|
9
9
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
10
|
-
import { Layout as
|
|
10
|
+
import { Layout as UiLayout } from "@lookiero/sty-psp-ui";
|
|
11
11
|
import { CheckoutProjection } from "../../../../projection/checkout/checkout";
|
|
12
12
|
import { CheckoutItemProjection } from "../../../../projection/checkoutItem/checkoutItem";
|
|
13
13
|
import { FeedbackProjection } from "../../../../projection/feedback/feedback";
|
|
@@ -56,11 +56,11 @@ interface ReturnFormProps {
|
|
|
56
56
|
readonly checkoutItem: CheckoutItemProjection;
|
|
57
57
|
readonly country: Country;
|
|
58
58
|
readonly segment: Segment;
|
|
59
|
-
readonly layout:
|
|
59
|
+
readonly layout: UiLayout;
|
|
60
60
|
readonly checkout: CheckoutProjection;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
const ReturnForm: FC<ReturnFormProps> = ({ checkout, checkoutItem, country, segment, layout:
|
|
63
|
+
const ReturnForm: FC<ReturnFormProps> = ({ checkout, checkoutItem, country, segment, layout: UiLayout }) => {
|
|
64
64
|
const { screen } = useDevice();
|
|
65
65
|
const navigate = useNavigate();
|
|
66
66
|
const logger = useLogger();
|
|
@@ -163,7 +163,7 @@ const ReturnForm: FC<ReturnFormProps> = ({ checkout, checkoutItem, country, segm
|
|
|
163
163
|
return (
|
|
164
164
|
<ReturnQuestionItemProvider returnQuestionItems={returnQuestionItems}>
|
|
165
165
|
<PortalHost name="return-question-form-portal" />
|
|
166
|
-
<
|
|
166
|
+
<UiLayout
|
|
167
167
|
header={header}
|
|
168
168
|
scrollEnabled={false}
|
|
169
169
|
style={{
|
|
@@ -195,16 +195,16 @@ const ReturnForm: FC<ReturnFormProps> = ({ checkout, checkoutItem, country, segm
|
|
|
195
195
|
</Box>
|
|
196
196
|
</Layout>
|
|
197
197
|
</ScrollView>
|
|
198
|
-
</
|
|
198
|
+
</UiLayout>
|
|
199
199
|
</ReturnQuestionItemProvider>
|
|
200
200
|
);
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
interface ReturnProps {
|
|
204
|
-
readonly layout:
|
|
204
|
+
readonly layout: UiLayout;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
const Return: FC<ReturnProps> = ({ layout:
|
|
207
|
+
const Return: FC<ReturnProps> = ({ layout: UiLayout }) => {
|
|
208
208
|
const { id } = useParams();
|
|
209
209
|
const {
|
|
210
210
|
customer: { customerId, country, segment },
|
|
@@ -223,7 +223,7 @@ const Return: FC<ReturnProps> = ({ layout: LocalLayout }) => {
|
|
|
223
223
|
checkout={checkout}
|
|
224
224
|
checkoutItem={checkoutItem}
|
|
225
225
|
country={country}
|
|
226
|
-
layout={
|
|
226
|
+
layout={UiLayout}
|
|
227
227
|
segment={segment}
|
|
228
228
|
/>
|
|
229
229
|
</ReturnQuestionFeedbackProvider>
|
|
@@ -4,7 +4,7 @@ import { generatePath, useMatch, useNavigate } from "react-router-native";
|
|
|
4
4
|
import { Box, Text, Layout, useDevice, Spinner } from "@lookiero/aurora";
|
|
5
5
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
6
6
|
import { QueryStatus } from "@lookiero/messaging-react";
|
|
7
|
-
import { Layout as
|
|
7
|
+
import { Layout as UiLayout, Sticky } from "@lookiero/sty-psp-ui";
|
|
8
8
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
9
9
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
10
10
|
import { useViewFiveItemsDiscountByCustomerId } from "../../../projection/checkout/react/useViewFiveItemsDiscountByCustomerId";
|
|
@@ -23,11 +23,11 @@ import { style } from "./Summary.style";
|
|
|
23
23
|
import { CollapsiblePricing } from "./components/collapsiblePricing/CollapsiblePricing";
|
|
24
24
|
|
|
25
25
|
interface SummaryProps {
|
|
26
|
-
readonly layout:
|
|
26
|
+
readonly layout: UiLayout;
|
|
27
27
|
readonly children: ReactNode;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const Summary: FC<SummaryProps> = ({ layout:
|
|
30
|
+
const Summary: FC<SummaryProps> = ({ layout: UiLayout, children }) => {
|
|
31
31
|
const {
|
|
32
32
|
customer: { customerId, country, segment },
|
|
33
33
|
} = useStaticInfo();
|
|
@@ -110,7 +110,7 @@ const Summary: FC<SummaryProps> = ({ layout: LocalLayout, children }) => {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
return (
|
|
113
|
-
<
|
|
113
|
+
<UiLayout
|
|
114
114
|
scrollEnabled={false}
|
|
115
115
|
style={{
|
|
116
116
|
header: style.header,
|
|
@@ -170,7 +170,7 @@ const Summary: FC<SummaryProps> = ({ layout: LocalLayout, children }) => {
|
|
|
170
170
|
</Body>
|
|
171
171
|
</Sticky>
|
|
172
172
|
) : null}
|
|
173
|
-
</
|
|
173
|
+
</UiLayout>
|
|
174
174
|
);
|
|
175
175
|
};
|
|
176
176
|
|
|
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 };
|