@abcagency/hc-ui-components 1.9.35 → 1.9.37
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/_virtual/jsx-runtime.js +4 -0
- package/dist/_virtual/jsx-runtime.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js +4 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js.map +1 -0
- package/dist/apis/hcApi.js +91 -0
- package/dist/apis/hcApi.js.map +1 -0
- package/dist/clientToken.js +10 -0
- package/dist/clientToken.js.map +1 -0
- package/dist/components/HireControlMap.js +175 -203
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/containers/accordions/filter-container.js +9 -22
- package/dist/components/containers/accordions/filter-container.js.map +1 -1
- package/dist/components/containers/accordions/filter-item-container.js +11 -16
- package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js +12 -37
- package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
- package/dist/components/containers/filter/commute-container.js +7 -18
- package/dist/components/containers/filter/commute-container.js.map +1 -1
- package/dist/components/containers/filter/filter-container.js +16 -12
- package/dist/components/containers/filter/filter-container.js.map +1 -1
- package/dist/components/containers/filter/filter-item-container.js +28 -44
- package/dist/components/containers/filter/filter-item-container.js.map +1 -1
- package/dist/components/containers/filter/location-container.js +7 -15
- package/dist/components/containers/filter/location-container.js.map +1 -1
- package/dist/components/containers/filter/points-of-interest-container.js +8 -21
- 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 +3 -6
- package/dist/components/containers/filter/points-of-interest-radio-item-container.js.map +1 -1
- package/dist/components/containers/filter/search-container.js +4 -11
- package/dist/components/containers/filter/search-container.js.map +1 -1
- package/dist/components/containers/jobListing/listing-details-container.js +5 -10
- package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
- package/dist/components/containers/list/item-list-container.js +15 -22
- package/dist/components/containers/list/item-list-container.js.map +1 -1
- package/dist/components/containers/list/list-item/list-item-container.js +5 -16
- package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
- package/dist/components/containers/maps/info-window-content-container.js +3 -6
- package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js +28 -106
- package/dist/components/containers/maps/map-container.js.map +1 -1
- package/dist/components/containers/maps/map-list-container.js +7 -35
- package/dist/components/containers/maps/map-list-container.js.map +1 -1
- package/dist/components/containers/maps/map-marker-container.js +8 -11
- package/dist/components/containers/maps/map-marker-container.js.map +1 -1
- package/dist/components/modules/accordions/MapAccordionItem.js +5 -5
- package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
- package/dist/components/modules/accordions/default.js +15 -15
- package/dist/components/modules/accordions/default.js.map +1 -1
- package/dist/components/modules/accordions/filterItem.js +7 -12
- package/dist/components/modules/accordions/filterItem.js.map +1 -1
- package/dist/components/modules/accordions/filters.js +7 -17
- package/dist/components/modules/accordions/filters.js.map +1 -1
- package/dist/components/modules/buttons/button-group-apply.js +19 -20
- package/dist/components/modules/buttons/button-group-apply.js.map +1 -1
- package/dist/components/modules/buttons/default.js +9 -9
- package/dist/components/modules/buttons/default.js.map +1 -1
- package/dist/components/modules/buttons/items-pill.js +2 -2
- package/dist/components/modules/buttons/items-pill.js.map +1 -1
- package/dist/components/modules/buttons/pill-wrapper.js +3 -4
- package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
- package/dist/components/modules/buttons/show-all-button.js +3 -3
- package/dist/components/modules/buttons/show-all-button.js.map +1 -1
- package/dist/components/modules/cards/default.js +11 -11
- package/dist/components/modules/cards/default.js.map +1 -1
- package/dist/components/modules/cards/filter.js +5 -5
- package/dist/components/modules/cards/filter.js.map +1 -1
- package/dist/components/modules/dialogs/apply-dialog.js +19 -19
- package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
- package/dist/components/modules/filter/commute.js +20 -21
- package/dist/components/modules/filter/commute.js.map +1 -1
- package/dist/components/modules/filter/index.js +30 -122
- package/dist/components/modules/filter/index.js.map +1 -1
- package/dist/components/modules/filter/item.js +9 -15
- package/dist/components/modules/filter/item.js.map +1 -1
- package/dist/components/modules/filter/location.js +6 -6
- package/dist/components/modules/filter/location.js.map +1 -1
- package/dist/components/modules/filter/radio-item.js +6 -6
- package/dist/components/modules/filter/radio-item.js.map +1 -1
- package/dist/components/modules/filter/search.js +11 -16
- package/dist/components/modules/filter/search.js.map +1 -1
- package/dist/components/modules/filter/sort.js +28 -28
- package/dist/components/modules/filter/sort.js.map +1 -1
- package/dist/components/modules/grid.js +4 -4
- package/dist/components/modules/grid.js.map +1 -1
- package/dist/components/modules/icon.js +4 -4
- package/dist/components/modules/icon.js.map +1 -1
- package/dist/components/modules/jobListing/listing-details.js +5 -8
- package/dist/components/modules/jobListing/listing-details.js.map +1 -1
- package/dist/components/modules/list/field-mapper-desktop.js +14 -38
- package/dist/components/modules/list/field-mapper-desktop.js.map +1 -1
- package/dist/components/modules/list/field-mapper-mobile.js +63 -94
- package/dist/components/modules/list/field-mapper-mobile.js.map +1 -1
- package/dist/components/modules/list/header-item.js +7 -7
- package/dist/components/modules/list/header-item.js.map +1 -1
- package/dist/components/modules/list/header.js +5 -5
- package/dist/components/modules/list/header.js.map +1 -1
- package/dist/components/modules/list/item-expand-card/index.js +3 -3
- package/dist/components/modules/list/item-expand-card/index.js.map +1 -1
- package/dist/components/modules/list/item-list.js +18 -15
- package/dist/components/modules/list/item-list.js.map +1 -1
- package/dist/components/modules/list/list-item/list-item.js +18 -95
- package/dist/components/modules/list/list-item/list-item.js.map +1 -1
- package/dist/components/modules/maps/info-window-card.js +2 -2
- package/dist/components/modules/maps/info-window-card.js.map +1 -1
- package/dist/components/modules/maps/info-window-content.js +5 -5
- package/dist/components/modules/maps/info-window-content.js.map +1 -1
- package/dist/components/modules/maps/map-list.js +5 -5
- package/dist/components/modules/maps/map-list.js.map +1 -1
- package/dist/components/modules/maps/map-marker.js +3 -3
- package/dist/components/modules/maps/map-marker.js.map +1 -1
- package/dist/components/modules/maps/map.js +5 -17
- package/dist/components/modules/maps/map.js.map +1 -1
- package/dist/components/modules/maps/place-marker.js +5 -5
- package/dist/components/modules/maps/place-marker.js.map +1 -1
- package/dist/components/modules/maps/tabs.js +25 -25
- package/dist/components/modules/maps/tabs.js.map +1 -1
- package/dist/contexts/componentContext.js +58 -6
- package/dist/contexts/componentContext.js.map +1 -1
- package/dist/contexts/mapContext.js +20 -49
- package/dist/contexts/mapContext.js.map +1 -1
- package/dist/contexts/mapListContext.js +70 -271
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/contexts/placesContext.js +5 -7
- package/dist/contexts/placesContext.js.map +1 -1
- package/dist/contexts/themeContext.js +5 -10
- package/dist/contexts/themeContext.js.map +1 -1
- package/dist/contexts/trackEventContext.js +2 -2
- package/dist/contexts/trackEventContext.js.map +1 -1
- package/dist/hc_react_map_npm/packages/hc-ui-components/node_modules/tslib/tslib.es6.js +45 -0
- package/dist/hc_react_map_npm/packages/hc-ui-components/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/hooks/useList.js +1 -3
- package/dist/hooks/useList.js.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js +1 -0
- package/dist/node_modules/@emotion/unitless/dist/emotion-unitless.esm.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +802 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +679 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +343 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +140 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +137 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/components/combobox/combobox.js +33 -0
- package/dist/node_modules/@headlessui/react/dist/components/combobox/combobox.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/components/keyboard.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/components/transitions/transition.js +19 -0
- package/dist/node_modules/@headlessui/react/dist/components/transitions/transition.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/components/transitions/utils/transition.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/components/transitions/utils/transition.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-computed.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-computed.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-document-event.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-document-event.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-id.js +9 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-id.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-is-mounted.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-is-mounted.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-outside-click.js +10 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-outside-click.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tracked-pointer.js +6 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tracked-pointer.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js +11 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +8 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-watch.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-watch.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-window-event.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/hooks/use-window-event.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +6 -0
- package/dist/node_modules/@headlessui/react/dist/internal/hidden.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js +6 -0
- package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/active-element-history.js +6 -0
- package/dist/node_modules/@headlessui/react/dist/utils/active-element-history.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/bugs.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/calculate-active-index.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/calculate-active-index.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +6 -0
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/document-ready.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/document-ready.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/env.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/env.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js +7 -0
- package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/form.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/form.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/match.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/match.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/once.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/once.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/owner.js +6 -0
- package/dist/node_modules/@headlessui/react/dist/utils/owner.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/platform.js +4 -0
- package/dist/node_modules/@headlessui/react/dist/utils/platform.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/utils/render.js +11 -0
- package/dist/node_modules/@headlessui/react/dist/utils/render.js.map +1 -0
- package/dist/node_modules/@iconify/react/dist/iconify.js +1928 -0
- package/dist/node_modules/@iconify/react/dist/iconify.js.map +1 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +304 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +26 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +145 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +69 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +19 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +80 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +320 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +212 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +27 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +208 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +279 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +120 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +42 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +221 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +1109 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +82 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +187 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +47 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +19 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +8 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +41 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +35 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/node_modules/@react-google-maps/api/dist/esm.js +8515 -0
- package/dist/node_modules/@react-google-maps/api/dist/esm.js.map +1 -0
- package/dist/node_modules/@remix-run/router/dist/router.js +271 -0
- package/dist/node_modules/@remix-run/router/dist/router.js.map +1 -0
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +43 -0
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js.map +1 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +669 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js.map +1 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +61 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +137 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/fuse.js/dist/fuse.js +1779 -0
- package/dist/node_modules/fuse.js/dist/fuse.js.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +9 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +17 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +1 -0
- package/dist/node_modules/react/jsx-runtime.js +12 -0
- package/dist/node_modules/react/jsx-runtime.js.map +1 -0
- package/dist/node_modules/react-loader-spinner/dist/index.js +134 -83
- package/dist/node_modules/react-loader-spinner/dist/index.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +10 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +161 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +22 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +107 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +57 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +11 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +32 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/react-router/dist/index.js +280 -0
- package/dist/node_modules/react-router/dist/index.js.map +1 -0
- package/dist/node_modules/react-router-dom/dist/index.js +201 -0
- package/dist/node_modules/react-router-dom/dist/index.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +20 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +26 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +52 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/styled-components/dist/styled-components.browser.esm.js +716 -4
- package/dist/node_modules/styled-components/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/node_modules/styled-components/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js +5 -7
- package/dist/node_modules/styled-components/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js.map +1 -1
- package/dist/node_modules/styled-components/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js.map +1 -1
- package/dist/node_modules/stylis/src/Enum.js +2 -2
- package/dist/node_modules/stylis/src/Enum.js.map +1 -1
- package/dist/node_modules/stylis/src/Middleware.js +59 -49
- package/dist/node_modules/stylis/src/Middleware.js.map +1 -1
- package/dist/node_modules/stylis/src/Parser.js +135 -137
- package/dist/node_modules/stylis/src/Parser.js.map +1 -1
- package/dist/node_modules/stylis/src/Prefixer.js +187 -135
- package/dist/node_modules/stylis/src/Prefixer.js.map +1 -1
- package/dist/node_modules/stylis/src/Serializer.js +21 -18
- package/dist/node_modules/stylis/src/Serializer.js.map +1 -1
- package/dist/node_modules/stylis/src/Tokenizer.js +121 -117
- package/dist/node_modules/stylis/src/Tokenizer.js.map +1 -1
- package/dist/node_modules/stylis/src/Utility.js +26 -24
- package/dist/node_modules/stylis/src/Utility.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2530 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/node_modules/tinycolor2/esm/tinycolor.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +13 -1
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +25 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +49 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +43 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/use-places-autocomplete/dist/index.esm.js +243 -0
- package/dist/node_modules/use-places-autocomplete/dist/index.esm.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +22 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +78 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/services/configService.js +15 -0
- package/dist/services/configService.js.map +1 -0
- package/dist/services/listingAggregatorService.js +37 -0
- package/dist/services/listingAggregatorService.js.map +1 -0
- package/dist/services/listingEntityService.js +15 -0
- package/dist/services/listingEntityService.js.map +1 -0
- package/dist/services/listingService.js +30 -0
- package/dist/services/listingService.js.map +1 -0
- package/dist/styles/index.css +3 -1
- package/dist/types/components/containers/accordions/filter-container.d.ts +11 -0
- package/dist/types/components/containers/accordions/map-accordion-item-container.d.ts +1 -2
- package/dist/types/components/containers/filter/commute-container.d.ts +5 -0
- package/dist/types/components/containers/filter/filter-container.d.ts +7 -0
- package/dist/types/components/containers/filter/location-container.d.ts +10 -0
- package/dist/types/components/containers/filter/points-of-interest-container.d.ts +10 -0
- package/dist/types/components/containers/filter/points-of-interest-radio-item-container.d.ts +8 -0
- package/dist/types/components/containers/filter/search-container.d.ts +8 -0
- package/dist/types/components/containers/list/list-item/list-item-container.d.ts +1 -3
- package/dist/types/components/containers/maps/info-window-content-container.d.ts +5 -0
- package/dist/types/components/containers/maps/map-container.d.ts +7 -0
- package/dist/types/components/containers/maps/map-list-container.d.ts +15 -0
- package/dist/types/components/containers/maps/map-marker-container.d.ts +13 -0
- package/dist/types/components/modules/buttons/button-group-apply.d.ts +1 -2
- package/dist/types/components/modules/jobListing/listing-details.d.ts +1 -2
- package/dist/types/components/modules/list/field-mapper-desktop.d.ts +1 -2
- package/dist/types/components/modules/list/field-mapper-mobile.d.ts +1 -2
- package/dist/types/components/modules/list/list-item/list-item.d.ts +1 -1
- package/dist/types/constants/placeTypes.d.ts +8 -0
- package/dist/types/contexts/mapContext.d.ts +0 -1
- package/dist/types/contexts/mapListContext.d.ts +2 -54
- package/dist/types/contexts/placesContext.d.ts +10 -0
- package/dist/types/hooks/useList.d.ts +3 -3
- package/dist/types/services/configService.d.ts +6 -0
- package/dist/types/services/listingAggregatorService.d.ts +9 -0
- package/dist/types/services/listingEntityService.d.ts +6 -0
- package/dist/types/services/listingService.d.ts +9 -0
- package/dist/types/services/recruiterService.d.ts +6 -0
- package/dist/types/types/GetListingParams.d.ts +1 -1
- package/dist/types/types/ListingEntity.d.ts +1 -2
- package/dist/types/types/ListingFields.d.ts +2 -4
- package/dist/types/types/Listings.d.ts +1 -0
- package/dist/types/types/config/Colors.d.ts +0 -1
- package/dist/types/types/config/MapConfig.d.ts +0 -4
- package/dist/types/types/config/PointsOfInterestConfig.d.ts +0 -1
- package/dist/types/util/filterUtil.d.ts +8 -12
- package/dist/types/util/mapIconUtil.d.ts +24 -0
- package/dist/types/util/mapUtil.d.ts +3 -3
- package/dist/types/util/urlFilterUtil.d.ts +0 -1
- package/dist/util/filterUtil.js +122 -413
- package/dist/util/filterUtil.js.map +1 -1
- package/dist/util/loading.js +3 -3
- package/dist/util/loading.js.map +1 -1
- package/dist/util/mapUtil.js +25 -43
- package/dist/util/mapUtil.js.map +1 -1
- package/dist/util/urlFilterUtil.js +1 -5
- package/dist/util/urlFilterUtil.js.map +1 -1
- package/package.json +17 -66
- package/src/apis/hcApi.ts +2 -9
- package/src/components/HireControlMap.js +95 -160
- package/src/components/containers/accordions/filter-container.js +4 -14
- package/src/components/containers/accordions/filter-item-container.js +5 -7
- package/src/components/containers/accordions/map-accordion-item-container.js +7 -28
- package/src/components/containers/filter/commute-container.js +4 -15
- package/src/components/containers/filter/filter-container.js +13 -8
- package/src/components/containers/filter/filter-item-container.js +25 -39
- package/src/components/containers/filter/location-container.js +4 -9
- package/src/components/containers/filter/points-of-interest-container.js +3 -14
- package/src/components/containers/filter/points-of-interest-radio-item-container.js +1 -4
- package/src/components/containers/filter/search-container.js +2 -8
- package/src/components/containers/jobListing/listing-details-container.js +2 -6
- package/src/components/containers/list/item-list-container.tsx +13 -22
- package/src/components/containers/list/list-item/list-item-container.js +2 -11
- package/src/components/containers/maps/info-window-content-container.js +2 -5
- package/src/components/containers/maps/map-container.js +14 -92
- package/src/components/containers/maps/map-list-container.js +5 -33
- package/src/components/containers/maps/map-marker-container.js +2 -4
- package/src/components/modules/accordions/filterItem.js +3 -16
- package/src/components/modules/accordions/filters.js +4 -19
- package/src/components/modules/buttons/button-group-apply.js +9 -14
- package/src/components/modules/buttons/pill-wrapper.js +1 -2
- package/src/components/modules/dialogs/apply-dialog.js +2 -2
- package/src/components/modules/filter/commute.js +5 -7
- package/src/components/modules/filter/index.js +50 -137
- package/src/components/modules/filter/item.js +3 -16
- package/src/components/modules/filter/search.js +1 -7
- package/src/components/modules/jobListing/listing-details.js +3 -5
- package/src/components/modules/list/field-mapper-desktop.jsx +13 -32
- package/src/components/modules/list/field-mapper-mobile.jsx +80 -92
- package/src/components/modules/list/header-item.js +1 -1
- package/src/components/modules/list/item-list.tsx +5 -2
- package/src/components/modules/list/list-item/list-item.jsx +11 -85
- package/src/components/modules/maps/map-list.js +1 -1
- package/src/components/modules/maps/map.js +18 -30
- package/src/components/modules/maps/tabs.js +5 -5
- package/src/contexts/mapContext.tsx +18 -45
- package/src/contexts/mapListContext.tsx +86 -373
- package/src/contexts/placesContext.js +3 -3
- package/src/contexts/themeContext.js +3 -8
- package/src/hooks/useList.js +1 -3
- package/src/index.js +0 -9
- package/src/services/configService.ts +16 -0
- package/src/services/listingAggregatorService.ts +58 -0
- package/src/services/listingEntityService.ts +16 -0
- package/src/services/listingService.ts +40 -0
- package/src/services/recruiterService.ts +18 -0
- package/src/styles/bundle.css +1 -3
- package/src/styles/index.css +2 -4
- package/src/types/GetListingParams.ts +1 -1
- package/src/types/ListingEntity.ts +1 -2
- package/src/types/ListingFields.ts +2 -4
- package/src/types/Listings.ts +1 -0
- package/src/types/config/Colors.ts +0 -1
- package/src/types/config/MapConfig.ts +0 -2
- package/src/types/config/PointsOfInterestConfig.ts +0 -1
- package/src/util/fieldMapper.js +2 -6
- package/src/util/filterUtil.js +55 -261
- package/src/util/mapUtil.js +41 -59
- package/src/util/urlFilterUtil.js +1 -4
- package/README.md +0 -323
- package/src/components/modules/maps/map.js.bak +0 -67
- package/src/components/modules/maps/map.js.bak2 +0 -67
- package/src/contexts/componentContext.tsx +0 -226
- package/src/styles/components.css +0 -30
- package/src/util/algoliaSearchUtil.js +0 -151
- package/src/util/twMerge.js +0 -6
package/src/util/filterUtil.js
CHANGED
|
@@ -1,35 +1,13 @@
|
|
|
1
1
|
/* eslint-disable no-undef */
|
|
2
2
|
import { getDistinctItemsByProximity } from '~/util/mapUtil';
|
|
3
|
-
import { isAlgoliaAvailable, isAlgoliaInitializing, filterListingsByAlgoliaSearch } from '~/util/algoliaSearchUtil';
|
|
4
3
|
|
|
5
4
|
import Fuse from 'fuse.js';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
export const getFieldValue = (listing, fieldKey) => {
|
|
9
|
-
// First check in fields
|
|
10
|
-
if (listing.fields && listing.fields[fieldKey] !== undefined && listing.fields[fieldKey] !== null) {
|
|
11
|
-
return listing.fields[fieldKey];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Then check in customFields array
|
|
15
|
-
if (listing.customFields && Array.isArray(listing.customFields)) {
|
|
16
|
-
const customField = listing.customFields.find(
|
|
17
|
-
cf => cf.id === fieldKey || cf.name === fieldKey
|
|
18
|
-
);
|
|
19
|
-
if (customField) {
|
|
20
|
-
return customField.value;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return undefined;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const getFilterOptions = (listings, filteredListings, field, excludeZeroCount = false) => {
|
|
6
|
+
export const getFilterOptions = (listings, filteredListings, field, excludeZeroCount = null) => {
|
|
28
7
|
const options = new Set();
|
|
29
8
|
listings.forEach(listing => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
options.add(value);
|
|
9
|
+
if (listing.fields[field]) {
|
|
10
|
+
options.add(listing.fields[field]);
|
|
33
11
|
}
|
|
34
12
|
});
|
|
35
13
|
|
|
@@ -39,150 +17,48 @@ export const getFilterOptions = (listings, filteredListings, field, excludeZeroC
|
|
|
39
17
|
});
|
|
40
18
|
|
|
41
19
|
filteredListings.forEach(listing => {
|
|
42
|
-
const value =
|
|
43
|
-
if (value &&
|
|
20
|
+
const value = listing.fields[field];
|
|
21
|
+
if (value && optionCounts.hasOwnProperty(value)) {
|
|
44
22
|
optionCounts[value] += 1;
|
|
45
23
|
}
|
|
46
24
|
});
|
|
47
25
|
|
|
48
|
-
|
|
49
|
-
.
|
|
26
|
+
return Array.from(options)
|
|
27
|
+
.sort()
|
|
50
28
|
.map(option => ({
|
|
51
29
|
name: option,
|
|
52
30
|
count: optionCounts[option] || 0
|
|
53
31
|
}))
|
|
54
32
|
.filter(option => !(excludeZeroCount === true && option.count === 0));
|
|
55
|
-
|
|
56
|
-
// Sort alphabetically
|
|
57
|
-
result.sort((a, b) => a.name.localeCompare(b.name));
|
|
58
|
-
|
|
59
|
-
return result;
|
|
60
33
|
};
|
|
61
34
|
|
|
62
|
-
export const getSpecialFeatureOptions = (listings, filteredListings, siteConfig, favorites
|
|
35
|
+
export const getSpecialFeatureOptions = (listings, filteredListings, siteConfig, favorites) => {
|
|
63
36
|
const specialFeatures = siteConfig.specialFeatures;
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const hasRegularField = listings.some(listing =>
|
|
69
|
-
listing.fields && listing.fields[featureKey] !== undefined
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
if (hasRegularField) {
|
|
73
|
-
// Get all distinct values for this regular field
|
|
74
|
-
const distinctValues = new Set();
|
|
75
|
-
listings.forEach(listing => {
|
|
76
|
-
const value = getFieldValue(listing, featureKey);
|
|
77
|
-
if (value != null && value !== '' && value !== undefined) {
|
|
78
|
-
distinctValues.add(String(value));
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
// Check if it's boolean-like
|
|
83
|
-
const booleanValues = new Set(['true', 'false', '1', '0', 'yes', 'no', 'True', 'False']);
|
|
84
|
-
const allBooleanLike = Array.from(distinctValues).every(val =>
|
|
85
|
-
booleanValues.has(val) || val === '1' || val === '0'
|
|
86
|
-
) && distinctValues.size <= 2;
|
|
87
|
-
|
|
88
|
-
if (allBooleanLike) {
|
|
89
|
-
// Handle as boolean field
|
|
90
|
-
let count = 0;
|
|
91
|
-
filteredListings.forEach(listing => {
|
|
92
|
-
const value = getFieldValue(listing, featureKey);
|
|
93
|
-
if (value == 1 || value === 1 || value === '1' || value === 'true' || value === true) {
|
|
94
|
-
count += 1;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
allOptions.push({ name: featureName, count });
|
|
98
|
-
} else {
|
|
99
|
-
// Handle as multi-value regular field - add each distinct value as separate option
|
|
100
|
-
distinctValues.forEach(value => {
|
|
101
|
-
let count = 0;
|
|
102
|
-
filteredListings.forEach(listing => {
|
|
103
|
-
const listingValue = getFieldValue(listing, featureKey);
|
|
104
|
-
if (String(listingValue) === value) {
|
|
105
|
-
count += 1;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
allOptions.push({
|
|
109
|
-
name: `${featureName}: ${value}`,
|
|
110
|
-
count
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
115
|
-
// Check if it's in custom fields
|
|
116
|
-
const hasCustomField = listings.some(listing =>
|
|
117
|
-
listing.customFields && Array.isArray(listing.customFields) &&
|
|
118
|
-
listing.customFields.some(cf => cf.id === featureKey || cf.name === featureKey)
|
|
119
|
-
);
|
|
37
|
+
const featureCounts = Object.keys(specialFeatures).sort().reduce((acc, key) => {
|
|
38
|
+
acc[specialFeatures[key]] = 0;
|
|
39
|
+
return acc;
|
|
40
|
+
}, {});
|
|
120
41
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
const value = getFieldValue(listing, featureKey);
|
|
126
|
-
if (value != null && value !== '' && value !== undefined) {
|
|
127
|
-
distinctValues.add(String(value));
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
// Check if it's boolean-like
|
|
132
|
-
const booleanValues = new Set(['true', 'false', '1', '0', 'yes', 'no', 'True', 'False']);
|
|
133
|
-
const allBooleanLike = Array.from(distinctValues).every(val =>
|
|
134
|
-
booleanValues.has(val)
|
|
135
|
-
) && distinctValues.size <= 2;
|
|
136
|
-
|
|
137
|
-
if (allBooleanLike) {
|
|
138
|
-
// Handle as boolean custom field
|
|
139
|
-
let count = 0;
|
|
140
|
-
filteredListings.forEach(listing => {
|
|
141
|
-
const value = getFieldValue(listing, featureKey);
|
|
142
|
-
if (value === '1' || value === 'true' || value === 'True' || value === true || value === 1) {
|
|
143
|
-
count += 1;
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
allOptions.push({ name: featureName, count });
|
|
147
|
-
} else {
|
|
148
|
-
// Handle as multi-value custom field - add each distinct value as separate option
|
|
149
|
-
distinctValues.forEach(value => {
|
|
150
|
-
let count = 0;
|
|
151
|
-
filteredListings.forEach(listing => {
|
|
152
|
-
const listingValue = getFieldValue(listing, featureKey);
|
|
153
|
-
if (listingValue === value) {
|
|
154
|
-
count += 1;
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
allOptions.push({
|
|
158
|
-
name: `${featureName}: ${value}`,
|
|
159
|
-
count
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
}
|
|
42
|
+
filteredListings.forEach(listing => {
|
|
43
|
+
Object.entries(specialFeatures).forEach(([featureKey, featureName]) => {
|
|
44
|
+
if (listing.fields[featureKey] == 1) {
|
|
45
|
+
featureCounts[featureName] += 1;
|
|
163
46
|
}
|
|
164
|
-
}
|
|
47
|
+
});
|
|
165
48
|
});
|
|
166
49
|
|
|
167
|
-
|
|
168
|
-
|
|
50
|
+
const specialFeatureOptions = Object.entries(featureCounts).map(([name, count]) => ({
|
|
51
|
+
name,
|
|
52
|
+
count
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
for (let option of specialFeatureOptions) {
|
|
169
56
|
if (option.name === 'Favorite') {
|
|
170
57
|
option.count = filteredListings.filter(x => favorites.includes(x.id)).length;
|
|
171
58
|
}
|
|
172
59
|
}
|
|
173
60
|
|
|
174
|
-
|
|
175
|
-
let finalOptions = allOptions;
|
|
176
|
-
if (filterConfig.showFavorites === false) {
|
|
177
|
-
finalOptions = finalOptions.filter(option => option.name !== 'Favorite');
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// Hide zero results if filterConfig.hideZeroResults is true
|
|
181
|
-
if (filterConfig.hideZeroResults === true) {
|
|
182
|
-
finalOptions = finalOptions.filter(option => option.count > 0);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return finalOptions;
|
|
61
|
+
return specialFeatureOptions;
|
|
186
62
|
};
|
|
187
63
|
|
|
188
64
|
const getPointsOfInterestOptions = pointsOfInterestNames => {
|
|
@@ -199,76 +75,52 @@ export const generateFilterOptions = (
|
|
|
199
75
|
filterOptions,
|
|
200
76
|
parentField,
|
|
201
77
|
favorites,
|
|
202
|
-
selectedFilters
|
|
203
|
-
filterConfig = {
|
|
204
|
-
hideZeroResults: false,
|
|
205
|
-
dynamicCounts: true,
|
|
206
|
-
showFavorites: true,
|
|
207
|
-
collapsedByDefault: false,
|
|
208
|
-
sortAlphabetically: false
|
|
209
|
-
}
|
|
78
|
+
selectedFilters
|
|
210
79
|
) => {
|
|
211
80
|
if (allListings.length > 0) {
|
|
212
|
-
// Determine which listings to use for counts based on dynamicCounts setting
|
|
213
|
-
const countListings = filterConfig.dynamicCounts ? filteredListings : allListings;
|
|
214
|
-
|
|
215
81
|
const dynamicFilters = siteConfig.fieldFiltersShown.map(fieldName => {
|
|
216
82
|
if (fieldName === parentField && filterOptions?.filters) {
|
|
217
83
|
return filterOptions.filters.find(filter => filter.id === fieldName);
|
|
218
84
|
}
|
|
219
|
-
if(fieldName == '
|
|
220
|
-
// For category counts, exclude specialFeatures from the filter calculation
|
|
221
|
-
// so that toggling specialFeatures updates category counts
|
|
222
|
-
let categoryCountListings = countListings;
|
|
223
|
-
if (filterConfig.dynamicCounts && selectedFilters.specialFeatures) {
|
|
224
|
-
categoryCountListings = allListings.filter(listing => {
|
|
225
|
-
return Object.entries(selectedFilters).every(([key, value]) => {
|
|
226
|
-
if (key === 'specialFeatures') return true; // Exclude specialFeatures
|
|
227
|
-
const fieldValue = getFieldValue(listing, key);
|
|
228
|
-
if (value && typeof value === 'object' && value[fieldValue] === true) {
|
|
229
|
-
return true;
|
|
230
|
-
}
|
|
231
|
-
return false;
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
}
|
|
85
|
+
if(fieldName == 'categoryClass'){
|
|
235
86
|
return {
|
|
236
87
|
id: fieldName,
|
|
237
88
|
title: siteConfig.fieldNames[fieldName],
|
|
238
|
-
items: getFilterOptions(allListings,
|
|
89
|
+
items: getFilterOptions(allListings, allListings, fieldName)
|
|
239
90
|
};
|
|
240
91
|
}
|
|
241
|
-
if(fieldName == '
|
|
242
|
-
const
|
|
243
|
-
const
|
|
244
|
-
x =>
|
|
92
|
+
if(fieldName == 'category' && selectedFilters.categoryClass){
|
|
93
|
+
const categoryClassKeys = Object.keys(selectedFilters.categoryClass);
|
|
94
|
+
const filteredListings = allListings.filter(
|
|
95
|
+
x => categoryClassKeys.includes(x.fields?.categoryClass)
|
|
245
96
|
);
|
|
246
97
|
return {
|
|
247
98
|
id: fieldName,
|
|
248
99
|
title: siteConfig.fieldNames[fieldName],
|
|
249
|
-
items: getFilterOptions(allListings,
|
|
100
|
+
items: getFilterOptions(allListings, filteredListings, fieldName, false)
|
|
250
101
|
};
|
|
251
102
|
}
|
|
252
103
|
if (fieldName == "specialFeatures") {
|
|
253
104
|
return {
|
|
254
105
|
id: fieldName,
|
|
255
106
|
title: siteConfig.fieldNames[fieldName],
|
|
256
|
-
items: getSpecialFeatureOptions(allListings,
|
|
107
|
+
items: getSpecialFeatureOptions(allListings, filteredListings, siteConfig, favorites).sort()
|
|
257
108
|
};
|
|
258
109
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
110
|
+
return {
|
|
111
|
+
id: fieldName,
|
|
112
|
+
title: siteConfig.fieldNames[fieldName],
|
|
113
|
+
items: getFilterOptions(allListings, filteredListings, fieldName)
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const locations =
|
|
265
118
|
siteConfig.locationFiltersShown.map((fieldName, index) => {
|
|
266
119
|
let locationFilteredListings = allListings;
|
|
267
120
|
locationFilteredListings = allListings.filter(listing => {
|
|
268
121
|
return Object.entries(selectedFilters).every(([key, value]) => {
|
|
269
122
|
if (siteConfig.locationFiltersShown.includes(key)) return true;
|
|
270
|
-
|
|
271
|
-
if (value && typeof value === 'object' && value[fieldValue] === true) {
|
|
123
|
+
if (value && typeof value === 'object' && value[listing.fields[key]] === true) {
|
|
272
124
|
return true;
|
|
273
125
|
}
|
|
274
126
|
return false;
|
|
@@ -333,24 +185,9 @@ export const generateFilterOptions = (
|
|
|
333
185
|
)
|
|
334
186
|
};
|
|
335
187
|
|
|
336
|
-
// Filter out null filters and ensure items arrays don't contain undefined values
|
|
337
|
-
const cleanFilters = dynamicFilters
|
|
338
|
-
.filter(f => f != null && f.items != null)
|
|
339
|
-
.map(f => ({
|
|
340
|
-
...f,
|
|
341
|
-
items: f.items.filter(item => item != null && item.name != null)
|
|
342
|
-
}));
|
|
343
|
-
|
|
344
|
-
const cleanLocations = locations
|
|
345
|
-
.filter(l => l != null && l.items != null)
|
|
346
|
-
.map(l => ({
|
|
347
|
-
...l,
|
|
348
|
-
items: l.items.filter(item => item != null && item.name != null)
|
|
349
|
-
}));
|
|
350
|
-
|
|
351
188
|
return {
|
|
352
|
-
filters:
|
|
353
|
-
locations:
|
|
189
|
+
filters: dynamicFilters,
|
|
190
|
+
locations: locations,
|
|
354
191
|
pointsOfInterest: pointsOfInterest
|
|
355
192
|
};
|
|
356
193
|
}
|
|
@@ -358,14 +195,13 @@ export const generateFilterOptions = (
|
|
|
358
195
|
return null;
|
|
359
196
|
};
|
|
360
197
|
|
|
361
|
-
export const applyFilters =
|
|
198
|
+
export const applyFilters = (
|
|
362
199
|
allListings,
|
|
363
200
|
selectedFilters,
|
|
364
201
|
query,
|
|
365
202
|
listingEntities,
|
|
366
203
|
favorites,
|
|
367
|
-
siteConfig
|
|
368
|
-
isFirstLoad = false
|
|
204
|
+
siteConfig
|
|
369
205
|
) => {
|
|
370
206
|
let results = allListings;
|
|
371
207
|
let invertedSpecialFeaturesMap;
|
|
@@ -392,60 +228,18 @@ export const applyFilters = async (
|
|
|
392
228
|
if (field === "specialFeatures" && invertedSpecialFeaturesMap && Object.keys(filterItems).length > 0) {
|
|
393
229
|
results = results.filter(listing => {
|
|
394
230
|
return Object.entries(filterItems).some(([filterName, filterValue]) => {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
// Check if this is a multi-value filter (has a colon in the name)
|
|
398
|
-
if (filterName.includes(': ')) {
|
|
399
|
-
const [baseFeatureName, expectedValue] = filterName.split(': ');
|
|
400
|
-
// Find the field key for this feature
|
|
401
|
-
const listingFieldName = Object.entries(siteConfig.specialFeatures).find(
|
|
402
|
-
([key, displayName]) => displayName === baseFeatureName
|
|
403
|
-
)?.[0];
|
|
404
|
-
|
|
405
|
-
if (listingFieldName) {
|
|
406
|
-
const value = getFieldValue(listing, listingFieldName);
|
|
407
|
-
return value === expectedValue;
|
|
408
|
-
}
|
|
409
|
-
return false;
|
|
410
|
-
} else {
|
|
411
|
-
// Handle boolean special features
|
|
412
|
-
const listingFieldName = invertedSpecialFeaturesMap[filterName];
|
|
413
|
-
const value = getFieldValue(listing, listingFieldName);
|
|
414
|
-
// Support both numeric (1/0) and string ("true"/"false") boolean values
|
|
415
|
-
return value == 1 || value === 1 || value === '1' || value === 'true' || value === true;
|
|
416
|
-
}
|
|
231
|
+
const listingFieldName = invertedSpecialFeaturesMap[filterName];
|
|
232
|
+
return filterValue && listing.fields[listingFieldName] == 1;
|
|
417
233
|
});
|
|
418
234
|
});
|
|
419
235
|
} else if (Object.keys(filterItems).length > 0) {
|
|
420
|
-
results = results.filter(listing =>
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
});
|
|
236
|
+
results = results.filter(listing =>
|
|
237
|
+
filterItems.hasOwnProperty(listing.fields[formattedField])
|
|
238
|
+
);
|
|
424
239
|
}
|
|
425
240
|
}
|
|
426
241
|
if (query) {
|
|
427
|
-
|
|
428
|
-
// Don't wait on subsequent manual searches to avoid slowing down the interface
|
|
429
|
-
if (isFirstLoad && isAlgoliaInitializing()) {
|
|
430
|
-
// Wait up to 500ms for Algolia to initialize on first load
|
|
431
|
-
let attempts = 0;
|
|
432
|
-
while (isAlgoliaInitializing() && attempts < 10) {
|
|
433
|
-
await new Promise(resolve => setTimeout(resolve, 50));
|
|
434
|
-
attempts++;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
// Use Algolia if available, otherwise fall back to Fuse.js
|
|
439
|
-
if (isAlgoliaAvailable()) {
|
|
440
|
-
try {
|
|
441
|
-
results = await filterListingsByAlgoliaSearch(results, query);
|
|
442
|
-
} catch (error) {
|
|
443
|
-
console.error('Algolia search failed, falling back to Fuse.js:', error);
|
|
444
|
-
results = searchResults(results, query);
|
|
445
|
-
}
|
|
446
|
-
} else {
|
|
447
|
-
results = searchResults(results, query);
|
|
448
|
-
}
|
|
242
|
+
results = searchResults(results, query);
|
|
449
243
|
}
|
|
450
244
|
const distinctItems = getDistinctItemsByProximity(results, listingEntities);
|
|
451
245
|
if (hasFavorite) {
|
|
@@ -461,9 +255,9 @@ function searchResults(results, query) {
|
|
|
461
255
|
'fields.posted',
|
|
462
256
|
'fields.subtitle',
|
|
463
257
|
'fields.education',
|
|
464
|
-
'fields.
|
|
258
|
+
'fields.position',
|
|
465
259
|
'fields.category',
|
|
466
|
-
'fields.
|
|
260
|
+
'fields.categoryclass',
|
|
467
261
|
'fields.shift',
|
|
468
262
|
'fields.citystate',
|
|
469
263
|
'fields.city',
|
|
@@ -509,7 +303,7 @@ export const filterListingsByLocation = (
|
|
|
509
303
|
let results = allListings;
|
|
510
304
|
if (selectedLocation !== null) {
|
|
511
305
|
results = results.filter(item =>
|
|
512
|
-
|
|
306
|
+
selectedLocation.items.hasOwnProperty(item.id)
|
|
513
307
|
);
|
|
514
308
|
}
|
|
515
309
|
const mapItems = getDistinctItemsByProximity(results, listingEntities);
|
package/src/util/mapUtil.js
CHANGED
|
@@ -1,66 +1,54 @@
|
|
|
1
|
-
export const getDistinctItemsByProximity = (items,
|
|
1
|
+
export const getDistinctItemsByProximity = (items, listingEntitiesDetails) => {
|
|
2
2
|
const clusters = {};
|
|
3
3
|
|
|
4
|
-
if (!
|
|
5
|
-
console.log('getDistinctItemsByProximity: No listingEntitiesDetailsInput');
|
|
6
|
-
return [];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const listingEntitiesDetails = Array.isArray(listingEntitiesDetailsInput)
|
|
10
|
-
? listingEntitiesDetailsInput.reduce((acc, entity) => {
|
|
11
|
-
if (entity?.entityKey) acc[entity.entityKey.toLowerCase()] = entity;
|
|
12
|
-
return acc;
|
|
13
|
-
}, {})
|
|
14
|
-
: Object.keys(listingEntitiesDetailsInput).reduce((acc, key) => {
|
|
15
|
-
acc[key.toLowerCase()] = listingEntitiesDetailsInput[key];
|
|
16
|
-
return acc;
|
|
17
|
-
}, {});
|
|
18
|
-
|
|
19
|
-
console.log('getDistinctItemsByProximity: Processing', items?.length, 'items with', Object.keys(listingEntitiesDetails).length, 'entities');
|
|
20
|
-
console.log('Entity keys:', Object.keys(listingEntitiesDetails));
|
|
4
|
+
if (!listingEntitiesDetails) return [];
|
|
21
5
|
|
|
22
6
|
const closeItemPairs = findCloseItems(listingEntitiesDetails);
|
|
23
7
|
if (closeItemPairs.length > 0) {
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
listingEntitiesDetails = adjustItemPositions(
|
|
9
|
+
listingEntitiesDetails,
|
|
10
|
+
closeItemPairs
|
|
11
|
+
);
|
|
26
12
|
}
|
|
27
13
|
|
|
28
14
|
items?.forEach(item => {
|
|
29
|
-
|
|
30
|
-
if (!entityKey || entityKey === '-1') return;
|
|
31
|
-
const entityDetails = listingEntitiesDetails[entityKey.toLowerCase()];
|
|
32
|
-
if (!entityDetails) {
|
|
33
|
-
console.error(`Details not found for entityKey: "${entityKey}" (looking for "${entityKey.toLowerCase()}")`);
|
|
34
|
-
console.error('Available entity keys:', Object.keys(listingEntitiesDetails));
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
15
|
+
if(item.entityId !== -1){
|
|
37
16
|
|
|
38
|
-
|
|
17
|
+
const entityDetails = listingEntitiesDetails[item.entityId];
|
|
39
18
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
clusters[
|
|
48
|
-
|
|
19
|
+
if (!entityDetails) {
|
|
20
|
+
console.error(`Details not found for entityId: ${item.entityId}`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
item.mapDetails = entityDetails;
|
|
25
|
+
|
|
26
|
+
if (!clusters[item.entityId]) {
|
|
27
|
+
clusters[item.entityId] = {
|
|
28
|
+
...item.mapDetails,
|
|
29
|
+
items: { [item.id]: item }
|
|
30
|
+
};
|
|
31
|
+
} else {
|
|
32
|
+
clusters[item.entityId].items[item.id] = item;
|
|
33
|
+
}}
|
|
49
34
|
});
|
|
50
35
|
|
|
51
36
|
return Object.values(clusters);
|
|
52
37
|
};
|
|
53
38
|
|
|
54
|
-
export const findCloseItems =
|
|
39
|
+
export const findCloseItems = itemsObj => {
|
|
55
40
|
const closeItems = [];
|
|
56
|
-
const items = Object.values(
|
|
41
|
+
const items = Object.values(itemsObj); // Convert object to array for iteration
|
|
57
42
|
const proximityThreshold = 0.0001;
|
|
58
43
|
|
|
59
44
|
for (let i = 0; i < items.length; i++) {
|
|
60
45
|
for (let j = i + 1; j < items.length; j++) {
|
|
61
46
|
const distanceLat = Math.abs(items[i].latitude - items[j].latitude);
|
|
62
47
|
const distanceLng = Math.abs(items[i].longitude - items[j].longitude);
|
|
63
|
-
if (
|
|
48
|
+
if (
|
|
49
|
+
distanceLat < proximityThreshold &&
|
|
50
|
+
distanceLng < proximityThreshold
|
|
51
|
+
) {
|
|
64
52
|
closeItems.push({ item1: items[i], item2: items[j] });
|
|
65
53
|
}
|
|
66
54
|
}
|
|
@@ -69,18 +57,14 @@ export const findCloseItems = entitiesByKey => {
|
|
|
69
57
|
return closeItems;
|
|
70
58
|
};
|
|
71
59
|
|
|
72
|
-
export const adjustItemPositions = (
|
|
60
|
+
export const adjustItemPositions = (itemsObj, closeItemPairs) => {
|
|
73
61
|
const adjustmentValue = 0.0001;
|
|
74
|
-
const adjustedItems = { ...
|
|
62
|
+
const adjustedItems = { ...itemsObj }; // Create a shallow copy of the object
|
|
75
63
|
|
|
76
64
|
closeItemPairs.forEach(pair => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
adjustedItems[
|
|
80
|
-
...adjustedItems[key2],
|
|
81
|
-
latitude: adjustedItems[key2].latitude + adjustmentValue,
|
|
82
|
-
longitude: adjustedItems[key2].longitude + adjustmentValue
|
|
83
|
-
};
|
|
65
|
+
if (adjustedItems[pair.item1.id] && adjustedItems[pair.item2.id]) {
|
|
66
|
+
adjustedItems[pair.item2.id].latitude += adjustmentValue;
|
|
67
|
+
adjustedItems[pair.item2.id].longitude += adjustmentValue;
|
|
84
68
|
}
|
|
85
69
|
});
|
|
86
70
|
|
|
@@ -90,15 +74,13 @@ export const adjustItemPositions = (entitiesByKey, closeItemPairs) => {
|
|
|
90
74
|
export const clusterOptions = (clusterGridSize, fillColor) => {
|
|
91
75
|
return {
|
|
92
76
|
gridSize: clusterGridSize,
|
|
93
|
-
maxZoom:
|
|
94
|
-
styles:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
]
|
|
77
|
+
maxZoom:15,
|
|
78
|
+
styles:[{
|
|
79
|
+
url: createSvgDataUri(fillColor),
|
|
80
|
+
textColor:'white',
|
|
81
|
+
height: 40,
|
|
82
|
+
width: 40
|
|
83
|
+
}]
|
|
102
84
|
};
|
|
103
85
|
};
|
|
104
86
|
|
|
@@ -53,7 +53,6 @@ export const filtersFromURL = location => {
|
|
|
53
53
|
if (!location || !location.search) return;
|
|
54
54
|
const filters = {};
|
|
55
55
|
let queryParam = null;
|
|
56
|
-
let lsIgnore = false;
|
|
57
56
|
const queryParams = parseQueryParams(location.search);
|
|
58
57
|
if (!queryParams) return;
|
|
59
58
|
Object.keys(queryParams).forEach(key => {
|
|
@@ -65,12 +64,10 @@ export const filtersFromURL = location => {
|
|
|
65
64
|
filters[category][filter] = queryParams[key] === 'true';
|
|
66
65
|
} else if (key === 'query') {
|
|
67
66
|
queryParam = queryParams[key];
|
|
68
|
-
} else if (key === 'ls-ignore') {
|
|
69
|
-
lsIgnore = queryParams[key] === 'true';
|
|
70
67
|
}
|
|
71
68
|
});
|
|
72
69
|
|
|
73
|
-
return { filters, query: queryParam
|
|
70
|
+
return { filters, query: queryParam };
|
|
74
71
|
};
|
|
75
72
|
|
|
76
73
|
export const hasFiltersInURL = location => {
|