@riosst100/pwa-marketplace 2.1.3 → 2.1.5

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 (57) hide show
  1. package/package.json +1 -1
  2. package/src/componentOverrideMapping.js +6 -0
  3. package/src/components/FavoriteSeller/AddToListButton/addToListButton.js +54 -54
  4. package/src/components/FavoriteSeller/AddToListButton/addToListButton.module.css +17 -17
  5. package/src/components/FavoriteSeller/AddToListButton/index.js +1 -1
  6. package/src/components/FavoriteSeller/AddToListButton/useCommonToasts.js +33 -33
  7. package/src/components/FilterTop/CustomFilters/customFilters.js +130 -132
  8. package/src/components/FilterTop/filterTop.js +1 -8
  9. package/src/components/LinkToOtherStores/index.js +61 -0
  10. package/src/components/NonSportCardsSets/nonSportCardsSets.js +0 -2
  11. package/src/components/RFQ/index.js +6 -3
  12. package/src/components/SellerDetail/sellerDetail.js +18 -1
  13. package/src/components/SellerInformation/sellerInformation.js +5 -3
  14. package/src/components/SellerSocialMedia/index.js +96 -0
  15. package/src/components/SetsData/index.js +2 -0
  16. package/src/components/SetsData/setsData.js +349 -0
  17. package/src/components/SetsData/setsData.module.css +76 -0
  18. package/src/components/SetsData/setsData.shimmer.js +50 -0
  19. package/src/components/ShopBy/shopBy.js +3 -2
  20. package/src/overwrites/pagebuilder/lib/ContentTypes/Products/products.js +13 -0
  21. package/src/overwrites/peregrine/lib/talons/MagentoRoute/magentoRoute.gql.js +27 -0
  22. package/src/overwrites/peregrine/lib/talons/MagentoRoute/useMagentoRoute.js +193 -0
  23. package/src/overwrites/peregrine/lib/talons/ProductFullDetail/useProductFullDetail.js +40 -9
  24. package/src/overwrites/peregrine/lib/talons/ProductImageCarousel/useProductImageCarousel.js +77 -0
  25. package/src/overwrites/peregrine/lib/talons/ProductOptions/useOption.js +59 -0
  26. package/src/overwrites/peregrine/lib/talons/ProductOptions/useTile.js +47 -0
  27. package/src/overwrites/peregrine/lib/talons/RootComponents/Category/categoryFragments.gql.js +13 -0
  28. package/src/overwrites/peregrine/lib/talons/RootComponents/Product/productDetailFragment.gql.js +23 -0
  29. package/src/overwrites/venia-ui/lib/RootComponents/Category/category.js +11 -3
  30. package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +0 -6
  31. package/src/overwrites/venia-ui/lib/components/AccountInformationPage/accountInformationPage.js +0 -1
  32. package/src/overwrites/venia-ui/lib/components/AccountInformationPage/editForm.js +0 -1
  33. package/src/overwrites/venia-ui/lib/components/Breadcrumbs/breadcrumbs.js +0 -3
  34. package/src/overwrites/venia-ui/lib/components/CheckoutPage/OrderSummary/orderSummary.js +0 -1
  35. package/src/overwrites/venia-ui/lib/components/Gallery/item.js +17 -3
  36. package/src/overwrites/venia-ui/lib/components/Price/price.js +113 -0
  37. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/auctionDetail.js +1 -1
  38. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +77 -104
  39. package/src/overwrites/venia-ui/lib/components/ProductImageCarousel/carousel.js +3 -1
  40. package/src/overwrites/venia-ui/lib/components/ProductOptions/option.js +112 -0
  41. package/src/overwrites/venia-ui/lib/components/ProductOptions/option.module.css +30 -0
  42. package/src/overwrites/venia-ui/lib/components/ProductOptions/options.js +49 -0
  43. package/src/overwrites/venia-ui/lib/components/ProductOptions/tile.js +118 -0
  44. package/src/overwrites/venia-ui/lib/components/ProductOptions/tile.module.css +68 -0
  45. package/src/overwrites/venia-ui/lib/components/ProductOptions/tileList.js +78 -0
  46. package/src/overwrites/venia-ui/lib/components/ProductOptions/tileList.module.css +6 -0
  47. package/src/overwrites/venia-ui/lib/components/ProductOptions/tileList.shimmer.js +32 -0
  48. package/src/talons/CustomFilters/useCustomFilters.js +0 -2
  49. package/src/talons/FavoriteSeller/AddToListButton/addToListButton.gql.js +30 -30
  50. package/src/talons/FavoriteSeller/AddToListButton/useAddToFavoriteListButton.js +0 -1
  51. package/src/talons/LegoSets/useLegoSets.js +0 -5
  52. package/src/talons/Seller/useSeller.js +1 -1
  53. package/src/talons/SetsData/setsData.gql.js +70 -0
  54. package/src/talons/SetsData/useSetsData.js +225 -0
  55. package/src/talons/ShopBy/shopBy.gql.js +12 -6
  56. package/src/talons/ShopBy/useShopBy.js +13 -4
  57. package/src/talons/TrainsSets/useTrainsSets.js +0 -3
