@riosst100/pwa-marketplace 1.6.1 → 1.6.3

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.
Files changed (82) hide show
  1. package/package.json +3 -2
  2. package/src/components/AlphaFilter/alphaFilter.js +36 -8
  3. package/src/components/AlphaFilter/alphaFilter.shimmer.js +50 -0
  4. package/src/components/ArraySearchInput/arraySearchInput.js +100 -0
  5. package/src/components/ArraySearchInput/arraySearchInput.module.css +48 -0
  6. package/src/components/ArraySearchInput/index.js +1 -0
  7. package/src/components/CollectibleGameSets/collectibleGameSets.js +53 -25
  8. package/src/components/CollectibleGameSets/collectibleGameSets.module.css +8 -0
  9. package/src/components/CrossSeller/crossSellerBuy.js +19 -0
  10. package/src/components/CrossSeller/index.js +15 -0
  11. package/src/components/CrossSeller/item.js +79 -0
  12. package/src/components/CrossSeller/logo_seller.png +0 -0
  13. package/src/components/CrossSeller/starIcon.js +14 -0
  14. package/src/components/CrossSeller/verifyIcon.js +12 -0
  15. package/src/components/CustomSortBy/customSortBy.js +9 -11
  16. package/src/components/CustomSortBy/productSort.module.css +65 -0
  17. package/src/components/CustomSortBy/productSort.shimmer.js +28 -0
  18. package/src/components/CustomSortBy/productSort.shimmer.module.css +10 -0
  19. package/src/components/CustomSubCategory/subCategory.js +49 -0
  20. package/src/components/CustomSubCategory/subCategory.module.css +22 -0
  21. package/src/components/FilterTop/CurrentTopFilters/currentTopFilter.js +47 -0
  22. package/src/components/FilterTop/CurrentTopFilters/currentTopFilter.module.css +22 -0
  23. package/src/components/FilterTop/CurrentTopFilters/currentTopFilters.js +50 -0
  24. package/src/components/FilterTop/CurrentTopFilters/currentTopFilters.module.css +21 -0
  25. package/src/components/FilterTop/CurrentTopFilters/index.js +1 -0
  26. package/src/components/FilterTop/CustomFilters/customFilters.js +68 -30
  27. package/src/components/FilterTop/FilterBlockList/filterBlockList.js +50 -0
  28. package/src/components/FilterTop/FilterBlockList/filterBlockList.module.css +8 -0
  29. package/src/components/FilterTop/FilterBlockList/filterTopItem.js +40 -0
  30. package/src/components/FilterTop/FilterBlockList/filterTopItem.module.css +14 -0
  31. package/src/components/FilterTop/FilterBlockList/filterTopItemGroup.js +91 -0
  32. package/src/components/FilterTop/FilterBlockList/filterTopItemGroup.module.css +23 -0
  33. package/src/components/FilterTop/FilterBlockList/index.js +1 -0
  34. package/src/components/FilterTop/filterTop.js +131 -13
  35. package/src/components/FilterTop/filterTop.module.css +23 -58
  36. package/src/components/FilterTop/filterTop.shimmer.js +24 -24
  37. package/src/components/FilterTop/filterTopBlock.js +54 -0
  38. package/src/components/FilterTop/index.js +2 -2
  39. package/src/components/FilterTopBackup/CustomFilters/customFilter.js +83 -0
  40. package/src/components/FilterTopBackup/CustomFilters/customFilter.module.css +22 -0
  41. package/src/components/FilterTopBackup/CustomFilters/customFilters.js +132 -0
  42. package/src/components/FilterTopBackup/CustomFilters/customFilters.module.css +23 -0
  43. package/src/components/FilterTopBackup/CustomFilters/index.js +1 -0
  44. package/src/components/FilterTopBackup/filterTop.js +14 -0
  45. package/src/components/FilterTopBackup/filterTop.module.css +23 -0
  46. package/src/components/FilterTopBackup/filterTop.shimmer.js +24 -0
  47. package/src/components/FilterTopBackup/index.js +2 -0
  48. package/src/components/RelatedProduct/index.js +16 -0
  49. package/src/components/RelatedProduct/relatedProduct.js +112 -0
  50. package/src/components/RelatedProduct/sample.json +154 -0
  51. package/src/components/ShopBy/index.js +2 -0
  52. package/src/components/ShopBy/shopBy.js +237 -0
  53. package/src/components/ShopBy/shopBy.module.css +46 -0
  54. package/src/components/ShopBy/shopBy.shimmer.js +50 -0
  55. package/src/components/ShopByPage/index.js +1 -0
  56. package/src/components/ShopByPage/shopByPage.js +12 -0
  57. package/src/hooks/useCustomSort.js +21 -0
  58. package/src/intercept.js +1 -8
  59. package/src/overwrites/peregrine/lib/talons/FilterSidebar/useFilterSidebar.js +2 -2
  60. package/src/overwrites/peregrine/lib/talons/RootComponents/Category/categoryContent.gql.js +1 -0
  61. package/src/overwrites/peregrine/lib/talons/RootComponents/Category/categoryFragments.gql.js +31 -0
  62. package/src/overwrites/venia-ui/lib/RootComponents/Category/NoProductsFound/noProductsFound.js +0 -13
  63. package/src/overwrites/venia-ui/lib/RootComponents/Category/category.js +13 -2
  64. package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +31 -6
  65. package/src/overwrites/venia-ui/lib/components/Breadcrumbs/breadcrumbs.js +3 -2
  66. package/src/overwrites/venia-ui/lib/components/FilterSidebar/filterSidebar.js +5 -5
  67. package/src/overwrites/venia-ui/lib/components/Gallery/gallery.js +3 -3
  68. package/src/overwrites/venia-ui/lib/components/Gallery/item.js +3 -1
  69. package/src/overwrites/venia-ui/lib/components/Newsletter/newsletter.js +2 -2
  70. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/CustomAttributes/customAttributes.js +1 -1
  71. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +13 -1
  72. package/src/overwrites/venia-ui/lib/components/QuantityStepper/quantityStepper.js +2 -2
  73. package/src/overwrites/venia-ui/lib/components/SearchBar/searchBar.js +1 -1
  74. package/src/talons/ArraySearchInput/useArraySearchInput.js +58 -0
  75. package/src/talons/CollectibleGameSets/useCollectibleGameSets.js +75 -2
  76. package/src/talons/CustomFilters/useCustomFilters.js +163 -5
  77. package/src/talons/FilterTop/customFilters.gql.js +45 -0
  78. package/src/talons/FilterTop/filterTop.gql.js +45 -0
  79. package/src/talons/FilterTop/index.js +1 -0
  80. package/src/talons/FilterTop/useFilterTop.js +330 -0
  81. package/src/talons/ShopBy/shopBy.gql.js +47 -0
  82. package/src/talons/ShopBy/useShopBy.js +171 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riosst100/pwa-marketplace",
