@abcagency/hc-ui-components 1.3.21 → 1.3.23

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 (149) hide show
  1. package/dist/components/containers/accordions/filter-container.js +4 -2
  2. package/dist/components/containers/accordions/filter-container.js.map +1 -1
  3. package/dist/components/containers/accordions/filter-item-container.js +6 -1
  4. package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
  5. package/dist/components/containers/accordions/map-accordion-item-container.js +4 -2
  6. package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
  7. package/dist/components/containers/jobListing/listing-details-container.js +2 -2
  8. package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
  9. package/dist/components/containers/list/item-list-container.js +2 -2
  10. package/dist/components/containers/list/item-list-container.js.map +1 -1
  11. package/dist/components/modules/accordions/MapAccordionItem.js +2 -1
  12. package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
  13. package/dist/components/modules/dialogs/apply-dialog.js +1 -1
  14. package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
  15. package/dist/components/modules/filter/search.js +1 -1
  16. package/dist/components/modules/filter/search.js.map +1 -1
  17. package/dist/components/modules/jobListing/listing-details.js +5 -4
  18. package/dist/components/modules/jobListing/listing-details.js.map +1 -1
  19. package/dist/components/modules/list/field-mapper.js +1 -1
  20. package/dist/components/modules/list/field-mapper.js.map +1 -1
  21. package/dist/components/modules/list/item-list.js.map +1 -1
  22. package/dist/contexts/mapListContext.js.map +1 -1
  23. package/dist/services/listingAggregatorService.js.map +1 -1
  24. package/dist/styles/index.css +3 -1
  25. package/dist/types/components/containers/jobListing/listing-details-container.d.ts +2 -2
  26. package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +2 -1
  27. package/dist/types/components/modules/jobListing/listing-details.d.ts +2 -2
  28. package/dist/types/components/modules/list/item-list.d.ts +0 -1
  29. package/dist/types/types/ListingFields.d.ts +5 -0
  30. package/dist/types/types/config/MapConfig.d.ts +1 -0
  31. package/dist/util/filterUtil.js +2 -2
  32. package/dist/util/filterUtil.js.map +1 -1
  33. package/package.json +4 -1
  34. package/.env +0 -3
  35. package/.eslintrc +0 -136
  36. package/bundle.js +0 -28134
  37. package/bundle.js.map +0 -1
  38. package/bundleDist.map +0 -1
  39. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +0 -12
  40. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +0 -1
  41. package/jsconfig.json +0 -7
  42. package/postcss.config.js +0 -13
  43. package/preset.default.js +0 -15
  44. package/rollup.config.mjs +0 -111
  45. package/src/.editorconfig +0 -12
  46. package/src/apis/hcApi.ts +0 -109
  47. package/src/bundleIndex.js +0 -14
  48. package/src/clientToken.js +0 -9
  49. package/src/components/HireControlMap.js +0 -135
  50. package/src/components/containers/accordions/filter-container.js +0 -47
  51. package/src/components/containers/accordions/filter-item-container.js +0 -62
  52. package/src/components/containers/accordions/map-accordion-item-container.js +0 -70
  53. package/src/components/containers/filter/commute-container.js +0 -89
  54. package/src/components/containers/filter/filter-container.js +0 -76
  55. package/src/components/containers/filter/filter-item-container.js +0 -71
  56. package/src/components/containers/filter/location-container.js +0 -45
  57. package/src/components/containers/filter/points-of-interest-container.js +0 -33
  58. package/src/components/containers/filter/points-of-interest-radio-item-container.js +0 -35
  59. package/src/components/containers/filter/search-container.js +0 -50
  60. package/src/components/containers/jobListing/listing-details-container.js +0 -40
  61. package/src/components/containers/list/item-list-container.tsx +0 -82
  62. package/src/components/containers/list/list-item/list-item-container.js +0 -43
  63. package/src/components/containers/maps/info-window-content-container.js +0 -51
  64. package/src/components/containers/maps/map-container.js +0 -204
  65. package/src/components/containers/maps/map-list-container.js +0 -48
  66. package/src/components/containers/maps/map-marker-container.js +0 -78
  67. package/src/components/modules/accordions/MapAccordionItem.js +0 -29
  68. package/src/components/modules/accordions/default.js +0 -171
  69. package/src/components/modules/accordions/filterItem.js +0 -27
  70. package/src/components/modules/accordions/filters.js +0 -32
  71. package/src/components/modules/buttons/button-group-apply.js +0 -123
  72. package/src/components/modules/buttons/commute-pill.js +0 -22
  73. package/src/components/modules/buttons/default.js +0 -194
  74. package/src/components/modules/buttons/items-pill.js +0 -35
  75. package/src/components/modules/buttons/pill-wrapper.js +0 -27
  76. package/src/components/modules/buttons/show-all-button.js +0 -20
  77. package/src/components/modules/cards/default.js +0 -167
  78. package/src/components/modules/cards/filter.js +0 -56
  79. package/src/components/modules/dialogs/apply-dialog.js +0 -48
  80. package/src/components/modules/filter/commute.js +0 -108
  81. package/src/components/modules/filter/index.js +0 -55
  82. package/src/components/modules/filter/item.js +0 -48
  83. package/src/components/modules/filter/location.js +0 -48
  84. package/src/components/modules/filter/radio-item.js +0 -42
  85. package/src/components/modules/filter/search.js +0 -65
  86. package/src/components/modules/filter/sort.js +0 -83
  87. package/src/components/modules/grid.js +0 -54
  88. package/src/components/modules/icon.js +0 -33
  89. package/src/components/modules/jobListing/listing-details.js +0 -109
  90. package/src/components/modules/list/field-mapper.js +0 -114
  91. package/src/components/modules/list/header-item.js +0 -91
  92. package/src/components/modules/list/header.js +0 -49
  93. package/src/components/modules/list/item-expand-card/index.js +0 -22
  94. package/src/components/modules/list/item-expand-card/recruiter-contact-nav.js +0 -50
  95. package/src/components/modules/list/item-expand-card/recruiter-details.js +0 -68
  96. package/src/components/modules/list/item-expand-card/recruiter-headshot.js +0 -22
  97. package/src/components/modules/list/item-list.tsx +0 -85
  98. package/src/components/modules/list/list-item/list-item.js +0 -130
  99. package/src/components/modules/maps/info-window-card.js +0 -17
  100. package/src/components/modules/maps/info-window-content.js +0 -35
  101. package/src/components/modules/maps/map-list.js +0 -28
  102. package/src/components/modules/maps/map-marker.js +0 -29
  103. package/src/components/modules/maps/map.js +0 -76
  104. package/src/components/modules/maps/place-marker.js +0 -41
  105. package/src/components/modules/maps/tabs.js +0 -81
  106. package/src/constants/eventTypes.js +0 -13
  107. package/src/constants/placeTypes.js +0 -8
  108. package/src/contexts/mapContext.tsx +0 -129
  109. package/src/contexts/mapListContext.tsx +0 -311
  110. package/src/contexts/placesContext.js +0 -102
  111. package/src/contexts/trackEventContext.js +0 -14
  112. package/src/enums/SectionType.ts +0 -9
  113. package/src/hooks/useList.js +0 -89
  114. package/src/index.js +0 -3
  115. package/src/services/configService.ts +0 -16
  116. package/src/services/googlePlacesNearbyService.ts +0 -42
  117. package/src/services/listingAggregatorService.ts +0 -76
  118. package/src/services/listingEntityService.ts +0 -16
  119. package/src/services/listingService.ts +0 -40
  120. package/src/services/recruiterService.ts +0 -18
  121. package/src/styles/bundle.css +0 -268
  122. package/src/styles/index.css +0 -125
  123. package/src/types/Address.ts +0 -7
  124. package/src/types/ContentSection.ts +0 -9
  125. package/src/types/GetListingParams.ts +0 -8
  126. package/src/types/LatLng.ts +0 -4
  127. package/src/types/ListingEntity.ts +0 -11
  128. package/src/types/ListingFields.ts +0 -20
  129. package/src/types/Listings.ts +0 -32
  130. package/src/types/Recruiter.ts +0 -9
  131. package/src/types/SimilarListing.ts +0 -24
  132. package/src/types/config/Colors.ts +0 -8
  133. package/src/types/config/MapConfig.ts +0 -30
  134. package/src/types/config/PointsOfInterestConfig.ts +0 -13
  135. package/src/types/config/SearchConfig.ts +0 -4
  136. package/src/util/arrayUtil.js +0 -3
  137. package/src/util/fieldMapper.js +0 -22
  138. package/src/util/filterUtil.js +0 -239
  139. package/src/util/loading.js +0 -17
  140. package/src/util/localStorageUtil.ts +0 -34
  141. package/src/util/mapIconUtil.js +0 -180
  142. package/src/util/mapUtil.js +0 -91
  143. package/src/util/sortUtil.js +0 -33
  144. package/src/util/stringUtils.js +0 -6
  145. package/src/util/urlFilterUtil.js +0 -85
  146. package/stats.html +0 -4842
  147. package/styles/index.css +0 -1
  148. package/tailwind.config.js +0 -129
  149. package/tsconfig.json +0 -23
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import Tabs from '~/components/modules/maps/tabs';
3
-
4
- const MapList = ({ showMap, loading, list, map, filter }) => {
5
- return (
6
- <>
7
- <div
8
- className={`
9
- ${showMap === false ? "md:hc-grid-rows-[100vh]" : "md:hc-grid-rows-[50vh_50vh]"}
10
- md:hc-grid md:hc-pt-4 hc-overflow-hidden hc-relative bg-gray-100
11
- `}
12
- >
13
- <div>{list}</div>
14
- <div>{showMap && map}</div>
15
- </div>
16
- <div className="md:hc-hidden">
17
- <Tabs
18
- showMap={showMap}
19
- list={list}
20
- map={!loading && showMap && map}
21
- filter={filter}
22
- />
23
- </div>
24
- </>
25
- );
26
- };
27
-
28
- export default MapList;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { MarkerF } from '@react-google-maps/api';
3
-
4
- const MapMarker = ({
5
- position,
6
- title,
7
- icon,
8
- zIndex,
9
- onLoad,
10
- onClick,
11
- clusterer,
12
- children
13
- }) => {
14
- return (
15
- <MarkerF
16
- position={position}
17
- title={title}
18
- options={{ icon: icon }}
19
- zIndex={zIndex}
20
- onLoad={onLoad}
21
- onClick={onClick}
22
- clusterer={clusterer}
23
- >
24
- {children}
25
- </MarkerF>
26
- );
27
- };
28
-
29
- export default MapMarker;
@@ -1,76 +0,0 @@
1
- import React from 'react';
2
- import { GoogleMap, MarkerClustererF } from "@react-google-maps/api";
3
- import ShowAllButton from "~/components/modules/buttons/show-all-button";
4
- import { clusterOptions } from "~/util/mapUtil";
5
-
6
- const Map = ({
7
- zoom,
8
- center,
9
- mapContainerRef,
10
- onLoad,
11
- onIdle,
12
- clusterGridSize,
13
- markerConfigs,
14
- mapMarkers,
15
- placeMarkers,
16
- mapInteracted,
17
- pinIconUrl,
18
- setMapInteracted,
19
- fitBounds,
20
- mapRef,
21
- setQuery,
22
- filteredListingsLength,
23
- setSelectedFilters
24
- }) => {
25
- return (
26
- <>
27
- {zoom && center && (
28
- <div ref={mapContainerRef} className="hc-h-full hc-relative">
29
- <GoogleMap
30
- zoom={zoom}
31
- onLoad={onLoad}
32
- onIdle={onIdle}
33
- center={center}
34
- mapContainerStyle={{
35
- width: "100%",
36
- height: "100%"
37
- }}
38
- options={{
39
- styles: [
40
- {
41
- featureType: "poi",
42
- elementType: "labels",
43
- stylers: [{ visibility: "off" }]
44
- }
45
- ]
46
- }}
47
- >
48
- <MarkerClustererF options={clusterOptions(clusterGridSize, markerConfigs.fillColor)}>
49
- {clusterer => (
50
- <>
51
- {mapMarkers}
52
- {placeMarkers}
53
- </>
54
- )}
55
- </MarkerClustererF>
56
- </GoogleMap>
57
- {mapInteracted && markerConfigs && (
58
- <ShowAllButton
59
- mapInteracted={mapInteracted}
60
- markerConfigs={markerConfigs}
61
- setMapInteracted={setMapInteracted}
62
- fitBounds={fitBounds}
63
- mapRef={mapRef}
64
- pinIconUrl={pinIconUrl}
65
- setQuery={setQuery}
66
- listingCount={filteredListingsLength}
67
- setSelectedFilters={setSelectedFilters}
68
- />
69
- )}
70
- </div>
71
- )}
72
- </>
73
- );
74
- };
75
-
76
- export default Map;
@@ -1,41 +0,0 @@
1
- import React from 'react';
2
- import { Marker, InfoWindowF } from '@react-google-maps/api';
3
-
4
- const PlaceMarker = ({
5
- marker,
6
- index,
7
- selectedPlaceMarker,
8
- setSelectedPlaceMarker,
9
- placesWindow,
10
- setPlacesWindow
11
- }) => {
12
- const markerKey = `marker-${marker.title}-${index}`;
13
-
14
- const placeMarkerClickHandler = () => {
15
- setSelectedPlaceMarker(markerKey);
16
- setPlacesWindow(true);
17
- };
18
-
19
- return (
20
- <Marker
21
- key={markerKey}
22
- position={marker.position}
23
- title={marker.title}
24
- icon={marker.icon}
25
- options={{ optimized: false }}
26
- onClick={placeMarkerClickHandler}
27
- >
28
- {selectedPlaceMarker === markerKey && placesWindow && marker && (
29
- <InfoWindowF
30
- position={marker.position}
31
- onCloseClick={() => setPlacesWindow(false)}
32
- options={{ maxWidth: 400 }}
33
- >
34
- <div>{marker.title}</div>
35
- </InfoWindowF>
36
- )}
37
- </Marker>
38
- );
39
- };
40
-
41
- export default PlaceMarker;
@@ -1,81 +0,0 @@
1
- import React from 'react';
2
- import * as Tabs from '@radix-ui/react-tabs';
3
-
4
- import Button from '~/components/modules/buttons/default';
5
-
6
- import { useMapList } from '~/contexts/mapListContext';
7
-
8
- const MapTabs = ({
9
- map,
10
- list,
11
- filter,
12
- className,
13
- showMap
14
- }) => {
15
- const tabButtonClasses =
16
- "hc-flex hc-items-center hc-gap-2 hc-rounded-none hc-border-x-0 data-[state=active]:hc-bg-primary data-[state=active]:hc-text-white";
17
- const { mobileTab, setMobileTab } = useMapList();
18
- return (
19
- <div
20
- className={`
21
- hc-relative hc-overflow-hidden
22
- ${className ?? ""}
23
- `}
24
- >
25
- <Tabs.Root
26
- className="hc-flex hc-flex-col hc-h-screen hc-min-h-screen"
27
- //defaultValue="listTab"
28
- value={mobileTab}
29
- >
30
- <Tabs.List
31
- className="hc-w-full hc-shrink-0 hc-flex hc-divide-x hc-divide-primary"
32
- aria-label="Review positions"
33
- >
34
- <Tabs.Trigger value="listTab" asChild onClick={() => setMobileTab("listTab")}>
35
- <Button.Btn variant="outline" isBlock className={tabButtonClasses}>
36
- <Button.Body className="hc-justify-center">
37
- <Button.Icon icon="mdi:view-list" size="hc-size-5" />
38
- List
39
- </Button.Body>
40
- </Button.Btn>
41
- </Tabs.Trigger>
42
- {showMap && (
43
- <Tabs.Trigger value="mapTab" asChild onClick={() => setMobileTab("mapTab")}>
44
- <Button.Btn
45
- variant="outline"
46
- isBlock
47
- className={tabButtonClasses}
48
- >
49
- <Button.Body className="hc-justify-center">
50
- <Button.Icon icon="mdi:map" size="hc-size-5" />
51
- Map
52
- </Button.Body>
53
- </Button.Btn>
54
- </Tabs.Trigger>
55
- )}
56
- <Tabs.Trigger value="filterTab" asChild onClick={() => setMobileTab("filterTab")}>
57
- <Button.Btn variant="outline" isBlock className={tabButtonClasses}>
58
- <Button.Body className="hc-justify-center">
59
- <Button.Icon icon="fluent:search-12-filled" size="hc-size-5" />
60
- Filter
61
- </Button.Body>
62
- </Button.Btn>
63
- </Tabs.Trigger>
64
- </Tabs.List>
65
- <Tabs.Content className="hc-grow hc-bg-white hc-outline-none" value="listTab">
66
- {list}
67
- </Tabs.Content>
68
- {showMap && (
69
- <Tabs.Content className="hc-grow hc-bg-white hc-outline-none" value="mapTab">
70
- {map}
71
- </Tabs.Content>
72
- )}
73
- <Tabs.Content className="hc-grow hc-bg-white hc-outline-none hc-p-2" value="filterTab">
74
- {filter}
75
- </Tabs.Content>
76
- </Tabs.Root>
77
- </div>
78
- );
79
- };
80
-
81
- export default MapTabs;
@@ -1,13 +0,0 @@
1
- export const eventTypes = {
2
- FILTER_APPLIED: "filter_applied",
3
- MAP_MARKER_CLICKED: "map_marker_clicked",
4
- JOB_LISTING_SELECTED: "job_listing_selected",
5
- APPLY_NOW_CLICKED: "apply_now_clicked",
6
- VIEW_DETAILS_CLICKED: "view_details_clicked",
7
- COMMUTE_ORIGIN_ADDED: "commute_origin_added",
8
- POI_APPLIED: "point_of_interest_applied",
9
- VIEW_JOBS_AT_Location: "view_jobs_at_location_clicked",
10
- FAVORITE_SELECTED: "favorite_job_selected",
11
- LIST_SORTED: "jobs_list_sorted",
12
- FILTERS_RESET: "filter_reset_button_clicked"
13
- };
@@ -1,8 +0,0 @@
1
- export const placeTypes = {
2
- FOOD: "food",
3
- STORE: "shopping",
4
- TOURIST_ATTRACTION: "attractions",
5
- TRANSIT_STATION: "transit",
6
- SCHOOL: "schools",
7
- PLACE_OF_WORSHIP: "worship"
8
- };
@@ -1,129 +0,0 @@
1
- import React, { createContext, useState, useContext, useEffect, useRef, ReactNode } from 'react';
2
- import { getStorageObject, setStorageObject } from '~/util/localStorageUtil';
3
- import { Listing } from '~/types/Listings';
4
- import { LatLng } from '~/types/LatLng';
5
- interface IMapContext {
6
- selectedListItem: Listing | null;
7
- setSelectedListItem: (item: Listing | null) => void;
8
- location: any | null;
9
- setLocation: (location: LatLng | null) => void;
10
- center: LatLng;
11
- setCenter: (center: LatLng) => void;
12
- zoom: number;
13
- setZoom: (zoom: number) => void;
14
- selectedPlaces: string[];
15
- setSelectedPlaces: (places: string[]) => void;
16
- mapInteracted: boolean;
17
- setMapInteracted: (interacted: boolean) => void;
18
- userSetZoom: React.MutableRefObject<boolean>;
19
- firstLoadListItem: any;
20
- selectItem: (item: Listing, itemLocation: LatLng | null, zoom: number, center: LatLng) => void;
21
- filterReset: () => void;
22
- selectLocationEntity: (location: LatLng) => void;
23
- }
24
-
25
- const MapContext = createContext<IMapContext | undefined>(undefined);
26
-
27
- export const useMap = () => {
28
- const context = useContext(MapContext);
29
- if (!context) {
30
- throw new Error("useMap must be used within a MapProvider");
31
- }
32
- return context;
33
- };
34
-
35
- interface MapProviderProps {
36
- children: ReactNode;
37
- resetFilters: boolean;
38
- }
39
-
40
- export const MapProvider: React.FC<MapProviderProps> = ({ children, resetFilters }) => {
41
- const [selectedListItem, setSelectedListItem] = useState<Listing | null>(getStorageObject('selectedListItem'));
42
- const [location, setLocation] = useState<any>(getStorageObject('location'));
43
- const [center, setCenter] = useState<LatLng>(getStorageObject("center", { lat: 39.8283, lng: -98.5795 }) || { lat: 39.8283, lng: -98.5795 });
44
- const [zoom, setZoom] = useState<number>(getStorageObject("zoom", 10) || 10);
45
- const [selectedPlaces, setSelectedPlaces] = useState<string[]>([]);
46
- const [mapInteracted, setMapInteracted] = useState<boolean>(false);
47
- const [firstLoadListItem] = useState<any>(getStorageObject('selectedListItem', { id: "defaultId" }));
48
- const userSetZoom = useRef<boolean>(true);
49
-
50
- useEffect(() => {
51
- setStorageObject("selectedListItem", selectedListItem);
52
- }, [selectedListItem]);
53
-
54
- useEffect(() => {
55
- localStorage.setItem("zoom", zoom.toString());
56
- }, [zoom]);
57
-
58
- useEffect(() => {
59
- if (location == null) {
60
- localStorage.removeItem("location");
61
- } else {
62
- setStorageObject("location", location);
63
- }
64
- }, [location]);
65
-
66
- useEffect(() => {
67
- setStorageObject("center", center);
68
- }, [center]);
69
-
70
- const selectItem = (item: Listing, itemLocation: LatLng | null, zoom: number, center: LatLng) => {
71
- setSelectedListItem(item);
72
- if (mapInteracted === false && itemLocation != null) {
73
- setLocation(itemLocation);
74
- }
75
- if (mapInteracted === false || itemLocation != null) {
76
- setLocation(itemLocation);
77
- setCenter(center);
78
- }
79
- if (mapInteracted === false) {
80
- setZoom(zoom);
81
- }
82
- };
83
-
84
- const filterReset = () => {
85
- setSelectedPlaces([]);
86
- setSelectedListItem(null);
87
- setLocation(null);
88
- setZoom(8);
89
- setMapInteracted(false);
90
- };
91
-
92
- useEffect(() => {
93
- if (resetFilters === true) {
94
- filterReset();
95
- }
96
- }, [resetFilters]);
97
-
98
- const selectLocationEntity = (location: LatLng) => {
99
- localStorage.removeItem("selectedListItem");
100
- setTimeout(() => setLocation(location), 200);
101
- setSelectedListItem(null);
102
- };
103
-
104
- return (
105
- <MapContext.Provider
106
- value={{
107
- selectedListItem,
108
- setSelectedListItem,
109
- location,
110
- center,
111
- setCenter,
112
- zoom,
113
- setZoom,
114
- selectItem,
115
- setSelectedPlaces,
116
- selectedPlaces,
117
- selectLocationEntity,
118
- setLocation,
119
- setMapInteracted,
120
- mapInteracted,
121
- userSetZoom,
122
- firstLoadListItem,
123
- filterReset
124
- }}
125
- >
126
- {children}
127
- </MapContext.Provider>
128
- );
129
- };