@riosst100/pwa-marketplace 2.5.4 → 2.5.6
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/package.json +1 -1
- package/src/components/FilterTop/CustomFilters/customFilters.js +1 -1
- package/src/components/FilterTopBackup/CustomFilters/customFilters.js +1 -1
- package/src/overwrites/pagebuilder/lib/ContentTypes/Products/Carousel/useCarousel.js +2 -1
- package/src/overwrites/peregrine/lib/talons/Breadcrumbs/useBreadcrumbs.js +2 -1
- package/src/overwrites/peregrine/lib/talons/MegaMenu/useMegaMenu.js +2 -1
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/useCategoryContent.js +2 -1
- package/src/talons/AttributesBlock/useAttributesBlock.js +2 -1
- package/src/talons/CustomFilters/customFilters.gql.js +9 -6
- package/src/talons/CustomFilters/useCustomFilters.js +2 -1
- package/src/talons/FilterTop/customFilters.gql.js +9 -6
- package/src/talons/FilterTop/filterTop.gql.js +9 -6
- package/src/talons/FilterTop/useFilterTop.js +2 -2
- package/src/talons/SellerMegaMenu/useSellerMegaMenu.js +2 -1
- package/src/talons/SellerProducts/useProductContent.js +2 -1
- package/src/talons/SubCategory/useCustomSubCategory.js +2 -1
- package/src/talons/SubCategory/useSubCategory.js +2 -1
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@ const CustomFilters = props => {
|
|
|
56
56
|
// create elements and params at the same time for efficiency
|
|
57
57
|
const filterElements = useMemo(() => {
|
|
58
58
|
const elements = [];
|
|
59
|
-
customFiltersData && customFiltersData.map((filter, index) => {
|
|
59
|
+
customFiltersData && customFiltersData.filters && customFiltersData.filters.map((filter, index) => {
|
|
60
60
|
const { label, attribute_code, options } = filter || {};
|
|
61
61
|
|
|
62
62
|
const group = attribute_code;
|
|
@@ -59,7 +59,7 @@ const CustomFilters = props => {
|
|
|
59
59
|
// create elements and params at the same time for efficiency
|
|
60
60
|
const filterElements = useMemo(() => {
|
|
61
61
|
const elements = [];
|
|
62
|
-
customFiltersData && customFiltersData.map((filter, index) => {
|
|
62
|
+
customFiltersData && customFiltersData.filters && customFiltersData.filters.map((filter, index) => {
|
|
63
63
|
const { label, attribute_code, options } = filter || {};
|
|
64
64
|
|
|
65
65
|
const group = attribute_code;
|
|
@@ -14,7 +14,8 @@ export const useCarousel = (props = {}) => {
|
|
|
14
14
|
useCustomerWishlistSkus();
|
|
15
15
|
|
|
16
16
|
const { data: storeConfigData } = useQuery(operations.getStoreConfigQuery, {
|
|
17
|
-
fetchPolicy: 'cache-and-network'
|
|
17
|
+
fetchPolicy: 'cache-and-network',
|
|
18
|
+
nextFetchPolicy: 'cache-first'
|
|
18
19
|
});
|
|
19
20
|
|
|
20
21
|
const storeConfig = storeConfigData ? storeConfigData.storeConfig : null;
|
|
@@ -48,7 +48,8 @@ export const useBreadcrumbs = props => {
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
51
|
-
fetchPolicy: 'cache-and-network'
|
|
51
|
+
fetchPolicy: 'cache-and-network',
|
|
52
|
+
nextFetchPolicy: 'cache-first'
|
|
52
53
|
});
|
|
53
54
|
|
|
54
55
|
const categoryUrlSuffix = useMemo(() => {
|
|
@@ -27,7 +27,8 @@ export const useMegaMenu = (props = {}) => {
|
|
|
27
27
|
const [disableFocus, setDisableFocus] = useState(false);
|
|
28
28
|
|
|
29
29
|
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
30
|
-
fetchPolicy: 'cache-and-network'
|
|
30
|
+
fetchPolicy: 'cache-and-network',
|
|
31
|
+
nextFetchPolicy: 'cache-first'
|
|
31
32
|
});
|
|
32
33
|
|
|
33
34
|
const { data } = useQuery(getMegaMenuQuery, {
|
|
@@ -39,7 +39,8 @@ export const useCategoryContent = props => {
|
|
|
39
39
|
const placeholderItems = Array.from({ length: pageSize }).fill(null);
|
|
40
40
|
|
|
41
41
|
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
42
|
-
fetchPolicy: 'cache-and-network'
|
|
42
|
+
fetchPolicy: 'cache-and-network',
|
|
43
|
+
nextFetchPolicy: 'cache-first'
|
|
43
44
|
});
|
|
44
45
|
|
|
45
46
|
const virtualCategoryFilters = useMemo(() => {
|
|
@@ -21,7 +21,8 @@ export const useAttributesBlock = props => {
|
|
|
21
21
|
const { getStoreConfigQuery } = operations;
|
|
22
22
|
|
|
23
23
|
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
24
|
-
fetchPolicy: 'cache-and-network'
|
|
24
|
+
fetchPolicy: 'cache-and-network',
|
|
25
|
+
nextFetchPolicy: 'cache-first'
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
const categoryUrlSuffix = useMemo(() => {
|
|
@@ -3,14 +3,17 @@ import { gql } from '@apollo/client';
|
|
|
3
3
|
export const GET_CUSTOM_FILTERS = gql`
|
|
4
4
|
query GetCustomFilters($filters: ProductAttributeFilterInput!) {
|
|
5
5
|
customSubFilters(filters: $filters) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
attribute_code
|
|
9
|
-
options {
|
|
6
|
+
filter_id
|
|
7
|
+
filters {
|
|
10
8
|
label
|
|
11
|
-
|
|
9
|
+
count
|
|
10
|
+
attribute_code
|
|
11
|
+
options {
|
|
12
|
+
label
|
|
13
|
+
value
|
|
14
|
+
}
|
|
15
|
+
position
|
|
12
16
|
}
|
|
13
|
-
position
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
`;
|
|
@@ -35,7 +35,8 @@ export const useCustomFilters = props => {
|
|
|
35
35
|
const { getCustomFilters, getFilterInputsQuery, getStoreConfigQuery } = operations;
|
|
36
36
|
|
|
37
37
|
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
38
|
-
fetchPolicy: 'cache-and-network'
|
|
38
|
+
fetchPolicy: 'cache-and-network',
|
|
39
|
+
nextFetchPolicy: 'cache-first'
|
|
39
40
|
});
|
|
40
41
|
|
|
41
42
|
const [runQuery, queryResponse] = useLazyQuery(getCustomFilters, {
|
|
@@ -3,14 +3,17 @@ import { gql } from '@apollo/client';
|
|
|
3
3
|
export const GET_CUSTOM_FILTERS = gql`
|
|
4
4
|
query GetCustomFilters($filters: ProductAttributeFilterInput!) {
|
|
5
5
|
customSubFilters(filters: $filters) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
attribute_code
|
|
9
|
-
options {
|
|
6
|
+
filter_id
|
|
7
|
+
filters {
|
|
10
8
|
label
|
|
11
|
-
|
|
9
|
+
count
|
|
10
|
+
attribute_code
|
|
11
|
+
options {
|
|
12
|
+
label
|
|
13
|
+
value
|
|
14
|
+
}
|
|
15
|
+
position
|
|
12
16
|
}
|
|
13
|
-
position
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
`;
|
|
@@ -3,14 +3,17 @@ import { gql } from '@apollo/client';
|
|
|
3
3
|
export const GET_CUSTOM_FILTERS = gql`
|
|
4
4
|
query GetCustomFilters($search: String, $filterBy: String, $shopby: String, $category: String!, $filters: ProductAttributeFilterInput!) {
|
|
5
5
|
customSubFilters(search: $search, filterBy: $filterBy, shopby: $shopby, category: $category, filters: $filters) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
attribute_code
|
|
9
|
-
options {
|
|
6
|
+
filter_id
|
|
7
|
+
filters {
|
|
10
8
|
label
|
|
11
|
-
|
|
9
|
+
count
|
|
10
|
+
attribute_code
|
|
11
|
+
options {
|
|
12
|
+
label
|
|
13
|
+
value
|
|
14
|
+
}
|
|
15
|
+
position
|
|
12
16
|
}
|
|
13
|
-
position
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
`;
|
|
@@ -184,8 +184,8 @@ export const useFilterTop = props => {
|
|
|
184
184
|
const itemsByGroup = new Map();
|
|
185
185
|
const customFiltersMap = [];
|
|
186
186
|
|
|
187
|
-
if (customFiltersData) {
|
|
188
|
-
customFiltersData.map(({ attribute_code, options }, index) => {
|
|
187
|
+
if (customFiltersData && customFiltersData.filters) {
|
|
188
|
+
customFiltersData.filters.map(({ attribute_code, options }, index) => {
|
|
189
189
|
|
|
190
190
|
customFiltersMap.push(attribute_code)
|
|
191
191
|
|
|
@@ -27,7 +27,8 @@ export const useSellerMegaMenu = (props = {}) => {
|
|
|
27
27
|
const [disableFocus, setDisableFocus] = useState(false);
|
|
28
28
|
|
|
29
29
|
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
30
|
-
fetchPolicy: 'cache-and-network'
|
|
30
|
+
fetchPolicy: 'cache-and-network',
|
|
31
|
+
nextFetchPolicy: 'cache-first'
|
|
31
32
|
});
|
|
32
33
|
|
|
33
34
|
const { data } = useQuery(getMegaMenuQuery, {
|
|
@@ -26,7 +26,8 @@ export const useProductContent = props => {
|
|
|
26
26
|
// console.log(getStoreConfigQuery)
|
|
27
27
|
|
|
28
28
|
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
29
|
-
fetchPolicy: 'cache-and-network'
|
|
29
|
+
fetchPolicy: 'cache-and-network',
|
|
30
|
+
nextFetchPolicy: 'cache-first'
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
// return '';
|
|
@@ -21,7 +21,8 @@ export const useCustomSubCategory = props => {
|
|
|
21
21
|
const { getStoreConfigQuery } = operations;
|
|
22
22
|
|
|
23
23
|
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
24
|
-
fetchPolicy: 'cache-and-network'
|
|
24
|
+
fetchPolicy: 'cache-and-network',
|
|
25
|
+
nextFetchPolicy: 'cache-first'
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
const categoryUrlSuffix = useMemo(() => {
|
|
@@ -21,7 +21,8 @@ export const useSubCategory = props => {
|
|
|
21
21
|
const { getStoreConfigQuery } = operations;
|
|
22
22
|
|
|
23
23
|
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
24
|
-
fetchPolicy: 'cache-and-network'
|
|
24
|
+
fetchPolicy: 'cache-and-network',
|
|
25
|
+
nextFetchPolicy: 'cache-first'
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
const categoryUrlSuffix = useMemo(() => {
|