3
3
  "author": "riosst100@gmail.com",
4
- "version": "1.6.1",
4
+ "version": "1.6.3",
5
5
  "main": "src/index.js",
6
6
  "pwa-studio": {
7
7
  "targets": {
@@ -11,7 +11,8 @@
11
11
  "dependencies": {
12
12
  "axios": "^1.6.5",
13
13
  "iconsax-react": "^0.0.8",
14
- "react-phone-number-input": "^3.3.9"
14
+ "react-phone-number-input": "^3.3.9",
15
+ "react-slick": "^0.30.2"
15
16
  },
16
17
  "license": "MIT",
17
18
  "private": false
@@ -15,14 +15,31 @@ import ProductSort from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/
15
15
  import CustomSortBy from '@riosst100/pwa-marketplace/src/components/CustomSortBy';
16
16
 
17
17
  const AlphaFilter = props => {
18
- const {items, handleActiveLetter} = props;
18
+ const {items, handleActiveLetter, activeLetter, isSingles } = props;
19
19
 
20
20
  const groupSinglesFirstLetter = (data) => {
21
21
  return data.reduce((acc, item) => {
22
- if (item && item.name) {
23
- const firstLetter = item.name.charAt(0).toUpperCase();
24
- acc[firstLetter] = acc[firstLetter] || [];
25
- acc[firstLetter].push(item);
22
+ if (item) {
23
+ const { custom_attributes } = item;
24
+ if (custom_attributes) {
25
+ let cardName = '';
26
+ custom_attributes.some((attribute, index) => {
27
+ const { attribute_metadata, entered_attribute_value, selected_attribute_options } = attribute
28
+ if (attribute_metadata.code == "card_name") {
29
+ cardName = selected_attribute_options.attribute_option[0].label;
30
+
31
+ return true;
32
+ }
33
+
34
+ return false;
35
+ });
36
+
37
+ if (cardName) {
38
+ const firstLetter = cardName.charAt(0).toUpperCase();
39
+ acc[firstLetter] = acc[firstLetter] || [];
40
+ acc[firstLetter].push(item);
41
+ }
42
+ }
26
43
  }
27
44
 
28
45
  return acc;
@@ -34,11 +51,17 @@ const AlphaFilter = props => {
34
51
 
35
52
  const alpha = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
36
53
 
37
- return <>
54
+ return isSingles && <>
38
55
  <section className='single_list-indexing-container relative m-auto py-1'>
39
56
  <ul className='flex gap-2 justify-center flex-wrap'>
40
57
  {alpha.map((letter, index) => (
41
58
  <li key={index}>
59
+ {activeLetter == letter ? <button
60
+ className={cn(
61
+ 'rounded-md border border-solid border-gray-100 p-2 min-w-[28px]',
62
+ 'leading-4 font-medium text-base ',
63
+ availableLetter.includes(letter) ? 'hover_bg-gray-50' : 'bg-gray-100 text-gray-400',
64
+ )}><b>{letter}</b></button> :
42
65
  <button
43
66
  className={cn(
44
67
  'rounded-md border border-solid border-gray-100 p-2 min-w-[28px]',
@@ -51,10 +74,15 @@ const AlphaFilter = props => {
51
74
  disabled={availableLetter.includes(letter) > 0 ? false : true}
52
75
  >
53
76
  {letter}
54
- </button>
77
+ </button>}
55
78
  </li>
56
79
  ))}
57
80
  <li>
81
+ {activeLetter == 'all' ? <button
82
+ className={cn(
83
+ 'rounded-md border border-solid border-gray-100 p-2 min-w-[28px]',
84
+ 'leading-4 font-medium text-base hover_bg-gray-50',
85
+ )}><b>All</b></button> :
58
86
  <button
59
87
  className={cn(
60
88
  'rounded-md border border-solid border-gray-100 p-2 min-w-[28px]',
@@ -65,7 +93,7 @@ const AlphaFilter = props => {
65
93
  }}
66
94
  >
67
95
  All
68
- </button>
96
+ </button>}
69
97
  </li>
70
98
  </ul>
71
99
  </section>
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { shape, string } from 'prop-types';
3
+ import { useStyle } from '@magento/venia-ui/lib/classify';
4
+
5
+ import Shimmer from '@magento/venia-ui/lib/components/Shimmer';
6
+ import defaultClasses from './collectibleGameSets.module.css';
7
+ import cn from 'classnames';
8
+ import Divider from '@riosst100/pwa-marketplace/src/components/Divider';
9
+
10
+ const CollectibleGameSets = props => {
11
+ const classes = useStyle(defaultClasses, props.classes);
12
+
13
+ return (
14
+ <>
15
+ <h1 className='mx-auto relative block text-xl font-bold text-center pt-10 pb-4'><Shimmer width="25%" height="6vh" /></h1>
16
+ <div className='border border-gray-100 px-6'>
17
+ <center>
18
+ <section className='single_list-indexing-container relative m-auto py-10'>
19
+ <Shimmer width="95%" height="6vh" />
20
+ </section>
21
+ </center>
22
+ <Divider className="mb-5 px-4" />
23
+ <section className='singles-container'>
24
+ <div className={cn('singles-wrapper block -mx-4', classes.singlesWrapper)}>
25
+ <div className='singles_group-wrapper mb-4 px-2 inline-block w-full'>
26
+ <div className='singles_item_group_letter text-xl font-semibold border-b border-gray-100 pb-1 mb-2' ><Shimmer width="95%" height="100vh" /></div>
27
+ </div>
28
+ <div className='singles_group-wrapper mb-4 px-2 inline-block w-full'>
29
+ <div className='singles_item_group_letter text-xl font-semibold border-b border-gray-100 pb-1 mb-2' ><Shimmer width="95%" height="100vh" /></div>
30
+ </div>
31
+ <div className='singles_group-wrapper mb-4 px-2 inline-block w-full'>
32
+ <div className='singles_item_group_letter text-xl font-semibold border-b border-gray-100 pb-1 mb-2' ><Shimmer width="95%" height="100vh" /></div>
33
+ </div>
34
+ <div className='singles_group-wrapper mb-4 px-2 inline-block w-full'>
35
+ <div className='singles_item_group_letter text-xl font-semibold border-b border-gray-100 pb-1 mb-2' ><Shimmer width="95%" height="100vh" /></div>
36
+ </div>
37
+ <div className='singles_group-wrapper mb-4 px-2 inline-block w-full'>
38
+ <div className='singles_item_group_letter text-xl font-semibold border-b border-gray-100 pb-1 mb-2' ><Shimmer width="95%" height="100vh" /></div>
39
+ </div>
40
+ <div className='singles_group-wrapper mb-4 px-2 inline-block w-full'>
41
+ <div className='singles_item_group_letter text-xl font-semibold border-b border-gray-100 pb-1 mb-2' ><Shimmer width="95%" height="100vh" /></div>
42
+ </div>
43
+ </div>
44
+ </section>
45
+ </div>
46
+ </>
47
+ );
48
+ };
49
+
50
+ export default CollectibleGameSets;
@@ -0,0 +1,100 @@
1
+ import React, { useCallback } from 'react';
2
+ import { bool, shape, string } from 'prop-types';
3
+ import { Form } from 'informed';
4
+ import { useIntl } from 'react-intl';
5
+ import { useSearchBar } from '@magento/peregrine/lib/talons/SearchBar';
6
+
7
+ import { useStyle } from '@magento/venia-ui/lib/classify';
8
+ import Autocomplete from '@magento/venia-ui/lib/components/SearchBar/autocomplete';
9
+ import defaultClasses from './arraySearchInput.module.css';
10
+ import Dropdown from '@riosst100/pwa-marketplace/src/components/Dropdown';
11
+ import cn from 'classnames';
12
+ import SearchField from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/SearchBar/searchField';
13
+ import useFieldState from '@magento/peregrine/lib/hooks/hook-wrappers/useInformedFieldStateWrapper';
14
+ import { useArraySearchInput } from '@riosst100/pwa-marketplace/src/talons/ArraySearchInput/useArraySearchInput';
15
+
16
+ const ArraySearchInput = React.forwardRef((props, ref) => {
17
+ const { isOpen, placeholder, setSearchQuery, active, setActive } = props;
18
+ const talonProps = useArraySearchInput({ active });
19
+ // const fieldState = useFieldState('search_query');
20
+ const {
21
+ containerRef,
22
+ // handleChange,
23
+ handleFocus,
24
+ // handleSubmit,
25
+ initialValues,
26
+ isAutoCompleteOpen,
27
+ setIsAutoCompleteOpen,
28
+ valid
29
+ } = talonProps;
30
+
31
+ const handleSubmit = useCallback(
32
+ ({ search_query }) => {
33
+ return false;
34
+ },
35
+ []
36
+ );
37
+
38
+ const handleChange = useCallback(
39
+ value => {
40
+ // const hasValue = !!value;
41
+ // const isValid = hasValue && value.length > 2;
42
+
43
+ setSearchQuery(value)
44
+
45
+
46
+
47
+ // setValid(isValid);
48
+ // setIsAutoCompleteOpen(hasValue);
49
+ },
50
+ [setSearchQuery]
51
+ );
52
+
53
+ const classes = useStyle(defaultClasses, props.classes);
54
+ const rootClassName = isOpen ? classes.root_open : classes.root;
55
+ const { formatMessage } = useIntl();
56
+
57
+ return (
58
+ <div className={rootClassName} data-cy="ArraySearchInput-root" ref={ref}>
59
+ <div ref={containerRef} className={classes.container}>
60
+ <Form
61
+ autoComplete="off"
62
+ className={classes.form}
63
+ initialValues={initialValues}
64
+ onSubmit={handleSubmit}
65
+ >
66
+ <div
67
+ className={cn(
68
+ classes.search,
69
+ 'flex flex-row relative border border-gray-100 rounded-full'
70
+ )}
71
+ >
72
+ <SearchField
73
+ addLabel={formatMessage({
74
+ id: 'global.clearText',
75
+ defaultMessage: 'Clear Text'
76
+ })}
77
+ isSearchOpen={isAutoCompleteOpen}
78
+ onChange={handleChange}
79
+ onFocus={handleFocus}
80
+ />
81
+ </div>
82
+ </Form>
83
+ </div>
84
+ </div>
85
+ );
86
+ });
87
+
88
+ export default ArraySearchInput;
89
+
90
+ ArraySearchInput.propTypes = {
91
+ classes: shape({
92
+ autocomplete: string,
93
+ container: string,
94
+ form: string,
95
+ root: string,
96
+ root_open: string,
97
+ search: string
98
+ }),
99
+ isOpen: bool
100
+ };
@@ -0,0 +1,48 @@
1
+ .root {
2
+ composes: items-center from global;
3
+ composes: justify-items-center from global;
4
+ composes: justify-self-center from global;
5
+ composes: py-0 from global;
6
+ composes: w-full from global;
7
+
8
+ /* TODO @TW: review (B6) */
9
+ /* composes: hidden from global; */
10
+ display: none;
11
+ }
12
+
13
+ .root_open {
14
+ composes: root;
15
+
16
+ composes: z-dropdown from global;
17
+
18
+ /* TODO @TW: review (B6) */
19
+ /* composes: grid from global; */
20
+ display: grid;
21
+ }
22
+
23
+ .form {
24
+ composes: grid from global;
25
+ composes: items-center from global;
26
+ composes: justify-items-stretch from global;
27
+ composes: w-full from global;
28
+ }
29
+
30
+ .container {
31
+ composes: inline-flex from global;
32
+ composes: items-center from global;
33
+ composes: justify-center from global;
34
+ composes: max-w-full from global;
35
+ composes: relative from global;
36
+ composes: w-full from global;
37
+ }
38
+
39
+ .search {
40
+ composes: relative from global;
41
+ padding-left: 20px;
42
+ }
43
+
44
+ .autocomplete {
45
+ composes: grid from global;
46
+ /* composes: relative from global; */
47
+ composes: z-menu from global;
48
+ }
@@ -0,0 +1 @@
1
+ export { default } from './arraySearchInput';
@@ -1,6 +1,4 @@
1
- import React, { Fragment, useState } from 'react';
2
- import { FormattedMessage } from 'react-intl';
3
- import { useSeller } from '@riosst100/pwa-marketplace/src/talons/Seller/useSeller';
1
+ import React, { Fragment, useEffect, useMemo, useState } from 'react';
4
2
  import ErrorView from '@magento/venia-ui/lib/components/ErrorView';
5
3
  import { StoreTitle, Meta } from '@magento/venia-ui/lib/components/Head';
6
4
  import { useCollectibleGameSets } from '@riosst100/pwa-marketplace/src/talons/CollectibleGameSets/useCollectibleGameSets';
@@ -11,22 +9,35 @@ import { useStyle } from '@magento/venia-ui/lib/classify';
11
9
  import cn from 'classnames';
12
10
  import Divider from '@riosst100/pwa-marketplace/src/components/Divider';
13
11
  import { CollectibleGameSetsShimmer } from '@riosst100/pwa-marketplace/src/components/CollectibleGameSets';
14
- import ProductSort from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/ProductSort';
15
12
  import CustomSortBy from '@riosst100/pwa-marketplace/src/components/CustomSortBy';
13
+ import ArraySearchInput from '@riosst100/pwa-marketplace/src/components/ArraySearchInput';
14
+ import { useCustomSort } from '@riosst100/pwa-marketplace/src/hooks/useCustomSort';
16
15
 
17
16
  const CollectibleGameSets = props => {
18
17
  const [active, setActive] = useState('all');
19
18
 
20
- const [sortBy, setSortBy] = useState({
19
+ const [searchQuery, setSearchQuery] = useState('');
20
+
21
+
22
+ const sortProps = useCustomSort({ sortFromSearch: false, defaultSort: {
21
23
  sortText: 'All (A-Z)',
22
24
  value: 'all'
23
- });
25
+ }});
26
+
27
+ const [currentSort] = sortProps;
28
+
29
+ // const [sortBy, setSortBy] = useState({
30
+ // sortText: 'All (A-Z)',
31
+ // value: 'all'
32
+ // });
33
+
34
+ // console.log(currentSort)
24
35
 
25
36
  const classes = useStyle(defaultClasses);
26
37
 
27
- const talonProps = useCollectibleGameSets();
38
+ const talonProps = useCollectibleGameSets({ searchQuery, setActive, currentSort });
28
39
 
29
- const { error, loading, collectibleGameSets, categoryUrlSuffix, categoryUrlKey, productType } = talonProps;
40
+ const { error, loading, collectibleGameSets, categoryUrlSuffix, categoryUrlKey, productType, filteredCollectibleGameSets } = talonProps;
30
41
 
31
42
  if (loading && !collectibleGameSets)
32
43
  return <CollectibleGameSetsShimmer />;
@@ -37,12 +48,21 @@ const CollectibleGameSets = props => {
37
48
  }
38
49
 
39
50
  const setsLengthArr = [];
40
- const groupByYear = [];
41
51
 
42
- const setRelases = collectibleGameSets.map((setRelease, index) => {
43
- const { release_type, sets } = setRelease;
52
+ const newCollectibleGameSets = searchQuery ? filteredCollectibleGameSets : collectibleGameSets;
53
+
54
+ // useEffect(() => {
55
+ if (collectibleGameSets) {
56
+ collectibleGameSets.map((setRelease, index) => {
57
+ const { release_type, sets } = setRelease;
58
+
59
+ setsLengthArr[release_type] = sets.length
60
+ })
61
+ }
62
+ // }, [collectibleGameSets])
44
63
 
45
- setsLengthArr[release_type] = sets.length
64
+ const setRelases = newCollectibleGameSets.map((setRelease, index) => {
65
+ const { release_type, sets } = setRelease;
46
66
 
47
67
  const setsResult = [];
48
68
 
@@ -50,8 +70,6 @@ const CollectibleGameSets = props => {
50
70
  sets.map((set, index) => {
51
71
  const { set_name, option_id, set_abbreviation, release_year } = set;
52
72
 
53
- groupByYear[release_year] = set;
54
-
55
73
  const categoryUrl = resourceUrl(
56
74
  `/games/collectible-game/${categoryUrlKey}${categoryUrlSuffix || ''}?card_set[filter]=${set_name},${option_id}`
57
75
  );
@@ -67,7 +85,7 @@ const CollectibleGameSets = props => {
67
85
  return (
68
86
  <>
69
87
  {active == "all" || active == release_type ?
70
- <div id={"#tab_list_"+release_type.toLowerCase()} className='singles_group-wrapper mb-4 px-2 inline-block w-full'>
88
+ <div className='singles_group-wrapper mb-4 px-2 inline-block w-full'>
71
89
  <div className='singles_item_group_letter text-xl font-semibold border-b border-gray-100 pb-1 mb-2' >
72
90
  {release_type}
73
91
  </div>
@@ -77,10 +95,13 @@ const CollectibleGameSets = props => {
77
95
  );
78
96
  });
79
97
 
80
- console.log(groupByYear)
81
-
82
98
  const handleActive = (val) => {
83
99
  setActive(val);
100
+
101
+ //
102
+
103
+
104
+ setSearchQuery('')
84
105
  }
85
106
 
86
107
  const alpha = ['#', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
@@ -91,12 +112,12 @@ const CollectibleGameSets = props => {
91
112
  'value': 'all'
92
113
  },
93
114
  {
94
- 'label': 'Newest',
115
+ 'label': 'Latest Sets',
95
116
  'value': 'newest'
96
117
  },
97
118
  {
98
- 'label': 'All (Date)',
99
- 'value': 'all-date'
119
+ 'label': 'By Date',
120
+ 'value': 'date'
100
121
  }
101
122
  ];
102
123
 
@@ -114,9 +135,16 @@ const CollectibleGameSets = props => {
114
135
  {title}
115
136
  </h1>
116
137
  <div className='border border-gray-100 px-6'>
138
+ {collectibleGameSets ? (
139
+ <div
140
+ className={classes.toolbar}
141
+ >
142
+ <div style={{"width":"35%"}}><ArraySearchInput active={active} searchQuery={searchQuery} placeholder="Search sets..." isOpen={true} setSearchQuery={setSearchQuery} /></div>
143
+ <CustomSortBy sortProps={sortProps} availableSortMethods={availableSortBy} />
144
+ </div>
145
+ ) : ''}
117
146
  {productType != "expansion-sets" ? (
118
147
  <>
119
- <CustomSortBy sortProps={[sortBy, setSortBy]} availableSortMethods={availableSortBy} />
120
148
  <section className='single_list-indexing-container relative m-auto py-10'>
121
149
  <ul className='flex gap-2 justify-center flex-wrap'>
122
150
  <li>
@@ -129,7 +157,7 @@ const CollectibleGameSets = props => {
129
157
  handleActive('all')
130
158
  }}
131
159
  >
132
- All
160
+ {active == 'all' ? <b>All</b> : 'All'}
133
161
  </button>
134
162
  </li>
135
163
  {alpha.map((letter, index) => (
@@ -145,7 +173,7 @@ const CollectibleGameSets = props => {
145
173
  }}
146
174
  disabled={setsLengthArr[letter] > 0 ? false : true}
147
175
  >
148
- {letter}
176
+ {active == letter ? <b>{letter}</b> : letter}
149
177
  </button>
150
178
  </li>
151
179
  ))}
@@ -153,10 +181,10 @@ const CollectibleGameSets = props => {
153
181
  </section>
154
182
  </>
155
183
  ) : ''}
156
- <Divider className="mb-5 px-4" />
184
+ <Divider className="mb-5 px-4 mt-5" />
157
185
  <section className='singles-container'>
158
186
  <div className={cn('singles-wrapper block -mx-4', classes.singlesWrapper)}>
159
- {setRelases}
187
+ {newCollectibleGameSets && newCollectibleGameSets.length ? setRelases : (searchQuery ? <div className='singles_group-wrapper mb-4 px-2 inline-block w-full'>No sets found for <b>{searchQuery}</b> search query.</div> : <div className='singles_group-wrapper mb-4 px-2 inline-block w-full'>No sets found.</div>)}
160
188
  </div>
161
189
  </section>
162
190
  </div>
@@ -1,3 +1,11 @@
1
+ .toolbar {
2
+ composes: relative from global;
3
+ composes: ml-2xs from global;
4
+ display: flex;
5
+ justify-content: space-between;
6
+ margin-top: 20px;
7
+ }
8
+
1
9
  .tabs {
2
10
  composes: flex from global;
3
11
  composes: flex-wrap from global;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import Item from './item';
3
+
4
+ const crossSellerBuy = () => {
5
+ return (
6
+ <>
7
+ <h3 className='capitalize font-semibold text-xl mb-[30px]'>
8
+ Also Available
9
+ </h3>
10
+ <div className='flex flex-col gap-y-5'>
11
+ {[...Array(6)].map(() => (
12
+ <Item />
13
+ ))}
14
+ </div>
15
+ </>
16
+ )
17
+ }
18
+
19
+ export default crossSellerBuy
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import Content from './crossSellerBuy';
3
+
4
+ const index = () => {
5
+
6
+ const contentProps = {
7
+
8
+ }
9
+
10
+ return (
11
+ <Content {...contentProps} />
12
+ )
13
+ }
14
+
15
+ export default index
@@ -0,0 +1,79 @@
1
+ import React from 'react';
2
+ import { Form } from 'informed';
3
+ import Button from '@magento/venia-ui/lib/components/Button';
4
+ import Image from '@magento/venia-ui/lib/components/Image';
5
+ import QuantityStepper from '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/QuantityStepper';
6
+ import Verify from './verifyIcon';
7
+ import Star from './starIcon';
8
+ import logoImage from './logo_seller.png';
9
+
10
+ const item = () => {
11
+ return (
12
+ <>
13
+ <div className='flex flex-col gap-y-4 lg_flex-row justify-between bg-white rounded-lg border border-gray-100 p-[15px]'>
14
+ <div className='seller_info-container flex flex-row gap-x-[15px]'>
15
+ <div className='logo_wrapper w-[100px] h-[100px]'>
16
+ <Image
17
+ alt='seller name'
18
+ className="relative mt-[-5px]"
19
+ src={logoImage}
20
+ />
21
+ </div>
22
+ <div className='flex flex-col gap-y-[15px]'>
23
+ <div className='seller_summary-wrapper flex flex-row gap-x-2.5 items-center'>
24
+ <div className='seller_name text-lg font-semibold leading-6'>
25
+ Zen Market
26
+ </div>
27
+ <div className='seller_badge flex flex-row gap-x-[5px] items-center leading-6'>
28
+ <Verify />
29
+ <span className='text-xs font-medium text-gray-600-transparent capitalize'>
30
+ Verified
31
+ </span>
32
+ </div>
33
+ </div>
34
+ <div className='rating_sales flex flex-row gap-x-[5px] items-center'>
35
+ <Star />
36
+ <span className='font-normal text-[14px] text-gray-200'>
37
+ 4.7 (Sales 120)
38
+ </span>
39
+ </div>
40
+ </div>
41
+ </div>
42
+
43
+ <div className='price_container'>
44
+ <div className='price text-lg font-semibold'>
45
+ $34.19
46
+ </div>
47
+ <span className='shipping_note text-xs text-gray-200'>
48
+ Shipping method is calculated on checkout
49
+ </span>
50
+ </div>
51
+
52
+ <div className='form_wrapper'>
53
+ <Form
54
+ data-cy="FormAddToCartCrossSeller"
55
+ onSubmit={() => { }}
56
+ className="flex flex-row gap-x-7"
57
+ >
58
+ <QuantityStepper
59
+ min={1}
60
+ // message={'error quantity'}
61
+ />
62
+ <Button
63
+ data-cy="addToCartButton"
64
+ classes={{
65
+ content: 'normal-case font-semibold text-[16px]'
66
+ }}
67
+ priority="high"
68
+ type="button"
69
+ >
70
+ Add To Cart
71
+ </Button>
72
+ </Form>
73
+ </div>
74
+ </div>
75
+ </>
76
+ )
77
+ }
78
+
79
+ export default item
@@ -0,0 +1,14 @@
1
+ import React from 'react'
2
+
3
+ const starIcon = () => {
4
+ return (
5
+ <>
6
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
7
+ <path d="M8.00985 2.04754L9.03651 4.10087C9.17651 4.38671 9.54985 4.66087 9.86485 4.71337L11.7257 5.02254C12.9157 5.22087 13.1957 6.08421 12.3382 6.93587L10.8915 8.38254C10.6465 8.62754 10.5123 9.10004 10.5882 9.43837L11.0023 11.2292C11.329 12.6467 10.5765 13.195 9.32235 12.4542L7.57818 11.4217C7.26318 11.235 6.74401 11.235 6.42318 11.4217L4.67901 12.4542C3.43068 13.195 2.67235 12.6409 2.99901 11.2292L3.41318 9.43837C3.48901 9.10004 3.35485 8.62754 3.10985 8.38254L1.66318 6.93587C0.811513 6.08421 1.08568 5.22087 2.27568 5.02254L4.13651 4.71337C4.44568 4.66087 4.81901 4.38671 4.95901 4.10087L5.98568 2.04754C6.54568 0.933372 7.45568 0.933372 8.00985 2.04754Z" fill="#F7C317" stroke="#F7C317" stroke-linecap="round" stroke-linejoin="round" />
8
+ </svg>
9
+
10
+ </>
11
+ )
12
+ }
13
+
14
+ export default starIcon
@@ -0,0 +1,12 @@
1
+ import React from 'react'
2
+
3
+ const verifyIcon = () => (
4
+ <>
5
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ <path d="M8.9584 2.04185C9.5334 1.55018 10.4751 1.55018 11.0584 2.04185L12.3751 3.17518C12.6251 3.39185 13.0917 3.56685 13.4251 3.56685H14.8417C15.7251 3.56685 16.4501 4.29185 16.4501 5.17518V6.59185C16.4501 6.91685 16.6251 7.39185 16.8417 7.64185L17.9751 8.95851C18.4667 9.53351 18.4667 10.4752 17.9751 11.0585L16.8417 12.3752C16.6251 12.6252 16.4501 13.0918 16.4501 13.4252V14.8418C16.4501 15.7252 15.7251 16.4502 14.8417 16.4502H13.4251C13.1001 16.4502 12.6251 16.6252 12.3751 16.8418L11.0584 17.9752C10.4834 18.4668 9.54173 18.4668 8.9584 17.9752L7.64173 16.8418C7.39173 16.6252 6.92506 16.4502 6.59173 16.4502H5.15006C4.26673 16.4502 3.54173 15.7252 3.54173 14.8418V13.4168C3.54173 13.0918 3.36673 12.6252 3.1584 12.3752L2.0334 11.0502C1.55007 10.4752 1.55007 9.54185 2.0334 8.96685L3.1584 7.64185C3.36673 7.39185 3.54173 6.92518 3.54173 6.60018V5.16685C3.54173 4.28351 4.26673 3.55851 5.15006 3.55851H6.59173C6.91673 3.55851 7.39173 3.38351 7.64173 3.16685L8.9584 2.04185Z" fill="#4E31DB" stroke="#4E31DB" stroke-linecap="round" stroke-linejoin="round" />
7
+ <path d="M6.9834 10.0001L8.99173 12.0167L13.0167 7.9834" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
8
+ </svg>
9
+ </>
10
+ )
11
+
12
+ export default verifyIcon