@abcagency/hc-ui-components 1.3.14 → 1.3.16
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 +1 -1
- package/dist/apis/hcApi.js.map +1 -1
- package/dist/clientToken.js.map +1 -1
- package/dist/components/HireControlMap.js +15 -5
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/modules/accordions/MapAccordionItem.js +11 -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/accordions/filterItem.js +2 -1
- package/dist/components/modules/accordions/filterItem.js.map +1 -1
- package/dist/components/modules/accordions/filters.js +0 -3
- package/dist/components/modules/accordions/filters.js.map +1 -1
- package/dist/components/modules/buttons/button-group-apply.js +36 -15
- package/dist/components/modules/buttons/button-group-apply.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/dialogs/apply-dialog.js.map +1 -1
- package/dist/components/modules/filter/commute.js +22 -6
- package/dist/components/modules/filter/commute.js.map +1 -1
- package/dist/components/modules/filter/index.js +7 -0
- package/dist/components/modules/filter/index.js.map +1 -1
- package/dist/components/modules/filter/item.js +16 -1
- package/dist/components/modules/filter/item.js.map +1 -1
- package/dist/components/modules/filter/location.js +1 -1
- package/dist/components/modules/filter/location.js.map +1 -1
- package/dist/components/modules/filter/points-of-interest.js.map +1 -1
- package/dist/components/modules/filter/radio-item.js +7 -0
- package/dist/components/modules/filter/radio-item.js.map +1 -1
- package/dist/components/modules/filter/search.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/jobListing/listing-details.js +6 -0
- package/dist/components/modules/jobListing/listing-details.js.map +1 -1
- package/dist/components/modules/maps/info-window-card.js.map +1 -1
- package/dist/components/modules/maps/info-window-content.js +20 -0
- package/dist/components/modules/maps/info-window-content.js.map +1 -1
- package/dist/components/modules/maps/list/field-mapper.js.map +1 -1
- package/dist/components/modules/maps/list/header-item.js.map +1 -1
- package/dist/components/modules/maps/list/header.js.map +1 -1
- package/dist/components/modules/maps/list/index.js +21 -12
- package/dist/components/modules/maps/list/index.js.map +1 -1
- package/dist/components/modules/maps/list/item-expand-card/index.js.map +1 -1
- package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js.map +1 -1
- package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js.map +1 -1
- package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js.map +1 -1
- package/dist/components/modules/maps/list/list-item/index.js +12 -2
- package/dist/components/modules/maps/list/list-item/index.js.map +1 -1
- package/dist/components/modules/maps/map-list.js.map +1 -1
- package/dist/components/modules/maps/map-marker.js +10 -0
- package/dist/components/modules/maps/map-marker.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/eventTypes.js +16 -0
- package/dist/constants/eventTypes.js.map +1 -0
- package/dist/constants/placeTypes.js.map +1 -1
- package/dist/contexts/mapContext.js +9 -27
- package/dist/contexts/mapContext.js.map +1 -1
- package/dist/contexts/mapListContext.js +57 -38
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/contexts/placesContext.js.map +1 -1
- package/dist/contexts/trackEventContext.js +20 -0
- package/dist/contexts/trackEventContext.js.map +1 -0
- package/dist/hooks/useList.js +1 -13
- package/dist/hooks/useList.js.map +1 -1
- package/dist/services/apis/hcApi.js +1 -1
- package/dist/services/apis/hcApi.js.map +1 -1
- package/dist/services/clientToken.js.map +1 -1
- package/dist/services/configService.js.map +1 -1
- package/dist/services/googlePlacesNearbyService.js.map +1 -1
- package/dist/services/listingAggregatorService.js +43 -16
- package/dist/services/listingAggregatorService.js.map +1 -1
- package/dist/services/listingEntityService.js.map +1 -1
- package/dist/services/listingService.js.map +1 -1
- package/dist/services/recruiterService.js.map +1 -1
- package/dist/util/filterUtil.js.map +1 -1
- package/dist/util/loading.js.map +1 -1
- package/dist/util/localStorageUtil.js.map +1 -1
- package/dist/util/mapIconUtil.js.map +1 -1
- package/dist/util/mapUtil.js.map +1 -1
- package/dist/util/sortUtil.js.map +1 -1
- package/dist/util/stringUtils.js.map +1 -1
- package/jsconfig.json +7 -7
- package/package.json +60 -60
- package/postcss.config.js +13 -13
- package/preset.default.js +15 -15
- package/rollup.config.mjs +88 -87
- package/src/apis/hcApi.js +93 -93
- package/src/clientToken.js +9 -9
- package/src/components/HireControlMap.js +129 -124
- package/src/components/modules/accordions/MapAccordionItem.js +74 -72
- package/src/components/modules/accordions/default.js +171 -171
- package/src/components/modules/accordions/filterItem.js +55 -53
- package/src/components/modules/accordions/filters.js +47 -47
- package/src/components/modules/buttons/button-group-apply.js +123 -116
- 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 +20 -20
- package/src/components/modules/cards/default.js +167 -167
- package/src/components/modules/cards/filter.js +56 -56
- package/src/components/modules/dialogs/apply-dialog.js +48 -48
- package/src/components/modules/filter/commute.js +154 -149
- package/src/components/modules/filter/index.js +89 -87
- package/src/components/modules/filter/item.js +87 -76
- package/src/components/modules/filter/location.js +71 -71
- package/src/components/modules/filter/points-of-interest.js +44 -44
- package/src/components/modules/filter/radio-item.js +57 -53
- package/src/components/modules/filter/search.js +92 -92
- 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/jobListing/listing-details.js +99 -95
- package/src/components/modules/maps/info-window-card.js +17 -17
- package/src/components/modules/maps/info-window-content.js +81 -74
- package/src/components/modules/maps/list/field-mapper.js +112 -112
- package/src/components/modules/maps/list/header-item.js +91 -91
- package/src/components/modules/maps/list/header.js +47 -47
- package/src/components/modules/maps/list/index.js +112 -107
- package/src/components/modules/maps/list/item-expand-card/index.js +22 -22
- package/src/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js +50 -50
- package/src/components/modules/maps/list/item-expand-card/recruiter-details.js +68 -68
- package/src/components/modules/maps/list/item-expand-card/recruiter-headshot.js +22 -22
- package/src/components/modules/maps/list/list-item/index.js +135 -133
- package/src/components/modules/maps/map-list.js +74 -74
- package/src/components/modules/maps/map-marker.js +88 -86
- package/src/components/modules/maps/map.js +230 -230
- package/src/components/modules/maps/place-marker.js +41 -41
- package/src/components/modules/maps/tabs.js +81 -81
- package/src/constants/eventTypes.js +13 -0
- package/src/constants/placeTypes.js +8 -8
- package/src/contexts/mapContext.js +101 -115
- package/src/contexts/mapListContext.js +242 -222
- package/src/contexts/placesContext.js +102 -102
- package/src/contexts/trackEventContext.js +14 -0
- package/src/hooks/useList.js +89 -100
- package/src/index.js +3 -3
- package/src/services/configService.js +16 -16
- package/src/services/googlePlacesNearbyService.js +33 -33
- package/src/services/listingAggregatorService.js +50 -45
- package/src/services/listingEntityService.js +15 -15
- package/src/services/listingService.js +26 -26
- package/src/services/recruiterService.js +17 -17
- package/src/styles/index.css +23 -23
- package/src/util/arrayUtil.js +3 -3
- package/src/util/fieldMapper.js +22 -22
- package/src/util/filterUtil.js +195 -195
- package/src/util/loading.js +17 -17
- package/src/util/localStorageUtil.js +26 -26
- package/src/util/mapIconUtil.js +180 -180
- package/src/util/mapUtil.js +91 -91
- package/src/util/sortUtil.js +32 -32
- package/src/util/stringUtils.js +6 -6
- package/src/util/urlFilterUtil.js +90 -90
- package/tailwind.config.js +126 -126
- package/.editorconfig +0 -12
- package/.eslintrc +0 -105
- package/.prettierignore +0 -3
|
@@ -1,95 +1,99 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import RecruiterHeadshot from '~/components/modules/maps/list/item-expand-card/recruiter-headshot';
|
|
4
|
-
import RecruiterDetails from '~/components/modules/maps/list/item-expand-card/recruiter-details';
|
|
5
|
-
import RecruiterContactNav from '~/components/modules/maps/list/item-expand-card/recruiter-contact-nav';
|
|
6
|
-
import ApplyButtonGroup from '~/components/modules/buttons/button-group-apply';
|
|
7
|
-
import CommutePill from '~/components/modules/buttons/commute-pill';
|
|
8
|
-
|
|
9
|
-
import { useMap } from '~/contexts/mapContext';
|
|
10
|
-
import { useMapList } from '~/contexts/mapListContext';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import RecruiterHeadshot from '~/components/modules/maps/list/item-expand-card/recruiter-headshot';
|
|
4
|
+
import RecruiterDetails from '~/components/modules/maps/list/item-expand-card/recruiter-details';
|
|
5
|
+
import RecruiterContactNav from '~/components/modules/maps/list/item-expand-card/recruiter-contact-nav';
|
|
6
|
+
import ApplyButtonGroup from '~/components/modules/buttons/button-group-apply';
|
|
7
|
+
import CommutePill from '~/components/modules/buttons/commute-pill';
|
|
8
|
+
|
|
9
|
+
import { useMap } from '~/contexts/mapContext';
|
|
10
|
+
import { useMapList } from '~/contexts/mapListContext';
|
|
11
|
+
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
12
|
+
|
|
13
|
+
const ListingDetails = ({ item, recruiters }) => {
|
|
14
|
+
const { trackEvent, eventTypes } = useTrackEvent();
|
|
15
|
+
const { travelTime } = useMap();
|
|
16
|
+
const { siteConfig, navigateToDetails, navigateToEasyApply, Link, linkFormat } = useMapList();
|
|
17
|
+
if (!item) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
let matchingRecruiter = !recruiters ? null : recruiters[item?.recruiterId];
|
|
21
|
+
return (
|
|
22
|
+
<div className="hc-w-full">
|
|
23
|
+
<div className="hc-grow hc-flex hc-flex-wrap hc-items-center hc-gap-4">
|
|
24
|
+
{matchingRecruiter?.headshot && (
|
|
25
|
+
<RecruiterHeadshot
|
|
26
|
+
image={`https:${matchingRecruiter.headshot}`}
|
|
27
|
+
alt={matchingRecruiter?.firstName}
|
|
28
|
+
className="hc-bg-gray-300"
|
|
29
|
+
/>
|
|
30
|
+
)}
|
|
31
|
+
{matchingRecruiter && (
|
|
32
|
+
<RecruiterDetails
|
|
33
|
+
contactNav={
|
|
34
|
+
<RecruiterContactNav>
|
|
35
|
+
{matchingRecruiter?.mobilePhone && (
|
|
36
|
+
<RecruiterContactNav.Button
|
|
37
|
+
href={`tel:${matchingRecruiter.mobilePhone}`}
|
|
38
|
+
title={`Call ${matchingRecruiter.mobilePhone}`}
|
|
39
|
+
icon="fluent:phone-32-regular"
|
|
40
|
+
/>
|
|
41
|
+
)}
|
|
42
|
+
{matchingRecruiter?.email && (
|
|
43
|
+
<RecruiterContactNav.Button
|
|
44
|
+
href={`mailto:${matchingRecruiter.email}`}
|
|
45
|
+
title={`email ${matchingRecruiter.email}`}
|
|
46
|
+
icon="bi:envelope-at"
|
|
47
|
+
/>
|
|
48
|
+
)}
|
|
49
|
+
{matchingRecruiter?.linkedIn && (
|
|
50
|
+
<RecruiterContactNav.Button
|
|
51
|
+
href={matchingRecruiter.linkedIn}
|
|
52
|
+
title="LinkedIn"
|
|
53
|
+
icon="ant-design:linkedin-outlined"
|
|
54
|
+
/>
|
|
55
|
+
)}
|
|
56
|
+
</RecruiterContactNav>
|
|
57
|
+
}
|
|
58
|
+
>
|
|
59
|
+
{matchingRecruiter?.firstName && matchingRecruiter?.lastName && (
|
|
60
|
+
<RecruiterDetails.Title>
|
|
61
|
+
{`${matchingRecruiter?.firstName} ${matchingRecruiter?.lastName}`}
|
|
62
|
+
</RecruiterDetails.Title>
|
|
63
|
+
)}
|
|
64
|
+
{item.details?.recruiter?.title && (
|
|
65
|
+
<RecruiterDetails.Text>
|
|
66
|
+
{item.details.recruiter.title}
|
|
67
|
+
</RecruiterDetails.Text>
|
|
68
|
+
)}
|
|
69
|
+
</RecruiterDetails>
|
|
70
|
+
)}
|
|
71
|
+
<ApplyButtonGroup
|
|
72
|
+
useDetailsPostMessage={siteConfig.useDetailsPostMessage}
|
|
73
|
+
navigateToDetails={navigateToDetails}
|
|
74
|
+
navigateToEasyApply={navigateToEasyApply}
|
|
75
|
+
Link={Link}
|
|
76
|
+
linkFormat={linkFormat}
|
|
77
|
+
includeDialog={siteConfig.useApplyDialog}
|
|
78
|
+
internalApplyLink={siteConfig.internalApplyLink}
|
|
79
|
+
companyName={siteConfig.companyName}
|
|
80
|
+
applyUrl={item?.applyUrl}
|
|
81
|
+
itemId={item.id}
|
|
82
|
+
item={item}
|
|
83
|
+
trackEvent={trackEvent}
|
|
84
|
+
eventTypes={eventTypes}
|
|
85
|
+
detailsUrl={item.useClientJobUrl ? item?.detailsUrl : `${siteConfig.jobsDomain}${item.id}`}
|
|
86
|
+
className={`
|
|
87
|
+
lg:hc-w-auto hc-order-first lg:hc-order-last md:hc-self-center hc-py-2 lg:hc-p-0 lg:hc-mb-0 hc-border-b lg:hc-border-none hc-border-uiAccent/20
|
|
88
|
+
${matchingRecruiter ? "lg:hc-flex-col lg:hc-w-auto" : "lg:hc-flex-row"}
|
|
89
|
+
`}
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
92
|
+
<div className="hc-w-full">
|
|
93
|
+
<CommutePill travelTime={travelTime} className="hc-ml-0" />
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export default ListingDetails;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
const CardInfoWindow = ({ className, content, id }) => {
|
|
4
|
-
return (
|
|
5
|
-
<div
|
|
6
|
-
id={id}
|
|
7
|
-
className={`
|
|
8
|
-
hc-relative hc-flex hc-flex-col hc-break-words hc-bg-clip-border
|
|
9
|
-
${className ?? ""}
|
|
10
|
-
`}
|
|
11
|
-
>
|
|
12
|
-
{content}
|
|
13
|
-
</div>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default CardInfoWindow;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const CardInfoWindow = ({ className, content, id }) => {
|
|
4
|
+
return (
|
|
5
|
+
<div
|
|
6
|
+
id={id}
|
|
7
|
+
className={`
|
|
8
|
+
hc-relative hc-flex hc-flex-col hc-break-words hc-bg-clip-border
|
|
9
|
+
${className ?? ""}
|
|
10
|
+
`}
|
|
11
|
+
>
|
|
12
|
+
{content}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default CardInfoWindow;
|
|
@@ -1,74 +1,81 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { useMapList } from '~/contexts/mapListContext';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
items[0].mapDetails?.address?.
|
|
20
|
-
items[0].mapDetails?.address?.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { useMapList } from '~/contexts/mapListContext';
|
|
4
|
+
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
5
|
+
|
|
6
|
+
const InfoWindowContent = ({
|
|
7
|
+
item,
|
|
8
|
+
filterListingsByLocation
|
|
9
|
+
}) => {
|
|
10
|
+
const { trackEvent, eventTypes } = useTrackEvent();
|
|
11
|
+
const { setSelectedFilters, setMobileTab, selectedFilters, siteConfig } = useMapList();
|
|
12
|
+
const fieldsShown = siteConfig.fieldsShown;
|
|
13
|
+
let items = item && item.items ? Object.values(item.items) : null;
|
|
14
|
+
|
|
15
|
+
if (!items || items.length < 0) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const addressParts = [
|
|
19
|
+
items[0].mapDetails?.address?.street,
|
|
20
|
+
items[0].mapDetails?.address?.city,
|
|
21
|
+
items[0].mapDetails?.address?.state,
|
|
22
|
+
items[0].mapDetails?.address?.zip
|
|
23
|
+
];
|
|
24
|
+
const fullAddress = addressParts.filter(Boolean).join(', ');
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div className="hc-flex-auto hc-p-2">
|
|
28
|
+
<div>
|
|
29
|
+
<div>
|
|
30
|
+
<h4 className="hc-text-lg hc-font-bold hc-leading-tight hc-mb-3">
|
|
31
|
+
{items[0].mapDetails?.entityDisplayName}
|
|
32
|
+
</h4>
|
|
33
|
+
<p>
|
|
34
|
+
{fullAddress}
|
|
35
|
+
</p>
|
|
36
|
+
<div className="hc-pt-2">
|
|
37
|
+
<button
|
|
38
|
+
className="hc-cursor-pointer hover:hc-opacity-70 hc-text-primary"
|
|
39
|
+
onClick={() => {
|
|
40
|
+
|
|
41
|
+
setMobileTab("listTab");
|
|
42
|
+
const newFilters = { ...selectedFilters };
|
|
43
|
+
let filters = [];
|
|
44
|
+
|
|
45
|
+
if (fieldsShown.includes('cityState')) {
|
|
46
|
+
newFilters.cityState = {
|
|
47
|
+
[items[0].fields.cityState]: true
|
|
48
|
+
};
|
|
49
|
+
filters.push({ filterType: 'cityState', filterChecked: items[0].fields.cityState });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (fieldsShown.includes('city')) {
|
|
53
|
+
newFilters.city = {
|
|
54
|
+
[items[0].fields.city]: true
|
|
55
|
+
};
|
|
56
|
+
filters.push({ filterType: 'city', filterChecked: items[0].fields.city });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (fieldsShown.includes('state')) {
|
|
60
|
+
newFilters.state = {
|
|
61
|
+
[items[0].fields.state]: true
|
|
62
|
+
};
|
|
63
|
+
filters.push({ filterType: 'state', filterChecked: items[0].fields.state });
|
|
64
|
+
}
|
|
65
|
+
trackEvent(eventTypes.VIEW_JOBS_AT_Location, { filtersApplied: filters });
|
|
66
|
+
setSelectedFilters(newFilters);
|
|
67
|
+
filterListingsByLocation();
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
{items.length > 1
|
|
71
|
+
? `View All ${items.length} jobs at this location`
|
|
72
|
+
: `View job at this location`}
|
|
73
|
+
</button>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default InfoWindowContent;
|
|
@@ -1,112 +1,112 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import Grid from '~/components/modules/grid';
|
|
4
|
-
import Icon from '~/components/modules/icon';
|
|
5
|
-
import PillWrapper from '~/components/modules/buttons/pill-wrapper';
|
|
6
|
-
|
|
7
|
-
import { capitalize } from '~/util/stringUtils';
|
|
8
|
-
|
|
9
|
-
const FieldMapper = ({
|
|
10
|
-
item,
|
|
11
|
-
fieldsShown,
|
|
12
|
-
specialFeatures,
|
|
13
|
-
handleFavouriteClick,
|
|
14
|
-
isFavorite
|
|
15
|
-
}) => {
|
|
16
|
-
const orderedFields = fieldsShown.filter(field => field in item.fields);
|
|
17
|
-
|
|
18
|
-
const specialFeaturePills = field => {
|
|
19
|
-
return field === 'position' && specialFeatures &&
|
|
20
|
-
Object.entries(specialFeatures).map(([featureKey, featureLabel]) => {
|
|
21
|
-
return item.fields[featureKey] === 1 && (
|
|
22
|
-
<PillWrapper key={featureKey}>{featureLabel}</PillWrapper>
|
|
23
|
-
);
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<>
|
|
29
|
-
{orderedFields.map(field => {
|
|
30
|
-
let value = item.fields[field];
|
|
31
|
-
return (
|
|
32
|
-
<Grid.Item
|
|
33
|
-
key={field}
|
|
34
|
-
className={`
|
|
35
|
-
hc-hidden md:hc-block
|
|
36
|
-
${field.toLowerCase() === "position" ? "hc-col-span-2 hc-text-balance hc-pr-2 hc-font-semibold" : "hc-col-span-1"}
|
|
37
|
-
`}
|
|
38
|
-
>
|
|
39
|
-
<span className="hc-sr-only">{capitalize(field)}</span>
|
|
40
|
-
{value}
|
|
41
|
-
<br />
|
|
42
|
-
{specialFeaturePills(field)}
|
|
43
|
-
</Grid.Item>
|
|
44
|
-
);
|
|
45
|
-
})}
|
|
46
|
-
<Grid.Item className="md:hc-hidden">
|
|
47
|
-
{fieldsShown.includes("position") &&
|
|
48
|
-
<>
|
|
49
|
-
<div className="hc-flex hc-items-start">
|
|
50
|
-
<div className="hc-flex hc-justify-between hc-items-center hc-min-w-[100%]"> {/* Use percentage for minimum width */}
|
|
51
|
-
<h3 className="hc-font-bold hc-mb-3 hc-flex-1">{item.fields.position}</h3>
|
|
52
|
-
<div className="hc-flex hc-justify-end hc-pb-2">
|
|
53
|
-
<Icon
|
|
54
|
-
icon={isFavorite ? "mdi:heart" : "mdi:heart-outline"}
|
|
55
|
-
size="hc-size-3.5"
|
|
56
|
-
iconClasses={isFavorite ? "hc-text-primary" : ""}
|
|
57
|
-
className={`hc-transition-opacity hc-duration-300 hc-cursor-pointer
|
|
58
|
-
${isFavorite ? "hc-opacity-100" : "hc-text-uiText/60 group-hover:hc-opacity-100"}
|
|
59
|
-
`}
|
|
60
|
-
onClick={e => handleFavouriteClick(e)}
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
{specialFeatures && <div className='hc-pb-4'>{specialFeaturePills("position", true)} </div>}
|
|
66
|
-
</>
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
<ul className="hc-space-y-2 hc-text-xs">
|
|
70
|
-
{[
|
|
71
|
-
{
|
|
72
|
-
field: "category",
|
|
73
|
-
name: "Category",
|
|
74
|
-
icon: "icon-park-solid:tree-list"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
field: "schedule",
|
|
78
|
-
name: "Schedule",
|
|
79
|
-
icon: "gravity-ui:clock-fill"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
field: "cityState",
|
|
83
|
-
name: "Location",
|
|
84
|
-
icon: "fluent:location-16-filled"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
field: "travelTime",
|
|
88
|
-
name: "Commute",
|
|
89
|
-
icon: "ri:pin-distance-fill"
|
|
90
|
-
}
|
|
91
|
-
].map(listItem => (
|
|
92
|
-
(fieldsShown.includes(listItem.field) && item.fields[listItem.field]) &&
|
|
93
|
-
<li
|
|
94
|
-
key={listItem.field}
|
|
95
|
-
className="hc-flex hc-gap-2"
|
|
96
|
-
>
|
|
97
|
-
<Icon
|
|
98
|
-
icon={listItem.icon}
|
|
99
|
-
size="hc-size-3.5"
|
|
100
|
-
className="hc-text-uiAccent/30"
|
|
101
|
-
/>
|
|
102
|
-
<span className="hc-sr-only">{listItem.name}</span>
|
|
103
|
-
{item.fields[listItem.field]}
|
|
104
|
-
</li>
|
|
105
|
-
))}
|
|
106
|
-
</ul>
|
|
107
|
-
</Grid.Item>
|
|
108
|
-
</>
|
|
109
|
-
);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export default FieldMapper;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import Grid from '~/components/modules/grid';
|
|
4
|
+
import Icon from '~/components/modules/icon';
|
|
5
|
+
import PillWrapper from '~/components/modules/buttons/pill-wrapper';
|
|
6
|
+
|
|
7
|
+
import { capitalize } from '~/util/stringUtils';
|
|
8
|
+
|
|
9
|
+
const FieldMapper = ({
|
|
10
|
+
item,
|
|
11
|
+
fieldsShown,
|
|
12
|
+
specialFeatures,
|
|
13
|
+
handleFavouriteClick,
|
|
14
|
+
isFavorite
|
|
15
|
+
}) => {
|
|
16
|
+
const orderedFields = fieldsShown.filter(field => field in item.fields);
|
|
17
|
+
|
|
18
|
+
const specialFeaturePills = field => {
|
|
19
|
+
return field === 'position' && specialFeatures &&
|
|
20
|
+
Object.entries(specialFeatures).map(([featureKey, featureLabel]) => {
|
|
21
|
+
return item.fields[featureKey] === 1 && (
|
|
22
|
+
<PillWrapper key={featureKey}>{featureLabel}</PillWrapper>
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<>
|
|
29
|
+
{orderedFields.map(field => {
|
|
30
|
+
let value = item.fields[field];
|
|
31
|
+
return (
|
|
32
|
+
<Grid.Item
|
|
33
|
+
key={field}
|
|
34
|
+
className={`
|
|
35
|
+
hc-hidden md:hc-block
|
|
36
|
+
${field.toLowerCase() === "position" ? "hc-col-span-2 hc-text-balance hc-pr-2 hc-font-semibold" : "hc-col-span-1"}
|
|
37
|
+
`}
|
|
38
|
+
>
|
|
39
|
+
<span className="hc-sr-only">{capitalize(field)}</span>
|
|
40
|
+
{value}
|
|
41
|
+
<br />
|
|
42
|
+
{specialFeaturePills(field)}
|
|
43
|
+
</Grid.Item>
|
|
44
|
+
);
|
|
45
|
+
})}
|
|
46
|
+
<Grid.Item className="md:hc-hidden">
|
|
47
|
+
{fieldsShown.includes("position") &&
|
|
48
|
+
<>
|
|
49
|
+
<div className="hc-flex hc-items-start">
|
|
50
|
+
<div className="hc-flex hc-justify-between hc-items-center hc-min-w-[100%]"> {/* Use percentage for minimum width */}
|
|
51
|
+
<h3 className="hc-font-bold hc-mb-3 hc-flex-1">{item.fields.position}</h3>
|
|
52
|
+
<div className="hc-flex hc-justify-end hc-pb-2">
|
|
53
|
+
<Icon
|
|
54
|
+
icon={isFavorite ? "mdi:heart" : "mdi:heart-outline"}
|
|
55
|
+
size="hc-size-3.5"
|
|
56
|
+
iconClasses={isFavorite ? "hc-text-primary" : ""}
|
|
57
|
+
className={`hc-transition-opacity hc-duration-300 hc-cursor-pointer
|
|
58
|
+
${isFavorite ? "hc-opacity-100" : "hc-text-uiText/60 group-hover:hc-opacity-100"}
|
|
59
|
+
`}
|
|
60
|
+
onClick={e => handleFavouriteClick(e)}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
{specialFeatures && <div className='hc-pb-4'>{specialFeaturePills("position", true)} </div>}
|
|
66
|
+
</>
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
<ul className="hc-space-y-2 hc-text-xs">
|
|
70
|
+
{[
|
|
71
|
+
{
|
|
72
|
+
field: "category",
|
|
73
|
+
name: "Category",
|
|
74
|
+
icon: "icon-park-solid:tree-list"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
field: "schedule",
|
|
78
|
+
name: "Schedule",
|
|
79
|
+
icon: "gravity-ui:clock-fill"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
field: "cityState",
|
|
83
|
+
name: "Location",
|
|
84
|
+
icon: "fluent:location-16-filled"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
field: "travelTime",
|
|
88
|
+
name: "Commute",
|
|
89
|
+
icon: "ri:pin-distance-fill"
|
|
90
|
+
}
|
|
91
|
+
].map(listItem => (
|
|
92
|
+
(fieldsShown.includes(listItem.field) && item.fields[listItem.field]) &&
|
|
93
|
+
<li
|
|
94
|
+
key={listItem.field}
|
|
95
|
+
className="hc-flex hc-gap-2"
|
|
96
|
+
>
|
|
97
|
+
<Icon
|
|
98
|
+
icon={listItem.icon}
|
|
99
|
+
size="hc-size-3.5"
|
|
100
|
+
className="hc-text-uiAccent/30"
|
|
101
|
+
/>
|
|
102
|
+
<span className="hc-sr-only">{listItem.name}</span>
|
|
103
|
+
{item.fields[listItem.field]}
|
|
104
|
+
</li>
|
|
105
|
+
))}
|
|
106
|
+
</ul>
|
|
107
|
+
</Grid.Item>
|
|
108
|
+
</>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export default FieldMapper;
|