@abcagency/hc-ui-components 1.9.34 → 1.9.36
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 +68 -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 -218
- 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 -308
- 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 -213
- package/src/styles/components.css +0 -30
- package/src/util/algoliaSearchUtil.js +0 -151
- package/src/util/twMerge.js +0 -6
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React, { createContext, useState, useEffect, useContext,
|
|
1
|
+
import React, { createContext, useState, useEffect, useContext, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import { generateFilterOptions, applyFilters, filterListingsByLocation
|
|
3
|
+
import { generateFilterOptions, applyFilters, filterListingsByLocation } from '~/util/filterUtil';
|
|
4
4
|
import { getStorageObject, setStorageObject } from '~/util/localStorageUtil';
|
|
5
5
|
import { updateURLWithFilters, filtersFromURL } from '~/util/urlFilterUtil';
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
import { getListingEntities } from "~/services/listingEntityService";
|
|
8
|
+
import fetchListings from '~/services/listingAggregatorService';
|
|
7
9
|
|
|
8
10
|
import { Listing } from '~/types/Listings';
|
|
9
11
|
import { ListingEntity } from '~/types/ListingEntity';
|
|
@@ -30,7 +32,6 @@ interface MapListContextProps {
|
|
|
30
32
|
setMobileTab: (tab: string) => void;
|
|
31
33
|
mobileTab: string;
|
|
32
34
|
siteConfig: SiteConfig;
|
|
33
|
-
googleMapsApiKey?: string;
|
|
34
35
|
favorites: number[];
|
|
35
36
|
resetEntityFilter: () => void;
|
|
36
37
|
handleSettingFavorites: (favorites: number[] | null) => void;
|
|
@@ -38,7 +39,6 @@ interface MapListContextProps {
|
|
|
38
39
|
filterByFavorites: boolean;
|
|
39
40
|
commuteLocation: any | null;
|
|
40
41
|
setCommuteLocation: (location: any | null) => void;
|
|
41
|
-
setMapBounds: (bounds: google.maps.LatLngBounds | null) => void;
|
|
42
42
|
navigateToDetails: (id: number) => void;
|
|
43
43
|
navigateToEasyApply: (id: number) => void;
|
|
44
44
|
Link: React.ComponentType<any>;
|
|
@@ -53,30 +53,6 @@ interface MapListContextProps {
|
|
|
53
53
|
hiddenFilters?: string[];
|
|
54
54
|
containerStyle?: any;
|
|
55
55
|
ExpandListComponent?: React.ComponentType<{ listing: any }> | ((listing: any) => JSX.Element) | null;
|
|
56
|
-
mobileDetailsCallback?: ((item: any) => void) | null;
|
|
57
|
-
noEntities?: boolean;
|
|
58
|
-
filterConfig?: {
|
|
59
|
-
hideZeroResults?: boolean;
|
|
60
|
-
dynamicCounts?: boolean;
|
|
61
|
-
showFavorites?: boolean;
|
|
62
|
-
collapsedByDefault?: boolean;
|
|
63
|
-
sortAlphabetically?: boolean;
|
|
64
|
-
classNames?: {
|
|
65
|
-
filterContainer?: string;
|
|
66
|
-
filterContent?: string;
|
|
67
|
-
filterAccordion?: string;
|
|
68
|
-
filterAccordionHeader?: string;
|
|
69
|
-
filterAccordionContent?: string;
|
|
70
|
-
filterItem?: string;
|
|
71
|
-
filterItemLabel?: string;
|
|
72
|
-
filterItemCheckbox?: string;
|
|
73
|
-
filterItemCount?: string;
|
|
74
|
-
searchInput?: string;
|
|
75
|
-
resetButton?: string;
|
|
76
|
-
showJobsButton?: string;
|
|
77
|
-
filterFooter?: string;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
56
|
}
|
|
81
57
|
|
|
82
58
|
const MapListContext = createContext<MapListContextProps | undefined>(undefined);
|
|
@@ -100,7 +76,6 @@ const getQuery = (localStorageKey: string = ''): string | null => {
|
|
|
100
76
|
interface MapListProviderProps {
|
|
101
77
|
children: ReactNode;
|
|
102
78
|
siteConfig: MapConfig;
|
|
103
|
-
googleMapsApiKey?: string;
|
|
104
79
|
resetFilters: boolean;
|
|
105
80
|
navigateToDetails: (id: number) => void;
|
|
106
81
|
navigateToEasyApply: (id: number) => void;
|
|
@@ -118,40 +93,13 @@ interface MapListProviderProps {
|
|
|
118
93
|
defaultFilters?: Record<string, any>;
|
|
119
94
|
containerStyle?: any;
|
|
120
95
|
localStorageKey: string;
|
|
121
|
-
getListingEntitiesCallback?: (origin?: string) => Promise<
|
|
96
|
+
getListingEntitiesCallback?: (entityIds: number[], origin?: string) => Promise<ListingEntity[]>;
|
|
122
97
|
ExpandListComponent?: React.ComponentType<{ listing: Listing }> | ((listing: Listing) => JSX.Element) | null;
|
|
123
|
-
mobileDetailsCallback?: ((item: any) => void) | null;
|
|
124
|
-
hideMap?: boolean;
|
|
125
|
-
hideFilters?: boolean;
|
|
126
|
-
noEntities?: boolean;
|
|
127
|
-
filterConfig?: {
|
|
128
|
-
hideZeroResults?: boolean;
|
|
129
|
-
dynamicCounts?: boolean;
|
|
130
|
-
showFavorites?: boolean;
|
|
131
|
-
collapsedByDefault?: boolean;
|
|
132
|
-
sortAlphabetically?: boolean;
|
|
133
|
-
classNames?: {
|
|
134
|
-
filterContainer?: string;
|
|
135
|
-
filterContent?: string;
|
|
136
|
-
filterAccordion?: string;
|
|
137
|
-
filterAccordionHeader?: string;
|
|
138
|
-
filterAccordionContent?: string;
|
|
139
|
-
filterItem?: string;
|
|
140
|
-
filterItemLabel?: string;
|
|
141
|
-
filterItemCheckbox?: string;
|
|
142
|
-
filterItemCount?: string;
|
|
143
|
-
searchInput?: string;
|
|
144
|
-
resetButton?: string;
|
|
145
|
-
showJobsButton?: string;
|
|
146
|
-
filterFooter?: string;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
98
|
}
|
|
150
99
|
|
|
151
100
|
export const MapListProvider: React.FC<MapListProviderProps> = ({
|
|
152
101
|
children,
|
|
153
102
|
siteConfig,
|
|
154
|
-
googleMapsApiKey,
|
|
155
103
|
resetFilters,
|
|
156
104
|
navigateToDetails,
|
|
157
105
|
navigateToEasyApply,
|
|
@@ -169,116 +117,41 @@ export const MapListProvider: React.FC<MapListProviderProps> = ({
|
|
|
169
117
|
defaultFilters,
|
|
170
118
|
containerStyle,
|
|
171
119
|
ExpandListComponent,
|
|
172
|
-
mobileDetailsCallback = null,
|
|
173
120
|
getListingEntitiesCallback,
|
|
174
|
-
localStorageKey
|
|
175
|
-
hideMap = false,
|
|
176
|
-
hideFilters = false,
|
|
177
|
-
noEntities = false,
|
|
178
|
-
filterConfig = {
|
|
179
|
-
hideZeroResults: false,
|
|
180
|
-
dynamicCounts: true,
|
|
181
|
-
showFavorites: true,
|
|
182
|
-
collapsedByDefault: false,
|
|
183
|
-
sortAlphabetically: false,
|
|
184
|
-
classNames: {
|
|
185
|
-
filterContainer: '',
|
|
186
|
-
filterContent: '',
|
|
187
|
-
filterAccordion: '',
|
|
188
|
-
filterAccordionHeader: '',
|
|
189
|
-
filterAccordionContent: '',
|
|
190
|
-
filterItem: '',
|
|
191
|
-
filterItemLabel: '',
|
|
192
|
-
filterItemCheckbox: '',
|
|
193
|
-
filterItemCount: '',
|
|
194
|
-
searchInput: '',
|
|
195
|
-
resetButton: '',
|
|
196
|
-
showJobsButton: '',
|
|
197
|
-
filterFooter: ''
|
|
198
|
-
}
|
|
199
|
-
}
|
|
121
|
+
localStorageKey
|
|
200
122
|
}) => {
|
|
201
123
|
const firstLoadFilters = () =>{
|
|
202
|
-
|
|
203
|
-
return getStorageObject(localStorageKey + 'selectedFilters', {}) || {};
|
|
204
|
-
}
|
|
205
|
-
let urlData = filtersFromURL(window.location);
|
|
206
|
-
let urlFilters = urlData?.filters;
|
|
207
|
-
|
|
208
|
-
// If ls-ignore=true is in URL, don't load from localStorage
|
|
209
|
-
if (urlData?.lsIgnore) {
|
|
210
|
-
return urlFilters || {};
|
|
211
|
-
}
|
|
212
|
-
|
|
124
|
+
let urlFilters = filtersFromURL(window.location)?.filters;
|
|
213
125
|
return (setFiltersUrl === true && urlFilters && Object.keys(urlFilters).length > 0) ? urlFilters : getStorageObject(localStorageKey + 'selectedFilters', {}) || {}
|
|
214
126
|
}
|
|
215
|
-
|
|
127
|
+
|
|
216
128
|
const firstLoadQuery = (): string | null => {
|
|
217
129
|
if (resetFilters) return null;
|
|
218
|
-
if (typeof window === 'undefined') return getQuery(localStorageKey);
|
|
219
130
|
// Check URL first
|
|
220
131
|
const urlData = filtersFromURL(window.location);
|
|
221
|
-
|
|
222
|
-
// If ls-ignore=true is in URL, ONLY use URL query (don't fall back to localStorage)
|
|
223
|
-
if (urlData?.lsIgnore) {
|
|
224
|
-
return urlData?.query || null;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// If setFiltersUrl is enabled and there's a query in URL, use it
|
|
228
132
|
if (setFiltersUrl === true && urlData?.query) {
|
|
229
133
|
return urlData.query;
|
|
230
134
|
}
|
|
231
|
-
|
|
232
|
-
// Only fall back to localStorage if there's NO query param in URL
|
|
233
|
-
// This prevents localStorage from overriding empty query params
|
|
234
|
-
if (setFiltersUrl === true && typeof urlData?.query !== 'undefined') {
|
|
235
|
-
return null; // URL has query param but it's empty/null
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Fall back to localStorage only if URL has no query param at all
|
|
135
|
+
// Fall back to localStorage
|
|
239
136
|
return getQuery(localStorageKey);
|
|
240
137
|
}
|
|
241
|
-
|
|
138
|
+
|
|
242
139
|
const [allListings, setAllListings] = useState<Listing[]>([]);
|
|
243
140
|
const [filteredListings, setFilteredListings] = useState<Listing[]>([]);
|
|
244
141
|
const [loading, setLoading] = useState<boolean>(false);
|
|
245
|
-
const [mapItems, setMapItems] = useState<any>([]);
|
|
246
|
-
const [query, setQuery] = useState<string | null>(
|
|
247
|
-
const [sortSetting, setSortSetting] = useState<{ field: string; type: string }>({ field: 'position', type: 'asc' });
|
|
142
|
+
const [mapItems, setMapItems] = useState<any>(getStorageObject(localStorageKey + 'mapItems', []) || []);
|
|
143
|
+
const [query, setQuery] = useState<string | null>(() => firstLoadQuery());
|
|
144
|
+
const [sortSetting, setSortSetting] = useState<{ field: string; type: string }>(getStorageObject(localStorageKey + 'sortSetting', { field: 'position', type: 'asc' }) || { field: 'position', type: 'asc' });
|
|
248
145
|
const [listingEntities, setListingEntities] = useState<Record<number, ListingEntity> | null>({});
|
|
249
146
|
const [firstLoad, setFirstLoad] = useState<boolean>(true);
|
|
250
|
-
const [commuteLocation, setCommuteLocation] = useState<any | null>(
|
|
251
|
-
const [selectedFilters, setSelectedFilters] = useState<Record<string, any>>({});
|
|
252
|
-
const [hasMounted, setHasMounted] = useState(false);
|
|
253
|
-
|
|
254
|
-
// Load from localStorage/URL after mount to avoid hydration mismatch
|
|
255
|
-
useEffect(() => {
|
|
256
|
-
if (typeof window !== 'undefined') {
|
|
257
|
-
const storedMapItems = getStorageObject(localStorageKey + 'mapItems', []) || [];
|
|
258
|
-
const storedSortSetting = getStorageObject(localStorageKey + 'sortSetting', { field: 'position', type: 'asc' }) || { field: 'position', type: 'asc' };
|
|
259
|
-
const storedCommuteLocation = getStorageObject(localStorageKey + 'commuteLocation');
|
|
260
|
-
|
|
261
|
-
setMapItems(storedMapItems);
|
|
262
|
-
setSortSetting(storedSortSetting);
|
|
263
|
-
if (storedCommuteLocation) setCommuteLocation(storedCommuteLocation);
|
|
264
|
-
|
|
265
|
-
// Load filters and query
|
|
266
|
-
if (!resetFilters) {
|
|
267
|
-
setSelectedFilters(firstLoadFilters());
|
|
268
|
-
setQuery(firstLoadQuery());
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
setHasMounted(true);
|
|
272
|
-
}
|
|
273
|
-
}, [localStorageKey]);
|
|
147
|
+
const [commuteLocation, setCommuteLocation] = useState<any | null>(getStorageObject('commuteLocation'));
|
|
148
|
+
const [selectedFilters, setSelectedFilters] = useState<Record<string, any>>(() => resetFilters ? {} : firstLoadFilters());
|
|
274
149
|
const [filterOptions, setFilterOptions] = useState<any>();
|
|
275
150
|
const [recruiters, setRecruiters] = useState<Record<number, Recruiter>>({});
|
|
276
151
|
const [filterDialogIsOpen, setFilterDialogIsOpen] = useState<boolean>(false);
|
|
277
152
|
const [mobileTab, setMobileTab] = useState<string>("listTab");
|
|
278
153
|
const [favorites, setFavorites] = useState<number[]>([]);
|
|
279
154
|
const [filterByFavorites, setFilterByFavorites] = useState<boolean>(false);
|
|
280
|
-
const entitiesInitialized = useRef<boolean>(false);
|
|
281
|
-
const [mapBounds, setMapBounds] = useState<google.maps.LatLngBounds | null>(null);
|
|
282
155
|
|
|
283
156
|
const setNewFilteredListings = (filteredListings: Listing[]) => {
|
|
284
157
|
setFilteredListings(filteredListings);
|
|
@@ -286,13 +159,11 @@ export const MapListProvider: React.FC<MapListProviderProps> = ({
|
|
|
286
159
|
|
|
287
160
|
useEffect(() => {
|
|
288
161
|
if (!sortSetting) return;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}
|
|
162
|
+
localStorage.setItem(localStorageKey + 'sortSetting', JSON.stringify(sortSetting));
|
|
163
|
+
setNewFilteredListings(filteredListings);
|
|
292
164
|
}, [sortSetting, localStorageKey]);
|
|
293
165
|
|
|
294
166
|
useEffect(() => {
|
|
295
|
-
if (typeof window === 'undefined') return;
|
|
296
167
|
const loadedFavorites = JSON.parse(localStorage.getItem(localStorageKey + 'favorites') || '[]');
|
|
297
168
|
setFavorites(loadedFavorites);
|
|
298
169
|
}, [localStorageKey]);
|
|
@@ -301,164 +172,103 @@ export const MapListProvider: React.FC<MapListProviderProps> = ({
|
|
|
301
172
|
setStorageObject(localStorageKey + "commuteLocation", commuteLocation);
|
|
302
173
|
}, [commuteLocation, localStorageKey]);
|
|
303
174
|
|
|
304
|
-
|
|
305
175
|
useEffect(() => {
|
|
306
|
-
if (!commuteLocation
|
|
176
|
+
if (!commuteLocation) return;
|
|
307
177
|
|
|
308
178
|
async function fetchEntities() {
|
|
179
|
+
const distinctEntityIds = [
|
|
180
|
+
...new Set(allListings.map(listing => listing.entityId ?? -1))
|
|
181
|
+
];
|
|
309
182
|
try {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
183
|
+
console.log(getListingEntitiesCallback);
|
|
184
|
+
console.log("fetching entities")
|
|
185
|
+
const fetchedEntities = getListingEntitiesCallback !== null && getListingEntitiesCallback !== undefined ? await getListingEntitiesCallback(distinctEntityIds,
|
|
186
|
+
`${commuteLocation.lat}, ${commuteLocation.lng}`) : await getListingEntities(
|
|
187
|
+
distinctEntityIds,
|
|
188
|
+
`${commuteLocation.lat}, ${commuteLocation.lng}`
|
|
189
|
+
);
|
|
317
190
|
setListingEntities(fetchedEntities);
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
191
|
+
const newFilteredListings: Listing[] = [...filteredListings] ?? [];
|
|
192
|
+
for (let i = 0; i < allListings.length; i++) {
|
|
193
|
+
const listing = newFilteredListings[i];
|
|
321
194
|
if (
|
|
322
195
|
listing &&
|
|
323
196
|
listing.fields &&
|
|
324
|
-
listing.
|
|
325
|
-
listing.
|
|
197
|
+
listing.entityId !== undefined &&
|
|
198
|
+
listing.entityId !== -1
|
|
326
199
|
) {
|
|
327
|
-
const
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
if (travelTime !== undefined) {
|
|
331
|
-
|
|
332
|
-
...listing,
|
|
333
|
-
fields: {
|
|
334
|
-
...listing.fields,
|
|
335
|
-
travelTime
|
|
336
|
-
}
|
|
337
|
-
};
|
|
200
|
+
const entityId = listing.entityId;
|
|
201
|
+
const travelTime = fetchedEntities[entityId]?.travelTime;
|
|
202
|
+
|
|
203
|
+
if (travelTime !== undefined && listing.fields) {
|
|
204
|
+
listing.fields.travelTime = travelTime;
|
|
338
205
|
}
|
|
339
206
|
}
|
|
340
|
-
|
|
341
|
-
});
|
|
342
|
-
|
|
343
|
-
console.log('Updated listings with travel times:', updatedAllListings.slice(0, 2));
|
|
344
|
-
setAllListings(updatedAllListings);
|
|
207
|
+
}
|
|
345
208
|
} catch (error) {
|
|
346
209
|
console.error("Failed to fetch listing entities:", error);
|
|
347
210
|
}
|
|
348
211
|
}
|
|
349
212
|
|
|
350
213
|
fetchEntities();
|
|
351
|
-
}, [commuteLocation,
|
|
214
|
+
}, [commuteLocation, allListings, siteConfig.companyId]);
|
|
352
215
|
|
|
353
|
-
// Set listingEntities from passed-in entities (only once on initial load)
|
|
354
|
-
// Entities should be an object: { "rochester, mn": {...}, "albuquerque, nm": {...} }
|
|
355
|
-
// Note: Commute location changes will fetch updated entities with travel times via separate useEffect
|
|
356
216
|
useEffect(() => {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
// Handle both object (production format) and array (for backwards compatibility)
|
|
362
|
-
if (Array.isArray(entities)) {
|
|
363
|
-
// Convert array to object
|
|
364
|
-
const entitiesObj: Record<string, any> = {};
|
|
365
|
-
entities.forEach((entity: any) => {
|
|
366
|
-
if (entity.entityKey) {
|
|
367
|
-
entitiesObj[entity.entityKey.toLowerCase()] = entity;
|
|
368
|
-
}
|
|
369
|
-
});
|
|
370
|
-
console.log('Set listingEntities from entities array:', entitiesObj);
|
|
371
|
-
setListingEntities(entitiesObj);
|
|
372
|
-
} else if (typeof entities === 'object') {
|
|
373
|
-
// Normalize keys to lowercase for production format
|
|
374
|
-
const normalizedEntities: Record<string, any> = {};
|
|
375
|
-
Object.keys(entities).forEach(key => {
|
|
376
|
-
normalizedEntities[key.toLowerCase()] = entities[key];
|
|
377
|
-
});
|
|
378
|
-
console.log('Set listingEntities from entities object:', normalizedEntities);
|
|
379
|
-
setListingEntities(normalizedEntities);
|
|
380
|
-
}
|
|
381
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
382
|
-
}, []); // Empty deps - only run once on mount, entities are static data
|
|
383
|
-
|
|
384
|
-
// Set listings from passed-in data
|
|
385
|
-
useEffect(() => {
|
|
386
|
-
if (!listings || listings.length === 0) {
|
|
387
|
-
setLoading(false);
|
|
388
|
-
return;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
setLoading(true);
|
|
217
|
+
const handleFetchListings = async () => {
|
|
218
|
+
if (!getStorageObject(localStorageKey + 'listings') ?? [].length) {
|
|
219
|
+
setLoading(true);
|
|
220
|
+
}
|
|
392
221
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
const
|
|
401
|
-
|
|
222
|
+
try {
|
|
223
|
+
const {
|
|
224
|
+
listingsResult,
|
|
225
|
+
fetchedEntities,
|
|
226
|
+
distinctItems
|
|
227
|
+
} = await fetchListings(commuteLocation, entities, listings, getListingEntitiesCallback);
|
|
228
|
+
if (defaultFilters) {
|
|
229
|
+
const filteredListings = listingsResult.filter(listing => {
|
|
230
|
+
if (!listing.fields) return false;
|
|
231
|
+
|
|
232
|
+
return Object.keys(defaultFilters).every(filterKey => {
|
|
233
|
+
const filterValues = defaultFilters[filterKey as keyof typeof defaultFilters];
|
|
234
|
+
const listingValue = listing.fields ? listing.fields[filterKey as keyof typeof listing.fields] : null;
|
|
235
|
+
return filterValues.includes(listingValue);
|
|
236
|
+
});
|
|
402
237
|
});
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
setLoading(false);
|
|
417
|
-
}, [listings]);
|
|
418
|
-
|
|
419
|
-
useEffect(() => {
|
|
420
|
-
const processListings = async () => {
|
|
421
|
-
// Don't process if allListings hasn't been loaded yet
|
|
422
|
-
if (allListings.length === 0) {
|
|
423
|
-
console.log('processListings: Skipping - allListings is empty');
|
|
424
|
-
return;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
let filteredListings: Listing[];
|
|
428
|
-
let tempSelectedFilters = selectedFilters;
|
|
429
|
-
let tempQuery = query;
|
|
238
|
+
setAllListings(filteredListings);
|
|
239
|
+
} else {
|
|
240
|
+
setAllListings(listingsResult);
|
|
241
|
+
}
|
|
242
|
+
setListingEntities(fetchedEntities);
|
|
243
|
+
setMapItems(distinctItems);
|
|
244
|
+
} catch (error) {
|
|
245
|
+
console.log(error);
|
|
246
|
+
}
|
|
247
|
+
setLoading(false);
|
|
248
|
+
};
|
|
249
|
+
handleFetchListings();
|
|
250
|
+
}, [query, siteConfig, commuteLocation]);
|
|
430
251
|
|
|
431
|
-
|
|
252
|
+
useEffect(() => {
|
|
253
|
+
const processListings = () => {
|
|
254
|
+
let filteredListings: Listing[];
|
|
255
|
+
let tempSelectedFilters = selectedFilters;
|
|
256
|
+
let tempQuery = query;
|
|
432
257
|
|
|
433
|
-
|
|
258
|
+
const { mapItems, filteredListings: tempFilteredListings } = applyFilters(
|
|
434
259
|
allListings,
|
|
435
260
|
tempSelectedFilters,
|
|
436
261
|
tempQuery,
|
|
437
262
|
listingEntities,
|
|
438
263
|
favorites,
|
|
439
|
-
siteConfig
|
|
440
|
-
firstLoad
|
|
264
|
+
siteConfig
|
|
441
265
|
);
|
|
442
266
|
filteredListings = tempFilteredListings;
|
|
443
267
|
|
|
444
268
|
if (filterByFavorites) {
|
|
445
269
|
filteredListings = filteredListings.filter((x: Listing) => favorites.includes(x.id));
|
|
446
270
|
}
|
|
447
|
-
|
|
448
|
-
// Apply map bounds filtering if enabled in siteConfig
|
|
449
|
-
if (siteConfig.filterByMapBounds && mapBounds) {
|
|
450
|
-
filteredListings = filteredListings.filter((listing: Listing) => {
|
|
451
|
-
const lat = listing.mapDetails?.latitude;
|
|
452
|
-
const lng = listing.mapDetails?.longitude;
|
|
453
|
-
if (!lat || !lng) return false;
|
|
454
|
-
return mapBounds.contains({ lat, lng });
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
// Batch state updates together
|
|
459
271
|
setNewFilteredListings(filteredListings);
|
|
460
|
-
setMapItems(mapItems);
|
|
461
|
-
|
|
462
272
|
if (firstLoad && tempSelectedFilters) {
|
|
463
273
|
// Update URL with filters if needed
|
|
464
274
|
} else if (Object.keys(tempSelectedFilters).length === 0 && !firstLoad) {
|
|
@@ -466,42 +276,16 @@ useEffect(() => {
|
|
|
466
276
|
} else if (!firstLoad) {
|
|
467
277
|
setStorageObject(localStorageKey + 'selectedFilters', tempSelectedFilters);
|
|
468
278
|
}
|
|
469
|
-
if(setFiltersUrl === true
|
|
279
|
+
if(setFiltersUrl === true)
|
|
470
280
|
{
|
|
471
281
|
updateURLWithFilters(tempSelectedFilters, window.location, tempQuery, handleUrlUpdate);
|
|
472
282
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
}
|
|
283
|
+
tempQuery != null ? localStorage.setItem(localStorageKey + 'query', tempQuery) : localStorage.removeItem(localStorageKey + 'query');
|
|
284
|
+
setMapItems(mapItems);
|
|
476
285
|
|
|
477
286
|
if (tempSelectedFilters) {
|
|
478
287
|
const keys = Object.keys(tempSelectedFilters);
|
|
479
288
|
const lastKey = keys[keys.length - 1];
|
|
480
|
-
|
|
481
|
-
// Ensure all filterConfig properties have values
|
|
482
|
-
const normalizedFilterConfig = {
|
|
483
|
-
hideZeroResults: filterConfig?.hideZeroResults ?? false,
|
|
484
|
-
dynamicCounts: filterConfig?.dynamicCounts ?? true,
|
|
485
|
-
showFavorites: filterConfig?.showFavorites ?? true,
|
|
486
|
-
collapsedByDefault: filterConfig?.collapsedByDefault ?? false,
|
|
487
|
-
sortAlphabetically: filterConfig?.sortAlphabetically ?? false,
|
|
488
|
-
classNames: {
|
|
489
|
-
filterContainer: filterConfig?.classNames?.filterContainer ?? '',
|
|
490
|
-
filterContent: filterConfig?.classNames?.filterContent ?? '',
|
|
491
|
-
filterAccordion: filterConfig?.classNames?.filterAccordion ?? '',
|
|
492
|
-
filterAccordionHeader: filterConfig?.classNames?.filterAccordionHeader ?? '',
|
|
493
|
-
filterAccordionContent: filterConfig?.classNames?.filterAccordionContent ?? '',
|
|
494
|
-
filterItem: filterConfig?.classNames?.filterItem ?? '',
|
|
495
|
-
filterItemLabel: filterConfig?.classNames?.filterItemLabel ?? '',
|
|
496
|
-
filterItemCheckbox: filterConfig?.classNames?.filterItemCheckbox ?? '',
|
|
497
|
-
filterItemCount: filterConfig?.classNames?.filterItemCount ?? '',
|
|
498
|
-
searchInput: filterConfig?.classNames?.searchInput ?? '',
|
|
499
|
-
resetButton: filterConfig?.classNames?.resetButton ?? '',
|
|
500
|
-
showJobsButton: filterConfig?.classNames?.showJobsButton ?? '',
|
|
501
|
-
filterFooter: filterConfig?.classNames?.filterFooter ?? ''
|
|
502
|
-
}
|
|
503
|
-
};
|
|
504
|
-
|
|
505
289
|
const options = generateFilterOptions(
|
|
506
290
|
filteredListings,
|
|
507
291
|
allListings,
|
|
@@ -509,8 +293,7 @@ useEffect(() => {
|
|
|
509
293
|
filterOptions,
|
|
510
294
|
lastKey,
|
|
511
295
|
favorites,
|
|
512
|
-
tempSelectedFilters
|
|
513
|
-
normalizedFilterConfig
|
|
296
|
+
tempSelectedFilters
|
|
514
297
|
);
|
|
515
298
|
if (options) {
|
|
516
299
|
setFilterOptions(options);
|
|
@@ -520,7 +303,7 @@ useEffect(() => {
|
|
|
520
303
|
};
|
|
521
304
|
|
|
522
305
|
processListings();
|
|
523
|
-
}, [selectedFilters, query, filterByFavorites, favorites
|
|
306
|
+
}, [selectedFilters, query, listingEntities, filterByFavorites, favorites]);
|
|
524
307
|
|
|
525
308
|
const handleFilterListingsByLocation = (selectedLocation: any) => {
|
|
526
309
|
const { filteredListings } = filterListingsByLocation(
|
|
@@ -538,7 +321,6 @@ useEffect(() => {
|
|
|
538
321
|
}
|
|
539
322
|
|
|
540
323
|
const handleSettingFavorites = (newFavorites: number[] | null) => {
|
|
541
|
-
if (typeof window === 'undefined') return;
|
|
542
324
|
if (newFavorites == null) {
|
|
543
325
|
localStorage.removeItem(localStorageKey + 'favorites');
|
|
544
326
|
} else {
|
|
@@ -567,7 +349,6 @@ useEffect(() => {
|
|
|
567
349
|
setMobileTab,
|
|
568
350
|
mobileTab,
|
|
569
351
|
siteConfig,
|
|
570
|
-
googleMapsApiKey,
|
|
571
352
|
favorites,
|
|
572
353
|
handleSettingFavorites,
|
|
573
354
|
resetEntityFilter,
|
|
@@ -575,7 +356,6 @@ useEffect(() => {
|
|
|
575
356
|
filterByFavorites,
|
|
576
357
|
commuteLocation,
|
|
577
358
|
setCommuteLocation,
|
|
578
|
-
setMapBounds,
|
|
579
359
|
navigateToDetails,
|
|
580
360
|
navigateToEasyApply,
|
|
581
361
|
Link,
|
|
@@ -589,9 +369,7 @@ useEffect(() => {
|
|
|
589
369
|
defaultFilters,
|
|
590
370
|
hiddenFilters,
|
|
591
371
|
containerStyle,
|
|
592
|
-
ExpandListComponent
|
|
593
|
-
mobileDetailsCallback, noEntities,
|
|
594
|
-
filterConfig
|
|
372
|
+
ExpandListComponent
|
|
595
373
|
}}>
|
|
596
374
|
{children}
|
|
597
375
|
</MapListContext.Provider>
|
|
@@ -10,7 +10,7 @@ const PlacesContext = createContext();
|
|
|
10
10
|
|
|
11
11
|
export const usePlaces = () => useContext(PlacesContext);
|
|
12
12
|
|
|
13
|
-
export const PlacesProvider = ({ children, placeMappings, markerColors, additionalMapMarkers, googleMapsApiKey
|
|
13
|
+
export const PlacesProvider = ({ children, placeMappings, markerColors, additionalMapMarkers, googleMapsApiKey }) => {
|
|
14
14
|
const { selectedPlaces, zoom, center } = useMap();
|
|
15
15
|
const [poiMarkers, setPoiMarkers] = useState({ markers: [], icon: null });
|
|
16
16
|
const [currentCenter, setCurrentCenter] = useState(center);
|
|
@@ -34,7 +34,7 @@ export const PlacesProvider = ({ children, placeMappings, markerColors, addition
|
|
|
34
34
|
}, [currentZoom]);
|
|
35
35
|
|
|
36
36
|
useEffect(() => {
|
|
37
|
-
if (!selectedPlaces || selectedPlaces.length
|
|
37
|
+
if (!selectedPlaces || (!selectedPlaces.length > 0) || !center || currentZoom < 12) {
|
|
38
38
|
setPoiMarkers({ markers: [], icon: null });
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
@@ -82,7 +82,7 @@ export const PlacesProvider = ({ children, placeMappings, markerColors, addition
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
fetchPlaces();
|
|
85
|
-
}, [selectedPlaces, currentZoom, currentCenter, placeMappings, markerColors.placeMarkers, googleMapsApiKey, getRadiusForZoom, center
|
|
85
|
+
}, [selectedPlaces, currentZoom, currentCenter, placeMappings, markerColors.placeMarkers, googleMapsApiKey, getRadiusForZoom, center]);
|
|
86
86
|
|
|
87
87
|
return (
|
|
88
88
|
<PlacesContext.Provider value={{
|
|
@@ -10,8 +10,7 @@ export const ThemeProvider = ({
|
|
|
10
10
|
primary,
|
|
11
11
|
primaryDark,
|
|
12
12
|
secondary,
|
|
13
|
-
secondaryDark
|
|
14
|
-
borderDefault
|
|
13
|
+
secondaryDark
|
|
15
14
|
}) => {
|
|
16
15
|
useEffect(() => {
|
|
17
16
|
document.documentElement.style.setProperty('--ui-text', uiText);
|
|
@@ -20,10 +19,7 @@ export const ThemeProvider = ({
|
|
|
20
19
|
document.documentElement.style.setProperty('--primary-dark', primaryDark);
|
|
21
20
|
document.documentElement.style.setProperty('--secondary', secondary);
|
|
22
21
|
document.documentElement.style.setProperty('--secondary-dark', secondaryDark);
|
|
23
|
-
|
|
24
|
-
document.documentElement.style.setProperty('--hc-border-default', borderDefault);
|
|
25
|
-
}
|
|
26
|
-
}, [uiText, uiAccent, primary, primaryDark, secondary, secondaryDark, borderDefault]);
|
|
22
|
+
}, [uiText, uiAccent, primary, primaryDark, secondary, secondaryDark]);
|
|
27
23
|
|
|
28
24
|
return (
|
|
29
25
|
<ThemeContext.Provider
|
|
@@ -33,8 +29,7 @@ export const ThemeProvider = ({
|
|
|
33
29
|
primary,
|
|
34
30
|
primaryDark,
|
|
35
31
|
secondary,
|
|
36
|
-
secondaryDark
|
|
37
|
-
borderDefault
|
|
32
|
+
secondaryDark
|
|
38
33
|
}}
|
|
39
34
|
>
|
|
40
35
|
{children}
|
package/src/hooks/useList.js
CHANGED
|
@@ -40,9 +40,7 @@ const useListLogic = filteredListings => {
|
|
|
40
40
|
}, [filteredListings.length, itemLimit]);
|
|
41
41
|
|
|
42
42
|
useEffect(() => {
|
|
43
|
-
|
|
44
|
-
localStorage.setItem('scrollPosition', scrollPosition.toString());
|
|
45
|
-
}
|
|
43
|
+
localStorage.setItem('scrollPosition', scrollPosition.toString());
|
|
46
44
|
}, [scrollPosition]);
|
|
47
45
|
|
|
48
46
|
useEffect(() => {
|
package/src/index.js
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import './styles/index.css';
|
|
2
1
|
import HireControlMap from '~/components/HireControlMap';
|
|
3
|
-
import { ComponentProvider, useComponents, withComponents, defaultComponents } from '~/contexts/componentContext';
|
|
4
2
|
|
|
5
|
-
// Export main component
|
|
6
3
|
export { HireControlMap };
|
|
7
|
-
|
|
8
|
-
// Export component customization utilities
|
|
9
|
-
export { ComponentProvider, useComponents, withComponents, defaultComponents };
|
|
10
|
-
|
|
11
|
-
// Export all default components for easy override access
|
|
12
|
-
export * from '~/contexts/componentContext';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import api from '~/apis/hcApi';
|
|
2
|
+
import { MapConfig } from '~/types/config/MapConfig';
|
|
3
|
+
|
|
4
|
+
export const getMapConfig = async (): Promise<MapConfig> => {
|
|
5
|
+
try {
|
|
6
|
+
const response = await api.get<MapConfig>(`/MapConfig`);
|
|
7
|
+
return response;
|
|
8
|
+
} catch (error) {
|
|
9
|
+
console.error("Error retrieving map configuration:", error);
|
|
10
|
+
throw error;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
getMapConfig
|
|
16
|
+
};
|