@@ -0,0 +1,27 @@
1
+ import { gql } from '@apollo/client';
2
+
3
+ export const RESOLVE_URL = gql`
4
+ query ResolveURL($url: String!, $product_preview_token: String) {
5
+ route(url: $url, product_preview_token: $product_preview_token) {
6
+ relative_url
7
+ redirect_code
8
+ type
9
+ ... on CmsPage {
10
+ identifier
11
+ }
12
+ # eslint-disable-next-line @graphql-eslint/require-id-when-available
13
+ ... on ProductInterface {
14
+ uid
15
+ __typename
16
+ }
17
+ # eslint-disable-next-line @graphql-eslint/require-id-when-available
18
+ ... on CategoryInterface {
19
+ uid
20
+ }
21
+ }
22
+ }
23
+ `;
24
+
25
+ export default {
26
+ resolveUrlQuery: RESOLVE_URL
27
+ };
@@ -0,0 +1,193 @@
1
+ import { useCallback, useEffect, useRef } from 'react';
2
+ import { useHistory, useLocation } from 'react-router-dom';
3
+ import { useLazyQuery } from '@apollo/client';
4
+ import { useRootComponents } from '@magento/peregrine/lib/context/rootComponents';
5
+ import mergeOperations from '@magento/peregrine/lib/util/shallowMerge';
6
+ import { getComponentData } from '@magento/peregrine/lib/util/magentoRouteData';
7
+ import { useAppContext } from '@magento/peregrine/lib/context/app';
8
+
9
+ import { getRootComponent, isRedirect } from '@magento/peregrine/lib/talons/MagentoRoute/helpers';
10
+ import DEFAULT_OPERATIONS from './magentoRoute.gql';
11
+
12
+ import { useParams } from 'react-router-dom';
13
+
14
+ const getInlinedPageData = () => {
15
+ return globalThis.INLINED_PAGE_TYPE && globalThis.INLINED_PAGE_TYPE.type
16
+ ? globalThis.INLINED_PAGE_TYPE
17
+ : null;
18
+ };
19
+
20
+ const resetInlinedPageData = () => {
21
+ globalThis.INLINED_PAGE_TYPE = false;
22
+ };
23
+
24
+ export const useMagentoRoute = (props = {}) => {
25
+ const operations = mergeOperations(DEFAULT_OPERATIONS, props.operations);
26
+ const { resolveUrlQuery } = operations;
27
+ const { replace } = useHistory();
28
+ const { pathname, search } = useLocation();
29
+ // const { preview } = useParams();
30
+ const [componentMap, setComponentMap] = useRootComponents();
31
+
32
+ const initialized = useRef(false);
33
+ const fetchedPathname = useRef(null);
34
+
35
+ const [appState, appApi] = useAppContext();
36
+ const { actions: appActions } = appApi;
37
+ const { nextRootComponent } = appState;
38
+ const { setNextRootComponent, setPageLoading } = appActions;
39
+
40
+ const setComponent = useCallback(
41
+ (key, value) => {
42
+ setComponentMap(prevMap => new Map(prevMap).set(key, value));
43
+ },
44
+ [setComponentMap]
45
+ );
46
+
47
+ const component = componentMap.get(pathname);
48
+
49
+ const [runQuery, queryResult] = useLazyQuery(resolveUrlQuery);
50
+ // destructure the query result
51
+ const { data, error, loading } = queryResult;
52
+ const { route } = data || {};
53
+
54
+ // redirect to external url
55
+ useEffect(() => {
56
+ if (route) {
57
+ const external_URL = route.relative_url;
58
+ if (external_URL && external_URL.startsWith('http')) {
59
+ window.location.replace(external_URL);
60
+ }
61
+ }
62
+ }, [route]);
63
+
64
+ useEffect(() => {
65
+ if (initialized.current || !getInlinedPageData()) {
66
+ const params = new URLSearchParams(search);
67
+ const previewToken = params.get('preview');
68
+
69
+ runQuery({
70
+ fetchPolicy: 'cache-and-network',
71
+ nextFetchPolicy: 'cache-first',
72
+ variables: { url: pathname, product_preview_token: previewToken }
73
+ });
74
+ fetchedPathname.current = pathname;
75
+ }
76
+ }, [initialized, pathname, search]); // eslint-disable-line react-hooks/exhaustive-deps
77
+
78
+ useEffect(() => {
79
+ if (component) {
80
+ return;
81
+ }
82
+
83
+ (async () => {
84
+ const { type, ...routeData } = route || {};
85
+ const { id, identifier, uid } = routeData || {};
86
+ const isEmpty = !id && !identifier && !uid;
87
+
88
+ if (!type || isEmpty) {
89
+ return;
90
+ }
91
+
92
+ try {
93
+ const rootComponent = await getRootComponent(type);
94
+ setComponent(pathname, {
95
+ component: rootComponent,
96
+ ...getComponentData(routeData),
97
+ type
98
+ });
99
+ } catch (error) {
100
+ if (process.env.NODE_ENV !== 'production') {
101
+ console.error(error);
102
+ }
103
+
104
+ setComponent(pathname, error);
105
+ }
106
+ })();
107
+ }, [route]); // eslint-disable-line react-hooks/exhaustive-deps
108
+
109
+ const { id, identifier, uid, redirect_code, relative_url, type } =
110
+ route || {};
111
+
112
+ // evaluate both results and determine the response type
113
+ const empty = !route || !type || (!id && !identifier && !uid);
114
+ const redirect = isRedirect(redirect_code);
115
+ const fetchError = component instanceof Error && component;
116
+ const routeError = fetchError || error;
117
+ const isInitialized = initialized.current || !getInlinedPageData();
118
+
119
+ let showPageLoader = false;
120
+ let routeData;
121
+
122
+ if (component && !fetchError) {
123
+ // FOUND
124
+ routeData = component;
125
+ } else if (routeError) {
126
+ // ERROR
127
+ routeData = { hasError: true, routeError };
128
+ } else if (empty && fetchedPathname.current === pathname && !loading) {
129
+ // NOT FOUND
130
+ routeData = { isNotFound: true };
131
+ } else if (nextRootComponent) {
132
+ // LOADING with full page shimmer
133
+ showPageLoader = true;
134
+ routeData = { isLoading: true, shimmer: nextRootComponent };
135
+ } else if (redirect) {
136
+ // REDIRECT
137
+ routeData = {
138
+ isRedirect: true,
139
+ relativeUrl: relative_url.startsWith('/')
140
+ ? relative_url
141
+ : '/' + relative_url
142
+ };
143
+ } else {
144
+ // LOADING
145
+ const isInitialLoad = !isInitialized;
146
+ routeData = { isLoading: true, initial: isInitialLoad };
147
+ }
148
+
149
+ useEffect(() => {
150
+ (async () => {
151
+ const inlinedData = getInlinedPageData();
152
+ if (inlinedData) {
153
+ try {
154
+ const componentType = inlinedData.type;
155
+ const rootComponent = await getRootComponent(componentType);
156
+ setComponent(pathname, {
157
+ component: rootComponent,
158
+ type: componentType,
159
+ ...getComponentData(inlinedData)
160
+ });
161
+ } catch (error) {
162
+ setComponent(pathname, error);
163
+ }
164
+ }
165
+ initialized.current = true;
166
+ })();
167
+
168
+ return () => {
169
+ // Unmount
170
+ resetInlinedPageData();
171
+ };
172
+ }, []); // eslint-disable-line react-hooks/exhaustive-deps
173
+
174
+ // perform a redirect if necesssary
175
+ useEffect(() => {
176
+ if (routeData && routeData.isRedirect) {
177
+ replace(routeData.relativeUrl);
178
+ }
179
+ }, [pathname, replace, routeData]);
180
+
181
+ useEffect(() => {
182
+ if (component) {
183
+ // Reset loading shimmer whenever component resolves
184
+ setNextRootComponent(null);
185
+ }
186
+ }, [component, pathname, setNextRootComponent]);
187
+
188
+ useEffect(() => {
189
+ setPageLoading(showPageLoader);
190
+ }, [showPageLoader, setPageLoading]);
191
+
192
+ return routeData;
193
+ };
@@ -107,14 +107,28 @@ const getMediaGalleryEntries = (product, optionCodes, optionSelections) => {
107
107
  const { media_gallery_entries, variants } = product;
108
108
  const isConfigurable = isProductConfigurable(product);
109
109
 
110
+ value = isConfigurable && variants && variants.length > 0
111
+ ? [
112
+ ...variants.flatMap(variant => variant.product.media_gallery_entries || []),
113
+ ...media_gallery_entries
114
+ ]
115
+ : media_gallery_entries;
116
+
117
+ return value;
118
+ };
119
+
120
+ const getSelectedMedia = (product, optionCodes, optionSelections) => {
121
+ let valueSelected = [];
122
+
123
+ const { media_gallery_entries, variants } = product;
124
+ const isConfigurable = isProductConfigurable(product);
125
+
110
126
  // Selections are initialized to "code => undefined". Once we select a value, like color, the selections change. This filters out unselected options.
111
127
  const optionsSelected =
112
128
  Array.from(optionSelections.values()).filter(value => !!value).length >
113
129
  0;
114
130
 
115
- if (!isConfigurable || !optionsSelected) {
116
- value = media_gallery_entries;
117
- } else {
131
+ if (isConfigurable && optionsSelected) {
118
132
  // If any of the possible variants matches the selection add that
119
133
  // variant's image to the media gallery. NOTE: This _can_, and does,
120
134
  // include variants such as size. If Magento is configured to display
@@ -125,12 +139,12 @@ const getMediaGalleryEntries = (product, optionCodes, optionSelections) => {
125
139
  variants
126
140
  });
127
141
 
128
- value = item
129
- ? [...item.product.media_gallery_entries, ...media_gallery_entries]
142
+ valueSelected = item
143
+ ? item.product.media_gallery_entries
130
144
  : media_gallery_entries;
131
145
  }
132
146
 
133
- return value;
147
+ return valueSelected;
134
148
  };
