@lookiero/checkout 0.5.1 → 0.5.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/infrastructure/ui/routing/Routing.js +4 -2
- package/dist/infrastructure/ui/views/checkout/Checkout.js +4 -4
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.d.ts +1 -0
- package/dist/infrastructure/ui/views/item/components/productVariant/ProductVariant.style.js +6 -1
- package/package.json +7 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PaymentsQueryProvider } from "@lookiero/payments-front";
|
|
1
2
|
import React, { lazy, Suspense } from "react";
|
|
2
3
|
import { Navigate, Outlet, useRoutes } from "react-router-native";
|
|
3
4
|
import { Spinner } from "../../../shared/ui/components/atoms/spinner/Spinner";
|
|
@@ -47,8 +48,9 @@ const Routing = ({ basePath = "", customer, locale, I18n, menu, tabBar, getAuthT
|
|
|
47
48
|
{
|
|
48
49
|
path: Routes.CHECKOUT,
|
|
49
50
|
element: (React.createElement(Suspense, { fallback: React.createElement(Spinner, null) },
|
|
50
|
-
React.createElement(
|
|
51
|
-
React.createElement(
|
|
51
|
+
React.createElement(PaymentsQueryProvider, null,
|
|
52
|
+
React.createElement(Checkout, { country: customer?.country, customerId: customer?.customerId, useRedirect: useRedirect },
|
|
53
|
+
React.createElement(Outlet, null))))),
|
|
52
54
|
children: [
|
|
53
55
|
{
|
|
54
56
|
path: Routes.CHECKOUT_PAYMENT,
|
|
@@ -45,11 +45,11 @@ const Checkout = ({ children, customerId, country, useRedirect }) => {
|
|
|
45
45
|
React.createElement(PaymentInstrumentSelect, { ref: paymentInstrumentSelectRef, beforeRedirect: returnUrl ? () => Promise.resolve(returnUrl) : undefined, hasError: false, hidePaymentMethods: [PaymentMethod.GOOGLE_PAY], section: Section.BOX_CHECKOUT }),
|
|
46
46
|
React.createElement(Text, { level: 3, style: style.title, heading: true }, titleText),
|
|
47
47
|
checkoutItemsKept?.map((checkoutItem) => (React.createElement(View, { key: checkoutItem.id, style: style.checkoutItemKept, testID: "checkout-items-kept" },
|
|
48
|
-
React.createElement(ProductVariant, { brand: checkoutItem.productVariant.brand, color: checkoutItem.productVariant.color, country: country, media: checkoutItem.productVariant.media, name: checkoutItem.productVariant.name, price: checkoutItem.price,
|
|
48
|
+
React.createElement(ProductVariant, { brand: checkoutItem.productVariant.brand, color: checkoutItem.productVariant.color, country: country, media: checkoutItem.productVariant.media, name: checkoutItem.productVariant.name, price: checkoutItem.price, status: checkoutItem.status, size: checkoutItem.status === CheckoutItemStatus.REPLACED && checkoutItem.replacedFor
|
|
49
|
+
? checkoutItem.replacedFor.size
|
|
50
|
+
: checkoutItem.productVariant.size })))),
|
|
49
51
|
pricing && (React.createElement(View, { style: style.pricingContainer },
|
|
50
|
-
React.createElement(Pricing, { balanceDiscount: pricing.balanceDiscount,
|
|
51
|
-
// busy={submitCheckoutStatus === "loading"}
|
|
52
|
-
collapsible: false, discount: pricing.discount, discountPercentage: pricing.discountPercentage, orderTotal: pricing.orderTotal, service: pricing.service, subtotal: pricing.subtotal, totalCheckoutItemsKept: checkoutItemsKept?.length || 0, onSubmit: handleOnSubmit }))))),
|
|
52
|
+
React.createElement(Pricing, { balanceDiscount: pricing.balanceDiscount, collapsible: false, discount: pricing.discount, discountPercentage: pricing.discountPercentage, orderTotal: pricing.orderTotal, service: pricing.service, subtotal: pricing.subtotal, totalCheckoutItemsKept: checkoutItemsKept?.length || 0, onSubmit: handleOnSubmit }))))),
|
|
53
53
|
children));
|
|
54
54
|
};
|
|
55
55
|
export { Checkout };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StyleSheet } from "react-native";
|
|
1
|
+
import { Platform, StyleSheet } from "react-native";
|
|
2
2
|
import { theme } from "../../../../theme/theme";
|
|
3
3
|
const { borderSize, colorGrayscaleL, colorInfo, spaceXS, spaceS, spaceM } = theme();
|
|
4
4
|
const IMAGE_WIDTH = 96;
|
|
@@ -40,6 +40,11 @@ const style = StyleSheet.create({
|
|
|
40
40
|
marginTop: spaceM,
|
|
41
41
|
paddingHorizontal: spaceS,
|
|
42
42
|
paddingVertical: spaceXS,
|
|
43
|
+
...Platform.select({
|
|
44
|
+
web: {
|
|
45
|
+
width: "fit-content",
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
43
48
|
},
|
|
44
49
|
sizeChangeText: {
|
|
45
50
|
textTransform: "uppercase",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@lookiero/data-sources": "^0.3",
|
|
47
47
|
"@lookiero/event": "^0.3",
|
|
48
48
|
"@lookiero/locale": "^0.3",
|
|
49
|
-
"@lookiero/payments-front": "^0.16.
|
|
49
|
+
"@lookiero/payments-front": "^0.16.9",
|
|
50
50
|
"apollo-boost": "0.4.4",
|
|
51
51
|
"graphql": "16.6.0",
|
|
52
52
|
"graphql-tag": "2.12.6",
|
|
@@ -67,27 +67,27 @@
|
|
|
67
67
|
"@lookiero/data-sources": "^0.3",
|
|
68
68
|
"@lookiero/event": "^0.3",
|
|
69
69
|
"@lookiero/locale": "^0.3",
|
|
70
|
-
"@lookiero/payments-front": "^0.16.
|
|
70
|
+
"@lookiero/payments-front": "^0.16.9",
|
|
71
71
|
"@pact-foundation/pact": "^10.1.4",
|
|
72
72
|
"@pact-foundation/pact-node": "^10.17.6",
|
|
73
73
|
"@testing-library/react": "^13.4.0",
|
|
74
74
|
"@testing-library/react-hooks": "^8.0.1",
|
|
75
|
-
"@testing-library/react-native": "^11.
|
|
75
|
+
"@testing-library/react-native": "^11.5.0",
|
|
76
76
|
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
|
|
77
77
|
"@types/jest": "^29.2.4",
|
|
78
|
-
"@types/react": "~18.0.
|
|
78
|
+
"@types/react": "~18.0.26",
|
|
79
79
|
"@types/react-dom": "~18.0.0",
|
|
80
80
|
"@types/react-native": "~0.69.1",
|
|
81
81
|
"@types/uuid": "^9.0.0",
|
|
82
82
|
"apollo-boost": "0.4.4",
|
|
83
|
-
"eslint": "^8.
|
|
83
|
+
"eslint": "^8.31.0",
|
|
84
84
|
"eslint-config-prettier": "^8.5.0",
|
|
85
85
|
"eslint-config-react-app": "^7.0.1",
|
|
86
86
|
"eslint-plugin-flowtype": "^8.0.3",
|
|
87
87
|
"eslint-plugin-import": "^2.26.0",
|
|
88
88
|
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
89
89
|
"eslint-plugin-prettier": "^4.2.1",
|
|
90
|
-
"eslint-plugin-react": "^7.31.
|
|
90
|
+
"eslint-plugin-react": "^7.31.11",
|
|
91
91
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
92
92
|
"eslint-plugin-react-native": "^4.0.0",
|
|
93
93
|
"expo": "~46.0.8",
|