@riosst100/pwa-marketplace 1.8.1 → 1.8.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.
- package/i18n/id_ID.json +508 -508
- package/package.json +1 -1
- package/src/components/CustomSubCategory/subCategory.js +0 -14
- package/src/components/FilterTop/FilterBlockList/filterTopItemGroup.module.css +1 -1
- package/src/components/FilterTop/filterTop.js +2 -2
- package/src/components/FilterTop/filterTop.module.css +1 -1
- package/src/components/FilterTopBackup/CustomFilters/customFilter.js +83 -83
- package/src/components/FilterTopBackup/CustomFilters/customFilter.module.css +21 -21
- package/src/components/FilterTopBackup/CustomFilters/customFilters.js +131 -131
- package/src/components/FilterTopBackup/CustomFilters/customFilters.module.css +22 -22
- package/src/components/FilterTopBackup/CustomFilters/index.js +1 -1
- package/src/components/FilterTopBackup/filterTop.js +14 -14
- package/src/components/FilterTopBackup/filterTop.module.css +22 -22
- package/src/components/FilterTopBackup/filterTop.shimmer.js +24 -24
- package/src/components/FilterTopBackup/index.js +2 -2
- package/src/components/Header/websiteSwitcher.shimmer.js +6 -6
- package/src/components/Header/websiteSwitcherItem.js +47 -47
- package/src/components/Header/websiteSwitcherItem.module.css +20 -20
- package/src/components/PhoneTextInput/index.js +1 -1
- package/src/components/PhoneTextInput/phoneTextInput.js +62 -62
- package/src/components/ProductListTab/index.js +4 -4
- package/src/components/ProductListTab/productListTab.module.css +64 -64
- package/src/components/ProductListTab/productListTab.shimmer.js +24 -24
- package/src/components/SellerCountry/index.js +1 -1
- package/src/components/SellerCountry/sellerCountry.js +71 -71
- package/src/components/SellerCountry/sellerCountry.module.css +3 -3
- package/src/components/ShopByCategory/index.js +2 -2
- package/src/components/ShopByCategory/shopByCategory.js +69 -69
- package/src/components/ShopByCategory/shopByCategory.module.css +58 -58
- package/src/components/ShopByCategory/shopByCategory.shimmer.js +24 -24
- package/src/components/SubCategory/subCategory.js +1 -1
- package/src/components/WebsiteSwitcher/websiteSwitcher.shimmer.js +6 -6
- package/src/components/WebsiteSwitcher/websiteSwitcherItem.js +47 -47
- package/src/components/WebsiteSwitcher/websiteSwitcherItem.module.css +20 -20
- package/src/overwrites/peregrine/lib/talons/MegaMenu/megaMenu.gql.js +96 -96
- package/src/overwrites/peregrine/lib/talons/MegaMenu/useMegaMenu.js +199 -199
- package/src/overwrites/peregrine/lib/talons/MegaMenu/useMegaMenuItem.js +66 -66
- package/src/overwrites/peregrine/lib/talons/MegaMenu/useSubMenu.js +20 -20
- package/src/overwrites/peregrine/lib/talons/ProductFullDetail/useProductFullDetail.js +642 -642
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/category.gql.js +49 -49
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/useCategory.js +227 -227
- package/src/overwrites/peregrine/lib/talons/RootComponents/Product/product.gql.js +31 -31
- package/src/overwrites/peregrine/lib/talons/RootComponents/Product/productDetailFragment.gql.js +235 -235
- package/src/overwrites/venia-ui/lib/components/Header/cartTrigger.module.css +47 -47
- package/src/overwrites/venia-ui/lib/components/RadioGroup/radio.js +60 -60
- package/src/overwrites/venia-ui/lib/components/RadioGroup/radio.module.css +70 -70
- package/src/talons/AttributesBlock/attributesBlock.gql.js +15 -15
- package/src/talons/CustomFilters/customFilters.gql.js +45 -45
- package/src/talons/CustomFilters/useCustomFilters.js +5 -2
- package/src/talons/FilterTop/filterTop.gql.js +45 -45
- package/src/talons/FilterTop/index.js +1 -1
- package/src/talons/FilterTop/useFilterTop.js +5 -4
- package/src/talons/Header/websiteSwitcher.gql.js +45 -45
- package/src/talons/SellerReview/sellerReview.gql.js +53 -53
- package/src/talons/ShopByCategory/index.js +1 -1
- package/src/talons/ShopByCategory/shopByCategory.gql.js +38 -38
- package/src/talons/ShopByCategory/useShopByCategory.js +69 -69
- package/src/talons/SubCategory/subCategory.gql.js +15 -15
- package/src/talons/SubCategory/useSubCategory.js +3 -3
- package/src/talons/WebsiteSwitcher/websiteSwitcher.gql.js +45 -45
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { gql } from '@apollo/client';
|
|
2
|
-
|
|
3
|
-
export const GET_STORE_CONFIG_DATA = gql`
|
|
4
|
-
query GetStoreConfigForBreadcrumbs {
|
|
5
|
-
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
6
|
-
storeConfig {
|
|
7
|
-
store_code
|
|
8
|
-
category_url_suffix
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
export const GET_CATEGORY_LIST = gql`
|
|
14
|
-
query getCategoryData($id: String!) {
|
|
15
|
-
categories(filters: { category_uid: { eq: $id } }) {
|
|
16
|
-
items {
|
|
17
|
-
uid
|
|
18
|
-
name
|
|
19
|
-
url_path
|
|
20
|
-
parent {
|
|
21
|
-
uid
|
|
22
|
-
name
|
|
23
|
-
url_path
|
|
24
|
-
}
|
|
25
|
-
children {
|
|
26
|
-
uid
|
|
27
|
-
name
|
|
28
|
-
url_path
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
|
|
35
|
-
export default {
|
|
36
|
-
getStoreConfigQuery: GET_STORE_CONFIG_DATA,
|
|
37
|
-
getCategoryQuery: GET_CATEGORY_LIST
|
|
38
|
-
};
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
|
|
3
|
+
export const GET_STORE_CONFIG_DATA = gql`
|
|
4
|
+
query GetStoreConfigForBreadcrumbs {
|
|
5
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
6
|
+
storeConfig {
|
|
7
|
+
store_code
|
|
8
|
+
category_url_suffix
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
export const GET_CATEGORY_LIST = gql`
|
|
14
|
+
query getCategoryData($id: String!) {
|
|
15
|
+
categories(filters: { category_uid: { eq: $id } }) {
|
|
16
|
+
items {
|
|
17
|
+
uid
|
|
18
|
+
name
|
|
19
|
+
url_path
|
|
20
|
+
parent {
|
|
21
|
+
uid
|
|
22
|
+
name
|
|
23
|
+
url_path
|
|
24
|
+
}
|
|
25
|
+
children {
|
|
26
|
+
uid
|
|
27
|
+
name
|
|
28
|
+
url_path
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
getStoreConfigQuery: GET_STORE_CONFIG_DATA,
|
|
37
|
+
getCategoryQuery: GET_CATEGORY_LIST
|
|
38
|
+
};
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import { useQuery } from '@apollo/client';
|
|
3
|
-
|
|
4
|
-
import mergeOperations from '@magento/peregrine/lib/util/shallowMerge';
|
|
5
|
-
|
|
6
|
-
import DEFAULT_OPERATIONS from './shopByCategory.gql';
|
|
7
|
-
|
|
8
|
-
const getPath = (path, suffix) => {
|
|
9
|
-
if (path) {
|
|
10
|
-
return `/${path}${suffix || ''}`;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// If there is no path this is just a dead link.
|
|
14
|
-
return '#';
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const useShopByCategory = props => {
|
|
18
|
-
const { children, parent } = props;
|
|
19
|
-
|
|
20
|
-
const operations = mergeOperations(DEFAULT_OPERATIONS, props.operations);
|
|
21
|
-
const { getStoreConfigQuery } = operations;
|
|
22
|
-
|
|
23
|
-
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
24
|
-
fetchPolicy: 'cache-and-network'
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const categoryUrlSuffix = useMemo(() => {
|
|
28
|
-
if (storeConfigData) {
|
|
29
|
-
return storeConfigData.storeConfig.category_url_suffix;
|
|
30
|
-
}
|
|
31
|
-
}, [storeConfigData]);
|
|
32
|
-
|
|
33
|
-
const childrenNormalizedData = useMemo(() => {
|
|
34
|
-
if (children) {
|
|
35
|
-
return (
|
|
36
|
-
children.length &&
|
|
37
|
-
children
|
|
38
|
-
.map(category => ({
|
|
39
|
-
text: category.name,
|
|
40
|
-
path: getPath(
|
|
41
|
-
category.url_path,
|
|
42
|
-
categoryUrlSuffix
|
|
43
|
-
)
|
|
44
|
-
}))
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
}, [categoryUrlSuffix, children]);
|
|
48
|
-
|
|
49
|
-
const parentNormalizedData = useMemo(() => {
|
|
50
|
-
if (parent) {
|
|
51
|
-
return (
|
|
52
|
-
parent.length &&
|
|
53
|
-
parent
|
|
54
|
-
.map(category => ({
|
|
55
|
-
text: category.name,
|
|
56
|
-
path: getPath(
|
|
57
|
-
category.url_path,
|
|
58
|
-
categoryUrlSuffix
|
|
59
|
-
)
|
|
60
|
-
}))
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}, [categoryUrlSuffix, parent]);
|
|
64
|
-
|
|
65
|
-
return {
|
|
66
|
-
childrenNormalizedData: childrenNormalizedData || [],
|
|
67
|
-
parentNormalizedData: parentNormalizedData || []
|
|
68
|
-
};
|
|
69
|
-
};
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useQuery } from '@apollo/client';
|
|
3
|
+
|
|
4
|
+
import mergeOperations from '@magento/peregrine/lib/util/shallowMerge';
|
|
5
|
+
|
|
6
|
+
import DEFAULT_OPERATIONS from './shopByCategory.gql';
|
|
7
|
+
|
|
8
|
+
const getPath = (path, suffix) => {
|
|
9
|
+
if (path) {
|
|
10
|
+
return `/${path}${suffix || ''}`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// If there is no path this is just a dead link.
|
|
14
|
+
return '#';
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const useShopByCategory = props => {
|
|
18
|
+
const { children, parent } = props;
|
|
19
|
+
|
|
20
|
+
const operations = mergeOperations(DEFAULT_OPERATIONS, props.operations);
|
|
21
|
+
const { getStoreConfigQuery } = operations;
|
|
22
|
+
|
|
23
|
+
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
24
|
+
fetchPolicy: 'cache-and-network'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const categoryUrlSuffix = useMemo(() => {
|
|
28
|
+
if (storeConfigData) {
|
|
29
|
+
return storeConfigData.storeConfig.category_url_suffix;
|
|
30
|
+
}
|
|
31
|
+
}, [storeConfigData]);
|
|
32
|
+
|
|
33
|
+
const childrenNormalizedData = useMemo(() => {
|
|
34
|
+
if (children) {
|
|
35
|
+
return (
|
|
36
|
+
children.length &&
|
|
37
|
+
children
|
|
38
|
+
.map(category => ({
|
|
39
|
+
text: category.name,
|
|
40
|
+
path: getPath(
|
|
41
|
+
category.url_path,
|
|
42
|
+
categoryUrlSuffix
|
|
43
|
+
)
|
|
44
|
+
}))
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}, [categoryUrlSuffix, children]);
|
|
48
|
+
|
|
49
|
+
const parentNormalizedData = useMemo(() => {
|
|
50
|
+
if (parent) {
|
|
51
|
+
return (
|
|
52
|
+
parent.length &&
|
|
53
|
+
parent
|
|
54
|
+
.map(category => ({
|
|
55
|
+
text: category.name,
|
|
56
|
+
path: getPath(
|
|
57
|
+
category.url_path,
|
|
58
|
+
categoryUrlSuffix
|
|
59
|
+
)
|
|
60
|
+
}))
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}, [categoryUrlSuffix, parent]);
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
childrenNormalizedData: childrenNormalizedData || [],
|
|
67
|
+
parentNormalizedData: parentNormalizedData || []
|
|
68
|
+
};
|
|
69
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { gql } from '@apollo/client';
|
|
2
|
-
|
|
3
|
-
export const GET_STORE_CONFIG_DATA = gql`
|
|
4
|
-
query GetStoreConfigForBreadcrumbs {
|
|
5
|
-
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
6
|
-
storeConfig {
|
|
7
|
-
store_code
|
|
8
|
-
category_url_suffix
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
getStoreConfigQuery: GET_STORE_CONFIG_DATA
|
|
15
|
-
};
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
|
|
3
|
+
export const GET_STORE_CONFIG_DATA = gql`
|
|
4
|
+
query GetStoreConfigForBreadcrumbs {
|
|
5
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
6
|
+
storeConfig {
|
|
7
|
+
store_code
|
|
8
|
+
category_url_suffix
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
getStoreConfigQuery: GET_STORE_CONFIG_DATA
|
|
15
|
+
};
|
|
@@ -33,10 +33,10 @@ export const useSubCategory = props => {
|
|
|
33
33
|
const normalizedData = useMemo(() => {
|
|
34
34
|
if (children) {
|
|
35
35
|
return (
|
|
36
|
-
children.length &&
|
|
36
|
+
children && children.length &&
|
|
37
37
|
children
|
|
38
|
-
.map(category => ({
|
|
39
|
-
text: category
|
|
38
|
+
.map((category, index) => ({
|
|
39
|
+
text: category && typeof category.name != "undefined" ? category.name : '',
|
|
40
40
|
path: getPath(
|
|
41
41
|
category.url_path,
|
|
42
42
|
categoryUrlSuffix
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { gql } from '@apollo/client';
|
|
2
|
-
|
|
3
|
-
export const GET_STORE_CONFIG_DATA = gql`
|
|
4
|
-
query getStoreConfigData {
|
|
5
|
-
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
6
|
-
storeConfig {
|
|
7
|
-
store_code
|
|
8
|
-
store_name
|
|
9
|
-
store_group_name
|
|
10
|
-
website_name
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
|
-
export const GET_ROUTE_DATA = gql`
|
|
16
|
-
query getRouteData($url: String!) {
|
|
17
|
-
route(url: $url) {
|
|
18
|
-
relative_url
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
export const GET_AVAILABLE_WEBSITES_DATA = gql`
|
|
24
|
-
query availableStoresByUserIp {
|
|
25
|
-
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
26
|
-
availableStoresByUserIp {
|
|
27
|
-
default_display_currency_code
|
|
28
|
-
locale
|
|
29
|
-
secure_base_media_url
|
|
30
|
-
store_code
|
|
31
|
-
store_group_code
|
|
32
|
-
store_group_name
|
|
33
|
-
store_name
|
|
34
|
-
store_sort_order
|
|
35
|
-
website_name
|
|
36
|
-
website_code
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
export default {
|
|
42
|
-
getStoreConfigData: GET_STORE_CONFIG_DATA,
|
|
43
|
-
getRouteData: GET_ROUTE_DATA,
|
|
44
|
-
getAvailableWebsitesData: GET_AVAILABLE_WEBSITES_DATA
|
|
45
|
-
};
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
|
|
3
|
+
export const GET_STORE_CONFIG_DATA = gql`
|
|
4
|
+
query getStoreConfigData {
|
|
5
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
6
|
+
storeConfig {
|
|
7
|
+
store_code
|
|
8
|
+
store_name
|
|
9
|
+
store_group_name
|
|
10
|
+
website_name
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const GET_ROUTE_DATA = gql`
|
|
16
|
+
query getRouteData($url: String!) {
|
|
17
|
+
route(url: $url) {
|
|
18
|
+
relative_url
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
export const GET_AVAILABLE_WEBSITES_DATA = gql`
|
|
24
|
+
query availableStoresByUserIp {
|
|
25
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
26
|
+
availableStoresByUserIp {
|
|
27
|
+
default_display_currency_code
|
|
28
|
+
locale
|
|
29
|
+
secure_base_media_url
|
|
30
|
+
store_code
|
|
31
|
+
store_group_code
|
|
32
|
+
store_group_name
|
|
33
|
+
store_name
|
|
34
|
+
store_sort_order
|
|
35
|
+
website_name
|
|
36
|
+
website_code
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
getStoreConfigData: GET_STORE_CONFIG_DATA,
|
|
43
|
+
getRouteData: GET_ROUTE_DATA,
|
|
44
|
+
getAvailableWebsitesData: GET_AVAILABLE_WEBSITES_DATA
|
|
45
|
+
};
|