@abcagency/hc-ui-components 1.3.27 → 1.3.28

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.
Files changed (31) hide show
  1. package/dist/components/HireControlMap.js +9 -1
  2. package/dist/components/HireControlMap.js.map +1 -1
  3. package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
  4. package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
  5. package/dist/components/containers/maps/map-container.js +34 -35
  6. package/dist/components/containers/maps/map-container.js.map +1 -1
  7. package/dist/components/containers/maps/map-list-container.js +2 -2
  8. package/dist/components/containers/maps/map-list-container.js.map +1 -1
  9. package/dist/components/modules/jobListing/listing-details.js +2 -23
  10. package/dist/components/modules/jobListing/listing-details.js.map +1 -1
  11. package/dist/components/modules/list/list-item/list-item.js.map +1 -1
  12. package/dist/components/modules/maps/map.js +4 -13
  13. package/dist/components/modules/maps/map.js.map +1 -1
  14. package/dist/contexts/themeContext.js +33 -0
  15. package/dist/contexts/themeContext.js.map +1 -0
  16. package/dist/styles/index.css +1 -1
  17. package/dist/types/components/modules/jobListing/listing-details.d.ts +1 -1
  18. package/dist/types/contexts/themeContext.d.ts +11 -0
  19. package/dist/util/urlFilterUtil.js +0 -10
  20. package/dist/util/urlFilterUtil.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/components/HireControlMap.js +58 -55
  23. package/src/components/containers/jobListing/listing-details-container.js +40 -40
  24. package/src/components/containers/list/list-item/list-item-container.js +43 -43
  25. package/src/components/containers/maps/map-container.js +37 -35
  26. package/src/components/containers/maps/map-list-container.js +1 -1
  27. package/src/components/modules/jobListing/listing-details.js +109 -109
  28. package/src/components/modules/list/list-item/list-item.js +130 -130
  29. package/src/components/modules/maps/map.js +5 -17
  30. package/src/contexts/themeContext.js +40 -0
  31. package/src/styles/index.css +33 -24
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-undef */
2
1
  import React, { useEffect, useRef } from 'react';
3
2
 
4
3
  import MapMarker from "~/components/containers/maps/map-marker-container";
@@ -11,17 +10,18 @@ import { useMapList } from "~/contexts/mapListContext";
11
10
  import { markerIconSelected, markerIcon, pinIcon } from "~/util/mapIconUtil";
12
11
 
13
12
  import Map from "~/components/modules/maps/map";
13
+ import { MarkerClustererF } from "@react-google-maps/api";
14
+ import { clusterOptions } from "~/util/mapUtil";
14
15
 
