@evenicanpm/storefront-core 1.0.3 → 1.0.4
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/docs.tsconfig.json +35 -0
- package/package.json +6 -3
- package/src/api-manager/schemas/product.schema.ts +0 -1
- package/src/api-manager/services/create-query.ts +10 -0
- package/src/api-manager/services/product/queries/get-product-availability.ts +1 -1
- package/src/api-manager/services/user/mutations/add-to-wishlist.ts +23 -3
- package/src/api-manager/services/user/mutations/remove-from-wishlist.ts +23 -0
- package/src/cms/blocks/Components/CategoryCarousel/index.tsx +6 -7
- package/src/cms/blocks/Components/HeroCarousel/index.tsx +25 -19
- package/src/cms/blocks/Components/ProductCarousel/index.tsx +44 -38
- package/src/cms/blocks/Components/ProductSectionFullWidth/index.tsx +7 -3
- package/src/cms/blocks/Components/shared/product-grid.tsx +38 -23
- package/src/components/_components/wishlist/add-to-wishlist-dialog.tsx +1 -1
- package/src/components/_components/wishlist/remove-from-wishlist-dialog.tsx +1 -1
- package/src/components/_components/wishlist-modal/add-to-wishlist-dialog.tsx +1 -1
- package/src/components/_components/wishlist-modal/remove-from-wishlist-dialog.tsx +1 -1
- package/src/components-v2/carousel/carousel.tsx +69 -35
- package/src/components-v2/carousel/components/carousel-arrows.tsx +40 -46
- package/src/components-v2/carousel/components/carousel-dots.tsx +10 -13
- package/src/components-v2/carousel/index.ts +0 -2
- package/src/components-v2/carousel-cards/carousel-card-1/carousel-card-1.tsx +68 -49
- package/src/components-v2/categories/category-list/category-list.tsx +83 -41
- package/src/components-v2/categories/category-list/styles.ts +7 -1
- package/src/components-v2/categories/category-menu.tsx +2 -0
- package/src/components-v2/categories/mega-menu/banner.tsx +68 -37
- package/src/components-v2/categories/mega-menu/column-list.tsx +59 -52
- package/src/components-v2/categories/mega-menu/mega-menu-1.tsx +19 -1
- package/src/components-v2/categories/mega-menu/mega-menu-2.tsx +32 -2
- package/src/components-v2/header/components/mobile-header.tsx +119 -46
- package/src/components-v2/header/components/user.tsx +163 -117
- package/src/components-v2/header/header.tsx +62 -42
- package/src/components-v2/header/sticky-header.tsx +34 -2
- package/src/components-v2/mini-cart/components/bottom-actions.tsx +71 -17
- package/src/components-v2/mini-cart/components/cart-item.tsx +159 -101
- package/src/components-v2/mini-cart/components/empty-view.tsx +59 -19
- package/src/components-v2/mini-cart/components/top-header.tsx +61 -22
- package/src/components-v2/mini-cart/mini-cart-trigger.tsx +99 -0
- package/src/components-v2/mini-cart/mini-cart.tsx +111 -43
- package/src/components-v2/mobile-navigation/mobile-navigation-bar.tsx +93 -48
- package/src/components-v2/navbar/categories.tsx +70 -16
- package/src/components-v2/navbar/category-based-menu/category-based-menu.tsx +135 -41
- package/src/components-v2/navbar/mega-menu/mega-menu.tsx +115 -48
- package/src/components-v2/navbar/mobile-menu/mobile-menu.test.tsx +111 -0
- package/src/components-v2/navbar/mobile-menu/mobile-menu.tsx +127 -56
- package/src/components-v2/navbar/nav-list/nav-list.tsx +125 -103
- package/src/components-v2/navbar/navbar.tsx +72 -20
- package/src/components-v2/product-cards/{product-card-1 → product-card}/components/quantity-buttons.tsx +1 -1
- package/src/components-v2/product-cards/product-card/product-card.tsx +410 -0
- package/src/components-v2/product-cards/{product-card-1 → product-card}/styles/index.ts +6 -0
- package/src/components-v2/product-cards/product-card-plp/product-card.tsx +161 -0
- package/src/components-v2/product-cards/product-card-plp-list/index.ts +1 -0
- package/src/components-v2/product-cards/product-card-plp-list/product-card.tsx +219 -0
- package/src/components-v2/product-cards/product-card-search/product-card.tsx +166 -0
- package/src/components-v2/product-dialog/compound/product-dialog.tsx +225 -0
- package/src/components-v2/product-dialog/index.tsx +29 -0
- package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-error.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-label.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-list-chip.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions-group-list.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions-group.tsx +1 -1
- package/src/components-v2/product-dimensions/{components → compound}/dimensions.tsx +0 -3
- package/src/components-v2/product-dimensions/index.tsx +1 -1
- package/src/components-v2/product-quantity-buttons/compound/quantity-buttons-root.tsx +181 -0
- package/src/components-v2/product-quantity-buttons/index.tsx +22 -0
- package/src/components-v2/product-quantity-variants/index.tsx +90 -0
- package/src/components-v2/products-view/compound/context.ts +25 -0
- package/src/components-v2/products-view/compound/products-grid-view.tsx +109 -0
- package/src/components-v2/products-view/compound/products-list-view.tsx +98 -0
- package/src/components-v2/products-view/compound/types.ts +12 -0
- package/src/components-v2/products-view/index.tsx +45 -0
- package/src/components-v2/products-view/products-grid-view.tsx +24 -11
- package/src/components-v2/products-view/products-list-view.tsx +29 -12
- package/src/components-v2/search-bar/compound/context.ts +31 -0
- package/src/components-v2/search-bar/compound/results-item-lg.tsx +43 -0
- package/src/components-v2/search-bar/compound/results-item-sm.tsx +48 -0
- package/src/components-v2/search-bar/compound/results-suspense.tsx +49 -0
- package/src/components-v2/search-bar/compound/results.tsx +42 -0
- package/src/components-v2/search-bar/compound/search-bar-root.tsx +64 -0
- package/src/components-v2/search-bar/compound/textfield-adornment-button.tsx +22 -0
- package/src/components-v2/{search-box/components/category-dropdown.tsx → search-bar/compound/textfield-adornment-category.tsx} +29 -7
- package/src/components-v2/search-bar/compound/textfield-adornment-search-icon.tsx +34 -0
- package/src/components-v2/search-bar/compound/textfield.tsx +58 -0
- package/src/components-v2/search-bar/hooks/use-click-outside.ts +20 -0
- package/src/components-v2/search-bar/hooks/use-search.ts +63 -0
- package/src/components-v2/search-bar/index.tsx +36 -0
- package/src/components-v2/{search-box → search-bar}/styles/index.ts +5 -3
- package/src/components-v2/search-bar/utils/findCategoryNameById.ts +18 -0
- package/src/components-v2/section/compound/section-header.tsx +63 -0
- package/src/components-v2/section/compound/section.tsx +26 -0
- package/src/components-v2/section/index.ts +1 -0
- package/src/components-v2/side-nav/side-nav.tsx +4 -5
- package/src/components-v2/sticky/index.ts +1 -1
- package/src/components-v2/{wishlist-modal → wishlist-dialogs/add-to-wishlist}/add-to-wishlist-button.tsx +1 -1
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-bottom-ui.tsx +35 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-dialog.tsx +79 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/add-to-wishlist-list.tsx +41 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/context.ts +29 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/wishlist-dialog-header.tsx +74 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/compound/wishlist-dialog-item.tsx +82 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/hooks/use-add-to-wishlist.ts +152 -0
- package/src/components-v2/wishlist-dialogs/add-to-wishlist/index.tsx +39 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/compound/context.ts +2 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-bottom-ui.tsx +42 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-dialog.tsx +92 -0
- package/src/components-v2/wishlist-dialogs/create-wishlist/compound/create-wishlist-form.tsx +96 -0
- package/src/components-v2/{wishlist/components → wishlist-dialogs/create-wishlist}/create-wishlist-button.tsx +5 -3
- package/src/components-v2/wishlist-dialogs/create-wishlist/index.tsx +22 -0
- package/src/hooks/use-cart.ts +29 -23
- package/src/hooks/use-variants.ts +106 -53
- package/src/lib/build-detail-url.ts +2 -1
- package/src/pages/product-details/product-intro/product-intro.tsx +26 -23
- package/src/pages/product-list/quick-view-dialog-content.tsx +18 -9
- package/src/pages-v2/product-details/bopis/find-in-store-button.tsx +9 -8
- package/src/pages-v2/product-details/bopis/find-in-store-modal.tsx +2 -2
- package/src/{components-v2/shop-card → pages-v2/product-details/bopis/store-card}/shop-card.tsx +17 -48
- package/src/pages-v2/product-details/bopis/store-card/utils/convertSecondsToTime.ts +8 -0
- package/src/pages-v2/product-details/bopis/store-card/utils/getDaysResources.ts +25 -0
- package/src/pages-v2/product-details/product-intro/compound/context.ts +52 -0
- package/src/pages-v2/product-details/product-intro/compound/product-info.tsx +231 -0
- package/src/pages-v2/product-details/product-intro/compound/product-intro-images.tsx +124 -0
- package/src/pages-v2/product-details/product-intro/compound/product-intro.tsx +49 -0
- package/src/pages-v2/product-details/product-intro/compound/thumbnail-with-skeleton.tsx +28 -0
- package/src/pages-v2/product-details/product-intro/utils.ts +42 -0
- package/src/pages-v2/product-details/product-tabs.tsx +87 -21
- package/src/pages-v2/product-details/related-products.tsx +26 -12
- package/src/pages-v2/product-list/quick-view-dialog-content.tsx +17 -10
- package/typedoc.js +3 -1
- package/src/components-v2/MiniCartClient.tsx +0 -65
- package/src/components-v2/carousel-cards/carousel-card-2/carousel-card-2.tsx +0 -78
- package/src/components-v2/carousel-cards/carousel-card-2/index.ts +0 -1
- package/src/components-v2/carousel-cards/carousel-card-2/styles.ts +0 -26
- package/src/components-v2/carousel-cards/carousel-card-3/carousel-card-3.tsx +0 -37
- package/src/components-v2/carousel-cards/carousel-card-3/index.ts +0 -1
- package/src/components-v2/carousel-cards/carousel-card-3/styles.ts +0 -28
- package/src/components-v2/carousel-cards/carousel-card-4/carousel-card-4.tsx +0 -81
- package/src/components-v2/carousel-cards/carousel-card-4/index.ts +0 -1
- package/src/components-v2/carousel-cards/carousel-card-4/styles.ts +0 -27
- package/src/components-v2/category-cards/category-card-1/category-card-1.tsx +0 -21
- package/src/components-v2/category-cards/category-card-1/index.ts +0 -1
- package/src/components-v2/category-cards/category-card-1/styles.ts +0 -37
- package/src/components-v2/countdown/count-box.tsx +0 -19
- package/src/components-v2/countdown/count-down.tsx +0 -24
- package/src/components-v2/countdown/index.tsx +0 -2
- package/src/components-v2/countdown/useCountDown.ts +0 -41
- package/src/components-v2/data-table/index.ts +0 -2
- package/src/components-v2/data-table/table-header.tsx +0 -91
- package/src/components-v2/data-table/table-pagination.tsx +0 -36
- package/src/components-v2/footer/components/about-links.tsx +0 -23
- package/src/components-v2/footer/components/app-store.tsx +0 -38
- package/src/components-v2/footer/components/customer-care-links.tsx +0 -21
- package/src/components-v2/footer/components/logo.tsx +0 -23
- package/src/components-v2/footer/components/social-links.tsx +0 -43
- package/src/components-v2/footer/data/index.ts +0 -54
- package/src/components-v2/footer/footer-1.tsx +0 -62
- package/src/components-v2/footer/footer-2.tsx +0 -57
- package/src/components-v2/footer/footer-3.tsx +0 -53
- package/src/components-v2/footer/footer-4.tsx +0 -71
- package/src/components-v2/footer/index.ts +0 -4
- package/src/components-v2/footer/styles/index.ts +0 -42
- package/src/components-v2/navbar/category-based-menu/components/categories.tsx +0 -44
- package/src/components-v2/navbar/category-based-menu/components/category-item.tsx +0 -31
- package/src/components-v2/navbar/category-based-menu/components/child-categories.tsx +0 -38
- package/src/components-v2/navbar/mega-menu/category-list.tsx +0 -29
- package/src/components-v2/navbar/mobile-menu/render-levels.test.tsx +0 -71
- package/src/components-v2/navbar/mobile-menu/render-levels.tsx +0 -62
- package/src/components-v2/newsletter/index.ts +0 -1
- package/src/components-v2/newsletter/newsletter.tsx +0 -112
- package/src/components-v2/newsletter/social-icons.tsx +0 -35
- package/src/components-v2/newsletter/styles.ts +0 -65
- package/src/components-v2/page-sidenav/grocery-side-nav/components/link-item.tsx +0 -21
- package/src/components-v2/page-sidenav/grocery-side-nav/components/list-item.tsx +0 -27
- package/src/components-v2/page-sidenav/grocery-side-nav/components/nav-accordion.tsx +0 -36
- package/src/components-v2/page-sidenav/grocery-side-nav/components/render-child.tsx +0 -26
- package/src/components-v2/page-sidenav/grocery-side-nav/grocery-side-nav.tsx +0 -32
- package/src/components-v2/page-sidenav/grocery-side-nav/index.ts +0 -1
- package/src/components-v2/page-sidenav/grocery-side-nav/styles/index.ts +0 -11
- package/src/components-v2/page-sidenav/health-beauty-side-nav/components/list-item.tsx +0 -27
- package/src/components-v2/page-sidenav/health-beauty-side-nav/components/nav-accordion.tsx +0 -44
- package/src/components-v2/page-sidenav/health-beauty-side-nav/components/render-child.tsx +0 -20
- package/src/components-v2/page-sidenav/health-beauty-side-nav/health-beauty-side-nav.tsx +0 -43
- package/src/components-v2/page-sidenav/health-beauty-side-nav/index.ts +0 -1
- package/src/components-v2/page-sidenav/health-beauty-side-nav/styles/index.ts +0 -27
- package/src/components-v2/page-sidenav/side-navbar/components/list-item.tsx +0 -25
- package/src/components-v2/page-sidenav/side-navbar/components/nav-accordion.tsx +0 -46
- package/src/components-v2/page-sidenav/side-navbar/components/render-child.tsx +0 -20
- package/src/components-v2/page-sidenav/side-navbar/index.ts +0 -1
- package/src/components-v2/page-sidenav/side-navbar/side-nav-bar.tsx +0 -77
- package/src/components-v2/page-sidenav/side-navbar/styles/index.ts +0 -73
- package/src/components-v2/page-sidenav/side-navbar-2/components/button-content.tsx +0 -32
- package/src/components-v2/page-sidenav/side-navbar-2/components/sidebar-accordion.tsx +0 -66
- package/src/components-v2/page-sidenav/side-navbar-2/index.ts +0 -1
- package/src/components-v2/page-sidenav/side-navbar-2/side-navbar-2.tsx +0 -63
- package/src/components-v2/page-sidenav/side-navbar-2/styles/index.ts +0 -68
- package/src/components-v2/product-cards/product-card-1/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-1/product-card-1-wrapper.tsx +0 -304
- package/src/components-v2/product-cards/product-card-1/product-card.tsx +0 -107
- package/src/components-v2/product-cards/product-card-10/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-10/product-card.tsx +0 -128
- package/src/components-v2/product-cards/product-card-10/styles/index.ts +0 -38
- package/src/components-v2/product-cards/product-card-11/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-11/product-card.tsx +0 -66
- package/src/components-v2/product-cards/product-card-11/styles/index.ts +0 -16
- package/src/components-v2/product-cards/product-card-12/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-12/product-card.tsx +0 -42
- package/src/components-v2/product-cards/product-card-12/styles/index.ts +0 -16
- package/src/components-v2/product-cards/product-card-13/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-13/product-card.tsx +0 -48
- package/src/components-v2/product-cards/product-card-13/styles/index.ts +0 -25
- package/src/components-v2/product-cards/product-card-14/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-14/product-card.tsx +0 -125
- package/src/components-v2/product-cards/product-card-14/styles/index.ts +0 -40
- package/src/components-v2/product-cards/product-card-15/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-15/product-card.tsx +0 -121
- package/src/components-v2/product-cards/product-card-15/styles/index.ts +0 -57
- package/src/components-v2/product-cards/product-card-16/product-card.tsx +0 -116
- package/src/components-v2/product-cards/product-card-2/components/favorite-button.tsx +0 -29
- package/src/components-v2/product-cards/product-card-2/components/product-price.tsx +0 -26
- package/src/components-v2/product-cards/product-card-2/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-2/product-card.tsx +0 -70
- package/src/components-v2/product-cards/product-card-3/components/hover-actions.tsx +0 -83
- package/src/components-v2/product-cards/product-card-3/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-3/product-card.tsx +0 -110
- package/src/components-v2/product-cards/product-card-3/styles/index.ts +0 -89
- package/src/components-v2/product-cards/product-card-4/components/hover-actions.tsx +0 -50
- package/src/components-v2/product-cards/product-card-4/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-4/product-card.tsx +0 -128
- package/src/components-v2/product-cards/product-card-4/styles/index.ts +0 -66
- package/src/components-v2/product-cards/product-card-5/components/button-actions.tsx +0 -49
- package/src/components-v2/product-cards/product-card-5/components/hover-actions.tsx +0 -50
- package/src/components-v2/product-cards/product-card-5/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-5/product-card.tsx +0 -137
- package/src/components-v2/product-cards/product-card-5/styles/index.ts +0 -94
- package/src/components-v2/product-cards/product-card-6/components/hover-actions.tsx +0 -50
- package/src/components-v2/product-cards/product-card-6/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-6/product-card.tsx +0 -121
- package/src/components-v2/product-cards/product-card-6/styles/index.ts +0 -63
- package/src/components-v2/product-cards/product-card-7/components/product-status.tsx +0 -18
- package/src/components-v2/product-cards/product-card-7/components/quantity-buttons.tsx +0 -47
- package/src/components-v2/product-cards/product-card-7/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-7/product-card.tsx +0 -139
- package/src/components-v2/product-cards/product-card-7/styles/index.ts +0 -98
- package/src/components-v2/product-cards/product-card-8/product-card.tsx +0 -151
- package/src/components-v2/product-cards/product-card-9/index.ts +0 -1
- package/src/components-v2/product-cards/product-card-9/product-card.tsx +0 -169
- package/src/components-v2/product-cards/product-card-wishlist/components/hover-actions.tsx +0 -37
- package/src/components-v2/product-cards/product-card-wishlist/product-card.tsx +0 -118
- package/src/components-v2/product-cards/product-card-wishlist/styles/index.ts +0 -53
- package/src/components-v2/product-quantity-buttons/product-quantity-buttons.tsx +0 -88
- package/src/components-v2/products-view/product-view-dialog.tsx +0 -218
- package/src/components-v2/search-box/__test__/search-input-category.test.tsx +0 -110
- package/src/components-v2/search-box/__test__/search-input.test.tsx +0 -137
- package/src/components-v2/search-box/__test__/search-results.json +0 -165
- package/src/components-v2/search-box/components/search-result.tsx +0 -86
- package/src/components-v2/search-box/hooks/use-search.ts +0 -63
- package/src/components-v2/search-box/index.ts +0 -2
- package/src/components-v2/search-box/search-input-category.test.tsx +0 -110
- package/src/components-v2/search-box/search-input-category.tsx +0 -203
- package/src/components-v2/search-box/search-input.test.tsx +0 -41
- package/src/components-v2/search-box/search-input.tsx +0 -66
- package/src/components-v2/section-header/index.ts +0 -2
- package/src/components-v2/section-header/section-creator.tsx +0 -29
- package/src/components-v2/section-header/section-header.tsx +0 -44
- package/src/components-v2/service-cards/icon-component.tsx +0 -18
- package/src/components-v2/service-cards/service-card-1/index.ts +0 -1
- package/src/components-v2/service-cards/service-card-1/service-card-1.tsx +0 -42
- package/src/components-v2/service-cards/service-card-2/index.ts +0 -1
- package/src/components-v2/service-cards/service-card-2/service-card-2.tsx +0 -37
- package/src/components-v2/service-cards/service-card-3/index.ts +0 -1
- package/src/components-v2/service-cards/service-card-3/service-card-3.tsx +0 -28
- package/src/components-v2/service-cards/service-card-3/styles.ts +0 -23
- package/src/components-v2/settings/index.ts +0 -1
- package/src/components-v2/settings/setting.tsx +0 -141
- package/src/components-v2/settings/styles.ts +0 -57
- package/src/components-v2/sticky-wrapper/index.ts +0 -1
- package/src/components-v2/sticky-wrapper/sticky-wrapper.tsx +0 -21
- package/src/components-v2/sticky-wrapper/styles.ts +0 -25
- package/src/components-v2/stories/story-content/index.ts +0 -1
- package/src/components-v2/stories/story-content/story-content.tsx +0 -28
- package/src/components-v2/stories/story-content/styles.ts +0 -22
- package/src/components-v2/stories/story-item/index.ts +0 -1
- package/src/components-v2/stories/story-item/story-item.tsx +0 -24
- package/src/components-v2/stories/story-item/styles.ts +0 -11
- package/src/components-v2/stories/story-viewer/index.ts +0 -1
- package/src/components-v2/stories/story-viewer/story-viewer.tsx +0 -44
- package/src/components-v2/stories/story-viewer/styles.ts +0 -15
- package/src/components-v2/subscribe-input/index.ts +0 -1
- package/src/components-v2/subscribe-input/styles.ts +0 -14
- package/src/components-v2/subscribe-input/subscribe-input.tsx +0 -43
- package/src/components-v2/topbar/index.ts +0 -1
- package/src/components-v2/topbar/styles.ts +0 -55
- package/src/components-v2/topbar/top-bar.tsx +0 -115
- package/src/components-v2/wishlist/add-to-wishlist-dialog.tsx +0 -161
- package/src/components-v2/wishlist/components/create-new-list.tsx +0 -167
- package/src/components-v2/wishlist/components/dashboard-header.tsx +0 -123
- package/src/components-v2/wishlist/components/navigation.tsx +0 -87
- package/src/components-v2/wishlist/components/no-records.tsx +0 -20
- package/src/components-v2/wishlist/components/wishlist-modal-item.tsx +0 -66
- package/src/components-v2/wishlist/remove-from-wishlist-dialog.tsx +0 -175
- package/src/components-v2/wishlist-modal/TODO.md +0 -10
- package/src/components-v2/wishlist-modal/add-to-wishlist-dialog.tsx +0 -161
- package/src/components-v2/wishlist-modal/remove-from-wishlist-dialog.tsx +0 -174
- package/src/components-v2/wishlist-modal/wishlist-modal-item.tsx +0 -65
- package/src/pages-v2/product-details/product-intro/product-intro-images.tsx +0 -90
- package/src/pages-v2/product-details/product-intro/product-intro.tsx +0 -256
- /package/src/{pages-v2/account → components-v2}/no-records.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-1 → product-card}/components/hover-actions.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-16 → product-card}/index.ts +0 -0
- /package/src/components-v2/product-cards/{product-card-16 → product-card-plp}/components/quantity-buttons.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-wishlist → product-card-plp}/index.ts +0 -0
- /package/src/components-v2/product-cards/{product-card-16 → product-card-plp}/styles/index.ts +0 -0
- /package/src/components-v2/product-cards/{product-card-9 → product-card-plp-list}/components/add-to-cart.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-9 → product-card-plp-list}/components/favorite-button.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-9 → product-card-plp-list}/components/tags.tsx +0 -0
- /package/src/components-v2/product-cards/{product-card-8 → product-card-search}/index.ts +0 -0
- /package/src/components-v2/product-cards/{product-card-8 → product-card-search}/styles/index.ts +0 -0
- /package/src/components-v2/sticky/{Sticky.tsx → sticky.tsx} +0 -0
- /package/src/components-v2/{wishlist → wishlist-dialogs}/styles.ts +0 -0
- /package/src/{components-v2/shop-card → pages-v2/product-details/bopis/store-card}/index.ts +0 -0
- /package/src/{components-v2/shop-card → pages-v2/product-details/bopis/store-card}/styles.ts +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES6",
|
|
4
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"sourceMap": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"moduleResolution": "node",
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"outDir": "./dist",
|
|
13
|
+
"jsx": "preserve",
|
|
14
|
+
"baseUrl": "./",
|
|
15
|
+
"paths": {
|
|
16
|
+
"@/lib/*": ["src/lib/*"],
|
|
17
|
+
"@/api-manager/*": ["src/api-manager/*"],
|
|
18
|
+
"@/auth/*": ["src/auth/*"],
|
|
19
|
+
"@/_components/*": ["src/components/_components/*"],
|
|
20
|
+
"@/components/*": ["src/components/*"],
|
|
21
|
+
"@/cms/*": ["src/cms/*"],
|
|
22
|
+
"@/schemas/*": ["src/api-manager/schemas/*"],
|
|
23
|
+
"@/services/*": ["src/api-manager/services/*"],
|
|
24
|
+
"@/hooks/*": ["src/hooks/*"],
|
|
25
|
+
"@config": ["src/config"]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"include": [
|
|
29
|
+
"src/components-v2/product-dimensions",
|
|
30
|
+
"src/components-v2/product-quantity-buttons",
|
|
31
|
+
"src/components-v2/products-view",
|
|
32
|
+
"src/components-v2/search-bar",
|
|
33
|
+
"src/components-v2/section"
|
|
34
|
+
]
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evenicanpm/storefront-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Core module for D365/e4 Headless Storefront",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"docs": "typedoc"
|
|
7
8
|
},
|
|
8
9
|
"exports": {
|
|
9
10
|
".": "./index.js",
|
|
@@ -31,7 +32,9 @@
|
|
|
31
32
|
"@tanstack/react-query": "^5.76.1",
|
|
32
33
|
"next": "^15.2.1",
|
|
33
34
|
"next-auth": "^4.24.11",
|
|
35
|
+
"object-mapper": "^6.2.0",
|
|
34
36
|
"typescript": "^5.8.3",
|
|
35
|
-
"
|
|
37
|
+
"typedoc": "^0.28.9",
|
|
38
|
+
"typedoc-plugin-merge-module": "^7.0.0"
|
|
36
39
|
}
|
|
37
40
|
}
|
|
@@ -148,6 +148,15 @@ export const createQuery = <TInput, TOutput>(
|
|
|
148
148
|
return await queryClient.prefetchQuery(getQueryData(input));
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
+
/**
|
|
152
|
+
* Wrapper on getQueryData
|
|
153
|
+
* TODO: need to fix this naming so we're properly shadowing
|
|
154
|
+
* the names of tanstack-query
|
|
155
|
+
*/
|
|
156
|
+
const getData = async (queryClient: QueryClient): Promise<TOutput> => {
|
|
157
|
+
return await queryClient.getQueryData([config.queryKey]);
|
|
158
|
+
};
|
|
159
|
+
|
|
151
160
|
/**
|
|
152
161
|
*
|
|
153
162
|
* @param queryClient react-query client
|
|
@@ -246,6 +255,7 @@ export const createQuery = <TInput, TOutput>(
|
|
|
246
255
|
fetchData,
|
|
247
256
|
prefetchData,
|
|
248
257
|
buildCacheKey,
|
|
258
|
+
getData,
|
|
249
259
|
};
|
|
250
260
|
};
|
|
251
261
|
|
|
@@ -9,7 +9,7 @@ const getProductAvailability = createQuery<
|
|
|
9
9
|
ProductWarehouseInventoryInformation
|
|
10
10
|
>(apiPath, {
|
|
11
11
|
queryKey: "product-inventory",
|
|
12
|
-
disableProperties: ["
|
|
12
|
+
disableProperties: ["searchCriteria"],
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
export default getProductAvailability;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "@/api-manager/schemas/user.schema";
|
|
6
6
|
import { createApiPath } from "../../create-query";
|
|
7
7
|
import { useCreateMutation } from "../../create-mutation";
|
|
8
|
-
import { getWishlistsQueryKey } from "../queries/get-wishlists";
|
|
8
|
+
import getWishlists, { getWishlistsQueryKey } from "../queries/get-wishlists";
|
|
9
9
|
|
|
10
10
|
const apiPath = createApiPath("user", "addProductsToWishlist");
|
|
11
11
|
|
|
@@ -13,11 +13,31 @@ const useAddToWishlist = () => {
|
|
|
13
13
|
const queryClient = useQueryClient();
|
|
14
14
|
|
|
15
15
|
return useCreateMutation<WishlistLinesInput, Wishlist>(apiPath, {
|
|
16
|
-
onSuccess: (_data
|
|
16
|
+
onSuccess: (_data) => {
|
|
17
17
|
queryClient.invalidateQueries({
|
|
18
|
-
queryKey: [getWishlistsQueryKey
|
|
18
|
+
queryKey: [getWishlistsQueryKey],
|
|
19
19
|
});
|
|
20
20
|
},
|
|
21
|
+
onMutate: async (input) => {
|
|
22
|
+
// Based on Tanstack Optimistic Update Pattern
|
|
23
|
+
// https://tanstack.com/query/latest/docs/reference/QueryClient
|
|
24
|
+
await queryClient.cancelQueries({ queryKey: [getWishlistsQueryKey] });
|
|
25
|
+
const previousWishlists = await getWishlists.getData(queryClient);
|
|
26
|
+
const optimisticData = previousWishlists.map((list) => {
|
|
27
|
+
if (list.Id === input.Id) {
|
|
28
|
+
// Add the input product line to list
|
|
29
|
+
return {
|
|
30
|
+
...list,
|
|
31
|
+
ProductListLines: [
|
|
32
|
+
...list.ProductListLines,
|
|
33
|
+
{ ProductId: input.ProductListLines[0].ProductId },
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return list;
|
|
38
|
+
});
|
|
39
|
+
queryClient.setQueryData([getWishlistsQueryKey], optimisticData);
|
|
40
|
+
},
|
|
21
41
|
});
|
|
22
42
|
};
|
|
23
43
|
|
|
@@ -3,6 +3,7 @@ import { WishlistLinesInput } from "@/api-manager/schemas/user.schema";
|
|
|
3
3
|
import { createApiPath } from "../../create-query";
|
|
4
4
|
import { useCreateMutation } from "../../create-mutation";
|
|
5
5
|
import { getWishlistDetailsQueryKey } from "../queries/get-wishlist-details";
|
|
6
|
+
import getWishlists, { getWishlistsQueryKey } from "../queries/get-wishlists";
|
|
6
7
|
|
|
7
8
|
const apiPath = createApiPath("user", "removeProductsFromWishlist");
|
|
8
9
|
|
|
@@ -14,6 +15,28 @@ const useRemoveFromWishlist = () => {
|
|
|
14
15
|
queryClient.invalidateQueries({
|
|
15
16
|
queryKey: [getWishlistDetailsQueryKey, { Id: _variables.Id }],
|
|
16
17
|
});
|
|
18
|
+
queryClient.invalidateQueries({
|
|
19
|
+
queryKey: [getWishlistsQueryKey],
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
onMutate: async (input) => {
|
|
23
|
+
// Based on Tanstack Optimistic Update Pattern
|
|
24
|
+
// https://tanstack.com/query/latest/docs/reference/QueryClient
|
|
25
|
+
await queryClient.cancelQueries({ queryKey: [getWishlistsQueryKey] });
|
|
26
|
+
const previousWishlists = await getWishlists.getData(queryClient);
|
|
27
|
+
const optimisticData = previousWishlists.map((list) => {
|
|
28
|
+
if (list.Id === input.Id) {
|
|
29
|
+
// Remove the product line of our input id
|
|
30
|
+
return {
|
|
31
|
+
...list,
|
|
32
|
+
ProductListLines: list.ProductListLines.filter(
|
|
33
|
+
(item) => item.ProductId !== input.ProductListLines[0].ProductId,
|
|
34
|
+
),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
return list;
|
|
38
|
+
});
|
|
39
|
+
queryClient.setQueryData([getWishlistsQueryKey], optimisticData);
|
|
17
40
|
},
|
|
18
41
|
});
|
|
19
42
|
};
|
|
@@ -9,7 +9,7 @@ import CategoryIcon from "../../Icons/Components/Category";
|
|
|
9
9
|
// GLOBAL CUSTOM COMPONENT
|
|
10
10
|
import BazaarCard from "@evenicanpm/storefront-core/src/components-v2/BazaarCard";
|
|
11
11
|
import { Carousel } from "@evenicanpm/storefront-core/src/components-v2/carousel/index";
|
|
12
|
-
import {
|
|
12
|
+
import { Section } from "@evenicanpm/storefront-core/src/components-v2/section";
|
|
13
13
|
|
|
14
14
|
// LOCAL CUSTOM COMPONENT
|
|
15
15
|
import TopCategoriesCard from "../shared/top-categories-card";
|
|
@@ -25,11 +25,10 @@ export default function CategoryCarousel(data: CategoryCarouselBlock) {
|
|
|
25
25
|
|
|
26
26
|
// see more link should be updated to categories page when available
|
|
27
27
|
return (
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
>
|
|
28
|
+
<Section>
|
|
29
|
+
<Section.Header>
|
|
30
|
+
<Section.Header.Title title="Categories" icon={<CategoryIcon />} />
|
|
31
|
+
</Section.Header>
|
|
33
32
|
<Carousel
|
|
34
33
|
slidesToShow={3}
|
|
35
34
|
responsive={responsive}
|
|
@@ -55,6 +54,6 @@ export default function CategoryCarousel(data: CategoryCarouselBlock) {
|
|
|
55
54
|
);
|
|
56
55
|
})}
|
|
57
56
|
</Carousel>
|
|
58
|
-
</
|
|
57
|
+
</Section>
|
|
59
58
|
);
|
|
60
59
|
}
|
|
@@ -14,26 +14,32 @@ export default function HeroCarousel(data: HeroCarouselBlock) {
|
|
|
14
14
|
return (
|
|
15
15
|
<Box sx={{ backgroundColor: "white" }}>
|
|
16
16
|
<Container className="pt-2 pb-2">
|
|
17
|
-
<Carousel slidesToShow={1} arrows={false}
|
|
17
|
+
<Carousel slidesToShow={1} autoplay={true} arrows={false} dots={true}>
|
|
18
18
|
{data.Slides.map((data: Slide, ind: number) => (
|
|
19
|
-
<CarouselCard1
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
<CarouselCard1 key={ind}>
|
|
20
|
+
<CarouselCard1.Info>
|
|
21
|
+
<CarouselCard1.Title title={data?.heading} />
|
|
22
|
+
<CarouselCard1.Description description={data?.description} />
|
|
23
|
+
<CarouselCard1.Button
|
|
24
|
+
buttonLink={
|
|
25
|
+
data?.linkToPage?.slug
|
|
26
|
+
? `/pages/${data?.linkToPage?.slug}`
|
|
27
|
+
: data?.linkToProduct?.sku
|
|
28
|
+
? `/product/${data?.linkToProduct?.sku}`
|
|
29
|
+
: ""
|
|
30
|
+
}
|
|
31
|
+
buttonText={data?.buttonText}
|
|
32
|
+
/>
|
|
33
|
+
</CarouselCard1.Info>
|
|
34
|
+
|
|
35
|
+
<CarouselCard1.Image
|
|
36
|
+
imgUrl={
|
|
37
|
+
data?.image?.formats
|
|
38
|
+
? getImageUrl(data?.image?.formats)
|
|
39
|
+
: data?.image?.url
|
|
40
|
+
}
|
|
41
|
+
/>
|
|
42
|
+
</CarouselCard1>
|
|
37
43
|
))}
|
|
38
44
|
</Carousel>
|
|
39
45
|
</Container>
|
|
@@ -1,45 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
4
|
-
// ICONS
|
|
5
3
|
import { Light } from "../../Icons/index";
|
|
6
4
|
import { Box } from "@mui/system";
|
|
7
|
-
|
|
8
|
-
// GLOBAL COMPONENTS
|
|
9
5
|
import { Carousel } from "@evenicanpm/storefront-core/src/components-v2/carousel/index";
|
|
10
|
-
import {
|
|
11
|
-
import ProductCard1Wrapper from "@evenicanpm/storefront-core/src/components-v2/product-cards/product-card-1/product-card-1-wrapper";
|
|
6
|
+
import { Section } from "@evenicanpm/storefront-core/src/components-v2/section";
|
|
12
7
|
|
|
13
8
|
// CMS
|
|
9
|
+
import ProductCard from "@evenicanpm/storefront-core/src/components-v2/product-cards/product-card/product-card";
|
|
14
10
|
import { getImageUrl } from "@/cms/endpoints";
|
|
15
|
-
|
|
16
|
-
// API
|
|
17
11
|
import getProductByIds from "@/services/product/queries/get-product-by-ids";
|
|
18
|
-
import { getQueryClient } from "@/services/get-query-client";
|
|
19
12
|
import { SimpleProduct } from "@msdyn365-commerce/retail-proxy";
|
|
20
13
|
import { Product, ProductCarouselBlock } from "../../interfaces";
|
|
21
14
|
|
|
22
15
|
type CombinedProduct = Product & SimpleProduct;
|
|
23
16
|
|
|
24
|
-
export default
|
|
25
|
-
const
|
|
26
|
-
const e4Products = await getProductByIds.fetchData(queryClient, {
|
|
17
|
+
export default function ProductCarousel(data: ProductCarouselBlock) {
|
|
18
|
+
const { data: e4Products = [], error } = getProductByIds.useData({
|
|
27
19
|
id: data?.products?.map((product: Product) => product.sku),
|
|
28
20
|
});
|
|
29
21
|
|
|
30
|
-
if (
|
|
22
|
+
if (error || !e4Products.length) {
|
|
31
23
|
return null;
|
|
32
24
|
}
|
|
33
25
|
|
|
34
|
-
// join data
|
|
35
26
|
const combinedData: CombinedProduct[] = data?.products
|
|
36
27
|
?.map((product: Product) => {
|
|
37
28
|
const e4Product = e4Products?.find(
|
|
38
29
|
(e4Product: SimpleProduct) => product.sku === e4Product.ItemId,
|
|
39
30
|
);
|
|
40
|
-
|
|
41
31
|
if (!e4Product) return null;
|
|
42
|
-
|
|
43
32
|
return {
|
|
44
33
|
...e4Product,
|
|
45
34
|
...product,
|
|
@@ -57,26 +46,43 @@ export default async function ProductCarousel(data: ProductCarouselBlock) {
|
|
|
57
46
|
];
|
|
58
47
|
|
|
59
48
|
return (
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
49
|
+
<Section>
|
|
50
|
+
<Section.Header>
|
|
51
|
+
<Section.Header.Title
|
|
52
|
+
icon={<Light color="primary" />}
|
|
53
|
+
title={data?.heading}
|
|
54
|
+
/>
|
|
55
|
+
</Section.Header>
|
|
56
|
+
<Carousel responsive={responsive} height={445} autoplay={true}>
|
|
57
|
+
{combinedData?.map((item: CombinedProduct) => (
|
|
58
|
+
<Box pb={0.6} key={item.id}>
|
|
59
|
+
<ProductCard
|
|
60
|
+
product={{
|
|
61
|
+
id: item?.RecordId,
|
|
62
|
+
title: item?.Name ?? "",
|
|
63
|
+
price: item?.Price,
|
|
64
|
+
rating: 0,
|
|
65
|
+
imgUrl: getImageUrl(item?.image?.[0]?.formats ?? {}),
|
|
66
|
+
discount: 0,
|
|
67
|
+
slug: item?.ItemId ?? "",
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
<ProductCard.Image />
|
|
71
|
+
<ProductCard.Body>
|
|
72
|
+
<ProductCard.Info>
|
|
73
|
+
<ProductCard.Title />
|
|
74
|
+
<ProductCard.Rating />
|
|
75
|
+
<ProductCard.Price />
|
|
76
|
+
</ProductCard.Info>
|
|
77
|
+
<ProductCard.Actions>
|
|
78
|
+
<ProductCard.QuantityButtons />
|
|
79
|
+
<ProductCard.HoverActions />
|
|
80
|
+
</ProductCard.Actions>
|
|
81
|
+
</ProductCard.Body>
|
|
82
|
+
</ProductCard>
|
|
83
|
+
</Box>
|
|
84
|
+
))}
|
|
85
|
+
</Carousel>
|
|
86
|
+
</Section>
|
|
81
87
|
);
|
|
82
88
|
}
|
|
@@ -10,7 +10,7 @@ import Grid from "@mui/material/Grid2";
|
|
|
10
10
|
import HoverBox from "@evenicanpm/storefront-core/src/components-v2/HoverBox";
|
|
11
11
|
import { H4 } from "@evenicanpm/storefront-core/src/components-v2/Typography";
|
|
12
12
|
import BazaarCard from "@evenicanpm/storefront-core/src/components-v2/BazaarCard";
|
|
13
|
-
import {
|
|
13
|
+
import { Section } from "@evenicanpm/storefront-core/src/components-v2/section";
|
|
14
14
|
|
|
15
15
|
// Utils
|
|
16
16
|
import { currency } from "@/lib/lib";
|
|
@@ -59,7 +59,11 @@ export default async function ProductSectionFullWidth(
|
|
|
59
59
|
const Icon = getIcon(data?.icon);
|
|
60
60
|
|
|
61
61
|
return (
|
|
62
|
-
<
|
|
62
|
+
<Section>
|
|
63
|
+
<Section.Header>
|
|
64
|
+
<Section.Header.Title title={data.heading} icon={<Icon />} />
|
|
65
|
+
<Section.Header.SeeMoreLink link="#" />
|
|
66
|
+
</Section.Header>
|
|
63
67
|
{/* seeMoreLink should be updated when general product page is built */}
|
|
64
68
|
<BazaarCard sx={{ padding: "20px" }}>
|
|
65
69
|
<Grid container spacing={3}>
|
|
@@ -98,6 +102,6 @@ export default async function ProductSectionFullWidth(
|
|
|
98
102
|
))}
|
|
99
103
|
</Grid>
|
|
100
104
|
</BazaarCard>
|
|
101
|
-
</
|
|
105
|
+
</Section>
|
|
102
106
|
);
|
|
103
107
|
}
|
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
import Box from "@mui/material/Box";
|
|
3
3
|
import Grid from "@mui/material/Grid2";
|
|
4
4
|
// GLOBAL CUSTOM COMPONENTS
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
5
|
+
import { Section } from "@evenicanpm/storefront-core/src/components-v2/section";
|
|
6
|
+
import ProductCard from "@evenicanpm/storefront-core/src/components-v2/product-cards/product-card/index";
|
|
7
7
|
// CUSTOM DATA MODEL
|
|
8
8
|
|
|
9
9
|
interface Product {
|
|
@@ -17,32 +17,47 @@ interface Product {
|
|
|
17
17
|
uom: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
// ==============================================================
|
|
21
20
|
type Props = { products: Product[]; heading: string };
|
|
22
|
-
// ==============================================================
|
|
23
21
|
|
|
24
22
|
export default function ProductGridList({ products, heading }: Props) {
|
|
25
23
|
return (
|
|
26
24
|
<Box flex="1 1 0">
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
25
|
+
<Section>
|
|
26
|
+
<Section.Header>
|
|
27
|
+
<Section.Header.Title title={heading} />
|
|
28
|
+
<Section.Header.SeeMoreLink link="#" />
|
|
29
|
+
</Section.Header>
|
|
30
|
+
<Grid container spacing={3}>
|
|
31
|
+
{products.map((item) => (
|
|
32
|
+
<Grid size={{ lg: 4, sm: 6, xs: 12 }} key={item.id}>
|
|
33
|
+
<ProductCard
|
|
34
|
+
product={{
|
|
35
|
+
id: item?.id,
|
|
36
|
+
title: item?.title ?? "",
|
|
37
|
+
price: item?.price,
|
|
38
|
+
rating: item.rating ?? 0,
|
|
39
|
+
imgUrl: item.thumbnail ?? "",
|
|
40
|
+
discount: item.discount ?? 0,
|
|
41
|
+
slug: item?.slug ?? "",
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
<ProductCard.Image />
|
|
45
|
+
<ProductCard.Body>
|
|
46
|
+
<ProductCard.Info>
|
|
47
|
+
<ProductCard.Title />
|
|
48
|
+
<ProductCard.Rating />
|
|
49
|
+
<ProductCard.Price />
|
|
50
|
+
</ProductCard.Info>
|
|
51
|
+
<ProductCard.Actions>
|
|
52
|
+
<ProductCard.QuantityButtons />
|
|
53
|
+
<ProductCard.HoverActions />
|
|
54
|
+
</ProductCard.Actions>
|
|
55
|
+
</ProductCard.Body>
|
|
56
|
+
</ProductCard>
|
|
57
|
+
</Grid>
|
|
58
|
+
))}
|
|
59
|
+
</Grid>
|
|
60
|
+
</Section>
|
|
46
61
|
</Box>
|
|
47
62
|
);
|
|
48
63
|
}
|
|
@@ -7,7 +7,7 @@ import { MdFavorite } from "react-icons/md";
|
|
|
7
7
|
import DashboardHeader from "./components/dashboard-header";
|
|
8
8
|
import CreateWishlistButton from "./components/create-wishlist-button";
|
|
9
9
|
import WishlistModalItem from "./components/wishlist-modal-item";
|
|
10
|
-
import NoRecords from "
|
|
10
|
+
import NoRecords from "@evenicanpm/storefront-core/src/components-v2/no-records";
|
|
11
11
|
// API
|
|
12
12
|
import {
|
|
13
13
|
CopyCartToWishlistInput,
|
|
@@ -6,7 +6,7 @@ import { MdFavorite } from "react-icons/md";
|
|
|
6
6
|
// Global Custom components
|
|
7
7
|
import DashboardHeader from "./components/dashboard-header";
|
|
8
8
|
import WishlistModalItem from "./components/wishlist-modal-item";
|
|
9
|
-
import NoRecords from "
|
|
9
|
+
import NoRecords from "@evenicanpm/storefront-core/src/components-v2/no-records";
|
|
10
10
|
// API
|
|
11
11
|
import getWishlists from "@/api-manager/services/user/queries/get-wishlists";
|
|
12
12
|
import {
|
|
@@ -7,7 +7,7 @@ import { MdFavorite } from "react-icons/md";
|
|
|
7
7
|
import DashboardHeader from "../../../pages/account/dashboard-header";
|
|
8
8
|
import CreateWishlistButton from "../../../pages/account/wishlist/create-wishlist-button";
|
|
9
9
|
import WishlistModalItem from "./wishlist-modal-item";
|
|
10
|
-
import NoRecords from "
|
|
10
|
+
import NoRecords from "@evenicanpm/storefront-core/src/components-v2/no-records";
|
|
11
11
|
// API
|
|
12
12
|
import {
|
|
13
13
|
CopyCartToWishlistInput,
|
|
@@ -6,7 +6,7 @@ import { MdFavorite } from "react-icons/md";
|
|
|
6
6
|
// Global Custom components
|
|
7
7
|
import DashboardHeader from "../../../pages/account/dashboard-header";
|
|
8
8
|
import WishlistModalItem from "./wishlist-modal-item";
|
|
9
|
-
import NoRecords from "
|
|
9
|
+
import NoRecords from "@evenicanpm/storefront-core/src/components-v2/no-records";
|
|
10
10
|
// API
|
|
11
11
|
import getWishlists from "@/api-manager/services/user/queries/get-wishlists";
|
|
12
12
|
import {
|