@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,143 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
3
|
+
import { shape, string } from 'prop-types';
|
|
4
|
+
import { Form } from 'informed';
|
|
5
|
+
|
|
6
|
+
import { useToasts } from '@magento/peregrine';
|
|
7
|
+
import { useResetPassword } from '@magento/peregrine/lib/talons/MyAccount/useResetPassword';
|
|
8
|
+
|
|
9
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
10
|
+
import { isRequired } from '@magento/venia-ui/lib/util/formValidators';
|
|
11
|
+
import Button from '@magento/venia-ui/lib/components/Button';
|
|
12
|
+
import Field from '@magento/venia-ui/lib/components/Field';
|
|
13
|
+
import FormErrors from '@magento/venia-ui/lib/components/FormError';
|
|
14
|
+
import GoogleReCaptcha from '@magento/venia-ui/lib/components/GoogleReCaptcha';
|
|
15
|
+
import { StoreTitle } from '@magento/venia-ui/lib/components/Head';
|
|
16
|
+
import Password from '@magento/venia-ui/lib/components/Password';
|
|
17
|
+
import TextInput from '@magento/venia-ui/lib/components/TextInput';
|
|
18
|
+
import defaultClasses from './resetPassword.module.css';
|
|
19
|
+
import resetPasswordOperations from './resetPassword.gql';
|
|
20
|
+
|
|
21
|
+
const ResetPassword = props => {
|
|
22
|
+
const { classes: propClasses } = props;
|
|
23
|
+
const { formatMessage } = useIntl();
|
|
24
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
25
|
+
const talonProps = useResetPassword({ ...resetPasswordOperations });
|
|
26
|
+
const {
|
|
27
|
+
hasCompleted,
|
|
28
|
+
loading,
|
|
29
|
+
token,
|
|
30
|
+
formErrors,
|
|
31
|
+
handleSubmit,
|
|
32
|
+
recaptchaWidgetProps
|
|
33
|
+
} = talonProps;
|
|
34
|
+
|
|
35
|
+
const tokenMissing = (
|
|
36
|
+
<div className={classes.invalidToken}>
|
|
37
|
+
<FormattedMessage
|
|
38
|
+
id={'resetPassword.invalidTokenMessage'}
|
|
39
|
+
defaultMessage={
|
|
40
|
+
'Uh oh, something went wrong. Check the link or try again.'
|
|
41
|
+
}
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const [, { addToast }] = useToasts();
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (hasCompleted) {
|
|
50
|
+
addToast({
|
|
51
|
+
type: 'info',
|
|
52
|
+
message: formatMessage({
|
|
53
|
+
id: 'resetPassword.savedPasswordText',
|
|
54
|
+
defaultMessage: 'Your new password has been saved.'
|
|
55
|
+
}),
|
|
56
|
+
timeout: 5000
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}, [addToast, formatMessage, hasCompleted]);
|
|
60
|
+
const recoverPassword = hasCompleted ? (
|
|
61
|
+
<div className={classes.successMessage}>
|
|
62
|
+
<FormattedMessage
|
|
63
|
+
id={'resetPassword.successMessage'}
|
|
64
|
+
defaultMessage={
|
|
65
|
+
'Your new password has been saved. Please use this password to sign into your Account.'
|
|
66
|
+
}
|
|
67
|
+
/>
|
|
68
|
+
</div>
|
|
69
|
+
) : (
|
|
70
|
+
<Form className={classes.form} onSubmit={handleSubmit}>
|
|
71
|
+
<div className={classes.description}>
|
|
72
|
+
<FormattedMessage
|
|
73
|
+
id={'resetPassword.descriptionText'}
|
|
74
|
+
defaultMessage={
|
|
75
|
+
'Please enter your email address and new password.'
|
|
76
|
+
}
|
|
77
|
+
/>
|
|
78
|
+
</div>
|
|
79
|
+
<Field label={'Email address'}>
|
|
80
|
+
<TextInput field={'email'} validate={isRequired} />
|
|
81
|
+
</Field>
|
|
82
|
+
<Password
|
|
83
|
+
label={formatMessage({
|
|
84
|
+
id: 'resetPassword.newPasswordText',
|
|
85
|
+
defaultMessage: 'New Password'
|
|
86
|
+
})}
|
|
87
|
+
fieldName={'newPassword'}
|
|
88
|
+
isToggleButtonHidden={false}
|
|
89
|
+
/>
|
|
90
|
+
<GoogleReCaptcha {...recaptchaWidgetProps} />
|
|
91
|
+
<div className={classes.buttonContainer}>
|
|
92
|
+
<Button
|
|
93
|
+
className={classes.submitButton}
|
|
94
|
+
type="submit"
|
|
95
|
+
priority="high"
|
|
96
|
+
disabled={loading}
|
|
97
|
+
>
|
|
98
|
+
<FormattedMessage
|
|
99
|
+
id="resetPassword.savePassword"
|
|
100
|
+
defaultMessage="Save Password"
|
|
101
|
+
/>
|
|
102
|
+
</Button>
|
|
103
|
+
</div>
|
|
104
|
+
<FormErrors errors={formErrors} />
|
|
105
|
+
</Form>
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<div className={classes.root}>
|
|
110
|
+
<StoreTitle>
|
|
111
|
+
{formatMessage({
|
|
112
|
+
id: 'resetPassword.title',
|
|
113
|
+
defaultMessage: 'Reset Password'
|
|
114
|
+
})}
|
|
115
|
+
</StoreTitle>
|
|
116
|
+
<h1 aria-live="polite" className={classes.header}>
|
|
117
|
+
<FormattedMessage
|
|
118
|
+
id="resetPassword.header"
|
|
119
|
+
defaultMessage="Reset Password"
|
|
120
|
+
/>
|
|
121
|
+
</h1>
|
|
122
|
+
<div className={classes.contentContainer}>
|
|
123
|
+
{token ? recoverPassword : tokenMissing}
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export default ResetPassword;
|
|
130
|
+
|
|
131
|
+
ResetPassword.propTypes = {
|
|
132
|
+
classes: shape({
|
|
133
|
+
root: string,
|
|
134
|
+
header: string,
|
|
135
|
+
contentContainer: string,
|
|
136
|
+
form: string,
|
|
137
|
+
description: string,
|
|
138
|
+
invalidToken: string,
|
|
139
|
+
buttonContainer: string,
|
|
140
|
+
submitButton: string,
|
|
141
|
+
successMessage: string
|
|
142
|
+
})
|
|
143
|
+
};
|
package/src/overwrites/venia-ui/lib/components/MyAccount/ResetPassword/resetPassword.module.css
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: gap-y-md from global;
|
|
3
|
+
composes: grid from global;
|
|
4
|
+
composes: justify-center from global;
|
|
5
|
+
composes: px-0 from global;
|
|
6
|
+
composes: py-[2.5rem] from global;
|
|
7
|
+
composes: text-center from global;
|
|
8
|
+
grid-template-columns: minmax(auto, 512px);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.header {
|
|
12
|
+
composes: font-serif from global;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.form {
|
|
16
|
+
composes: gap-xs from global;
|
|
17
|
+
composes: grid from global;
|
|
18
|
+
composes: justify-items-stretch from global;
|
|
19
|
+
composes: px-sm from global;
|
|
20
|
+
composes: py-xs from global;
|
|
21
|
+
composes: lg_mb-md from global;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.description {
|
|
25
|
+
composes: font-light from global;
|
|
26
|
+
composes: leading-5 from global;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.buttonContainer {
|
|
30
|
+
composes: mt-xs from global;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.submitButton {
|
|
34
|
+
composes: root_highPriority from '../../Button/button.module.css';
|
|
35
|
+
composes: justify-self-center from global;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.invalidToken,
|
|
39
|
+
.successMessage {
|
|
40
|
+
composes: p-sm from global;
|
|
41
|
+
composes: text-center from global;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.invalidToken {
|
|
45
|
+
composes: text-error from global;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.contentContainer {
|
|
49
|
+
composes: lg_border-2 from global;
|
|
50
|
+
composes: lg_border-solid from global;
|
|
51
|
+
composes: lg_border-subtle from global;
|
|
52
|
+
composes: lg_rounded-md from global;
|
|
53
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { arrayOf, func, node, shape, string } from 'prop-types';
|
|
3
|
+
|
|
4
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
5
|
+
import Button from '@magento/venia-ui/lib/components/Button';
|
|
6
|
+
|
|
7
|
+
import defaultClasses from './accountLink.module.css';
|
|
8
|
+
|
|
9
|
+
const AccountLink = props => {
|
|
10
|
+
const { children, onClick } = props;
|
|
11
|
+
const [icon, text] = children;
|
|
12
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
13
|
+
|
|
14
|
+
const handleClick = useCallback(() => {
|
|
15
|
+
if (typeof onClick === 'function') {
|
|
16
|
+
onClick();
|
|
17
|
+
}
|
|
18
|
+
}, [onClick]);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Button classes={classes} onClick={handleClick}>
|
|
22
|
+
<span className={classes.icon}>{icon}</span>
|
|
23
|
+
<span className={classes.text}>{text}</span>
|
|
24
|
+
</Button>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default AccountLink;
|
|
29
|
+
|
|
30
|
+
AccountLink.propTypes = {
|
|
31
|
+
children: arrayOf(node).isRequired,
|
|
32
|
+
classes: shape({
|
|
33
|
+
content: string,
|
|
34
|
+
icon: string,
|
|
35
|
+
root: string,
|
|
36
|
+
root_highPriority: string,
|
|
37
|
+
root_lowPriority: string,
|
|
38
|
+
root_normalPriority: string,
|
|
39
|
+
text: string
|
|
40
|
+
}),
|
|
41
|
+
onClick: func
|
|
42
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: border-b from global;
|
|
3
|
+
composes: border-solid from global;
|
|
4
|
+
composes: border-subtle from global;
|
|
5
|
+
composes: w-full from global;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.content {
|
|
9
|
+
composes: gap-2xs from global;
|
|
10
|
+
composes: grid from global;
|
|
11
|
+
composes: grid-flow-col from global;
|
|
12
|
+
composes: h-[3rem] from global;
|
|
13
|
+
composes: items-center from global;
|
|
14
|
+
composes: justify-items-start from global;
|
|
15
|
+
grid-template-columns: 2rem 1fr;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.icon {
|
|
19
|
+
composes: flex from global;
|
|
20
|
+
composes: items-center from global;
|
|
21
|
+
composes: justify-center from global;
|
|
22
|
+
composes: justify-self-center from global;
|
|
23
|
+
composes: text-brand from global;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.text {
|
|
27
|
+
composes: leading-none from global;
|
|
28
|
+
composes: text-sm from global;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.root_normalPriority {
|
|
32
|
+
composes: root;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './myAccount';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { func, shape, string } from 'prop-types';
|
|
3
|
+
|
|
4
|
+
import { useMyAccount } from '@magento/peregrine/lib/talons/MyAccount/useMyAccount';
|
|
5
|
+
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
+
import AccountMenuItems from '@magento/venia-ui/lib/components/AccountMenu/accountMenuItems';
|
|
8
|
+
import defaultClasses from './myAccount.module.css';
|
|
9
|
+
|
|
10
|
+
const MyAccount = props => {
|
|
11
|
+
const { classes: propClasses, onSignOut, onClose } = props;
|
|
12
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
13
|
+
|
|
14
|
+
const talonProps = useMyAccount({
|
|
15
|
+
onSignOut: onSignOut,
|
|
16
|
+
onClose: onClose
|
|
17
|
+
});
|
|
18
|
+
const { handleSignOut, handleClose } = talonProps;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className={classes.root}>
|
|
22
|
+
<AccountMenuItems onSignOut={handleSignOut} onClose={handleClose} />
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default MyAccount;
|
|
28
|
+
|
|
29
|
+
MyAccount.propTypes = {
|
|
30
|
+
classes: shape({
|
|
31
|
+
actions: string,
|
|
32
|
+
root: string,
|
|
33
|
+
subtitle: string,
|
|
34
|
+
title: string,
|
|
35
|
+
user: string
|
|
36
|
+
}),
|
|
37
|
+
onSignOut: func.isRequired
|
|
38
|
+
};
|
package/src/overwrites/venia-ui/lib/components/OrderHistoryPage/OrderDetails/billingInformation.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
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 './billingInformation.module.css';
|
|
8
|
+
|
|
9
|
+
const BillingInformation = props => {
|
|
10
|
+
const { data, classes: propsClasses } = props;
|
|
11
|
+
const {
|
|
12
|
+
city,
|
|
13
|
+
country_code,
|
|
14
|
+
firstname,
|
|
15
|
+
lastname,
|
|
16
|
+
postcode,
|
|
17
|
+
region,
|
|
18
|
+
street
|
|
19
|
+
} = data;
|
|
20
|
+
const classes = useStyle(defaultClasses, propsClasses);
|
|
21
|
+
|
|
22
|
+
const additionalAddressString = `${city}, ${region} ${postcode} ${country_code}`;
|
|
23
|
+
const fullName = `${firstname} ${lastname}`;
|
|
24
|
+
const streetRows = street.map((row, index) => {
|
|
25
|
+
return (
|
|
26
|
+
<span className={classes.streetRow} key={index}>
|
|
27
|
+
{row}
|
|
28
|
+
</span>
|
|
29
|
+
);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
className={classes.root}
|
|
35
|
+
data-cy="OrderDetails-BillingInformation-root"
|
|
36
|
+
>
|
|
37
|
+
<div className={classes.heading}>
|
|
38
|
+
<FormattedMessage
|
|
39
|
+
id="orderDetails.billingInformationLabel"
|
|
40
|
+
defaultMessage="Billing Information"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
<span className={classes.name}>{fullName}</span>
|
|
44
|
+
{streetRows}
|
|
45
|
+
<div className={classes.additionalAddress}>
|
|
46
|
+
{additionalAddressString}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default BillingInformation;
|
|
53
|
+
|
|
54
|
+
BillingInformation.propTypes = {
|
|
55
|
+
classes: shape({
|
|
56
|
+
root: string,
|
|
57
|
+
heading: string,
|
|
58
|
+
name: string,
|
|
59
|
+
streetRow: string,
|
|
60
|
+
additionalAddress: string
|
|
61
|
+
}),
|
|
62
|
+
data: shape({
|
|
63
|
+
city: string,
|
|
64
|
+
country_code: string,
|
|
65
|
+
firstname: string,
|
|
66
|
+
lastname: string,
|
|
67
|
+
postcode: string,
|
|
68
|
+
region: string,
|
|
69
|
+
street: arrayOf(string)
|
|
70
|
+
})
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './orderDetails';
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { shape, string, number, arrayOf } from 'prop-types';
|
|
3
|
+
import { FormattedMessage } from 'react-intl';
|
|
4
|
+
import { Link } from 'react-router-dom';
|
|
5
|
+
import { useOrderHistoryContext } from '@magento/peregrine/lib/talons/OrderHistoryPage/orderHistoryContext';
|
|
6
|
+
|
|
7
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
8
|
+
import Button from '@magento/venia-ui/lib/components/Button';
|
|
9
|
+
import ProductOptions from '@magento/venia-ui/lib/components/LegacyMiniCart/productOptions';
|
|
10
|
+
import Image from '@magento/venia-ui/lib/components/Image';
|
|
11
|
+
import Price from '@magento/venia-ui/lib/components/Price';
|
|
12
|
+
import defaultClasses from './item.module.css';
|
|
13
|
+
import PlaceholderImage from '@magento/venia-ui/lib/components/Image/placeholderImage';
|
|
14
|
+
|
|
15
|
+
const Item = props => {
|
|
16
|
+
const {
|
|
17
|
+
product_name,
|
|
18
|
+
product_sale_price,
|
|
19
|
+
product_url_key,
|
|
20
|
+
quantity_ordered,
|
|
21
|
+
selected_options,
|
|
22
|
+
thumbnail
|
|
23
|
+
} = props;
|
|
24
|
+
const { currency, value: unitPrice } = product_sale_price;
|
|
25
|
+
|
|
26
|
+
const orderHistoryState = useOrderHistoryContext();
|
|
27
|
+
const { productURLSuffix } = orderHistoryState;
|
|
28
|
+
const itemLink = `${product_url_key}${productURLSuffix}`;
|
|
29
|
+
const mappedOptions = useMemo(
|
|
30
|
+
() =>
|
|
31
|
+
selected_options.map(option => ({
|
|
32
|
+
option_label: option.label,
|
|
33
|
+
value_label: option.value
|
|
34
|
+
})),
|
|
35
|
+
[selected_options]
|
|
36
|
+
);
|
|
37
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
38
|
+
|
|
39
|
+
const thumbnailProps = {
|
|
40
|
+
alt: product_name,
|
|
41
|
+
classes: { root: classes.thumbnail },
|
|
42
|
+
width: 50
|
|
43
|
+
};
|
|
44
|
+
const thumbnailElement = thumbnail ? (
|
|
45
|
+
<Image {...thumbnailProps} resource={thumbnail.url} />
|
|
46
|
+
) : (
|
|
47
|
+
<PlaceholderImage {...thumbnailProps} />
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<div className={classes.root}>
|
|
52
|
+
<Link className={classes.thumbnailContainer} to={itemLink}>
|
|
53
|
+
{thumbnailElement}
|
|
54
|
+
</Link>
|
|
55
|
+
<div className={classes.nameContainer}>
|
|
56
|
+
<Link to={itemLink}>{product_name}</Link>
|
|
57
|
+
</div>
|
|
58
|
+
<ProductOptions
|
|
59
|
+
options={mappedOptions}
|
|
60
|
+
classes={{
|
|
61
|
+
options: classes.options
|
|
62
|
+
}}
|
|
63
|
+
/>
|
|
64
|
+
<span className={classes.quantity}>
|
|
65
|
+
<FormattedMessage
|
|
66
|
+
id="orderDetails.quantity"
|
|
67
|
+
defaultMessage="Qty : {quantity}"
|
|
68
|
+
values={{
|
|
69
|
+
quantity: quantity_ordered
|
|
70
|
+
}}
|
|
71
|
+
/>
|
|
72
|
+
</span>
|
|
73
|
+
<div className={classes.price}>
|
|
74
|
+
<Price currencyCode={currency} value={unitPrice} />
|
|
75
|
+
</div>
|
|
76
|
+
<Button
|
|
77
|
+
onClick={() => {
|
|
78
|
+
// TODO will be implemented in PWA-979
|
|
79
|
+
console.log('Buying Again');
|
|
80
|
+
}}
|
|
81
|
+
className={classes.buyAgainButton}
|
|
82
|
+
>
|
|
83
|
+
<FormattedMessage
|
|
84
|
+
id="orderDetails.buyAgain"
|
|
85
|
+
defaultMessage="Buy Again"
|
|
86
|
+
/>
|
|
87
|
+
</Button>
|
|
88
|
+
</div>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export default Item;
|
|
93
|
+
|
|
94
|
+
Item.propTypes = {
|
|
95
|
+
classes: shape({
|
|
96
|
+
root: string,
|
|
97
|
+
thumbnailContainer: string,
|
|
98
|
+
thumbnail: string,
|
|
99
|
+
name: string,
|
|
100
|
+
options: string,
|
|
101
|
+
quantity: string,
|
|
102
|
+
price: string,
|
|
103
|
+
buyAgainButton: string
|
|
104
|
+
}),
|
|
105
|
+
product_name: string.isRequired,
|
|
106
|
+
product_sale_price: shape({
|
|
107
|
+
currency: string,
|
|
108
|
+
value: number
|
|
109
|
+
}).isRequired,
|
|
110
|
+
product_url_key: string.isRequired,
|
|
111
|
+
quantity_ordered: number.isRequired,
|
|
112
|
+
selected_options: arrayOf(
|
|
113
|
+
shape({
|
|
114
|
+
label: string,
|
|
115
|
+
value: string
|
|
116
|
+
})
|
|
117
|
+
).isRequired,
|
|
118
|
+
thumbnail: shape({
|
|
119
|
+
url: string
|
|
120
|
+
})
|
|
121
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: grid from global;
|
|
3
|
+
composes: grid-cols-autoFirst from global;
|
|
4
|
+
composes: grid-rows-autoFirst from global;
|
|
5
|
+
composes: gap-y-2 from global;
|
|
6
|
+
composes: gap-x-4 from global;
|
|
7
|
+
|
|
8
|
+
composes: lg_gap-y-1.5 from global;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@media (min-width: 960px) {
|
|
12
|
+
.root {
|
|
13
|
+
grid-template-columns: auto repeat(3, 1fr) auto;
|
|
14
|
+
grid-template-rows: repeat(5, auto);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.thumbnailContainer {
|
|
19
|
+
grid-row: 1 / -1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.nameContainer {
|
|
23
|
+
composes: font-bold from global;
|
|
24
|
+
grid-column: 2 / -1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.buyAgainButton {
|
|
28
|
+
composes: col-auto from global;
|
|
29
|
+
composes: invisible from global; /* Hide until PWA-979 is completed */
|
|
30
|
+
composes: justify-self-start from global;
|
|
31
|
+
composes: self-start from global;
|
|
32
|
+
composes: underline from global;
|
|
33
|
+
|
|
34
|
+
composes: lg_col-end-[-1] from global;
|
|
35
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { shape, arrayOf, string, number } from 'prop-types';
|
|
3
|
+
|
|
4
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
5
|
+
|
|
6
|
+
import Item from './item';
|
|
7
|
+
|
|
8
|
+
import defaultClasses from './items.module.css';
|
|
9
|
+
import { FormattedMessage } from 'react-intl';
|
|
10
|
+
|
|
11
|
+
const Items = props => {
|
|
12
|
+
const { items, imagesData } = props.data;
|
|
13
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
14
|
+
|
|
15
|
+
const itemsComponent = items.map(item => (
|
|
16
|
+
<Item key={item.id} {...item} {...imagesData[item.product_sku]} />
|
|
17
|
+
));
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className={classes.root} data-cy="OrderDetails-Items-root">
|
|
21
|
+
<h3 className={classes.heading}>
|
|
22
|
+
<FormattedMessage
|
|
23
|
+
id="orderItems.itemsHeading"
|
|
24
|
+
defaultMessage="Items"
|
|
25
|
+
/>
|
|
26
|
+
</h3>
|
|
27
|
+
<div className={classes.itemsContainer}>{itemsComponent}</div>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default Items;
|
|
33
|
+
|
|
34
|
+
Items.propTypes = {
|
|
35
|
+
classes: shape({
|
|
36
|
+
root: string
|
|
37
|
+
}),
|
|
38
|
+
data: shape({
|
|
39
|
+
items: arrayOf(
|
|
40
|
+
shape({
|
|
41
|
+
id: string,
|
|
42
|
+
product_name: string,
|
|
43
|
+
product_sale_price: shape({
|
|
44
|
+
currency: string,
|
|
45
|
+
value: number
|
|
46
|
+
}),
|
|
47
|
+
product_sku: string,
|
|
48
|
+
product_url_key: string,
|
|
49
|
+
selected_options: arrayOf(
|
|
50
|
+
shape({
|
|
51
|
+
label: string,
|
|
52
|
+
value: string
|
|
53
|
+
})
|
|
54
|
+
),
|
|
55
|
+
quantity_ordered: number
|
|
56
|
+
})
|
|
57
|
+
),
|
|
58
|
+
imagesData: arrayOf(
|
|
59
|
+
shape({
|
|
60
|
+
id: number,
|
|
61
|
+
sku: string,
|
|
62
|
+
thumbnail: shape({
|
|
63
|
+
url: string
|
|
64
|
+
}),
|
|
65
|
+
url_key: string,
|
|
66
|
+
url_suffix: string
|
|
67
|
+
})
|
|
68
|
+
)
|
|
69
|
+
})
|
|
70
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: pr-0 from global;
|
|
3
|
+
|
|
4
|
+
composes: lg_grid from global;
|
|
5
|
+
composes: lg_pr-sm from global;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.heading {
|
|
9
|
+
composes: font-bold from global;
|
|
10
|
+
composes: pb-3 from global;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.itemsContainer {
|
|
14
|
+
composes: grid from global;
|
|
15
|
+
composes: gap-y-md from global;
|
|
16
|
+
}
|