@abcagency/hc-ui-components 1.3.57 → 1.3.59
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/dist/apis/hcApi.js +85 -85
- package/dist/apis/hcApi.js.map +1 -1
- package/dist/clientToken.js.map +1 -1
- package/dist/components/containers/accordions/filter-container.js.map +1 -1
- package/dist/components/containers/accordions/filter-item-container.js +4 -2
- package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
- package/dist/components/containers/filter/filter-item-container.js +4 -2
- package/dist/components/containers/filter/filter-item-container.js.map +1 -1
- package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
- package/dist/components/containers/list/item-list-container.js +21 -21
- package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js.map +1 -1
- package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
- package/dist/components/modules/accordions/default.js.map +1 -1
- package/dist/components/modules/buttons/commute-pill.js.map +1 -1
- package/dist/components/modules/buttons/default.js.map +1 -1
- package/dist/components/modules/buttons/items-pill.js.map +1 -1
- package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
- package/dist/components/modules/buttons/show-all-button.js.map +1 -1
- package/dist/components/modules/cards/default.js.map +1 -1
- package/dist/components/modules/cards/filter.js.map +1 -1
- package/dist/components/modules/filter/item.js.map +1 -1
- package/dist/components/modules/filter/sort.js.map +1 -1
- package/dist/components/modules/grid.js.map +1 -1
- package/dist/components/modules/icon.js.map +1 -1
- package/dist/components/modules/list/header.js.map +1 -1
- package/dist/components/modules/list/item-list.js +40 -40
- package/dist/components/modules/maps/info-window-card.js.map +1 -1
- package/dist/components/modules/maps/map.js.map +1 -1
- package/dist/components/modules/maps/place-marker.js.map +1 -1
- package/dist/components/modules/maps/tabs.js.map +1 -1
- package/dist/constants/placeTypes.js.map +1 -1
- package/dist/contexts/mapContext.js +83 -83
- package/dist/contexts/mapListContext.js +190 -190
- package/dist/contexts/trackEventContext.js.map +1 -1
- package/dist/hooks/useList.js.map +1 -1
- package/dist/services/configService.js +9 -9
- package/dist/services/googlePlacesNearbyService.js +32 -32
- package/dist/services/googlePlacesNearbyService.js.map +1 -1
- package/dist/services/listingAggregatorService.js +34 -34
- package/dist/services/listingAggregatorService.js.map +1 -1
- package/dist/services/listingEntityService.js +9 -9
- package/dist/services/listingService.js +24 -24
- package/dist/services/recruiterService.js +10 -10
- package/dist/types/apis/hcApi.d.ts +5 -5
- package/dist/types/clientToken.d.ts +2 -2
- package/dist/types/components/containers/accordions/map-accordion-item-container.d.ts +12 -12
- package/dist/types/components/containers/jobListing/listing-details-container.d.ts +6 -6
- package/dist/types/components/containers/list/item-list-container.d.ts +9 -9
- package/dist/types/components/containers/list/list-item/list-item-container.d.ts +14 -14
- package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +10 -10
- package/dist/types/components/modules/accordions/default.d.ts +19 -19
- package/dist/types/components/modules/buttons/button-group-apply.d.ts +24 -24
- package/dist/types/components/modules/buttons/commute-pill.d.ts +5 -5
- package/dist/types/components/modules/buttons/default.d.ts +48 -48
- package/dist/types/components/modules/buttons/pill-wrapper.d.ts +3 -3
- package/dist/types/components/modules/dialogs/apply-dialog.d.ts +8 -8
- package/dist/types/components/modules/filter/sort.d.ts +8 -8
- package/dist/types/components/modules/grid.d.ts +8 -8
- package/dist/types/components/modules/icon.d.ts +10 -10
- package/dist/types/components/modules/jobListing/listing-details.d.ts +18 -18
- package/dist/types/components/modules/list/field-mapper.d.ts +10 -10
- package/dist/types/components/modules/list/header-item.d.ts +11 -11
- package/dist/types/components/modules/list/header.d.ts +12 -12
- package/dist/types/components/modules/list/item-expand-card/index.d.ts +7 -7
- package/dist/types/components/modules/list/item-expand-card/recruiter-contact-nav.d.ts +17 -17
- package/dist/types/components/modules/list/item-expand-card/recruiter-details.d.ts +21 -21
- package/dist/types/components/modules/list/item-expand-card/recruiter-headshot.d.ts +8 -8
- package/dist/types/components/modules/list/item-list.d.ts +20 -20
- package/dist/types/components/modules/list/list-item/list-item.d.ts +3 -3
- package/dist/types/constants/eventTypes.d.ts +14 -14
- package/dist/types/contexts/mapContext.d.ts +29 -29
- package/dist/types/contexts/mapListContext.d.ts +61 -61
- package/dist/types/contexts/trackEventContext.d.ts +6 -6
- package/dist/types/enums/SectionType.d.ts +9 -9
- package/dist/types/hooks/useList.d.ts +13 -13
- package/dist/types/services/configService.d.ts +6 -6
- package/dist/types/services/googlePlacesNearbyService.d.ts +5 -5
- package/dist/types/services/listingAggregatorService.d.ts +12 -12
- package/dist/types/services/listingEntityService.d.ts +6 -6
- package/dist/types/services/listingService.d.ts +9 -9
- package/dist/types/services/recruiterService.d.ts +6 -6
- package/dist/types/types/Address.d.ts +7 -7
- package/dist/types/types/ContentSection.d.ts +8 -8
- package/dist/types/types/GetListingParams.d.ts +8 -8
- package/dist/types/types/LatLng.d.ts +4 -4
- package/dist/types/types/ListingEntity.d.ts +10 -10
- package/dist/types/types/ListingFields.d.ts +25 -25
- package/dist/types/types/Listings.d.ts +31 -31
- package/dist/types/types/Recruiter.d.ts +9 -9
- package/dist/types/types/SimilarListing.d.ts +24 -24
- package/dist/types/types/config/Colors.d.ts +8 -8
- package/dist/types/types/config/MapConfig.d.ts +30 -30
- package/dist/types/types/config/PointsOfInterestConfig.d.ts +13 -13
- package/dist/types/types/config/SearchConfig.d.ts +4 -4
- package/dist/types/util/filterUtil.d.ts +28 -28
- package/dist/types/util/loading.d.ts +3 -3
- package/dist/types/util/localStorageUtil.d.ts +3 -3
- package/dist/types/util/mapUtil.d.ts +16 -16
- package/dist/types/util/sortUtil.d.ts +1 -1
- package/dist/types/util/stringUtils.d.ts +1 -1
- package/dist/types/util/urlFilterUtil.d.ts +8 -8
- package/dist/util/filterUtil.js +2 -2
- package/dist/util/filterUtil.js.map +1 -1
- package/dist/util/loading.js.map +1 -1
- package/dist/util/localStorageUtil.js +37 -37
- package/dist/util/localStorageUtil.js.map +1 -1
- package/dist/util/sortUtil.js.map +1 -1
- package/dist/util/stringUtils.js.map +1 -1
- package/dist/util/urlFilterUtil.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/hcApi.ts +109 -109
- package/src/clientToken.js +9 -9
- package/src/components/containers/accordions/filter-container.js +48 -48
- package/src/components/containers/accordions/filter-item-container.js +2 -0
- package/src/components/containers/accordions/map-accordion-item-container.js +70 -70
- package/src/components/containers/filter/filter-item-container.js +2 -1
- package/src/components/containers/jobListing/listing-details-container.js +40 -40
- package/src/components/containers/list/list-item/list-item-container.js +43 -43
- package/src/components/containers/maps/map-container.js +249 -249
- package/src/components/modules/accordions/MapAccordionItem.js +30 -30
- package/src/components/modules/accordions/default.js +171 -171
- package/src/components/modules/buttons/commute-pill.js +22 -22
- package/src/components/modules/buttons/default.js +194 -194
- package/src/components/modules/buttons/items-pill.js +35 -35
- package/src/components/modules/buttons/pill-wrapper.js +27 -27
- package/src/components/modules/buttons/show-all-button.js +19 -19
- package/src/components/modules/cards/default.js +167 -167
- package/src/components/modules/cards/filter.js +56 -56
- package/src/components/modules/filter/item.js +69 -69
- package/src/components/modules/filter/sort.js +83 -83
- package/src/components/modules/grid.js +54 -54
- package/src/components/modules/icon.js +33 -33
- package/src/components/modules/list/header.js +51 -51
- package/src/components/modules/list/item-expand-card/recruiter-contact-nav.js +50 -50
- package/src/components/modules/list/item-expand-card/recruiter-details.js +68 -68
- package/src/components/modules/list/item-expand-card/recruiter-headshot.js +22 -22
- package/src/components/modules/maps/info-window-card.js +17 -17
- package/src/components/modules/maps/map.js +64 -64
- package/src/components/modules/maps/place-marker.js +41 -41
- package/src/components/modules/maps/tabs.js +81 -81
- package/src/constants/placeTypes.js +8 -8
- package/src/contexts/trackEventContext.js +14 -14
- package/src/enums/SectionType.ts +9 -9
- package/src/hooks/useList.js +89 -89
- package/src/index.js +3 -3
- package/src/services/googlePlacesNearbyService.ts +42 -42
- package/src/services/listingAggregatorService.ts +76 -76
- package/src/util/arrayUtil.js +3 -3
- package/src/util/fieldMapper.js +22 -22
- package/src/util/filterUtil.js +311 -310
- package/src/util/loading.js +17 -17
- package/src/util/localStorageUtil.ts +34 -34
- package/src/util/sortUtil.js +32 -32
- package/src/util/stringUtils.js +6 -6
- package/src/util/urlFilterUtil.js +85 -85
- package/dist/types/contexts/themeContext.d.ts +0 -11
package/dist/apis/hcApi.js
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
1
|
import { getClientAuthKey } from '../clientToken.js';
|
|
2
2
|
|
|
3
|
-
const baseURL = "https://api.myhirecontrol.com";
|
|
4
|
-
const memoryStorage = {
|
|
5
|
-
authToken: null,
|
|
6
|
-
tokenExpiration: null
|
|
7
|
-
};
|
|
8
|
-
function setStorage(key, value) {
|
|
9
|
-
try {
|
|
10
|
-
sessionStorage.setItem(key, value);
|
|
11
|
-
}
|
|
12
|
-
catch (error) {
|
|
13
|
-
memoryStorage[key] = value;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function getStorage(key) {
|
|
17
|
-
try {
|
|
18
|
-
return sessionStorage.getItem(key) || memoryStorage[key];
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
return memoryStorage[key];
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
const login = async () => {
|
|
25
|
-
const clientAuthKey = getClientAuthKey();
|
|
26
|
-
try {
|
|
27
|
-
const response = await fetch(`${baseURL}/auth/login`, {
|
|
28
|
-
method: 'POST',
|
|
29
|
-
headers: {
|
|
30
|
-
'Content-Type': 'application/json'
|
|
31
|
-
},
|
|
32
|
-
body: JSON.stringify({
|
|
33
|
-
clientAuthKey: clientAuthKey
|
|
34
|
-
})
|
|
35
|
-
});
|
|
36
|
-
if (!response.ok) {
|
|
37
|
-
throw new Error('Login failed');
|
|
38
|
-
}
|
|
39
|
-
const data = await response.json();
|
|
40
|
-
if (data.token && data.expiration) {
|
|
41
|
-
setStorage('authToken', data.token);
|
|
42
|
-
setStorage('tokenExpiration', data.expiration);
|
|
43
|
-
return { token: data.token, expiration: data.expiration };
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
throw new Error('Invalid login response');
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
console.error('Login failed:', error);
|
|
51
|
-
throw error;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const fetchWithAuth = async (url, options = {}) => {
|
|
55
|
-
let token = getStorage('authToken');
|
|
56
|
-
const expirationDateTime = getStorage('tokenExpiration');
|
|
57
|
-
const currentTime = new Date();
|
|
58
|
-
if (!token || !expirationDateTime || new Date(expirationDateTime) <= currentTime) {
|
|
59
|
-
const authResponse = await login();
|
|
60
|
-
token = authResponse.token;
|
|
61
|
-
}
|
|
62
|
-
const headers = new Headers(options.headers || {});
|
|
63
|
-
headers.append('Authorization', `Bearer ${token}`);
|
|
64
|
-
const finalOptions = {
|
|
65
|
-
...options,
|
|
66
|
-
headers
|
|
67
|
-
};
|
|
68
|
-
const response = await fetch(`${baseURL}${url}`, finalOptions);
|
|
69
|
-
if (!response.ok)
|
|
70
|
-
throw new Error('Network response was not ok.');
|
|
71
|
-
return response;
|
|
72
|
-
};
|
|
73
|
-
var api = {
|
|
74
|
-
get: async (url) => {
|
|
75
|
-
const response = await fetchWithAuth(url);
|
|
76
|
-
return await response.json();
|
|
77
|
-
},
|
|
78
|
-
post: async (url, data) => {
|
|
79
|
-
const response = await fetchWithAuth(url, {
|
|
80
|
-
method: 'POST',
|
|
81
|
-
headers: {
|
|
82
|
-
'Content-Type': 'application/json'
|
|
83
|
-
},
|
|
84
|
-
body: JSON.stringify(data)
|
|
85
|
-
});
|
|
86
|
-
return await response.json();
|
|
87
|
-
}
|
|
3
|
+
const baseURL = "https://api.myhirecontrol.com";
|
|
4
|
+
const memoryStorage = {
|
|
5
|
+
authToken: null,
|
|
6
|
+
tokenExpiration: null
|
|
7
|
+
};
|
|
8
|
+
function setStorage(key, value) {
|
|
9
|
+
try {
|
|
10
|
+
sessionStorage.setItem(key, value);
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
memoryStorage[key] = value;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function getStorage(key) {
|
|
17
|
+
try {
|
|
18
|
+
return sessionStorage.getItem(key) || memoryStorage[key];
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return memoryStorage[key];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const login = async () => {
|
|
25
|
+
const clientAuthKey = getClientAuthKey();
|
|
26
|
+
try {
|
|
27
|
+
const response = await fetch(`${baseURL}/auth/login`, {
|
|
28
|
+
method: 'POST',
|
|
29
|
+
headers: {
|
|
30
|
+
'Content-Type': 'application/json'
|
|
31
|
+
},
|
|
32
|
+
body: JSON.stringify({
|
|
33
|
+
clientAuthKey: clientAuthKey
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
if (!response.ok) {
|
|
37
|
+
throw new Error('Login failed');
|
|
38
|
+
}
|
|
39
|
+
const data = await response.json();
|
|
40
|
+
if (data.token && data.expiration) {
|
|
41
|
+
setStorage('authToken', data.token);
|
|
42
|
+
setStorage('tokenExpiration', data.expiration);
|
|
43
|
+
return { token: data.token, expiration: data.expiration };
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
throw new Error('Invalid login response');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
console.error('Login failed:', error);
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const fetchWithAuth = async (url, options = {}) => {
|
|
55
|
+
let token = getStorage('authToken');
|
|
56
|
+
const expirationDateTime = getStorage('tokenExpiration');
|
|
57
|
+
const currentTime = new Date();
|
|
58
|
+
if (!token || !expirationDateTime || new Date(expirationDateTime) <= currentTime) {
|
|
59
|
+
const authResponse = await login();
|
|
60
|
+
token = authResponse.token;
|
|
61
|
+
}
|
|
62
|
+
const headers = new Headers(options.headers || {});
|
|
63
|
+
headers.append('Authorization', `Bearer ${token}`);
|
|
64
|
+
const finalOptions = {
|
|
65
|
+
...options,
|
|
66
|
+
headers
|
|
67
|
+
};
|
|
68
|
+
const response = await fetch(`${baseURL}${url}`, finalOptions);
|
|
69
|
+
if (!response.ok)
|
|
70
|
+
throw new Error('Network response was not ok.');
|
|
71
|
+
return response;
|
|
72
|
+
};
|
|
73
|
+
var api = {
|
|
74
|
+
get: async (url) => {
|
|
75
|
+
const response = await fetchWithAuth(url);
|
|
76
|
+
return await response.json();
|
|
77
|
+
},
|
|
78
|
+
post: async (url, data) => {
|
|
79
|
+
const response = await fetchWithAuth(url, {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
headers: {
|
|
82
|
+
'Content-Type': 'application/json'
|
|
83
|
+
},
|
|
84
|
+
body: JSON.stringify(data)
|
|
85
|
+
});
|
|
86
|
+
return await response.json();
|
|
87
|
+
}
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
export { api as default };
|
package/dist/apis/hcApi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hcApi.js","sources":["../../src/apis/hcApi.ts"],"sourcesContent":["import { getClientAuthKey } from '~/clientToken';\
|
|
1
|
+
{"version":3,"file":"hcApi.js","sources":["../../src/apis/hcApi.ts"],"sourcesContent":["import { getClientAuthKey } from '~/clientToken';\nconst baseURL = process.env.HC_API_BASE_URL as string;\n\ninterface MemoryStorage {\n\tauthToken: string | null;\n\ttokenExpiration: string | null;\n}\n\nconst memoryStorage: MemoryStorage = {\n\tauthToken: null,\n\ttokenExpiration: null\n};\n\nfunction setStorage(key: keyof MemoryStorage, value: string): void {\n\ttry {\n\t\tsessionStorage.setItem(key, value);\n\t} catch (error) {\n\t\tmemoryStorage[key] = value;\n\t}\n}\n\nfunction getStorage(key: keyof MemoryStorage): string | null {\n\ttry {\n\t\treturn sessionStorage.getItem(key) || memoryStorage[key];\n\t} catch (error) {\n\t\treturn memoryStorage[key];\n\t}\n}\n\ninterface AuthResponse {\n\ttoken: string;\n\texpiration: string;\n}\n\nconst login = async (): Promise<AuthResponse> => {\n\tconst clientAuthKey = getClientAuthKey();\n\n\ttry {\n\t\tconst response = await fetch(`${baseURL}/auth/login`, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json'\n\t\t\t},\n\t\t\tbody: JSON.stringify({\n\t\t\t\tclientAuthKey: clientAuthKey\n\t\t\t})\n\t\t});\n\n\t\tif (!response.ok) {\n\t\t\tthrow new Error('Login failed');\n\t\t}\n\n\t\tconst data = await response.json();\n\n\t\tif (data.token && data.expiration) {\n\t\t\tsetStorage('authToken', data.token);\n\t\t\tsetStorage('tokenExpiration', data.expiration);\n\t\t\treturn { token: data.token, expiration: data.expiration };\n\t\t} else {\n\t\t\tthrow new Error('Invalid login response');\n\t\t}\n\t} catch (error) {\n\t\tconsole.error('Login failed:', error);\n\t\tthrow error;\n\t}\n};\n\nconst fetchWithAuth = async (url: string, options: RequestInit = {}): Promise<Response> => {\n\tlet token = getStorage('authToken');\n\n\tconst expirationDateTime = getStorage('tokenExpiration');\n\tconst currentTime = new Date();\n\n\tif (!token || !expirationDateTime || new Date(expirationDateTime) <= currentTime) {\n\t\tconst authResponse = await login();\n\t\ttoken = authResponse.token;\n\t}\n\n\tconst headers = new Headers(options.headers || {});\n\theaders.append('Authorization', `Bearer ${token}`);\n\n\tconst finalOptions = {\n\t\t...options,\n\t\theaders\n\t};\n\n\tconst response = await fetch(`${baseURL}${url}`, finalOptions);\n\n\tif (!response.ok) throw new Error('Network response was not ok.');\n\n\treturn response;\n};\n\nexport default {\n\tget: async <T>(url: string): Promise<T> => {\n\t\tconst response = await fetchWithAuth(url);\n\t\treturn await response.json() as T;\n\t},\n\tpost: async <T>(url: string, data: any): Promise<T> => {\n\t\tconst response = await fetchWithAuth(url, {\n\t\t\tmethod: 'POST',\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/json'\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K,CAAE,CAAA,CAAC,CAAC;AAEnD,IAAA,MAAM,YAAY,GAAG;AACpB,QAAA,GAAG,OAAO;QACV,OAAO;KACP,CAAC;AAEF,IAAA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,CAAA,EAAG,OAAO,CAAA,EAAG,GAAG,CAAA,CAAE,EAAE,YAAY,CAAC,CAAC;IAE/D,IAAI,CAAC,QAAQ,CAAC,EAAE;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAElE,IAAA,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAEF,UAAe;AACd,IAAA,GAAG,EAAE,OAAU,GAAW,KAAgB;AACzC,QAAA,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,GAAG,CAAC,CAAC;AAC1C,QAAA,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAO,CAAC;KAClC;AACD,IAAA,IAAI,EAAE,OAAU,GAAW,EAAE,IAAS,KAAgB;AACrD,QAAA,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE;AACzC,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,OAAO,EAAE;AACR,gBAAA,cAAc,EAAE,kBAAkB;AAClC,aAAA;AACD,YAAA,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;AAC1B,SAAA,CAAC,CAAC;AACH,QAAA,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAO,CAAC;KAClC;CACD;;;;"}
|
package/dist/clientToken.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientToken.js","sources":["../src/clientToken.js"],"sourcesContent":["let clientAuthKey = null;\
|
|
1
|
+
{"version":3,"file":"clientToken.js","sources":["../src/clientToken.js"],"sourcesContent":["let clientAuthKey = null;\n\nexport const setClientAuthKey = key => {\n\tclientAuthKey = key;\n};\n\nexport const getClientAuthKey = () => {\n\treturn clientAuthKey;\n};\n"],"names":["clientAuthKey","setClientAuthKey","key","getClientAuthKey"],"mappings":"AAAA,IAAIA,aAAa,GAAG,IAAI,CAAA;IAEXC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAGC,GAAG,EAAI;AACtCF,EAAAA,aAAa,GAAGE,GAAG,CAAA;AACpB,EAAC;IAEYC,gBAAgB,GAAG,SAAnBA,gBAAgBA,GAAS;AACrC,EAAA,OAAOH,aAAa,CAAA;AACrB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-container.js","sources":["../../../../src/components/containers/accordions/filter-container.js"],"sourcesContent":["import React from 'react';\
|
|
1
|
+
{"version":3,"file":"filter-container.js","sources":["../../../../src/components/containers/accordions/filter-container.js"],"sourcesContent":["import React from 'react';\nimport { useMapList } from '~/contexts/mapListContext';\nimport AccordionFilters from '~/components/modules/accordions/filters';\nimport AccordionFilterItem from '~/components/containers/accordions/filter-item-container';\n\nconst AccordionFiltersContainer = ({\n\tclassName,\n\tdefaultValue,\n\tsetDefaultValue,\n\tsetLocation,\n\tsetSelectedListItem,\n\tSubcategoryRequireCategory\n}) => {\n\tconst { filterOptions, selectedFilters, setSelectedFilters, siteConfig } = useMapList();\n\n\tconst handleSetSelectedFilters = prevFilters => {\n\t\tsetSelectedFilters(prevFilters);\n\t\tsetLocation(null);\n\t\tsetSelectedListItem(null);\n\t};\n\treturn (\n\t\t<AccordionFilters\n\t\t\tclassName={className}\n\t\t\tdefaultValue={defaultValue}\n\t\t\tfilterOptions={filterOptions}\n\t\t>\n\t\t\t{filterOptions?.filters?.map(filter => {\n\t\t\t\tif(filter.id === 'category' && SubcategoryRequireCategory === true && (!selectedFilters.categoryClass || Object.keys(selectedFilters.categoryClass).length < 1)){\n\t\t\t\t\treturn;\n\t\t\t\t} else if (filter.id === 'category' && SubcategoryRequireCategory === true && filter.items.length > 0) {\n\t\t\t\t\tfilter.items = filter.items.filter(item => item.count > 0);\n\t\t\t\t}\n\t\t\t\treturn (<AccordionFilterItem\n\t\t\t\t\tkey={filter.id}\n\t\t\t\t\tfilter={filter}\n\t\t\t\t\texternalLinksInFilters={siteConfig.externalLinksInFilters}\n\t\t\t\t\tsetDefaultValue={setDefaultValue}\n\t\t\t\t\tselectedFilters={selectedFilters}\n\t\t\t\t\tsetSelectedFilters={handleSetSelectedFilters}\n\t\t\t\t\tsubcategoryRequireCategory={siteConfig.subcategoryRequireCategory}\n\t\t\t\t/>);\n\t\t\t}\n\t\t\t)}\n\t\t</AccordionFilters>\n\t);\n};\n\nexport default AccordionFiltersContainer;\n"],"names":["AccordionFiltersContainer","_ref","_filterOptions$filter","className","defaultValue","setDefaultValue","setLocation","setSelectedListItem","SubcategoryRequireCategory","_useMapList","useMapList","filterOptions","selectedFilters","setSelectedFilters","siteConfig","handleSetSelectedFilters","prevFilters","React","createElement","AccordionFilters","filters","map","filter","id","categoryClass","Object","keys","length","items","item","count","AccordionFilterItem","key","externalLinksInFilters","subcategoryRequireCategory"],"mappings":";;;;;AAKA,IAAMA,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAAC,IAAA,EAOzB;AAAA,EAAA,IAAAC,qBAAA,CAAA;AAAA,EAAA,IANLC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,eAAe,GAAAJ,IAAA,CAAfI,eAAe;IACfC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,mBAAmB,GAAAN,IAAA,CAAnBM,mBAAmB;IACnBC,0BAA0B,GAAAP,IAAA,CAA1BO,0BAA0B,CAAA;AAE1B,EAAA,IAAAC,WAAA,GAA2EC,UAAU,EAAE;IAA/EC,aAAa,GAAAF,WAAA,CAAbE,aAAa;IAAEC,eAAe,GAAAH,WAAA,CAAfG,eAAe;IAAEC,kBAAkB,GAAAJ,WAAA,CAAlBI,kBAAkB;IAAEC,UAAU,GAAAL,WAAA,CAAVK,UAAU,CAAA;AAEtE,EAAA,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAGC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AACjCO,MAAAA,eAAe,EAAEA,eAAgB;AACjCC,MAAAA,kBAAkB,EAAEE,wBAAyB;MAC7CmB,0BAA0B,EAAEpB,UAAU,CAACoB,0BAAAA;AAA2B,KAClE,CAAC,CAAA;AACH,GACA,CACiB,CAAC,CAAA;AAErB;;;;"}
|
|
@@ -42,7 +42,8 @@ var FilterItemContainer = function FilterItemContainer(_ref) {
|
|
|
42
42
|
item: item,
|
|
43
43
|
field: filter.id,
|
|
44
44
|
selectedFilters: selectedFilters,
|
|
45
|
-
setSelectedFilters: setSelectedFilters
|
|
45
|
+
setSelectedFilters: setSelectedFilters,
|
|
46
|
+
subcategoryRequireCategory: subcategoryRequireCategory
|
|
46
47
|
});
|
|
47
48
|
}), externalLinks && externalLinks.map(function (link) {
|
|
48
49
|
return /*#__PURE__*/React__default.createElement(FilterItemContainer$1, {
|
|
@@ -52,7 +53,8 @@ var FilterItemContainer = function FilterItemContainer(_ref) {
|
|
|
52
53
|
}, link.externalLink),
|
|
53
54
|
isExternalLink: true,
|
|
54
55
|
externalLinkUrl: link.externalLinkUrl,
|
|
55
|
-
field: filter.id
|
|
56
|
+
field: filter.id,
|
|
57
|
+
subcategoryRequireCategory: subcategoryRequireCategory
|
|
56
58
|
});
|
|
57
59
|
}));
|
|
58
60
|
return /*#__PURE__*/React__default.createElement(AccordionFilterItem$1, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-item-container.js","sources":["../../../../src/components/containers/accordions/filter-item-container.js"],"sourcesContent":["import React, { memo } from 'react';\nimport AccordionFilterItem from '~/components/modules/accordions/filterItem';\nimport FilterItem from '~/components/containers/filter/filter-item-container';\nimport ItemsPill from '~/components/modules/buttons/items-pill';\n\nconst FilterItemContainer = ({\n\tfilter,\n\tsetDefaultValue,\n\tsetSelectedFilters,\n\tselectedFilters,\n\tsubcategoryRequireCategory = false,\n\texternalLinksInFilters\n}) => {\n\tconst externalLinks = externalLinksInFilters?.filter(x => x.fieldName == filter.id);\n\tconst fieldKey = filter.id;\n\tconst activeItemsCount = selectedFilters != null && selectedFilters[fieldKey]\n\t\t? Object.keys(selectedFilters[fieldKey]).length\n\t\t: 0;\n\n\tconst handleClearFilters = event => {\n\t\tevent.stopPropagation();\n\t\tsetSelectedFilters(prevFilters => {\n\t\t\tconst updatedFilters = { ...prevFilters };\n\t\t\tif(subcategoryRequireCategory && fieldKey == 'categoryClass'){\n\t\t\t\tdelete updatedFilters['category'];\n\t\t\t}\n\t\t\tif(fieldKey == 'state' || fieldKey == 'city' || fieldKey == 'cityState'){\n\t\t\t\tdelete updatedFilters.entityId;\n\t\t\t\tdelete updatedFilters['entityName'];\n\t\t\t}\n\t\t\tdelete updatedFilters[fieldKey];\n\t\t\treturn updatedFilters;\n\t\t});\n\t};\n\n\tconst header = (\n\t\t<>\n\t\t\t{filter.title}\n\t\t\t{activeItemsCount > 0 && (\n\t\t\t\t<ItemsPill\n\t\t\t\t\tactiveItemsCount={activeItemsCount}\n\t\t\t\t\tonClick={handleClearFilters}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n\n\tconst body = (\n\t\t<>\n\t\t\t{filter.items.sort().map(item => (\n\t\t\t\t<FilterItem\n\t\t\t\t\tkey={item.name}\n\t\t\t\t\titem={item}\n\t\t\t\t\tfield={filter.id}\n\t\t\t\t\tselectedFilters={selectedFilters}\n\t\t\t\t\tsetSelectedFilters={setSelectedFilters}\n\t\t\t\t/>\n\t\t\t))}\n\t\t\t{externalLinks && externalLinks.map(link => (\n\t\t\t\t<FilterItem\n\t\t\t\t\tkey={link.externalLink}\n\t\t\t\t\titem={<a href={link.externalLinkUrl}>{link.externalLink}</a>}\n\t\t\t\t\tisExternalLink={true}\n\t\t\t\t\texternalLinkUrl={link.externalLinkUrl}\n\t\t\t\t\tfield={filter.id}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</>\n\t);\n\n\treturn (\n\t\t<AccordionFilterItem\n\t\t\tid={filter.id}\n\t\t\tsetDefaultValue={setDefaultValue}\n\t\t\theader={header}\n\t\t\tbody={body}\n\t\t/>\n\t);\n};\n\nexport default memo(FilterItemContainer);\n"],"names":["FilterItemContainer","_ref","filter","setDefaultValue","setSelectedFilters","selectedFilters","_ref$subcategoryRequi","subcategoryRequireCategory","externalLinksInFilters","externalLinks","x","fieldName","id","fieldKey","activeItemsCount","Object","keys","length","handleClearFilters","event","stopPropagation","prevFilters","updatedFilters","_objectSpread","entityId","header","React","createElement","Fragment","title","ItemsPill","onClick","body","items","sort","map","item","FilterItem","key","name","field","link","externalLink","href","externalLinkUrl","isExternalLink","AccordionFilterItem","memo"],"mappings":";;;;;;AAKA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAOnB;AAAA,EAAA,IANLC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,eAAe,GAAAF,IAAA,CAAfE,eAAe;IACfC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAClBC,eAAe,GAAAJ,IAAA,CAAfI,eAAe;IAAAC,qBAAA,GAAAL,IAAA,CACfM,0BAA0B;AAA1BA,IAAAA,0BAA0B,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IAClCE,sBAAsB,GAAAP,IAAA,CAAtBO,sBAAsB,CAAA;EAEtB,IAAMC,aAAa,GAAGD,sBAAsB,KAAtBA,IAAAA,IAAAA,sBAAsB,KAAtBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,sBAAsB,CAAEN,MAAM,CAAC,UAAAQ,CAAC,EAAA;AAAA,IAAA,OAAIA,CAAC,CAACC,SAAS,IAAIT,MAAM,CAACU,EAAE,CAAA;GAAC,CAAA,CAAA;AACnF,EAAA,IAAMC,QAAQ,GAAGX,MAAM,CAACU,EAAE,CAAA;EAC1B,IAAME,gBAAgB,GAAGT,eAAe,IAAI,IAAI,IAAIA,eAAe,CAACQ,QAAQ,CAAC,GAC1EE,MAAM,CAACC,IAAI,CAACX,eAA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EF,IAAI,CAACG,IAAK;AACfH,MAAAA,IAAI,EAAEA,IAAK;MACXI,KAAK,EAAEtC,MAAM,CAACU,EAAG;AACjBP,MAAAA,eAAe,EAAEA,eAAgB;AACjCD,MAAAA,kBAAkB,EAAEA,
|
|
1
|
+
{"version":3,"file":"filter-item-container.js","sources":["../../../../src/components/containers/accordions/filter-item-container.js"],"sourcesContent":["import React, { memo } from 'react';\nimport AccordionFilterItem from '~/components/modules/accordions/filterItem';\nimport FilterItem from '~/components/containers/filter/filter-item-container';\nimport ItemsPill from '~/components/modules/buttons/items-pill';\n\nconst FilterItemContainer = ({\n\tfilter,\n\tsetDefaultValue,\n\tsetSelectedFilters,\n\tselectedFilters,\n\tsubcategoryRequireCategory = false,\n\texternalLinksInFilters\n}) => {\n\tconst externalLinks = externalLinksInFilters?.filter(x => x.fieldName == filter.id);\n\tconst fieldKey = filter.id;\n\tconst activeItemsCount = selectedFilters != null && selectedFilters[fieldKey]\n\t\t? Object.keys(selectedFilters[fieldKey]).length\n\t\t: 0;\n\n\tconst handleClearFilters = event => {\n\t\tevent.stopPropagation();\n\t\tsetSelectedFilters(prevFilters => {\n\t\t\tconst updatedFilters = { ...prevFilters };\n\t\t\tif(subcategoryRequireCategory && fieldKey == 'categoryClass'){\n\t\t\t\tdelete updatedFilters['category'];\n\t\t\t}\n\t\t\tif(fieldKey == 'state' || fieldKey == 'city' || fieldKey == 'cityState'){\n\t\t\t\tdelete updatedFilters.entityId;\n\t\t\t\tdelete updatedFilters['entityName'];\n\t\t\t}\n\t\t\tdelete updatedFilters[fieldKey];\n\t\t\treturn updatedFilters;\n\t\t});\n\t};\n\n\tconst header = (\n\t\t<>\n\t\t\t{filter.title}\n\t\t\t{activeItemsCount > 0 && (\n\t\t\t\t<ItemsPill\n\t\t\t\t\tactiveItemsCount={activeItemsCount}\n\t\t\t\t\tonClick={handleClearFilters}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n\n\tconst body = (\n\t\t<>\n\t\t\t{filter.items.sort().map(item => (\n\t\t\t\t<FilterItem\n\t\t\t\t\tkey={item.name}\n\t\t\t\t\titem={item}\n\t\t\t\t\tfield={filter.id}\n\t\t\t\t\tselectedFilters={selectedFilters}\n\t\t\t\t\tsetSelectedFilters={setSelectedFilters}\n\t\t\t\t\tsubcategoryRequireCategory={subcategoryRequireCategory}\n\t\t\t\t/>\n\t\t\t))}\n\t\t\t{externalLinks && externalLinks.map(link => (\n\t\t\t\t<FilterItem\n\t\t\t\t\tkey={link.externalLink}\n\t\t\t\t\titem={<a href={link.externalLinkUrl}>{link.externalLink}</a>}\n\t\t\t\t\tisExternalLink={true}\n\t\t\t\t\texternalLinkUrl={link.externalLinkUrl}\n\t\t\t\t\tfield={filter.id}\n\t\t\t\t\tsubcategoryRequireCategory={subcategoryRequireCategory}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</>\n\t);\n\n\treturn (\n\t\t<AccordionFilterItem\n\t\t\tid={filter.id}\n\t\t\tsetDefaultValue={setDefaultValue}\n\t\t\theader={header}\n\t\t\tbody={body}\n\t\t/>\n\t);\n};\n\nexport default memo(FilterItemContainer);\n"],"names":["FilterItemContainer","_ref","filter","setDefaultValue","setSelectedFilters","selectedFilters","_ref$subcategoryRequi","subcategoryRequireCategory","externalLinksInFilters","externalLinks","x","fieldName","id","fieldKey","activeItemsCount","Object","keys","length","handleClearFilters","event","stopPropagation","prevFilters","updatedFilters","_objectSpread","entityId","header","React","createElement","Fragment","title","ItemsPill","onClick","body","items","sort","map","item","FilterItem","key","name","field","link","externalLink","href","externalLinkUrl","isExternalLink","AccordionFilterItem","memo"],"mappings":";;;;;;AAKA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAOnB;AAAA,EAAA,IANLC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,eAAe,GAAAF,IAAA,CAAfE,eAAe;IACfC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAClBC,eAAe,GAAAJ,IA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AgB;MACtCJ,KAAK,EAAEtC,MAAM,CAACU,EAAG;AACjBL,MAAAA,0BAA0B,EAAEA,0BAAAA;AAA2B,KACvD,CAAC,CAAA;AAAA,GACF,CACA,CACF,CAAA;AAED,EAAA,oBACCmB,cAAA,CAAAC,aAAA,CAACmB,qBAAmB,EAAA;IACnBlC,EAAE,EAAEV,MAAM,CAACU,EAAG;AACdT,IAAAA,eAAe,EAAEA,eAAgB;AACjCsB,IAAAA,MAAM,EAAEA,MAAO;AACfO,IAAAA,IAAI,EAAEA,IAAAA;AAAK,GACX,CAAC,CAAA;AAEJ,CAAC,CAAA;AAED,0BAAee,aAAAA,IAAI,CAAC/C,mBAAmB,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-accordion-item-container.js","sources":["../../../../src/components/containers/accordions/map-accordion-item-container.js"],"sourcesContent":["import React from 'react';\
|
|
1
|
+
{"version":3,"file":"map-accordion-item-container.js","sources":["../../../../src/components/containers/accordions/map-accordion-item-container.js"],"sourcesContent":["import React from 'react';\nimport { useMap } from '~/contexts/mapContext';\nimport { useMapList } from '~/contexts/mapListContext';\nimport { useTrackEvent } from '~/contexts/trackEventContext';\nimport { setStorageObject } from '~/util/localStorageUtil';\nimport MapAccordionItem from '~/components/modules/accordions/MapAccordionItem';\nimport ListItemContainer from '~/components/containers/list/list-item/list-item-container';\n\nconst MapAccordionItemContainer = ({\n\tshowMap,\n\titem,\n\titemRefs,\n\tfieldsShown,\n\titemExpandedContent,\n\tspecialFeatures,\n\tisActive,\n\thasListItemSelected\n}) => {\n\tconst { mapItems, recruiters } = useMapList();\n\tconst { selectItem } = useMap();\n\tconst { trackEvent, eventTypes } = useTrackEvent();\n\n\tconst setSelectedItemAndZoomMap = (item, isActive) => {\n\t\tif (isActive) {\n\t\t\tlocalStorage.removeItem(\"selectedListItem\");\n\t\t\tconst location = mapItems.find(x => Object.prototype.hasOwnProperty.call(x.items, item.id)) || null;\n\t\t\tselectItem(null, null, 9, { lat: 39.8283, lng: -98.5795 });\n\t\t} else {\n\t\t\tsetStorageObject(\"selectedListItem\", item);\n\t\t\tconst location = mapItems.find(x => Object.prototype.hasOwnProperty.call(x.items, item.id)) || null;\n\t\t\tselectItem(item, location, 12, {\n\t\t\t\tlat: location?.latitude,\n\t\t\t\tlng: location?.longitude\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleItemClick = item => {\n\t\ttrackEvent(eventTypes.JOB_LISTING_SELECTED, {\n\t\t\tjobTitle: item.fields.position,\n\t\t\tjobCategory: item.fields.category,\n\t\t\tentityDisplayName: item?.mapDetails?.entityDisplayName\n\t\t});\n\n\t\tsetSelectedItemAndZoomMap(item, isActive);\n\t};\n\n\treturn (\n\t\t<MapAccordionItem\n\t\t\titem={item}\n\t\t\titemRefs={itemRefs}\n\t\t\titemExpandedContent={itemExpandedContent}\n\t\t\tisActive={isActive}\n\t\t\trecruiter={recruiters[item.recruiterId]}\n\t\t>\n\t\t\t<ListItemContainer\n\t\t\t\tshowMap={showMap}\n\t\t\t\titem={item}\n\t\t\t\titemRefs={itemRefs}\n\t\t\t\tfieldsShown={fieldsShown}\n\t\t\t\tspecialFeatures={specialFeatures}\n\t\t\t\tisActive={isActive}\n\t\t\t\thasListItemSelected={hasListItemSelected}\n\t\t\t\tonClick={() => handleItemClick(item)}\n\t\t\t/>\n\t\t</MapAccordionItem>\n\t);\n};\n\nexport default MapAccordionItemContainer;\n"],"names":["MapAccordionItemContainer","_ref","showMap","item","itemRefs","fieldsShown","itemExpandedContent","specialFeatures","isActive","hasListItemSelected","_useMapList","useMapList","mapItems","recruiters","_useMap","useMap","selectItem","_useTrackEvent","useTrackEvent","trackEvent","eventTypes","setSelectedItemAndZoomMap","localStorage","removeItem","find","x","Object","prototype","hasOwnProperty","call","items","id","lat","lng","setStorageObject","location","latitude","longitude","handleItemClick","_item$mapDetails","JOB_LISTING_SELECTED","jobTitle","fields","position","jobCategory","category","entityDisplayName","mapDetails","React","createElement","MapAccordionItem","rec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AAAR,gBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAhBA,gBAAA,CAAkBO,iBAAAA;AACtC,KAAC,CAAC,CAAA;AAEFzB,IAAAA,yBAAyB,CAAClB,IAAI,EAAEK,QAAQ,CAAC,CAAA;GACzC,CAAA;AAED,EAAA,oBACCwC,cAAA,CAAAC,aAAA,CAACC,gBAAgB,EAAA;AAChB/C,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,QAAQ,EAAEA,QAAS;AACnBE,IAAAA,mBAAmB,EAAEA,mBAAoB;AACzCE,IAAAA,QAAQ,EAAEA,QAAS;AACnB2C,IAAAA,SAAS,EAAEtC,UAAU,CAACV,IAAI,CAACiD,WAAW,CAAA;AAAE,GAAA,eAExCJ,cAAA,CAAAC,aAAA,CAACI,iBAAiB,EAAA;AACjBnD,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,WAAW,EAAEA,WAAY;AACzBE,IAAAA,eAAe,EAAEA,eAAgB;AACjCC,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,mBAAmB,EAAEA,mBAAoB;IACzC6C,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAMhB,eAAe,CAACnC,IAAI,CAAC,CAAA;AAAA,KAAA;AAAC,GACrC,CACgB,CAAC,CAAA;AAErB;;;;"}
|
|
@@ -4,7 +4,7 @@ import { useTrackEvent } from '../../../contexts/trackEventContext.js';
|
|
|
4
4
|
import FilterItem from '../../modules/filter/item.js';
|
|
5
5
|
import { useMapList } from '../../../contexts/mapListContext.js';
|
|
6
6
|
|
|
7
|
-
var _excluded = ["className", "item", "type", "itemKey", "hasCount", "field", "isExternalLink", "externalLinkUrl", "selectedFilters", "setSelectedFilters"];
|
|
7
|
+
var _excluded = ["className", "item", "type", "itemKey", "hasCount", "field", "isExternalLink", "externalLinkUrl", "selectedFilters", "setSelectedFilters", "subcategoryRequireCategory"];
|
|
8
8
|
var FilterItemContainer = function FilterItemContainer(_ref) {
|
|
9
9
|
var _selectedFilters$fiel;
|
|
10
10
|
var className = _ref.className,
|
|
@@ -21,6 +21,8 @@ var FilterItemContainer = function FilterItemContainer(_ref) {
|
|
|
21
21
|
externalLinkUrl = _ref.externalLinkUrl,
|
|
22
22
|
selectedFilters = _ref.selectedFilters,
|
|
23
23
|
setSelectedFilters = _ref.setSelectedFilters,
|
|
24
|
+
_ref$subcategoryRequi = _ref.subcategoryRequireCategory,
|
|
25
|
+
subcategoryRequireCategory = _ref$subcategoryRequi === void 0 ? false : _ref$subcategoryRequi,
|
|
24
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
27
|
var _useTrackEvent = useTrackEvent(),
|
|
26
28
|
trackEvent = _useTrackEvent.trackEvent,
|
|
@@ -62,7 +64,7 @@ var FilterItemContainer = function FilterItemContainer(_ref) {
|
|
|
62
64
|
if (updatedFilters[field] && Object.keys(updatedFilters[field]).length === 0) {
|
|
63
65
|
delete updatedFilters[field];
|
|
64
66
|
}
|
|
65
|
-
if (field === 'categoryClass') {
|
|
67
|
+
if (field === 'categoryClass' && subcategoryRequireCategory) {
|
|
66
68
|
var activeCategoryClass = itemKey;
|
|
67
69
|
var categoriesToConsiderForRemoval = new Set(filteredListings.filter(function (listing) {
|
|
68
70
|
return listing.fields.categoryClass === activeCategoryClass;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-item-container.js","sources":["../../../../src/components/containers/filter/filter-item-container.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { useTrackEvent } from '~/contexts/trackEventContext';\nimport FilterItem from '~/components/modules/filter/item';\nimport { useMapList } from '~/contexts/mapListContext';\n\nconst FilterItemContainer = ({\n\tclassName,\n\titem,\n\ttype = 'checkbox',\n\titemKey = null,\n\thasCount = true,\n\tfield,\n\tisExternalLink = false,\n\texternalLinkUrl,\n\tselectedFilters,\n\tsetSelectedFilters,\n\t...rest\n}) => {\n\tconst { trackEvent, eventTypes } = useTrackEvent();\n\tconst itemName = item.name ? item.name : item;\n\titemKey = itemKey === null ? itemName : itemKey;\n\tconst isActive = selectedFilters != undefined && !!selectedFilters[field]?.[itemKey];\n\tconst [activeItem, setActiveItem] = useState(isActive);\n\n\tuseEffect(() => {\n\t\tif (!selectedFilters || isExternalLink) return;\n\t\tsetActiveItem(!!selectedFilters[field]?.[itemKey]);\n\t}, [selectedFilters, field, itemKey]);\n\n\tconst { filteredListings } = useMapList();\n\tconst changeHandler = () => {\n\t\tif (!isActive || isExternalLink) {\n\t\t\ttrackEvent(eventTypes.FILTER_APPLIED, { filterType: field, filterChecked: itemKey });\n\t\t}\n\n\t\tsetSelectedFilters(prevFilters => {\n\t\t\tconst updatedFilters = { ...prevFilters };\n\n\t\t\tif (field === 'city' || field === 'state' || field === 'cityState') {\n\t\t\t\tdelete updatedFilters['entityName'];\n\t\t\t}\n\n\t\t\tif (!isActive) {\n\t\t\t\tif (!updatedFilters[field]) {\n\t\t\t\t\tupdatedFilters[field] = {};\n\t\t\t\t}\n\t\t\t\tupdatedFilters[field][itemKey] = true;\n\t\t\t\treturn updatedFilters;\n\t\t\t}\n\n\t\t\tdelete updatedFilters[field][itemKey];\n\n\t\t\tif (updatedFilters[field] && Object.keys(updatedFilters[field]).length === 0) {\n\t\t\t\tdelete updatedFilters[field];\n\t\t\t}\n\n\t\t\tif (field === 'categoryClass') {\n\t\t\t\tconst activeCategoryClass = itemKey;\n\t\t\t\tconst categoriesToConsiderForRemoval = new Set(\n\t\t\t\t\tfilteredListings\n\t\t\t\t\t\t.filter(listing => listing.fields.categoryClass === activeCategoryClass)\n\t\t\t\t\t\t.flatMap(listing => listing.fields.category || [])\n\t\t\t\t);\n\n\t\t\t\tconst categoriesToRetain = new Set(\n\t\t\t\t\tfilteredListings\n\t\t\t\t\t\t.filter(listing => listing.fields.categoryClass !== activeCategoryClass)\n\t\t\t\t\t\t.flatMap(listing => listing.fields.category || [])\n\t\t\t\t\t\t.filter(category => categoriesToConsiderForRemoval.has(category))\n\t\t\t\t);\n\n\t\t\t\tif (updatedFilters['category']) {\n\t\t\t\t\tObject.keys(updatedFilters['category']).forEach(categoryKey => {\n\t\t\t\t\t\tif (categoriesToConsiderForRemoval.has(categoryKey) && !categoriesToRetain.has(categoryKey)) {\n\t\t\t\t\t\t\tdelete updatedFilters['category'][categoryKey];\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tif (Object.keys(updatedFilters['category']).length === 0) {\n\t\t\t\t\t\tdelete updatedFilters['category'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn updatedFilters;\n\t\t});\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedFilters && selectedFilters[field] && Object.keys(selectedFilters[field])?.length > 0) return;\n\t\telse if (activeItem === true) {\n\t\t\tsetActiveItem(false);\n\t\t}\n\t}, [selectedFilters]);\n\n\treturn (\n\t\t<FilterItem\n\t\t\tclassName={className}\n\t\t\titem={item}\n\t\t\ttype={type}\n\t\t\titemKey={itemKey}\n\t\t\thasCount={hasCount}\n\t\t\tfield={field}\n\t\t\tactiveItem={activeItem}\n\t\t\tsetActiveItem={setActiveItem}\n\t\t\tchangeHandler={changeHandler}\n\t\t\tisExternalLink={isExternalLink}\n\t\t\texternalLinkUrl={externalLinkUrl}\n\t\t\ttrackEvent={trackEvent}\n\t\t\teventTypes={eventTypes}\n\t\t\t{...rest}\n\t\t/>\n\t);\n};\n\nexport default FilterItemContainer;\n"],"names":["FilterItemContainer","_ref","_selectedFilters$fiel","className","item","_ref$type","type","_ref$itemKey","itemKey","_ref$hasCount","hasCount","field","_ref$isExternalLink","isExternalLink","externalLinkUrl","selectedFilters","setSelectedFilters","rest","_objectWithoutProperties","_excluded","_useTrackEvent","useTrackEvent","trackEvent","eventTypes","itemName","name","isActive","undefined","_useState","useState","_useState2","_slicedToArray","activeItem","setActiveItem","useEffect","_selectedFilters$fiel2","_useMapList","useMapList","filteredListings","changeHandler","FILTER_APPLIED","filterType","filterChecked","prevFilters","updatedFilters","_objectSpread","Object","keys","length","activeCategoryClass","categoriesToConsiderForRemoval","Set","filter","listing","fields","categoryClass","flatMap","category","categoriesToRetain","has","forEach","categoryKey","_Object$keys","React","createElement","FilterItem","_extends"],"mappings":";;;;;;;AAKA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,
|
|
1
|
+
{"version":3,"file":"filter-item-container.js","sources":["../../../../src/components/containers/filter/filter-item-container.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { useTrackEvent } from '~/contexts/trackEventContext';\nimport FilterItem from '~/components/modules/filter/item';\nimport { useMapList } from '~/contexts/mapListContext';\n\nconst FilterItemContainer = ({\n\tclassName,\n\titem,\n\ttype = 'checkbox',\n\titemKey = null,\n\thasCount = true,\n\tfield,\n\tisExternalLink = false,\n\texternalLinkUrl,\n\tselectedFilters,\n\tsetSelectedFilters,\n\tsubcategoryRequireCategory = false,\n\t...rest\n}) => {\n\tconst { trackEvent, eventTypes } = useTrackEvent();\n\tconst itemName = item.name ? item.name : item;\n\titemKey = itemKey === null ? itemName : itemKey;\n\tconst isActive = selectedFilters != undefined && !!selectedFilters[field]?.[itemKey];\n\tconst [activeItem, setActiveItem] = useState(isActive);\n\n\tuseEffect(() => {\n\t\tif (!selectedFilters || isExternalLink) return;\n\t\tsetActiveItem(!!selectedFilters[field]?.[itemKey]);\n\t}, [selectedFilters, field, itemKey]);\n\n\tconst { filteredListings } = useMapList();\n\tconst changeHandler = () => {\n\t\tif (!isActive || isExternalLink) {\n\t\t\ttrackEvent(eventTypes.FILTER_APPLIED, { filterType: field, filterChecked: itemKey });\n\t\t}\n\n\t\tsetSelectedFilters(prevFilters => {\n\t\t\tconst updatedFilters = { ...prevFilters };\n\n\t\t\tif (field === 'city' || field === 'state' || field === 'cityState') {\n\t\t\t\tdelete updatedFilters['entityName'];\n\t\t\t}\n\n\t\t\tif (!isActive) {\n\t\t\t\tif (!updatedFilters[field]) {\n\t\t\t\t\tupdatedFilters[field] = {};\n\t\t\t\t}\n\t\t\t\tupdatedFilters[field][itemKey] = true;\n\t\t\t\treturn updatedFilters;\n\t\t\t}\n\n\t\t\tdelete updatedFilters[field][itemKey];\n\n\t\t\tif (updatedFilters[field] && Object.keys(updatedFilters[field]).length === 0) {\n\t\t\t\tdelete updatedFilters[field];\n\t\t\t}\n\n\t\t\tif (field === 'categoryClass' && subcategoryRequireCategory) {\n\t\t\t\tconst activeCategoryClass = itemKey;\n\t\t\t\tconst categoriesToConsiderForRemoval = new Set(\n\t\t\t\t\tfilteredListings\n\t\t\t\t\t\t.filter(listing => listing.fields.categoryClass === activeCategoryClass)\n\t\t\t\t\t\t.flatMap(listing => listing.fields.category || [])\n\t\t\t\t);\n\n\t\t\t\tconst categoriesToRetain = new Set(\n\t\t\t\t\tfilteredListings\n\t\t\t\t\t\t.filter(listing => listing.fields.categoryClass !== activeCategoryClass)\n\t\t\t\t\t\t.flatMap(listing => listing.fields.category || [])\n\t\t\t\t\t\t.filter(category => categoriesToConsiderForRemoval.has(category))\n\t\t\t\t);\n\n\t\t\t\tif (updatedFilters['category']) {\n\t\t\t\t\tObject.keys(updatedFilters['category']).forEach(categoryKey => {\n\t\t\t\t\t\tif (categoriesToConsiderForRemoval.has(categoryKey) && !categoriesToRetain.has(categoryKey)) {\n\t\t\t\t\t\t\tdelete updatedFilters['category'][categoryKey];\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tif (Object.keys(updatedFilters['category']).length === 0) {\n\t\t\t\t\t\tdelete updatedFilters['category'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn updatedFilters;\n\t\t});\n\t};\n\n\tuseEffect(() => {\n\t\tif (selectedFilters && selectedFilters[field] && Object.keys(selectedFilters[field])?.length > 0) return;\n\t\telse if (activeItem === true) {\n\t\t\tsetActiveItem(false);\n\t\t}\n\t}, [selectedFilters]);\n\n\treturn (\n\t\t<FilterItem\n\t\t\tclassName={className}\n\t\t\titem={item}\n\t\t\ttype={type}\n\t\t\titemKey={itemKey}\n\t\t\thasCount={hasCount}\n\t\t\tfield={field}\n\t\t\tactiveItem={activeItem}\n\t\t\tsetActiveItem={setActiveItem}\n\t\t\tchangeHandler={changeHandler}\n\t\t\tisExternalLink={isExternalLink}\n\t\t\texternalLinkUrl={externalLinkUrl}\n\t\t\ttrackEvent={trackEvent}\n\t\t\teventTypes={eventTypes}\n\t\t\t{...rest}\n\t\t/>\n\t);\n};\n\nexport default FilterItemContainer;\n"],"names":["FilterItemContainer","_ref","_selectedFilters$fiel","className","item","_ref$type","type","_ref$itemKey","itemKey","_ref$hasCount","hasCount","field","_ref$isExternalLink","isExternalLink","externalLinkUrl","selectedFilters","setSelectedFilters","_ref$subcategoryRequi","subcategoryRequireCategory","rest","_objectWithoutProperties","_excluded","_useTrackEvent","useTrackEvent","trackEvent","eventTypes","itemName","name","isActive","undefined","_useState","useState","_useState2","_slicedToArray","activeItem","setActiveItem","useEffect","_selectedFilters$fiel2","_useMapList","useMapList","filteredListings","changeHandler","FILTER_APPLIED","filterType","filterChecked","prevFilters","updatedFilters","_objectSpread","Object","keys","length","activeCategoryClass","categoriesToConsiderForRemoval","Set","filter","listing","fields","categoryClass","flatMap","category","categoriesToRetain","has","forEach","categoryKey","_Object$keys","React","createElement","FilterItem","_extends"],"mappings":";;;;;;;AAKA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAanB;AAAA,EAAA,IAAAC,qBAAA,CAAA;AAAA,EAAA,IAZLC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAAC,SAAA,GAAAJ,IAAA,CACJK,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,SAAA;IAAAE,YAAA,GAAAN,IAAA,CACjBO,OAA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,CAAC,CAAC,CAAA;AAErB,EAAA,oBACCkD,cAAA,CAAAC,aAAA,CAACC,UAAU,EAAAC,QAAA,CAAA;AACVjE,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,IAAI,EAAEA,IAAK;AACXE,IAAAA,IAAI,EAAEA,IAAK;AACXE,IAAAA,OAAO,EAAEA,OAAQ;AACjBE,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,KAAK,EAAEA,KAAM;AACbuB,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,aAAa,EAAEA,aAAc;AAC7BM,IAAAA,aAAa,EAAEA,aAAc;AAC7B5B,IAAAA,cAAc,EAAEA,cAAe;AAC/BC,IAAAA,eAAe,EAAEA,eAAgB;AACjCU,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,UAAU,EAAEA,UAAAA;GACRN,EAAAA,IAAI,CACR,CAAC,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listing-details-container.js","sources":["../../../../src/components/containers/jobListing/listing-details-container.js"],"sourcesContent":["import React from 'react';\
|
|
1
|
+
{"version":3,"file":"listing-details-container.js","sources":["../../../../src/components/containers/jobListing/listing-details-container.js"],"sourcesContent":["import React from 'react';\nimport { useMap } from '~/contexts/mapContext';\nimport { useMapList } from '~/contexts/mapListContext';\nimport { useTrackEvent } from '~/contexts/trackEventContext';\nimport ListingDetails from '~/components/modules/jobListing/listing-details';\n\nconst ListingDetailsContainer = ({ item, recruiter }) => {\n\tconst { trackEvent, eventTypes } = useTrackEvent();\n\tconst { travelTime } = useMap();\n\tconst { siteConfig, navigateToDetails, navigateToEasyApply, Link, linkFormat } = useMapList();\n\n\tconst {\n\t useDetailsPostMessage,\n\t useApplyDialog,\n\t internalApplyLink,\n\t companyName,\n\t jobsDomain\n\t} = siteConfig;\n\n\treturn (\n\t <ListingDetails\n\t\t\titem={item}\n\t\t\trecruiter={recruiter}\n\t\t\ttravelTime={travelTime}\n\t\t\tuseDetailsPostMessage={useDetailsPostMessage}\n\t\t\tnavigateToDetails={navigateToDetails}\n\t\t\tnavigateToEasyApply={navigateToEasyApply}\n\t\t\tLink={Link}\n\t\t\tlinkFormat={linkFormat}\n\t\t\tuseApplyDialog={useApplyDialog}\n\t\t\tinternalApplyLink={internalApplyLink}\n\t\t\tcompanyName={companyName}\n\t\t\tjobsDomain={jobsDomain}\n\t\t\ttrackEvent={trackEvent}\n\t\t\teventTypes={eventTypes}\n\t />\n\t);\n};\n\nexport default ListingDetailsContainer;\n"],"names":["ListingDetailsContainer","_ref","item","recruiter","_useTrackEvent","useTrackEvent","trackEvent","eventTypes","_useMap","useMap","travelTime","_useMapList","useMapList","siteConfig","navigateToDetails","navigateToEasyApply","Link","linkFormat","useDetailsPostMessage","useApplyDialog","internalApplyLink","companyName","jobsDomain","React","createElement","ListingDetails"],"mappings":";;;;;;AAMA,IAAMA,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAAC,IAAA,EAA4B;AAAA,EAAA,IAAtBC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS,CAAA;AACjD,EAAA,IAAAC,cAAA,GAAmCC,aAAa,EAAE;IAA1CC,UAAU,GAAAF,cAAA,CAAVE,UAAU;IAAEC,UAAU,GAAAH,cAAA,CAAVG,UAAU,CAAA;AAC9B,EAAA,IAAAC,OAAA,GAAuBC,MAAM,EAAE;IAAvBC,UAAU,GAAAF,OAAA,CAAVE,UAAU,CAAA;AAClB,EAAA,IAAAC,WAAA,GAAiFC,UAAU,EAAE;IAArFC,UAAU,GAAAF,WAAA,CAAVE,UAAU;IAAEC,iBAAiB,GAAAH,WAAA,CAAjBG,iBAAiB;IAAEC,mBAAmB,GAAAJ,WAAA,CAAnBI,mBAAmB;IAAEC,IAAI,GAAAL,WAAA,CAAJK,IAAI;IAAEC,UAAU,GAAAN,WAAA,CAAVM,UAAU,CAAA;AAE5E,EAAA,IACEC,qBAAqB,GAKnBL,UAAU,CALZK,qBAAqB;IACrBC,cAAc,GAIZN,UAAU,CAJZM,cAAc;IACdC,iBAAiB,GAGfP,UAAU,CAHZO,iBAAiB;IACjBC,WAAW,GAETR,UAAU,CAFZQ,WAAW;IACXC,UAAU,GACRT,UAAU,CADZS,UAAU,CAAA;AAGZ,EAAA,oBACEC,cAAA,CAAAC,aAAA,CAACC,cAAc,EAAA;AACfvB,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,SAAS,EAAEA,SAAU;AACrBO,IAAAA,UAAU,EAAEA,UAAW;AACvBQ,IAAAA,qBAAqB,EAAEA,qBAAsB;AAC7CJ,IAAAA,iBAAiB,EAAEA,iBAAkB;AACrCC,IAAAA,mBAAmB,EAAEA,mBAAoB;AACzCC,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,UAAU,EAAEA,UAAW;AACvBE,IAAAA,cAAc,EAAEA,cAAe;AAC/BC,IAAAA,iBAAiB,EAAEA,iBAAkB;AACrCC,IAAAA,WAAW,EAAEA,WAAY;AACzBC,IAAAA,UAAU,EAAEA,UAAW;AACvBhB,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,UAAU,EAAEA,UAAAA;AAAW,GACtB,CAAC,CAAA;AAEL;;;;"}
|
|
@@ -9,27 +9,27 @@ import MapAccordionItemContainer from '../accordions/map-accordion-item-containe
|
|
|
9
9
|
import { dynamicSort } from '../../../util/sortUtil.js';
|
|
10
10
|
import ListingDetailsContainer from '../jobListing/listing-details-container.js';
|
|
11
11
|
|
|
12
|
-
const ItemsListContainer = ({ fieldNames, showMap, fieldsShown, specialFeatures }) => {
|
|
13
|
-
const { filteredListings, loading, commuteLocation, sortSetting, setSortSetting } = useMapList();
|
|
14
|
-
const { itemLimit, loader, scrollContainerRef, itemRefs } = useListLogic(filteredListings);
|
|
15
|
-
const { selectedListItem } = useMap();
|
|
16
|
-
const { trackEvent, eventTypes } = useTrackEvent();
|
|
17
|
-
const itemExpandedContent = (item, recruiter) => item ? React__default.createElement(ListingDetailsContainer, { item: item, recruiter: recruiter }) : null;
|
|
18
|
-
if (!fieldsShown.includes('travelTime') && commuteLocation != null && Object.entries(commuteLocation).length > 0) {
|
|
19
|
-
fieldsShown.push('travelTime');
|
|
20
|
-
fieldNames['travelTime'] = 'Commute';
|
|
21
|
-
}
|
|
22
|
-
else if (fieldsShown.includes('travelTime') && !commuteLocation) {
|
|
23
|
-
fieldsShown = fieldsShown.filter(x => x !== 'travelTime');
|
|
24
|
-
}
|
|
25
|
-
const setTrackedSortSetting = (sortSetting) => {
|
|
26
|
-
trackEvent(eventTypes.LIST_SORTED, sortSetting);
|
|
27
|
-
setSortSetting(sortSetting);
|
|
28
|
-
};
|
|
29
|
-
return (React__default.createElement(ItemsList, { fieldNames: fieldNames, showMap: showMap, fieldsShown: fieldsShown, filteredListings: filteredListings, loading: loading, sortSetting: sortSetting, setSortSetting: setTrackedSortSetting, itemLimit: itemLimit, loader: loader, scrollContainerRef: scrollContainerRef, itemRefs: itemRefs, selectedListItem: selectedListItem, includeFavorite: true },
|
|
30
|
-
React__default.createElement(Accordion, { className: "hc-divide-y hc-divide-uiAccent/10 hc-z-[1000]", defaultValue: selectedListItem?.id }, (sortSetting ? dynamicSort(filteredListings, sortSetting.field, sortSetting.type) : filteredListings)
|
|
31
|
-
.slice(0, itemLimit)
|
|
32
|
-
.map((item) => (React__default.createElement(MapAccordionItemContainer, { key: item.id, showMap: showMap, item: item, itemRefs: itemRefs, fieldsShown: fieldsShown, itemExpandedContent: itemExpandedContent, specialFeatures: specialFeatures, isActive: selectedListItem?.id === item.id, hasListItemSelected: selectedListItem != null }))))));
|
|
12
|
+
const ItemsListContainer = ({ fieldNames, showMap, fieldsShown, specialFeatures }) => {
|
|
13
|
+
const { filteredListings, loading, commuteLocation, sortSetting, setSortSetting } = useMapList();
|
|
14
|
+
const { itemLimit, loader, scrollContainerRef, itemRefs } = useListLogic(filteredListings);
|
|
15
|
+
const { selectedListItem } = useMap();
|
|
16
|
+
const { trackEvent, eventTypes } = useTrackEvent();
|
|
17
|
+
const itemExpandedContent = (item, recruiter) => item ? React__default.createElement(ListingDetailsContainer, { item: item, recruiter: recruiter }) : null;
|
|
18
|
+
if (!fieldsShown.includes('travelTime') && commuteLocation != null && Object.entries(commuteLocation).length > 0) {
|
|
19
|
+
fieldsShown.push('travelTime');
|
|
20
|
+
fieldNames['travelTime'] = 'Commute';
|
|
21
|
+
}
|
|
22
|
+
else if (fieldsShown.includes('travelTime') && !commuteLocation) {
|
|
23
|
+
fieldsShown = fieldsShown.filter(x => x !== 'travelTime');
|
|
24
|
+
}
|
|
25
|
+
const setTrackedSortSetting = (sortSetting) => {
|
|
26
|
+
trackEvent(eventTypes.LIST_SORTED, sortSetting);
|
|
27
|
+
setSortSetting(sortSetting);
|
|
28
|
+
};
|
|
29
|
+
return (React__default.createElement(ItemsList, { fieldNames: fieldNames, showMap: showMap, fieldsShown: fieldsShown, filteredListings: filteredListings, loading: loading, sortSetting: sortSetting, setSortSetting: setTrackedSortSetting, itemLimit: itemLimit, loader: loader, scrollContainerRef: scrollContainerRef, itemRefs: itemRefs, selectedListItem: selectedListItem, includeFavorite: true },
|
|
30
|
+
React__default.createElement(Accordion, { className: "hc-divide-y hc-divide-uiAccent/10 hc-z-[1000]", defaultValue: selectedListItem?.id }, (sortSetting ? dynamicSort(filteredListings, sortSetting.field, sortSetting.type) : filteredListings)
|
|
31
|
+
.slice(0, itemLimit)
|
|
32
|
+
.map((item) => (React__default.createElement(MapAccordionItemContainer, { key: item.id, showMap: showMap, item: item, itemRefs: itemRefs, fieldsShown: fieldsShown, itemExpandedContent: itemExpandedContent, specialFeatures: specialFeatures, isActive: selectedListItem?.id === item.id, hasListItemSelected: selectedListItem != null }))))));
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export { ItemsListContainer as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item-container.js","sources":["../../../../../src/components/containers/list/list-item/list-item-container.js"],"sourcesContent":["import React, { useState } from 'react';\
|
|
1
|
+
{"version":3,"file":"list-item-container.js","sources":["../../../../../src/components/containers/list/list-item/list-item-container.js"],"sourcesContent":["import React, { useState } from 'react';\nimport { useMapList } from '~/contexts/mapListContext';\nimport { useTrackEvent } from '~/contexts/trackEventContext';\nimport ListItem from '~/components/modules/list/list-item/list-item';\n\nconst ListItemContainer = ({\n\tisActive,\n\tshowMap,\n\titem,\n\titemRefs,\n\tfieldsShown,\n\tspecialFeatures,\n\tclassName,\n\tbodyClassName,\n\tonItemSelected,\n\t...props\n}) => {\n\tconst { siteConfig, favorites, handleSettingFavorites, setMobileTab } = useMapList();\n\tconst { trackEvent, eventTypes } = useTrackEvent();\n\n\treturn (\n\t\t<ListItem\n\t\t\tisActive={isActive}\n\t\t\tshowMap={showMap}\n\t\t\titem={item}\n\t\t\titemRefs={itemRefs}\n\t\t\tfieldsShown={fieldsShown}\n\t\t\tspecialFeatures={specialFeatures}\n\t\t\tclassName={isActive ? \"!hc-border-secondary hc-border hc-border-b-0\" : \"hc-opacity-85\"}\n\t\t\tbodyClassName={bodyClassName}\n\t\t\tonItemSelected={onItemSelected}\n\t\t\tsetMobileTab={setMobileTab}\n\t\t\tsiteConfig={siteConfig}\n\t\t\ttrackEvent={trackEvent}\n\t\t\teventTypes={eventTypes}\n\t\t\tfavorites={favorites}\n\t\t\thandleSettingFavorites={handleSettingFavorites}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport default ListItemContainer;\n"],"names":["ListItemContainer","_ref","isActive","showMap","item","itemRefs","fieldsShown","specialFeatures","className","bodyClassName","onItemSelected","props","_objectWithoutProperties","_excluded","_useMapList","useMapList","siteConfig","favorites","handleSettingFavorites","setMobileTab","_useTrackEvent","useTrackEvent","trackEvent","eventTypes","React","createElement","ListItem","_extends"],"mappings":";;;;;;;AAKA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAWjB;AAAA,EAAA,IAVLC,QAAQ,G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Aa;AAC3BH,IAAAA,UAAU,EAAEA,UAAW;AACvBM,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,UAAU,EAAEA,UAAW;AACvBN,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,sBAAsB,EAAEA,sBAAAA;GACpBP,EAAAA,KAAK,CACT,CAAC,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-container.js","sources":["../../../../src/components/containers/maps/map-container.js"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\r\n\r\nimport MapMarker from \"~/components/containers/maps/map-marker-container\";\r\nimport PlaceMarker from \"~/components/modules/maps/place-marker\";\r\n\r\nimport { usePlaces } from \"~/contexts/placesContext\";\r\nimport { useMap } from \"~/contexts/mapContext\";\r\nimport { useMapList } from \"~/contexts/mapListContext\";\r\n\r\nimport { markerIconSelected, markerIcon, pinIcon } from \"~/util/mapIconUtil\";\r\n\r\nimport Map from \"~/components/modules/maps/map\";\r\nimport { MarkerClustererF } from \"@react-google-maps/api\";\r\nimport { clusterOptions } from \"~/util/mapUtil\";\r\n\r\nconst MapContainer = ({\r\n\tmarkerConfigs,\r\n\tinfoWindowClasses,\r\n\tclusterGridSize = 60\r\n}) => {\r\n\tconst {\r\n\t\tlocation,\r\n\t\tzoom,\r\n\t\tcenter,\r\n\t\tselectLocationEntity,\r\n\t\tsetLocation,\r\n\t\tmapInteracted,\r\n\t\tsetMapInteracted\r\n\t} = useMap();\r\n\r\n\tconst {\r\n\t\tmapItems, filteredListings, setSelectedFilters,\r\n\t\tsetQuery,\r\n\t\tsiteConfig\r\n\t} = useMapList();\r\n\r\n\tconst mapRef = useRef();\r\n\tconst markerRefs = useRef({});\r\n\tconst mapContainerRef = useRef(null);\r\n\tconst {\r\n\t\tpoiMarkers,\r\n\t\tsetCurrentCenter,\r\n\t\tcurrentCenter,\r\n\t\tsetCurrentZoom,\r\n\t\tcurrentZoom,\r\n\t\tselectedPlaceMarker,\r\n\t\tsetSelectedPlaceMarker,\r\n\t\tplacesWindow,\r\n\t\tsetPlacesWindow } = usePlaces();\r\n\r\n\tconst onIdle = () => {\r\n\t\tif (!currentCenter || !mapRef.current) return;\r\n\t\tconst newCenter = mapRef.current.getCenter().toJSON();\r\n\t\tconst newZoom = mapRef.current.zoom;\r\n\r\n\t\tsetCurrentCenter(newCenter);\r\n\r\n\t\tif (newZoom !== currentZoom) {\r\n\t\t\tsetCurrentZoom(newZoom);\r\n\t\t}\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tif (mapContainerRef.current) {\r\n\t\t\tconst handleScroll = () => {\r\n\t\t\t\tsetMapInteracted(true);\r\n\t\t\t};\r\n\t\t\tvar mapContainerRefCurrent = mapContainerRef.current;\r\n\t\t\tmapContainerRef.current.addEventListener('wheel', handleScroll);\r\n\t\t\treturn () => mapContainerRefCurrent.removeEventListener('wheel', handleScroll);\r\n\t\t}\r\n\t}, [mapContainerRef.current]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (mapRef.current) {\r\n\t\t\tconst mapInstance = mapRef.current;\r\n\t\t\tconst dragStartListener = mapInstance.addListener('dragstart', () => setMapInteracted(true));\r\n\t\t\tconst mouseDownListener = mapInstance.addListener('mousedown', () => setMapInteracted(true));\r\n\t\t\treturn () => {\r\n\t\t\t\tgoogle.maps.event.removeListener(dragStartListener);\r\n\t\t\t\tgoogle.maps.event.removeListener(mouseDownListener);\r\n\t\t\t};\r\n\t\t}\r\n\t}, [mapRef.current, mapContainerRef.current]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif ((mapItems && mapItems.length > 0 || poiMarkers.length > 0) && mapRef.current) {\r\n\t\t\tfitBounds(mapRef.current);\r\n\t\t}\r\n\t}, [mapItems, mapRef.current, location]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif ((mapItems && mapItems.length > 0 || poiMarkers.length > 0) && mapRef.current && mapInteracted) {\r\n\t\t\tfitBounds(mapRef.current, true);\r\n\t\t}\r\n\t\tif (mapRef.current) {\r\n\t\t\tlet currZoom = mapRef.current.zoom;\r\n\t\t\tlet setZoomVal = currZoom < 13 ? currZoom : 12;\r\n\t\t\tmapRef.current.setZoom(setZoomVal);\r\n\t\t}\r\n\t}, [filteredListings]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!mapRef.current || !location || mapInteracted) return;\r\n\t\tmapRef.current.panTo(\r\n\t\t\tnew google.maps.LatLng(location.latitude, location.longitude)\r\n\t\t);\r\n\t\tif (mapRef.current) {\r\n\t\t\tlet setZoomVal = zoom < 13 ? zoom : 12;\r\n\t\t\tmapRef.current.setZoom(setZoomVal);\r\n\t\t}\r\n\t}, [location, zoom, mapRef.current]);\r\n\r\n\tconst fitBounds = (map, overload = false) => {\r\n\t\tif ((mapInteracted === false || overload) && mapItems != null) {\r\n\t\t const bounds = new window.google.maps.LatLngBounds();\r\n\t\t mapItems.forEach(item => {\r\n\t\t\t\tbounds.extend(new google.maps.LatLng(item.latitude, item.longitude));\r\n\t\t });\r\n\t\t if(siteConfig.optionalShowLocationClusterConfig){\r\n\t\t\t\tlet configLocation = new google.maps.LatLng(siteConfig.optionalShowLocationClusterConfig.latitude, siteConfig.optionalShowLocationClusterConfig.longitude);\r\n\t\t\t\tmap.panTo(configLocation);\r\n\t\t\t\tbounds.extend(new google.maps.LatLng(siteConfig.optionalShowLocationClusterConfig.latitude, siteConfig.optionalShowLocationClusterConfig.longitude));\r\n\t\t }\r\n\t\t if (!map) return;\r\n\t\t const currentCenter = map.getCenter();\r\n\t\t map.fitBounds(bounds);\r\n\t\t const newCenter = bounds.getCenter();\r\n\t\t if (currentCenter && newCenter) {\r\n\t\t\t\tmap.panTo(newCenter);\r\n\t\t }\r\n\t\t}\r\n\t\tif (mapRef.current.zoom > 17) {\r\n\t\t mapRef.current.setZoom(16);\r\n\t\t}\r\n\t };\r\n\r\n\tconst markerClickHandler = mapLocation => {\r\n\t\tsetMapInteracted(true);\r\n\t\tselectLocationEntity(mapLocation);\r\n\t};\r\n\r\n\tconst onLoad = map => {\r\n\t\tif (!location || location === null) {\r\n\t\t\tmapRef.current = map;\r\n\t\t\tfitBounds(map, true);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tmapRef.current = map;\r\n\r\n\t\tif (mapInteracted === false) {\r\n\t\t\tmapRef.current.panTo(\r\n\t\t\t\tnew google.maps.LatLng(location.latitude, location.longitude)\r\n\t\t\t);\r\n\r\n\t\t\tmapRef.current.setZoom(zoom);\r\n\t\t}\r\n\t};\r\n\r\n\tconst pinIconUrl = pinIcon({\r\n\t\tfillColor: markerConfigs.fillColor,\r\n\t\tstrokeColor: markerConfigs.strokeColor\r\n\t});\r\n\r\n\tconst onClusterClick = cluster => {\r\n\t\tif(!siteConfig.optionalShowLocationClusterConfig || (mapRef.current.zoom > siteConfig.optionalShowLocationClusterConfig.showForZoomLevelLessThan)) {\r\n\t\t\tconsole.log(\"should return\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!cluster || typeof cluster.getMarkers !== 'function') {\r\n\t\t console.error('Cluster object or getMarkers method not available.');\r\n\t\t return;\r\n\t\t}\r\n\r\n\t\tconst markers = cluster.getMarkers();\r\n\r\n\t\tif (!markers || markers.length === 0) {\r\n\t\t console.error('No markers found in the cluster.');\r\n\t\t return;\r\n\t\t}\r\n\r\n\t\tsetTimeout(() => {\r\n\t\t const bounds = new window.google.maps.LatLngBounds();\r\n\r\n\t\t markers.forEach(marker => {\r\n\t\t\t\tbounds.extend(marker.getPosition());\r\n\t\t });\r\n\r\n\t\t bounds.extend(new google.maps.LatLng(siteConfig.optionalShowLocationClusterConfig.latitude, siteConfig.optionalShowLocationClusterConfig.longitude));\r\n\r\n\t\t if (mapRef.current) {\r\n\t\t\t\tmapRef.current.fitBounds(bounds);\r\n\t\t }\r\n\t\t}, 500);\r\n\t };\r\n\r\n\treturn (\r\n\t\t<Map\r\n\t\t\tzoom={zoom}\r\n\t\t\tcenter={center}\r\n\t\t\tmapContainerRef={mapContainerRef}\r\n\t\t\tonLoad={onLoad}\r\n\t\t\tonIdle={onIdle}\r\n\t\t\tmapInteracted={mapInteracted}\r\n\t\t\tpinIconUrl={pinIconUrl}\r\n\t\t\tsetMapInteracted={setMapInteracted}\r\n\t\t\tfitBounds={fitBounds}\r\n\t\t\tmapRef={mapRef}\r\n\t\t\tsetQuery={setQuery}\r\n\t\t\tfilteredListingsLength={filteredListings.length}\r\n\t\t\tsetSelectedFilters={setSelectedFilters}\r\n\t\t>\r\n\t\t\t<MarkerClustererF options={clusterOptions(clusterGridSize, markerConfigs.fillColor)} onClick={onClusterClick}>\r\n\t\t\t\t{clusterer => (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t{mapItems.map(item => (\r\n\t\t\t\t\t\t\t<MapMarker\r\n\t\t\t\t\t\t\t\tkey={item.id}\r\n\t\t\t\t\t\t\t\titem={item}\r\n\t\t\t\t\t\t\t\tselectedLocation={location}\r\n\t\t\t\t\t\t\t\tmarkerRefs={markerRefs}\r\n\t\t\t\t\t\t\t\tinfoWindowClasses={infoWindowClasses}\r\n\t\t\t\t\t\t\t\tsetSelectedLocation={setLocation}\r\n\t\t\t\t\t\t\t\tmarkerClickHandler={markerClickHandler}\r\n\t\t\t\t\t\t\t\tclusterer={clusterer}\r\n\t\t\t\t\t\t\t\tmarkerIcon={markerIcon(markerConfigs)}\r\n\t\t\t\t\t\t\t\tmarkerIconSelected={markerIconSelected(markerConfigs)}\r\n\t\t\t\t\t\t\t\tsetMapInteracted={setMapInteracted}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t{poiMarkers && poiMarkers.markers.map((marker, index) => (\r\n\t\t\t\t\t\t\t<PlaceMarker\r\n\t\t\t\t\t\t\t\tkey={`marker-${marker.title}-${index}`}\r\n\t\t\t\t\t\t\t\tmarker={marker}\r\n\t\t\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\t\t\tselectedPlaceMarker={selectedPlaceMarker}\r\n\t\t\t\t\t\t\t\tplacesWindow={placesWindow}\r\n\t\t\t\t\t\t\t\tsetPlacesWindow={setPlacesWindow}\r\n\t\t\t\t\t\t\t\tsetSelectedPlaceMarker={setSelectedPlaceMarker}\r\n\t\t\t\t\t\t\t />\r\n\t\t\t\t\t\t))}\r\n\t\t\t\t\t</>\r\n\t\t\t\t)}\r\n\t\t\t</MarkerClustererF>\r\n\t\t</Map>\r\n\t);\r\n};\r\n\r\nexport default MapContainer;\r\n"],"names":["MapContainer","_ref","markerConfigs","infoWindowClasses","_ref$clusterGridSize","clusterGridSize","_useMap","useMap","location","zoom","center","selectLocationEntity","setLocation","mapInteracted","setMapInteracted","_useMapList","useMapList","mapItems","filteredListings","setSelectedFilters","setQuery","siteConfig","mapRef","useRef","markerRefs","mapContainerRef","_usePlaces","usePlaces","poiMarkers","setCurrentCenter","currentCenter","setCurrentZoom","currentZoom","selectedPlaceMarker","setSelectedPlaceMarker","placesWindow","setPlacesWindow","onIdle","current","newCenter","getCenter","toJSON","newZoom","useEffect","handleScroll","mapContainerRefCurrent","addEventListener","removeEventListener","mapInstance","dragStartListener","addListener","mouseDownListener","google","maps","event","removeListener","length","fitBounds","currZoom","setZoomVal","setZoom","panTo","LatLng","latitude","longitude","map","overload","arguments","undefined","bounds","window","LatLngBounds","forEach","item","extend","optionalShowLocationClusterConfig","configLocation","markerClickHandler","mapLocation","onLoad","pinIconUrl","pinIcon","fillColor","strokeColor","onClusterClick","cluster","showForZoomLevelLessThan","console","log","getMarkers","error","markers","setTimeout","marker","getPosition","React","createElement","Map","filteredListingsLength","MarkerClustererF","options","clusterOptions","onClick","clusterer","Fragment","MapMarker","key","id","selectedLocation","setSelectedLocation","markerIcon","markerIconSelected","index","PlaceMarker","concat","title"],"mappings":";;;;;;;;;;;AAeA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAIZ;AAAA,EAAA,IAHLC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,iBAAiB,GAAAF,IAAA,CAAjBE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EAAA;QACXP,GAAG,EAAA,SAAA,CAAAQ,MAAA,CAAYrB,MAAM,CAACsB,KAAK,EAAAD,GAAAA,CAAAA,CAAAA,MAAA,CAAIF,KAAK,CAAG;AACvCnB,QAAAA,MAAM,EAAEA,MAAO;AACfmB,QAAAA,KAAK,EAAEA,KAAM;AACb/E,QAAAA,mBAAmB,EAAEA,mBAAoB;AACzCE,QAAAA,YAAY,EAAEA,YAAa;AAC3BC,QAAAA,eAAe,EAAEA,eAAgB;AACjCF,QAAAA,sBAAsB,EAAEA,sBAAAA;AAAuB,OAC7C,CAAC,CAAA;AAAA,KACJ,CACA,CAAC,CAAA;AAAA,GAEa,CACd,CAAC,CAAA;AAER;;;;"}
|
|
1
|
+
{"version":3,"file":"map-container.js","sources":["../../../../src/components/containers/maps/map-container.js"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\n\nimport MapMarker from \"~/components/containers/maps/map-marker-container\";\nimport PlaceMarker from \"~/components/modules/maps/place-marker\";\n\nimport { usePlaces } from \"~/contexts/placesContext\";\nimport { useMap } from \"~/contexts/mapContext\";\nimport { useMapList } from \"~/contexts/mapListContext\";\n\nimport { markerIconSelected, markerIcon, pinIcon } from \"~/util/mapIconUtil\";\n\nimport Map from \"~/components/modules/maps/map\";\nimport { MarkerClustererF } from \"@react-google-maps/api\";\nimport { clusterOptions } from \"~/util/mapUtil\";\n\nconst MapContainer = ({\n\tmarkerConfigs,\n\tinfoWindowClasses,\n\tclusterGridSize = 60\n}) => {\n\tconst {\n\t\tlocation,\n\t\tzoom,\n\t\tcenter,\n\t\tselectLocationEntity,\n\t\tsetLocation,\n\t\tmapInteracted,\n\t\tsetMapInteracted\n\t} = useMap();\n\n\tconst {\n\t\tmapItems, filteredListings, setSelectedFilters,\n\t\tsetQuery,\n\t\tsiteConfig\n\t} = useMapList();\n\n\tconst mapRef = useRef();\n\tconst markerRefs = useRef({});\n\tconst mapContainerRef = useRef(null);\n\tconst {\n\t\tpoiMarkers,\n\t\tsetCurrentCenter,\n\t\tcurrentCenter,\n\t\tsetCurrentZoom,\n\t\tcurrentZoom,\n\t\tselectedPlaceMarker,\n\t\tsetSelectedPlaceMarker,\n\t\tplacesWindow,\n\t\tsetPlacesWindow } = usePlaces();\n\n\tconst onIdle = () => {\n\t\tif (!currentCenter || !mapRef.current) return;\n\t\tconst newCenter = mapRef.current.getCenter().toJSON();\n\t\tconst newZoom = mapRef.current.zoom;\n\n\t\tsetCurrentCenter(newCenter);\n\n\t\tif (newZoom !== currentZoom) {\n\t\t\tsetCurrentZoom(newZoom);\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (mapContainerRef.current) {\n\t\t\tconst handleScroll = () => {\n\t\t\t\tsetMapInteracted(true);\n\t\t\t};\n\t\t\tvar mapContainerRefCurrent = mapContainerRef.current;\n\t\t\tmapContainerRef.current.addEventListener('wheel', handleScroll);\n\t\t\treturn () => mapContainerRefCurrent.removeEventListener('wheel', handleScroll);\n\t\t}\n\t}, [mapContainerRef.current]);\n\n\tuseEffect(() => {\n\t\tif (mapRef.current) {\n\t\t\tconst mapInstance = mapRef.current;\n\t\t\tconst dragStartListener = mapInstance.addListener('dragstart', () => setMapInteracted(true));\n\t\t\tconst mouseDownListener = mapInstance.addListener('mousedown', () => setMapInteracted(true));\n\t\t\treturn () => {\n\t\t\t\tgoogle.maps.event.removeListener(dragStartListener);\n\t\t\t\tgoogle.maps.event.removeListener(mouseDownListener);\n\t\t\t};\n\t\t}\n\t}, [mapRef.current, mapContainerRef.current]);\n\n\tuseEffect(() => {\n\t\tif ((mapItems && mapItems.length > 0 || poiMarkers.length > 0) && mapRef.current) {\n\t\t\tfitBounds(mapRef.current);\n\t\t}\n\t}, [mapItems, mapRef.current, location]);\n\n\tuseEffect(() => {\n\t\tif ((mapItems && mapItems.length > 0 || poiMarkers.length > 0) && mapRef.current && mapInteracted) {\n\t\t\tfitBounds(mapRef.current, true);\n\t\t}\n\t\tif (mapRef.current) {\n\t\t\tlet currZoom = mapRef.current.zoom;\n\t\t\tlet setZoomVal = currZoom < 13 ? currZoom : 12;\n\t\t\tmapRef.current.setZoom(setZoomVal);\n\t\t}\n\t}, [filteredListings]);\n\n\tuseEffect(() => {\n\t\tif (!mapRef.current || !location || mapInteracted) return;\n\t\tmapRef.current.panTo(\n\t\t\tnew google.maps.LatLng(location.latitude, location.longitude)\n\t\t);\n\t\tif (mapRef.current) {\n\t\t\tlet setZoomVal = zoom < 13 ? zoom : 12;\n\t\t\tmapRef.current.setZoom(setZoomVal);\n\t\t}\n\t}, [location, zoom, mapRef.current]);\n\n\tconst fitBounds = (map, overload = false) => {\n\t\tif ((mapInteracted === false || overload) && mapItems != null) {\n\t\t const bounds = new window.google.maps.LatLngBounds();\n\t\t mapItems.forEach(item => {\n\t\t\t\tbounds.extend(new google.maps.LatLng(item.latitude, item.longitude));\n\t\t });\n\t\t if(siteConfig.optionalShowLocationClusterConfig){\n\t\t\t\tlet configLocation = new google.maps.LatLng(siteConfig.optionalShowLocationClusterConfig.latitude, siteConfig.optionalShowLocationClusterConfig.longitude);\n\t\t\t\tmap.panTo(configLocation);\n\t\t\t\tbounds.extend(new google.maps.LatLng(siteConfig.optionalShowLocationClusterConfig.latitude, siteConfig.optionalShowLocationClusterConfig.longitude));\n\t\t }\n\t\t if (!map) return;\n\t\t const currentCenter = map.getCenter();\n\t\t map.fitBounds(bounds);\n\t\t const newCenter = bounds.getCenter();\n\t\t if (currentCenter && newCenter) {\n\t\t\t\tmap.panTo(newCenter);\n\t\t }\n\t\t}\n\t\tif (mapRef.current.zoom > 17) {\n\t\t mapRef.current.setZoom(16);\n\t\t}\n\t };\n\n\tconst markerClickHandler = mapLocation => {\n\t\tsetMapInteracted(true);\n\t\tselectLocationEntity(mapLocation);\n\t};\n\n\tconst onLoad = map => {\n\t\tif (!location || location === null) {\n\t\t\tmapRef.current = map;\n\t\t\tfitBounds(map, true);\n\t\t\treturn;\n\t\t}\n\t\tmapRef.current = map;\n\n\t\tif (mapInteracted === false) {\n\t\t\tmapRef.current.panTo(\n\t\t\t\tnew google.maps.LatLng(location.latitude, location.longitude)\n\t\t\t);\n\n\t\t\tmapRef.current.setZoom(zoom);\n\t\t}\n\t};\n\n\tconst pinIconUrl = pinIcon({\n\t\tfillColor: markerConfigs.fillColor,\n\t\tstrokeColor: markerConfigs.strokeColor\n\t});\n\n\tconst onClusterClick = cluster => {\n\t\tif(!siteConfig.optionalShowLocationClusterConfig || (mapRef.current.zoom > siteConfig.optionalShowLocationClusterConfig.showForZoomLevelLessThan)) {\n\t\t\tconsole.log(\"should return\");\n\t\t\treturn;\n\t\t}\n\t\tif (!cluster || typeof cluster.getMarkers !== 'function') {\n\t\t console.error('Cluster object or getMarkers method not available.');\n\t\t return;\n\t\t}\n\n\t\tconst markers = cluster.getMarkers();\n\n\t\tif (!markers || markers.length === 0) {\n\t\t console.error('No markers found in the cluster.');\n\t\t return;\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t const bounds = new window.google.maps.LatLngBounds();\n\n\t\t markers.forEach(marker => {\n\t\t\t\tbounds.extend(marker.getPosition());\n\t\t });\n\n\t\t bounds.extend(new google.maps.LatLng(siteConfig.optionalShowLocationClusterConfig.latitude, siteConfig.optionalShowLocationClusterConfig.longitude));\n\n\t\t if (mapRef.current) {\n\t\t\t\tmapRef.current.fitBounds(bounds);\n\t\t }\n\t\t}, 500);\n\t };\n\n\treturn (\n\t\t<Map\n\t\t\tzoom={zoom}\n\t\t\tcenter={center}\n\t\t\tmapContainerRef={mapContainerRef}\n\t\t\tonLoad={onLoad}\n\t\t\tonIdle={onIdle}\n\t\t\tmapInteracted={mapInteracted}\n\t\t\tpinIconUrl={pinIconUrl}\n\t\t\tsetMapInteracted={setMapInteracted}\n\t\t\tfitBounds={fitBounds}\n\t\t\tmapRef={mapRef}\n\t\t\tsetQuery={setQuery}\n\t\t\tfilteredListingsLength={filteredListings.length}\n\t\t\tsetSelectedFilters={setSelectedFilters}\n\t\t>\n\t\t\t<MarkerClustererF options={clusterOptions(clusterGridSize, markerConfigs.fillColor)} onClick={onClusterClick}>\n\t\t\t\t{clusterer => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{mapItems.map(item => (\n\t\t\t\t\t\t\t<MapMarker\n\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\tselectedLocation={location}\n\t\t\t\t\t\t\t\tmarkerRefs={markerRefs}\n\t\t\t\t\t\t\t\tinfoWindowClasses={infoWindowClasses}\n\t\t\t\t\t\t\t\tsetSelectedLocation={setLocation}\n\t\t\t\t\t\t\t\tmarkerClickHandler={markerClickHandler}\n\t\t\t\t\t\t\t\tclusterer={clusterer}\n\t\t\t\t\t\t\t\tmarkerIcon={markerIcon(markerConfigs)}\n\t\t\t\t\t\t\t\tmarkerIconSelected={markerIconSelected(markerConfigs)}\n\t\t\t\t\t\t\t\tsetMapInteracted={setMapInteracted}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t))}\n\t\t\t\t\t\t{poiMarkers && poiMarkers.markers.map((marker, index) => (\n\t\t\t\t\t\t\t<PlaceMarker\n\t\t\t\t\t\t\t\tkey={`marker-${marker.title}-${index}`}\n\t\t\t\t\t\t\t\tmarker={marker}\n\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\tselectedPlaceMarker={selectedPlaceMarker}\n\t\t\t\t\t\t\t\tplacesWindow={placesWindow}\n\t\t\t\t\t\t\t\tsetPlacesWindow={setPlacesWindow}\n\t\t\t\t\t\t\t\tsetSelectedPlaceMarker={setSelectedPlaceMarker}\n\t\t\t\t\t\t\t />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t</MarkerClustererF>\n\t\t</Map>\n\t);\n};\n\nexport default MapContainer;\n"],"names":["MapContainer","_ref","markerConfigs","infoWindowClasses","_ref$clusterGridSize","clusterGridSize","_useMap","useMap","location","zoom","center","selectLocationEntity","setLocation","mapInteracted","setMapInteracted","_useMapList","useMapList","mapItems","filteredListings","setSelectedFilters","setQuery","siteConfig","mapRef","useRef","markerRefs","mapContainerRef","_usePlaces","usePlaces","poiMarkers","setCurrentCenter","currentCenter","setCurrentZoom","currentZoom","selectedPlaceMarker","setSelectedPlaceMarker","placesWindow","setPlacesWindow","onIdle","current","newCenter","getCenter","toJSON","newZoom","useEffect","handleScroll","mapContainerRefCurrent","addEventListener","removeEventListener","mapInstance","dragStartListener","addListener","mouseDownListener","google","maps","event","removeListener","length","fitBounds","currZoom","setZoomVal","setZoom","panTo","LatLng","latitude","longitude","map","overload","arguments","undefined","bounds","window","LatLngBounds","forEach","item","extend","optionalShowLocationClusterConfig","configLocation","markerClickHandler","mapLocation","onLoad","pinIconUrl","pinIcon","fillColor","strokeColor","onClusterClick","cluster","showForZoomLevelLessThan","console","log","getMarkers","error","markers","setTimeout","marker","getPosition","React","createElement","Map","filteredListingsLength","MarkerClustererF","options","clusterOptions","onClick","clusterer","Fragment","MapMarker","key","id","selectedLocation","setSelectedLocation","markerIcon","markerIconSelected","index","PlaceMarker","concat","title"],"mappings":";;;;;;;;;;;AAeA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAIZ;AAAA,EAAA,IAHLC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,iBAAiB,GAAAF,IAAA,CAAjBE,iBAAiB;IAAAC,oBAAA,GAAAH,IAAA,CACjBI,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,oBAAA,CAAA;AAEpB,EAAA,IAAAE,OAAA,GAQIC,MAAM,EAAE;IAPXC,QAAQ,GAAAF,OAAA,CAARE,QAAQ;IACRC,IAAI,GAAAH,OAAA,CAAJG,IAAI;IACJC,MAAM,GAAAJ,OAAA,CAANI,MAAM;IACNC,oBAAoB,GAAAL,OAAA,CAApBK,oBAAoB;IACpBC,WAAW,GAAAN,OAAA,CAAXM,WAAW;IACXC,aAAa,GAAAP,OAAA,CAAb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