@riosst100/pwa-marketplace 1.8.9 → 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 +1 -2
- 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/SellerCountry/sellerCountry.js +1 -1
- package/src/components/SellerDetail/sellerDetail.js +34 -3
- package/src/components/ShopBy/shopBy.js +92 -4
- package/src/components/ShopBy/shopBy.module.css +22 -0
- package/src/components/ShopByVehicles/shopByVehicles.js +1 -2
- package/src/components/ShopByVehicles/shopByVehicles.module.css +76 -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/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/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 +29 -14
- 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/ShopBy/shopBy.gql.js +2 -2
- package/src/talons/ShopBy/useShopBy.js +10 -9
- package/src/talons/ShopByVehicles/shopByVehicles.gql.js +1 -0
- package/src/talons/TrainsSets/trainsSets.gql.js +60 -0
- package/src/talons/TrainsSets/useTrainsSets.js +223 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { arrayOf, number, shape, string } from 'prop-types';
|
|
3
|
+
import { FormattedMessage } from 'react-intl';
|
|
4
|
+
|
|
5
|
+
import { Printer } from 'react-feather';
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
+
|
|
8
|
+
import BillingInformation from './billingInformation';
|
|
9
|
+
import Items from './items';
|
|
10
|
+
import PaymentMethod from './paymentMethod';
|
|
11
|
+
import ShippingInformation from './shippingInformation';
|
|
12
|
+
import ShippingMethod from './shippingMethod';
|
|
13
|
+
import OrderTotal from './orderTotal';
|
|
14
|
+
import Icon from '@magento/venia-ui/lib/components/Icon';
|
|
15
|
+
import Button from '@magento/venia-ui/lib/components/Button';
|
|
16
|
+
|
|
17
|
+
import defaultClasses from './orderDetails.module.css';
|
|
18
|
+
|
|
19
|
+
const ConditionalWrapper = props => (props.condition ? props.children : null);
|
|
20
|
+
|
|
21
|
+
const OrderDetails = props => {
|
|
22
|
+
const { classes: propClasses, imagesData, orderData } = props;
|
|
23
|
+
const {
|
|
24
|
+
billing_address,
|
|
25
|
+
items,
|
|
26
|
+
payment_methods,
|
|
27
|
+
shipping_address,
|
|
28
|
+
shipping_method,
|
|
29
|
+
shipments,
|
|
30
|
+
total
|
|
31
|
+
} = orderData;
|
|
32
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
33
|
+
|
|
34
|
+
const shippingMethodData = {
|
|
35
|
+
shippingMethod: shipping_method,
|
|
36
|
+
shipments
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const hasTotals = total.grand_total && total.grand_total.currency;
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div className={classes.root}>
|
|
43
|
+
<div className={classes.shippingInformationContainer}>
|
|
44
|
+
<ConditionalWrapper condition={shipping_address}>
|
|
45
|
+
<ShippingInformation data={shipping_address} />
|
|
46
|
+
</ConditionalWrapper>
|
|
47
|
+
</div>
|
|
48
|
+
<div className={classes.shippingMethodContainer}>
|
|
49
|
+
<ConditionalWrapper condition={shipping_method}>
|
|
50
|
+
<ShippingMethod data={shippingMethodData} />
|
|
51
|
+
</ConditionalWrapper>
|
|
52
|
+
</div>
|
|
53
|
+
<div className={classes.billingInformationContainer}>
|
|
54
|
+
<ConditionalWrapper condition={billing_address}>
|
|
55
|
+
<BillingInformation data={billing_address} />
|
|
56
|
+
</ConditionalWrapper>
|
|
57
|
+
</div>
|
|
58
|
+
<div className={classes.paymentMethodContainer}>
|
|
59
|
+
<ConditionalWrapper
|
|
60
|
+
condition={payment_methods && payment_methods.length}
|
|
61
|
+
>
|
|
62
|
+
<PaymentMethod data={payment_methods} />
|
|
63
|
+
</ConditionalWrapper>
|
|
64
|
+
</div>
|
|
65
|
+
<div className={classes.itemsContainer}>
|
|
66
|
+
<ConditionalWrapper condition={items && items.length}>
|
|
67
|
+
<Items data={{ imagesData, items }} />
|
|
68
|
+
</ConditionalWrapper>
|
|
69
|
+
</div>
|
|
70
|
+
<div className={classes.orderTotalContainer}>
|
|
71
|
+
<ConditionalWrapper condition={hasTotals}>
|
|
72
|
+
<OrderTotal data={total} />
|
|
73
|
+
</ConditionalWrapper>
|
|
74
|
+
</div>
|
|
75
|
+
<Button
|
|
76
|
+
className={classes.printButton}
|
|
77
|
+
onClick={() => {
|
|
78
|
+
// TODO will be implemented in PWA-978
|
|
79
|
+
console.log('Printing Receipt');
|
|
80
|
+
}}
|
|
81
|
+
>
|
|
82
|
+
<Icon src={Printer} />
|
|
83
|
+
<span className={classes.printLabel}>
|
|
84
|
+
<FormattedMessage
|
|
85
|
+
id="orderDetails.printLabel"
|
|
86
|
+
defaultMessage="Print Receipt"
|
|
87
|
+
/>
|
|
88
|
+
</span>
|
|
89
|
+
</Button>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export default OrderDetails;
|
|
95
|
+
|
|
96
|
+
OrderDetails.propTypes = {
|
|
97
|
+
classes: shape({
|
|
98
|
+
root: string,
|
|
99
|
+
shippingInformationContainer: string,
|
|
100
|
+
shippingMethodContainer: string,
|
|
101
|
+
billingInformationContainer: string,
|
|
102
|
+
paymentMethodContainer: string,
|
|
103
|
+
itemsContainer: string,
|
|
104
|
+
orderTotalContainer: string,
|
|
105
|
+
printButton: string,
|
|
106
|
+
printLabel: string
|
|
107
|
+
}),
|
|
108
|
+
imagesData: arrayOf(
|
|
109
|
+
shape({
|
|
110
|
+
id: number,
|
|
111
|
+
sku: string,
|
|
112
|
+
thumbnail: shape({
|
|
113
|
+
url: string
|
|
114
|
+
}),
|
|
115
|
+
url_key: string,
|
|
116
|
+
url_suffix: string
|
|
117
|
+
})
|
|
118
|
+
),
|
|
119
|
+
orderData: shape({
|
|
120
|
+
billing_address: shape({
|
|
121
|
+
city: string,
|
|
122
|
+
country_code: string,
|
|
123
|
+
firstname: string,
|
|
124
|
+
lastname: string,
|
|
125
|
+
postcode: string,
|
|
126
|
+
region_id: string,
|
|
127
|
+
street: arrayOf(string)
|
|
128
|
+
}),
|
|
129
|
+
items: arrayOf(
|
|
130
|
+
shape({
|
|
131
|
+
id: string,
|
|
132
|
+
product_name: string,
|
|
133
|
+
product_sale_price: shape({
|
|
134
|
+
currency: string,
|
|
135
|
+
value: number
|
|
136
|
+
}),
|
|
137
|
+
product_sku: string,
|
|
138
|
+
selected_options: arrayOf(
|
|
139
|
+
shape({
|
|
140
|
+
label: string,
|
|
141
|
+
value: string
|
|
142
|
+
})
|
|
143
|
+
),
|
|
144
|
+
quantity_ordered: number
|
|
145
|
+
})
|
|
146
|
+
),
|
|
147
|
+
payment_methods: arrayOf(
|
|
148
|
+
shape({
|
|
149
|
+
type: string,
|
|
150
|
+
additional_data: arrayOf(
|
|
151
|
+
shape({
|
|
152
|
+
name: string,
|
|
153
|
+
value: string
|
|
154
|
+
})
|
|
155
|
+
)
|
|
156
|
+
})
|
|
157
|
+
),
|
|
158
|
+
shipping_address: shape({
|
|
159
|
+
city: string,
|
|
160
|
+
country_code: string,
|
|
161
|
+
firstname: string,
|
|
162
|
+
lastname: string,
|
|
163
|
+
postcode: string,
|
|
164
|
+
region_id: string,
|
|
165
|
+
street: arrayOf(string),
|
|
166
|
+
telephone: string
|
|
167
|
+
}),
|
|
168
|
+
shipping_method: string,
|
|
169
|
+
shipments: arrayOf(
|
|
170
|
+
shape({
|
|
171
|
+
id: string,
|
|
172
|
+
tracking: arrayOf(
|
|
173
|
+
shape({
|
|
174
|
+
carrier: string,
|
|
175
|
+
number: string
|
|
176
|
+
})
|
|
177
|
+
)
|
|
178
|
+
})
|
|
179
|
+
),
|
|
180
|
+
total: shape({
|
|
181
|
+
discounts: arrayOf(
|
|
182
|
+
shape({
|
|
183
|
+
amount: shape({
|
|
184
|
+
currency: string,
|
|
185
|
+
value: number
|
|
186
|
+
})
|
|
187
|
+
})
|
|
188
|
+
),
|
|
189
|
+
grand_total: shape({
|
|
190
|
+
currency: string,
|
|
191
|
+
value: number
|
|
192
|
+
}),
|
|
193
|
+
subtotal: shape({
|
|
194
|
+
currency: string,
|
|
195
|
+
value: number
|
|
196
|
+
}),
|
|
197
|
+
total_tax: shape({
|
|
198
|
+
currency: string,
|
|
199
|
+
value: number
|
|
200
|
+
}),
|
|
201
|
+
total_shipping: shape({
|
|
202
|
+
currency: string,
|
|
203
|
+
value: number
|
|
204
|
+
})
|
|
205
|
+
})
|
|
206
|
+
})
|
|
207
|
+
};
|
package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/orderDetails.module.css
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: gap-sm from global;
|
|
3
|
+
composes: grid from global;
|
|
4
|
+
|
|
5
|
+
composes: lg_gap-md from global;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.shippingInformationContainer {
|
|
9
|
+
grid-row: 1 / span 1;
|
|
10
|
+
grid-column: 1 / span 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.shippingMethodContainer {
|
|
14
|
+
grid-row: 1 / span 1;
|
|
15
|
+
grid-column: 2 / span 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.billingInformationContainer {
|
|
19
|
+
grid-row: 1 / span 1;
|
|
20
|
+
grid-column: 3 / span 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.paymentMethodContainer {
|
|
24
|
+
grid-row: 1 / span 1;
|
|
25
|
+
grid-column: 4 / span 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.itemsContainer {
|
|
29
|
+
grid-row: 2 / span 4;
|
|
30
|
+
grid-column: 1 / span 2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.orderTotalContainer {
|
|
34
|
+
grid-row: 2 / span 2;
|
|
35
|
+
grid-column: 3 / span 2;
|
|
36
|
+
composes: m-0 from global;
|
|
37
|
+
composes: max-w-none from global;
|
|
38
|
+
composes: min-w-none from global;
|
|
39
|
+
|
|
40
|
+
composes: lg_m-auto from global;
|
|
41
|
+
composes: lg_max-w-[25rem] from global;
|
|
42
|
+
composes: lg_min-w-[22rem] from global;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.printButton {
|
|
46
|
+
grid-row: 4 / span 1;
|
|
47
|
+
grid-column: 3 / span 2;
|
|
48
|
+
|
|
49
|
+
composes: items-center from global;
|
|
50
|
+
composes: gap-x-2xs from global;
|
|
51
|
+
composes: grid from global;
|
|
52
|
+
composes: grid-cols-autoFirst from global;
|
|
53
|
+
composes: grid-flow-col from global;
|
|
54
|
+
composes: invisible from global; /* Hide until PWA-978 is completed */
|
|
55
|
+
composes: m-auto from global;
|
|
56
|
+
composes: w-fit from global;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.printLabel {
|
|
60
|
+
composes: underline from global;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* Mobile-specific styles.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
@media (max-width: 959px) {
|
|
68
|
+
.shippingInformationContainer {
|
|
69
|
+
grid-row: 1 / span 1;
|
|
70
|
+
grid-column: 1 / span 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.shippingMethodContainer {
|
|
74
|
+
grid-row: 2 / span 1;
|
|
75
|
+
grid-column: 1 / span 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.billingInformationContainer {
|
|
79
|
+
grid-row: 3 / span 1;
|
|
80
|
+
grid-column: 1 / span 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.paymentMethodContainer {
|
|
84
|
+
grid-row: 4 / span 1;
|
|
85
|
+
grid-column: 1 / span 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.itemsContainer {
|
|
89
|
+
grid-row: 5 / span 1;
|
|
90
|
+
grid-column: 1 / span 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.orderTotalContainer {
|
|
94
|
+
grid-row: 6 / span 1;
|
|
95
|
+
grid-column: 1 / span 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.printButton {
|
|
99
|
+
grid-row: 7 / span 1;
|
|
100
|
+
grid-column: 1 / span 1;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { arrayOf, string, shape, number } from 'prop-types';
|
|
3
|
+
import { FormattedMessage } from 'react-intl';
|
|
4
|
+
|
|
5
|
+
import Price from '@magento/venia-ui/lib/components/Price';
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
+
|
|
8
|
+
import defaultClasses from './orderTotal.module.css';
|
|
9
|
+
|
|
10
|
+
const OrderTotal = props => {
|
|
11
|
+
const { classes: propClasses, data } = props;
|
|
12
|
+
const {
|
|
13
|
+
discounts,
|
|
14
|
+
grand_total,
|
|
15
|
+
subtotal,
|
|
16
|
+
total_tax,
|
|
17
|
+
total_shipping
|
|
18
|
+
} = data;
|
|
19
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
20
|
+
|
|
21
|
+
const discountRowElement = useMemo(() => {
|
|
22
|
+
if (!discounts || !discounts.length) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const discountTotal = {
|
|
27
|
+
currency: discounts[0].amount.currency,
|
|
28
|
+
value: discounts.reduce(
|
|
29
|
+
(acc, discount) => acc + discount.amount.value,
|
|
30
|
+
0
|
|
31
|
+
)
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div className={classes.discount}>
|
|
36
|
+
<span>
|
|
37
|
+
<FormattedMessage
|
|
38
|
+
id="orderDetails.discount"
|
|
39
|
+
defaultMessage="Discount"
|
|
40
|
+
/>
|
|
41
|
+
</span>
|
|
42
|
+
<span>
|
|
43
|
+
<Price
|
|
44
|
+
value={discountTotal.value}
|
|
45
|
+
currencyCode={discountTotal.currency}
|
|
46
|
+
/>
|
|
47
|
+
</span>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}, [classes.discount, discounts]);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div className={classes.root}>
|
|
54
|
+
<div className={classes.heading}>
|
|
55
|
+
<FormattedMessage
|
|
56
|
+
id="orderDetails.orderTotal"
|
|
57
|
+
defaultMessage="Order Total"
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
<div className={classes.subTotal}>
|
|
61
|
+
<span>
|
|
62
|
+
<FormattedMessage
|
|
63
|
+
id="orderDetails.subtotal"
|
|
64
|
+
defaultMessage="Subtotal"
|
|
65
|
+
/>
|
|
66
|
+
</span>
|
|
67
|
+
<span>
|
|
68
|
+
<Price
|
|
69
|
+
value={subtotal.value}
|
|
70
|
+
currencyCode={subtotal.currency}
|
|
71
|
+
/>
|
|
72
|
+
</span>
|
|
73
|
+
</div>
|
|
74
|
+
{discountRowElement}
|
|
75
|
+
<div className={classes.tax}>
|
|
76
|
+
<span>
|
|
77
|
+
<FormattedMessage
|
|
78
|
+
id="orderDetails.tax"
|
|
79
|
+
defaultMessage="Tax"
|
|
80
|
+
/>
|
|
81
|
+
</span>
|
|
82
|
+
<span>
|
|
83
|
+
<Price
|
|
84
|
+
value={total_tax.value}
|
|
85
|
+
currencyCode={total_tax.currency}
|
|
86
|
+
/>
|
|
87
|
+
</span>
|
|
88
|
+
</div>
|
|
89
|
+
<div className={classes.shipping}>
|
|
90
|
+
<span>
|
|
91
|
+
<FormattedMessage
|
|
92
|
+
id="orderDetails.shipping"
|
|
93
|
+
defaultMessage="Shipping"
|
|
94
|
+
/>
|
|
95
|
+
</span>
|
|
96
|
+
<span>
|
|
97
|
+
<Price
|
|
98
|
+
value={total_shipping.value}
|
|
99
|
+
currencyCode={total_shipping.currency}
|
|
100
|
+
/>
|
|
101
|
+
</span>
|
|
102
|
+
</div>
|
|
103
|
+
<div className={classes.total}>
|
|
104
|
+
<span>
|
|
105
|
+
<FormattedMessage
|
|
106
|
+
id="orderDetails.total"
|
|
107
|
+
defaultMessage="Total"
|
|
108
|
+
/>
|
|
109
|
+
</span>
|
|
110
|
+
<span>
|
|
111
|
+
<Price
|
|
112
|
+
value={grand_total.value}
|
|
113
|
+
currencyCode={grand_total.currency}
|
|
114
|
+
/>
|
|
115
|
+
</span>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export default OrderTotal;
|
|
122
|
+
|
|
123
|
+
OrderTotal.propTypes = {
|
|
124
|
+
classes: shape({
|
|
125
|
+
root: string,
|
|
126
|
+
heading: string,
|
|
127
|
+
subTotal: string,
|
|
128
|
+
discount: string,
|
|
129
|
+
tax: string,
|
|
130
|
+
shipping: string,
|
|
131
|
+
total: string
|
|
132
|
+
}),
|
|
133
|
+
data: shape({
|
|
134
|
+
discounts: arrayOf(
|
|
135
|
+
shape({
|
|
136
|
+
amount: shape({
|
|
137
|
+
currency: string,
|
|
138
|
+
value: number
|
|
139
|
+
})
|
|
140
|
+
})
|
|
141
|
+
),
|
|
142
|
+
grand_total: shape({
|
|
143
|
+
currency: string,
|
|
144
|
+
value: number
|
|
145
|
+
}),
|
|
146
|
+
subtotal: shape({
|
|
147
|
+
currency: string,
|
|
148
|
+
value: number
|
|
149
|
+
}),
|
|
150
|
+
total_tax: shape({
|
|
151
|
+
currency: string,
|
|
152
|
+
value: number
|
|
153
|
+
}),
|
|
154
|
+
total_shipping: shape({
|
|
155
|
+
currency: string,
|
|
156
|
+
value: number
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
};
|
package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/orderTotal.module.css
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: border-0 from global;
|
|
3
|
+
composes: gap-xs from global;
|
|
4
|
+
composes: grid from global;
|
|
5
|
+
composes: px-0 from global;
|
|
6
|
+
composes: py-xs from global;
|
|
7
|
+
composes: rounded-none from global;
|
|
8
|
+
|
|
9
|
+
composes: lg_border from global;
|
|
10
|
+
composes: lg_border-solid from global;
|
|
11
|
+
composes: lg_border-gray-100 from global;
|
|
12
|
+
composes: lg_p-xs from global;
|
|
13
|
+
composes: lg_rounded-md from global;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.heading {
|
|
17
|
+
composes: font-bold from global;
|
|
18
|
+
composes: pb-2xs from global;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.subTotal {
|
|
22
|
+
composes: gap-xs from global;
|
|
23
|
+
composes: grid from global;
|
|
24
|
+
composes: grid-cols-autoLast from global;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.discount {
|
|
28
|
+
composes: gap-xs from global;
|
|
29
|
+
composes: grid from global;
|
|
30
|
+
composes: grid-cols-autoLast from global;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.tax {
|
|
34
|
+
composes: gap-xs from global;
|
|
35
|
+
composes: grid from global;
|
|
36
|
+
composes: grid-cols-autoLast from global;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.shipping {
|
|
40
|
+
composes: gap-xs from global;
|
|
41
|
+
composes: grid from global;
|
|
42
|
+
composes: grid-cols-autoLast from global;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.total {
|
|
46
|
+
composes: font-bold from global;
|
|
47
|
+
composes: gap-xs from global;
|
|
48
|
+
composes: grid from global;
|
|
49
|
+
composes: grid-cols-autoLast from global;
|
|
50
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { arrayOf, shape, string } from 'prop-types';
|
|
3
|
+
import { FormattedMessage } from 'react-intl';
|
|
4
|
+
|
|
5
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
6
|
+
|
|
7
|
+
import defaultClasses from './paymentMethod.module.css';
|
|
8
|
+
|
|
9
|
+
const PaymentMethod = props => {
|
|
10
|
+
const { data, classes: propsClasses } = props;
|
|
11
|
+
const classes = useStyle(defaultClasses, propsClasses);
|
|
12
|
+
/**
|
|
13
|
+
* There can be multiple payment methods for an order but
|
|
14
|
+
* since Venia does not support multiple payment methods yet
|
|
15
|
+
* we are picking the first method in the array.
|
|
16
|
+
*/
|
|
17
|
+
const [{ name }] = data;
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className={classes.root} data-cy="OrderDetails-PaymentMethod-root">
|
|
21
|
+
<div className={classes.heading}>
|
|
22
|
+
<FormattedMessage
|
|
23
|
+
id="orderDetails.paymentMethodLabel"
|
|
24
|
+
defaultMessage="Payment Method"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
<div className={classes.payment_type}>{name}</div>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default PaymentMethod;
|
|
33
|
+
|
|
34
|
+
PaymentMethod.propTypes = {
|
|
35
|
+
classes: shape({
|
|
36
|
+
root: string,
|
|
37
|
+
heading: string,
|
|
38
|
+
payment_type: string
|
|
39
|
+
}),
|
|
40
|
+
data: arrayOf(
|
|
41
|
+
shape({
|
|
42
|
+
name: string
|
|
43
|
+
})
|
|
44
|
+
)
|
|
45
|
+
};
|
package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/shippingInformation.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import { arrayOf, shape, string } from 'prop-types';
|
|
3
|
+
import { FormattedMessage } from 'react-intl';
|
|
4
|
+
|
|
5
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
6
|
+
|
|
7
|
+
import defaultClasses from './shippingInformation.module.css';
|
|
8
|
+
|
|
9
|
+
const ShippingInformation = props => {
|
|
10
|
+
const { data, classes: propsClasses } = props;
|
|
11
|
+
const classes = useStyle(defaultClasses, propsClasses);
|
|
12
|
+
|
|
13
|
+
let shippingContentElement;
|
|
14
|
+
|
|
15
|
+
if (data) {
|
|
16
|
+
const {
|
|
17
|
+
city,
|
|
18
|
+
country_code,
|
|
19
|
+
firstname,
|
|
20
|
+
lastname,
|
|
21
|
+
postcode,
|
|
22
|
+
region,
|
|
23
|
+
street
|
|
24
|
+
} = data;
|
|
25
|
+
|
|
26
|
+
const additionalAddressString = `${city}, ${region} ${postcode} ${country_code}`;
|
|
27
|
+
const fullName = `${firstname} ${lastname}`;
|
|
28
|
+
const streetRows = street.map((row, index) => {
|
|
29
|
+
return (
|
|
30
|
+
<span className={classes.streetRow} key={index}>
|
|
31
|
+
{row}
|
|
32
|
+
</span>
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
shippingContentElement = (
|
|
37
|
+
<Fragment>
|
|
38
|
+
<span className={classes.name}>{fullName}</span>
|
|
39
|
+
{streetRows}
|
|
40
|
+
<div className={classes.additionalAddress}>
|
|
41
|
+
{additionalAddressString}
|
|
42
|
+
</div>
|
|
43
|
+
</Fragment>
|
|
44
|
+
);
|
|
45
|
+
} else {
|
|
46
|
+
shippingContentElement = (
|
|
47
|
+
<FormattedMessage
|
|
48
|
+
id="orderDetails.noShippingInformation"
|
|
49
|
+
defaultMessage="No shipping information"
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<div
|
|
56
|
+
className={classes.root}
|
|
57
|
+
data-cy="OrderDetails-ShippingInformation-root"
|
|
58
|
+
>
|
|
59
|
+
<div className={classes.heading}>
|
|
60
|
+
<FormattedMessage
|
|
61
|
+
id="orderDetails.shippingInformationLabel"
|
|
62
|
+
defaultMessage="Shipping Information"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
{shippingContentElement}
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default ShippingInformation;
|
|
71
|
+
|
|
72
|
+
ShippingInformation.propTypes = {
|
|
73
|
+
classes: shape({
|
|
74
|
+
root: string,
|
|
75
|
+
heading: string,
|
|
76
|
+
name: string,
|
|
77
|
+
streetRow: string,
|
|
78
|
+
additionalAddress: string
|
|
79
|
+
}),
|
|
80
|
+
data: shape({
|
|
81
|
+
city: string,
|
|
82
|
+
country_code: string,
|
|
83
|
+
firstname: string,
|
|
84
|
+
lastname: string,
|
|
85
|
+
postcode: string,
|
|
86
|
+
region: string,
|
|
87
|
+
street: arrayOf(string),
|
|
88
|
+
telephone: string
|
|
89
|
+
})
|
|
90
|
+
};
|