@riosst100/pwa-marketplace 1.8.9 → 1.9.1
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 -1
- 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
package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentInformation.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React, { Suspense } from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { Form } from 'informed';
|
|
4
|
+
import { shape, func, string, bool, instanceOf } from 'prop-types';
|
|
5
|
+
|
|
6
|
+
import { usePaymentInformation } from '@magento/peregrine/lib/talons/CheckoutPage/PaymentInformation/usePaymentInformation';
|
|
7
|
+
import CheckoutError from '@magento/peregrine/lib/talons/CheckoutPage/CheckoutError';
|
|
8
|
+
|
|
9
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
10
|
+
import defaultClasses from './paymentInformation.module.css';
|
|
11
|
+
import LoadingIndicator from '@magento/venia-ui/lib/components/LoadingIndicator';
|
|
12
|
+
|
|
13
|
+
const PaymentMethods = React.lazy(() => import('./paymentMethods'));
|
|
14
|
+
const EditModal = React.lazy(() => import('./editModal'));
|
|
15
|
+
const Summary = React.lazy(() => import('./summary'));
|
|
16
|
+
|
|
17
|
+
const PaymentInformation = props => {
|
|
18
|
+
const {
|
|
19
|
+
classes: propClasses,
|
|
20
|
+
onSave,
|
|
21
|
+
resetShouldSubmit,
|
|
22
|
+
setCheckoutStep,
|
|
23
|
+
shouldSubmit,
|
|
24
|
+
checkoutError
|
|
25
|
+
} = props;
|
|
26
|
+
|
|
27
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
28
|
+
|
|
29
|
+
const talonProps = usePaymentInformation({
|
|
30
|
+
onSave,
|
|
31
|
+
checkoutError,
|
|
32
|
+
resetShouldSubmit,
|
|
33
|
+
setCheckoutStep,
|
|
34
|
+
shouldSubmit
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const {
|
|
38
|
+
doneEditing,
|
|
39
|
+
handlePaymentError,
|
|
40
|
+
handlePaymentSuccess,
|
|
41
|
+
hideEditModal,
|
|
42
|
+
isLoading,
|
|
43
|
+
isEditModalActive,
|
|
44
|
+
showEditModal
|
|
45
|
+
} = talonProps;
|
|
46
|
+
|
|
47
|
+
if (isLoading) {
|
|
48
|
+
return (
|
|
49
|
+
<LoadingIndicator classes={{ root: classes.loading }}>
|
|
50
|
+
<FormattedMessage
|
|
51
|
+
id={'checkoutPage.loadingPaymentInformation'}
|
|
52
|
+
defaultMessage={'Fetching Payment Information'}
|
|
53
|
+
/>
|
|
54
|
+
</LoadingIndicator>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const paymentInformation = doneEditing ? (
|
|
59
|
+
<Summary onEdit={showEditModal} />
|
|
60
|
+
) : (
|
|
61
|
+
<Form>
|
|
62
|
+
<PaymentMethods
|
|
63
|
+
onPaymentError={handlePaymentError}
|
|
64
|
+
onPaymentSuccess={handlePaymentSuccess}
|
|
65
|
+
resetShouldSubmit={resetShouldSubmit}
|
|
66
|
+
shouldSubmit={shouldSubmit}
|
|
67
|
+
/>
|
|
68
|
+
</Form>
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const editModal = doneEditing ? (
|
|
72
|
+
<Suspense fallback={null}>
|
|
73
|
+
<EditModal onClose={hideEditModal} isOpen={isEditModalActive} />
|
|
74
|
+
</Suspense>
|
|
75
|
+
) : null;
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<div className={classes.root} data-cy="PaymentInformation-root">
|
|
79
|
+
<div className={classes.payment_info_container}>
|
|
80
|
+
<Suspense fallback={null}>{paymentInformation}</Suspense>
|
|
81
|
+
</div>
|
|
82
|
+
{editModal}
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export default PaymentInformation;
|
|
88
|
+
|
|
89
|
+
PaymentInformation.propTypes = {
|
|
90
|
+
classes: shape({
|
|
91
|
+
container: string,
|
|
92
|
+
payment_info_container: string,
|
|
93
|
+
review_order_button: string
|
|
94
|
+
}),
|
|
95
|
+
onSave: func.isRequired,
|
|
96
|
+
checkoutError: instanceOf(CheckoutError),
|
|
97
|
+
resetShouldSubmit: func.isRequired,
|
|
98
|
+
shouldSubmit: bool
|
|
99
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: gap-xs from global;
|
|
3
|
+
composes: grid from global;
|
|
4
|
+
composes: grid-cols-1 from global;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.payment_info_container {
|
|
8
|
+
composes: border from global;
|
|
9
|
+
composes: border-gray-100 from global;
|
|
10
|
+
composes: rounded-md from global;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.loading {
|
|
14
|
+
composes: root from '@magento/venia-ui/lib/components/LoadingIndicator/indicator.module.css';
|
|
15
|
+
|
|
16
|
+
composes: text-center from global;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.heading {
|
|
20
|
+
composes: border-0 from global;
|
|
21
|
+
|
|
22
|
+
composes: lg_border from global;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is augmented at build time using the @magento/venia-ui build
|
|
3
|
+
* target "checkoutPagePaymentTypes", which allows third-party modules to
|
|
4
|
+
* add new payment component mappings for the checkout page.
|
|
5
|
+
*
|
|
6
|
+
* @see [Payment definition object]{@link PaymentDefinition}
|
|
7
|
+
*/
|
|
8
|
+
export default {};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A payment definition object that describes a payment in your storefront.
|
|
12
|
+
*
|
|
13
|
+
* @typedef {Object} PaymentDefinition
|
|
14
|
+
* @property {string} paymentCode is use to map your payment
|
|
15
|
+
* @property {string} importPath Resolvable path to the component the
|
|
16
|
+
* Route component will render
|
|
17
|
+
*
|
|
18
|
+
* @example <caption>A custom payment method</caption>
|
|
19
|
+
* const myCustomPayment = {
|
|
20
|
+
* paymentCode: 'cc',
|
|
21
|
+
* importPath: '@partner/module/path_to_your_component'
|
|
22
|
+
* }
|
|
23
|
+
*/
|
package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/paymentMethods.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { shape, string, bool, func } from 'prop-types';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
|
+
|
|
5
|
+
import { usePaymentMethods } from '@magento/peregrine/lib/talons/CheckoutPage/PaymentInformation/usePaymentMethods';
|
|
6
|
+
|
|
7
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
8
|
+
import RadioGroup from '@magento/venia-ui/lib/components/RadioGroup';
|
|
9
|
+
import Radio from '@magento/venia-ui/lib/components/RadioGroup/radio';
|
|
10
|
+
import defaultClasses from './paymentMethods.module.css';
|
|
11
|
+
import payments from './paymentMethodCollection';
|
|
12
|
+
|
|
13
|
+
const PaymentMethods = props => {
|
|
14
|
+
const {
|
|
15
|
+
classes: propClasses,
|
|
16
|
+
onPaymentError,
|
|
17
|
+
onPaymentSuccess,
|
|
18
|
+
resetShouldSubmit,
|
|
19
|
+
shouldSubmit
|
|
20
|
+
} = props;
|
|
21
|
+
|
|
22
|
+
const { formatMessage } = useIntl();
|
|
23
|
+
|
|
24
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
25
|
+
|
|
26
|
+
const talonProps = usePaymentMethods({});
|
|
27
|
+
|
|
28
|
+
const {
|
|
29
|
+
availablePaymentMethods,
|
|
30
|
+
currentSelectedPaymentMethod,
|
|
31
|
+
handlePaymentMethodSelection,
|
|
32
|
+
initialSelectedMethod,
|
|
33
|
+
isLoading
|
|
34
|
+
} = talonProps;
|
|
35
|
+
|
|
36
|
+
if (isLoading) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const radios = availablePaymentMethods
|
|
41
|
+
.map(({ code, title }) => {
|
|
42
|
+
// If we don't have an implementation for a method type, ignore it.
|
|
43
|
+
if (!Object.keys(payments).includes(code)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const id = `paymentMethod--${code}`;
|
|
48
|
+
const isSelected = currentSelectedPaymentMethod === code;
|
|
49
|
+
const PaymentMethodComponent = payments[code];
|
|
50
|
+
const renderedComponent = isSelected ? (
|
|
51
|
+
<PaymentMethodComponent
|
|
52
|
+
onPaymentSuccess={onPaymentSuccess}
|
|
53
|
+
onPaymentError={onPaymentError}
|
|
54
|
+
resetShouldSubmit={resetShouldSubmit}
|
|
55
|
+
shouldSubmit={shouldSubmit}
|
|
56
|
+
/>
|
|
57
|
+
) : null;
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<div key={code} className={classes.payment_method}>
|
|
61
|
+
<Radio
|
|
62
|
+
id={id}
|
|
63
|
+
label={title}
|
|
64
|
+
value={code}
|
|
65
|
+
classes={{
|
|
66
|
+
label: classes.radio_label
|
|
67
|
+
}}
|
|
68
|
+
checked={isSelected}
|
|
69
|
+
onChange={handlePaymentMethodSelection}
|
|
70
|
+
/>
|
|
71
|
+
{renderedComponent}
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
})
|
|
75
|
+
.filter(paymentMethod => !!paymentMethod);
|
|
76
|
+
|
|
77
|
+
const noPaymentMethodMessage = !radios.length ? (
|
|
78
|
+
<div className={classes.payment_errors}>
|
|
79
|
+
<span>
|
|
80
|
+
{formatMessage({
|
|
81
|
+
id: 'checkoutPage.paymentLoadingError',
|
|
82
|
+
defaultMessage: 'There was an error loading payments.'
|
|
83
|
+
})}
|
|
84
|
+
</span>
|
|
85
|
+
<span>
|
|
86
|
+
{formatMessage({
|
|
87
|
+
id: 'checkoutPage.refreshOrTryAgainLater',
|
|
88
|
+
defaultMessage: 'Please refresh or try again later.'
|
|
89
|
+
})}
|
|
90
|
+
</span>
|
|
91
|
+
</div>
|
|
92
|
+
) : null;
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div className={classes.root}>
|
|
96
|
+
<RadioGroup
|
|
97
|
+
classes={{ root: classes.radio_group }}
|
|
98
|
+
field="selectedPaymentMethod"
|
|
99
|
+
initialValue={initialSelectedMethod}
|
|
100
|
+
>
|
|
101
|
+
{radios}
|
|
102
|
+
</RadioGroup>
|
|
103
|
+
{noPaymentMethodMessage}
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export default PaymentMethods;
|
|
109
|
+
|
|
110
|
+
PaymentMethods.propTypes = {
|
|
111
|
+
classes: shape({
|
|
112
|
+
root: string,
|
|
113
|
+
payment_method: string,
|
|
114
|
+
radio_label: string
|
|
115
|
+
}),
|
|
116
|
+
onPaymentSuccess: func,
|
|
117
|
+
onPaymentError: func,
|
|
118
|
+
resetShouldSubmit: func,
|
|
119
|
+
selectedPaymentMethod: string,
|
|
120
|
+
shouldSubmit: bool
|
|
121
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: grid from global;
|
|
3
|
+
composes: p-md from global;
|
|
4
|
+
composes: pb-s from global;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.radio_group {
|
|
8
|
+
composes: grid from global;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.payment_method {
|
|
12
|
+
composes: border-b from global;
|
|
13
|
+
composes: border-solid from global;
|
|
14
|
+
composes: border-subtle from global;
|
|
15
|
+
composes: pb-xs from global;
|
|
16
|
+
composes: pt-xs from global;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* TODO @TW: cannot compose */
|
|
20
|
+
.payment_method:last-of-type {
|
|
21
|
+
/* composes: border-b-0 from global; */
|
|
22
|
+
border-bottom-width: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.radio_label {
|
|
26
|
+
composes: font-semibold from global;
|
|
27
|
+
composes: justify-self-start from global;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.payment_errors {
|
|
31
|
+
composes: grid from global;
|
|
32
|
+
composes: gap-2xs from global;
|
|
33
|
+
composes: text-error from global;
|
|
34
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { shape, string, func } from 'prop-types';
|
|
4
|
+
|
|
5
|
+
import { useSummary } from '@magento/peregrine/lib/talons/CheckoutPage/PaymentInformation/useSummary';
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
+
|
|
8
|
+
import defaultClasses from './summary.module.css';
|
|
9
|
+
import LoadingIndicator from '@magento/venia-ui/lib/components/LoadingIndicator';
|
|
10
|
+
import summaryPayments from './summaryPaymentCollection';
|
|
11
|
+
|
|
12
|
+
const Summary = props => {
|
|
13
|
+
const { classes: propClasses, onEdit } = props;
|
|
14
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
15
|
+
|
|
16
|
+
const talonProps = useSummary();
|
|
17
|
+
|
|
18
|
+
const { isLoading, selectedPaymentMethod } = talonProps;
|
|
19
|
+
|
|
20
|
+
if (isLoading && !selectedPaymentMethod) {
|
|
21
|
+
return (
|
|
22
|
+
<LoadingIndicator classes={{ root: classes.loading }}>
|
|
23
|
+
<FormattedMessage
|
|
24
|
+
id={'checkoutPage.loadingPaymentInformation'}
|
|
25
|
+
defaultMessage={'Fetching Payment Information'}
|
|
26
|
+
/>
|
|
27
|
+
</LoadingIndicator>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const hasCustomSummaryComp = Object.keys(summaryPayments).includes(
|
|
32
|
+
selectedPaymentMethod.code
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
if (hasCustomSummaryComp) {
|
|
36
|
+
const SummaryPaymentMethodComponent =
|
|
37
|
+
summaryPayments[selectedPaymentMethod.code];
|
|
38
|
+
return <SummaryPaymentMethodComponent onEdit={onEdit} />;
|
|
39
|
+
} else {
|
|
40
|
+
return (
|
|
41
|
+
<div className={classes.root}>
|
|
42
|
+
<div className={classes.heading_container}>
|
|
43
|
+
<h5 className={classes.heading}>
|
|
44
|
+
<FormattedMessage
|
|
45
|
+
id={'checkoutPage.paymentInformation'}
|
|
46
|
+
defaultMessage={'Payment Information'}
|
|
47
|
+
/>
|
|
48
|
+
</h5>
|
|
49
|
+
</div>
|
|
50
|
+
<div className={classes.card_details_container}>
|
|
51
|
+
<span className={classes.payment_details}>
|
|
52
|
+
{selectedPaymentMethod.title}
|
|
53
|
+
</span>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default Summary;
|
|
61
|
+
|
|
62
|
+
Summary.propTypes = {
|
|
63
|
+
classes: shape({
|
|
64
|
+
root: string,
|
|
65
|
+
heading_container: string,
|
|
66
|
+
heading: string,
|
|
67
|
+
card_details_container: string,
|
|
68
|
+
payment_details: string
|
|
69
|
+
}),
|
|
70
|
+
onEdit: func.isRequired
|
|
71
|
+
};
|
package/src/overwrites/venia-ui/lib/components/CheckoutPage/PaymentInformation/summary.module.css
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: gap-xs from global;
|
|
3
|
+
composes: grid from global;
|
|
4
|
+
composes: p-md from global;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.heading_container {
|
|
8
|
+
composes: grid from global;
|
|
9
|
+
composes: grid-cols-1 from global;
|
|
10
|
+
composes: grid-flow-col from global;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.heading {
|
|
14
|
+
composes: font-semibold from global;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.card_details_container {
|
|
18
|
+
composes: gap-2xs from global;
|
|
19
|
+
composes: grid from global;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.payment_details {
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is augmented at build time using the @magento/venia-ui build
|
|
3
|
+
* target "summaryPagePaymentTypes", which allows third-party modules to
|
|
4
|
+
* add new payment component mappings for the checkout page.
|
|
5
|
+
*
|
|
6
|
+
* @see [Payment definition object]{@link PaymentDefinition}
|
|
7
|
+
*/
|
|
8
|
+
export default {};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A payment definition object that describes a payment infor what be show on summary page.
|
|
12
|
+
*
|
|
13
|
+
* @typedef {Object} PaymentDefinition
|
|
14
|
+
* @property {string} paymentCode is use to map your payment
|
|
15
|
+
* @property {string} importPath Resolvable path to the component the
|
|
16
|
+
* Route component will render
|
|
17
|
+
*
|
|
18
|
+
* @example <caption>A custom payment method</caption>
|
|
19
|
+
* const myCustomPayment = {
|
|
20
|
+
* paymentCode: 'cc',
|
|
21
|
+
* importPath: '@partner/module/path_to_your_component'
|
|
22
|
+
* }
|
|
23
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './priceAdjustments';
|
package/src/overwrites/venia-ui/lib/components/CheckoutPage/PriceAdjustments/priceAdjustments.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React, { Suspense } from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
|
+
import { func } from 'prop-types';
|
|
4
|
+
|
|
5
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
6
|
+
import LoadingIndicator from '@magento/venia-ui/lib/components/LoadingIndicator';
|
|
7
|
+
import { Accordion, Section } from '@magento/venia-ui/lib/components/Accordion';
|
|
8
|
+
import CouponCode from '@magento/venia-ui/lib/components/CartPage/PriceAdjustments/CouponCode';
|
|
9
|
+
import GiftCardSection from '@magento/venia-ui/lib/components/CartPage/PriceAdjustments/giftCardSection';
|
|
10
|
+
import GiftOptionsSection from '@magento/venia-ui/lib/components/CartPage/PriceAdjustments/giftOptionsSection';
|
|
11
|
+
|
|
12
|
+
import defaultClasses from './priceAdjustments.module.css';
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* PriceAdjustments component for the Checkout page.
|
|
17
|
+
|
|
18
|
+
* @param {Function} props.setPageIsUpdating callback that sets checkout page updating state
|
|
19
|
+
*/
|
|
20
|
+
const PriceAdjustments = props => {
|
|
21
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
22
|
+
|
|
23
|
+
const { setPageIsUpdating } = props;
|
|
24
|
+
const { formatMessage } = useIntl();
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div className={classes.root}>
|
|
28
|
+
<Accordion
|
|
29
|
+
canOpenMultiple={true}
|
|
30
|
+
classes={{
|
|
31
|
+
root: 'w-full'
|
|
32
|
+
}}
|
|
33
|
+
>
|
|
34
|
+
<Section
|
|
35
|
+
data-cy="PriceAdjustments-couponCodeSection"
|
|
36
|
+
id={'coupon_code'}
|
|
37
|
+
title={formatMessage({
|
|
38
|
+
id: 'checkoutPage.couponCode',
|
|
39
|
+
defaultMessage: 'Enter Coupon Code'
|
|
40
|
+
})}
|
|
41
|
+
classes={{
|
|
42
|
+
root: cn('border border-gray-100 rounded-md max-w-[400px] p-2.5'),
|
|
43
|
+
title: 'text-[16px] font-medium',
|
|
44
|
+
title_wrapper: 'gap-sm grid grid-cols-1 grid-flow-col h-[38px] items-center justify-items-start',
|
|
45
|
+
contents_container: 'p-0'
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
48
|
+
<Suspense fallback={<LoadingIndicator />}>
|
|
49
|
+
<CouponCode setIsCartUpdating={setPageIsUpdating} />
|
|
50
|
+
</Suspense>
|
|
51
|
+
</Section>
|
|
52
|
+
<GiftCardSection setIsCartUpdating={setPageIsUpdating} />
|
|
53
|
+
<GiftOptionsSection />
|
|
54
|
+
</Accordion>
|
|
55
|
+
</div>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default PriceAdjustments;
|
|
60
|
+
|
|
61
|
+
PriceAdjustments.propTypes = {
|
|
62
|
+
setPageIsUpdating: func
|
|
63
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useUserContext } from '@magento/peregrine/lib/context/user';
|
|
3
|
+
|
|
4
|
+
import CustomerForm from './customerForm';
|
|
5
|
+
import GuestForm from './guestForm';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Simple component that acts like an AddressForm factory, giving the client
|
|
9
|
+
* the correct form to render based on the current signed in state.
|
|
10
|
+
*/
|
|
11
|
+
const AddressForm = props => {
|
|
12
|
+
const [{ isSignedIn }] = useUserContext();
|
|
13
|
+
const AddressForm = isSignedIn ? CustomerForm : GuestForm;
|
|
14
|
+
|
|
15
|
+
return <AddressForm {...props} />;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default AddressForm;
|