@abcagency/hc-ui-components 1.3.46 → 1.3.48

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 (33) hide show
  1. package/dist/components/HireControlMap.js +1 -0
  2. package/dist/components/HireControlMap.js.map +1 -1
  3. package/dist/components/containers/accordions/filter-item-container.js +1 -0
  4. package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
  5. package/dist/components/containers/filter/filter-item-container.js +3 -0
  6. package/dist/components/containers/filter/filter-item-container.js.map +1 -1
  7. package/dist/components/containers/maps/info-window-content-container.js +3 -3
  8. package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
  9. package/dist/components/containers/maps/map-container.js +34 -2
  10. package/dist/components/containers/maps/map-container.js.map +1 -1
  11. package/dist/components/containers/maps/map-list-container.js +4 -2
  12. package/dist/components/containers/maps/map-list-container.js.map +1 -1
  13. package/dist/components/modules/buttons/show-all-button.js +1 -2
  14. package/dist/components/modules/buttons/show-all-button.js.map +1 -1
  15. package/dist/components/modules/filter/location.js +3 -0
  16. package/dist/components/modules/filter/location.js.map +1 -1
  17. package/dist/components/modules/maps/map-list.js +3 -2
  18. package/dist/components/modules/maps/map-list.js.map +1 -1
  19. package/dist/components/modules/maps/map.js.map +1 -1
  20. package/dist/util/filterUtil.js +16 -0
  21. package/dist/util/filterUtil.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/components/HireControlMap.js +1 -0
  24. package/src/components/containers/accordions/filter-item-container.js +1 -0
  25. package/src/components/containers/filter/filter-item-container.js +80 -77
  26. package/src/components/containers/maps/info-window-content-container.js +2 -2
  27. package/src/components/containers/maps/map-container.js +245 -206
  28. package/src/components/containers/maps/map-list-container.js +3 -1
  29. package/src/components/modules/buttons/show-all-button.js +2 -3
  30. package/src/components/modules/filter/location.js +7 -4
  31. package/src/components/modules/maps/map-list.js +13 -3
  32. package/src/components/modules/maps/map.js +64 -64
  33. package/src/util/filterUtil.js +17 -0
@@ -99,6 +99,23 @@ export const generateFilterOptions = (
99
99
  if (index === 0 && filterOptions?.locations) {
100
100
  return filterOptions.locations.find(filter => filter.id === fieldName);
101
101
  }
102
+ if (fieldName === 'entityName' && filterOptions?.locations) {
103
+ const cityIncluded = siteConfig.locationFiltersShown.includes('city');
104
+ const stateIncluded = siteConfig.locationFiltersShown.includes('state');
105
+ const cityStateIncluded = siteConfig.locationFiltersShown.includes('cityState');
106
+ const filteredByLocation = allListings.filter(listing => {
107
+ const cityMatches = cityIncluded ? listing.fields.city === filteredListings[0].fields.city : true;
108
+ const stateMatches = stateIncluded ? listing.fields.state === filteredListings[0].fields.state : true;
109
+ const cityStateMatches = cityStateIncluded ? listing.fields.cityState === filteredListings[0].fields.cityState : true;
110
+ return cityMatches && stateMatches && cityStateMatches;
111
+ });
112
+
113
+ return {
114
+ id: fieldName,
115
+ title: siteConfig.fieldNames[fieldName],
116
+ items: getFilterOptions(allListings, filteredByLocation, fieldName, true)
117
+ };
118
+ }
102
119
  return {
103
120
  id: fieldName,
104
121
  title: siteConfig.fieldNames[fieldName],