@riosst100/pwa-marketplace 1.8.8 → 1.9.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/i18n/en_US.json +9 -9
- package/package.json +1 -2
- package/src/componentOverrideMapping.js +15 -1
- package/src/components/AccountLayout/accountlayout.module.css +3 -0
- package/src/components/AccountLayout/index.js +147 -0
- package/src/components/BecomeSeller/becomeSeller.js +304 -178
- package/src/components/BecomeSeller/becomeSeller.module.css +3 -3
- package/src/components/BecomeSellerPage/becomeSellerPage.js +2 -1
- package/src/components/BecomeSellerPage/becomeSellerPage.module.css +2 -10
- package/src/components/LegoSets/legoSets.js +48 -18
- package/src/components/LiveChat/chatContent.js +39 -0
- package/src/components/LiveChat/index.js +52 -0
- package/src/components/LiveChat/liveChat.js +160 -0
- package/src/components/NonSportCardsSets/nonSportCardsSets.js +15 -2
- package/src/components/SellerCountry/sellerCountry.js +1 -1
- package/src/components/SellerDetail/sellerDetail.js +34 -3
- package/src/components/ShopBy/shopBy.js +99 -4
- package/src/components/ShopBy/shopBy.module.css +22 -0
- package/src/components/ShopByVehicles/index.js +2 -0
- package/src/components/ShopByVehicles/shopByVehicles.js +327 -0
- package/src/components/ShopByVehicles/shopByVehicles.module.css +76 -0
- package/src/components/ShopByVehicles/shopByVehicles.shimmer.js +50 -0
- package/src/components/SocialLogin/img/facebook.svg +3 -0
- package/src/components/SocialLogin/img/google.svg +6 -0
- package/src/components/SocialLogin/img/instagram.svg +27 -0
- package/src/components/SocialLogin/img/wechat.svg +15 -0
- package/src/components/SocialLogin/img/weibo.svg +7 -0
- package/src/components/SocialLogin/index.js +10 -0
- package/src/components/SocialLogin/socialLogin.js +70 -0
- package/src/components/SportCardsSets/sportCardsSets.js +6 -1
- package/src/components/TrainsSets/index.js +2 -0
- package/src/components/TrainsSets/trainsSets.js +331 -0
- package/src/components/TrainsSets/trainsSets.module.css +76 -0
- package/src/components/TrainsSets/trainsSets.shimmer.js +49 -0
- package/src/overwrites/venia-ui/lib/RootComponents/Category/category.js +5 -0
- package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +4 -0
- package/src/overwrites/venia-ui/lib/components/AccountInformationPage/accountInformationPage.gql.js +48 -0
- package/src/overwrites/venia-ui/lib/components/AccountInformationPage/accountInformationPage.js +147 -0
- package/src/overwrites/venia-ui/lib/components/AccountInformationPage/accountInformationPage.module.css +52 -0
- package/src/overwrites/venia-ui/lib/components/AccountInformationPage/accountInformationPageFragment.gql.js +10 -0
- package/src/overwrites/venia-ui/lib/components/AccountInformationPage/editForm.js +206 -0
- package/src/overwrites/venia-ui/lib/components/AccountInformationPage/editForm.module.css +40 -0
- package/src/overwrites/venia-ui/lib/components/AccountInformationPage/editModal.js +107 -0
- package/src/overwrites/venia-ui/lib/components/AccountInformationPage/editModal.module.css +3 -0
- package/src/overwrites/venia-ui/lib/components/AccountInformationPage/index.js +14 -0
- package/src/overwrites/venia-ui/lib/components/AccountMenu/accountMenu.js +107 -0
- package/src/overwrites/venia-ui/lib/components/AccountMenu/accountMenu.module.css +73 -0
- package/src/overwrites/venia-ui/lib/components/AccountMenu/accountMenuItems.js +58 -0
- package/src/overwrites/venia-ui/lib/components/AccountMenu/accountMenuItems.module.css +31 -0
- package/src/overwrites/venia-ui/lib/components/AccountMenu/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/Button/button.js +1 -1
- package/src/overwrites/venia-ui/lib/components/CartPage/GiftCards/giftCard.js +50 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/GiftCards/giftCard.module.css +11 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/GiftCards/giftCards.js +238 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/GiftCards/giftCards.module.css +98 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/GiftCards/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/CouponCode/couponCode.js +178 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/CouponCode/couponCode.module.css +52 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/CouponCode/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/GiftOptions/giftOptions.js +321 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/GiftOptions/giftOptions.module.css +61 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/GiftOptions/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/ShippingMethods/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingForm.js +103 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingForm.module.css +36 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingMethods.js +103 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingMethods.module.css +33 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadio.js +37 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadio.module.css +3 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadios.js +106 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadios.module.css +10 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/giftCardSection.ce.js +7 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/giftCardSection.ee.js +28 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/giftOptionsSection.ce.js +7 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/giftOptionsSection.ee.js +38 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/priceAdjustments.js +95 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceAdjustments/priceAdjustments.module.css +2 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/discountSummary.js +123 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/discountSummary.module.css +40 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/giftCardSummary.ce.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/giftCardSummary.ee.js +60 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/giftOptionsSummary.ce.js +5 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/giftOptionsSummary.ee.js +40 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/priceSummary.js +210 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/priceSummary.module.css +51 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/shippingSummary.js +58 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/PriceSummary/taxSummary.js +57 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/EditModal/editModal.js +41 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/EditModal/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/EditModal/productDetail.js +80 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/EditModal/productDetail.module.css +33 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/EditModal/productForm.js +153 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/EditModal/productForm.module.css +52 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/errorMessage.js +31 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/errorMessage.module.css +13 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/product.js +271 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/product.module.css +156 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/productListing.js +94 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/productListing.module.css +11 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/ProductListing/quantity.js +40 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/cartPage.js +126 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/cartPage.module.css +64 -0
- package/src/overwrites/venia-ui/lib/components/CartPage/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/AddressBook/addressBook.js +190 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/AddressBook/addressBook.module.css +78 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/AddressBook/addressCard.js +125 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/AddressBook/addressCard.module.css +94 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/AddressBook/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/BillingAddress/billingAddress.js +213 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/BillingAddress/billingAddress.module.css +36 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/BillingAddress/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/GuestSignIn/guestSignIn.js +93 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/GuestSignIn/guestSignIn.module.css +55 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/GuestSignIn/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/__fixtures__/cartItems.js +102 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/item.js +54 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/item.module.css +60 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/itemsReview.js +84 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/itemsReview.module.css +20 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/showAllButton.js +38 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/showAllButton.module.css +28 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js +213 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.module.css +24 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/orderConfirmationPage.js +162 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/orderConfirmationPage.module.css +70 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderSummary/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderSummary/orderSummary.js +34 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderSummary/orderSummary.module.css +17 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/brainTreeDropIn.js +196 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/braintreeDropin.module.css +26 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/braintreeSummary.js +160 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/braintreeSummary.module.css +62 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/creditCard.js +348 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/creditCard.module.css +58 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/editCard.js +44 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/editCard.module.css +5 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/editModal.js +88 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/editablePaymentCollection.js +23 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentInformation.js +99 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentInformation.module.css +23 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethodCollection.js +23 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethods.js +121 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethods.module.css +34 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/summary.js +71 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/summary.module.css +23 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/summaryPaymentCollection.js +23 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PriceAdjustments/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PriceAdjustments/priceAdjustments.js +63 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/PriceAdjustments/priceAdjustments.module.css +2 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/AddressForm/addressForm.js +18 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/AddressForm/customerForm.js +401 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/AddressForm/customerForm.module.css +58 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/AddressForm/guestForm.js +455 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/AddressForm/guestForm.module.css +52 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/AddressForm/index.js +3 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/card.js +66 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/card.module.css +12 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/editModal.js +65 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/editModal.module.css +90 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/shippingInformation.js +149 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/shippingInformation.module.css +88 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/completedView.js +114 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/completedView.module.css +48 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/shippingMethod.js +154 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/shippingMethod.module.css +27 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/shippingRadios.js +80 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/shippingRadios.module.css +22 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/updateModal.js +85 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/updateModal.module.css +3 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/checkoutPage.js +472 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/checkoutPage.module.css +186 -0
- package/src/overwrites/venia-ui/lib/components/CheckoutPage/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CreateAccount/createAccount.js +323 -0
- package/src/overwrites/venia-ui/lib/components/CreateAccount/createAccount.module.css +52 -0
- package/src/overwrites/venia-ui/lib/components/CreateAccount/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/CreateAccountPage/createAccountPage.js +48 -0
- package/src/overwrites/venia-ui/lib/components/CreateAccountPage/createAccountPage.module.css +21 -0
- package/src/overwrites/venia-ui/lib/components/CreateAccountPage/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/Dialog/dialog.js +198 -0
- package/src/overwrites/venia-ui/lib/components/Dialog/dialog.module.css +189 -0
- package/src/overwrites/venia-ui/lib/components/Dialog/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/FilterSidebar/filterSidebar.js +8 -7
- package/src/overwrites/venia-ui/lib/components/Gallery/item.js +12 -4
- package/src/overwrites/venia-ui/lib/components/Gallery/item.module.css +2 -2
- package/src/overwrites/venia-ui/lib/components/Header/header.js +37 -2
- package/src/overwrites/venia-ui/lib/components/Main/main.js +1 -1
- package/src/overwrites/venia-ui/lib/components/MegaMenu/shopByColumn.js +3 -2
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenu.js +1 -1
- package/src/overwrites/venia-ui/lib/components/MyAccount/ResetPassword/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/MyAccount/ResetPassword/resetPassword.gql.js +22 -0
- package/src/overwrites/venia-ui/lib/components/MyAccount/ResetPassword/resetPassword.js +143 -0
- package/src/overwrites/venia-ui/lib/components/MyAccount/ResetPassword/resetPassword.module.css +53 -0
- package/src/overwrites/venia-ui/lib/components/MyAccount/accountLink.js +42 -0
- package/src/overwrites/venia-ui/lib/components/MyAccount/accountLink.module.css +33 -0
- package/src/overwrites/venia-ui/lib/components/MyAccount/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/MyAccount/myAccount.js +38 -0
- package/src/overwrites/venia-ui/lib/components/MyAccount/myAccount.module.css +5 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/billingInformation.js +71 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/billingInformation.module.css +9 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/item.js +121 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/item.module.css +35 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/items.js +70 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/items.module.css +16 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/orderDetails.js +207 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/orderDetails.module.css +102 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/orderTotal.js +159 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/orderTotal.module.css +50 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/paymentMethod.js +45 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/paymentMethod.module.css +14 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/shippingInformation.js +90 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/shippingInformation.module.css +9 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/shippingMethod.js +86 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/shippingMethod.module.css +19 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/collapsedImageGallery.js +63 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/collapsedImageGallery.module.css +16 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/index.js +15 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderHistoryPage.js +227 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderHistoryPage.module.css +70 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderProgressBar.js +70 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderProgressBar.module.css +14 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderRow.js +324 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/orderRow.module.css +146 -0
- package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/resetButton.js +41 -0
- package/src/overwrites/venia-ui/lib/components/Password/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/Password/password.js +102 -0
- package/src/overwrites/venia-ui/lib/components/Password/password.module.css +26 -0
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +30 -15
- package/src/overwrites/venia-ui/lib/components/Select/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/Select/option.js +28 -0
- package/src/overwrites/venia-ui/lib/components/Select/select.js +74 -0
- package/src/overwrites/venia-ui/lib/components/Select/select.module.css +25 -0
- package/src/overwrites/venia-ui/lib/components/SignIn/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/SignIn/signIn.gql.js +50 -0
- package/src/overwrites/venia-ui/lib/components/SignIn/signIn.js +224 -0
- package/src/overwrites/venia-ui/lib/components/SignIn/signIn.module.css +65 -0
- package/src/overwrites/venia-ui/lib/components/SignInPage/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/SignInPage/signInPage.js +50 -0
- package/src/overwrites/venia-ui/lib/components/SignInPage/signInPage.module.css +17 -0
- package/src/overwrites/venia-ui/lib/components/TextInput/textInput.js +1 -1
- package/src/talons/Header/logo.gql.js +19 -0
- package/src/talons/Header/useLogo.js +19 -0
- package/src/talons/LegoSets/legoSets.gql.js +2 -2
- package/src/talons/LegoSets/useLegoSets.js +4 -2
- package/src/talons/NonSportCardsSets/useNonSportCardsSets.js +1 -1
- package/src/talons/ShopBy/shopBy.gql.js +2 -2
- package/src/talons/ShopBy/useShopBy.js +20 -9
- package/src/talons/ShopByVehicles/shopByVehicles.gql.js +60 -0
- package/src/talons/ShopByVehicles/useShopByVehicles.js +222 -0
- package/src/talons/SportCardsSets/useSportCardsSets.js +1 -1
- package/src/talons/TrainsSets/trainsSets.gql.js +60 -0
- package/src/talons/TrainsSets/useTrainsSets.js +223 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
|
|
4
|
+
import { useItemsReview } from '@magento/peregrine/lib/talons/CheckoutPage/ItemsReview/useItemsReview';
|
|
5
|
+
|
|
6
|
+
import Item from './item';
|
|
7
|
+
import ShowAllButton from './showAllButton';
|
|
8
|
+
import LoadingIndicator from '@magento/venia-ui/lib/components/LoadingIndicator';
|
|
9
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
10
|
+
|
|
11
|
+
import defaultClasses from './itemsReview.module.css';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Renders a list of items in an order.
|
|
15
|
+
* @param {Object} props.data an optional static data object to render instead of making a query for data.
|
|
16
|
+
*/
|
|
17
|
+
const ItemsReview = props => {
|
|
18
|
+
const { classes: propClasses } = props;
|
|
19
|
+
|
|
20
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
21
|
+
|
|
22
|
+
const talonProps = useItemsReview({
|
|
23
|
+
data: props.data
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const {
|
|
27
|
+
items: itemsInCart,
|
|
28
|
+
totalQuantity,
|
|
29
|
+
showAllItems,
|
|
30
|
+
setShowAllItems,
|
|
31
|
+
isLoading,
|
|
32
|
+
configurableThumbnailSource
|
|
33
|
+
} = talonProps;
|
|
34
|
+
|
|
35
|
+
const items = itemsInCart.map((item, index) => (
|
|
36
|
+
<Item
|
|
37
|
+
key={item.uid}
|
|
38
|
+
{...item}
|
|
39
|
+
isHidden={!showAllItems && index >= 2}
|
|
40
|
+
configurableThumbnailSource={configurableThumbnailSource}
|
|
41
|
+
/>
|
|
42
|
+
));
|
|
43
|
+
|
|
44
|
+
const showAllItemsFooter = !showAllItems ? (
|
|
45
|
+
<ShowAllButton onClick={setShowAllItems} />
|
|
46
|
+
) : null;
|
|
47
|
+
|
|
48
|
+
if (isLoading) {
|
|
49
|
+
return (
|
|
50
|
+
<LoadingIndicator>
|
|
51
|
+
<FormattedMessage
|
|
52
|
+
id={'checkoutPage.fetchingItemsInYourOrder'}
|
|
53
|
+
defaultMessage={'Fetching Items in your Order'}
|
|
54
|
+
/>
|
|
55
|
+
</LoadingIndicator>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div
|
|
61
|
+
className={classes.items_review_container}
|
|
62
|
+
data-cy="ItemsReview-container"
|
|
63
|
+
>
|
|
64
|
+
<div className={classes.items_container}>
|
|
65
|
+
<div
|
|
66
|
+
data-cy="ItemsReview-totalQuantity"
|
|
67
|
+
className={classes.total_quantity}
|
|
68
|
+
>
|
|
69
|
+
<span className={classes.total_quantity_amount}>
|
|
70
|
+
{totalQuantity}
|
|
71
|
+
</span>
|
|
72
|
+
<FormattedMessage
|
|
73
|
+
id={'checkoutPage.itemsInYourOrder'}
|
|
74
|
+
defaultMessage={' items in your order'}
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
{items}
|
|
78
|
+
</div>
|
|
79
|
+
{showAllItemsFooter}
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export default ItemsReview;
|
package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/itemsReview.module.css
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.items_review_container {
|
|
2
|
+
composes: border-2 from global;
|
|
3
|
+
composes: border-solid from global;
|
|
4
|
+
composes: border-subtle from global;
|
|
5
|
+
composes: rounded-md from global;
|
|
6
|
+
min-height: 2rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.items_container {
|
|
10
|
+
composes: grid from global;
|
|
11
|
+
composes: px-md from global;
|
|
12
|
+
composes: py-sm from global;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.total_quantity {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.total_quantity_amount {
|
|
19
|
+
composes: font-semibold from global;
|
|
20
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { ChevronDown as ArrowDown } from 'react-feather';
|
|
4
|
+
|
|
5
|
+
import Icon from '@magento/venia-ui/lib/components/Icon';
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
+
|
|
8
|
+
import defaultClasses from './showAllButton.module.css';
|
|
9
|
+
|
|
10
|
+
const ShowAllButton = props => {
|
|
11
|
+
const { onClick } = props;
|
|
12
|
+
const classes = useStyle(defaultClasses, props.classes || {});
|
|
13
|
+
|
|
14
|
+
const handleClick = useCallback(() => {
|
|
15
|
+
onClick();
|
|
16
|
+
}, [onClick]);
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<button className={classes.root} onClick={handleClick}>
|
|
20
|
+
<span className={classes.content}>
|
|
21
|
+
<span className={classes.text}>
|
|
22
|
+
<FormattedMessage
|
|
23
|
+
id={'checkoutPage.showAllItems'}
|
|
24
|
+
defaultMessage={'SHOW ALL ITEMS'}
|
|
25
|
+
/>
|
|
26
|
+
</span>
|
|
27
|
+
<Icon
|
|
28
|
+
src={ArrowDown}
|
|
29
|
+
classes={{
|
|
30
|
+
root: classes.arrowDown
|
|
31
|
+
}}
|
|
32
|
+
/>
|
|
33
|
+
</span>
|
|
34
|
+
</button>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default ShowAllButton;
|
package/src/overwrites/venia-ui/lib/components/CheckoutPage/ItemsReview/showAllButton.module.css
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: border-t-2 from global;
|
|
3
|
+
composes: border-solid from global;
|
|
4
|
+
composes: border-subtle from global;
|
|
5
|
+
composes: px-0 from global;
|
|
6
|
+
composes: py-3 from global;
|
|
7
|
+
composes: w-full from global;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.content {
|
|
11
|
+
composes: gap-1.5 from global;
|
|
12
|
+
composes: grid from global;
|
|
13
|
+
composes: grid-flow-col from global;
|
|
14
|
+
composes: items-center from global;
|
|
15
|
+
composes: justify-center from global;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.text {
|
|
19
|
+
composes: font-semibold from global;
|
|
20
|
+
composes: text-brand-dark from global;
|
|
21
|
+
composes: text-sm from global;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.arrowDown {
|
|
25
|
+
composes: root from '@magento/venia-ui/lib/components/Icon/icon.module.css';
|
|
26
|
+
|
|
27
|
+
--stroke: rgb(var(--venia-brand-color-1-700));
|
|
28
|
+
}
|
package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
3
|
+
import { Form } from 'informed';
|
|
4
|
+
import { func, shape, string } from 'prop-types';
|
|
5
|
+
import { useToasts } from '@magento/peregrine';
|
|
6
|
+
import { useCreateAccount } from '@magento/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/useCreateAccount';
|
|
7
|
+
|
|
8
|
+
import combine from '@magento/venia-ui/lib/util/combineValidators';
|
|
9
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
10
|
+
import {
|
|
11
|
+
hasLengthAtLeast,
|
|
12
|
+
isRequired,
|
|
13
|
+
validatePassword
|
|
14
|
+
} from '@magento/venia-ui/lib/util/formValidators';
|
|
15
|
+
|
|
16
|
+
import Button from '@magento/venia-ui/lib/components/Button';
|
|
17
|
+
import Checkbox from '@magento/venia-ui/lib/components/Checkbox';
|
|
18
|
+
import Field from '@magento/venia-ui/lib/components/Field';
|
|
19
|
+
import FormError from '@magento/venia-ui/lib/components/FormError';
|
|
20
|
+
import TextInput from '@magento/venia-ui/lib/components/TextInput';
|
|
21
|
+
import Password from '@magento/venia-ui/lib/components/Password';
|
|
22
|
+
import GoogleReCaptcha from '@magento/venia-ui/lib/components/GoogleReCaptcha';
|
|
23
|
+
|
|
24
|
+
import defaultClasses from './createAccount.module.css';
|
|
25
|
+
|
|
26
|
+
const CreateAccount = props => {
|
|
27
|
+
const { formatMessage } = useIntl();
|
|
28
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
29
|
+
|
|
30
|
+
const [, { addToast }] = useToasts();
|
|
31
|
+
|
|
32
|
+
const onSubmit = useCallback(() => {
|
|
33
|
+
// TODO: Redirect to account/order page when implemented.
|
|
34
|
+
const { scrollTo } = globalThis;
|
|
35
|
+
|
|
36
|
+
if (typeof scrollTo === 'function') {
|
|
37
|
+
scrollTo({
|
|
38
|
+
left: 0,
|
|
39
|
+
top: 0,
|
|
40
|
+
behavior: 'smooth'
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
addToast({
|
|
45
|
+
type: 'info',
|
|
46
|
+
message: formatMessage({
|
|
47
|
+
id: 'checkoutPage.accountSuccessfullyCreated',
|
|
48
|
+
defaultMessage: 'Account successfully created.'
|
|
49
|
+
}),
|
|
50
|
+
timeout: 5000
|
|
51
|
+
});
|
|
52
|
+
}, [addToast, formatMessage]);
|
|
53
|
+
|
|
54
|
+
const talonProps = useCreateAccount({
|
|
55
|
+
initialValues: {
|
|
56
|
+
email: props.email,
|
|
57
|
+
firstName: props.firstname,
|
|
58
|
+
lastName: props.lastname
|
|
59
|
+
},
|
|
60
|
+
onSubmit
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const {
|
|
64
|
+
errors,
|
|
65
|
+
handleSubmit,
|
|
66
|
+
isDisabled,
|
|
67
|
+
initialValues,
|
|
68
|
+
recaptchaWidgetProps
|
|
69
|
+
} = talonProps;
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<div className={classes.root}>
|
|
73
|
+
<h2>
|
|
74
|
+
<FormattedMessage
|
|
75
|
+
id={'checkoutPage.quickCheckout'}
|
|
76
|
+
defaultMessage={'Quick Checkout When You Return'}
|
|
77
|
+
/>
|
|
78
|
+
</h2>
|
|
79
|
+
<p>
|
|
80
|
+
<FormattedMessage
|
|
81
|
+
id={'checkoutPage.setAPasswordAndSave'}
|
|
82
|
+
defaultMessage={
|
|
83
|
+
'Set a password and save your information for next time in one easy step!'
|
|
84
|
+
}
|
|
85
|
+
/>
|
|
86
|
+
</p>
|
|
87
|
+
<FormError errors={Array.from(errors.values())} />
|
|
88
|
+
<Form
|
|
89
|
+
className={classes.form}
|
|
90
|
+
initialValues={initialValues}
|
|
91
|
+
onSubmit={handleSubmit}
|
|
92
|
+
>
|
|
93
|
+
<Field
|
|
94
|
+
label={formatMessage({
|
|
95
|
+
id: 'global.firstName',
|
|
96
|
+
defaultMessage: 'First Name'
|
|
97
|
+
})}
|
|
98
|
+
>
|
|
99
|
+
<TextInput
|
|
100
|
+
field="customer.firstname"
|
|
101
|
+
autoComplete="given-name"
|
|
102
|
+
aria-label={formatMessage({
|
|
103
|
+
id: 'global.firstNameRequired',
|
|
104
|
+
defaultMessage: 'First Name Required'
|
|
105
|
+
})}
|
|
106
|
+
data-cy="OrderConfirmationPage-CreateAccount-firstName"
|
|
107
|
+
validate={isRequired}
|
|
108
|
+
validateOnBlur
|
|
109
|
+
/>
|
|
110
|
+
</Field>
|
|
111
|
+
<Field
|
|
112
|
+
label={formatMessage({
|
|
113
|
+
id: 'global.lastName',
|
|
114
|
+
defaultMessage: 'Last Name'
|
|
115
|
+
})}
|
|
116
|
+
>
|
|
117
|
+
<TextInput
|
|
118
|
+
field="customer.lastname"
|
|
119
|
+
autoComplete="family-name"
|
|
120
|
+
aria-label={formatMessage({
|
|
121
|
+
id: 'global.lastNameRequired',
|
|
122
|
+
defaultMessage: 'Last Name Required'
|
|
123
|
+
})}
|
|
124
|
+
data-cy="OrderConfirmationPage-CreateAccount-lastName"
|
|
125
|
+
validate={isRequired}
|
|
126
|
+
validateOnBlur
|
|
127
|
+
/>
|
|
128
|
+
</Field>
|
|
129
|
+
<Field
|
|
130
|
+
label={formatMessage({
|
|
131
|
+
id: 'global.email',
|
|
132
|
+
defaultMessage: 'Email'
|
|
133
|
+
})}
|
|
134
|
+
>
|
|
135
|
+
<TextInput
|
|
136
|
+
field="customer.email"
|
|
137
|
+
autoComplete="email"
|
|
138
|
+
aria-label={formatMessage({
|
|
139
|
+
id: 'global.emailRequired',
|
|
140
|
+
defaultMessage: 'Email Required'
|
|
141
|
+
})}
|
|
142
|
+
data-cy="OrderConfirmationPage-CreateAccount-email"
|
|
143
|
+
validate={isRequired}
|
|
144
|
+
validateOnBlur
|
|
145
|
+
/>
|
|
146
|
+
</Field>
|
|
147
|
+
<Password
|
|
148
|
+
label={formatMessage({
|
|
149
|
+
id: 'global.password',
|
|
150
|
+
defaultMessage: 'Password'
|
|
151
|
+
})}
|
|
152
|
+
fieldName="password"
|
|
153
|
+
isToggleButtonHidden={false}
|
|
154
|
+
autoComplete="new-password"
|
|
155
|
+
data-cy="OrderConfirmationPage-CreateAccount-password"
|
|
156
|
+
validate={combine([
|
|
157
|
+
isRequired,
|
|
158
|
+
[hasLengthAtLeast, 8],
|
|
159
|
+
validatePassword
|
|
160
|
+
])}
|
|
161
|
+
validateOnBlur
|
|
162
|
+
aria-label={formatMessage({
|
|
163
|
+
id: 'global.passwordRequired',
|
|
164
|
+
defaultMessage: 'Password Required'
|
|
165
|
+
})}
|
|
166
|
+
/>
|
|
167
|
+
<div className={classes.subscribe}>
|
|
168
|
+
<Checkbox
|
|
169
|
+
field="subscribe"
|
|
170
|
+
id="subscribe"
|
|
171
|
+
data-cy="OrderConfirmationPage-CreateAccount-subscribe"
|
|
172
|
+
label={formatMessage({
|
|
173
|
+
id: 'checkoutPage.subscribe',
|
|
174
|
+
defaultMessage: 'Subscribe to news and updates'
|
|
175
|
+
})}
|
|
176
|
+
/>
|
|
177
|
+
</div>
|
|
178
|
+
<GoogleReCaptcha {...recaptchaWidgetProps} />
|
|
179
|
+
<div className={classes.actions}>
|
|
180
|
+
<Button
|
|
181
|
+
disabled={isDisabled}
|
|
182
|
+
type="submit"
|
|
183
|
+
className={classes.create_account_button}
|
|
184
|
+
data-cy="OrderConfirmationPage-CreateAccount-createAccountButton"
|
|
185
|
+
>
|
|
186
|
+
<FormattedMessage
|
|
187
|
+
id={'checkoutPage.createAccount'}
|
|
188
|
+
defaultMessage={'Create Account'}
|
|
189
|
+
/>
|
|
190
|
+
</Button>
|
|
191
|
+
</div>
|
|
192
|
+
</Form>
|
|
193
|
+
</div>
|
|
194
|
+
);
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export default CreateAccount;
|
|
198
|
+
|
|
199
|
+
CreateAccount.propTypes = {
|
|
200
|
+
classes: shape({
|
|
201
|
+
actions: string,
|
|
202
|
+
create_account_button: string,
|
|
203
|
+
form: string,
|
|
204
|
+
root: string,
|
|
205
|
+
subscribe: string
|
|
206
|
+
}),
|
|
207
|
+
initialValues: shape({
|
|
208
|
+
email: string,
|
|
209
|
+
firstName: string,
|
|
210
|
+
lastName: string
|
|
211
|
+
}),
|
|
212
|
+
onSubmit: func
|
|
213
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: gap-xs from global;
|
|
3
|
+
composes: grid from global;
|
|
4
|
+
composes: grid-cols-1 from global;
|
|
5
|
+
composes: pt-xs from global;
|
|
6
|
+
|
|
7
|
+
composes: lg_pt-0 from global;
|
|
8
|
+
composes: lg_sticky from global;
|
|
9
|
+
composes: lg_top-22 from global;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.form {
|
|
13
|
+
composes: gap-2xs from global;
|
|
14
|
+
composes: grid from global;
|
|
15
|
+
composes: grid-cols-1 from global;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.actions {
|
|
19
|
+
composes: text-center from global;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.create_account_button {
|
|
23
|
+
composes: root_normalPriority from '@magento/venia-ui/lib/components/Button/button.module.css';
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './orderConfirmationPage';
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
3
|
+
import { object, shape, string } from 'prop-types';
|
|
4
|
+
import { useOrderConfirmationPage } from '@magento/peregrine/lib/talons/CheckoutPage/OrderConfirmationPage/useOrderConfirmationPage';
|
|
5
|
+
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
+
import { StoreTitle } from '@magento/venia-ui/lib/components/Head';
|
|
8
|
+
import CreateAccount from './createAccount';
|
|
9
|
+
import ItemsReview from '../ItemsReview';
|
|
10
|
+
import defaultClasses from './orderConfirmationPage.module.css';
|
|
11
|
+
|
|
12
|
+
const OrderConfirmationPage = props => {
|
|
13
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
14
|
+
const { data, orderNumber } = props;
|
|
15
|
+
const { formatMessage } = useIntl();
|
|
16
|
+
|
|
17
|
+
const talonProps = useOrderConfirmationPage({
|
|
18
|
+
data
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const { flatData, isSignedIn } = talonProps;
|
|
22
|
+
|
|
23
|
+
const {
|
|
24
|
+
city,
|
|
25
|
+
country,
|
|
26
|
+
email,
|
|
27
|
+
firstname,
|
|
28
|
+
lastname,
|
|
29
|
+
postcode,
|
|
30
|
+
region,
|
|
31
|
+
shippingMethod,
|
|
32
|
+
street
|
|
33
|
+
} = flatData;
|
|
34
|
+
|
|
35
|
+
const streetRows = street.map((row, index) => {
|
|
36
|
+
return (
|
|
37
|
+
<span key={index} className={classes.addressStreet}>
|
|
38
|
+
{row}
|
|
39
|
+
</span>
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
const { scrollTo } = globalThis;
|
|
45
|
+
|
|
46
|
+
if (typeof scrollTo === 'function') {
|
|
47
|
+
scrollTo({
|
|
48
|
+
left: 0,
|
|
49
|
+
top: 0,
|
|
50
|
+
behavior: 'smooth'
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}, []);
|
|
54
|
+
|
|
55
|
+
const createAccountForm = !isSignedIn ? (
|
|
56
|
+
<CreateAccount
|
|
57
|
+
firstname={firstname}
|
|
58
|
+
lastname={lastname}
|
|
59
|
+
email={email}
|
|
60
|
+
/>
|
|
61
|
+
) : null;
|
|
62
|
+
|
|
63
|
+
const nameString = `${firstname} ${lastname}`;
|
|
64
|
+
const additionalAddressString = `${city}, ${region} ${postcode} ${country}`;
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<div className={classes.root} data-cy="OrderConfirmationPage-root">
|
|
68
|
+
<StoreTitle>
|
|
69
|
+
{formatMessage({
|
|
70
|
+
id: 'checkoutPage.titleReceipt',
|
|
71
|
+
defaultMessage: 'Receipt'
|
|
72
|
+
})}
|
|
73
|
+
</StoreTitle>
|
|
74
|
+
<div className={classes.mainContainer}>
|
|
75
|
+
<h2
|
|
76
|
+
data-cy="OrderConfirmationPage-header"
|
|
77
|
+
className={classes.heading}
|
|
78
|
+
>
|
|
79
|
+
<FormattedMessage
|
|
80
|
+
id={'checkoutPage.thankYou'}
|
|
81
|
+
defaultMessage={'Thank you for your order!'}
|
|
82
|
+
/>
|
|
83
|
+
</h2>
|
|
84
|
+
<div
|
|
85
|
+
data-cy="OrderConfirmationPage-orderNumber"
|
|
86
|
+
className={classes.orderNumber}
|
|
87
|
+
>
|
|
88
|
+
<FormattedMessage
|
|
89
|
+
id={'checkoutPage.orderNumber'}
|
|
90
|
+
defaultMessage={'Order Number: {orderNumber}'}
|
|
91
|
+
values={{ orderNumber }}
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
<div
|
|
95
|
+
data-cy="OrderConfirmationPage-shippingInfoHeading"
|
|
96
|
+
className={classes.shippingInfoHeading}
|
|
97
|
+
>
|
|
98
|
+
<FormattedMessage
|
|
99
|
+
id={'global.shippingInformation'}
|
|
100
|
+
defaultMessage={'Shipping Information'}
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
<div className={classes.shippingInfo}>
|
|
104
|
+
<span className={classes.email}>{email}</span>
|
|
105
|
+
<span className={classes.name}>{nameString}</span>
|
|
106
|
+
{streetRows}
|
|
107
|
+
<span className={classes.addressAdditional}>
|
|
108
|
+
{additionalAddressString}
|
|
109
|
+
</span>
|
|
110
|
+
</div>
|
|
111
|
+
<div
|
|
112
|
+
data-cy="OrderConfirmationPage-shippingMethodHeading"
|
|
113
|
+
className={classes.shippingMethodHeading}
|
|
114
|
+
>
|
|
115
|
+
<FormattedMessage
|
|
116
|
+
id={'global.shippingMethod'}
|
|
117
|
+
defaultMessage={'Shipping Method'}
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
<div className={classes.shippingMethod}>{shippingMethod}</div>
|
|
121
|
+
<div className={classes.itemsReview}>
|
|
122
|
+
<ItemsReview data={data} />
|
|
123
|
+
</div>
|
|
124
|
+
<div
|
|
125
|
+
data-cy="OrderConfirmationPage-additionalText"
|
|
126
|
+
className={classes.additionalText}
|
|
127
|
+
>
|
|
128
|
+
<FormattedMessage
|
|
129
|
+
id={'checkoutPage.additionalText'}
|
|
130
|
+
defaultMessage={
|
|
131
|
+
'You will also receive an email with the details and we will let you know when your order has shipped.'
|
|
132
|
+
}
|
|
133
|
+
/>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
<div className={classes.sidebarContainer}>{createAccountForm}</div>
|
|
137
|
+
</div>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export default OrderConfirmationPage;
|
|
142
|
+
|
|
143
|
+
OrderConfirmationPage.propTypes = {
|
|
144
|
+
classes: shape({
|
|
145
|
+
addressStreet: string,
|
|
146
|
+
mainContainer: string,
|
|
147
|
+
heading: string,
|
|
148
|
+
orderNumber: string,
|
|
149
|
+
shippingInfoHeading: string,
|
|
150
|
+
shippingInfo: string,
|
|
151
|
+
email: string,
|
|
152
|
+
name: string,
|
|
153
|
+
addressAdditional: string,
|
|
154
|
+
shippingMethodHeading: string,
|
|
155
|
+
shippingMethod: string,
|
|
156
|
+
itemsReview: string,
|
|
157
|
+
additionalText: string,
|
|
158
|
+
sidebarContainer: string
|
|
159
|
+
}),
|
|
160
|
+
data: object.isRequired,
|
|
161
|
+
orderNumber: string
|
|
162
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* prettier-ignore */
|
|
2
|
+
.root {
|
|
3
|
+
composes: gap-xs from global;
|
|
4
|
+
composes: grid from global;
|
|
5
|
+
composes: grid-cols-1 from global;
|
|
6
|
+
composes: max-w-screen-lg from global;
|
|
7
|
+
composes: mx-auto from global;
|
|
8
|
+
composes: my-0 from global;
|
|
9
|
+
composes: px-sm from global;
|
|
10
|
+
composes: py-sm from global;
|
|
11
|
+
|
|
12
|
+
composes: lg_gap-md from global;
|
|
13
|
+
/* TODO @TW: review (B7) */
|
|
14
|
+
composes: lg_grid-cols-[2fr,1fr] from global;
|
|
15
|
+
composes: lg_px-lg from global;
|
|
16
|
+
composes: lg_py-md from global;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mainContainer {
|
|
20
|
+
composes: col-start-1 from global;
|
|
21
|
+
composes: grid from global;
|
|
22
|
+
composes: gap-y-xs from global;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sidebarContainer {
|
|
26
|
+
composes: border-t from global;
|
|
27
|
+
composes: border-solid from global;
|
|
28
|
+
composes: border-subtle from global;
|
|
29
|
+
composes: col-start-1 from global;
|
|
30
|
+
|
|
31
|
+
composes: lg_border-0 from global;
|
|
32
|
+
composes: lg_col-start-2 from global;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.header {
|
|
36
|
+
composes: font-semibold from global;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.text {
|
|
40
|
+
composes: leading-normal from global;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.orderNumber {
|
|
44
|
+
composes: header;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.shippingInfoHeading {
|
|
48
|
+
composes: header;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.shippingInfo {
|
|
52
|
+
composes: text;
|
|
53
|
+
composes: grid from global;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.shippingAddress {
|
|
57
|
+
composes: grid from global;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.shippingMethodHeading {
|
|
61
|
+
composes: header;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.shippingMethod {
|
|
65
|
+
composes: text;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.additionalText {
|
|
69
|
+
composes: text;
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './orderSummary';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import PriceSummary from '@magento/venia-ui/lib/components/CartPage/PriceSummary';
|
|
4
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
5
|
+
|
|
6
|
+
import defaultClasses from './orderSummary.module.css';
|
|
7
|
+
|
|
8
|
+
const OrderSummary = props => {
|
|
9
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
10
|
+
console.log("🚀 ~ OrderSummary ~ props:", props)
|
|
11
|
+
return (
|
|
12
|
+
<div data-cy="OrderSummary-root" className={classes.root}>
|
|
13
|
+
<h2 aria-live="polite" className="text-[16px] font-semibold mb-4">
|
|
14
|
+
<FormattedMessage
|
|
15
|
+
id={'checkoutPage.orderSummary'}
|
|
16
|
+
defaultMessage={'Summary'}
|
|
17
|
+
/>
|
|
18
|
+
</h2>
|
|
19
|
+
<PriceSummary isUpdating={props.isUpdating} />
|
|
20
|
+
<style jsx>
|
|
21
|
+
{`
|
|
22
|
+
li[class*="priceSummary-lineItems"] span:first-child {
|
|
23
|
+
margin-top: 0;
|
|
24
|
+
margin-bottom: 12px;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
}
|
|
28
|
+
`}
|
|
29
|
+
</style>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default OrderSummary;
|