@riosst100/pwa-marketplace 1.4.6 → 1.4.8
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 +509 -509
- package/i18n/id_ID.json +29 -29
- package/package.json +1 -1
- package/src/componentOverrideMapping.js +3 -0
- package/src/components/BrandLandingPage/brandInfo.js +93 -0
- package/src/components/BrandLandingPage/brandLanding.js +255 -0
- package/src/components/BrandLandingPage/index.js +94 -0
- package/src/components/BrandLandingPage/menu.js +20 -0
- package/src/components/BrandListPage/banner_brands.png +0 -0
- package/src/components/BrandListPage/brandList.js +88 -0
- package/src/components/BrandListPage/index.js +57 -0
- package/src/components/BrandSlider/brandSlider.js +2 -2
- package/src/components/BrandSlider/item.js +24 -6
- package/src/components/CollectibleGameSets/collectibleGameSets.js +2 -1
- package/src/components/FilterTop/CustomFilters/customFilters.js +9 -7
- package/src/components/FilterTop/filterTop.js +2 -128
- package/src/components/Modal/index.js +10 -0
- package/src/components/Modal/modal.js +48 -0
- package/src/components/ProductLineSlider/index.js +1 -0
- package/src/components/ProductLineSlider/item.js +38 -0
- package/src/components/ProductLineSlider/logo_nendoroid.png +0 -0
- package/src/components/ProductLineSlider/nendroid-image.png +0 -0
- package/src/components/ProductLineSlider/productLineSlider.js +91 -0
- package/src/components/SocialMediaShare/index.js +51 -0
- package/src/components/SocialMediaShare/share.js +94 -0
- package/src/intercept.js +41 -27
- package/src/overwrites/venia-ui/lib/components/FilterModal/CurrentFilters/currentFilter.js +1 -1
- package/src/overwrites/venia-ui/lib/components/FilterModal/CurrentFilters/currentFilter.module.css +5 -4
- package/src/overwrites/venia-ui/lib/components/FilterModal/CurrentFilters/currentFilters.module.css +3 -1
- package/src/overwrites/venia-ui/lib/components/Footer/footer.js +147 -0
- package/src/overwrites/venia-ui/lib/components/Footer/footer.module.css +70 -0
- package/src/overwrites/venia-ui/lib/components/Footer/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/Footer/sampleData.js +48 -0
- package/src/overwrites/venia-ui/lib/components/Gallery/gallery.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/Main/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/Main/main.js +39 -0
- package/src/overwrites/venia-ui/lib/components/Main/main.module.css +41 -0
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenuColumn.js +14 -4
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenuColumn.module.css +2 -2
- package/src/overwrites/venia-ui/lib/components/Newsletter/index.js +1 -0
- package/src/overwrites/venia-ui/lib/components/Newsletter/newsletter.js +156 -0
- package/src/overwrites/venia-ui/lib/components/Newsletter/newsletter.module.css +90 -0
- package/src/overwrites/venia-ui/lib/components/Newsletter/newsletter.shimmer.js +46 -0
- package/src/overwrites/venia-ui/lib/components/Newsletter/newsletter.shimmer.module.css +21 -0
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +23 -12
- package/src/overwrites/venia-ui/lib/components/TextInput/textInput.js +9 -1
- package/src/theme/vars.js +2 -0
package/i18n/id_ID.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"About Us": "About Us",
|
|
3
|
-
"Account": "
|
|
3
|
+
"Account": "Account",
|
|
4
4
|
"accountChip.chipText": "Hi, {name}",
|
|
5
5
|
"accountInformationPage.accountInformation": "Account Information",
|
|
6
6
|
"accountInformationPage.editAccount": "Edit Account Information",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"accountMenu.signOutButtonText": "Sign Out",
|
|
16
16
|
"accountMenu.storeCreditLink": "Store Credit & Gift Cards",
|
|
17
17
|
"accountTrigger.ariaLabelMyMenu": "Toggle My Account Menu",
|
|
18
|
-
"accountTrigger.ariaLabelSignIn": "
|
|
19
|
-
"accountTrigger.buttonFallback": "
|
|
20
|
-
"accountTrigger.signIn": "
|
|
18
|
+
"accountTrigger.ariaLabelSignIn": "Sign In",
|
|
19
|
+
"accountTrigger.buttonFallback": "Sign In",
|
|
20
|
+
"accountTrigger.signIn": "Sign In",
|
|
21
21
|
"addressBook.addNewAddresstext": "Add New Address",
|
|
22
22
|
"addressBook.applyButtonText": "Apply",
|
|
23
23
|
"addressBook.cancelButtonText": "Cancel",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"field.optional": "Optional",
|
|
173
173
|
"filterFooter.results": "See Results",
|
|
174
174
|
"filterList.showMore": "Show More",
|
|
175
|
-
"filterList.viewAll": "
|
|
175
|
+
"filterList.viewAll": "View All",
|
|
176
176
|
"filterList.showLess": "Show Less",
|
|
177
177
|
"filterModal.action": "Clear all",
|
|
178
178
|
"filterModal.action.clearAll.ariaLabel": "Clear all applied filters",
|
|
@@ -277,15 +277,15 @@
|
|
|
277
277
|
"navHeader.accountText": "Account",
|
|
278
278
|
"navHeader.createAccountText": "Create Account",
|
|
279
279
|
"navHeader.forgotPasswordText": "Forgot Password",
|
|
280
|
-
"navHeader.mainMenuText": "Menu
|
|
280
|
+
"navHeader.mainMenuText": "Main Menu",
|
|
281
281
|
"navHeader.myAccountText": "My Account",
|
|
282
282
|
"navHeader.signInText": "Sign In",
|
|
283
283
|
"navigationTrigger.ariaLabel": "Toggle navigation panel",
|
|
284
284
|
"newsletter.subscribeMessage": "The email address is subscribed.",
|
|
285
285
|
"newsletter.loadingText": "Subscribing",
|
|
286
|
-
"newsletter.titleText": "Subscribe
|
|
286
|
+
"newsletter.titleText": "Subscribe",
|
|
287
287
|
"newsletter.subscribeText": "Subscribe",
|
|
288
|
-
"newsletter.infoText": "
|
|
288
|
+
"newsletter.infoText": "By subscribing you agree to receive email from us. Please read our Privacy Policy",
|
|
289
289
|
"noProductsFound.noProductsFound": "Sorry! We couldn't find any products.",
|
|
290
290
|
"noProductsFound.tryOneOfTheseCategories": "Try one of these categories",
|
|
291
291
|
"Order Status": "Order Status",
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
"shippingForm.getShippingOptions": "Get Shipping Options",
|
|
413
413
|
"shippingForm.loading": "Loading Methods...",
|
|
414
414
|
"shippingForm.zip": "Postal Code",
|
|
415
|
-
"shippingForm.shippingEmail":"Shipping Email",
|
|
415
|
+
"shippingForm.shippingEmail": "Shipping Email",
|
|
416
416
|
"shippingInformation.cardTitle": "Shipping Information",
|
|
417
417
|
"shippingInformation.editTitle": "1. Shipping Information",
|
|
418
418
|
"shippingInformation.loading": "Fetching Shipping Information...",
|
|
@@ -487,23 +487,23 @@
|
|
|
487
487
|
"wishlist.itemsMessage": "You have {count} items in your wishlist",
|
|
488
488
|
"wishlist.itemCountClosed": "You have {count} {count, plural, one {item} other {items}} in this list",
|
|
489
489
|
"wishlist.loadMore": "Load More",
|
|
490
|
-
"LegacyMiniCart.buttonExpanded":"More Options Expanded",
|
|
491
|
-
"LegacyMiniCart.buttonCollapsed":"More Options Collapsed",
|
|
492
|
-
"global.deletedButton":"Item Deleted",
|
|
493
|
-
"password.hide":"Hide Password",
|
|
494
|
-
"password.View":"View Password",
|
|
495
|
-
"global.clearText":"Clear Text",
|
|
496
|
-
"global.close":"Close",
|
|
497
|
-
"global.firstNameRequired":"First Name is required",
|
|
498
|
-
"global.lastNameRequired":"Last Name is required",
|
|
499
|
-
"global.emailRequired":"Email is required",
|
|
500
|
-
"global.passwordRequired":"Password is required",
|
|
501
|
-
"global.countryRequired":"Country is required",
|
|
502
|
-
"global.streetAddressRequired":"Address Line 1 is required",
|
|
503
|
-
"global.cityRequired":"City is required",
|
|
504
|
-
"global.stateRequired":"State / Province is required",
|
|
505
|
-
"Form.postalCode":"Postal Code is required",
|
|
506
|
-
"Form.phonenumber":"Contact Number is required",
|
|
507
|
-
"ProductOptions.productSize":"Fashion size {label}",
|
|
508
|
-
"productOptions.selectedSize":"Fashion size {label} button selected"
|
|
509
|
-
}
|
|
490
|
+
"LegacyMiniCart.buttonExpanded": "More Options Expanded",
|
|
491
|
+
"LegacyMiniCart.buttonCollapsed": "More Options Collapsed",
|
|
492
|
+
"global.deletedButton": "Item Deleted",
|
|
493
|
+
"password.hide": "Hide Password",
|
|
494
|
+
"password.View": "View Password",
|
|
495
|
+
"global.clearText": "Clear Text",
|
|
496
|
+
"global.close": "Close",
|
|
497
|
+
"global.firstNameRequired": "First Name is required",
|
|
498
|
+
"global.lastNameRequired": "Last Name is required",
|
|
499
|
+
"global.emailRequired": "Email is required",
|
|
500
|
+
"global.passwordRequired": "Password is required",
|
|
501
|
+
"global.countryRequired": "Country is required",
|
|
502
|
+
"global.streetAddressRequired": "Address Line 1 is required",
|
|
503
|
+
"global.cityRequired": "City is required",
|
|
504
|
+
"global.stateRequired": "State / Province is required",
|
|
505
|
+
"Form.postalCode": "Postal Code is required",
|
|
506
|
+
"Form.phonenumber": "Contact Number is required",
|
|
507
|
+
"ProductOptions.productSize": "Fashion size {label}",
|
|
508
|
+
"productOptions.selectedSize": "Fashion size {label} button selected"
|
|
509
|
+
}
|
package/package.json
CHANGED
|
@@ -41,4 +41,7 @@ module.exports = componentOverrideMapping = {
|
|
|
41
41
|
[`@magento/venia-ui/lib/components/RadioGroup/radio.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/RadioGroup/radio.js',
|
|
42
42
|
[`@magento/venia-ui/lib/components/Button/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Button/index.js',
|
|
43
43
|
[`@magento/venia-ui/lib/components/RichText/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/RichText/index.js',
|
|
44
|
+
[`@magento/venia-ui/lib/components/Main/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Main/index.js',
|
|
45
|
+
[`@magento/venia-ui/lib/components/Footer/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Footer/index.js',
|
|
46
|
+
[`@magento/venia-ui/lib/components/Newsletter/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Newsletter/index.js',
|
|
44
47
|
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Share } from 'iconsax-react';
|
|
4
|
+
import { X } from 'react-feather';
|
|
5
|
+
import Modal from '@riosst100/pwa-marketplace/src/components/Modal';
|
|
6
|
+
import SocialShare from '@riosst100/pwa-marketplace/src/components/SocialMediaShare';
|
|
7
|
+
import { primary900 } from '@riosst100/pwa-marketplace/src/theme/vars'
|
|
8
|
+
|
|
9
|
+
const brandInfo = () => {
|
|
10
|
+
|
|
11
|
+
const initialName = (name) => {
|
|
12
|
+
if (!name) return ""; // Handle empty names
|
|
13
|
+
|
|
14
|
+
const words = name.split(" ");
|
|
15
|
+
let initials = "";
|
|
16
|
+
|
|
17
|
+
for (const word of words) {
|
|
18
|
+
initials += word.charAt(0).toUpperCase();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return initials;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const [open, setOpen] = React.useState(false)
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
<Modal
|
|
29
|
+
open={open}
|
|
30
|
+
setOpen={setOpen}
|
|
31
|
+
className={cn(
|
|
32
|
+
'max-w-max !min-h-auto px-[30px] pt-[30px] pb-10',
|
|
33
|
+
)}
|
|
34
|
+
>
|
|
35
|
+
<div className='social_share-container flex flex-col gap-y-7'>
|
|
36
|
+
<div className='flex justify-between'>
|
|
37
|
+
<div className='text-lg font-semibold'>
|
|
38
|
+
Share to your friends
|
|
39
|
+
</div>
|
|
40
|
+
<button onClick={() => { setOpen(!open) }} >
|
|
41
|
+
<X size={24} color={primary900} />
|
|
42
|
+
</button>
|
|
43
|
+
</div>
|
|
44
|
+
<div className='flex flex-row border border-gray-100 rounded-md px-5 py-2.5 gap-x-2.5 items-center'>
|
|
45
|
+
<div
|
|
46
|
+
className={cn(
|
|
47
|
+
'bg-darkblue-900 text-white uppercase text-lg font-bold leading-5',
|
|
48
|
+
'p-2 rounded-md relative w-12 h-12 text-center flex items-center justify-center'
|
|
49
|
+
)}
|
|
50
|
+
>
|
|
51
|
+
{initialName('Bandai Namco')}
|
|
52
|
+
</div>
|
|
53
|
+
<div className='flex flex-col'>
|
|
54
|
+
<div className='text-[14px] font-normal'>
|
|
55
|
+
Bandai Namco.TCG
|
|
56
|
+
</div>
|
|
57
|
+
<div className='text-[12px] font-normal text-gray-200'>
|
|
58
|
+
bandainamco-tcg.link
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
<SocialShare rootClassName="justify-center" />
|
|
63
|
+
</div>
|
|
64
|
+
</Modal>
|
|
65
|
+
<div className='flex justify-between items-center border border-gray-100 p-5 rounded-md mt-[30px] mb-8'>
|
|
66
|
+
<div className='brand_name-wrapper flex gap-x-[15px] items-center'>
|
|
67
|
+
<div
|
|
68
|
+
className={cn(
|
|
69
|
+
'bg-darkblue-900 text-white uppercase text-lg font-bold leading-5',
|
|
70
|
+
'p-5 rounded-md relative w-[100px] h-[100px] text-center flex items-center justify-center'
|
|
71
|
+
)}
|
|
72
|
+
>
|
|
73
|
+
{initialName('Bandai Namco')}
|
|
74
|
+
</div>
|
|
75
|
+
<div className='text-lg font-semibold'>
|
|
76
|
+
Bandai Namco
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div
|
|
80
|
+
className='share-wrapper border border-blue-600 rounded-md p-2 group cursor-pointer'
|
|
81
|
+
onClick={() => { setOpen(!open) }}
|
|
82
|
+
>
|
|
83
|
+
<Share
|
|
84
|
+
size="15"
|
|
85
|
+
className='text-blue-600 group-hover_text-blue-800'
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export default brandInfo
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import React, { Fragment, Suspense, useMemo, useRef } from 'react';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { array, number, shape, string } from 'prop-types';
|
|
4
|
+
|
|
5
|
+
import { useIsInViewport } from '@magento/peregrine/lib/hooks/useIsInViewport';
|
|
6
|
+
import { useCategoryContent } from '@magento/peregrine/lib/talons/RootComponents/Category';
|
|
7
|
+
|
|
8
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
9
|
+
import Breadcrumbs from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Breadcrumbs';
|
|
10
|
+
import FilterModalOpenButton, {
|
|
11
|
+
FilterModalOpenButtonShimmer
|
|
12
|
+
} from '@magento/venia-ui/lib/components/FilterModalOpenButton';
|
|
13
|
+
import { FilterSidebarShimmer } from '@magento/venia-ui/lib/components/FilterSidebar';
|
|
14
|
+
import Gallery, { GalleryShimmer } from '@magento/venia-ui/lib/components/Gallery';
|
|
15
|
+
import { StoreTitle } from '@magento/venia-ui/lib/components/Head';
|
|
16
|
+
import Pagination from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Pagination';
|
|
17
|
+
import ProductSort, { ProductSortShimmer } from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/ProductSort';
|
|
18
|
+
import RichContent from '@magento/venia-ui/lib/components/RichContent';
|
|
19
|
+
import Shimmer from '@magento/venia-ui/lib/components/Shimmer';
|
|
20
|
+
import SortedByContainer, {
|
|
21
|
+
SortedByContainerShimmer
|
|
22
|
+
} from '@magento/venia-ui/lib/components/SortedByContainer';
|
|
23
|
+
import defaultClasses from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/Category/category.module.css';
|
|
24
|
+
import NoProductsFound from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/Category/NoProductsFound';
|
|
25
|
+
import cn from 'classnames';
|
|
26
|
+
import ProductListTab, { ProductListTabShimmer } from '@riosst100/pwa-marketplace/src/components/ProductListTab';
|
|
27
|
+
import SubCategory from '@riosst100/pwa-marketplace/src/components/SubCategory/subCategory';
|
|
28
|
+
import AttributesBlock from '@riosst100/pwa-marketplace/src/components/AttributesBlock/attributesBlock';
|
|
29
|
+
|
|
30
|
+
import ProductLineSlider from '@riosst100/pwa-marketplace/src/components/ProductLineSlider';
|
|
31
|
+
import BrandMenu from './menu';
|
|
32
|
+
import BrandInfo from './brandInfo';
|
|
33
|
+
|
|
34
|
+
const FilterModal = React.lazy(() => import('@magento/venia-ui/lib/components/FilterModal'));
|
|
35
|
+
const FilterSidebar = React.lazy(() =>
|
|
36
|
+
import('@magento/venia-ui/lib/components/FilterSidebar')
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const CategoryContent = props => {
|
|
40
|
+
const {
|
|
41
|
+
categoryId,
|
|
42
|
+
data,
|
|
43
|
+
isLoading,
|
|
44
|
+
pageControl,
|
|
45
|
+
sortProps,
|
|
46
|
+
pageSize
|
|
47
|
+
} = props;
|
|
48
|
+
const [currentSort] = sortProps;
|
|
49
|
+
|
|
50
|
+
const talonProps = useCategoryContent({
|
|
51
|
+
categoryId,
|
|
52
|
+
data,
|
|
53
|
+
pageSize
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const {
|
|
57
|
+
availableSortMethods,
|
|
58
|
+
categoryName,
|
|
59
|
+
categoryDescription,
|
|
60
|
+
filters,
|
|
61
|
+
items,
|
|
62
|
+
children,
|
|
63
|
+
totalCount,
|
|
64
|
+
totalPagesFromData,
|
|
65
|
+
attributesBlock,
|
|
66
|
+
category
|
|
67
|
+
} = talonProps;
|
|
68
|
+
|
|
69
|
+
const sidebarRef = useRef(null);
|
|
70
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
71
|
+
const shouldRenderSidebarContent = useIsInViewport({
|
|
72
|
+
elementRef: sidebarRef
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
const shouldShowFilterButtons = filters && filters.length;
|
|
76
|
+
const shouldShowFilterShimmer = filters === null;
|
|
77
|
+
|
|
78
|
+
// If there are no products we can hide the sort button.
|
|
79
|
+
const shouldShowSortButtons = totalPagesFromData && availableSortMethods;
|
|
80
|
+
const shouldShowSortShimmer = !totalPagesFromData && isLoading;
|
|
81
|
+
|
|
82
|
+
const maybeFilterButtons = shouldShowFilterButtons ? (
|
|
83
|
+
<FilterModalOpenButton filters={filters} />
|
|
84
|
+
) : shouldShowFilterShimmer ? (
|
|
85
|
+
<FilterModalOpenButtonShimmer />
|
|
86
|
+
) : null;
|
|
87
|
+
|
|
88
|
+
const filtersModal = shouldShowFilterButtons ? (
|
|
89
|
+
<FilterModal filters={filters} />
|
|
90
|
+
) : null;
|
|
91
|
+
|
|
92
|
+
const sidebar = shouldShowFilterButtons ? (
|
|
93
|
+
<FilterSidebar filters={filters} />
|
|
94
|
+
) : shouldShowFilterShimmer ? (
|
|
95
|
+
<FilterSidebarShimmer />
|
|
96
|
+
) : null;
|
|
97
|
+
|
|
98
|
+
const maybeSortButton = shouldShowSortButtons ? (
|
|
99
|
+
<ProductSort
|
|
100
|
+
sortProps={sortProps}
|
|
101
|
+
availableSortMethods={availableSortMethods}
|
|
102
|
+
/>
|
|
103
|
+
) : shouldShowSortShimmer ? (
|
|
104
|
+
<ProductSortShimmer />
|
|
105
|
+
) : null;
|
|
106
|
+
|
|
107
|
+
const shouldShowProductListTab = totalPagesFromData;
|
|
108
|
+
const shouldShowProductListTabShimmer = !totalPagesFromData && isLoading;
|
|
109
|
+
|
|
110
|
+
const maybeSortContainer = shouldShowSortButtons ? (
|
|
111
|
+
<SortedByContainer currentSort={currentSort} />
|
|
112
|
+
) : shouldShowSortShimmer ? (
|
|
113
|
+
<SortedByContainerShimmer />
|
|
114
|
+
) : null;
|
|
115
|
+
|
|
116
|
+
const maybeProductsTabContainer = shouldShowProductListTab ? (
|
|
117
|
+
<ProductListTab />
|
|
118
|
+
) : shouldShowProductListTabShimmer ? (
|
|
119
|
+
<ProductListTabShimmer />
|
|
120
|
+
) : null;
|
|
121
|
+
|
|
122
|
+
const categoryResultsHeading =
|
|
123
|
+
totalCount > 0 ? (
|
|
124
|
+
<FormattedMessage
|
|
125
|
+
id={'categoryContent.resultCount'}
|
|
126
|
+
values={{
|
|
127
|
+
count: totalCount
|
|
128
|
+
}}
|
|
129
|
+
defaultMessage={'{count} Results'}
|
|
130
|
+
/>
|
|
131
|
+
) : isLoading ? (
|
|
132
|
+
<Shimmer width={5} />
|
|
133
|
+
) : null;
|
|
134
|
+
|
|
135
|
+
const categoryDescriptionElement = categoryDescription ? (
|
|
136
|
+
<RichContent html={categoryDescription} />
|
|
137
|
+
) : null;
|
|
138
|
+
|
|
139
|
+
const content = useMemo(() => {
|
|
140
|
+
if (!totalPagesFromData && !isLoading) {
|
|
141
|
+
return <NoProductsFound categoryId={categoryId} />;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const gallery = totalPagesFromData ? (
|
|
145
|
+
<Gallery items={items} />
|
|
146
|
+
) : (
|
|
147
|
+
<GalleryShimmer items={items} />
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
const pagination = totalPagesFromData ? (
|
|
151
|
+
<Pagination pageControl={pageControl} />
|
|
152
|
+
) : null;
|
|
153
|
+
|
|
154
|
+
return (
|
|
155
|
+
<Fragment>
|
|
156
|
+
<section className={classes.gallery}>{gallery}</section>
|
|
157
|
+
<div className={classes.pagination}>{pagination}</div>
|
|
158
|
+
</Fragment>
|
|
159
|
+
);
|
|
160
|
+
}, [
|
|
161
|
+
categoryId,
|
|
162
|
+
classes.gallery,
|
|
163
|
+
classes.pagination,
|
|
164
|
+
isLoading,
|
|
165
|
+
items,
|
|
166
|
+
pageControl,
|
|
167
|
+
totalPagesFromData
|
|
168
|
+
]);
|
|
169
|
+
|
|
170
|
+
const categoryTitle = categoryName ? categoryName : <Shimmer width={5} />;
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<Fragment>
|
|
174
|
+
{/* <Breadcrumbs categoryId={categoryId} /> */}
|
|
175
|
+
<StoreTitle>{categoryName}</StoreTitle>
|
|
176
|
+
<article className={classes.root} data-cy="CategoryContent-root">
|
|
177
|
+
<section className={classes.categoryHeader}>
|
|
178
|
+
{/* <h1 aria-live="polite" className={classes.title}>
|
|
179
|
+
<span
|
|
180
|
+
className={classes.categoryTitle}
|
|
181
|
+
data-cy="CategoryContent-categoryTitle"
|
|
182
|
+
>
|
|
183
|
+
{categoryTitle}
|
|
184
|
+
</span>
|
|
185
|
+
</h1>
|
|
186
|
+
{categoryDescriptionElement} */}
|
|
187
|
+
<BrandInfo />
|
|
188
|
+
</section>
|
|
189
|
+
{/* <SubCategory children={children} /> */}
|
|
190
|
+
<AttributesBlock category={category} attributesBlock={attributesBlock} />
|
|
191
|
+
<section
|
|
192
|
+
className={cn(
|
|
193
|
+
'category_brand-slider my-5 before_absolute before_bg-[#F8F8F8]',
|
|
194
|
+
'before_min-h-[120px] before_w-full before_left-0 before_!block before_z-[-1] before_mt-[-15px]'
|
|
195
|
+
)}
|
|
196
|
+
>
|
|
197
|
+
<ProductLineSlider />
|
|
198
|
+
</section>
|
|
199
|
+
<section className='brand_menu'>
|
|
200
|
+
<BrandMenu />
|
|
201
|
+
</section>
|
|
202
|
+
<div className={classes.contentWrapper}>
|
|
203
|
+
<div ref={sidebarRef} className={classes.sidebar}>
|
|
204
|
+
<Suspense fallback={<FilterSidebarShimmer />}>
|
|
205
|
+
{shouldRenderSidebarContent ? sidebar : null}
|
|
206
|
+
</Suspense>
|
|
207
|
+
</div>
|
|
208
|
+
<div className={classes.categoryContent}>
|
|
209
|
+
<div className={cn(classes.heading)}>
|
|
210
|
+
{maybeProductsTabContainer}
|
|
211
|
+
<div className={classes.headerButtons}>
|
|
212
|
+
{maybeFilterButtons}
|
|
213
|
+
{maybeSortButton}
|
|
214
|
+
</div>
|
|
215
|
+
{maybeSortContainer}
|
|
216
|
+
</div>
|
|
217
|
+
<div className={cn(classes.heading)}>
|
|
218
|
+
<div
|
|
219
|
+
data-cy="CategoryContent-categoryInfo"
|
|
220
|
+
className={classes.categoryInfo}
|
|
221
|
+
>
|
|
222
|
+
{categoryResultsHeading}
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
{content}
|
|
226
|
+
<Suspense fallback={null}>{filtersModal}</Suspense>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
</article>
|
|
230
|
+
</Fragment>
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export default CategoryContent;
|
|
235
|
+
|
|
236
|
+
CategoryContent.propTypes = {
|
|
237
|
+
classes: shape({
|
|
238
|
+
gallery: string,
|
|
239
|
+
pagination: string,
|
|
240
|
+
root: string,
|
|
241
|
+
categoryHeader: string,
|
|
242
|
+
title: string,
|
|
243
|
+
categoryTitle: string,
|
|
244
|
+
sidebar: string,
|
|
245
|
+
categoryContent: string,
|
|
246
|
+
heading: string,
|
|
247
|
+
categoryInfo: string,
|
|
248
|
+
headerButtons: string
|
|
249
|
+
}),
|
|
250
|
+
// sortProps contains the following structure:
|
|
251
|
+
// [{sortDirection: string, sortAttribute: string, sortText: string},
|
|
252
|
+
// React.Dispatch<React.SetStateAction<{sortDirection: string, sortAttribute: string, sortText: string}]
|
|
253
|
+
sortProps: array,
|
|
254
|
+
pageSize: number
|
|
255
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import { shape, string } from 'prop-types';
|
|
3
|
+
import { useCategory } from '@magento/peregrine/lib/talons/RootComponents/Category';
|
|
4
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
5
|
+
|
|
6
|
+
import CategoryContent from './brandLanding';
|
|
7
|
+
import defaultClasses from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/Category/category.module.css';
|
|
8
|
+
import { Meta } from '@magento/venia-ui/lib/components/Head';
|
|
9
|
+
import { GET_PAGE_SIZE } from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/RootComponents/Category/category.gql';
|
|
10
|
+
import ErrorView from '@magento/venia-ui/lib/components/ErrorView';
|
|
11
|
+
import { useIntl } from 'react-intl';
|
|
12
|
+
|
|
13
|
+
const MESSAGES = new Map().set(
|
|
14
|
+
'NOT_FOUND',
|
|
15
|
+
"Looks like the category you were hoping to find doesn't exist. Sorry about that."
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const Category = props => {
|
|
19
|
+
const { uid } = props;
|
|
20
|
+
const { formatMessage } = useIntl();
|
|
21
|
+
|
|
22
|
+
const cat_id = "NTI=";
|
|
23
|
+
|
|
24
|
+
const talonProps = useCategory({
|
|
25
|
+
id: cat_id,
|
|
26
|
+
queries: {
|
|
27
|
+
getPageSize: GET_PAGE_SIZE
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
const {
|
|
33
|
+
error,
|
|
34
|
+
metaDescription,
|
|
35
|
+
loading,
|
|
36
|
+
categoryData,
|
|
37
|
+
pageControl,
|
|
38
|
+
sortProps,
|
|
39
|
+
pageSize,
|
|
40
|
+
categoryNotFound
|
|
41
|
+
} = talonProps;
|
|
42
|
+
|
|
43
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
44
|
+
|
|
45
|
+
if (!categoryData) {
|
|
46
|
+
if (error && pageControl.currentPage === 1) {
|
|
47
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
48
|
+
console.error(error);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return <ErrorView />;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (categoryNotFound) {
|
|
55
|
+
return (
|
|
56
|
+
<ErrorView
|
|
57
|
+
message={formatMessage({
|
|
58
|
+
id: 'category.notFound',
|
|
59
|
+
defaultMessage: MESSAGES.get('NOT_FOUND')
|
|
60
|
+
})}
|
|
61
|
+
/>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<Fragment>
|
|
67
|
+
<Meta name="description" content={metaDescription} />
|
|
68
|
+
<CategoryContent
|
|
69
|
+
categoryId={cat_id}
|
|
70
|
+
classes={classes}
|
|
71
|
+
data={categoryData}
|
|
72
|
+
isLoading={loading}
|
|
73
|
+
pageControl={pageControl}
|
|
74
|
+
sortProps={sortProps}
|
|
75
|
+
pageSize={pageSize}
|
|
76
|
+
/>
|
|
77
|
+
</Fragment>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
Category.propTypes = {
|
|
82
|
+
classes: shape({
|
|
83
|
+
gallery: string,
|
|
84
|
+
root: string,
|
|
85
|
+
title: string
|
|
86
|
+
}),
|
|
87
|
+
uid: string
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
Category.defaultProps = {
|
|
91
|
+
uid: 'Mg=='
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export default Category;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Link } from "react-router-dom";
|
|
3
|
+
|
|
4
|
+
const menu = () => {
|
|
5
|
+
|
|
6
|
+
const menu = ['Action Figures', 'Anime', 'Nendoroid']
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<div className="menu_brand-container border border-gray-100 rounded-lg flex flex-wrap gap-x-10 gap-y-5 px-10">
|
|
10
|
+
{menu.map((item, index) => (
|
|
11
|
+
<Link to="/" key={index} className="text-base font-medium my-3">
|
|
12
|
+
{item}
|
|
13
|
+
</Link>
|
|
14
|
+
))}
|
|
15
|
+
</div>
|
|
16
|
+
</>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default menu
|
|
Binary file
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Divider from '@riosst100/pwa-marketplace/src/components/Divider';
|
|
3
|
+
import BrandItem from '@riosst100/pwa-marketplace/src/components/BrandSlider/item';
|
|
4
|
+
import cn from 'classnames';
|
|
5
|
+
import Image from '@magento/venia-ui/lib/components/Image';
|
|
6
|
+
import bannerImage from './banner_brands.png';
|
|
7
|
+
|
|
8
|
+
const brandList = (props) => {
|
|
9
|
+
const { letters, groupedBrands, active, handleActive, availableLetter } = props;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<section className='brand_banner-container mt-6'>
|
|
14
|
+
<Image
|
|
15
|
+
alt='brand-banner'
|
|
16
|
+
className="relative"
|
|
17
|
+
src={bannerImage}
|
|
18
|
+
/>
|
|
19
|
+
</section>
|
|
20
|
+
<section className='brands_list-indexing-container relative m-auto py-10'>
|
|
21
|
+
<ul className='flex gap-2 justify-center flex-wrap'>
|
|
22
|
+
<li >
|
|
23
|
+
<button
|
|
24
|
+
className={cn(
|
|
25
|
+
'rounded-md border border-solid border-gray-100 p-2 min-w-[28px]',
|
|
26
|
+
'leading-4 font-medium text-base hover_bg-gray-50'
|
|
27
|
+
)}
|
|
28
|
+
onClick={() => {
|
|
29
|
+
handleActive('all')
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
All
|
|
33
|
+
</button>
|
|
34
|
+
</li>
|
|
35
|
+
{letters.map((letter, index) => (
|
|
36
|
+
<li key={index}>
|
|
37
|
+
<button
|
|
38
|
+
className={cn(
|
|
39
|
+
'rounded-md border border-solid border-gray-100 p-2 min-w-[28px]',
|
|
40
|
+
'leading-4 font-medium text-base ',
|
|
41
|
+
!availableLetter.includes(letter) ? 'bg-gray-100' : 'hover_bg-gray-50',
|
|
42
|
+
)}
|
|
43
|
+
onClick={() => {
|
|
44
|
+
handleActive(letter)
|
|
45
|
+
}}
|
|
46
|
+
disabled={!availableLetter.includes(letter)}
|
|
47
|
+
>
|
|
48
|
+
{letter}
|
|
49
|
+
</button>
|
|
50
|
+
</li>
|
|
51
|
+
))}
|
|
52
|
+
</ul>
|
|
53
|
+
</section>
|
|
54
|
+
<Divider className="mb-10" />
|
|
55
|
+
<section className='brand_list-container'>
|
|
56
|
+
<div className='brand_list-wrapper'>
|
|
57
|
+
{availableLetter.map((initialLetter, index) => (
|
|
58
|
+
<>
|
|
59
|
+
{active === 'all' || active === initialLetter ? (
|
|
60
|
+
<div className='brand_group-wrapper mb-10' key={index}>
|
|
61
|
+
<div className='brand_item_group_letter text-xl font-semibold mb-[30px]' >
|
|
62
|
+
{initialLetter}
|
|
63
|
+
</div>
|
|
64
|
+
<div
|
|
65
|
+
className={cn(
|
|
66
|
+
'brand_item-list grid grid-cols-2 sm_grid-cols-3 md_grid-cols-4 lg_grid-cols-5 -mx-2 lg_-mx-4 gap-y-4'
|
|
67
|
+
)}
|
|
68
|
+
>
|
|
69
|
+
{groupedBrands[initialLetter].map((brand, index) => (
|
|
70
|
+
<BrandItem
|
|
71
|
+
key={index}
|
|
72
|
+
name={brand.name}
|
|
73
|
+
className="cursor-pointer"
|
|
74
|
+
onClick={() => { alert(brand.name) }}
|
|
75
|
+
/>
|
|
76
|
+
))}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
) : null}
|
|
80
|
+
</>
|
|
81
|
+
))}
|
|
82
|
+
</div>
|
|
83
|
+
</section>
|
|
84
|
+
</>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default brandList
|