@abcagency/hc-ui-components 1.3.58 → 1.3.60
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/components/HireControlMap.js +11 -1
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
- package/dist/components/containers/filter/commute-container.js +1 -1
- package/dist/components/containers/filter/commute-container.js.map +1 -1
- package/dist/components/containers/filter/filter-container.js.map +1 -1
- package/dist/components/containers/filter/filter-item-container.js.map +1 -1
- package/dist/components/containers/filter/location-container.js.map +1 -1
- package/dist/components/containers/filter/points-of-interest-container.js.map +1 -1
- package/dist/components/containers/filter/points-of-interest-radio-item-container.js.map +1 -1
- package/dist/components/containers/filter/search-container.js.map +1 -1
- package/dist/components/containers/jobListing/listing-details-container.js +5 -1
- package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
- package/dist/components/containers/list/item-list-container.js.map +1 -1
- package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js +1 -1
- package/dist/components/containers/maps/map-list-container.js.map +1 -1
- package/dist/components/containers/maps/map-marker-container.js +1 -1
- package/dist/components/containers/maps/map-marker-container.js.map +1 -1
- package/dist/components/modules/accordions/default.js +2 -2
- package/dist/components/modules/accordions/filterItem.js.map +1 -1
- package/dist/components/modules/accordions/filters.js.map +1 -1
- package/dist/components/modules/buttons/button-group-apply.js +48 -54
- package/dist/components/modules/buttons/button-group-apply.js.map +1 -1
- package/dist/components/modules/buttons/default.js +2 -2
- package/dist/components/modules/cards/default.js +2 -2
- package/dist/components/modules/dialogs/apply-dialog.js +1 -1
- package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
- package/dist/components/modules/filter/commute.js +2 -2
- package/dist/components/modules/filter/commute.js.map +1 -1
- package/dist/components/modules/filter/index.js.map +1 -1
- package/dist/components/modules/filter/location.js.map +1 -1
- 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 +2 -2
- package/dist/components/modules/grid.js +1 -1
- package/dist/components/modules/icon.js +1 -1
- package/dist/components/modules/jobListing/listing-details.js +8 -7
- package/dist/components/modules/jobListing/listing-details.js.map +1 -1
- package/dist/components/modules/list/field-mapper.js.map +1 -1
- package/dist/components/modules/list/header-item.js.map +1 -1
- package/dist/components/modules/list/header.js +1 -1
- package/dist/components/modules/list/item-expand-card/index.js +1 -1
- package/dist/components/modules/list/item-expand-card/index.js.map +1 -1
- package/dist/components/modules/list/item-expand-card/recruiter-contact-nav.js +38 -38
- package/dist/components/modules/list/item-expand-card/recruiter-details.js +40 -40
- package/dist/components/modules/list/item-expand-card/recruiter-headshot.js +20 -20
- package/dist/components/modules/list/item-list.js +3 -3
- package/dist/components/modules/list/item-list.js.map +1 -1
- package/dist/components/modules/list/list-item/list-item.js.map +1 -1
- package/dist/components/modules/maps/info-window-content.js.map +1 -1
- package/dist/components/modules/maps/map-list.js.map +1 -1
- package/dist/components/modules/maps/map-marker.js +1 -1
- package/dist/components/modules/maps/map-marker.js.map +1 -1
- package/dist/components/modules/maps/map.js +1 -1
- package/dist/components/modules/maps/place-marker.js +1 -1
- package/dist/components/modules/maps/tabs.js +1 -1
- package/dist/constants/eventTypes.js +1 -0
- package/dist/constants/eventTypes.js.map +1 -1
- package/dist/contexts/mapContext.js.map +1 -1
- package/dist/contexts/mapListContext.js +3 -1
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/contexts/placesContext.js.map +1 -1
- package/dist/contexts/themeContext.js.map +1 -1
- package/dist/services/configService.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/types/components/modules/buttons/button-group-apply.d.ts +4 -4
- package/dist/types/components/modules/jobListing/listing-details.d.ts +3 -1
- package/dist/types/constants/eventTypes.d.ts +1 -0
- package/dist/types/contexts/mapListContext.d.ts +4 -0
- package/dist/util/filterUtil.js +3 -3
- package/dist/util/filterUtil.js.map +1 -1
- package/dist/util/mapIconUtil.js.map +1 -1
- package/dist/util/mapUtil.js.map +1 -1
- package/package.json +90 -90
- package/src/.editorconfig +12 -12
- package/src/bundleIndex.js +14 -14
- package/src/components/HireControlMap.js +148 -142
- package/src/components/containers/accordions/filter-item-container.js +83 -83
- package/src/components/containers/filter/commute-container.js +89 -89
- package/src/components/containers/filter/filter-container.js +76 -76
- package/src/components/containers/filter/filter-item-container.js +117 -117
- package/src/components/containers/filter/location-container.js +45 -45
- package/src/components/containers/filter/points-of-interest-container.js +33 -33
- package/src/components/containers/filter/points-of-interest-radio-item-container.js +35 -35
- package/src/components/containers/filter/search-container.js +61 -61
- package/src/components/containers/jobListing/listing-details-container.js +3 -1
- package/src/components/containers/list/item-list-container.tsx +81 -81
- package/src/components/containers/maps/info-window-content-container.js +53 -53
- package/src/components/containers/maps/map-list-container.js +50 -50
- package/src/components/containers/maps/map-marker-container.js +78 -78
- package/src/components/modules/accordions/filterItem.js +27 -27
- package/src/components/modules/accordions/filters.js +32 -32
- package/src/components/modules/buttons/button-group-apply.js +115 -135
- package/src/components/modules/dialogs/apply-dialog.js +48 -48
- package/src/components/modules/filter/commute.js +108 -108
- package/src/components/modules/filter/index.js +55 -55
- package/src/components/modules/filter/location.js +51 -51
- package/src/components/modules/filter/radio-item.js +42 -42
- package/src/components/modules/filter/search.js +79 -79
- package/src/components/modules/jobListing/listing-details.js +110 -108
- package/src/components/modules/list/field-mapper.js +130 -130
- package/src/components/modules/list/header-item.js +92 -92
- package/src/components/modules/list/item-expand-card/index.js +22 -22
- package/src/components/modules/list/item-list.tsx +117 -117
- package/src/components/modules/list/list-item/list-item.js +130 -130
- package/src/components/modules/maps/info-window-content.js +64 -64
- package/src/components/modules/maps/map-list.js +38 -38
- package/src/components/modules/maps/map-marker.js +29 -29
- package/src/constants/eventTypes.js +15 -14
- package/src/contexts/mapContext.tsx +129 -129
- package/src/contexts/mapListContext.tsx +326 -318
- package/src/contexts/placesContext.js +102 -102
- package/src/contexts/themeContext.js +40 -40
- package/src/services/configService.ts +16 -16
- package/src/services/listingEntityService.ts +16 -16
- package/src/services/listingService.ts +40 -40
- package/src/services/recruiterService.ts +18 -18
- package/src/styles/bundle.css +268 -268
- package/src/styles/index.css +33 -33
- package/src/types/Address.ts +7 -7
- package/src/types/ContentSection.ts +9 -9
- package/src/types/GetListingParams.ts +8 -8
- package/src/types/LatLng.ts +4 -4
- package/src/types/ListingEntity.ts +11 -11
- package/src/types/ListingFields.ts +25 -25
- package/src/types/Listings.ts +32 -32
- package/src/types/Recruiter.ts +9 -9
- package/src/types/SimilarListing.ts +24 -24
- package/src/types/config/Colors.ts +8 -8
- package/src/types/config/MapConfig.ts +31 -31
- package/src/types/config/PointsOfInterestConfig.ts +13 -13
- package/src/types/config/SearchConfig.ts +4 -4
- package/src/util/filterUtil.js +2 -1
- package/src/util/mapIconUtil.js +180 -180
- package/src/util/mapUtil.js +92 -92
- package/dist/types/contexts/themeContext.d.ts +0 -11
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import useListLogic from '~/hooks/useList';
|
|
3
|
-
import { useMap } from '~/contexts/mapContext';
|
|
4
|
-
import { useMapList } from '~/contexts/mapListContext';
|
|
5
|
-
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
6
|
-
import ItemsList from '~/components/modules/list/item-list';
|
|
7
|
-
import Accordion from '~/components/modules/accordions/default';
|
|
8
|
-
import MapAccordionItemContainer from '~/components/containers/accordions/map-accordion-item-container';
|
|
9
|
-
import { dynamicSort } from '~/util/sortUtil';
|
|
10
|
-
import { Listing } from '~/types/Listings';
|
|
11
|
-
import ListingDetailsContainer from '../jobListing/listing-details-container';
|
|
12
|
-
|
|
13
|
-
interface ItemsListContainerProps {
|
|
14
|
-
fieldNames: Record<string, string>;
|
|
15
|
-
showMap: boolean;
|
|
16
|
-
fieldsShown: string[];
|
|
17
|
-
specialFeatures: any;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const ItemsListContainer: React.FC<ItemsListContainerProps> = ({
|
|
21
|
-
fieldNames,
|
|
22
|
-
showMap,
|
|
23
|
-
fieldsShown,
|
|
24
|
-
specialFeatures
|
|
25
|
-
}) => {
|
|
26
|
-
const { filteredListings, loading, commuteLocation, sortSetting, setSortSetting } = useMapList();
|
|
27
|
-
const { itemLimit, loader, scrollContainerRef, itemRefs } = useListLogic(filteredListings as any);
|
|
28
|
-
const { selectedListItem } = useMap();
|
|
29
|
-
const { trackEvent, eventTypes } = useTrackEvent() as any;
|
|
30
|
-
const itemExpandedContent = (item: any, recruiter: any) =>
|
|
31
|
-
item ? <ListingDetailsContainer item={item} recruiter={recruiter} /> : null;
|
|
32
|
-
|
|
33
|
-
if (!fieldsShown.includes('travelTime') && commuteLocation != null && Object.entries(commuteLocation).length > 0) {
|
|
34
|
-
fieldsShown.push('travelTime');
|
|
35
|
-
fieldNames['travelTime'] = 'Commute';
|
|
36
|
-
} else if (fieldsShown.includes('travelTime') && !commuteLocation) {
|
|
37
|
-
fieldsShown = fieldsShown.filter(x => x !== 'travelTime');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const setTrackedSortSetting = (sortSetting: { field: string; type: string }) => {
|
|
41
|
-
trackEvent(eventTypes.LIST_SORTED, sortSetting);
|
|
42
|
-
setSortSetting(sortSetting);
|
|
43
|
-
};
|
|
44
|
-
return (
|
|
45
|
-
<ItemsList
|
|
46
|
-
fieldNames={fieldNames}
|
|
47
|
-
showMap={showMap}
|
|
48
|
-
fieldsShown={fieldsShown}
|
|
49
|
-
filteredListings={filteredListings}
|
|
50
|
-
loading={loading}
|
|
51
|
-
sortSetting={sortSetting}
|
|
52
|
-
setSortSetting={setTrackedSortSetting}
|
|
53
|
-
itemLimit={itemLimit}
|
|
54
|
-
loader={loader}
|
|
55
|
-
scrollContainerRef={scrollContainerRef}
|
|
56
|
-
itemRefs={itemRefs}
|
|
57
|
-
selectedListItem={selectedListItem}
|
|
58
|
-
includeFavorite={true}
|
|
59
|
-
>
|
|
60
|
-
<Accordion className="hc-divide-y hc-divide-uiAccent/10 hc-z-[1000]" defaultValue={selectedListItem?.id}>
|
|
61
|
-
{(sortSetting ? dynamicSort(filteredListings, sortSetting.field, sortSetting.type) : filteredListings)
|
|
62
|
-
.slice(0, itemLimit)
|
|
63
|
-
.map((item: Listing) => (
|
|
64
|
-
<MapAccordionItemContainer
|
|
65
|
-
key={item.id}
|
|
66
|
-
showMap={showMap}
|
|
67
|
-
item={item}
|
|
68
|
-
itemRefs={itemRefs}
|
|
69
|
-
fieldsShown={fieldsShown}
|
|
70
|
-
itemExpandedContent={itemExpandedContent}
|
|
71
|
-
specialFeatures={specialFeatures}
|
|
72
|
-
isActive={selectedListItem?.id === item.id}
|
|
73
|
-
hasListItemSelected={selectedListItem != null}
|
|
74
|
-
/>
|
|
75
|
-
))}
|
|
76
|
-
</Accordion>
|
|
77
|
-
</ItemsList>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default ItemsListContainer;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import useListLogic from '~/hooks/useList';
|
|
3
|
+
import { useMap } from '~/contexts/mapContext';
|
|
4
|
+
import { useMapList } from '~/contexts/mapListContext';
|
|
5
|
+
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
6
|
+
import ItemsList from '~/components/modules/list/item-list';
|
|
7
|
+
import Accordion from '~/components/modules/accordions/default';
|
|
8
|
+
import MapAccordionItemContainer from '~/components/containers/accordions/map-accordion-item-container';
|
|
9
|
+
import { dynamicSort } from '~/util/sortUtil';
|
|
10
|
+
import { Listing } from '~/types/Listings';
|
|
11
|
+
import ListingDetailsContainer from '../jobListing/listing-details-container';
|
|
12
|
+
|
|
13
|
+
interface ItemsListContainerProps {
|
|
14
|
+
fieldNames: Record<string, string>;
|
|
15
|
+
showMap: boolean;
|
|
16
|
+
fieldsShown: string[];
|
|
17
|
+
specialFeatures: any;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const ItemsListContainer: React.FC<ItemsListContainerProps> = ({
|
|
21
|
+
fieldNames,
|
|
22
|
+
showMap,
|
|
23
|
+
fieldsShown,
|
|
24
|
+
specialFeatures
|
|
25
|
+
}) => {
|
|
26
|
+
const { filteredListings, loading, commuteLocation, sortSetting, setSortSetting } = useMapList();
|
|
27
|
+
const { itemLimit, loader, scrollContainerRef, itemRefs } = useListLogic(filteredListings as any);
|
|
28
|
+
const { selectedListItem } = useMap();
|
|
29
|
+
const { trackEvent, eventTypes } = useTrackEvent() as any;
|
|
30
|
+
const itemExpandedContent = (item: any, recruiter: any) =>
|
|
31
|
+
item ? <ListingDetailsContainer item={item} recruiter={recruiter} /> : null;
|
|
32
|
+
|
|
33
|
+
if (!fieldsShown.includes('travelTime') && commuteLocation != null && Object.entries(commuteLocation).length > 0) {
|
|
34
|
+
fieldsShown.push('travelTime');
|
|
35
|
+
fieldNames['travelTime'] = 'Commute';
|
|
36
|
+
} else if (fieldsShown.includes('travelTime') && !commuteLocation) {
|
|
37
|
+
fieldsShown = fieldsShown.filter(x => x !== 'travelTime');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const setTrackedSortSetting = (sortSetting: { field: string; type: string }) => {
|
|
41
|
+
trackEvent(eventTypes.LIST_SORTED, sortSetting);
|
|
42
|
+
setSortSetting(sortSetting);
|
|
43
|
+
};
|
|
44
|
+
return (
|
|
45
|
+
<ItemsList
|
|
46
|
+
fieldNames={fieldNames}
|
|
47
|
+
showMap={showMap}
|
|
48
|
+
fieldsShown={fieldsShown}
|
|
49
|
+
filteredListings={filteredListings}
|
|
50
|
+
loading={loading}
|
|
51
|
+
sortSetting={sortSetting}
|
|
52
|
+
setSortSetting={setTrackedSortSetting}
|
|
53
|
+
itemLimit={itemLimit}
|
|
54
|
+
loader={loader}
|
|
55
|
+
scrollContainerRef={scrollContainerRef}
|
|
56
|
+
itemRefs={itemRefs}
|
|
57
|
+
selectedListItem={selectedListItem}
|
|
58
|
+
includeFavorite={true}
|
|
59
|
+
>
|
|
60
|
+
<Accordion className="hc-divide-y hc-divide-uiAccent/10 hc-z-[1000]" defaultValue={selectedListItem?.id}>
|
|
61
|
+
{(sortSetting ? dynamicSort(filteredListings, sortSetting.field, sortSetting.type) : filteredListings)
|
|
62
|
+
.slice(0, itemLimit)
|
|
63
|
+
.map((item: Listing) => (
|
|
64
|
+
<MapAccordionItemContainer
|
|
65
|
+
key={item.id}
|
|
66
|
+
showMap={showMap}
|
|
67
|
+
item={item}
|
|
68
|
+
itemRefs={itemRefs}
|
|
69
|
+
fieldsShown={fieldsShown}
|
|
70
|
+
itemExpandedContent={itemExpandedContent}
|
|
71
|
+
specialFeatures={specialFeatures}
|
|
72
|
+
isActive={selectedListItem?.id === item.id}
|
|
73
|
+
hasListItemSelected={selectedListItem != null}
|
|
74
|
+
/>
|
|
75
|
+
))}
|
|
76
|
+
</Accordion>
|
|
77
|
+
</ItemsList>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export default ItemsListContainer;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import InfoWindowContent from '~/components/modules/maps/info-window-content';
|
|
3
|
-
import { useMapList } from '~/contexts/mapListContext';
|
|
4
|
-
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
5
|
-
|
|
6
|
-
const InfoWindowContentContainer = ({
|
|
7
|
-
item,
|
|
8
|
-
filterListingsByLocation
|
|
9
|
-
}) => {
|
|
10
|
-
const { trackEvent, eventTypes } = useTrackEvent();
|
|
11
|
-
const { setSelectedFilters, setMobileTab, selectedFilters, siteConfig, filteredListings } = useMapList();
|
|
12
|
-
const fieldsShown = siteConfig.locationFiltersShown;
|
|
13
|
-
let items = item && item.items ? Object.values(item.items) : null;
|
|
14
|
-
|
|
15
|
-
const addressParts = [
|
|
16
|
-
items[0].mapDetails?.address?.street,
|
|
17
|
-
items[0].mapDetails?.address?.city,
|
|
18
|
-
items[0].mapDetails?.address?.state,
|
|
19
|
-
items[0].mapDetails?.address?.zip
|
|
20
|
-
];
|
|
21
|
-
const fullAddress = addressParts.filter(Boolean).join(', ');
|
|
22
|
-
|
|
23
|
-
const applyFilters = () => {
|
|
24
|
-
setMobileTab("listTab");
|
|
25
|
-
const newFilters = { ...selectedFilters };
|
|
26
|
-
let filters = [];
|
|
27
|
-
|
|
28
|
-
if (fieldsShown.includes('cityState')) {
|
|
29
|
-
newFilters.cityState = { [items[0].fields.cityState]: true };
|
|
30
|
-
filters.push({ filterType: 'cityState', filterChecked: items[0].fields.cityState });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (fieldsShown.includes('city')) {
|
|
34
|
-
newFilters.city = { [items[0].fields.city]: true };
|
|
35
|
-
filters.push({ filterType: 'city', filterChecked: items[0].fields.city });
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (fieldsShown.includes('state')) {
|
|
39
|
-
newFilters.state = { [items[0].fields.state]: true };
|
|
40
|
-
filters.push({ filterType: 'state', filterChecked: items[0].fields.state });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
newFilters.entityName = { [items[0].fields.entityName]: true };
|
|
44
|
-
filters.push({ filterType: 'entityName', filterChecked: items[0].fields.entityName });
|
|
45
|
-
|
|
46
|
-
trackEvent(eventTypes.VIEW_JOBS_AT_Location, { filtersApplied: filters });
|
|
47
|
-
setSelectedFilters(newFilters);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return <InfoWindowContent items={items} fullAddress={fullAddress} applyFilters={applyFilters} mapInfoWindowConfig={siteConfig.mapInfoWindowConfig}/>;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default InfoWindowContentContainer;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import InfoWindowContent from '~/components/modules/maps/info-window-content';
|
|
3
|
+
import { useMapList } from '~/contexts/mapListContext';
|
|
4
|
+
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
5
|
+
|
|
6
|
+
const InfoWindowContentContainer = ({
|
|
7
|
+
item,
|
|
8
|
+
filterListingsByLocation
|
|
9
|
+
}) => {
|
|
10
|
+
const { trackEvent, eventTypes } = useTrackEvent();
|
|
11
|
+
const { setSelectedFilters, setMobileTab, selectedFilters, siteConfig, filteredListings } = useMapList();
|
|
12
|
+
const fieldsShown = siteConfig.locationFiltersShown;
|
|
13
|
+
let items = item && item.items ? Object.values(item.items) : null;
|
|
14
|
+
|
|
15
|
+
const addressParts = [
|
|
16
|
+
items[0].mapDetails?.address?.street,
|
|
17
|
+
items[0].mapDetails?.address?.city,
|
|
18
|
+
items[0].mapDetails?.address?.state,
|
|
19
|
+
items[0].mapDetails?.address?.zip
|
|
20
|
+
];
|
|
21
|
+
const fullAddress = addressParts.filter(Boolean).join(', ');
|
|
22
|
+
|
|
23
|
+
const applyFilters = () => {
|
|
24
|
+
setMobileTab("listTab");
|
|
25
|
+
const newFilters = { ...selectedFilters };
|
|
26
|
+
let filters = [];
|
|
27
|
+
|
|
28
|
+
if (fieldsShown.includes('cityState')) {
|
|
29
|
+
newFilters.cityState = { [items[0].fields.cityState]: true };
|
|
30
|
+
filters.push({ filterType: 'cityState', filterChecked: items[0].fields.cityState });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (fieldsShown.includes('city')) {
|
|
34
|
+
newFilters.city = { [items[0].fields.city]: true };
|
|
35
|
+
filters.push({ filterType: 'city', filterChecked: items[0].fields.city });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (fieldsShown.includes('state')) {
|
|
39
|
+
newFilters.state = { [items[0].fields.state]: true };
|
|
40
|
+
filters.push({ filterType: 'state', filterChecked: items[0].fields.state });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
newFilters.entityName = { [items[0].fields.entityName]: true };
|
|
44
|
+
filters.push({ filterType: 'entityName', filterChecked: items[0].fields.entityName });
|
|
45
|
+
|
|
46
|
+
trackEvent(eventTypes.VIEW_JOBS_AT_Location, { filtersApplied: filters });
|
|
47
|
+
setSelectedFilters(newFilters);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return <InfoWindowContent items={items} fullAddress={fullAddress} applyFilters={applyFilters} mapInfoWindowConfig={siteConfig.mapInfoWindowConfig}/>;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default InfoWindowContentContainer;
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import List from '~/components/containers/list/item-list-container';
|
|
4
|
-
import Map from '~/components/containers/maps/map-container';
|
|
5
|
-
import Filter from '~/components/containers/filter/filter-container';
|
|
6
|
-
import MapList from '~/components/modules/maps/map-list';
|
|
7
|
-
|
|
8
|
-
const MapListContainer = ({
|
|
9
|
-
loading = false,
|
|
10
|
-
mapDetails,
|
|
11
|
-
markerConfigs,
|
|
12
|
-
itemExpandedContent,
|
|
13
|
-
fieldsShown,
|
|
14
|
-
specialFeatures,
|
|
15
|
-
fieldNames,
|
|
16
|
-
showMap,
|
|
17
|
-
placeMappings,
|
|
18
|
-
mapPosition
|
|
19
|
-
}) => {
|
|
20
|
-
|
|
21
|
-
const listProps = {
|
|
22
|
-
fieldsShown,
|
|
23
|
-
fieldNames,
|
|
24
|
-
itemExpandedContent,
|
|
25
|
-
loading,
|
|
26
|
-
showMap,
|
|
27
|
-
specialFeatures
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const mapProps = {
|
|
31
|
-
mapDetails,
|
|
32
|
-
markerConfigs,
|
|
33
|
-
placeMappings,
|
|
34
|
-
clusterGridSize: 60,
|
|
35
|
-
showMap
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<MapList
|
|
40
|
-
showMap={showMap}
|
|
41
|
-
loading={loading}
|
|
42
|
-
list={<List {...listProps} />}
|
|
43
|
-
map={<Map {...mapProps} />}
|
|
44
|
-
filter={<Filter showMap={showMap} className="md:hc-hidden" />}
|
|
45
|
-
mapPosition={mapPosition}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default MapListContainer;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import List from '~/components/containers/list/item-list-container';
|
|
4
|
+
import Map from '~/components/containers/maps/map-container';
|
|
5
|
+
import Filter from '~/components/containers/filter/filter-container';
|
|
6
|
+
import MapList from '~/components/modules/maps/map-list';
|
|
7
|
+
|
|
8
|
+
const MapListContainer = ({
|
|
9
|
+
loading = false,
|
|
10
|
+
mapDetails,
|
|
11
|
+
markerConfigs,
|
|
12
|
+
itemExpandedContent,
|
|
13
|
+
fieldsShown,
|
|
14
|
+
specialFeatures,
|
|
15
|
+
fieldNames,
|
|
16
|
+
showMap,
|
|
17
|
+
placeMappings,
|
|
18
|
+
mapPosition
|
|
19
|
+
}) => {
|
|
20
|
+
|
|
21
|
+
const listProps = {
|
|
22
|
+
fieldsShown,
|
|
23
|
+
fieldNames,
|
|
24
|
+
itemExpandedContent,
|
|
25
|
+
loading,
|
|
26
|
+
showMap,
|
|
27
|
+
specialFeatures
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const mapProps = {
|
|
31
|
+
mapDetails,
|
|
32
|
+
markerConfigs,
|
|
33
|
+
placeMappings,
|
|
34
|
+
clusterGridSize: 60,
|
|
35
|
+
showMap
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<MapList
|
|
40
|
+
showMap={showMap}
|
|
41
|
+
loading={loading}
|
|
42
|
+
list={<List {...listProps} />}
|
|
43
|
+
map={<Map {...mapProps} />}
|
|
44
|
+
filter={<Filter showMap={showMap} className="md:hc-hidden" />}
|
|
45
|
+
mapPosition={mapPosition}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default MapListContainer;
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import MapMarker from '~/components/modules/maps/map-marker';
|
|
3
|
-
import { InfoWindow } from '@react-google-maps/api';
|
|
4
|
-
import InfoWindowCard from '~/components/modules/maps/info-window-card';
|
|
5
|
-
import InfoWindowContent from "~/components/containers/maps/info-window-content-container";
|
|
6
|
-
|
|
7
|
-
import { useMap } from "~/contexts/mapContext";
|
|
8
|
-
import { useMapList } from "~/contexts/mapListContext";
|
|
9
|
-
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
10
|
-
|
|
11
|
-
const MapMarkerContainer = ({
|
|
12
|
-
item,
|
|
13
|
-
markerRefs,
|
|
14
|
-
infoWindowClasses,
|
|
15
|
-
markerClickHandler,
|
|
16
|
-
clusterer,
|
|
17
|
-
markerIconSelected,
|
|
18
|
-
markerIcon,
|
|
19
|
-
selectedLocation,
|
|
20
|
-
setMapInteracted
|
|
21
|
-
}) => {
|
|
22
|
-
const { setLocation, commuteLocation } = useMap();
|
|
23
|
-
const isSelected = item.id === selectedLocation?.id;
|
|
24
|
-
const markerRef = useRef(null);
|
|
25
|
-
const { trackEvent, eventTypes } = useTrackEvent();
|
|
26
|
-
const { resetEntityFilter } = useMapList();
|
|
27
|
-
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
markerRefs.current[item.id] = markerRef.current;
|
|
30
|
-
}, []);
|
|
31
|
-
|
|
32
|
-
const onMarkerClick = () => {
|
|
33
|
-
trackEvent(eventTypes.MAP_MARKER_CLICKED, {
|
|
34
|
-
entityDisplayName: item.entityDisplayName,
|
|
35
|
-
lat: item.latitude,
|
|
36
|
-
lng: item.longitude,
|
|
37
|
-
travelTime: item.travelTime
|
|
38
|
-
});
|
|
39
|
-
setMapInteracted(true);
|
|
40
|
-
markerClickHandler(item);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<MapMarker
|
|
45
|
-
position={{ lat: item.latitude, lng: item.longitude }}
|
|
46
|
-
title={item.name}
|
|
47
|
-
icon={isSelected ? markerIconSelected : markerIcon}
|
|
48
|
-
zIndex={isSelected ? 9999 : 1}
|
|
49
|
-
onLoad={marker => (markerRef.current = marker)}
|
|
50
|
-
onClick={onMarkerClick}
|
|
51
|
-
clusterer={clusterer}
|
|
52
|
-
>
|
|
53
|
-
{isSelected && (
|
|
54
|
-
<InfoWindow
|
|
55
|
-
position={{ lat: item.latitude, lng: item.longitude }}
|
|
56
|
-
anchor={markerRefs.current[item.id]}
|
|
57
|
-
onCloseClick={() => {
|
|
58
|
-
setMapInteracted(true);
|
|
59
|
-
setLocation(null);
|
|
60
|
-
resetEntityFilter();
|
|
61
|
-
}}
|
|
62
|
-
options={{ maxWidth: 400 }}
|
|
63
|
-
>
|
|
64
|
-
<InfoWindowCard
|
|
65
|
-
className={infoWindowClasses}
|
|
66
|
-
id={item.id}
|
|
67
|
-
content={<InfoWindowContent
|
|
68
|
-
item={item}
|
|
69
|
-
commuteLocation={commuteLocation}
|
|
70
|
-
/>}
|
|
71
|
-
/>
|
|
72
|
-
</InfoWindow>
|
|
73
|
-
)}
|
|
74
|
-
</MapMarker>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export default MapMarkerContainer;
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import MapMarker from '~/components/modules/maps/map-marker';
|
|
3
|
+
import { InfoWindow } from '@react-google-maps/api';
|
|
4
|
+
import InfoWindowCard from '~/components/modules/maps/info-window-card';
|
|
5
|
+
import InfoWindowContent from "~/components/containers/maps/info-window-content-container";
|
|
6
|
+
|
|
7
|
+
import { useMap } from "~/contexts/mapContext";
|
|
8
|
+
import { useMapList } from "~/contexts/mapListContext";
|
|
9
|
+
import { useTrackEvent } from '~/contexts/trackEventContext';
|
|
10
|
+
|
|
11
|
+
const MapMarkerContainer = ({
|
|
12
|
+
item,
|
|
13
|
+
markerRefs,
|
|
14
|
+
infoWindowClasses,
|
|
15
|
+
markerClickHandler,
|
|
16
|
+
clusterer,
|
|
17
|
+
markerIconSelected,
|
|
18
|
+
markerIcon,
|
|
19
|
+
selectedLocation,
|
|
20
|
+
setMapInteracted
|
|
21
|
+
}) => {
|
|
22
|
+
const { setLocation, commuteLocation } = useMap();
|
|
23
|
+
const isSelected = item.id === selectedLocation?.id;
|
|
24
|
+
const markerRef = useRef(null);
|
|
25
|
+
const { trackEvent, eventTypes } = useTrackEvent();
|
|
26
|
+
const { resetEntityFilter } = useMapList();
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
markerRefs.current[item.id] = markerRef.current;
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
const onMarkerClick = () => {
|
|
33
|
+
trackEvent(eventTypes.MAP_MARKER_CLICKED, {
|
|
34
|
+
entityDisplayName: item.entityDisplayName,
|
|
35
|
+
lat: item.latitude,
|
|
36
|
+
lng: item.longitude,
|
|
37
|
+
travelTime: item.travelTime
|
|
38
|
+
});
|
|
39
|
+
setMapInteracted(true);
|
|
40
|
+
markerClickHandler(item);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<MapMarker
|
|
45
|
+
position={{ lat: item.latitude, lng: item.longitude }}
|
|
46
|
+
title={item.name}
|
|
47
|
+
icon={isSelected ? markerIconSelected : markerIcon}
|
|
48
|
+
zIndex={isSelected ? 9999 : 1}
|
|
49
|
+
onLoad={marker => (markerRef.current = marker)}
|
|
50
|
+
onClick={onMarkerClick}
|
|
51
|
+
clusterer={clusterer}
|
|
52
|
+
>
|
|
53
|
+
{isSelected && (
|
|
54
|
+
<InfoWindow
|
|
55
|
+
position={{ lat: item.latitude, lng: item.longitude }}
|
|
56
|
+
anchor={markerRefs.current[item.id]}
|
|
57
|
+
onCloseClick={() => {
|
|
58
|
+
setMapInteracted(true);
|
|
59
|
+
setLocation(null);
|
|
60
|
+
resetEntityFilter();
|
|
61
|
+
}}
|
|
62
|
+
options={{ maxWidth: 400 }}
|
|
63
|
+
>
|
|
64
|
+
<InfoWindowCard
|
|
65
|
+
className={infoWindowClasses}
|
|
66
|
+
id={item.id}
|
|
67
|
+
content={<InfoWindowContent
|
|
68
|
+
item={item}
|
|
69
|
+
commuteLocation={commuteLocation}
|
|
70
|
+
/>}
|
|
71
|
+
/>
|
|
72
|
+
</InfoWindow>
|
|
73
|
+
)}
|
|
74
|
+
</MapMarker>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export default MapMarkerContainer;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Accordion from '~/components/modules/accordions/default';
|
|
3
|
-
|
|
4
|
-
const AccordionFilterItem = ({
|
|
5
|
-
id,
|
|
6
|
-
setDefaultValue,
|
|
7
|
-
header,
|
|
8
|
-
body
|
|
9
|
-
}) => {
|
|
10
|
-
return (
|
|
11
|
-
<Accordion.Item key={id} id={id}>
|
|
12
|
-
<Accordion.Trigger.HasHeader
|
|
13
|
-
onClick={() => setDefaultValue(id)}
|
|
14
|
-
className="hc-stretched-link hc-text-left"
|
|
15
|
-
iconClassName="hc-order-last"
|
|
16
|
-
headerClassName="hc-relative hc-py-2 hc-rounded hc-border hc-border-uiAccent/20 hc-bg-white hc-text-sm hc-transition data-[state=open]:hc-border-b-transparent data-[state=open]:hc-rounded-b-none"
|
|
17
|
-
>
|
|
18
|
-
{header}
|
|
19
|
-
</Accordion.Trigger.HasHeader>
|
|
20
|
-
<Accordion.Content bodyClassName="hc-px-2 hc-py-1 hc-bg-white hc-rounded-b hc-border hc-border-uiAccent/20 hc-border-t-0 hc-max-h-[20vh] md:hc-max-h-[25vh] hc-overflow-auto">
|
|
21
|
-
{body}
|
|
22
|
-
</Accordion.Content>
|
|
23
|
-
</Accordion.Item>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export default AccordionFilterItem;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Accordion from '~/components/modules/accordions/default';
|
|
3
|
+
|
|
4
|
+
const AccordionFilterItem = ({
|
|
5
|
+
id,
|
|
6
|
+
setDefaultValue,
|
|
7
|
+
header,
|
|
8
|
+
body
|
|
9
|
+
}) => {
|
|
10
|
+
return (
|
|
11
|
+
<Accordion.Item key={id} id={id}>
|
|
12
|
+
<Accordion.Trigger.HasHeader
|
|
13
|
+
onClick={() => setDefaultValue(id)}
|
|
14
|
+
className="hc-stretched-link hc-text-left"
|
|
15
|
+
iconClassName="hc-order-last"
|
|
16
|
+
headerClassName="hc-relative hc-py-2 hc-rounded hc-border hc-border-uiAccent/20 hc-bg-white hc-text-sm hc-transition data-[state=open]:hc-border-b-transparent data-[state=open]:hc-rounded-b-none"
|
|
17
|
+
>
|
|
18
|
+
{header}
|
|
19
|
+
</Accordion.Trigger.HasHeader>
|
|
20
|
+
<Accordion.Content bodyClassName="hc-px-2 hc-py-1 hc-bg-white hc-rounded-b hc-border hc-border-uiAccent/20 hc-border-t-0 hc-max-h-[20vh] md:hc-max-h-[25vh] hc-overflow-auto">
|
|
21
|
+
{body}
|
|
22
|
+
</Accordion.Content>
|
|
23
|
+
</Accordion.Item>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default AccordionFilterItem;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Accordion from '~/components/modules/accordions/default';
|
|
3
|
-
import FilterCard from '~/components/modules/cards/filter';
|
|
4
|
-
import Loading from '~/util/loading';
|
|
5
|
-
|
|
6
|
-
const AccordionFilters = ({
|
|
7
|
-
className,
|
|
8
|
-
defaultValue,
|
|
9
|
-
children,
|
|
10
|
-
filterOptions
|
|
11
|
-
}) => {
|
|
12
|
-
return (
|
|
13
|
-
<FilterCard className={className ?? ""}>
|
|
14
|
-
<FilterCard.Title icon="fa-solid:sliders-h">
|
|
15
|
-
<span>
|
|
16
|
-
Filter <span className="md:hc-hidden lg:hc-inline">your search</span>
|
|
17
|
-
</span>
|
|
18
|
-
</FilterCard.Title>
|
|
19
|
-
|
|
20
|
-
<Accordion defaultValue={defaultValue} className="hc-space-y-4" >
|
|
21
|
-
{!filterOptions?.filters && (
|
|
22
|
-
<Accordion.Item>
|
|
23
|
-
<Loading />
|
|
24
|
-
</Accordion.Item>
|
|
25
|
-
)}
|
|
26
|
-
{filterOptions?.filters && children}
|
|
27
|
-
</Accordion>
|
|
28
|
-
</FilterCard>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export default AccordionFilters;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Accordion from '~/components/modules/accordions/default';
|
|
3
|
+
import FilterCard from '~/components/modules/cards/filter';
|
|
4
|
+
import Loading from '~/util/loading';
|
|
5
|
+
|
|
6
|
+
const AccordionFilters = ({
|
|
7
|
+
className,
|
|
8
|
+
defaultValue,
|
|
9
|
+
children,
|
|
10
|
+
filterOptions
|
|
11
|
+
}) => {
|
|
12
|
+
return (
|
|
13
|
+
<FilterCard className={className ?? ""}>
|
|
14
|
+
<FilterCard.Title icon="fa-solid:sliders-h">
|
|
15
|
+
<span>
|
|
16
|
+
Filter <span className="md:hc-hidden lg:hc-inline">your search</span>
|
|
17
|
+
</span>
|
|
18
|
+
</FilterCard.Title>
|
|
19
|
+
|
|
20
|
+
<Accordion defaultValue={defaultValue} className="hc-space-y-4" >
|
|
21
|
+
{!filterOptions?.filters && (
|
|
22
|
+
<Accordion.Item>
|
|
23
|
+
<Loading />
|
|
24
|
+
</Accordion.Item>
|
|
25
|
+
)}
|
|
26
|
+
{filterOptions?.filters && children}
|
|
27
|
+
</Accordion>
|
|
28
|
+
</FilterCard>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default AccordionFilters;
|