135
149
 
136
150
  // We only want to display breadcrumbs for one category on a PDP even if a
@@ -170,7 +184,7 @@ const getConfigPrice = (product, optionCodes, optionSelections) => {
170
184
  Array.from(optionSelections.values()).filter(value => !!value).length >
171
185
  0;
172
186
 
173
- if (!isConfigurable || !optionsSelected) {
187
+ if (!isConfigurable) {
174
188
  value = product.price_range?.maximum_price;
175
189
  } else {
176
190
  const item = findMatchingVariant({
@@ -179,11 +193,21 @@ const getConfigPrice = (product, optionCodes, optionSelections) => {
179
193
  variants
180
194
  });
181
195
 
182
- value = item
196
+ const priceRange = {
197
+ final_price: {
198
+ value: product.price_range?.minimum_price.final_price.value + ' - ' + product.price_range?.maximum_price.final_price.value,
199
+ currency: product.price_range?.minimum_price.final_price.currency
200
+ }
201
+ };
202
+
203
+ value = optionsSelected && item
183
204
  ? item.product.price_range?.maximum_price
184
- : product.price_range?.maximum_price;
205
+ : priceRange;
185
206
  }
186
207
 
208
+ console.log('value----=====')
209
+ console.log(value)
210
+
187
211
  return value;
188
212
  };
189
213
 
@@ -368,6 +392,11 @@ export const useProductFullDetail = props => {
368
392
  [product, optionCodes, optionSelections]
369
393
  );
370
394
 
395
+ const selectedMedia = useMemo(
396
+ () => getSelectedMedia(product, optionCodes, optionSelections),
397
+ [product, optionCodes, optionSelections]
398
+ );
399
+
371
400
  const customAttributes = useMemo(
372
401
  () => getCustomAttributes(product, optionCodes, optionSelections),
373
402
  [product, optionCodes, optionSelections]
@@ -555,6 +584,7 @@ export const useProductFullDetail = props => {
555
584
  price_range: product?.price_range,
556
585
  sku: product.sku,
557
586
  term_and_conditions: product.term_and_conditions,
587
+ link_to_other_stores: product.link_to_other_stores,
558
588
  shipping_policy: product.shipping_policy,
559
589
  return_policy: product.return_policy,
560
590
  preorder: product.preorder,
@@ -629,6 +659,7 @@ export const useProductFullDetail = props => {
629
659
  isAddProductLoading,
630
660
  isSupportedProductType,
631
661
  mediaGalleryEntries,
662
+ selectedMedia,
632
663
  shouldShowWishlistButton:
633
664
  isSignedIn &&
634
665
  storeConfigData &&
@@ -0,0 +1,77 @@
1
+ import { useCallback, useEffect } from 'react';
2
+ import { useCarousel } from '@magento/peregrine';
3
+ import { generateUrlFromContainerWidth } from '@magento/peregrine/lib/util/imageUtils';
4
+ import {
5
+ MESSAGE_TYPES,
6
+ VALID_SERVICE_WORKER_ENVIRONMENT,
7
+ sendMessageToSW
8
+ } from '@magento/peregrine/lib/util/swUtils';
9
+
10
+ export const useProductImageCarousel = props => {
11
+ const { images, hoveredMedia, selectedMedia, type, imageWidth } = props;
12
+ const [carouselState, carouselApi] = useCarousel(images);
13
+ const { activeItemIndex, sortedImages } = carouselState;
14
+ const { handlePrevious, handleNext, setActiveItemIndex } = carouselApi;
15
+
16
+ const handleThumbnailClick = useCallback(
17
+ index => {
18
+ setActiveItemIndex(index);
19
+ },
20
+ [setActiveItemIndex]
21
+ );
22
+
23
+ // Whenever the incoming images changes reset the active item to the first.
24
+ useEffect(() => {
25
+ if (hoveredMedia || selectedMedia && selectedMedia.length) {
26
+
27
+ // Extract the uid from the first element of selectedMedia
28
+ const selectedMediaUid = hoveredMedia ? hoveredMedia[0].uid : selectedMedia[0].uid; // Get the uid from selectedMedia
29
+
30
+ // Find the index of the image with the matching uid
31
+ const selectedMediaIndex = sortedImages.findIndex(image => {
32
+ return image.uid === selectedMediaUid;
33
+ });
34
+
35
+ if (selectedMediaIndex) {
36
+ setActiveItemIndex(selectedMediaIndex);
37
+ } else {
38
+ setActiveItemIndex(0);
39
+ }
40
+ } else {
41
+ setActiveItemIndex(0);
42
+ }
43
+ }, [sortedImages, selectedMedia, hoveredMedia, setActiveItemIndex]);
44
+
45
+ useEffect(() => {
46
+ if (VALID_SERVICE_WORKER_ENVIRONMENT) {
47
+ const urls = images.map(
48
+ ({ file }) =>
49
+ new URL(
50
+ generateUrlFromContainerWidth(file, imageWidth, type),
51
+ location.origin
52
+ ).href
53
+ );
54
+ sendMessageToSW(MESSAGE_TYPES.PREFETCH_IMAGES, {
55
+ urls
56
+ }).catch(err => {
57
+ console.error(
58
+ 'Unable to send PREFETCH_IMAGES message to SW',
59
+ err
60
+ );
61
+ });
62
+ }
63
+ }, [images, imageWidth, type]);
64
+
65
+ const currentImage = sortedImages[activeItemIndex] || {};
66
+ const altText = currentImage.label || 'image-product';
67
+
68
+ return {
69
+ currentImage,
70
+ activeItemIndex,
71
+ altText,
72
+ handleNext,
73
+ handlePrevious,
74
+ handleThumbnailClick,
75
+ sortedImages
76
+ };
77
+ };
@@ -0,0 +1,59 @@
1
+ import { useCallback, useMemo, useState } from 'react';
2
+
3
+ /**
4
+ * Talon for Option.
5
+ *
6
+ * @param {number} props.attribute_id the id of the option
7
+ * @param {function} props.onSelectionChange callback handler for when the option is clicked
8
+ * @param {string} props.selectedValue the label of the selected option
9
+ * @param {array} props.values an array containing possible values
10
+ */
11
+ export const useOption = props => {
12
+ const { attribute_id, attribute_code, onSelectionChange, selectedValue, values, variants } = props;
13
+ const [selection, setSelection] = useState(null);
14
+ const initialSelection = useMemo(() => {
15
+ let initialSelection = {};
16
+ const searchValue = selection || selectedValue;
17
+ if (searchValue) {
18
+ initialSelection =
19
+ values.find(value => value.default_label === searchValue) || {};
20
+ }
21
+ return initialSelection;
22
+ }, [selectedValue, selection, values]);
23
+
24
+ const filteredVariants = useMemo(() => {
25
+ let filteredVariants = {};
26
+ if (attribute_code) {
27
+ filteredVariants = variants.filter(variant => {
28
+ return variant.attributes.some(attribute => attribute.code === attribute_code);
29
+ });
30
+ }
31
+ return filteredVariants;
32
+ }, [attribute_code, variants]);
33
+
34
+ const valuesMap = useMemo(() => {
35
+ return new Map(
36
+ values.map(value => [value.value_index, value.store_label])
37
+ );
38
+ }, [values]);
39
+
40
+ const selectedValueDescription =
41
+ selection || initialSelection.default_label || 'None';
42
+
43
+ const handleSelectionChange = useCallback(
44
+ selection => {
45
+ setSelection(valuesMap.get(selection));
46
+
47
+ if (onSelectionChange) {
48
+ onSelectionChange(attribute_id, selection);
49
+ }
50
+ },
51
+ [attribute_id, onSelectionChange, valuesMap]
52
+ );
53
+ return {
54
+ handleSelectionChange,
55
+ initialSelection,
56
+ selectedValueDescription,
57
+ filteredVariants
58
+ };
59
+ };
@@ -0,0 +1,47 @@
1
+ import { useCallback, useMemo } from 'react';
2
+
3
+ export const useTile = props => {
4
+ const { onClick, value_index, itemVariant, setHoveredMedia } = props;
5
+
6
+ const handleClick = useCallback(() => {
7
+ onClick(value_index);
8
+ }, [value_index, onClick]);
9
+
10
+ const handleMouseEnter = useCallback(() => {
11
+ var variantMedia = itemVariant
12
+ ? itemVariant[0].product.media_gallery_entries
13
+ : null;
14
+
15
+ setHoveredMedia(variantMedia);
16
+ }, [setHoveredMedia, itemVariant, value_index]);
17
+
18
+ const handleMouseLeave = useCallback(() => {
19
+ setHoveredMedia(null);
20
+ }, [setHoveredMedia]);
21
+
22
+ const variantImg = useMemo(() => {
23
+ let variantImg = '';
24
+ if (itemVariant) {
25
+ if (itemVariant.length > 0) {
26
+ const firstVariant = itemVariant[0];
27
+
28
+ // Accessing media_gallery_entries
29
+ const mediaGalleryEntries = firstVariant.product.media_gallery_entries;
30
+
31
+ // Extracting file paths
32
+ const mediaFiles = mediaGalleryEntries.map(entry => entry.file);
33
+ variantImg = mediaFiles[0];
34
+ }
35
+ }
36
+ return variantImg;
37
+ }, [itemVariant]);
38
+
39
+ // const variantImg = "https://down-sg.img.susercontent.com/file/sg-11134207-7rbk0-lkkqr1dahoah2c";
40
+
41
+ return {
42
+ handleClick,
43
+ handleMouseEnter,
44
+ handleMouseLeave,
45
+ variantImg
46
+ };
47
+ };
@@ -72,6 +72,19 @@ export const ProductsFragment = gql`
72
72
  amount_off
73
73
  }
74
74
  }
75
+ minimum_price {
76
+ final_price {
77
+ currency
78
+ value
79
+ }
80
+ regular_price {
81
+ currency
82
+ value
83
+ }
84
+ discount {
85
+ amount_off
86
+ }
87
+ }
75
88
  }
76
89
  sku
77
90
  small_image {
@@ -10,6 +10,7 @@ export const ProductDetailsFragment = gql`
10
10
  category_uid
11
11
  }
12
12
  }
13
+ link_to_other_stores
13
14
  seller {
14
15
  name
15
16
  url_key
@@ -59,6 +60,19 @@ export const ProductDetailsFragment = gql`
59
60
  amount_off
60
61
  }
61
62
  }
63
+ minimum_price {
64
+ final_price {
65
+ currency
66
+ value
67
+ }
68
+ regular_price {
69
+ currency
70
+ value
71
+ }
72
+ discount {
73
+ amount_off
74
+ }
75
+ }
62
76
  }
63
77
  sku
64
78
  auction_data {
@@ -196,6 +210,15 @@ export const ProductDetailsFragment = gql`
196
210
  amount_off
197
211
  }
198
212
  }
213
+ minimum_price {
214
+ final_price {
215
+ currency
216
+ value
217
+ }
218
+ discount {
219
+ amount_off
220
+ }
221
+ }
199
222
  }
200
223
  custom_attributes {
201
224
  selected_attribute_options {
@@ -18,7 +18,7 @@ import SportCardsSets from '@riosst100/pwa-marketplace/src/components/SportCards
18
18
  import NonSportCardsSets from '@riosst100/pwa-marketplace/src/components/NonSportCardsSets/nonSportCardsSets';
19
19
  import LegoSets from '@riosst100/pwa-marketplace/src/components/LegoSets/legoSets';
20
20
  import TrainsSets from '@riosst100/pwa-marketplace/src/components/TrainsSets/trainsSets';
21
- import ShopByBrands from '@riosst100/pwa-marketplace/src/components/ShopByBrands/shopByBrands';
21
+ import SetsData from '@riosst100/pwa-marketplace/src/components/SetsData/setsData';
22
22
 
23
23
  const MESSAGES = new Map().set(
24
24
  'NOT_FOUND',
@@ -81,6 +81,8 @@ const Category = props => {
81
81
  );
82
82
  }
83
83
 
84
+ const allowedShopby = ['card_artist'];
85
+
84
86
  return (
85
87
  <Fragment>
86
88
  <Meta name="description" content={metaDescription} />
@@ -89,7 +91,13 @@ const Category = props => {
89
91
  categoryId={uid}
90
92
  isLoading={loading} />
91
93
  ) : (
92
- shopby == "singles" || shopby == "lego_set_name" && parentCategoryUrlKey == "lego" ? <LegoSets
94
+ allowedShopby.includes(shopby) ? <ShopBy
95
+ categoryId={uid}
96
+ shopby={shopby}
97
+ isLoading={loading} /> : shopby == "release_year" || shopby == "expansion_sets" || shopby == "sets" ? <SetsData
98
+ categoryId={uid}
99
+ shopby={shopby}
100
+ isLoading={loading} /> : shopby == "singles" || shopby == "lego_set_name" && parentCategoryUrlKey == "lego" ? <LegoSets
93
101
  categoryId={uid}
94
102
  shopby={shopby}
95
103
  isLoading={loading} /> : shopby && parentCategoryUrlKey == "non-sports-cards" ? <NonSportCardsSets
@@ -98,7 +106,7 @@ const Category = props => {
98
106
  isLoading={loading} /> : shopby == "sc_baseball_players" || shopby == "sc_baseball_teams" || shopby == "release" && parentCategoryUrlKey == "sport-cards" ? <SportCardsSets
99
107
  categoryId={uid}
100
108
  shopby={shopby}
101
- isLoading={loading} /> : shopby == "sets" || shopby == "expansion_sets" || shopby == "release_year" ? <ShopBySets
109
+ isLoading={loading} /> : shopby == "release_year" ? <ShopBySets
102
110
  categoryId={uid}
103
111
  shopby={shopby}
104
112
  isLoading={loading} /> : shopby == "card" ? <ShopByCard
@@ -251,9 +251,6 @@ const CategoryContent = props => {
251
251
 
252
252
  let isSingles = false;
253
253
 
254
- // console.log(allActiveFilters)
255
-
256
- // console.log(virtualCategoryFilters)
257
254
  const urlKey = category?.url_key;
258
255
 
259
256
  if (allActiveFilters && allActiveFilters.size > 0) {
@@ -281,9 +278,6 @@ const CategoryContent = props => {
281
278
 
282
279
  const currentFilter = activeFilters && activeFilters.length ? activeFilters[activeFilters.length - 1].label : '';
283
280
 
284
- // console.log(activeFilters.length)
285
- // console.log(activeFilters.map(u => u.label).join(' - '))
286
-
287
281
  let title = activeFilters && activeFilters.length ? (
288
282
  activeFilters.length > 1 ?
289
283
  activeFilters[activeFilters.length - 1].label
@@ -34,7 +34,6 @@ const AccountInformationPage = props => {
34
34
  recaptchaWidgetProps,
35
35
  setShouldShowNewPassword,
36
36
  } = talonProps;
37
- console.log("🚀 ~ AccountInformationPage ~ talonProps:", talonProps)
38
37
  const { formatMessage } = useIntl();
39
38
 
40
39
  const errorMessage = loadDataError ? (
@@ -30,7 +30,6 @@ const EditForm = props => {
30
30
 
31
31
  const [showNewPassword, setShowNewPassword] = React.useState(false);
32
32
  const handleChange = (event) => {
33
- console.log("🚀 ~ handleChange ~ event:", event)
34
33
  setShowNewPassword(event.target.checked);
35
34
  }
36
35
 
@@ -74,15 +74,12 @@ const Breadcrumbs = props => {
74
74
  );
75
75
  }
76
76
 
77
- // console.log(currentFilter)
78
-
79
77
  const filterBreadcrumbsElement = [];
80
78
 
81
79
  const lastIndex = currentFilter ? currentFilter.length - 1 : 0;
82
80
  // const filterpath = ;
83
81
 
84
82
  currentFilter && currentFilter.length && currentFilter.map((filter, index) => {
85
- console.log(filter)
86
83
  currentProduct ? (
87
84
  filterBreadcrumbsElement.push(
88
85
  <>
@@ -7,7 +7,6 @@ import defaultClasses from './orderSummary.module.css';
7
7
 
8
8
  const OrderSummary = props => {
9
9
  const classes = useStyle(defaultClasses, props.classes);
10
- console.log("🚀 ~ OrderSummary ~ props:", props)
11
10
  return (
12
11
  <div data-cy="OrderSummary-root" className={classes.root}>
13
12
  <h2 aria-live="polite" className="text-[16px] font-medium mb-4">