@abcagency/hc-ui-components 1.2.8 → 1.2.9

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 (132) hide show
  1. package/dist/_virtual/_rollupPluginBabelHelpers.js +516 -516
  2. package/dist/apis/hcApi.js +189 -189
  3. package/dist/apis/hcApi.js.map +1 -1
  4. package/dist/clientToken.js +10 -10
  5. package/dist/clientToken.js.map +1 -1
  6. package/dist/components/HireControlMap.js +135 -135
  7. package/dist/components/HireControlMap.js.map +1 -1
  8. package/dist/components/modules/accordions/MapAccordionItem.js +76 -76
  9. package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
  10. package/dist/components/modules/accordions/default.js +108 -108
  11. package/dist/components/modules/accordions/default.js.map +1 -1
  12. package/dist/components/modules/accordions/filterItem.js +50 -50
  13. package/dist/components/modules/accordions/filterItem.js.map +1 -1
  14. package/dist/components/modules/accordions/filters.js +46 -46
  15. package/dist/components/modules/accordions/filters.js.map +1 -1
  16. package/dist/components/modules/buttons/button-group-apply.js +87 -87
  17. package/dist/components/modules/buttons/button-group-apply.js.map +1 -1
  18. package/dist/components/modules/buttons/commute-pill.js +18 -18
  19. package/dist/components/modules/buttons/commute-pill.js.map +1 -1
  20. package/dist/components/modules/buttons/default.js +145 -145
  21. package/dist/components/modules/buttons/default.js.map +1 -1
  22. package/dist/components/modules/buttons/items-pill.js +23 -23
  23. package/dist/components/modules/buttons/items-pill.js.map +1 -1
  24. package/dist/components/modules/buttons/pill-wrapper.js +20 -20
  25. package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
  26. package/dist/components/modules/buttons/show-all-button.js +39 -39
  27. package/dist/components/modules/buttons/show-all-button.js.map +1 -1
  28. package/dist/components/modules/cards/default.js +102 -102
  29. package/dist/components/modules/cards/default.js.map +1 -1
  30. package/dist/components/modules/cards/filter.js +38 -38
  31. package/dist/components/modules/cards/filter.js.map +1 -1
  32. package/dist/components/modules/dialogs/apply-dialog.js +46 -46
  33. package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
  34. package/dist/components/modules/filter/commute.js +184 -184
  35. package/dist/components/modules/filter/commute.js.map +1 -1
  36. package/dist/components/modules/filter/index.js +79 -79
  37. package/dist/components/modules/filter/index.js.map +1 -1
  38. package/dist/components/modules/filter/item.js +71 -71
  39. package/dist/components/modules/filter/item.js.map +1 -1
  40. package/dist/components/modules/filter/location.js +68 -68
  41. package/dist/components/modules/filter/location.js.map +1 -1
  42. package/dist/components/modules/filter/points-of-interest.js +38 -38
  43. package/dist/components/modules/filter/points-of-interest.js.map +1 -1
  44. package/dist/components/modules/filter/radio-item.js +46 -46
  45. package/dist/components/modules/filter/radio-item.js.map +1 -1
  46. package/dist/components/modules/filter/search.js +83 -83
  47. package/dist/components/modules/filter/search.js.map +1 -1
  48. package/dist/components/modules/filter/sort.js +93 -93
  49. package/dist/components/modules/filter/sort.js.map +1 -1
  50. package/dist/components/modules/grid.js +39 -39
  51. package/dist/components/modules/grid.js.map +1 -1
  52. package/dist/components/modules/icon.js +23 -23
  53. package/dist/components/modules/icon.js.map +1 -1
  54. package/dist/components/modules/jobListing/listing-details.js +71 -71
  55. package/dist/components/modules/jobListing/listing-details.js.map +1 -1
  56. package/dist/components/modules/maps/info-window-card.js +14 -14
  57. package/dist/components/modules/maps/info-window-card.js.map +1 -1
  58. package/dist/components/modules/maps/info-window-content.js +49 -39
  59. package/dist/components/modules/maps/info-window-content.js.map +1 -1
  60. package/dist/components/modules/maps/list/field-mapper.js +88 -88
  61. package/dist/components/modules/maps/list/field-mapper.js.map +1 -1
  62. package/dist/components/modules/maps/list/header-item.js +59 -59
  63. package/dist/components/modules/maps/list/header-item.js.map +1 -1
  64. package/dist/components/modules/maps/list/header.js +37 -37
  65. package/dist/components/modules/maps/list/header.js.map +1 -1
  66. package/dist/components/modules/maps/list/index.js +93 -93
  67. package/dist/components/modules/maps/list/index.js.map +1 -1
  68. package/dist/components/modules/maps/list/item-expand-card/index.js +16 -16
  69. package/dist/components/modules/maps/list/item-expand-card/index.js.map +1 -1
  70. package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js +38 -38
  71. package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js.map +1 -1
  72. package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js +40 -40
  73. package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js.map +1 -1
  74. package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js +20 -20
  75. package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js.map +1 -1
  76. package/dist/components/modules/maps/list/list-item/index.js +98 -98
  77. package/dist/components/modules/maps/list/list-item/index.js.map +1 -1
  78. package/dist/components/modules/maps/map-list.js +57 -57
  79. package/dist/components/modules/maps/map-list.js.map +1 -1
  80. package/dist/components/modules/maps/map-marker.js +85 -85
  81. package/dist/components/modules/maps/map-marker.js.map +1 -1
  82. package/dist/components/modules/maps/map.js +201 -201
  83. package/dist/components/modules/maps/map.js.map +1 -1
  84. package/dist/components/modules/maps/place-marker.js +37 -37
  85. package/dist/components/modules/maps/place-marker.js.map +1 -1
  86. package/dist/components/modules/maps/tabs.js +84 -84
  87. package/dist/components/modules/maps/tabs.js.map +1 -1
  88. package/dist/constants/placeTypes.js +11 -11
  89. package/dist/constants/placeTypes.js.map +1 -1
  90. package/dist/contexts/mapContext.js +133 -133
  91. package/dist/contexts/mapContext.js.map +1 -1
  92. package/dist/contexts/mapListContext.js +280 -280
  93. package/dist/contexts/mapListContext.js.map +1 -1
  94. package/dist/contexts/placesContext.js +152 -152
  95. package/dist/contexts/placesContext.js.map +1 -1
  96. package/dist/hooks/useList.js +119 -119
  97. package/dist/hooks/useList.js.map +1 -1
  98. package/dist/index.js +2 -2
  99. package/dist/services/_virtual/_rollupPluginBabelHelpers.js +372 -372
  100. package/dist/services/apis/hcApi.js +189 -189
  101. package/dist/services/apis/hcApi.js.map +1 -1
  102. package/dist/services/clientToken.js +7 -7
  103. package/dist/services/clientToken.js.map +1 -1
  104. package/dist/services/configService.js +33 -33
  105. package/dist/services/configService.js.map +1 -1
  106. package/dist/services/googlePlacesNearbyService.js +61 -61
  107. package/dist/services/googlePlacesNearbyService.js.map +1 -1
  108. package/dist/services/listingAggregatorService.js +56 -56
  109. package/dist/services/listingAggregatorService.js.map +1 -1
  110. package/dist/services/listingEntityService.js +36 -36
  111. package/dist/services/listingEntityService.js.map +1 -1
  112. package/dist/services/listingService.js +64 -64
  113. package/dist/services/listingService.js.map +1 -1
  114. package/dist/services/recruiterService.js +36 -36
  115. package/dist/services/recruiterService.js.map +1 -1
  116. package/dist/services/styles/index.css +2 -2
  117. package/dist/styles/index.css +2 -2
  118. package/dist/util/filterUtil.js +213 -213
  119. package/dist/util/filterUtil.js.map +1 -1
  120. package/dist/util/loading.js +16 -16
  121. package/dist/util/loading.js.map +1 -1
  122. package/dist/util/localStorageUtil.js +32 -32
  123. package/dist/util/localStorageUtil.js.map +1 -1
  124. package/dist/util/mapIconUtil.js +73 -73
  125. package/dist/util/mapIconUtil.js.map +1 -1
  126. package/dist/util/mapUtil.js +76 -76
  127. package/dist/util/mapUtil.js.map +1 -1
  128. package/dist/util/sortUtil.js +33 -33
  129. package/dist/util/sortUtil.js.map +1 -1
  130. package/dist/util/stringUtils.js +9 -9
  131. package/dist/util/stringUtils.js.map +1 -1
  132. package/package.json +1 -1