15
16
  const MapContainer = ({
16
17
  markerConfigs,
17
18
  infoWindowClasses,
18
- clusterGridSize = 60
19
+ clusterGridSize = 10
19
20
  }) => {
20
21
  const {
21
22
  location,
22
23
  zoom,
23
24
  center,
24
- commuteLocation,
25
25
  selectLocationEntity,
26
26
  setLocation,
27
27
  mapInteracted,
@@ -151,33 +151,6 @@ const MapContainer = ({
151
151
  strokeColor: markerConfigs.strokeColor
152
152
  });
153
153
 
154
- const mapMarkers = mapItems.map(item => (
155
- <MapMarker
156
- key={item.id}
157
- item={item}
158
- selectedLocation={location}
159
- markerRefs={markerRefs}
160
- infoWindowClasses={infoWindowClasses}
161
- setSelectedLocation={setLocation}
162
- markerClickHandler={markerClickHandler}
163
- markerIcon={markerIcon(markerConfigs)}
164
- markerIconSelected={markerIconSelected(markerConfigs)}
165
- setMapInteracted={setMapInteracted}
166
- />
167
- ));
168
-
169
- const placeMarkers = poiMarkers.markers.map((marker, index) => (
170
- <PlaceMarker
171
- key={`marker-${marker.title}-${index}`}
172
- marker={marker}
173
- index={index}
174
- selectedPlaceMarker={selectedPlaceMarker}
175
- placesWindow={placesWindow}
176
- setPlacesWindow={setPlacesWindow}
177
- setSelectedPlaceMarker={setSelectedPlaceMarker}
178
- />
179
- ));
180
-
181
154
  return (
182
155
  <Map
183
156
  zoom={zoom}
@@ -185,10 +158,6 @@ const MapContainer = ({
185
158
  mapContainerRef={mapContainerRef}
186
159
  onLoad={onLoad}
187
160
  onIdle={onIdle}
188
- clusterGridSize={clusterGridSize}
189
- markerConfigs={markerConfigs}
190
- mapMarkers={mapMarkers}
191
- placeMarkers={placeMarkers}
192
161
  mapInteracted={mapInteracted}
193
162
  pinIconUrl={pinIconUrl}
194
163
  setMapInteracted={setMapInteracted}
@@ -197,7 +166,40 @@ const MapContainer = ({
197
166
  setQuery={setQuery}
198
167
  filteredListingsLength={filteredListings.length}
199
168
  setSelectedFilters={setSelectedFilters}
200
- />
169
+ >
170
+ <MarkerClustererF options={clusterOptions(clusterGridSize, markerConfigs.fillColor)}>
171
+ {clusterer => (
172
+ <>
173
+ {mapItems.map(item => (
174
+ <MapMarker
175
+ key={item.id}
176
+ item={item}
177
+ selectedLocation={location}
178
+ markerRefs={markerRefs}
179
+ infoWindowClasses={infoWindowClasses}
180
+ setSelectedLocation={setLocation}
181
+ markerClickHandler={markerClickHandler}
182
+ clusterer={clusterer}
183
+ markerIcon={markerIcon(markerConfigs)}
184
+ markerIconSelected={markerIconSelected(markerConfigs)}
185
+ setMapInteracted={setMapInteracted}
186
+ />
187
+ ))}
188
+ {poiMarkers && poiMarkers.markers.map((marker, index) => (
189
+ <PlaceMarker
190
+ key={`marker-${marker.title}-${index}`}
191
+ marker={marker}
192
+ index={index}
193
+ selectedPlaceMarker={selectedPlaceMarker}
194
+ placesWindow={placesWindow}
195
+ setPlacesWindow={setPlacesWindow}
196
+ setSelectedPlaceMarker={setSelectedPlaceMarker}
197
+ />
198
+ ))}
199
+ </>
200
+ )}
201
+ </MarkerClustererF>
202
+ </Map>
201
203
  );
202
204
  };
203
205
 
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import List from '~/components/containers/list/item-list-container';
4
4
  import Map from '~/components/containers/maps/map-container';
5
- import Filter from '~/components/modules/filter';
5
+ import Filter from '~/components/containers/filter/filter-container';
6
6
  import MapList from '~/components/modules/maps/map-list';
7
7
 
8
8
  const MapListContainer = ({
@@ -1,109 +1,109 @@
1
- import React from 'react';
2
- import RecruiterHeadshot from '~/components/modules/list/item-expand-card/recruiter-headshot';
3
- import RecruiterDetails from '~/components/modules/list/item-expand-card/recruiter-details';
4
- import RecruiterContactNav from '~/components/modules/list/item-expand-card/recruiter-contact-nav';
5
- import ApplyButtonGroup from '~/components/modules/buttons/button-group-apply';
6
- import CommutePill from '~/components/modules/buttons/commute-pill';
7
-
8
- const ListingDetails = ({
9
- item,
10
- recruiter,
11
- travelTime,
12
- useDetailsPostMessage,
13
- navigateToDetails,
14
- navigateToEasyApply,
15
- Link,
16
- linkFormat,
17
- useApplyDialog,
18
- internalApplyLink,
19
- companyName,
20
- jobsDomain,
21
- trackEvent,
22
- eventTypes
23
- }) => {
24
- if (!item) {
25
- return null;
26
- }
27
-
28
- let matchingRecruiter = recruiter;
29
- console.log(matchingRecruiter);
30
- return (
31
- <div className="hc-w-full">
32
- <div className="hc-grow hc-flex hc-flex-wrap hc-items-center hc-gap-4">
33
- {matchingRecruiter?.headshot && (
34
- <RecruiterHeadshot
35
- image={`${matchingRecruiter.headshot.includes("http") ? '' :'https:'}${matchingRecruiter.headshot}`}
36
- alt={matchingRecruiter?.firstName}
37
- className="hc-bg-gray-300"
38
- />
39
- )}
40
- {matchingRecruiter && (
41
- <RecruiterDetails
42
- contactNav={
43
- <RecruiterContactNav>
44
- {matchingRecruiter?.mobilePhone && (
45
- <RecruiterContactNav.Button
46
- href={`tel:${matchingRecruiter.mobilePhone}`}
47
- title={`Call ${matchingRecruiter.mobilePhone}`}
48
- icon="fluent:phone-32-regular"
49
- />
50
- )}
51
- {matchingRecruiter?.email && (
52
- <RecruiterContactNav.Button
53
- href={`mailto:${matchingRecruiter.email}`}
54
- title={`email ${matchingRecruiter.email}`}
55
- icon="bi:envelope-at"
56
- />
57
- )}
58
- {matchingRecruiter?.linkedIn && (
59
- <RecruiterContactNav.Button
60
- href={matchingRecruiter.linkedIn}
61
- title="LinkedIn"
62
- icon="ant-design:linkedin-outlined"
63
- />
64
- )}
65
- </RecruiterContactNav>
66
- }
67
- >
68
- {matchingRecruiter?.firstName || matchingRecruiter?.lastName && (
69
- <RecruiterDetails.Title>
70
- {`${matchingRecruiter?.firstName} ${matchingRecruiter?.lastName}`}
71
- </RecruiterDetails.Title>
72
- )}
73
- {item.details?.recruiter?.title && (
74
- <RecruiterDetails.Text>
75
- {item.details.recruiter.title}
76
- </RecruiterDetails.Text>
77
- )}
78
- </RecruiterDetails>
79
- )}
80
- <ApplyButtonGroup
81
- useDetailsPostMessage={useDetailsPostMessage}
82
- navigateToDetails={navigateToDetails}
83
- navigateToEasyApply={navigateToEasyApply}
84
- Link={Link}
85
- linkFormat={linkFormat}
86
- includeDialog={useApplyDialog}
87
- internalApplyLink={internalApplyLink}
88
- companyName={companyName}
89
- applyUrl={item?.applyUrl}
90
- itemId={item.id}
91
- item={item}
92
- trackEvent={trackEvent}
93
- eventTypes={eventTypes}
94
- detailsUrl={item.useClientJobUrl ? item?.detailsUrl : `${jobsDomain}${item.id}`}
95
- className={`
96
- 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
97
- ${matchingRecruiter ? "lg:hc-flex-col lg:hc-w-auto" : "lg:hc-flex-row"}
98
- `}
99
- />
100
- </div>
101
- <div className="hc-w-full">
102
- <CommutePill travelTime={travelTime} className="hc-ml-0" />
103
- </div>
104
- </div>
105
- );
106
- };
107
-
108
- export default ListingDetails;
109
-
1
+ import React from 'react';
2
+ import RecruiterHeadshot from '~/components/modules/list/item-expand-card/recruiter-headshot';
3
+ import RecruiterDetails from '~/components/modules/list/item-expand-card/recruiter-details';
4
+ import RecruiterContactNav from '~/components/modules/list/item-expand-card/recruiter-contact-nav';
5
+ import ApplyButtonGroup from '~/components/modules/buttons/button-group-apply';
6
+ import CommutePill from '~/components/modules/buttons/commute-pill';
7
+
8
+ const ListingDetails = ({
9
+ item,
10
+ recruiter,
11
+ travelTime,
12
+ useDetailsPostMessage,
13
+ navigateToDetails,
14
+ navigateToEasyApply,
15
+ Link,
16
+ linkFormat,
17
+ useApplyDialog,
18
+ internalApplyLink,
19
+ companyName,
20
+ jobsDomain,
21
+ trackEvent,
22
+ eventTypes,
23
+ }) => {
24
+ if (!item) {
25
+ return null;
26
+ }
27
+
28
+ let matchingRecruiter = recruiter;
29
+ console.log(matchingRecruiter);
30
+ return (
31
+ <div className="hc-w-full">
32
+ <div className="hc-grow hc-flex hc-flex-wrap hc-items-center hc-gap-4">
33
+ {/* {matchingRecruiter?.headshot && (
34
+ <RecruiterHeadshot
35
+ image={`${matchingRecruiter.headshot.includes("http") ? '' :'https:'}${matchingRecruiter.headshot}`}
36
+ alt={matchingRecruiter?.firstName}
37
+ className="hc-bg-gray-300"
38
+ />
39
+ )}
40
+ {matchingRecruiter && (
41
+ <RecruiterDetails
42
+ contactNav={
43
+ <RecruiterContactNav>
44
+ {matchingRecruiter?.mobilePhone && (
45
+ <RecruiterContactNav.Button
46
+ href={`tel:${matchingRecruiter.mobilePhone}`}
47
+ title={`Call ${matchingRecruiter.mobilePhone}`}
48
+ icon="fluent:phone-32-regular"
49
+ />
50
+ )}
51
+ {matchingRecruiter?.email && (
52
+ <RecruiterContactNav.Button
53
+ href={`mailto:${matchingRecruiter.email}`}
54
+ title={`email ${matchingRecruiter.email}`}
55
+ icon="bi:envelope-at"
56
+ />
57
+ )}
58
+ {matchingRecruiter?.linkedIn && (
59
+ <RecruiterContactNav.Button
60
+ href={matchingRecruiter.linkedIn}
61
+ title="LinkedIn"
62
+ icon="ant-design:linkedin-outlined"
63
+ />
64
+ )}
65
+ </RecruiterContactNav>
66
+ }
67
+ >
68
+ {matchingRecruiter?.firstName || matchingRecruiter?.lastName && (
69
+ <RecruiterDetails.Title>
70
+ {`${matchingRecruiter?.firstName} ${matchingRecruiter?.lastName}`}
71
+ </RecruiterDetails.Title>
72
+ )}
73
+ {item.details?.recruiter?.title && (
74
+ <RecruiterDetails.Text>
75
+ {item.details.recruiter.title}
76
+ </RecruiterDetails.Text>
77
+ )}
78
+ </RecruiterDetails>
79
+ )} */}
80
+ <ApplyButtonGroup
81
+ useDetailsPostMessage={useDetailsPostMessage}
82
+ navigateToDetails={navigateToDetails}
83
+ navigateToEasyApply={navigateToEasyApply}
84
+ Link={Link}
85
+ linkFormat={linkFormat}
86
+ includeDialog={useApplyDialog}
87
+ internalApplyLink={internalApplyLink}
88
+ companyName={companyName}
89
+ applyUrl={item?.applyUrl}
90
+ itemId={item.id}
91
+ item={item}
92
+ trackEvent={trackEvent}
93
+ eventTypes={eventTypes}
94
+ detailsUrl={item.useClientJobUrl ? item?.detailsUrl : `${jobsDomain}${item.id}`}
95
+ className={`
96
+ 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
97
+ ${matchingRecruiter ? "lg:hc-flex-col lg:hc-w-auto" : "lg:hc-flex-row"}
98
+ `}
99
+ />
100
+ </div>
101
+ <div className="hc-w-full">
102
+ <CommutePill travelTime={travelTime} className="hc-ml-0" />
103
+ </div>
104
+ </div>
105
+ );
106
+ };
107
+
108
+ export default ListingDetails;
109
+
@@ -1,130 +1,130 @@
1
- import React, { forwardRef, useState } from 'react';
2
- import Grid from '~/components/modules/grid';
3
- import Icon from '~/components/modules/icon';
4
- import FieldMapper from '~/components/modules/list/field-mapper';
5
-
6
- const ListItem = forwardRef(
7
- (
8
- {
9
- isActive,
10
- bodyClassName,
11
- className,
12
- item,
13
- fieldsShown,
14
- specialFeatures,
15
- onItemSelected,
16
- showMap,
17
- setMobileTab,
18
- handleSettingFavorites,
19
- favorites,
20
- includeFavorite = true,
21
- siteConfig,
22
- trackEvent,
23
- eventTypes,
24
- ...props
25
- },
26
- ref
27
- ) => {
28
- const mapPinColor = !showMap ? null : siteConfig.colors.primary.replace("#", "");
29
-
30
- const handleClick = () => {
31
- if (onItemSelected) {
32
- onItemSelected(item);
33
- }
34
- };
35
- let isFavorite = favorites.includes(item.id);
36
-
37
- const handleFavouriteClick = (event, item) => {
38
- if(!includeFavorite)return;
39
- event.stopPropagation();
40
- let updatedFavorites;
41
- if (isFavorite) {
42
- updatedFavorites = favorites.filter(fav => fav !== item.id);
43
- } else {
44
- updatedFavorites = [...favorites, item.id];
45
- }
46
- isFavorite = !isFavorite;
47
- handleSettingFavorites(updatedFavorites);
48
- };
49
- return (
50
- <button
51
- ref={ref}
52
- onClick={() => { handleClick(); }}
53
- className={`
54
- hc-group hc-relative hc-flex md:hc-flex-col hc-w-full md:hc-pl-4 hc-text-left hc-bg-clip-border hc-border hc-border-transparent hc-break-words hc-overflow-hidden hc-cursor-pointer hc-transition-colors hover:hc-bg-uiAccent/5 focus:hover:hc-bg-uiAccent/5
55
- ${isActive ? "hc-bg-uiAccent/5 hc-border-secondary hc-border" : "hc-text-uiText hc-bg-white"}
56
- ${className ?? ""}
57
- `}
58
- {...props}
59
- >
60
- <Grid
61
- columns="hc-grid-flow-col hc-auto-cols-fr"
62
- gap="hc-gap-2"
63
- isAnimated={false}
64
- className={`
65
- hc-block md:hc-grid hc-p-2 hc-ps-4 hc-w-full hc-grow hc-leading-tight hc-text-sm md:hc-text-xs lg:hc-text-sm
66
- ${bodyClassName ?? ""}
67
- `}
68
- >
69
- <Grid.Item className="hc-hidden md:hc-block md:hc-absolute md:hc-left-1.5 hc-top-1.5">
70
- <span className="hc-sr-only">Expand row</span>
71
- <Icon
72
- icon="fluent-emoji-high-contrast:plus"
73
- size="hc-size-2.5"
74
- className={`
75
- hc-opacity-0 hc-text-uiText/60 hc-transition group-hover:hc-opacity-100 group-active:hc-opacity-100
76
- ${isActive ? "hc-opacity-100 hc-rotate-45" : ""}
77
- `}
78
- />
79
- </Grid.Item>
80
- <FieldMapper
81
- item={item}
82
- fieldsShown={fieldsShown}
83
- specialFeatures={specialFeatures}
84
- isFavorite={isFavorite}
85
- includeFavorite={includeFavorite}
86
- handleFavouriteClick={handleFavouriteClick}
87
- />
88
- {includeFavorite &&
89
- <Grid.Item
90
- key={"favorites"}
91
- className="hc-hidden md:hc-block hc-col-span-1"
92
- >
93
- <Icon
94
- icon={isFavorite ? "mdi:heart" : "mdi:heart-outline"}
95
- size="hc-size-3.5"
96
- iconClasses={isFavorite ? "hc-text-primary" : ""}
97
- title={!isFavorite ? 'Add job to favorites' : 'Remove job from favorites'}
98
- className="hc-pr-2 hc-transition-opacity hc-duration-300 hc-cursor-pointer hc-opacity-100"
99
- onClick={e => {handleFavouriteClick(e, item);}}
100
- />
101
- </Grid.Item>
102
- }
103
- </Grid>
104
- {showMap && (
105
- <div onClick={() => { setMobileTab("mapTab"); handleClick(); }} className="md:hc-hidden hc-w-2/5 sm:hc-w-1/3 hc-p-1.5 hc-my-1 hc-bg-uiAccent/5 hc-border hc-border-uiAccent/10 hc-rounded-sm">
106
- <img
107
- src={`https://maps.googleapis.com/maps/api/staticmap?scale=2&center=${item.mapDetails?.latitude},${item.mapDetails?.longitude}&zoom=10&size=240x180&maptype=roadmap&markers=color:0x${mapPinColor}%7Clabel:•%7C${item.mapDetails?.latitude},${item.mapDetails?.longitude}&key=${process.env.GOOGLE_MAPS_API_KEY}`}
108
- alt={`Map of location for ${item.fields.position}`}
109
- className="hc-w-full hc-h-full hc-object-cover"
110
- />
111
- </div>
112
- )}
113
- </button>
114
- );
115
- }
116
- );
117
-
118
- ListItem.displayName = "ListItem";
119
-
120
- export default React.memo(ListItem, (prevProps, nextProps) => {
121
- return (
122
- prevProps.isActive === nextProps.isActive &&
123
- prevProps.favorites === nextProps.favorites &&
124
- prevProps.item.id === nextProps.item.id &&
125
- prevProps.item.fields.travelTime === nextProps.item.fields.travelTime &&
126
- prevProps.fieldsShown === nextProps.fieldsShown &&
127
- prevProps.bodyClassName === nextProps.bodyClassName &&
128
- prevProps.className === nextProps.className
129
- );
130
- });
1
+ import React, { forwardRef, useState } from 'react';
2
+ import Grid from '~/components/modules/grid';
3
+ import Icon from '~/components/modules/icon';
4
+ import FieldMapper from '~/components/modules/list/field-mapper';
5
+
6
+ const ListItem = forwardRef(
7
+ (
8
+ {
9
+ isActive,
10
+ bodyClassName,
11
+ className,
12
+ item,
13
+ fieldsShown,
14
+ specialFeatures,
15
+ onItemSelected,
16
+ showMap,
17
+ setMobileTab,
18
+ handleSettingFavorites,
19
+ favorites,
20
+ includeFavorite = true,
21
+ siteConfig,
22
+ trackEvent,
23
+ eventTypes,
24
+ ...props
25
+ },
26
+ ref
27
+ ) => {
28
+ const mapPinColor = !showMap ? null : siteConfig.colors.primary.replace("#", "");
29
+
30
+ const handleClick = () => {
31
+ if (onItemSelected) {
32
+ onItemSelected(item);
33
+ }
34
+ };
35
+ let isFavorite = favorites.includes(item.id);
36
+
37
+ const handleFavouriteClick = (event, item) => {
38
+ if(!includeFavorite)return;
39
+ event.stopPropagation();
40
+ let updatedFavorites;
41
+ if (isFavorite) {
42
+ updatedFavorites = favorites.filter(fav => fav !== item.id);
43
+ } else {
44
+ updatedFavorites = [...favorites, item.id];
45
+ }
46
+ isFavorite = !isFavorite;
47
+ handleSettingFavorites(updatedFavorites);
48
+ };
49
+ return (
50
+ <button
51
+ ref={ref}
52
+ onClick={() => { handleClick(); }}
53
+ className={`
54
+ hc-group hc-relative hc-flex md:hc-flex-col hc-w-full md:hc-pl-4 hc-text-left hc-bg-clip-border hc-border hc-border-transparent hc-break-words hc-overflow-hidden hc-cursor-pointer hc-transition-colors hover:hc-bg-uiAccent/5 focus:hover:hc-bg-uiAccent/5
55
+ ${isActive ? "hc-bg-uiAccent/5 hc-border-secondary hc-border" : "hc-text-uiText hc-bg-white"}
56
+ ${className ?? ""}
57
+ `}
58
+ {...props}
59
+ >
60
+ <Grid
61
+ columns="hc-grid-flow-col hc-auto-cols-fr"
62
+ gap="hc-gap-2"
63
+ isAnimated={false}
64
+ className={`
65
+ hc-block md:hc-grid hc-p-2 hc-ps-4 hc-w-full hc-grow hc-leading-tight hc-text-sm md:hc-text-xs lg:hc-text-sm
66
+ ${bodyClassName ?? ""}
67
+ `}
68
+ >
69
+ <Grid.Item className="hc-hidden md:hc-block md:hc-absolute md:hc-left-1.5 hc-top-1.5">
70
+ <span className="hc-sr-only">Expand row</span>
71
+ <Icon
72
+ icon="fluent-emoji-high-contrast:plus"
73
+ size="hc-size-2.5"
74
+ className={`
75
+ hc-opacity-0 hc-text-uiText/60 hc-transition group-hover:hc-opacity-100 group-active:hc-opacity-100
76
+ ${isActive ? "hc-opacity-100 hc-rotate-45" : ""}
77
+ `}
78
+ />
79
+ </Grid.Item>
80
+ <FieldMapper
81
+ item={item}
82
+ fieldsShown={fieldsShown}
83
+ specialFeatures={specialFeatures}
84
+ isFavorite={isFavorite}
85
+ includeFavorite={includeFavorite}
86
+ handleFavouriteClick={handleFavouriteClick}
87
+ />
88
+ {includeFavorite &&
89
+ <Grid.Item
90
+ key={"favorites"}
91
+ className="hc-hidden md:hc-block hc-col-span-1"
92
+ >
93
+ <Icon
94
+ icon={isFavorite ? "mdi:heart" : "mdi:heart-outline"}
95
+ size="hc-size-3.5"
96
+ iconClasses={isFavorite ? "hc-text-primary" : ""}
97
+ title={!isFavorite ? 'Add job to favorites' : 'Remove job from favorites'}
98
+ className="hc-pr-2 hc-transition-opacity hc-duration-300 hc-cursor-pointer hc-opacity-100"
99
+ onClick={e => {handleFavouriteClick(e, item);}}
100
+ />
101
+ </Grid.Item>
102
+ }
103
+ </Grid>
104
+ {showMap && (
105
+ <div onClick={() => { setMobileTab("mapTab"); handleClick(); }} className="md:hc-hidden hc-w-2/5 sm:hc-w-1/3 hc-p-1.5 hc-my-1 hc-bg-uiAccent/5 hc-border hc-border-uiAccent/10 hc-rounded-sm">
106
+ <img
107
+ src={`https://maps.googleapis.com/maps/api/staticmap?scale=2&center=${item.mapDetails?.latitude},${item.mapDetails?.longitude}&zoom=10&size=240x180&maptype=roadmap&markers=color:0x${mapPinColor}%7Clabel:•%7C${item.mapDetails?.latitude},${item.mapDetails?.longitude}&key=${process.env.GOOGLE_MAPS_API_KEY}`}
108
+ alt={`Map of location for ${item.fields.position}`}
109
+ className="hc-w-full hc-h-full hc-object-cover"
110
+ />
111
+ </div>
112
+ )}
113
+ </button>
114
+ );
115
+ }
116
+ );
117
+
118
+ ListItem.displayName = "ListItem";
119
+
120
+ export default React.memo(ListItem, (prevProps, nextProps) => {
121
+ return (
122
+ prevProps.isActive === nextProps.isActive &&
123
+ prevProps.favorites === nextProps.favorites &&
124
+ prevProps.item.id === nextProps.item.id &&
125
+ prevProps.item.fields.travelTime === nextProps.item.fields.travelTime &&
126
+ prevProps.fieldsShown === nextProps.fieldsShown &&
127
+ prevProps.bodyClassName === nextProps.bodyClassName &&
128
+ prevProps.className === nextProps.className
129
+ );
130
+ });
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { GoogleMap, MarkerClustererF } from "@react-google-maps/api";
2
+ import { GoogleMap } from "@react-google-maps/api";
3
3
  import ShowAllButton from "~/components/modules/buttons/show-all-button";
4
- import { clusterOptions } from "~/util/mapUtil";
5
4
 
6
5
  const Map = ({
7
6
  zoom,
@@ -9,10 +8,6 @@ const Map = ({
9
8
  mapContainerRef,
10
9
  onLoad,
11
10
  onIdle,
12
- clusterGridSize,
13
- markerConfigs,
14
- mapMarkers,
15
- placeMarkers,
16
11
  mapInteracted,
17
12
  pinIconUrl,
18
13
  setMapInteracted,
@@ -20,7 +15,8 @@ const Map = ({
20
15
  mapRef,
21
16
  setQuery,
22
17
  filteredListingsLength,
23
- setSelectedFilters
18
+ setSelectedFilters,
19
+ children
24
20
  }) => {
25
21
  return (
26
22
  <>
@@ -45,19 +41,11 @@ const Map = ({
45
41
  ]
46
42
  }}
47
43
  >
48
- <MarkerClustererF options={clusterOptions(clusterGridSize, markerConfigs.fillColor)}>
49
- {clusterer => (
50
- <>
51
- {mapMarkers}
52
- {placeMarkers}
53
- </>
54
- )}
55
- </MarkerClustererF>
44
+ {children}
56
45
  </GoogleMap>
57
- {mapInteracted && markerConfigs && (
46
+ {mapInteracted && (
58
47
  <ShowAllButton
59
48
  mapInteracted={mapInteracted}
60
- markerConfigs={markerConfigs}
61
49
  setMapInteracted={setMapInteracted}
62
50
  fitBounds={fitBounds}
63
51
  mapRef={mapRef}