@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,324 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { arrayOf, number, shape, string } from 'prop-types';
|
|
3
|
+
import { ChevronDown, ChevronUp } from 'react-feather';
|
|
4
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
5
|
+
import Price from '@magento/venia-ui/lib/components/Price';
|
|
6
|
+
import { useOrderRow } from '@magento/peregrine/lib/talons/OrderHistoryPage/useOrderRow';
|
|
7
|
+
|
|
8
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
9
|
+
import Icon from '@magento/venia-ui/lib/components/Icon';
|
|
10
|
+
import CollapsedImageGallery from './collapsedImageGallery';
|
|
11
|
+
import OrderProgressBar from './orderProgressBar';
|
|
12
|
+
import OrderDetails from './OrderDetails';
|
|
13
|
+
import defaultClasses from './orderRow.module.css';
|
|
14
|
+
import cn from 'classnames';
|
|
15
|
+
import { Verify } from 'iconsax-react';
|
|
16
|
+
import PlaceholderImage from '@magento/venia-ui/lib/components/Image/placeholderImage';
|
|
17
|
+
|
|
18
|
+
const OrderRow = props => {
|
|
19
|
+
const { order } = props;
|
|
20
|
+
const { formatMessage } = useIntl();
|
|
21
|
+
const {
|
|
22
|
+
invoices,
|
|
23
|
+
items,
|
|
24
|
+
number: orderNumber,
|
|
25
|
+
order_date: orderDate,
|
|
26
|
+
shipments,
|
|
27
|
+
status,
|
|
28
|
+
total
|
|
29
|
+
} = order;
|
|
30
|
+
const { grand_total: grandTotal } = total;
|
|
31
|
+
const { currency, value: orderTotal } = grandTotal;
|
|
32
|
+
|
|
33
|
+
// Convert date to ISO-8601 format so Safari can also parse it
|
|
34
|
+
const isoFormattedDate = orderDate.replace(' ', 'T');
|
|
35
|
+
const formattedDate = new Date(isoFormattedDate).toLocaleDateString(
|
|
36
|
+
undefined,
|
|
37
|
+
{
|
|
38
|
+
year: 'numeric',
|
|
39
|
+
month: 'short',
|
|
40
|
+
day: 'numeric'
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const hasInvoice = !!invoices.length;
|
|
45
|
+
const hasShipment = !!shipments.length;
|
|
46
|
+
let derivedStatus;
|
|
47
|
+
if (status === 'Complete') {
|
|
48
|
+
derivedStatus = formatMessage({
|
|
49
|
+
id: 'orderRow.deliveredText',
|
|
50
|
+
defaultMessage: 'Delivered'
|
|
51
|
+
});
|
|
52
|
+
} else if (hasShipment) {
|
|
53
|
+
derivedStatus = formatMessage({
|
|
54
|
+
id: 'orderRow.shippedText',
|
|
55
|
+
defaultMessage: 'Shipped'
|
|
56
|
+
});
|
|
57
|
+
} else if (hasInvoice) {
|
|
58
|
+
derivedStatus = formatMessage({
|
|
59
|
+
id: 'orderRow.readyToShipText',
|
|
60
|
+
defaultMessage: 'Ready to ship'
|
|
61
|
+
});
|
|
62
|
+
} else {
|
|
63
|
+
derivedStatus = formatMessage({
|
|
64
|
+
id: 'orderRow.processingText',
|
|
65
|
+
defaultMessage: 'Processing'
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const talonProps = useOrderRow({ items });
|
|
70
|
+
const { loading, isOpen, handleContentToggle, imagesData } = talonProps;
|
|
71
|
+
|
|
72
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
73
|
+
|
|
74
|
+
const contentClass = isOpen ? classes.content : classes.content_collapsed;
|
|
75
|
+
|
|
76
|
+
const contentToggleIconSrc = isOpen ? ChevronUp : ChevronDown;
|
|
77
|
+
|
|
78
|
+
const contentToggleIcon = <Icon src={contentToggleIconSrc} size={24} />;
|
|
79
|
+
|
|
80
|
+
const collapsedImageGalleryElement = isOpen ? null : (
|
|
81
|
+
<CollapsedImageGallery items={imagesData} />
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
const orderDetails = loading ? null : (
|
|
85
|
+
<OrderDetails orderData={order} imagesData={imagesData} />
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
const orderTotalPrice =
|
|
89
|
+
currency && orderTotal !== null ? (
|
|
90
|
+
<Price currencyCode={currency} value={orderTotal} />
|
|
91
|
+
) : (
|
|
92
|
+
'-'
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
const badgeStatusStyle = () => {
|
|
96
|
+
return 'bg-[#F1EFF6] text-blue-700 text-[14px] font-semibold rounded-full px-[30px] py-[5px] border-none';
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const thumbnailProps = {
|
|
100
|
+
alt: items[0].product_name,
|
|
101
|
+
classes: { root: classes.thumbnail },
|
|
102
|
+
width: 50
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
return (
|
|
106
|
+
<li className={classes.root}>
|
|
107
|
+
<div className='flex flex-col md_flex-row justify-between mb-2.5'>
|
|
108
|
+
<div className='flex flex-col'>
|
|
109
|
+
<div className="flex gap-x-[15px] flex-row">
|
|
110
|
+
<span className="text-[14px] text-colorDefault">{formattedDate}</span>
|
|
111
|
+
<span className="text-gray-200 text-[14px]">{orderNumber}</span>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div className='flex flex-col'>
|
|
115
|
+
<div className='flex w-full justify-start mt-2.5 md_mt-0 md_justify-end'>
|
|
116
|
+
<span className={cn(classes.orderStatusBadge, badgeStatusStyle())}>
|
|
117
|
+
{derivedStatus}
|
|
118
|
+
</span>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
<div className='flex flex-col md_flex-row justify-between mb-2.5'>
|
|
123
|
+
<div className='flex flex-col'>
|
|
124
|
+
<div className='flex gap-x-[5px] mb-2.5'>
|
|
125
|
+
<Verify size={17} className='text-blue-700' variant="Bold" />
|
|
126
|
+
<span className='text-xs font-medium text-[rgba(25, 34, 42, 0.7)]'>
|
|
127
|
+
Gundam Info
|
|
128
|
+
</span>
|
|
129
|
+
</div>
|
|
130
|
+
<div className='flex flex-row'>
|
|
131
|
+
<div>
|
|
132
|
+
<PlaceholderImage {...thumbnailProps} />
|
|
133
|
+
</div>
|
|
134
|
+
<div className='flex flex-col max-w-[260px] gap-2.5'>
|
|
135
|
+
<div className={cn(classes.productName, 'text-[14] font-medium')}>
|
|
136
|
+
<span>
|
|
137
|
+
{items[0]?.product_name}
|
|
138
|
+
</span>
|
|
139
|
+
</div>
|
|
140
|
+
<div className="text-[14] text-gray-200">
|
|
141
|
+
<span>
|
|
142
|
+
{`${items[0]?.quantity_ordered}X`}
|
|
143
|
+
</span>
|
|
144
|
+
{' '}
|
|
145
|
+
<span>
|
|
146
|
+
<Price currencyCode={items[0]?.product_sale_price?.currency} value={items[0]?.product_sale_price?.value} />
|
|
147
|
+
</span>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
<div className='flex flex-col'>
|
|
153
|
+
<div className="md_px-10 py-3 md_border-l border-gray-100">
|
|
154
|
+
<span className="text-[14] text-gray-200 text-left md_text-center block mb-2">
|
|
155
|
+
<FormattedMessage
|
|
156
|
+
id={'orderRow.orderTotalText'}
|
|
157
|
+
defaultMessage={'Order Total'}
|
|
158
|
+
/>
|
|
159
|
+
</span>
|
|
160
|
+
<div className="text-lg font-semibold text-left md_text-center block">{orderTotalPrice}</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<div className='flex flex-row justify-end py-[5px]'>
|
|
165
|
+
<button
|
|
166
|
+
className={cn(classes.contentToggleContainer, '!p-0 !border-0')}
|
|
167
|
+
onClick={handleContentToggle}
|
|
168
|
+
type="button"
|
|
169
|
+
aria-expanded={isOpen}
|
|
170
|
+
>
|
|
171
|
+
{/* {contentToggleIcon} */}
|
|
172
|
+
<span className="text-[13px] font-medium text-blue-700 underline">
|
|
173
|
+
<FormattedMessage
|
|
174
|
+
id={'orderRow.ViewTransactionDetail'}
|
|
175
|
+
defaultMessage={'View Transaction Detail'}
|
|
176
|
+
/>
|
|
177
|
+
</span>
|
|
178
|
+
</button>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
{/* <div className={classes.orderDateContainer}>
|
|
182
|
+
<span className={classes.orderDateLabel}>
|
|
183
|
+
<FormattedMessage
|
|
184
|
+
id={'orderRow.orderDateText'}
|
|
185
|
+
defaultMessage={'Order Date'}
|
|
186
|
+
/>
|
|
187
|
+
</span>
|
|
188
|
+
<span className={classes.orderDate}>{formattedDate}</span>
|
|
189
|
+
</div> */}
|
|
190
|
+
{/* <div className={classes.orderItemsContainer}>
|
|
191
|
+
{collapsedImageGalleryElement}
|
|
192
|
+
</div> */}
|
|
193
|
+
{/* <div className={classes.orderStatusContainer}>
|
|
194
|
+
<span className={classes.orderStatusBadge}>
|
|
195
|
+
{derivedStatus}
|
|
196
|
+
</span>
|
|
197
|
+
<OrderProgressBar status={derivedStatus} />
|
|
198
|
+
</div> */}
|
|
199
|
+
<div className={cn(contentClass, '!py-4 mt-4')}>{orderDetails}</div>
|
|
200
|
+
</li>
|
|
201
|
+
);
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export default OrderRow;
|
|
205
|
+
|
|
206
|
+
OrderRow.propTypes = {
|
|
207
|
+
classes: shape({
|
|
208
|
+
root: string,
|
|
209
|
+
cell: string,
|
|
210
|
+
stackedCell: string,
|
|
211
|
+
label: string,
|
|
212
|
+
value: string,
|
|
213
|
+
orderNumberContainer: string,
|
|
214
|
+
orderDateContainer: string,
|
|
215
|
+
orderTotalContainer: string,
|
|
216
|
+
orderStatusContainer: string,
|
|
217
|
+
orderItemsContainer: string,
|
|
218
|
+
contentToggleContainer: string,
|
|
219
|
+
orderNumberLabel: string,
|
|
220
|
+
orderDateLabel: string,
|
|
221
|
+
orderTotalLabel: string,
|
|
222
|
+
orderNumber: string,
|
|
223
|
+
orderDate: string,
|
|
224
|
+
orderTotal: string,
|
|
225
|
+
orderStatusBadge: string,
|
|
226
|
+
content: string,
|
|
227
|
+
content_collapsed: string
|
|
228
|
+
}),
|
|
229
|
+
order: shape({
|
|
230
|
+
billing_address: shape({
|
|
231
|
+
city: string,
|
|
232
|
+
country_code: string,
|
|
233
|
+
firstname: string,
|
|
234
|
+
lastname: string,
|
|
235
|
+
postcode: string,
|
|
236
|
+
region_id: string,
|
|
237
|
+
street: arrayOf(string)
|
|
238
|
+
}),
|
|
239
|
+
items: arrayOf(
|
|
240
|
+
shape({
|
|
241
|
+
id: string,
|
|
242
|
+
product_name: string,
|
|
243
|
+
product_sale_price: shape({
|
|
244
|
+
currency: string,
|
|
245
|
+
value: number
|
|
246
|
+
}),
|
|
247
|
+
product_sku: string,
|
|
248
|
+
selected_options: arrayOf(
|
|
249
|
+
shape({
|
|
250
|
+
label: string,
|
|
251
|
+
value: string
|
|
252
|
+
})
|
|
253
|
+
),
|
|
254
|
+
quantity_ordered: number
|
|
255
|
+
})
|
|
256
|
+
),
|
|
257
|
+
invoices: arrayOf(
|
|
258
|
+
shape({
|
|
259
|
+
id: string
|
|
260
|
+
})
|
|
261
|
+
),
|
|
262
|
+
number: string,
|
|
263
|
+
order_date: string,
|
|
264
|
+
payment_methods: arrayOf(
|
|
265
|
+
shape({
|
|
266
|
+
type: string,
|
|
267
|
+
additional_data: arrayOf(
|
|
268
|
+
shape({
|
|
269
|
+
name: string,
|
|
270
|
+
value: string
|
|
271
|
+
})
|
|
272
|
+
)
|
|
273
|
+
})
|
|
274
|
+
),
|
|
275
|
+
shipping_address: shape({
|
|
276
|
+
city: string,
|
|
277
|
+
country_code: string,
|
|
278
|
+
firstname: string,
|
|
279
|
+
lastname: string,
|
|
280
|
+
postcode: string,
|
|
281
|
+
region_id: string,
|
|
282
|
+
street: arrayOf(string),
|
|
283
|
+
telephone: string
|
|
284
|
+
}),
|
|
285
|
+
shipping_method: string,
|
|
286
|
+
shipments: arrayOf(
|
|
287
|
+
shape({
|
|
288
|
+
id: string,
|
|
289
|
+
tracking: arrayOf(
|
|
290
|
+
shape({
|
|
291
|
+
number: string
|
|
292
|
+
})
|
|
293
|
+
)
|
|
294
|
+
})
|
|
295
|
+
),
|
|
296
|
+
status: string,
|
|
297
|
+
total: shape({
|
|
298
|
+
discounts: arrayOf(
|
|
299
|
+
shape({
|
|
300
|
+
amount: shape({
|
|
301
|
+
currency: string,
|
|
302
|
+
value: number
|
|
303
|
+
})
|
|
304
|
+
})
|
|
305
|
+
),
|
|
306
|
+
grand_total: shape({
|
|
307
|
+
currency: string,
|
|
308
|
+
value: number
|
|
309
|
+
}),
|
|
310
|
+
subtotal: shape({
|
|
311
|
+
currency: string,
|
|
312
|
+
value: number
|
|
313
|
+
}),
|
|
314
|
+
total_tax: shape({
|
|
315
|
+
currency: string,
|
|
316
|
+
value: number
|
|
317
|
+
}),
|
|
318
|
+
total_shipping: shape({
|
|
319
|
+
currency: string,
|
|
320
|
+
value: number
|
|
321
|
+
})
|
|
322
|
+
})
|
|
323
|
+
})
|
|
324
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: border from global;
|
|
3
|
+
composes: border-gray-100 from global;
|
|
4
|
+
/* composes: grid from global;
|
|
5
|
+
composes: grid-cols-2 from global; */
|
|
6
|
+
composes: rounded-md from global;
|
|
7
|
+
composes: p-[15px] from global;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (min-width: 960px) {
|
|
11
|
+
.root {
|
|
12
|
+
/* grid-template-columns:
|
|
13
|
+
minmax(9rem, 1fr) minmax(9rem, 1fr) minmax(9rem, 1fr) 16rem 2fr 3rem; */
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.orderNumberContainer {}
|
|
18
|
+
|
|
19
|
+
.orderDateContainer {
|
|
20
|
+
composes: gap-y-1 from global;
|
|
21
|
+
composes: grid from global;
|
|
22
|
+
composes: overflow-hidden from global;
|
|
23
|
+
composes: p-sm from global;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.orderTotalContainer {
|
|
27
|
+
composes: border-0 from global;
|
|
28
|
+
composes: border-b from global;
|
|
29
|
+
composes: border-l from global;
|
|
30
|
+
composes: border-solid from global;
|
|
31
|
+
composes: border-subtle from global;
|
|
32
|
+
composes: gap-y-1 from global;
|
|
33
|
+
composes: grid from global;
|
|
34
|
+
composes: overflow-hidden from global;
|
|
35
|
+
composes: p-sm from global;
|
|
36
|
+
|
|
37
|
+
composes: lg_border-b-0 from global;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.orderStatusContainer {
|
|
41
|
+
composes: border-0 from global;
|
|
42
|
+
composes: border-l-0 from global;
|
|
43
|
+
composes: border-solid from global;
|
|
44
|
+
composes: border-subtle from global;
|
|
45
|
+
composes: col-end-span2 from global;
|
|
46
|
+
composes: gap-y-1 from global;
|
|
47
|
+
composes: grid from global;
|
|
48
|
+
composes: overflow-hidden from global;
|
|
49
|
+
composes: p-sm from global;
|
|
50
|
+
|
|
51
|
+
composes: lg_border-b-0 from global;
|
|
52
|
+
composes: lg_border-l from global;
|
|
53
|
+
composes: lg_col-end-auto from global;
|
|
54
|
+
composes: lg_gap-y-3 from global;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.orderItemsContainer {
|
|
58
|
+
composes: border-0 from global;
|
|
59
|
+
composes: border-b from global;
|
|
60
|
+
composes: border-solid from global;
|
|
61
|
+
composes: border-subtle from global;
|
|
62
|
+
composes: col-end-span2 from global;
|
|
63
|
+
composes: overflow-hidden from global;
|
|
64
|
+
composes: p-0 from global;
|
|
65
|
+
composes: py-sm from global;
|
|
66
|
+
|
|
67
|
+
composes: lg_border-0 from global;
|
|
68
|
+
composes: lg_border-l from global;
|
|
69
|
+
composes: lg_col-end-auto from global;
|
|
70
|
+
composes: lg_p-0 from global;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.contentToggleContainer {
|
|
74
|
+
composes: border-0 from global;
|
|
75
|
+
composes: border-l from global;
|
|
76
|
+
composes: border-solid from global;
|
|
77
|
+
composes: border-subtle from global;
|
|
78
|
+
composes: col-start-2 from global;
|
|
79
|
+
composes: justify-self-end from global;
|
|
80
|
+
composes: overflow-hidden from global;
|
|
81
|
+
composes: px-xs from global;
|
|
82
|
+
composes: py-0 from global;
|
|
83
|
+
composes: row-start-1 from global;
|
|
84
|
+
|
|
85
|
+
composes: lg_border-l from global;
|
|
86
|
+
composes: lg_col-start-6 from global;
|
|
87
|
+
composes: lg_px-xs from global;
|
|
88
|
+
composes: lg_row-start-1 from global;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.orderNumberLabel,
|
|
92
|
+
.orderDateLabel,
|
|
93
|
+
.orderTotalLabel {
|
|
94
|
+
composes: text-2xs from global;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.orderNumber,
|
|
98
|
+
.orderDate,
|
|
99
|
+
.orderTotal {
|
|
100
|
+
composes: font-bold from global;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.orderStatusBadge {
|
|
104
|
+
composes: border from global;
|
|
105
|
+
composes: border-solid from global;
|
|
106
|
+
composes: border-subtle from global;
|
|
107
|
+
composes: font-bold from global;
|
|
108
|
+
composes: justify-self-start from global;
|
|
109
|
+
composes: px-xs from global;
|
|
110
|
+
composes: py-1 from global;
|
|
111
|
+
composes: rounded-md from global;
|
|
112
|
+
composes: text-2xs from global;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.content {
|
|
116
|
+
composes: border-t from global;
|
|
117
|
+
composes: border-solid from global;
|
|
118
|
+
composes: border-gray-100 from global;
|
|
119
|
+
/* composes: p-sm from global; */
|
|
120
|
+
grid-column: 1 / -1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.content_collapsed {
|
|
124
|
+
composes: hidden from global;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media (max-width: 959px) {
|
|
128
|
+
|
|
129
|
+
/* TODO @TW: cannot compose */
|
|
130
|
+
.orderItemsContainer:empty {
|
|
131
|
+
display: none;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.orderNumberContainer {
|
|
135
|
+
grid-column: 1 / span 2;
|
|
136
|
+
grid-row: 1;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.productName {
|
|
141
|
+
display: -webkit-box;
|
|
142
|
+
-webkit-line-clamp: 2;
|
|
143
|
+
-webkit-box-orient: vertical;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
line-height: normal;
|
|
146
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useFormApi } from 'informed';
|
|
3
|
+
import { useIntl } from 'react-intl';
|
|
4
|
+
import { func } from 'prop-types';
|
|
5
|
+
import { X as ClearIcon } from 'react-feather';
|
|
6
|
+
|
|
7
|
+
import Icon from '@magento/venia-ui/lib/components/Icon';
|
|
8
|
+
import Trigger from '@magento/venia-ui/lib/components/Trigger';
|
|
9
|
+
|
|
10
|
+
const clearIcon = <Icon src={ClearIcon} size={24} />;
|
|
11
|
+
|
|
12
|
+
const ResetButton = props => {
|
|
13
|
+
const { onReset } = props;
|
|
14
|
+
const formApi = useFormApi();
|
|
15
|
+
|
|
16
|
+
const handleReset = () => {
|
|
17
|
+
formApi.reset();
|
|
18
|
+
|
|
19
|
+
if (onReset) {
|
|
20
|
+
onReset();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const { formatMessage } = useIntl();
|
|
24
|
+
return (
|
|
25
|
+
<Trigger
|
|
26
|
+
action={handleReset}
|
|
27
|
+
addLabel={formatMessage({
|
|
28
|
+
id: 'global.clearText',
|
|
29
|
+
defaultMessage: 'Clear Text'
|
|
30
|
+
})}
|
|
31
|
+
>
|
|
32
|
+
{clearIcon}
|
|
33
|
+
</Trigger>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export default ResetButton;
|
|
38
|
+
|
|
39
|
+
ResetButton.propTypes = {
|
|
40
|
+
onReset: func
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './password';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { string, bool, shape, func } from 'prop-types';
|
|
3
|
+
import { Eye, EyeOff } from 'react-feather';
|
|
4
|
+
import { useIntl } from 'react-intl';
|
|
5
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
6
|
+
import { usePassword } from '@magento/peregrine/lib/talons/Password/usePassword';
|
|
7
|
+
|
|
8
|
+
import Button from '@magento/venia-ui/lib/components/Button';
|
|
9
|
+
import Field from '@magento/venia-ui/lib/components/Field';
|
|
10
|
+
import TextInput from '@magento/venia-ui/lib/components/TextInput';
|
|
11
|
+
import { isRequired } from '@magento/venia-ui/lib/util/formValidators';
|
|
12
|
+
|
|
13
|
+
import defaultClasses from './password.module.css';
|
|
14
|
+
|
|
15
|
+
const Password = props => {
|
|
16
|
+
const {
|
|
17
|
+
classes: propClasses,
|
|
18
|
+
label,
|
|
19
|
+
fieldName,
|
|
20
|
+
isToggleButtonHidden,
|
|
21
|
+
autoComplete,
|
|
22
|
+
validate,
|
|
23
|
+
...otherProps
|
|
24
|
+
} = props;
|
|
25
|
+
|
|
26
|
+
const talonProps = usePassword();
|
|
27
|
+
const { handleBlur, togglePasswordVisibility, visible } = talonProps;
|
|
28
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
29
|
+
|
|
30
|
+
const handleKeypress = e => {
|
|
31
|
+
if (e.code == 'Enter') {
|
|
32
|
+
togglePasswordVisibility;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const { formatMessage } = useIntl();
|
|
36
|
+
const hidePassword = formatMessage({
|
|
37
|
+
id: 'password.hide',
|
|
38
|
+
defaultMessage: 'Hide Password'
|
|
39
|
+
});
|
|
40
|
+
const viewPassword = formatMessage({
|
|
41
|
+
id: 'password.view',
|
|
42
|
+
defaultMessage: 'View Password'
|
|
43
|
+
});
|
|
44
|
+
const speak = visible ? hidePassword : viewPassword;
|
|
45
|
+
|
|
46
|
+
const passwordButton = (
|
|
47
|
+
<Button
|
|
48
|
+
className={classes.passwordButton}
|
|
49
|
+
onClick={togglePasswordVisibility}
|
|
50
|
+
onKeyDown={handleKeypress}
|
|
51
|
+
onKey
|
|
52
|
+
type="button"
|
|
53
|
+
>
|
|
54
|
+
{visible ? (
|
|
55
|
+
<Eye aria-label={speak} />
|
|
56
|
+
) : (
|
|
57
|
+
<EyeOff aria-label={speak} />
|
|
58
|
+
)}
|
|
59
|
+
</Button>
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
const fieldType = visible ? 'text' : 'password';
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<Field
|
|
66
|
+
id="Password"
|
|
67
|
+
label={label}
|
|
68
|
+
classes={{
|
|
69
|
+
root: classes.root,
|
|
70
|
+
label: "font-normal text-left mb-2 text-[14px] block"
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
<TextInput
|
|
74
|
+
after={!isToggleButtonHidden && passwordButton}
|
|
75
|
+
autoComplete={autoComplete}
|
|
76
|
+
field={fieldName}
|
|
77
|
+
type={fieldType}
|
|
78
|
+
validate={validate}
|
|
79
|
+
onBlur={handleBlur}
|
|
80
|
+
{...otherProps}
|
|
81
|
+
/>
|
|
82
|
+
</Field>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
Password.propTypes = {
|
|
87
|
+
autoComplete: string,
|
|
88
|
+
classes: shape({
|
|
89
|
+
root: string
|
|
90
|
+
}),
|
|
91
|
+
label: string,
|
|
92
|
+
fieldName: string,
|
|
93
|
+
isToggleButtonHidden: bool,
|
|
94
|
+
validate: func
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
Password.defaultProps = {
|
|
98
|
+
isToggleButtonHidden: true,
|
|
99
|
+
validate: isRequired
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export default Password;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.root:active {
|
|
2
|
+
--stroke: var(--venia-global-color-gray-700);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.passwordButton {
|
|
6
|
+
composes: root from '@magento/venia-ui/lib/components/Button/button.module.css';
|
|
7
|
+
|
|
8
|
+
--stroke: var(--venia-global-color-gray-500);
|
|
9
|
+
|
|
10
|
+
composes: bg-transparent from global;
|
|
11
|
+
composes: border-none from global;
|
|
12
|
+
composes: border-0 from global;
|
|
13
|
+
composes: min-w-0 from global;
|
|
14
|
+
composes: p-0 from global;
|
|
15
|
+
composes: rounded-none from global;
|
|
16
|
+
|
|
17
|
+
composes: focus_shadow-none from global;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.passwordButton:hover {
|
|
21
|
+
--stroke: var(--venia-global-color-gray-700);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.passwordButton:focus {
|
|
25
|
+
--stroke: var(--venia-global-color-gray-700);
|
|
26
|
+
}
|
|
@@ -71,6 +71,7 @@ const ProductFullDetail = props => {
|
|
|
71
71
|
wishlistButtonProps,
|
|
72
72
|
sellerDetails
|
|
73
73
|
} = talonProps;
|
|
74
|
+
console.log("🚀 ~ ProductFullDetail ~ talonProps:", talonProps)
|
|
74
75
|
|
|
75
76
|
const { formatMessage } = useIntl();
|
|
76
77
|
|
|
@@ -496,20 +497,34 @@ const ProductFullDetail = props => {
|
|
|
496
497
|
)}
|
|
497
498
|
>
|
|
498
499
|
<div className='flex flex-col gap-y-5 max-w-[448px]'>
|
|
499
|
-
<
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
500
|
+
<div className='flex flex-col gap-y-3'>
|
|
501
|
+
<p
|
|
502
|
+
data-cy="ProductFullDetail-productPrice"
|
|
503
|
+
className={cn(
|
|
504
|
+
classes.productPrice,
|
|
505
|
+
'text-[32px] font-semibold leading-[32px] mb-0',
|
|
506
|
+
)}
|
|
507
|
+
>
|
|
508
|
+
<Price
|
|
509
|
+
currencyCode={productDetails.price.currency}
|
|
510
|
+
value={productDetails.price.value}
|
|
511
|
+
/>
|
|
512
|
+
</p>
|
|
513
|
+
<p
|
|
514
|
+
data-cy="ProductFullDetail-productOldPrice"
|
|
515
|
+
className={cn(
|
|
516
|
+
classes.productPrice,
|
|
517
|
+
'text-lg font-normal leading-none text-gray-400 mb-0 line-through',
|
|
518
|
+
)}
|
|
519
|
+
>
|
|
520
|
+
<Price
|
|
521
|
+
currencyCode={productDetails.price.currency}
|
|
522
|
+
value={productDetails.price.value}
|
|
523
|
+
/>
|
|
524
|
+
</p>
|
|
525
|
+
</div>
|
|
526
|
+
<AuctionDetail className="auction_detail-container" />
|
|
527
|
+
<PreorderDetail className={'preorder_detail-container'} />
|
|
513
528
|
<small className='shipping-calculation-notes text-gray-200 text-xs'>
|
|
514
529
|
Shipping method is calculated on checkout
|
|
515
530
|
</small>
|