@@ -1,201 +1,201 @@
1
- import React, { useRef, useEffect } from 'react';
2
- import { GoogleMap, MarkerClustererF } from '@react-google-maps/api';
3
- import MapMarker from './map-marker.js';
4
- import PlaceMarker from './place-marker.js';
5
- import ShowAllButton from '../buttons/show-all-button.js';
6
- import { usePlaces } from '../../../contexts/placesContext.js';
7
- import { useMap } from '../../../contexts/mapContext.js';
8
- import { useMapList } from '../../../contexts/mapListContext.js';
9
- import { pinIcon, markerIcon, markerIconSelected } from '../../../util/mapIconUtil.js';
10
- import { clusterOptions } from '../../../util/mapUtil.js';
11
-
12
- var Map = function Map(_ref) {
13
- var markerConfigs = _ref.markerConfigs,
14
- infoWindowClasses = _ref.infoWindowClasses,
15
- _ref$clusterGridSize = _ref.clusterGridSize,
16
- clusterGridSize = _ref$clusterGridSize === void 0 ? 60 : _ref$clusterGridSize;
17
- var _useMap = useMap(),
18
- location = _useMap.location,
19
- zoom = _useMap.zoom,
20
- center = _useMap.center;
21
- _useMap.commuteLocation;
22
- var selectLocationEntity = _useMap.selectLocationEntity,
23
- setLocation = _useMap.setLocation,
24
- mapInteracted = _useMap.mapInteracted,
25
- setMapInteracted = _useMap.setMapInteracted;
26
- var _useMapList = useMapList(),
27
- mapItems = _useMapList.mapItems;
28
- _useMapList.handleFilterListingsByLocation;
29
- var filteredListings = _useMapList.filteredListings,
30
- setSelectedFilters = _useMapList.setSelectedFilters,
31
- setQuery = _useMapList.setQuery;
32
- var mapRef = useRef();
33
- var markerRefs = useRef({});
34
- var mapContainerRef = useRef(null);
35
- var _usePlaces = usePlaces(),
36
- poiMarkers = _usePlaces.poiMarkers,
37
- setCurrentCenter = _usePlaces.setCurrentCenter,
38
- currentCenter = _usePlaces.currentCenter,
39
- setCurrentZoom = _usePlaces.setCurrentZoom,
40
- currentZoom = _usePlaces.currentZoom,
41
- selectedPlaceMarker = _usePlaces.selectedPlaceMarker,
42
- setSelectedPlaceMarker = _usePlaces.setSelectedPlaceMarker,
43
- placesWindow = _usePlaces.placesWindow,
44
- setPlacesWindow = _usePlaces.setPlacesWindow;
45
- var onIdle = function onIdle() {
46
- if (!currentCenter || !mapRef.current) return;
47
- var newCenter = mapRef.current.getCenter().toJSON();
48
- var newZoom = mapRef.current.zoom;
49
- setCurrentCenter(newCenter);
50
- if (newZoom != currentZoom) {
51
- setCurrentZoom(newZoom);
52
- }
53
- };
54
- useEffect(function () {
55
- if (mapContainerRef.current) {
56
- var handleScroll = function handleScroll() {
57
- setMapInteracted(true);
58
- };
59
- var mapContainerRefCurrent = mapContainerRef.current;
60
- mapContainerRef.current.addEventListener('wheel', handleScroll);
61
- return function () {
62
- return mapContainerRefCurrent.removeEventListener('wheel', handleScroll);
63
- };
64
- }
65
- }, [mapContainerRef.current]);
66
- useEffect(function () {
67
- if (mapRef.current) {
68
- var mapInstance = mapRef.current;
69
- var dragStartListener = mapInstance.addListener('dragstart', function () {
70
- return setMapInteracted(true);
71
- });
72
- var mouseDownListener = mapInstance.addListener('mousedown', function () {
73
- return setMapInteracted(true);
74
- });
75
- return function () {
76
- google.maps.event.removeListener(dragStartListener);
77
- google.maps.event.removeListener(mouseDownListener);
78
- };
79
- }
80
- }, [mapRef.current, mapContainerRef.current]);
81
- useEffect(function () {
82
- if ((mapItems && mapItems.length > 0 || poiMarkers.length > 0) && mapRef.current) {
83
- fitBounds(mapRef.current);
84
- }
85
- }, [mapItems, mapRef.current, location]);
86
- useEffect(function () {
87
- if (mapItems && mapItems.length > 0 || poiMarkers.length > 0 && mapRef.current && mapInteracted) {
88
- fitBounds(mapRef.current, true);
89
- }
90
- if (mapRef.current) {
91
- var currZoom = mapRef.current.zoom;
92
- var setZoomVal = currZoom < 13 ? currZoom : 12;
93
- mapRef.current.setZoom(setZoomVal);
94
- }
95
- }, [filteredListings]);
96
- useEffect(function () {
97
- if (!mapRef.current || !location || mapInteracted) return;
98
- mapRef.current.panTo(new google.maps.LatLng(location.latitude, location.longitude));
99
- if (mapRef.current) {
100
- var setZoomVal = zoom < 13 ? zoom : 12;
101
- mapRef.current.setZoom(setZoomVal);
102
- }
103
- }, [location, zoom, mapRef.current]);
104
- var fitBounds = function fitBounds(map) {
105
- var overload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
106
- if ((mapInteracted === false || overload) && mapItems != null) {
107
- var bounds = new window.google.maps.LatLngBounds();
108
- mapItems.forEach(function (item) {
109
- bounds.extend(new google.maps.LatLng(item.latitude, item.longitude));
110
- });
111
- if (!map) return;
112
- map.fitBounds(bounds);
113
- }
114
- if (mapRef.current.zoom > 17) {
115
- mapRef.current.setZoom(16);
116
- }
117
- };
118
- var markerClickHandler = function markerClickHandler(mapLocation) {
119
- setMapInteracted(true);
120
- selectLocationEntity(mapLocation);
121
- };
122
- var onLoad = function onLoad(map) {
123
- if (!location || location === null) {
124
- mapRef.current = map;
125
- fitBounds(map, true);
126
- return;
127
- }
128
- mapRef.current = map;
129
- if (mapInteracted === false) {
130
- mapRef.current.panTo(new google.maps.LatLng(location.latitude, location.longitude));
131
- mapRef.current.setZoom(zoom);
132
- }
133
- };
134
- var pinIconUrl = pinIcon({
135
- fillColor: markerConfigs.fillColor,
136
- strokeColor: markerConfigs.strokeColor
137
- });
138
- return /*#__PURE__*/React.createElement(React.Fragment, null, zoom && center && /*#__PURE__*/React.createElement("div", {
139
- ref: mapContainerRef,
140
- className: "hc-h-full hc-relative"
141
- }, /*#__PURE__*/React.createElement(GoogleMap, {
142
- zoom: zoom,
143
- onLoad: onLoad,
144
- onIdle: onIdle,
145
- center: center,
146
- mapContainerStyle: {
147
- width: "100%",
148
- height: "100%"
149
- },
150
- options: {
151
- styles: [{
152
- featureType: "poi",
153
- elementType: "labels",
154
- stylers: [{
155
- visibility: "off"
156
- }]
157
- }]
158
- }
159
- }, /*#__PURE__*/React.createElement(MarkerClustererF, {
160
- options: clusterOptions(clusterGridSize, markerConfigs.fillColor)
161
- }, function (clusterer) {
162
- return /*#__PURE__*/React.createElement(React.Fragment, null, mapItems.map(function (item) {
163
- return /*#__PURE__*/React.createElement(MapMarker, {
164
- key: item.id,
165
- item: item,
166
- selectedLocation: location,
167
- markerRefs: markerRefs,
168
- infoWindowClasses: infoWindowClasses,
169
- setSelectedLocation: setLocation,
170
- markerClickHandler: markerClickHandler,
171
- clusterer: clusterer,
172
- markerIcon: markerIcon(markerConfigs),
173
- markerIconSelected: markerIconSelected(markerConfigs),
174
- setMapInteracted: setMapInteracted
175
- });
176
- }), poiMarkers && poiMarkers.markers.map(function (marker, index) {
177
- return /*#__PURE__*/React.createElement(PlaceMarker, {
178
- key: "marker-".concat(marker.title, "-").concat(index),
179
- marker: marker,
180
- index: index,
181
- selectedPlaceMarker: selectedPlaceMarker,
182
- placesWindow: placesWindow,
183
- setPlacesWindow: setPlacesWindow,
184
- setSelectedPlaceMarker: setSelectedPlaceMarker
185
- });
186
- }));
187
- })), mapInteracted && markerConfigs && /*#__PURE__*/React.createElement(ShowAllButton, {
188
- mapInteracted: mapInteracted,
189
- markerConfigs: markerConfigs,
190
- setMapInteracted: setMapInteracted,
191
- fitBounds: fitBounds,
192
- mapRef: mapRef,
193
- pinIconUrl: pinIconUrl,
194
- setQuery: setQuery,
195
- listingCount: filteredListings.length,
196
- setSelectedFilters: setSelectedFilters
197
- })));
198
- };
199
-
200
- export { Map as default };
201
- //# sourceMappingURL=map.js.map
1
+ import React, { useRef, useEffect } from 'react';
2
+ import { GoogleMap, MarkerClustererF } from '@react-google-maps/api';
3
+ import MapMarker from './map-marker.js';
4
+ import PlaceMarker from './place-marker.js';
5
+ import ShowAllButton from '../buttons/show-all-button.js';
6
+ import { usePlaces } from '../../../contexts/placesContext.js';
7
+ import { useMap } from '../../../contexts/mapContext.js';
8
+ import { useMapList } from '../../../contexts/mapListContext.js';
9
+ import { pinIcon, markerIcon, markerIconSelected } from '../../../util/mapIconUtil.js';
10
+ import { clusterOptions } from '../../../util/mapUtil.js';
11
+
12
+ var Map = function Map(_ref) {
13
+ var markerConfigs = _ref.markerConfigs,
14
+ infoWindowClasses = _ref.infoWindowClasses,
15
+ _ref$clusterGridSize = _ref.clusterGridSize,
16
+ clusterGridSize = _ref$clusterGridSize === void 0 ? 60 : _ref$clusterGridSize;
17
+ var _useMap = useMap(),
18
+ location = _useMap.location,
19
+ zoom = _useMap.zoom,
20
+ center = _useMap.center;
21
+ _useMap.commuteLocation;
22
+ var selectLocationEntity = _useMap.selectLocationEntity,
23
+ setLocation = _useMap.setLocation,
24
+ mapInteracted = _useMap.mapInteracted,
25
+ setMapInteracted = _useMap.setMapInteracted;
26
+ var _useMapList = useMapList(),
27
+ mapItems = _useMapList.mapItems;
28
+ _useMapList.handleFilterListingsByLocation;
29
+ var filteredListings = _useMapList.filteredListings,
30
+ setSelectedFilters = _useMapList.setSelectedFilters,
31
+ setQuery = _useMapList.setQuery;
32
+ var mapRef = useRef();
33
+ var markerRefs = useRef({});
34
+ var mapContainerRef = useRef(null);
35
+ var _usePlaces = usePlaces(),
36
+ poiMarkers = _usePlaces.poiMarkers,
37
+ setCurrentCenter = _usePlaces.setCurrentCenter,
38
+ currentCenter = _usePlaces.currentCenter,
39
+ setCurrentZoom = _usePlaces.setCurrentZoom,
40
+ currentZoom = _usePlaces.currentZoom,
41
+ selectedPlaceMarker = _usePlaces.selectedPlaceMarker,
42
+ setSelectedPlaceMarker = _usePlaces.setSelectedPlaceMarker,
43
+ placesWindow = _usePlaces.placesWindow,
44
+ setPlacesWindow = _usePlaces.setPlacesWindow;
45
+ var onIdle = function onIdle() {
46
+ if (!currentCenter || !mapRef.current) return;
47
+ var newCenter = mapRef.current.getCenter().toJSON();
48
+ var newZoom = mapRef.current.zoom;
49
+ setCurrentCenter(newCenter);
50
+ if (newZoom != currentZoom) {
51
+ setCurrentZoom(newZoom);
52
+ }
53
+ };
54
+ useEffect(function () {
55
+ if (mapContainerRef.current) {
56
+ var handleScroll = function handleScroll() {
57
+ setMapInteracted(true);
58
+ };
59
+ var mapContainerRefCurrent = mapContainerRef.current;
60
+ mapContainerRef.current.addEventListener('wheel', handleScroll);
61
+ return function () {
62
+ return mapContainerRefCurrent.removeEventListener('wheel', handleScroll);
63
+ };
64
+ }
65
+ }, [mapContainerRef.current]);
66
+ useEffect(function () {
67
+ if (mapRef.current) {
68
+ var mapInstance = mapRef.current;
69
+ var dragStartListener = mapInstance.addListener('dragstart', function () {
70
+ return setMapInteracted(true);
71
+ });
72
+ var mouseDownListener = mapInstance.addListener('mousedown', function () {
73
+ return setMapInteracted(true);
74
+ });
75
+ return function () {
76
+ google.maps.event.removeListener(dragStartListener);
77
+ google.maps.event.removeListener(mouseDownListener);
78
+ };
79
+ }
80
+ }, [mapRef.current, mapContainerRef.current]);
81
+ useEffect(function () {
82
+ if ((mapItems && mapItems.length > 0 || poiMarkers.length > 0) && mapRef.current) {
83
+ fitBounds(mapRef.current);
84
+ }
85
+ }, [mapItems, mapRef.current, location]);
86
+ useEffect(function () {
87
+ if (mapItems && mapItems.length > 0 || poiMarkers.length > 0 && mapRef.current && mapInteracted) {
88
+ fitBounds(mapRef.current, true);
89
+ }
90
+ if (mapRef.current) {
91
+ var currZoom = mapRef.current.zoom;
92
+ var setZoomVal = currZoom < 13 ? currZoom : 12;
93
+ mapRef.current.setZoom(setZoomVal);
94
+ }
95
+ }, [filteredListings]);
96
+ useEffect(function () {
97
+ if (!mapRef.current || !location || mapInteracted) return;
98
+ mapRef.current.panTo(new google.maps.LatLng(location.latitude, location.longitude));
99
+ if (mapRef.current) {
100
+ var setZoomVal = zoom < 13 ? zoom : 12;
101
+ mapRef.current.setZoom(setZoomVal);
102
+ }
103
+ }, [location, zoom, mapRef.current]);
104
+ var fitBounds = function fitBounds(map) {
105
+ var overload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
106
+ if ((mapInteracted === false || overload) && mapItems != null) {
107
+ var bounds = new window.google.maps.LatLngBounds();
108
+ mapItems.forEach(function (item) {
109
+ bounds.extend(new google.maps.LatLng(item.latitude, item.longitude));
110
+ });
111
+ if (!map) return;
112
+ map.fitBounds(bounds);
113
+ }
114
+ if (mapRef.current.zoom > 17) {
115
+ mapRef.current.setZoom(16);
116
+ }
117
+ };
118
+ var markerClickHandler = function markerClickHandler(mapLocation) {
119
+ setMapInteracted(true);
120
+ selectLocationEntity(mapLocation);
121
+ };
122
+ var onLoad = function onLoad(map) {
123
+ if (!location || location === null) {
124
+ mapRef.current = map;
125
+ fitBounds(map, true);
126
+ return;
127
+ }
128
+ mapRef.current = map;
129
+ if (mapInteracted === false) {
130
+ mapRef.current.panTo(new google.maps.LatLng(location.latitude, location.longitude));
131
+ mapRef.current.setZoom(zoom);
132
+ }
133
+ };
134
+ var pinIconUrl = pinIcon({
135
+ fillColor: markerConfigs.fillColor,
136
+ strokeColor: markerConfigs.strokeColor
137
+ });
138
+ return /*#__PURE__*/React.createElement(React.Fragment, null, zoom && center && /*#__PURE__*/React.createElement("div", {
139
+ ref: mapContainerRef,
140
+ className: "hc-h-full hc-relative"
141
+ }, /*#__PURE__*/React.createElement(GoogleMap, {
142
+ zoom: zoom,
143
+ onLoad: onLoad,
144
+ onIdle: onIdle,
145
+ center: center,
146
+ mapContainerStyle: {
147
+ width: "100%",
148
+ height: "100%"
149
+ },
150
+ options: {
151
+ styles: [{
152
+ featureType: "poi",
153
+ elementType: "labels",
154
+ stylers: [{
155
+ visibility: "off"
156
+ }]
157
+ }]
158
+ }
159
+ }, /*#__PURE__*/React.createElement(MarkerClustererF, {
160
+ options: clusterOptions(clusterGridSize, markerConfigs.fillColor)
161
+ }, function (clusterer) {
162
+ return /*#__PURE__*/React.createElement(React.Fragment, null, mapItems.map(function (item) {
163
+ return /*#__PURE__*/React.createElement(MapMarker, {
164
+ key: item.id,
165
+ item: item,
166
+ selectedLocation: location,
167
+ markerRefs: markerRefs,
168
+ infoWindowClasses: infoWindowClasses,
169
+ setSelectedLocation: setLocation,
170
+ markerClickHandler: markerClickHandler,
171
+ clusterer: clusterer,
172
+ markerIcon: markerIcon(markerConfigs),
173
+ markerIconSelected: markerIconSelected(markerConfigs),
174
+ setMapInteracted: setMapInteracted
175
+ });
176
+ }), poiMarkers && poiMarkers.markers.map(function (marker, index) {
177
+ return /*#__PURE__*/React.createElement(PlaceMarker, {
178
+ key: "marker-".concat(marker.title, "-").concat(index),
179
+ marker: marker,
180
+ index: index,
181
+ selectedPlaceMarker: selectedPlaceMarker,
182
+ placesWindow: placesWindow,
183
+ setPlacesWindow: setPlacesWindow,
184
+ setSelectedPlaceMarker: setSelectedPlaceMarker
185
+ });
186
+ }));
187
+ })), mapInteracted && markerConfigs && /*#__PURE__*/React.createElement(ShowAllButton, {
188
+ mapInteracted: mapInteracted,
189
+ markerConfigs: markerConfigs,
190
+ setMapInteracted: setMapInteracted,
191
+ fitBounds: fitBounds,
192
+ mapRef: mapRef,
193
+ pinIconUrl: pinIconUrl,
194
+ setQuery: setQuery,
195
+ listingCount: filteredListings.length,
196
+ setSelectedFilters: setSelectedFilters
197
+ })));
198
+ };
199
+
200
+ export { Map as default };
201
+ //# sourceMappingURL=map.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"map.js","sources":["../../../../src/components/modules/maps/map.js"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { GoogleMap, MarkerClustererF } from \"@react-google-maps/api\";\n\nimport MapMarker from \"~/components/modules/maps/map-marker\";\nimport PlaceMarker from \"~/components/modules/maps/place-marker\";\nimport ShowAllButton from \"~/components/modules/buttons/show-all-button\";\n\nimport { usePlaces } from \"~/contexts/placesContext\";\nimport { useMap } from \"~/contexts/mapContext\";\nimport { useMapList } from \"~/contexts/mapListContext\";\n\nimport { markerIconSelected, markerIcon, pinIcon } from \"~/util/mapIconUtil\";\nimport { clusterOptions } from \"~/util/mapUtil\";\n\nconst Map = ({\n\tmarkerConfigs,\n\tinfoWindowClasses,\n\tclusterGridSize = 60\n}) => {\n\tconst {\n\t\tlocation,\n\t\tzoom,\n\t\tcenter,\n\t\tcommuteLocation,\n\t\tselectLocationEntity,\n\t\tsetLocation,\n\t\tmapInteracted,\n\t\tsetMapInteracted\n\t} = useMap();\n\n\tconst {\n\t\tmapItems, handleFilterListingsByLocation, filteredListings, setSelectedFilters,\n\t\tsetQuery\n\t} = useMapList();\n\n\tconst mapRef = useRef();\n\tconst markerRefs = useRef({});\n\tconst mapContainerRef = useRef(null);\n\tconst {\n\t\tpoiMarkers,\n\t\tsetCurrentCenter,\n\t\tcurrentCenter,\n\t\tsetCurrentZoom,\n\t\tcurrentZoom,\n\t\tselectedPlaceMarker,\n\t\tsetSelectedPlaceMarker,\n\t\tplacesWindow,\n\t\tsetPlacesWindow } = usePlaces();\n\n\tconst onIdle = () => {\n\t\tif (!currentCenter || !mapRef.current) return;\n\t\tconst newCenter = mapRef.current.getCenter().toJSON();\n\t\tconst newZoom = mapRef.current.zoom;\n\n\t\tsetCurrentCenter(newCenter);\n\n\t\tif (newZoom != currentZoom) {\n\t\t\tsetCurrentZoom(newZoom);\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (mapContainerRef.current) {\n\t\t\tconst handleScroll = () => {\n\t\t\t\tsetMapInteracted(true);\n\t\t\t};\n\t\t\tvar mapContainerRefCurrent = mapContainerRef.current;\n\t\t\tmapContainerRef.current.addEventListener('wheel', handleScroll);\n\t\t\treturn () => mapContainerRefCurrent.removeEventListener('wheel', handleScroll);\n\t\t}\n\t}, [mapContainerRef.current]);\n\n\tuseEffect(() => {\n\t\tif (mapRef.current) {\n\t\t\tconst mapInstance = mapRef.current;\n\t\t\tconst dragStartListener = mapInstance.addListener('dragstart', () => setMapInteracted(true));\n\t\t\tconst mouseDownListener = mapInstance.addListener('mousedown', () => setMapInteracted(true));\n\t\t\treturn () => {\n\t\t\t\tgoogle.maps.event.removeListener(dragStartListener);\n\t\t\t\tgoogle.maps.event.removeListener(mouseDownListener);\n\t\t\t};\n\t\t}\n\t}, [mapRef.current, mapContainerRef.current]);\n\n\tuseEffect(() => {\n\t\tif ((mapItems && mapItems.length > 0 || poiMarkers.length > 0) && mapRef.current) {\n\t\t\tfitBounds(mapRef.current);\n\t\t}\n\t}, [mapItems, mapRef.current, location]);\n\n\tuseEffect(() => {\n\t\tif (mapItems && mapItems.length > 0 || poiMarkers.length > 0 && mapRef.current && mapInteracted) {\n\t\t\tfitBounds(mapRef.current, true);\n\t\t}\n\t\tif (mapRef.current) {\n\t\t\tlet currZoom = mapRef.current.zoom;\n\t\t\tlet setZoomVal = currZoom < 13 ? currZoom : 12;\n\t\t\tmapRef.current.setZoom(setZoomVal);\n\t\t}\n\t}, [filteredListings]);\n\n\tuseEffect(() => {\n\t\tif (!mapRef.current || !location || mapInteracted) return;\n\t\tmapRef.current.panTo(\n\t\t\tnew google.maps.LatLng(location.latitude, location.longitude),\n\t\t);\n\t\tif (mapRef.current) {\n\t\t\tlet setZoomVal = zoom < 13 ? zoom : 12;\n\t\t\tmapRef.current.setZoom(setZoomVal);\n\t\t}\n\t}, [location, zoom, mapRef.current]);\n\n\tconst fitBounds = (map, overload = false) => {\n\t\tif ((mapInteracted === false || overload) && mapItems != null) {\n\t\t\tconst bounds = new window.google.maps.LatLngBounds();\n\t\t\tmapItems.forEach(item => {\n\t\t\t\tbounds.extend(new google.maps.LatLng(item.latitude, item.longitude));\n\t\t\t});\n\t\t\tif (!map) return;\n\t\t\tmap.fitBounds(bounds);\n\t\t}\n\t\tif (mapRef.current.zoom > 17) {\n\t\t\tmapRef.current.setZoom(16);\n\t\t}\n\t};\n\n\tconst markerClickHandler = mapLocation => {\n\t\tsetMapInteracted(true);\n\t\tselectLocationEntity(mapLocation);\n\t};\n\n\tconst onLoad = map => {\n\t\tif (!location || location === null) {\n\t\t\tmapRef.current = map;\n\t\t\tfitBounds(map, true);\n\t\t\treturn;\n\t\t}\n\t\tmapRef.current = map;\n\n\t\tif (mapInteracted === false) {\n\t\t\tmapRef.current.panTo(\n\t\t\t\tnew google.maps.LatLng(location.latitude, location.longitude),\n\t\t\t);\n\n\t\t\tmapRef.current.setZoom(zoom);\n\t\t}\n\t};\n\n\tconst pinIconUrl = pinIcon({\n\t\tfillColor: markerConfigs.fillColor,\n\t\tstrokeColor: markerConfigs.strokeColor\n\t});\n\n\treturn (\n\t\t<>{zoom && center && <div ref={mapContainerRef} className=\"hc-h-full hc-relative\">\n\t\t\t<GoogleMap\n\t\t\t\tzoom={zoom}\n\t\t\t\tonLoad={onLoad}\n\t\t\t\tonIdle={onIdle}\n\t\t\t\tcenter={center}\n\t\t\t\tmapContainerStyle={{\n\t\t\t\t\twidth: \"100%\",\n\t\t\t\t\theight: \"100%\"\n\t\t\t\t}}\n\t\t\t\toptions={{\n\t\t\t\t\tstyles: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfeatureType: \"poi\",\n\t\t\t\t\t\t\telementType: \"labels\",\n\t\t\t\t\t\t\tstylers: [{ visibility: \"off\" }]\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<MarkerClustererF options={clusterOptions(clusterGridSize, markerConfigs.fillColor)}>\n\t\t\t\t\t{clusterer => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{mapItems.map(item => (\n\t\t\t\t\t\t\t\t<MapMarker\n\t\t\t\t\t\t\t\t\tkey={item.id}\n\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t\tselectedLocation={location}\n\t\t\t\t\t\t\t\t\tmarkerRefs={markerRefs}\n\t\t\t\t\t\t\t\t\tinfoWindowClasses={infoWindowClasses}\n\t\t\t\t\t\t\t\t\tsetSelectedLocation={setLocation}\n\t\t\t\t\t\t\t\t\tmarkerClickHandler={markerClickHandler}\n\t\t\t\t\t\t\t\t\tclusterer={clusterer}\n\t\t\t\t\t\t\t\t\tmarkerIcon={markerIcon(markerConfigs)}\n\t\t\t\t\t\t\t\t\tmarkerIconSelected={markerIconSelected(markerConfigs)}\n\t\t\t\t\t\t\t\t\tsetMapInteracted={setMapInteracted}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t{poiMarkers && poiMarkers.markers.map((marker, index) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<PlaceMarker\n\t\t\t\t\t\t\t\t\t\tkey={`marker-${marker.title}-${index}`}\n\t\t\t\t\t\t\t\t\t\tmarker={marker}\n\t\t\t\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\t\t\t\tselectedPlaceMarker={selectedPlaceMarker}\n\t\t\t\t\t\t\t\t\t\tplacesWindow={placesWindow}\n\t\t\t\t\t\t\t\t\t\tsetPlacesWindow={setPlacesWindow}\n\t\t\t\t\t\t\t\t\t\tsetSelectedPlaceMarker={setSelectedPlaceMarker}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</MarkerClustererF>\n\t\t\t</GoogleMap>\n\t\t\t{mapInteracted && markerConfigs && (\n\t\t\t\t<ShowAllButton\n\t\t\t\t\tmapInteracted={mapInteracted}\n\t\t\t\t\tmarkerConfigs={markerConfigs}\n\t\t\t\t\tsetMapInteracted={setMapInteracted}\n\t\t\t\t\tfitBounds={fitBounds}\n\t\t\t\t\tmapRef={mapRef}\n\t\t\t\t\tpinIconUrl={pinIconUrl}\n\t\t\t\t\tsetQuery={setQuery}\n\t\t\t\t\tlistingCount={filteredListings.length}\n\t\t\t\t\tsetSelectedFilters={setSelectedFilters}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t\t}\n\t\t</>\n\t);\n};\n\nexport default Map;\n"],"names":["Map","_ref","markerConfigs","infoWindowClasses","_ref$clusterGridSize","clusterGridSize","_useMap","useMap","location","zoom","center","commuteLocation","selectLocationEntity","setLocation","mapInteracted","setMapInteracted","_useMapList","useMapList","mapItems","handleFilterListingsByLocation","filteredListings","setSelectedFilters","setQuery","mapRef","useRef","markerRefs","mapContainerRef","_usePlaces","usePlaces","poiMarkers","setCurrentCenter","currentCenter","setCurrentZoom","currentZoom","selectedPlaceMarker","setSelectedPlaceMarker","placesWindow","setPlacesWindow","onIdle","current","newCenter","getCenter","toJSON","newZoom","useEffect","handleScroll","mapContainerRefCurrent","addEventListener","removeEventListener","mapInstance","dragStartListener","addListener","mouseDownListener","google","maps","event","removeListener","length","fitBounds","currZoom","setZoomVal","setZoom","panTo","LatLng","latitude","longitude","map","overload","arguments","undefined","bounds","window","LatLngBounds","forEach","item","extend","markerClickHandler","mapLocation","onLoad","pinIconUrl","pinIcon","fillColor","strokeColor","React","createElement","Fragment","ref","className","GoogleMap","mapContainerStyle","width","height","options","styles","featureType","elementType","stylers","visibility","MarkerClustererF","clusterOptions","clusterer","MapMarker","key","id","selectedLocation","setSelectedLocation","markerIcon","markerIconSelected","markers","marker","index","PlaceMarker","concat","title","ShowAllButton","listingCount"],"mappings":";;;;;;;;;;;AAcA,IAAMA,GAAG,GAAG,SAANA,GAAGA,CAAAC,IAAA,EAIH;AAAA,EAAA,IAHLC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,iBAAiB,GAAAF,IAAA,CAAjBE,iBAAiB;IAAAC,oBAAA,GAAAH,IAAA,CACjBI,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,oBAAA,CAAA;AAEpB,EAAA,IAAAE,OAAA,GASIC,MAAM,EAAE,CAAA;IARXC,QAAQ,GAAAF,OAAA,CAARE,QAAQ,CAAA;IACRC,IAAI,GAAAH,OAAA,CAAJG,IAAI,CAAA;IACJC,MAAM,GAAAJ,OAAA,CAANI,MAAM,CAAA;IACSJ,OAAA,CAAfK,eAAe,CAAA;QACfC,oBAAoB,GAAAN,OAAA,CAApBM,oBAAoB,CAAA;IACpBC,WAAW,GAAAP,OAAA,CAAXO,WAAW,CAAA;IACXC,aAAa,GAAAR,OAAA,CAAbQ,aAAa,CAAA;IACbC,gBAAgB,GAAAT,OAAA,CAAhBS,iBAAgB;AAGjB,EAAA,IAAAC,WAAA,GAGIC,UAAU,EAAE,CAAA;IAFfC,QAAQ,GAAAF,WAAA,CAARE,QAAQ,CAAA;IAAgCF,WAAA,CAA9BG,8BAA8B,CAAA;QAAEC,gBAAgB,GAAAJ,WAAA,CAAhBI,gBAAgB,CAAA;IAAEC,kBAAkB,GAAAL,WAAA,CAAlBK,kBAAkB,CAAA;IAC9EC,QAAQ,GAAAN,WAAA,CAARM,SAAQ;AAGT,EAAA,IAAMC,MAAM,GAAGC,MAAM,EAAE,CAAA;AACvB,EAAA,IAAMC,UAAU,GAAGD,MAAM,CAAC,EAAE,CAAC,CAAA;AAC7B,EAAA,IAAME,eAAe,GAAGF,MAAM,CAAC,IAA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AAAA,YAAY,EAAEA,YAAa;AAC3BC,QAAAA,eAAe,EAAEA,eAAgB;AACjCF,QAAAA,sBAAsB,EAAEA,sBAAAA;AAAuB,OAC/C,CAAC,CAAA;AAEJ,KAAC,CACA,CAAC,CAAA;GAEa,CACR,CAAC,EACXrB,aAAa,IAAIZ,aAAa,iBAC9BiF,KAAA,CAAAC,aAAA,CAAC8B,aAAa,EAAA;AACbpG,IAAAA,aAAa,EAAEA,aAAc;AAC7BZ,IAAAA,aAAa,EAAEA,aAAc;AAC7Ba,IAAAA,gBAAgB,EAAEA,gBAAiB;AACnC2C,IAAAA,SAAS,EAAEA,SAAU;AACrBnC,IAAAA,MAAM,EAAEA,MAAO;AACfwD,IAAAA,UAAU,EAAEA,UAAW;AACvBzD,IAAAA,QAAQ,EAAEA,QAAS;IACnB6F,YAAY,EAAE/F,gBAAgB,CAACqC,MAAO;AACtCpC,IAAAA,kBAAkB,EAAEA,kBAAAA;GACpB,CAEE,CAEH,CAAC,CAAA;AAEL;;;;"}
1
+ {"version":3,"file":"map.js","sources":["../../../../src/components/modules/maps/map.js"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\r\nimport { GoogleMap, MarkerClustererF } from \"@react-google-maps/api\";\r\n\r\nimport MapMarker from \"~/components/modules/maps/map-marker\";\r\nimport PlaceMarker from \"~/components/modules/maps/place-marker\";\r\nimport ShowAllButton from \"~/components/modules/buttons/show-all-button\";\r\n\r\nimport { usePlaces } from \"~/contexts/placesContext\";\r\nimport { useMap } from \"~/contexts/mapContext\";\r\nimport { useMapList } from \"~/contexts/mapListContext\";\r\n\r\nimport { markerIconSelected, markerIcon, pinIcon } from \"~/util/mapIconUtil\";\r\nimport { clusterOptions } from \"~/util/mapUtil\";\r\n\r\nconst Map = ({\r\n\tmarkerConfigs,\r\n\tinfoWindowClasses,\r\n\tclusterGridSize = 60\r\n}) => {\r\n\tconst {\r\n\t\tlocation,\r\n\t\tzoom,\r\n\t\tcenter,\r\n\t\tcommuteLocation,\r\n\t\tselectLocationEntity,\r\n\t\tsetLocation,\r\n\t\tmapInteracted,\r\n\t\tsetMapInteracted\r\n\t} = useMap();\r\n\r\n\tconst {\r\n\t\tmapItems, handleFilterListingsByLocation, filteredListings, setSelectedFilters,\r\n\t\tsetQuery\r\n\t} = useMapList();\r\n\r\n\tconst mapRef = useRef();\r\n\tconst markerRefs = useRef({});\r\n\tconst mapContainerRef = useRef(null);\r\n\tconst {\r\n\t\tpoiMarkers,\r\n\t\tsetCurrentCenter,\r\n\t\tcurrentCenter,\r\n\t\tsetCurrentZoom,\r\n\t\tcurrentZoom,\r\n\t\tselectedPlaceMarker,\r\n\t\tsetSelectedPlaceMarker,\r\n\t\tplacesWindow,\r\n\t\tsetPlacesWindow } = usePlaces();\r\n\r\n\tconst onIdle = () => {\r\n\t\tif (!currentCenter || !mapRef.current) return;\r\n\t\tconst newCenter = mapRef.current.getCenter().toJSON();\r\n\t\tconst newZoom = mapRef.current.zoom;\r\n\r\n\t\tsetCurrentCenter(newCenter);\r\n\r\n\t\tif (newZoom != currentZoom) {\r\n\t\t\tsetCurrentZoom(newZoom);\r\n\t\t}\r\n\t};\r\n\r\n\tuseEffect(() => {\r\n\t\tif (mapContainerRef.current) {\r\n\t\t\tconst handleScroll = () => {\r\n\t\t\t\tsetMapInteracted(true);\r\n\t\t\t};\r\n\t\t\tvar mapContainerRefCurrent = mapContainerRef.current;\r\n\t\t\tmapContainerRef.current.addEventListener('wheel', handleScroll);\r\n\t\t\treturn () => mapContainerRefCurrent.removeEventListener('wheel', handleScroll);\r\n\t\t}\r\n\t}, [mapContainerRef.current]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (mapRef.current) {\r\n\t\t\tconst mapInstance = mapRef.current;\r\n\t\t\tconst dragStartListener = mapInstance.addListener('dragstart', () => setMapInteracted(true));\r\n\t\t\tconst mouseDownListener = mapInstance.addListener('mousedown', () => setMapInteracted(true));\r\n\t\t\treturn () => {\r\n\t\t\t\tgoogle.maps.event.removeListener(dragStartListener);\r\n\t\t\t\tgoogle.maps.event.removeListener(mouseDownListener);\r\n\t\t\t};\r\n\t\t}\r\n\t}, [mapRef.current, mapContainerRef.current]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif ((mapItems && mapItems.length > 0 || poiMarkers.length > 0) && mapRef.current) {\r\n\t\t\tfitBounds(mapRef.current);\r\n\t\t}\r\n\t}, [mapItems, mapRef.current, location]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (mapItems && mapItems.length > 0 || poiMarkers.length > 0 && mapRef.current && mapInteracted) {\r\n\t\t\tfitBounds(mapRef.current, true);\r\n\t\t}\r\n\t\tif (mapRef.current) {\r\n\t\t\tlet currZoom = mapRef.current.zoom;\r\n\t\t\tlet setZoomVal = currZoom < 13 ? currZoom : 12;\r\n\t\t\tmapRef.current.setZoom(setZoomVal);\r\n\t\t}\r\n\t}, [filteredListings]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!mapRef.current || !location || mapInteracted) return;\r\n\t\tmapRef.current.panTo(\r\n\t\t\tnew google.maps.LatLng(location.latitude, location.longitude),\r\n\t\t);\r\n\t\tif (mapRef.current) {\r\n\t\t\tlet setZoomVal = zoom < 13 ? zoom : 12;\r\n\t\t\tmapRef.current.setZoom(setZoomVal);\r\n\t\t}\r\n\t}, [location, zoom, mapRef.current]);\r\n\r\n\tconst fitBounds = (map, overload = false) => {\r\n\t\tif ((mapInteracted === false || overload) && mapItems != null) {\r\n\t\t\tconst bounds = new window.google.maps.LatLngBounds();\r\n\t\t\tmapItems.forEach(item => {\r\n\t\t\t\tbounds.extend(new google.maps.LatLng(item.latitude, item.longitude));\r\n\t\t\t});\r\n\t\t\tif (!map) return;\r\n\t\t\tmap.fitBounds(bounds);\r\n\t\t}\r\n\t\tif (mapRef.current.zoom > 17) {\r\n\t\t\tmapRef.current.setZoom(16);\r\n\t\t}\r\n\t};\r\n\r\n\tconst markerClickHandler = mapLocation => {\r\n\t\tsetMapInteracted(true);\r\n\t\tselectLocationEntity(mapLocation);\r\n\t};\r\n\r\n\tconst onLoad = map => {\r\n\t\tif (!location || location === null) {\r\n\t\t\tmapRef.current = map;\r\n\t\t\tfitBounds(map, true);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tmapRef.current = map;\r\n\r\n\t\tif (mapInteracted === false) {\r\n\t\t\tmapRef.current.panTo(\r\n\t\t\t\tnew google.maps.LatLng(location.latitude, location.longitude),\r\n\t\t\t);\r\n\r\n\t\t\tmapRef.current.setZoom(zoom);\r\n\t\t}\r\n\t};\r\n\r\n\tconst pinIconUrl = pinIcon({\r\n\t\tfillColor: markerConfigs.fillColor,\r\n\t\tstrokeColor: markerConfigs.strokeColor\r\n\t});\r\n\r\n\treturn (\r\n\t\t<>{zoom && center && <div ref={mapContainerRef} className=\"hc-h-full hc-relative\">\r\n\t\t\t<GoogleMap\r\n\t\t\t\tzoom={zoom}\r\n\t\t\t\tonLoad={onLoad}\r\n\t\t\t\tonIdle={onIdle}\r\n\t\t\t\tcenter={center}\r\n\t\t\t\tmapContainerStyle={{\r\n\t\t\t\t\twidth: \"100%\",\r\n\t\t\t\t\theight: \"100%\"\r\n\t\t\t\t}}\r\n\t\t\t\toptions={{\r\n\t\t\t\t\tstyles: [\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfeatureType: \"poi\",\r\n\t\t\t\t\t\t\telementType: \"labels\",\r\n\t\t\t\t\t\t\tstylers: [{ visibility: \"off\" }]\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t]\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t<MarkerClustererF options={clusterOptions(clusterGridSize, markerConfigs.fillColor)}>\r\n\t\t\t\t\t{clusterer => (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t{mapItems.map(item => (\r\n\t\t\t\t\t\t\t\t<MapMarker\r\n\t\t\t\t\t\t\t\t\tkey={item.id}\r\n\t\t\t\t\t\t\t\t\titem={item}\r\n\t\t\t\t\t\t\t\t\tselectedLocation={location}\r\n\t\t\t\t\t\t\t\t\tmarkerRefs={markerRefs}\r\n\t\t\t\t\t\t\t\t\tinfoWindowClasses={infoWindowClasses}\r\n\t\t\t\t\t\t\t\t\tsetSelectedLocation={setLocation}\r\n\t\t\t\t\t\t\t\t\tmarkerClickHandler={markerClickHandler}\r\n\t\t\t\t\t\t\t\t\tclusterer={clusterer}\r\n\t\t\t\t\t\t\t\t\tmarkerIcon={markerIcon(markerConfigs)}\r\n\t\t\t\t\t\t\t\t\tmarkerIconSelected={markerIconSelected(markerConfigs)}\r\n\t\t\t\t\t\t\t\t\tsetMapInteracted={setMapInteracted}\r\n\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t))}\r\n\t\t\t\t\t\t\t{poiMarkers && poiMarkers.markers.map((marker, index) => {\r\n\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t<PlaceMarker\r\n\t\t\t\t\t\t\t\t\t\tkey={`marker-${marker.title}-${index}`}\r\n\t\t\t\t\t\t\t\t\t\tmarker={marker}\r\n\t\t\t\t\t\t\t\t\t\tindex={index}\r\n\t\t\t\t\t\t\t\t\t\tselectedPlaceMarker={selectedPlaceMarker}\r\n\t\t\t\t\t\t\t\t\t\tplacesWindow={placesWindow}\r\n\t\t\t\t\t\t\t\t\t\tsetPlacesWindow={setPlacesWindow}\r\n\t\t\t\t\t\t\t\t\t\tsetSelectedPlaceMarker={setSelectedPlaceMarker}\r\n\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t})}\r\n\t\t\t\t\t\t</>\r\n\t\t\t\t\t)}\r\n\t\t\t\t</MarkerClustererF>\r\n\t\t\t</GoogleMap>\r\n\t\t\t{mapInteracted && markerConfigs && (\r\n\t\t\t\t<ShowAllButton\r\n\t\t\t\t\tmapInteracted={mapInteracted}\r\n\t\t\t\t\tmarkerConfigs={markerConfigs}\r\n\t\t\t\t\tsetMapInteracted={setMapInteracted}\r\n\t\t\t\t\tfitBounds={fitBounds}\r\n\t\t\t\t\tmapRef={mapRef}\r\n\t\t\t\t\tpinIconUrl={pinIconUrl}\r\n\t\t\t\t\tsetQuery={setQuery}\r\n\t\t\t\t\tlistingCount={filteredListings.length}\r\n\t\t\t\t\tsetSelectedFilters={setSelectedFilters}\r\n\t\t\t\t/>\r\n\t\t\t)}\r\n\t\t</div>\r\n\t\t}\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nexport default Map;\r\n"],"names":["Map","_ref","markerConfigs","infoWindowClasses","_ref$clusterGridSize","clusterGridSize","_useMap","useMap","location","zoom","center","commuteLocation","selectLocationEntity","setLocation","mapInteracted","setMapInteracted","_useMapList","useMapList","mapItems","handleFilterListingsByLocation","filteredListings","setSelectedFilters","setQuery","mapRef","useRef","markerRefs","mapContainerRef","_usePlaces","usePlaces","poiMarkers","setCurrentCenter","currentCenter","setCurrentZoom","currentZoom","selectedPlaceMarker","setSelectedPlaceMarker","placesWindow","setPlacesWindow","onIdle","current","newCenter","getCenter","toJSON","newZoom","useEffect","handleScroll","mapContainerRefCurrent","addEventListener","removeEventListener","mapInstance","dragStartListener","addListener","mouseDownListener","google","maps","event","removeListener","length","fitBounds","currZoom","setZoomVal","setZoom","panTo","LatLng","latitude","longitude","map","overload","arguments","undefined","bounds","window","LatLngBounds","forEach","item","extend","markerClickHandler","mapLocation","onLoad","pinIconUrl","pinIcon","fillColor","strokeColor","React","createElement","Fragment","ref","className","GoogleMap","mapContainerStyle","width","height","options","styles","featureType","elementType","stylers","visibility","MarkerClustererF","clusterOptions","clusterer","MapMarker","key","id","selectedLocation","setSelectedLocation","markerIcon","markerIconSelected","markers","marker","index","PlaceMarker","concat","title","ShowAllButton","listingCount"],"mappings":";;;;;;;;;;;AAcA,IAAMA,GAAG,GAAG,SAANA,GAAGA,CAAAC,IAAA,EAIH;AAAA,EAAA,IAHLC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,iBAAiB,GAAAF,IAAA,CAAjBE,iBAAiB;IAAAC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,aAAa,EAAEA,aAAc;AAC7BZ,IAAAA,aAAa,EAAEA,aAAc;AAC7Ba,IAAAA,gBAAgB,EAAEA,gBAAiB;AACnC2C,IAAAA,SAAS,EAAEA,SAAU;AACrBnC,IAAAA,MAAM,EAAEA,MAAO;AACfwD,IAAAA,UAAU,EAAEA,UAAW;AACvBzD,IAAAA,QAAQ,EAAEA,QAAS;IACnB6F,YAAY,EAAE/F,gBAAgB,CAACqC,MAAO;AACtCpC,IAAAA,kBAAkB,EAAEA,kBAAAA;GACpB,CAEE,CAEH,CAAC,CAAA;AAEL;;;;"}
@@ -1,37 +1,37 @@
1
- import React from 'react';
2
- import { Marker, InfoWindowF } from '@react-google-maps/api';
3
-
4
- var PlaceMarker = function PlaceMarker(_ref) {
5
- var marker = _ref.marker,
6
- index = _ref.index,
7
- selectedPlaceMarker = _ref.selectedPlaceMarker,
8
- setSelectedPlaceMarker = _ref.setSelectedPlaceMarker,
9
- placesWindow = _ref.placesWindow,
10
- setPlacesWindow = _ref.setPlacesWindow;
11
- var markerKey = "marker-".concat(marker.title, "-").concat(index);
12
- var placeMarkerClickHandler = function placeMarkerClickHandler() {
13
- setSelectedPlaceMarker(markerKey);
14
- setPlacesWindow(true);
15
- };
16
- return /*#__PURE__*/React.createElement(Marker, {
17
- key: markerKey,
18
- position: marker.position,
19
- title: marker.title,
20
- icon: marker.icon,
21
- options: {
22
- optimized: false
23
- },
24
- onClick: placeMarkerClickHandler
25
- }, selectedPlaceMarker === markerKey && placesWindow && marker && /*#__PURE__*/React.createElement(InfoWindowF, {
26
- position: marker.position,
27
- onCloseClick: function onCloseClick() {
28
- return setPlacesWindow(false);
29
- },
30
- options: {
31
- maxWidth: 400
32
- }
33
- }, /*#__PURE__*/React.createElement("div", null, marker.title)));
34
- };
35
-
36
- export { PlaceMarker as default };
37
- //# sourceMappingURL=place-marker.js.map
1
+ import React from 'react';
2
+ import { Marker, InfoWindowF } from '@react-google-maps/api';
3
+
4
+ var PlaceMarker = function PlaceMarker(_ref) {
5
+ var marker = _ref.marker,
6
+ index = _ref.index,
7
+ selectedPlaceMarker = _ref.selectedPlaceMarker,
8
+ setSelectedPlaceMarker = _ref.setSelectedPlaceMarker,
9
+ placesWindow = _ref.placesWindow,
10
+ setPlacesWindow = _ref.setPlacesWindow;
11
+ var markerKey = "marker-".concat(marker.title, "-").concat(index);
12
+ var placeMarkerClickHandler = function placeMarkerClickHandler() {
13
+ setSelectedPlaceMarker(markerKey);
14
+ setPlacesWindow(true);
15
+ };
16
+ return /*#__PURE__*/React.createElement(Marker, {
17
+ key: markerKey,
18
+ position: marker.position,
19
+ title: marker.title,
20
+ icon: marker.icon,
21
+ options: {
22
+ optimized: false
23
+ },
24
+ onClick: placeMarkerClickHandler
25
+ }, selectedPlaceMarker === markerKey && placesWindow && marker && /*#__PURE__*/React.createElement(InfoWindowF, {
26
+ position: marker.position,
27
+ onCloseClick: function onCloseClick() {
28
+ return setPlacesWindow(false);
29
+ },
30
+ options: {
31
+ maxWidth: 400
32
+ }
33
+ }, /*#__PURE__*/React.createElement("div", null, marker.title)));
34
+ };
35
+
36
+ export { PlaceMarker as default };
37
+ //# sourceMappingURL=place-marker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"place-marker.js","sources":["../../../../src/components/modules/maps/place-marker.js"],"sourcesContent":["import React from 'react';\nimport { Marker, InfoWindowF } from '@react-google-maps/api';\n\nconst PlaceMarker = ({\n\tmarker,\n\tindex,\n\tselectedPlaceMarker,\n\tsetSelectedPlaceMarker,\n\tplacesWindow,\n\tsetPlacesWindow\n}) => {\n\tconst markerKey = `marker-${marker.title}-${index}`;\n\n\tconst placeMarkerClickHandler = () => {\n\t\tsetSelectedPlaceMarker(markerKey);\n\t\tsetPlacesWindow(true);\n\t};\n\n\treturn (\n\t\t<Marker\n\t\t\tkey={markerKey}\n\t\t\tposition={marker.position}\n\t\t\ttitle={marker.title}\n\t\t\ticon={marker.icon}\n\t\t\toptions={{ optimized: false }}\n\t\t\tonClick={placeMarkerClickHandler}\n\t\t>\n\t\t\t{selectedPlaceMarker === markerKey && placesWindow && marker && (\n\t\t\t\t<InfoWindowF\n\t\t\t\t\tposition={marker.position}\n\t\t\t\t\tonCloseClick={() => setPlacesWindow(false)}\n\t\t\t\t\toptions={{ maxWidth: 400 }}\n\t\t\t\t>\n\t\t\t\t\t<div>{marker.title}</div>\n\t\t\t\t</InfoWindowF>\n\t\t\t)}\n\t\t</Marker>\n\t);\n};\n\nexport default PlaceMarker;\n"],"names":["PlaceMarker","_ref","marker","index","selectedPlaceMarker","setSelectedPlaceMarker","placesWindow","setPlacesWindow","markerKey","concat","title","placeMarkerClickHandler","React","createElement","Marker","key","position","icon","options","optimized","onClick","InfoWindowF","onCloseClick","maxWidth"],"mappings":";;;AAGA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAOX;AAAA,EAAA,IANLC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,mBAAmB,GAAAH,IAAA,CAAnBG,mBAAmB;IACnBC,sBAAsB,GAAAJ,IAAA,CAAtBI,sBAAsB;IACtBC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IACZC,eAAe,GAAAN,IAAA,CAAfM,eAAe,CAAA;EAEf,IAAMC,SAAS,GAAAC,SAAAA,CAAAA,MAAA,CAAaP,MAAM,CAACQ,KAAK,EAAAD,GAAAA,CAAAA,CAAAA,MAAA,CAAIN,KAAK,CAAE,CAAA;AAEnD,EAAA,IAAMQ,uBAAuB,GAAG,SAA1BA,uBAAuBA,GAAS;IACrCN,sBAAsB,CAACG,SAAS,CAAC,CAAA;IACjCD,eAAe,CAAC,IAAI,CAAC,CAAA;GACrB,CAAA;AAED,EAAA,oBACCK,KAAA,CAAAC,aAAA,CAACC,MAAM,EAAA;AACNC,IAAAA,GAAG,EAAEP,SAAU;IACfQ,QAAQ,EAAEd,MAAM,CAACc,QAAS;IAC1BN,KAAK,EAAER,MAAM,CAACQ,KAAM;IACpBO,IAAI,EAAEf,MAAM,CAACe,IAAK;AAClBC,IAAAA,OAAO,EAAE;AAAEC,MAAAA,SAAS,EAAE,KAAA;KAAQ;AAC9BC,IAAAA,OAAO,EAAET,uBAAAA;AAAwB,GAAA,EAEhCP,mBAAmB,KAAKI,SAAS,IAAIF,YAAY,IAAIJ,MAAM,iBAC3DU,KAAA,CAAAC,aAAA,CAACQ,WAAW,EAAA;IACXL,QAAQ,EAAEd,MAAM,CAACc,QAAS;IAC1BM,YAAY,EAAE,SAAAA,YAAA,GAAA;MAAA,OAAMf,eAAe,CAAC,KAAK,CAAC,CAAA;KAAC;AAC3CW,IAAAA,OAAO,EAAE;AAAEK,MAAAA,QAAQ,EAAE,GAAA;AAAI,KAAA;GAEzBX,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA,IAAA,EAAMX,MAAM,CAACQ,KAAW,CACZ,CAEP,CAAC,CAAA;AAEX;;;;"}
1
+ {"version":3,"file":"place-marker.js","sources":["../../../../src/components/modules/maps/place-marker.js"],"sourcesContent":["import React from 'react';\r\nimport { Marker, InfoWindowF } from '@react-google-maps/api';\r\n\r\nconst PlaceMarker = ({\r\n\tmarker,\r\n\tindex,\r\n\tselectedPlaceMarker,\r\n\tsetSelectedPlaceMarker,\r\n\tplacesWindow,\r\n\tsetPlacesWindow\r\n}) => {\r\n\tconst markerKey = `marker-${marker.title}-${index}`;\r\n\r\n\tconst placeMarkerClickHandler = () => {\r\n\t\tsetSelectedPlaceMarker(markerKey);\r\n\t\tsetPlacesWindow(true);\r\n\t};\r\n\r\n\treturn (\r\n\t\t<Marker\r\n\t\t\tkey={markerKey}\r\n\t\t\tposition={marker.position}\r\n\t\t\ttitle={marker.title}\r\n\t\t\ticon={marker.icon}\r\n\t\t\toptions={{ optimized: false }}\r\n\t\t\tonClick={placeMarkerClickHandler}\r\n\t\t>\r\n\t\t\t{selectedPlaceMarker === markerKey && placesWindow && marker && (\r\n\t\t\t\t<InfoWindowF\r\n\t\t\t\t\tposition={marker.position}\r\n\t\t\t\t\tonCloseClick={() => setPlacesWindow(false)}\r\n\t\t\t\t\toptions={{ maxWidth: 400 }}\r\n\t\t\t\t>\r\n\t\t\t\t\t<div>{marker.title}</div>\r\n\t\t\t\t</InfoWindowF>\r\n\t\t\t)}\r\n\t\t</Marker>\r\n\t);\r\n};\r\n\r\nexport default PlaceMarker;\r\n"],"names":["PlaceMarker","_ref","marker","index","selectedPlaceMarker","setSelectedPlaceMarker","placesWindow","setPlacesWindow","markerKey","concat","title","placeMarkerClickHandler","React","createElement","Marker","key","position","icon","options","optimized","onClick","InfoWindowF","onCloseClick","maxWidth"],"mappings":";;;AAGA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAOX;AAAA,EAAA,IANLC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,mBAAmB,GAAAH,IAAA,CAAnBG,mBAAmB;IACnBC,sBAAsB,GAAAJ,IAAA,CAAtBI,sBAAsB;IACtBC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IACZC,eAAe,GAAAN,IAAA,CAAfM,eAAe,CAAA;EAEf,IAAMC,SAAS,GAAAC,SAAAA,CAAAA,MAAA,CAAaP,MAAM,CAACQ,KAAK,EAAAD,GAAAA,CAAAA,CAAAA,MAAA,CAAIN,KAAK,CAAE,CAAA;AAEnD,EAAA,IAAMQ,uBAAuB,GAAG,SAA1BA,uBAAuBA,GAAS;IACrCN,sBAAsB,CAACG,SAAS,CAAC,CAAA;IACjCD,eAAe,CAAC,IAAI,CAAC,CAAA;GACrB,CAAA;AAED,EAAA,oBACCK,KAAA,CAAAC,aAAA,CAACC,MAAM,EAAA;AACNC,IAAAA,GAAG,EAAEP,SAAU;IACfQ,QAAQ,EAAEd,MAAM,CAACc,QAAS;IAC1BN,KAAK,EAAER,MAAM,CAACQ,KAAM;IACpBO,IAAI,EAAEf,MAAM,CAACe,IAAK;AAClBC,IAAA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