@abcagency/hc-ui-components 1.3.18 → 1.3.19
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/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/dist/apis/hcApi.js +85 -183
- package/dist/apis/hcApi.js.map +1 -1
- package/dist/components/HireControlMap.js +10 -5
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/modules/accordions/MapAccordionItem.js +10 -67
- package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
- package/dist/components/modules/filter/index.js.map +1 -1
- package/dist/components/modules/filter/radio-item.js +1 -2
- package/dist/components/modules/filter/radio-item.js.map +1 -1
- package/dist/components/modules/jobListing/listing-details-container.js +45 -0
- package/dist/components/modules/jobListing/listing-details-container.js.map +1 -0
- package/dist/components/modules/jobListing/listing-details.js +24 -24
- package/dist/components/modules/jobListing/listing-details.js.map +1 -1
- package/dist/components/modules/{maps/list → list}/field-mapper.js +8 -7
- package/dist/components/modules/list/field-mapper.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/header-item.js +2 -2
- package/dist/components/modules/list/header-item.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/header.js +6 -4
- package/dist/components/modules/list/header.js.map +1 -0
- package/dist/components/modules/list/index.js +36 -0
- package/dist/components/modules/list/index.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/item-expand-card/index.js +3 -1
- package/dist/components/modules/list/item-expand-card/index.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/item-expand-card/recruiter-contact-nav.js +2 -2
- package/dist/components/modules/list/item-expand-card/recruiter-contact-nav.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/item-expand-card/recruiter-details.js +1 -1
- package/dist/components/modules/list/item-expand-card/recruiter-details.js.map +1 -0
- package/dist/components/modules/list/item-expand-card/recruiter-headshot.js.map +1 -0
- package/dist/components/modules/list/item-list.js +28 -0
- package/dist/components/modules/list/item-list.js.map +1 -0
- package/dist/components/modules/list/list-item/index.js +75 -0
- package/dist/components/modules/list/list-item/index.js.map +1 -0
- package/dist/components/modules/list/list-item/list-item-container.js +47 -0
- package/dist/components/modules/list/list-item/list-item-container.js.map +1 -0
- package/dist/components/modules/{maps/list/list-item/index.js → list/list-item/list-item.js} +29 -33
- package/dist/components/modules/list/list-item/list-item.js.map +1 -0
- package/dist/components/modules/maps/map-list.js +3 -3
- package/dist/components/modules/maps/map-list.js.map +1 -1
- package/dist/contexts/mapContext.js +84 -113
- package/dist/contexts/mapContext.js.map +1 -1
- package/dist/contexts/mapListContext.js +181 -293
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/contexts/trackEventContext.js +1 -1
- package/dist/services/configService.js +10 -28
- package/dist/services/configService.js.map +1 -1
- package/dist/services/googlePlacesNearbyService.js +33 -58
- package/dist/services/googlePlacesNearbyService.js.map +1 -1
- package/dist/services/listingAggregatorService.js +35 -75
- package/dist/services/listingAggregatorService.js.map +1 -1
- package/dist/services/listingEntityService.js +10 -31
- package/dist/services/listingEntityService.js.map +1 -1
- package/dist/services/listingService.js +26 -60
- package/dist/services/listingService.js.map +1 -1
- package/dist/services/recruiterService.js +11 -31
- package/dist/services/recruiterService.js.map +1 -1
- package/dist/types/apis/hcApi.d.ts +5 -0
- package/dist/types/clientToken.d.ts +2 -0
- package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +9 -0
- package/dist/types/components/modules/accordions/default.d.ts +19 -0
- package/dist/types/components/modules/buttons/button-group-apply.d.ts +24 -0
- package/dist/types/components/modules/buttons/commute-pill.d.ts +5 -0
- package/dist/types/components/modules/buttons/default.d.ts +48 -0
- package/dist/types/components/modules/buttons/pill-wrapper.d.ts +3 -0
- package/dist/types/components/modules/dialogs/apply-dialog.d.ts +8 -0
- package/dist/types/components/modules/filter/sort.d.ts +8 -0
- package/dist/types/components/modules/grid.d.ts +8 -0
- package/dist/types/components/modules/icon.d.ts +10 -0
- package/dist/types/components/modules/jobListing/listing-details-container.d.ts +6 -0
- package/dist/types/components/modules/jobListing/listing-details.d.ts +18 -0
- package/dist/types/components/modules/list/field-mapper.d.ts +10 -0
- package/dist/types/components/modules/list/header-item.d.ts +11 -0
- package/dist/types/components/modules/list/header.d.ts +11 -0
- package/dist/types/components/modules/list/index.d.ts +9 -0
- package/dist/types/components/modules/list/item-expand-card/index.d.ts +7 -0
- package/dist/types/components/modules/list/item-expand-card/recruiter-contact-nav.d.ts +17 -0
- package/dist/types/components/modules/list/item-expand-card/recruiter-details.d.ts +21 -0
- package/dist/types/components/modules/list/item-expand-card/recruiter-headshot.d.ts +8 -0
- package/dist/types/components/modules/list/item-list.d.ts +21 -0
- package/dist/types/components/modules/list/list-item/index.d.ts +12 -0
- package/dist/types/components/modules/list/list-item/list-item-container.d.ts +14 -0
- package/dist/types/components/modules/list/list-item/list-item.d.ts +3 -0
- package/dist/types/constants/eventTypes.d.ts +13 -0
- package/dist/types/contexts/mapContext.d.ts +29 -0
- package/dist/types/contexts/mapListContext.d.ts +58 -0
- package/dist/types/contexts/trackEventContext.d.ts +6 -0
- package/dist/types/enums/SectionType.d.ts +9 -0
- package/dist/types/hooks/useList.d.ts +13 -0
- package/dist/types/services/configService.d.ts +6 -0
- package/dist/types/services/googlePlacesNearbyService.d.ts +5 -0
- package/dist/types/services/listingAggregatorService.d.ts +12 -0
- package/dist/types/services/listingEntityService.d.ts +6 -0
- package/dist/types/services/listingService.d.ts +9 -0
- package/dist/types/services/recruiterService.d.ts +6 -0
- package/dist/types/types/Address.d.ts +7 -0
- package/dist/types/types/ContentSection.d.ts +8 -0
- package/dist/types/types/GetListingParams.d.ts +8 -0
- package/dist/types/types/LatLng.d.ts +4 -0
- package/dist/types/types/ListingEntity.d.ts +10 -0
- package/dist/types/types/ListingFields.d.ts +20 -0
- package/dist/types/types/Listings.d.ts +31 -0
- package/dist/types/types/Recruiter.d.ts +9 -0
- package/dist/types/types/SimilarListing.d.ts +24 -0
- package/dist/types/types/config/Colors.d.ts +8 -0
- package/dist/types/types/config/MapConfig.d.ts +29 -0
- package/dist/types/types/config/PointsOfInterestConfig.d.ts +13 -0
- package/dist/types/types/config/SearchConfig.d.ts +4 -0
- package/dist/types/util/filterUtil.d.ts +28 -0
- package/dist/types/util/loading.d.ts +3 -0
- package/dist/types/util/localStorageUtil.d.ts +3 -0
- package/dist/types/util/mapUtil.d.ts +15 -0
- package/dist/types/util/sortUtil.d.ts +1 -0
- package/dist/types/util/stringUtils.d.ts +1 -0
- package/dist/util/filterUtil.js +1 -3
- package/dist/util/filterUtil.js.map +1 -1
- package/dist/util/localStorageUtil.js +37 -28
- package/dist/util/localStorageUtil.js.map +1 -1
- package/dist/util/mapUtil.js.map +1 -1
- package/package.json +23 -17
- package/rollup.config.mjs +23 -19
- package/src/apis/{hcApi.js → hcApi.ts} +27 -11
- package/src/components/HireControlMap.js +132 -129
- package/src/components/modules/accordions/MapAccordionItem.js +32 -74
- package/src/components/modules/filter/index.js +89 -89
- package/src/components/modules/filter/radio-item.js +0 -1
- package/src/components/modules/jobListing/listing-details-container.js +40 -0
- package/src/components/modules/jobListing/listing-details.js +209 -99
- package/src/components/modules/{maps/list → list}/field-mapper.js +114 -112
- package/src/components/modules/{maps/list → list}/header.js +49 -47
- package/src/components/modules/list/index.tsx +83 -0
- package/src/components/modules/{maps/list → list}/item-expand-card/index.js +24 -22
- package/src/components/modules/list/item-list.tsx +198 -0
- package/src/components/modules/list/list-item/index.js +70 -0
- package/src/components/modules/list/list-item/list-item-container.js +43 -0
- package/src/components/modules/{maps/list/list-item/index.js → list/list-item/list-item.js} +32 -38
- package/src/components/modules/maps/map-list.js +74 -74
- package/src/contexts/mapContext.tsx +129 -0
- package/src/contexts/mapListContext.tsx +297 -0
- package/src/enums/SectionType.ts +9 -0
- package/src/services/{configService.js → configService.ts} +16 -16
- package/src/services/{googlePlacesNearbyService.js → googlePlacesNearbyService.ts} +11 -2
- package/src/services/listingAggregatorService.ts +76 -0
- package/src/services/listingEntityService.ts +16 -0
- package/src/services/listingService.ts +40 -0
- package/src/services/{recruiterService.js → recruiterService.ts} +18 -17
- package/src/types/Address.ts +7 -0
- package/src/types/ContentSection.ts +9 -0
- package/src/types/GetListingParams.ts +8 -0
- package/src/types/LatLng.ts +4 -0
- package/src/types/ListingEntity.ts +11 -0
- package/src/types/ListingFields.ts +20 -0
- package/src/types/Listings.ts +32 -0
- package/src/types/Recruiter.ts +9 -0
- package/src/types/SimilarListing.ts +24 -0
- package/src/types/config/Colors.ts +8 -0
- package/src/types/config/MapConfig.ts +30 -0
- package/src/types/config/PointsOfInterestConfig.ts +13 -0
- package/src/types/config/SearchConfig.ts +4 -0
- package/src/util/filterUtil.js +239 -239
- package/src/util/localStorageUtil.ts +34 -0
- package/src/util/mapUtil.js +91 -91
- package/tsconfig.json +23 -0
- package/dist/components/modules/maps/list/field-mapper.js.map +0 -1
- package/dist/components/modules/maps/list/header-item.js.map +0 -1
- package/dist/components/modules/maps/list/header.js.map +0 -1
- package/dist/components/modules/maps/list/index.js +0 -102
- package/dist/components/modules/maps/list/index.js.map +0 -1
- package/dist/components/modules/maps/list/item-expand-card/index.js.map +0 -1
- package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js.map +0 -1
- package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js.map +0 -1
- package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js.map +0 -1
- package/dist/components/modules/maps/list/list-item/index.js.map +0 -1
- package/dist/services/_virtual/_rollupPluginBabelHelpers.js +0 -372
- package/dist/services/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
- package/dist/services/apis/hcApi.js +0 -189
- package/dist/services/apis/hcApi.js.map +0 -1
- package/dist/services/clientToken.js +0 -7
- package/dist/services/clientToken.js.map +0 -1
- package/dist/services/styles/index.css +0 -3
- package/src/components/modules/maps/list/index.js +0 -112
- package/src/contexts/mapContext.js +0 -101
- package/src/contexts/mapListContext.js +0 -242
- package/src/services/listingAggregatorService.js +0 -50
- package/src/services/listingEntityService.js +0 -15
- package/src/services/listingService.js +0 -26
- package/src/util/localStorageUtil.js +0 -27
- /package/dist/components/modules/{maps/list → list}/item-expand-card/recruiter-headshot.js +0 -0
- /package/src/components/modules/{maps/list → list}/header-item.js +0 -0
- /package/src/components/modules/{maps/list → list}/item-expand-card/recruiter-contact-nav.js +0 -0
- /package/src/components/modules/{maps/list → list}/item-expand-card/recruiter-details.js +0 -0
- /package/src/components/modules/{maps/list → list}/item-expand-card/recruiter-headshot.js +0 -0
|
@@ -1,129 +1,132 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { useLoadScript } from '@react-google-maps/api';
|
|
3
|
-
|
|
4
|
-
import Grid from '~/components/modules/grid';
|
|
5
|
-
import Filter from '~/components/modules/filter';
|
|
6
|
-
import MapList from '~/components/modules/maps/map-list';
|
|
7
|
-
|
|
8
|
-
import { MapProvider } from '~/contexts/mapContext';
|
|
9
|
-
import { PlacesProvider } from '~/contexts/placesContext';
|
|
10
|
-
import { MapListProvider } from '~/contexts/mapListContext';
|
|
11
|
-
import { TrackEventProvider } from '~/contexts/trackEventContext';
|
|
12
|
-
|
|
13
|
-
import { getMapConfig } from '~/services/configService';
|
|
14
|
-
import { setClientAuthKey } from '~/clientToken.js';
|
|
15
|
-
|
|
16
|
-
import '../styles/index.css';
|
|
17
|
-
|
|
18
|
-
const libraries = ['places'];
|
|
19
|
-
|
|
20
|
-
export const HireControlMap = ({
|
|
21
|
-
clientToken,
|
|
22
|
-
navigateToDetails = null,
|
|
23
|
-
navigateToEasyApply = null,
|
|
24
|
-
Link = null,
|
|
25
|
-
linkFormat = '/jobs/[slug]',
|
|
26
|
-
trackEvent = (eventType, eventObj) => {console.log(eventType); console.log(eventObj);}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { useLoadScript } from '@react-google-maps/api';
|
|
3
|
+
|
|
4
|
+
import Grid from '~/components/modules/grid';
|
|
5
|
+
import Filter from '~/components/modules/filter';
|
|
6
|
+
import MapList from '~/components/modules/maps/map-list';
|
|
7
|
+
|
|
8
|
+
import { MapProvider } from '~/contexts/mapContext';
|
|
9
|
+
import { PlacesProvider } from '~/contexts/placesContext';
|
|
10
|
+
import { MapListProvider } from '~/contexts/mapListContext';
|
|
11
|
+
import { TrackEventProvider } from '~/contexts/trackEventContext';
|
|
12
|
+
|
|
13
|
+
import { getMapConfig } from '~/services/configService';
|
|
14
|
+
import { setClientAuthKey } from '~/clientToken.js';
|
|
15
|
+
|
|
16
|
+
import '../styles/index.css';
|
|
17
|
+
|
|
18
|
+
const libraries = ['places'];
|
|
19
|
+
|
|
20
|
+
export const HireControlMap = ({
|
|
21
|
+
clientToken,
|
|
22
|
+
navigateToDetails = null,
|
|
23
|
+
navigateToEasyApply = null,
|
|
24
|
+
Link = null,
|
|
25
|
+
linkFormat = '/jobs/[slug]',
|
|
26
|
+
trackEvent = (eventType, eventObj) => {console.log(eventType); console.log(eventObj);},
|
|
27
|
+
listings = []
|
|
28
|
+
}) => {
|
|
29
|
+
const [siteConfig, setSiteconfig] = useState(null);
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setClientAuthKey(clientToken);
|
|
33
|
+
const fetchSiteConfig = async () => {
|
|
34
|
+
try {
|
|
35
|
+
const configData = await getMapConfig(clientToken);
|
|
36
|
+
setSiteconfig(configData);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.error('Failed to fetch site configuration:', error);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
fetchSiteConfig();
|
|
43
|
+
}, [clientToken]);
|
|
44
|
+
|
|
45
|
+
const { isLoaded } = useLoadScript({
|
|
46
|
+
googleMapsApiKey: process.env.GOOGLE_MAPS_API_KEY,
|
|
47
|
+
version: 'quarterly',
|
|
48
|
+
libraries: libraries
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<div>
|
|
53
|
+
{isLoaded && siteConfig && (
|
|
54
|
+
<HomeBody
|
|
55
|
+
siteConfig={siteConfig}
|
|
56
|
+
navigateToDetails={navigateToDetails}
|
|
57
|
+
navigateToEasyApply={navigateToEasyApply}
|
|
58
|
+
Link={Link}
|
|
59
|
+
linkFormat={linkFormat}
|
|
60
|
+
trackEvent={trackEvent}
|
|
61
|
+
listings={listings}
|
|
62
|
+
/>
|
|
63
|
+
)}
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const HomeBody = ({ siteConfig, navigateToDetails, navigateToEasyApply, Link, linkFormat, trackEvent, listings }) => {
|
|
69
|
+
const resetFilters = false;
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<TrackEventProvider trackEvent={trackEvent}>
|
|
73
|
+
<MapListProvider
|
|
74
|
+
siteConfig={siteConfig}
|
|
75
|
+
resetFilters={resetFilters}
|
|
76
|
+
avigateToDetails={navigateToDetails}
|
|
77
|
+
navigateToEasyApply={navigateToEasyApply}
|
|
78
|
+
Link={Link}
|
|
79
|
+
linkFormat={linkFormat}
|
|
80
|
+
listings={listings}
|
|
81
|
+
>
|
|
82
|
+
<MapProvider resetFilters={resetFilters}>
|
|
83
|
+
<PlacesProvider
|
|
84
|
+
placeMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}
|
|
85
|
+
markerColors={{
|
|
86
|
+
fillColor: siteConfig.colors.primary,
|
|
87
|
+
strokeColor: siteConfig.colors.primaryDark,
|
|
88
|
+
selectedFillColor: siteConfig.colors.secondary,
|
|
89
|
+
selectedStrokeColor: siteConfig.colors.secondaryDark,
|
|
90
|
+
placeMarkers: {
|
|
91
|
+
colors: siteConfig.pointsOfInterestConfig.placeMarkerColors,
|
|
92
|
+
size: siteConfig.pointsOfInterestConfig.placeMarkerSize
|
|
93
|
+
}
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
<Grid
|
|
97
|
+
as='section'
|
|
98
|
+
id='job-search-interface'
|
|
99
|
+
columns='md:hc-grid-cols-[1fr_2.5fr] lg:hc-grid-cols-[1fr_3.5fr]'
|
|
100
|
+
gap='hc-gap-0'
|
|
101
|
+
autoRows={false}
|
|
102
|
+
className='hc-items-stretch hc-h-screen hc-min-h-[30rem] hc-divide-x hc-divide-uiAccent/20'
|
|
103
|
+
>
|
|
104
|
+
<Grid.Item className='hc-bg-gray-100'>
|
|
105
|
+
<Filter showMap={siteConfig.showMap} className='hc-hidden md:hc-block' />
|
|
106
|
+
</Grid.Item>
|
|
107
|
+
<MapList
|
|
108
|
+
markerConfigs={{
|
|
109
|
+
fillColor: siteConfig.colors.primary,
|
|
110
|
+
strokeColor: siteConfig.colors.primaryDark,
|
|
111
|
+
selectedFillColor: siteConfig.colors.secondary,
|
|
112
|
+
selectedStrokeColor: siteConfig.colors.secondaryDark,
|
|
113
|
+
placeMarkers: {
|
|
114
|
+
colors: siteConfig.pointsOfInterestConfig.placeMarkerColors,
|
|
115
|
+
size: siteConfig.pointsOfInterestConfig.placeMarkerSize
|
|
116
|
+
}
|
|
117
|
+
}}
|
|
118
|
+
showMap={siteConfig.showMap}
|
|
119
|
+
fieldsShown={siteConfig.fieldsShown}
|
|
120
|
+
specialFeatures={siteConfig.specialFeatures}
|
|
121
|
+
fieldNames={siteConfig.fieldNames}
|
|
122
|
+
placeMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}
|
|
123
|
+
/>
|
|
124
|
+
</Grid>
|
|
125
|
+
</PlacesProvider>
|
|
126
|
+
</MapProvider>
|
|
127
|
+
</MapListProvider>
|
|
128
|
+
</TrackEventProvider>
|
|
129
|
+
);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export default HireControlMap;
|
|
@@ -1,74 +1,32 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if (isActive) {
|
|
34
|
-
localStorage.removeItem("selectedListItem");
|
|
35
|
-
mapItems.find(x => Object.prototype.hasOwnProperty.call(x.items, item.id)) || null;
|
|
36
|
-
selectItem(null, null, 9, { lat: 39.8283, lng: -98.5795 });
|
|
37
|
-
} else {
|
|
38
|
-
setStorageObject("selectedListItem", item);
|
|
39
|
-
let location = mapItems.find(x => Object.prototype.hasOwnProperty.call(x.items, item.id)) || null;
|
|
40
|
-
selectItem(item, location, 12, {
|
|
41
|
-
lat: location?.latitude,
|
|
42
|
-
lng: location?.longitude
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
return (
|
|
47
|
-
<Accordion.Item key={item.id} id={item.id}>
|
|
48
|
-
<Accordion.Trigger.Blank>
|
|
49
|
-
<ListItem
|
|
50
|
-
ref={el => (itemRefs.current[item.id] = el)}
|
|
51
|
-
id={item.id}
|
|
52
|
-
key={item.id}
|
|
53
|
-
item={item}
|
|
54
|
-
fieldsShown={fieldsShown}
|
|
55
|
-
onClick={() => { trackEvent(eventTypes.JOB_LISTING_SELECTED, { jobTitle: item.fields.position, jobCategory: item.fields.category, entityDisplayName: item?.mapDetails?.entityDisplayName });setSelectedItemAndZoomMap(item);}}
|
|
56
|
-
showMap={showMap}
|
|
57
|
-
isActive={isActive}
|
|
58
|
-
setMobileTab={setMobileTab}
|
|
59
|
-
specialFeatures={specialFeatures}
|
|
60
|
-
className={hasListItemSelected ? isActive ? "!hc-border-secondary hc-border hc-border-b-0" : "hc-opacity-85" : ""}
|
|
61
|
-
favorites={favorites}
|
|
62
|
-
setFavorites={handleSettingFavorites}
|
|
63
|
-
/>
|
|
64
|
-
</Accordion.Trigger.Blank>
|
|
65
|
-
{isActive &&
|
|
66
|
-
<Accordion.Content bodyClassName="hc-px-2 hc-py-2 hc-pt-0 hc-bg-uiAccent/5 hc-border-secondary hc-border hc-border-t-0">
|
|
67
|
-
<ItemExpandCard content={itemExpandedContent(item, recruiters)} />
|
|
68
|
-
</Accordion.Content>
|
|
69
|
-
}
|
|
70
|
-
</Accordion.Item>
|
|
71
|
-
);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export default MapAccordionItem;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Accordion from '~/components/modules/accordions/default';
|
|
3
|
+
import ItemExpandCard from '~/components/modules/list/item-expand-card';
|
|
4
|
+
|
|
5
|
+
const MapAccordionItem = ({
|
|
6
|
+
item,
|
|
7
|
+
itemRefs,
|
|
8
|
+
itemExpandedContent,
|
|
9
|
+
isActive,
|
|
10
|
+
children
|
|
11
|
+
}) => {
|
|
12
|
+
if(isActive){
|
|
13
|
+
console.log("accordion rerender ");
|
|
14
|
+
}
|
|
15
|
+
return (
|
|
16
|
+
<Accordion.Item key={item.id} id={item.id}>
|
|
17
|
+
<Accordion.Trigger.Blank>
|
|
18
|
+
<div ref={el => (itemRefs.current[item.id] = el)}>
|
|
19
|
+
{children}
|
|
20
|
+
</div>
|
|
21
|
+
</Accordion.Trigger.Blank>
|
|
22
|
+
{isActive &&
|
|
23
|
+
|
|
24
|
+
<Accordion.Content bodyClassName="hc-px-2 hc-py-2 hc-pt-0 hc-bg-uiAccent/5 hc-border-secondary hc-border hc-border-t-0">
|
|
25
|
+
{ <ItemExpandCard content={itemExpandedContent(item)} />}
|
|
26
|
+
</Accordion.Content>
|
|
27
|
+
}
|
|
28
|
+
</Accordion.Item>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default MapAccordionItem;
|
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
|
|
3
|
-
import FilterSearch from '~/components/modules/filter/search';
|
|
4
|
-
import FiltersAccordion from '~/components/modules/accordions/filters';
|
|
5
|
-
import FilterLocations from '~/components/modules/filter/location';
|
|
6
|
-
import Button from '~/components/modules/buttons/default';
|
|
7
|
-
|
|
8
|
-
import { useMap } from '~/contexts/mapContext';
|
|
9
|
-
import { useMapList } from '~/contexts/mapListContext';
|
|
10
|
-
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
11
|
-
|
|
12
|
-
const Filter = ({
|
|
13
|
-
className,
|
|
14
|
-
showMap
|
|
15
|
-
}) => {
|
|
16
|
-
const { trackEvent, eventTypes } = useTrackEvent();
|
|
17
|
-
const [hasActiveFilters, setHasActiveFilters] = useState(false);
|
|
18
|
-
const [defaultValue, setDefaultValue] = useState(null);
|
|
19
|
-
const { setSelectedListItem, setLocation, filterReset } = useMap();
|
|
20
|
-
const {
|
|
21
|
-
filteredListings,
|
|
22
|
-
selectedFilters,
|
|
23
|
-
setSelectedFilters,
|
|
24
|
-
setMobileTab,
|
|
25
|
-
handleSettingFavorites,
|
|
26
|
-
setQuery,
|
|
27
|
-
siteConfig
|
|
28
|
-
} = useMapList();
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<div
|
|
32
|
-
className={`
|
|
33
|
-
hc-relative hc-max-h-[95vh] md:hc-max-h-screen hc-overflow-y-auto hc-overflow-x-auto
|
|
34
|
-
${className ?? ""}
|
|
35
|
-
`}
|
|
36
|
-
>
|
|
37
|
-
<div className="hc-px-4 md:hc-pt-4 hc-space-y-4">
|
|
38
|
-
<FiltersAccordion
|
|
39
|
-
setHasActiveFilters={setHasActiveFilters}
|
|
40
|
-
defaultValue={defaultValue}
|
|
41
|
-
setDefaultValue={value => { setDefaultValue(value == defaultValue ? "" : value); }}
|
|
42
|
-
setLocation={setLocation}
|
|
43
|
-
setSelectedListItem={setSelectedListItem}
|
|
44
|
-
/>
|
|
45
|
-
<FilterSearch />
|
|
46
|
-
{siteConfig.hideLocations !== true &&
|
|
47
|
-
<FilterLocations
|
|
48
|
-
setHasActiveFilters={setHasActiveFilters}
|
|
49
|
-
defaultValue={defaultValue}
|
|
50
|
-
showMap={showMap}
|
|
51
|
-
setDefaultValue={value => { setDefaultValue(value == defaultValue ? "" : value); }}
|
|
52
|
-
setLocation={setLocation}
|
|
53
|
-
setSelectedListItem={setSelectedListItem}
|
|
54
|
-
/>
|
|
55
|
-
}
|
|
56
|
-
</div>
|
|
57
|
-
<div className="hc-sticky hc-bottom-0 hc-inset-x-0 hc-flex hc-items-center hc-justify-between hc-gap-2 hc-py-2 hc-px-4 hc-mt-2 hc-bg-white md:hc-bg-gray-100">
|
|
58
|
-
<Button.Btn
|
|
59
|
-
onClick={() => {trackEvent(eventTypes.FILTERS_RESET, { filtersRemoved: selectedFilters }); filterReset(); setSelectedFilters({}); setQuery(null); handleSettingFavorites(null); }}
|
|
60
|
-
variant="outline"
|
|
61
|
-
size="sm"
|
|
62
|
-
>
|
|
63
|
-
Reset
|
|
64
|
-
</Button.Btn>
|
|
65
|
-
{selectedFilters && Object.keys(selectedFilters).length > 0 &&
|
|
66
|
-
<Button.Btn
|
|
67
|
-
onClick={() => setMobileTab("listTab")}
|
|
68
|
-
variant="primary"
|
|
69
|
-
size="sm"
|
|
70
|
-
className={`
|
|
71
|
-
md:hc-hidden
|
|
72
|
-
${hasActiveFilters ? "hc-opacity-0 hc-pointer-events-none" : "hc-opacity-100"}
|
|
73
|
-
`}
|
|
74
|
-
>
|
|
75
|
-
<Button.Body>
|
|
76
|
-
<Button.Icon
|
|
77
|
-
icon="fluent:search-12-filled"
|
|
78
|
-
size="hc-size-3.5"
|
|
79
|
-
/>
|
|
80
|
-
Show {filteredListings.length} Jobs
|
|
81
|
-
</Button.Body>
|
|
82
|
-
</Button.Btn>
|
|
83
|
-
}
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export default Filter;
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import FilterSearch from '~/components/modules/filter/search';
|
|
4
|
+
import FiltersAccordion from '~/components/modules/accordions/filters';
|
|
5
|
+
import FilterLocations from '~/components/modules/filter/location';
|
|
6
|
+
import Button from '~/components/modules/buttons/default';
|
|
7
|
+
|
|
8
|
+
import { useMap } from '~/contexts/mapContext';
|
|
9
|
+
import { useMapList } from '~/contexts/mapListContext';
|
|
10
|
+
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
11
|
+
|
|
12
|
+
const Filter = ({
|
|
13
|
+
className,
|
|
14
|
+
showMap
|
|
15
|
+
}) => {
|
|
16
|
+
const { trackEvent, eventTypes } = useTrackEvent();
|
|
17
|
+
const [hasActiveFilters, setHasActiveFilters] = useState(false);
|
|
18
|
+
const [defaultValue, setDefaultValue] = useState(null);
|
|
19
|
+
const { setSelectedListItem, setLocation, filterReset } = useMap();
|
|
20
|
+
const {
|
|
21
|
+
filteredListings,
|
|
22
|
+
selectedFilters,
|
|
23
|
+
setSelectedFilters,
|
|
24
|
+
setMobileTab,
|
|
25
|
+
handleSettingFavorites,
|
|
26
|
+
setQuery,
|
|
27
|
+
siteConfig
|
|
28
|
+
} = useMapList();
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div
|
|
32
|
+
className={`
|
|
33
|
+
hc-relative hc-max-h-[95vh] md:hc-max-h-screen hc-overflow-y-auto hc-overflow-x-auto
|
|
34
|
+
${className ?? ""}
|
|
35
|
+
`}
|
|
36
|
+
>
|
|
37
|
+
<div className="hc-px-4 md:hc-pt-4 hc-space-y-4">
|
|
38
|
+
<FiltersAccordion
|
|
39
|
+
setHasActiveFilters={setHasActiveFilters}
|
|
40
|
+
defaultValue={defaultValue}
|
|
41
|
+
setDefaultValue={value => { setDefaultValue(value == defaultValue ? "" : value); }}
|
|
42
|
+
setLocation={setLocation}
|
|
43
|
+
setSelectedListItem={setSelectedListItem}
|
|
44
|
+
/>
|
|
45
|
+
<FilterSearch />
|
|
46
|
+
{siteConfig.hideLocations !== true &&
|
|
47
|
+
<FilterLocations
|
|
48
|
+
setHasActiveFilters={setHasActiveFilters}
|
|
49
|
+
defaultValue={defaultValue}
|
|
50
|
+
showMap={showMap}
|
|
51
|
+
setDefaultValue={value => { setDefaultValue(value == defaultValue ? "" : value); }}
|
|
52
|
+
setLocation={setLocation}
|
|
53
|
+
setSelectedListItem={setSelectedListItem}
|
|
54
|
+
/>
|
|
55
|
+
}
|
|
56
|
+
</div>
|
|
57
|
+
<div className="hc-sticky hc-bottom-0 hc-inset-x-0 hc-flex hc-items-center hc-justify-between hc-gap-2 hc-py-2 hc-px-4 hc-mt-2 hc-bg-white md:hc-bg-gray-100">
|
|
58
|
+
<Button.Btn
|
|
59
|
+
onClick={() => {trackEvent(eventTypes.FILTERS_RESET, { filtersRemoved: selectedFilters }); filterReset(); setSelectedFilters({}); setQuery(null); handleSettingFavorites(null); }}
|
|
60
|
+
variant="outline"
|
|
61
|
+
size="sm"
|
|
62
|
+
>
|
|
63
|
+
Reset
|
|
64
|
+
</Button.Btn>
|
|
65
|
+
{selectedFilters && Object.keys(selectedFilters).length > 0 &&
|
|
66
|
+
<Button.Btn
|
|
67
|
+
onClick={() => setMobileTab("listTab")}
|
|
68
|
+
variant="primary"
|
|
69
|
+
size="sm"
|
|
70
|
+
className={`
|
|
71
|
+
md:hc-hidden
|
|
72
|
+
${hasActiveFilters ? "hc-opacity-0 hc-pointer-events-none" : "hc-opacity-100"}
|
|
73
|
+
`}
|
|
74
|
+
>
|
|
75
|
+
<Button.Body>
|
|
76
|
+
<Button.Icon
|
|
77
|
+
icon="fluent:search-12-filled"
|
|
78
|
+
size="hc-size-3.5"
|
|
79
|
+
/>
|
|
80
|
+
Show {filteredListings.length} Jobs
|
|
81
|
+
</Button.Body>
|
|
82
|
+
</Button.Btn>
|
|
83
|
+
}
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export default Filter;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useMap } from '~/contexts/mapContext';
|
|
3
|
+
import { useMapList } from '~/contexts/mapListContext';
|
|
4
|
+
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
5
|
+
import ListingDetails from '~/components/modules/jobListing/listing-details';
|
|
6
|
+
|
|
7
|
+
const ListingDetailsContainer = ({ item, recruiters }) => {
|
|
8
|
+
const { trackEvent, eventTypes } = useTrackEvent();
|
|
9
|
+
const { travelTime } = useMap();
|
|
10
|
+
const { siteConfig, navigateToDetails, navigateToEasyApply, Link, linkFormat } = useMapList();
|
|
11
|
+
|
|
12
|
+
const {
|
|
13
|
+
useDetailsPostMessage,
|
|
14
|
+
useApplyDialog,
|
|
15
|
+
internalApplyLink,
|
|
16
|
+
companyName,
|
|
17
|
+
jobsDomain
|
|
18
|
+
} = siteConfig;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<ListingDetails
|
|
22
|
+
item={item}
|
|
23
|
+
recruiters={recruiters}
|
|
24
|
+
travelTime={travelTime}
|
|
25
|
+
useDetailsPostMessage={useDetailsPostMessage}
|
|
26
|
+
navigateToDetails={navigateToDetails}
|
|
27
|
+
navigateToEasyApply={navigateToEasyApply}
|
|
28
|
+
Link={Link}
|
|
29
|
+
linkFormat={linkFormat}
|
|
30
|
+
useApplyDialog={useApplyDialog}
|
|
31
|
+
internalApplyLink={internalApplyLink}
|
|
32
|
+
companyName={companyName}
|
|
33
|
+
jobsDomain={jobsDomain}
|
|
34
|
+
trackEvent={trackEvent}
|
|
35
|
+
eventTypes={eventTypes}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default ListingDetailsContainer;
|