@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
package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingInformation/editModal.module.css
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: bg-white from global;
|
|
3
|
+
composes: bottom-0 from global;
|
|
4
|
+
composes: fixed from global;
|
|
5
|
+
composes: grid from global;
|
|
6
|
+
composes: grid-rows-autoFirst from global;
|
|
7
|
+
composes: h-full from global;
|
|
8
|
+
composes: left-auto from global;
|
|
9
|
+
composes: max-w-modal from global;
|
|
10
|
+
composes: opacity-0 from global;
|
|
11
|
+
composes: overflow-hidden from global;
|
|
12
|
+
composes: right-0 from global;
|
|
13
|
+
composes: top-0 from global;
|
|
14
|
+
composes: w-full from global;
|
|
15
|
+
composes: z-dialog from global;
|
|
16
|
+
transform: scale(1.15);
|
|
17
|
+
transition-duration: 192ms;
|
|
18
|
+
transition-timing-function: var(--venia-global-anim-out);
|
|
19
|
+
transition-property: opacity, transform, visibility;
|
|
20
|
+
|
|
21
|
+
/* TODO @TW: review (B6) */
|
|
22
|
+
/* composes: invisible from global; */
|
|
23
|
+
visibility: hidden;
|
|
24
|
+
|
|
25
|
+
composes: lg_h-auto from global;
|
|
26
|
+
composes: lg_max-h-modal from global;
|
|
27
|
+
composes: lg_max-w-[740px] from global;
|
|
28
|
+
composes: lg_top-[5vh] from global;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (max-width: 959px) {
|
|
32
|
+
.root {
|
|
33
|
+
transform: translate3d(100%, 0, 0);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (min-width: 960px) {
|
|
38
|
+
|
|
39
|
+
/* TODO @TW: review */
|
|
40
|
+
.root {
|
|
41
|
+
left: calc(50% - 370px);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.root_open {
|
|
46
|
+
composes: root;
|
|
47
|
+
|
|
48
|
+
composes: opacity-100 from global;
|
|
49
|
+
composes: shadow-modal from global;
|
|
50
|
+
transform: scale(1);
|
|
51
|
+
transition-duration: 224ms;
|
|
52
|
+
transition-timing-function: var(--venia-global-anim-in);
|
|
53
|
+
composes: rounded-md from global;
|
|
54
|
+
|
|
55
|
+
/* TODO @TW: review (B6) */
|
|
56
|
+
/* composes: visible from global; */
|
|
57
|
+
visibility: visible;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (max-width: 959px) {
|
|
61
|
+
.root_open {
|
|
62
|
+
composes: root;
|
|
63
|
+
|
|
64
|
+
transform: translate3d(0, 0, 0);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.body {
|
|
69
|
+
composes: overflow-auto from global;
|
|
70
|
+
composes: px-xs from global;
|
|
71
|
+
composes: py-2xs from global;
|
|
72
|
+
|
|
73
|
+
composes: lg_px-md from global;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.header {
|
|
77
|
+
composes: grid from global;
|
|
78
|
+
composes: grid-flow-col from global;
|
|
79
|
+
composes: justify-between from global;
|
|
80
|
+
composes: p-3.5 from global;
|
|
81
|
+
|
|
82
|
+
composes: lg_px-md from global;
|
|
83
|
+
composes: lg_py-3.5 from global;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.headerText {
|
|
87
|
+
composes: self-center from global;
|
|
88
|
+
composes: text-[15px] from global;
|
|
89
|
+
composes: font-medium from global;
|
|
90
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './shippingInformation';
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import React, { Fragment, Suspense } from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { func, string, shape } from 'prop-types';
|
|
4
|
+
import { Edit2 as EditIcon } from 'react-feather';
|
|
5
|
+
import { useShippingInformation } from '@magento/peregrine/lib/talons/CheckoutPage/ShippingInformation/useShippingInformation';
|
|
6
|
+
|
|
7
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
8
|
+
import Icon from '@magento/venia-ui/lib/components/Icon';
|
|
9
|
+
import LoadingIndicator from '@magento/venia-ui/lib/components/LoadingIndicator';
|
|
10
|
+
import AddressForm from './AddressForm';
|
|
11
|
+
import Card from './card';
|
|
12
|
+
import defaultClasses from './shippingInformation.module.css';
|
|
13
|
+
import LinkButton from '@magento/venia-ui/lib/components/LinkButton';
|
|
14
|
+
import cn from 'classnames';
|
|
15
|
+
|
|
16
|
+
const EditModal = React.lazy(() => import('./editModal'));
|
|
17
|
+
|
|
18
|
+
const ShippingInformation = props => {
|
|
19
|
+
const {
|
|
20
|
+
classes: propClasses,
|
|
21
|
+
onSave,
|
|
22
|
+
onSuccess,
|
|
23
|
+
toggleActiveContent,
|
|
24
|
+
toggleSignInContent,
|
|
25
|
+
setGuestSignInUsername
|
|
26
|
+
} = props;
|
|
27
|
+
const talonProps = useShippingInformation({
|
|
28
|
+
onSave,
|
|
29
|
+
toggleActiveContent
|
|
30
|
+
});
|
|
31
|
+
const {
|
|
32
|
+
doneEditing,
|
|
33
|
+
handleEditShipping,
|
|
34
|
+
hasUpdate,
|
|
35
|
+
isSignedIn,
|
|
36
|
+
isLoading,
|
|
37
|
+
shippingData
|
|
38
|
+
} = talonProps;
|
|
39
|
+
|
|
40
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
41
|
+
|
|
42
|
+
const rootClassName = !doneEditing
|
|
43
|
+
? classes.root_editMode
|
|
44
|
+
: hasUpdate
|
|
45
|
+
? classes.root_updated
|
|
46
|
+
: classes.root;
|
|
47
|
+
|
|
48
|
+
if (isLoading) {
|
|
49
|
+
return (
|
|
50
|
+
<LoadingIndicator classes={{ root: classes.loading }}>
|
|
51
|
+
<FormattedMessage
|
|
52
|
+
id={'shippingInformation.loading'}
|
|
53
|
+
defaultMessage={'Fetching Shipping Information...'}
|
|
54
|
+
/>
|
|
55
|
+
</LoadingIndicator>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const editModal = !isSignedIn ? (
|
|
60
|
+
<Suspense fallback={null}>
|
|
61
|
+
<EditModal onSuccess={onSuccess} shippingData={shippingData} />
|
|
62
|
+
</Suspense>
|
|
63
|
+
) : null;
|
|
64
|
+
|
|
65
|
+
const shippingInformation = doneEditing ? (
|
|
66
|
+
<Fragment>
|
|
67
|
+
<div className={classes.cardHeader}>
|
|
68
|
+
<h5 className={classes.cardTitle}>
|
|
69
|
+
<FormattedMessage
|
|
70
|
+
id={'shippingInformation.cardTitle'}
|
|
71
|
+
defaultMessage={'Shipping Information'}
|
|
72
|
+
/>
|
|
73
|
+
</h5>
|
|
74
|
+
<LinkButton
|
|
75
|
+
onClick={handleEditShipping}
|
|
76
|
+
className={classes.editButton}
|
|
77
|
+
data-cy="ShippingInformation-editButton"
|
|
78
|
+
>
|
|
79
|
+
<Icon
|
|
80
|
+
size={16}
|
|
81
|
+
src={EditIcon}
|
|
82
|
+
classes={{ icon: classes.editIcon }}
|
|
83
|
+
/>
|
|
84
|
+
<span className={classes.editText}>
|
|
85
|
+
<FormattedMessage
|
|
86
|
+
id={'global.editButton'}
|
|
87
|
+
defaultMessage={'Edit'}
|
|
88
|
+
/>
|
|
89
|
+
</span>
|
|
90
|
+
</LinkButton>
|
|
91
|
+
</div>
|
|
92
|
+
<Card shippingData={shippingData} />
|
|
93
|
+
{editModal}
|
|
94
|
+
</Fragment>
|
|
95
|
+
) : (
|
|
96
|
+
<Fragment>
|
|
97
|
+
<h3
|
|
98
|
+
data-cy="ShippingInformation-editTitle"
|
|
99
|
+
className={classes.editTitle}
|
|
100
|
+
>
|
|
101
|
+
<FormattedMessage
|
|
102
|
+
id={'shippingInformation.editTitle'}
|
|
103
|
+
defaultMessage={'Shipping Information'}
|
|
104
|
+
/>
|
|
105
|
+
</h3>
|
|
106
|
+
<div className={classes.editWrapper}>
|
|
107
|
+
<AddressForm
|
|
108
|
+
onSuccess={onSuccess}
|
|
109
|
+
shippingData={shippingData}
|
|
110
|
+
toggleSignInContent={toggleSignInContent}
|
|
111
|
+
setGuestSignInUsername={setGuestSignInUsername}
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
</Fragment>
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<div
|
|
119
|
+
className={cn(
|
|
120
|
+
rootClassName,
|
|
121
|
+
'!border border-gray-100 !rounded-md !p-4'
|
|
122
|
+
)}
|
|
123
|
+
data-cy="ShippingInformation-root"
|
|
124
|
+
>
|
|
125
|
+
{shippingInformation}
|
|
126
|
+
</div>
|
|
127
|
+
);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export default ShippingInformation;
|
|
131
|
+
|
|
132
|
+
ShippingInformation.propTypes = {
|
|
133
|
+
classes: shape({
|
|
134
|
+
root: string,
|
|
135
|
+
root_editMode: string,
|
|
136
|
+
cardHeader: string,
|
|
137
|
+
cartTitle: string,
|
|
138
|
+
editWrapper: string,
|
|
139
|
+
editTitle: string,
|
|
140
|
+
editButton: string,
|
|
141
|
+
editIcon: string,
|
|
142
|
+
editText: string
|
|
143
|
+
}),
|
|
144
|
+
onSave: func.isRequired,
|
|
145
|
+
onSuccess: func.isRequired,
|
|
146
|
+
toggleActiveContent: func.isRequired,
|
|
147
|
+
toggleSignInContent: func.isRequired,
|
|
148
|
+
setGuestSignInUsername: func.isRequired
|
|
149
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
/* TODO @TW: review (B6) */
|
|
3
|
+
composes: border-2 from global;
|
|
4
|
+
composes: border-solid from global;
|
|
5
|
+
composes: border-subtle from global;
|
|
6
|
+
composes: p-md from global;
|
|
7
|
+
composes: rounded-md from global;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.root_editMode {
|
|
11
|
+
composes: root;
|
|
12
|
+
|
|
13
|
+
/* TODO @TW: review (B6) */
|
|
14
|
+
composes: border-0 from global;
|
|
15
|
+
composes: border-b-2 from global;
|
|
16
|
+
composes: border-solid from global;
|
|
17
|
+
composes: border-subtle from global;
|
|
18
|
+
composes: p-0 from global;
|
|
19
|
+
composes: rounded-none from global;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.root_updated {
|
|
23
|
+
composes: root;
|
|
24
|
+
|
|
25
|
+
animation: flash var(--venia-global-anim-bounce) 640ms 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.cardHeader {
|
|
29
|
+
composes: grid from global;
|
|
30
|
+
composes: grid-cols-1 from global;
|
|
31
|
+
composes: grid-flow-col from global;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.cardTitle {
|
|
35
|
+
composes: font-medium from global;
|
|
36
|
+
composes: text-[16px] from global;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.editButton {
|
|
40
|
+
composes: -m-xs from global;
|
|
41
|
+
composes: p-xs from global;
|
|
42
|
+
composes: text-brand-dark from global;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.editWrapper {
|
|
46
|
+
composes: grid from global;
|
|
47
|
+
composes: pb-sm from global;
|
|
48
|
+
composes: pt-xs from global;
|
|
49
|
+
composes: px-0 from global;
|
|
50
|
+
composes: gap-y-2xs from global;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.editTitle {
|
|
54
|
+
composes: font-medium from global;
|
|
55
|
+
composes: text-[16px] from global;
|
|
56
|
+
composes: capitalize from global;
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.editIcon {
|
|
61
|
+
composes: stroke-brand-base from global;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.editText {
|
|
65
|
+
composes: hidden from global;
|
|
66
|
+
|
|
67
|
+
composes: lg_inline from global;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.loading {
|
|
71
|
+
composes: root from '@magento/venia-ui/lib/components/LoadingIndicator/indicator.module.css';
|
|
72
|
+
|
|
73
|
+
composes: text-center from global;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@keyframes flash {
|
|
77
|
+
0% {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
50% {
|
|
82
|
+
opacity: 0.5;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
100% {
|
|
86
|
+
opacity: 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { func, number, shape, string } from 'prop-types';
|
|
4
|
+
import { Edit2 as EditIcon } from 'react-feather';
|
|
5
|
+
|
|
6
|
+
import Price from '@magento/venia-ui/lib/components/Price';
|
|
7
|
+
|
|
8
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
9
|
+
import Icon from '@magento/venia-ui/lib/components/Icon';
|
|
10
|
+
import defaultClasses from './completedView.module.css';
|
|
11
|
+
import LinkButton from '@magento/venia-ui/lib/components/LinkButton';
|
|
12
|
+
|
|
13
|
+
const CompletedView = props => {
|
|
14
|
+
const { selectedShippingMethod, showUpdateMode } = props;
|
|
15
|
+
|
|
16
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
17
|
+
|
|
18
|
+
let contents;
|
|
19
|
+
if (!selectedShippingMethod) {
|
|
20
|
+
// Error state.
|
|
21
|
+
contents = (
|
|
22
|
+
<span className={classes.error}>
|
|
23
|
+
<FormattedMessage
|
|
24
|
+
id={'completedView.errorLoading'}
|
|
25
|
+
defaultMessage={
|
|
26
|
+
'Error loading selected shipping method. Please select again.'
|
|
27
|
+
}
|
|
28
|
+
/>
|
|
29
|
+
</span>
|
|
30
|
+
);
|
|
31
|
+
} else {
|
|
32
|
+
const { amount, method_title } = selectedShippingMethod;
|
|
33
|
+
const { currency, value } = amount;
|
|
34
|
+
|
|
35
|
+
const priceElement = value ? (
|
|
36
|
+
<div>
|
|
37
|
+
<Price value={value} currencyCode={currency} />
|
|
38
|
+
</div>
|
|
39
|
+
) : (
|
|
40
|
+
<span className={classes.free}>
|
|
41
|
+
<FormattedMessage id={'global.free'} defaultMessage={'Free'} />
|
|
42
|
+
</span>
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
contents = (
|
|
46
|
+
<div className={classes.contents}>
|
|
47
|
+
<span>{method_title}</span>
|
|
48
|
+
{priceElement}
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<div className={classes.root}>
|
|
55
|
+
<div className={classes.container}>
|
|
56
|
+
<span className={classes.titleContainer}>
|
|
57
|
+
<h5 className={classes.heading}>
|
|
58
|
+
<FormattedMessage
|
|
59
|
+
id={'completedView.shippingMethod'}
|
|
60
|
+
defaultMessage={'Shipping Method'}
|
|
61
|
+
/>
|
|
62
|
+
</h5>
|
|
63
|
+
<LinkButton
|
|
64
|
+
className={classes.editButton}
|
|
65
|
+
onClick={showUpdateMode}
|
|
66
|
+
data-cy="CompletedView-editButton"
|
|
67
|
+
>
|
|
68
|
+
<Icon
|
|
69
|
+
size={16}
|
|
70
|
+
src={EditIcon}
|
|
71
|
+
classes={{ icon: classes.editIcon }}
|
|
72
|
+
/>
|
|
73
|
+
<span className={classes.editButtonText}>
|
|
74
|
+
<FormattedMessage
|
|
75
|
+
id={'global.editButton'}
|
|
76
|
+
defaultMessage={'Edit'}
|
|
77
|
+
/>
|
|
78
|
+
</span>
|
|
79
|
+
</LinkButton>
|
|
80
|
+
</span>
|
|
81
|
+
{contents}
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export default CompletedView;
|
|
88
|
+
|
|
89
|
+
CompletedView.propTypes = {
|
|
90
|
+
classes: shape({
|
|
91
|
+
button: string,
|
|
92
|
+
container: string,
|
|
93
|
+
contents: string,
|
|
94
|
+
editButton: string,
|
|
95
|
+
editButtonText: string,
|
|
96
|
+
editIcon: string,
|
|
97
|
+
error: string,
|
|
98
|
+
free: string,
|
|
99
|
+
heading: string,
|
|
100
|
+
root: string,
|
|
101
|
+
titleContainer: string
|
|
102
|
+
}),
|
|
103
|
+
selectedShippingMethod: shape({
|
|
104
|
+
amount: shape({
|
|
105
|
+
currency: string,
|
|
106
|
+
value: number
|
|
107
|
+
}),
|
|
108
|
+
carrier_code: string,
|
|
109
|
+
carrier_title: string,
|
|
110
|
+
method_code: string,
|
|
111
|
+
method_title: string
|
|
112
|
+
}),
|
|
113
|
+
showUpdateMode: func
|
|
114
|
+
};
|
package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/completedView.module.css
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: h-full from global;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.contents {
|
|
6
|
+
grid-template-rows: auto auto;
|
|
7
|
+
composes: gap-y-2xs from global;
|
|
8
|
+
composes: grid from global;
|
|
9
|
+
composes: mt-xs from global;
|
|
10
|
+
composes: text-left from global;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.editButton {
|
|
14
|
+
composes: p-xs from global;
|
|
15
|
+
composes: -m-xs from global;
|
|
16
|
+
composes: text-brand-dark from global;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.editButtonText {
|
|
20
|
+
composes: hidden from global;
|
|
21
|
+
|
|
22
|
+
composes: lg_inline from global;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.editIcon {
|
|
26
|
+
composes: stroke-brand-base from global;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.error {
|
|
30
|
+
composes: leading-normal from global;
|
|
31
|
+
composes: self-center from global;
|
|
32
|
+
composes: text-error from global;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.free {
|
|
36
|
+
composes: uppercase from global;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.heading {
|
|
40
|
+
composes: font-medium from global;
|
|
41
|
+
composes: text-[16px] from global;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.titleContainer {
|
|
45
|
+
composes: grid from global;
|
|
46
|
+
composes: grid-cols-1 from global;
|
|
47
|
+
composes: grid-flow-col from global;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './shippingMethod';
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { bool, func, shape, string } from 'prop-types';
|
|
4
|
+
import { Form } from 'informed';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
displayStates,
|
|
8
|
+
useShippingMethod
|
|
9
|
+
} from '@magento/peregrine/lib/talons/CheckoutPage/ShippingMethod/useShippingMethod';
|
|
10
|
+
|
|
11
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
12
|
+
import Button from '@magento/venia-ui/lib/components/Button';
|
|
13
|
+
import FormError from '@magento/venia-ui/lib/components/FormError';
|
|
14
|
+
import LoadingIndicator from '@magento/venia-ui/lib/components/LoadingIndicator';
|
|
15
|
+
import CompletedView from './completedView';
|
|
16
|
+
import ShippingRadios from './shippingRadios';
|
|
17
|
+
import UpdateModal from './updateModal';
|
|
18
|
+
import defaultClasses from './shippingMethod.module.css';
|
|
19
|
+
|
|
20
|
+
const initializingContents = (
|
|
21
|
+
<LoadingIndicator>
|
|
22
|
+
<FormattedMessage
|
|
23
|
+
id={'shippingMethod.loading'}
|
|
24
|
+
defaultMessage={'Loading shipping methods...'}
|
|
25
|
+
/>
|
|
26
|
+
</LoadingIndicator>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const ShippingMethod = props => {
|
|
30
|
+
const { onSave, onSuccess, pageIsUpdating, setPageIsUpdating } = props;
|
|
31
|
+
|
|
32
|
+
const talonProps = useShippingMethod({
|
|
33
|
+
onSave,
|
|
34
|
+
onSuccess,
|
|
35
|
+
setPageIsUpdating
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const {
|
|
39
|
+
displayState,
|
|
40
|
+
errors,
|
|
41
|
+
handleCancelUpdate,
|
|
42
|
+
handleSubmit,
|
|
43
|
+
isLoading,
|
|
44
|
+
isUpdateMode,
|
|
45
|
+
selectedShippingMethod,
|
|
46
|
+
shippingMethods,
|
|
47
|
+
showUpdateMode
|
|
48
|
+
} = talonProps;
|
|
49
|
+
|
|
50
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
51
|
+
|
|
52
|
+
let contents;
|
|
53
|
+
|
|
54
|
+
if (displayState === displayStates.DONE) {
|
|
55
|
+
const updateFormInitialValues = {
|
|
56
|
+
shipping_method: selectedShippingMethod.serializedValue
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
contents = (
|
|
60
|
+
<Fragment>
|
|
61
|
+
<div className={classes.done} data-cy="ShippingMethod-done">
|
|
62
|
+
<CompletedView
|
|
63
|
+
selectedShippingMethod={selectedShippingMethod}
|
|
64
|
+
showUpdateMode={showUpdateMode}
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
<UpdateModal
|
|
68
|
+
formErrors={Array.from(errors.values())}
|
|
69
|
+
formInitialValues={updateFormInitialValues}
|
|
70
|
+
handleCancel={handleCancelUpdate}
|
|
71
|
+
handleSubmit={handleSubmit}
|
|
72
|
+
isLoading={isLoading}
|
|
73
|
+
isOpen={isUpdateMode}
|
|
74
|
+
pageIsUpdating={pageIsUpdating}
|
|
75
|
+
shippingMethods={shippingMethods}
|
|
76
|
+
/>
|
|
77
|
+
</Fragment>
|
|
78
|
+
);
|
|
79
|
+
} else {
|
|
80
|
+
// We're either initializing or editing.
|
|
81
|
+
let bodyContents = initializingContents;
|
|
82
|
+
|
|
83
|
+
if (displayState === displayStates.EDITING) {
|
|
84
|
+
const lowestCostShippingMethodSerializedValue = shippingMethods.length
|
|
85
|
+
? shippingMethods[0].serializedValue
|
|
86
|
+
: '';
|
|
87
|
+
const lowestCostShippingMethod = {
|
|
88
|
+
shipping_method: lowestCostShippingMethodSerializedValue
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
bodyContents = (
|
|
92
|
+
<Form
|
|
93
|
+
className={classes.form}
|
|
94
|
+
initialValues={lowestCostShippingMethod}
|
|
95
|
+
onSubmit={handleSubmit}
|
|
96
|
+
>
|
|
97
|
+
<ShippingRadios
|
|
98
|
+
disabled={pageIsUpdating || isLoading}
|
|
99
|
+
shippingMethods={shippingMethods}
|
|
100
|
+
/>
|
|
101
|
+
<div className={classes.formButtons}>
|
|
102
|
+
<Button
|
|
103
|
+
data-cy="ShippingMethod-submitButton"
|
|
104
|
+
priority="normal"
|
|
105
|
+
type="submit"
|
|
106
|
+
disabled={pageIsUpdating || isLoading}
|
|
107
|
+
>
|
|
108
|
+
<FormattedMessage
|
|
109
|
+
id={'shippingMethod.continueToNextStep'}
|
|
110
|
+
defaultMessage={
|
|
111
|
+
'Continue to Payment Information'
|
|
112
|
+
}
|
|
113
|
+
/>
|
|
114
|
+
</Button>
|
|
115
|
+
</div>
|
|
116
|
+
</Form>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
contents = (
|
|
121
|
+
<div data-cy="ShippingMethod-root" className={classes.root}>
|
|
122
|
+
<h3
|
|
123
|
+
data-cy="ShippingMethod-heading"
|
|
124
|
+
className={classes.editingHeading}
|
|
125
|
+
>
|
|
126
|
+
<FormattedMessage
|
|
127
|
+
id={'shippingMethod.heading'}
|
|
128
|
+
defaultMessage={'Shipping Method'}
|
|
129
|
+
/>
|
|
130
|
+
</h3>
|
|
131
|
+
<FormError errors={Array.from(errors.values())} />
|
|
132
|
+
{bodyContents}
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return <Fragment>{contents}</Fragment>;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
ShippingMethod.propTypes = {
|
|
141
|
+
classes: shape({
|
|
142
|
+
done: string,
|
|
143
|
+
editingHeading: string,
|
|
144
|
+
form: string,
|
|
145
|
+
formButtons: string,
|
|
146
|
+
root: string
|
|
147
|
+
}),
|
|
148
|
+
onSave: func.isRequired,
|
|
149
|
+
onSuccess: func.isRequired,
|
|
150
|
+
pageIsUpdating: bool,
|
|
151
|
+
setPageIsUpdating: func.isRequired
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export default ShippingMethod;
|
package/src/overwrites/venia-ui/lib/components/CheckoutPage/ShippingMethod/shippingMethod.module.css
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: grid from global;
|
|
3
|
+
composes: gap-y-xs from global;
|
|
4
|
+
composes: p-4 from global;
|
|
5
|
+
composes: rounded-md from global;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.done {
|
|
9
|
+
composes: root;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.editingHeading {
|
|
13
|
+
composes: capitalize from global;
|
|
14
|
+
composes: text-[16px] from global;
|
|
15
|
+
composes: font-medium from global;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.form {
|
|
19
|
+
composes: gap-y-sm from global;
|
|
20
|
+
composes: grid from global;
|
|
21
|
+
composes: grid-rows-autoLast from global;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.formButtons {
|
|
25
|
+
composes: flex from global;
|
|
26
|
+
composes: justify-center from global;
|
|
27
|
+
}
|