@abcagency/hc-ui-components 1.7.3 → 1.7.5
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/components/HireControlMap.js +2 -1
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js +3 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
- package/dist/components/containers/filter/commute-container.js +11 -3
- package/dist/components/containers/filter/commute-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js +2 -0
- package/dist/components/containers/maps/map-container.js.map +1 -1
- package/dist/components/containers/maps/map-list-container.js +34 -3
- package/dist/components/containers/maps/map-list-container.js.map +1 -1
- package/dist/components/modules/filter/commute.js +3 -1
- package/dist/components/modules/filter/commute.js.map +1 -1
- package/dist/components/modules/filter/index.js +1 -0
- package/dist/components/modules/filter/index.js.map +1 -1
- package/dist/components/modules/filter/item.js +1 -0
- package/dist/components/modules/filter/item.js.map +1 -1
- package/dist/components/modules/list/list-item/list-item.js +85 -14
- package/dist/components/modules/list/list-item/list-item.js.map +1 -1
- package/dist/contexts/mapContext.js +13 -7
- package/dist/contexts/mapContext.js.map +1 -1
- package/dist/contexts/mapListContext.js +16 -3
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/hooks/useList.js +3 -1
- 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/@algolia/requester-node-http/dist/requester.http.js +82 -0
- package/dist/node_modules/@algolia/requester-node-http/dist/requester.http.js.map +1 -0
- package/dist/node_modules/algoliasearch/dist/lite/builds/node.js +269 -0
- package/dist/node_modules/algoliasearch/dist/lite/builds/node.js.map +1 -0
- package/dist/styles/index.css +1 -1
- package/package.json +4 -1
- package/src/components/HireControlMap.js +0 -3
- package/src/components/containers/accordions/map-accordion-item-container.js +3 -1
- package/src/components/containers/filter/commute-container.js +11 -3
- package/src/components/containers/maps/map-container.js +2 -0
- package/src/components/containers/maps/map-list-container.js +30 -3
- package/src/components/modules/filter/commute.js +7 -5
- package/src/components/modules/filter/index.js +2 -0
- package/src/components/modules/filter/item.js +1 -0
- package/src/components/modules/list/list-item/list-item.jsx +97 -24
- package/src/contexts/mapContext.tsx +12 -6
- package/src/contexts/mapListContext.tsx +13 -3
- package/src/hooks/useList.js +3 -1
- package/src/index.js +1 -2
- package/src/components/modules/skeleton/map-skeleton.js +0 -51
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapListContext.js","sources":["../../src/contexts/mapListContext.tsx"],"sourcesContent":["import React, { createContext, useState, useEffect, useContext, ReactNode } from 'react';\n\nimport { generateFilterOptions, applyFilters, filterListingsByLocation } from '~/util/filterUtil';\nimport { getStorageObject, setStorageObject } from '~/util/localStorageUtil';\nimport { updateURLWithFilters, filtersFromURL } from '~/util/urlFilterUtil';\n\nimport { getListingEntities } from \"~/services/listingEntityService\";\nimport fetchListings from '~/services/listingAggregatorService';\n\nimport { Listing } from '~/types/Listings';\nimport { ListingEntity } from '~/types/ListingEntity';\nimport { Recruiter } from '~/types/Recruiter';\nimport { MapConfig, MapConfig as SiteConfig } from '~/types/config/MapConfig';\nimport { get } from 'http';\n\ninterface MapListContextProps {\n loading: boolean;\n allListings: Listing[];\n filteredListings: Listing[];\n mapItems: any;\n query: string | null;\n setNewFilteredListings: (filteredListings: Listing[]) => void;\n setQuery: (query: string | null) => void;\n listingEntities: Record<number, ListingEntity> | null;\n selectedFilters: Record<string, any>;\n setSelectedFilters: (filters: Record<string, any>) => void;\n filterOptions: any;\n recruiters: Record<number, Recruiter>;\n handleFilterListingsByLocation: (selectedLocation: any) => void;\n filterDialogIsOpen: boolean;\n setFilterDialogIsOpen: (isOpen: boolean) => void;\n setMobileTab: (tab: string) => void;\n mobileTab: string;\n siteConfig: SiteConfig;\n googleMapsApiKey?: string;\n favorites: number[];\n resetEntityFilter: () => void;\n handleSettingFavorites: (favorites: number[] | null) => void;\n setFilterByFavorites: (filter: boolean) => void;\n filterByFavorites: boolean;\n commuteLocation: any | null;\n setCommuteLocation: (location: any | null) => void;\n navigateToDetails: (id: number) => void;\n navigateToEasyApply: (id: number) => void;\n Link: React.ComponentType<any>;\n linkFormat: string;\n easyApplyUrl: string;\n easyApplyText: string;\n\tisIframe: boolean;\n sortSetting: { field: string; type: string };\n setSortSetting: (setting: { field: string; type: string }) => void;\n trackEvent: (event: string) => void;\n defaultFilters?: Record<string, any>;\n hiddenFilters?: string[];\n containerStyle?: any;\n ExpandListComponent?: React.ComponentType<{ listing: any }> | ((listing: any) => JSX.Element) | null;\n noEntities?: boolean;\n filterConfig?: {\n hideZeroResults?: boolean;\n dynamicCounts?: boolean;\n showFavorites?: boolean;\n collapsedByDefault?: boolean;\n sortAlphabetically?: boolean;\n classNames?: {\n filterContainer?: string;\n filterContent?: string;\n filterAccordion?: string;\n filterAccordionHeader?: string;\n filterAccordionContent?: string;\n filterItem?: string;\n filterItemLabel?: string;\n filterItemCheckbox?: string;\n filterItemCount?: string;\n searchInput?: string;\n resetButton?: string;\n showJobsButton?: string;\n filterFooter?: string;\n };\n };\n}\n\nconst MapListContext = createContext<MapListContextProps | undefined>(undefined);\n\nexport const useMapList = () => {\n\tconst context = useContext(MapListContext);\n\tif (!context) {\n\t\tthrow new Error('useMapList must be used within a MapListProvider');\n\t}\n\treturn context;\n};\n\nconst getQuery = (localStorageKey: string = ''): string | null => {\n\tlet query: string | null = null;\n\tif (typeof window !== 'undefined') {\n\t\tquery = localStorage.getItem(localStorageKey + 'query');\n\t}\n\treturn query;\n};\n\ninterface MapListProviderProps {\n children: ReactNode;\n siteConfig: MapConfig;\n googleMapsApiKey?: string;\n resetFilters: boolean;\n navigateToDetails: (id: number) => void;\n navigateToEasyApply: (id: number) => void;\n Link: React.ComponentType<any>;\n linkFormat: string;\n easyApplyUrl: string;\n easyApplyText: string;\n\tisIframe: boolean;\n trackEvent: (event: string) => void;\n listings?: Listing[];\n\tentities?: ListingEntity[];\n setFiltersUrl?:boolean;\n hiddenFilters?: string[];\n handleUrlUpdate: (searchParams: string) => void;\n defaultFilters?: Record<string, any>;\n containerStyle?: any;\n\tlocalStorageKey: string;\n\tgetListingEntitiesCallback?: (origin?: string) => Promise<any>;\n ExpandListComponent?: React.ComponentType<{ listing: Listing }> | ((listing: Listing) => JSX.Element) | null;\n hideMap?: boolean;\n hideFilters?: boolean;\n noEntities?: boolean;\n filterConfig?: {\n hideZeroResults?: boolean;\n dynamicCounts?: boolean;\n showFavorites?: boolean;\n collapsedByDefault?: boolean;\n sortAlphabetically?: boolean;\n classNames?: {\n filterContainer?: string;\n filterContent?: string;\n filterAccordion?: string;\n filterAccordionHeader?: string;\n filterAccordionContent?: string;\n filterItem?: string;\n filterItemLabel?: string;\n filterItemCheckbox?: string;\n filterItemCount?: string;\n searchInput?: string;\n resetButton?: string;\n showJobsButton?: string;\n filterFooter?: string;\n };\n };\n}\n\nexport const MapListProvider: React.FC<MapListProviderProps> = ({\n\tchildren,\n\tsiteConfig,\n\tgoogleMapsApiKey,\n\tresetFilters,\n\tnavigateToDetails,\n\tnavigateToEasyApply,\n\tLink,\n\tlinkFormat,\n\teasyApplyUrl,\n\teasyApplyText,\n\tisIframe,\n\ttrackEvent,\n\tlistings = [],\n\tentities = [],\n\tsetFiltersUrl,\n\thiddenFilters,\n\thandleUrlUpdate,\n\tdefaultFilters,\n\tcontainerStyle,\n\tExpandListComponent,\n\tgetListingEntitiesCallback,\n\tlocalStorageKey,\n\thideMap = false,\n\thideFilters = false,\n\tnoEntities = false,\n\tfilterConfig = {\n\t\thideZeroResults: false,\n\t\tdynamicCounts: true,\n\t\tshowFavorites: true,\n\t\tcollapsedByDefault: false,\n\t\tsortAlphabetically: false,\n\t\tclassNames: {\n\t\t\tfilterContainer: '',\n\t\t\tfilterContent: '',\n\t\t\tfilterAccordion: '',\n\t\t\tfilterAccordionHeader: '',\n\t\t\tfilterAccordionContent: '',\n\t\t\tfilterItem: '',\n\t\t\tfilterItemLabel: '',\n\t\t\tfilterItemCheckbox: '',\n\t\t\tfilterItemCount: '',\n\t\t\tsearchInput: '',\n\t\t\tresetButton: '',\n\t\t\tshowJobsButton: '',\n\t\t\tfilterFooter: ''\n\t\t}\n\t}\n}) => {\n\tconst firstLoadFilters = () =>{\n\t\tlet urlData = filtersFromURL(window.location);\n\t\tlet urlFilters = urlData?.filters;\n\n\t\t// If ls-ignore=true is in URL, don't load from localStorage\n\t\tif (urlData?.lsIgnore) {\n\t\t\treturn urlFilters || {};\n\t\t}\n\n\t\treturn (setFiltersUrl === true && urlFilters && Object.keys(urlFilters).length > 0) ? urlFilters : getStorageObject(localStorageKey + 'selectedFilters', {}) || {}\n\t}\n\n\tconst firstLoadQuery = (): string | null => {\n\t\tif (resetFilters) return null;\n\t\t// Check URL first\n\t\tconst urlData = filtersFromURL(window.location);\n\n\t\t// If ls-ignore=true is in URL, don't load from localStorage\n\t\tif (urlData?.lsIgnore) {\n\t\t\treturn urlData?.query || null;\n\t\t}\n\n\t\tif (setFiltersUrl === true && urlData?.query) {\n\t\t\treturn urlData.query;\n\t\t}\n\t\t// Fall back to localStorage\n\t\treturn getQuery(localStorageKey);\n\t}\n\n\tconst [allListings, setAllListings] = useState<Listing[]>([]);\n\tconst [filteredListings, setFilteredListings] = useState<Listing[]>([]);\n\tconst [loading, setLoading] = useState<boolean>(false);\n\tconst [mapItems, setMapItems] = useState<any>(getStorageObject(localStorageKey + 'mapItems', []) || []);\n\tconst [query, setQuery] = useState<string | null>(() => firstLoadQuery());\n\tconst [sortSetting, setSortSetting] = useState<{ field: string; type: string }>(getStorageObject(localStorageKey + 'sortSetting', { field: 'position', type: 'asc' }) || { field: 'position', type: 'asc' });\n\tconst [listingEntities, setListingEntities] = useState<Record<number, ListingEntity> | null>({});\n\tconst [firstLoad, setFirstLoad] = useState<boolean>(true);\n\tconst [commuteLocation, setCommuteLocation] = useState<any | null>(getStorageObject(localStorageKey + 'commuteLocation'));\n\tconst [selectedFilters, setSelectedFilters] = useState<Record<string, any>>(() => resetFilters ? {} : firstLoadFilters());\n\tconst [filterOptions, setFilterOptions] = useState<any>();\n\tconst [recruiters, setRecruiters] = useState<Record<number, Recruiter>>({});\n\tconst [filterDialogIsOpen, setFilterDialogIsOpen] = useState<boolean>(false);\n\tconst [mobileTab, setMobileTab] = useState<string>(\"listTab\");\n\tconst [favorites, setFavorites] = useState<number[]>([]);\n\tconst [filterByFavorites, setFilterByFavorites] = useState<boolean>(false);\n\n\tconst setNewFilteredListings = (filteredListings: Listing[]) => {\n\t\tsetFilteredListings(filteredListings);\n\t};\n\n\tuseEffect(() => {\n\t\tif (!sortSetting) return;\n\t\tlocalStorage.setItem(localStorageKey + 'sortSetting', JSON.stringify(sortSetting));\n\t}, [sortSetting, localStorageKey]);\n\n\tuseEffect(() => {\n\t\tconst loadedFavorites = JSON.parse(localStorage.getItem(localStorageKey + 'favorites') || '[]');\n\t\tsetFavorites(loadedFavorites);\n\t}, [localStorageKey]);\n\n\tuseEffect(() => {\n\t\tsetStorageObject(localStorageKey + \"commuteLocation\", commuteLocation);\n\t}, [commuteLocation, localStorageKey]);\n\n\n\tuseEffect(() => {\n\t\tif (!commuteLocation || noEntities) return;\n\n\t\tasync function fetchEntities() {\n\t\t\ttry {\n\t\t\t\tlet fetchedEntities;\n\t\t\t\tif (getListingEntitiesCallback) {\n\t\t\t\t\tfetchedEntities = await getListingEntitiesCallback(`${commuteLocation.lat}, ${commuteLocation.lng}`);\n\t\t\t\t} else {\n\t\t\t\t\tfetchedEntities = await getListingEntities(`${commuteLocation.lat}, ${commuteLocation.lng}`);\n\t\t\t\t}\n\t\t\t\tsetListingEntities(fetchedEntities);\n\t\t\t\t// Update travelTime on listings\n\t\t\t\tconst newFilteredListings: Listing[] = [...filteredListings];\n\t\t\t\tfor (let i = 0; i < allListings.length; i++) {\n\t\t\t\t\tconst listing = newFilteredListings[i];\n\t\t\t\t\tif (\n\t\t\t\t\t\tlisting &&\n\t\t\t\t\t\tlisting.fields &&\n\t\t\t\t\t\tlisting.fields.entityKey &&\n\t\t\t\t\t\tlisting.fields.entityKey !== ''\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst entityKey = listing.fields.entityKey;\n\t\t\t\t\t\t// Try exact match first, then lowercase match for case-insensitive lookup\n\t\t\t\t\t\tconst travelTime = (fetchedEntities[entityKey] || fetchedEntities[entityKey.toLowerCase()])?.travelTime;\n\t\t\t\t\t\tif (travelTime !== undefined && listing.fields) {\n\t\t\t\t\t\t\tlisting.fields.travelTime = travelTime;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Failed to fetch listing entities:\", error);\n\t\t\t}\n\t\t}\n\n\t\tfetchEntities();\n\t}, [commuteLocation, allListings, siteConfig.companyId, getListingEntitiesCallback, noEntities]);\n\n\tuseEffect(() => {\n\t\tconst handleFetchListings = async () => {\n\t\tif (!(getStorageObject(localStorageKey + 'listings', []) || []).length) {\n\t\t\tsetLoading(true);\n\t\t}\n\n\t\ttry {\n\t\t\tconst {\n\t\t\t\tlistingsResult,\n\t\t\t\tentitiesByKey,\n\t\t\t\tdistinctItems\n\t\t\t} = await fetchListings(commuteLocation, entities, listings, getListingEntitiesCallback, noEntities);\n\t\t\tif (defaultFilters) {\n\t\t\t\tconst filteredListings = listingsResult.filter(listing => {\n\t\t\t\tif (!listing.fields) return false;\n\n\t\t\t\treturn Object.keys(defaultFilters).every(filterKey => {\n\t\t\t\t\tconst filterValues = defaultFilters[filterKey as keyof typeof defaultFilters];\n\t\t\t\t\tconst listingValue = listing.fields ? listing.fields[filterKey as keyof typeof listing.fields] : null;\n\t\t\t\t\treturn filterValues.includes(listingValue);\n\t\t\t\t});\n\t\t\t});\n\t\t\tsetAllListings(filteredListings);\n\t\t} else {\n\t\t\tsetAllListings(listingsResult);\n\t\t}\n\t\t\tconsole.log('handleFetchListings: Set allListings to', listingsResult.length, 'items');\n\t\t\tsetListingEntities(entitiesByKey);\n\t\t\t\tsetMapItems(distinctItems);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.log(error);\n\t\t\t}\n\t\t\tsetLoading(false);\n\t\t};\n\t\thandleFetchListings();\n\t}, [siteConfig, commuteLocation]);\n\n\tuseEffect(() => {\n\t\tconst processListings = async () => {\n\t\t\t// Don't process if allListings hasn't been loaded yet\n\t\t\tif (allListings.length === 0) {\n\t\t\t\tconsole.log('processListings: Skipping - allListings is empty');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet filteredListings: Listing[];\n\t\t\tlet tempSelectedFilters = selectedFilters;\n\t\t\tlet tempQuery = query;\n\n\t\t\tconsole.log('processListings: Running with query:', tempQuery, 'and', allListings.length, 'listings');\n\n\t\t\tconst { mapItems, filteredListings: tempFilteredListings } = await applyFilters(\n\t\t\t\tallListings,\n\t\t\t\ttempSelectedFilters,\n\t\t\t\ttempQuery,\n\t\t\t\tlistingEntities,\n\t\t\t\tfavorites,\n\t\t\t\tsiteConfig\n\t\t\t);\n\t\t\tfilteredListings = tempFilteredListings;\n\n\t\t\tif (filterByFavorites) {\n\t\t\t\tfilteredListings = filteredListings.filter((x: Listing) => favorites.includes(x.id));\n\t\t\t}\n\n\t\t\t// Batch state updates together\n\t\t\tsetNewFilteredListings(filteredListings);\n\t\t\tsetMapItems(mapItems);\n\n\t\t\tif (firstLoad && tempSelectedFilters) {\n\t\t\t\t// Update URL with filters if needed\n\t\t\t} else if (Object.keys(tempSelectedFilters).length === 0 && !firstLoad) {\n\t\t\t\tlocalStorage.removeItem(localStorageKey + 'selectedFilters');\n\t\t\t} else if (!firstLoad) {\n\t\t\t\tsetStorageObject(localStorageKey + 'selectedFilters', tempSelectedFilters);\n\t\t\t}\n\t\t\tif(setFiltersUrl === true)\n\t\t\t{\n\t\t\t\tupdateURLWithFilters(tempSelectedFilters, window.location, tempQuery, handleUrlUpdate);\n\t\t\t}\n\t\t\ttempQuery != null ? localStorage.setItem(localStorageKey + 'query', tempQuery) : localStorage.removeItem(localStorageKey + 'query');\n\n\t\t\tif (tempSelectedFilters) {\n\t\t\t\tconst keys = Object.keys(tempSelectedFilters);\n\t\t\t\tconst lastKey = keys[keys.length - 1];\n\n\t\t\t\t// Ensure all filterConfig properties have values\n\t\t\t\tconst normalizedFilterConfig = {\n\t\t\t\t\thideZeroResults: filterConfig?.hideZeroResults ?? false,\n\t\t\t\t\tdynamicCounts: filterConfig?.dynamicCounts ?? true,\n\t\t\t\t\tshowFavorites: filterConfig?.showFavorites ?? true,\n\t\t\t\t\tcollapsedByDefault: filterConfig?.collapsedByDefault ?? false,\n\t\t\t\t\tsortAlphabetically: filterConfig?.sortAlphabetically ?? false,\n\t\t\t\t\tclassNames: {\n\t\t\t\t\t\tfilterContainer: filterConfig?.classNames?.filterContainer ?? '',\n\t\t\t\t\t\tfilterContent: filterConfig?.classNames?.filterContent ?? '',\n\t\t\t\t\t\tfilterAccordion: filterConfig?.classNames?.filterAccordion ?? '',\n\t\t\t\t\t\tfilterAccordionHeader: filterConfig?.classNames?.filterAccordionHeader ?? '',\n\t\t\t\t\t\tfilterAccordionContent: filterConfig?.classNames?.filterAccordionContent ?? '',\n\t\t\t\t\t\tfilterItem: filterConfig?.classNames?.filterItem ?? '',\n\t\t\t\t\t\tfilterItemLabel: filterConfig?.classNames?.filterItemLabel ?? '',\n\t\t\t\t\t\tfilterItemCheckbox: filterConfig?.classNames?.filterItemCheckbox ?? '',\n\t\t\t\t\t\tfilterItemCount: filterConfig?.classNames?.filterItemCount ?? '',\n\t\t\t\t\t\tsearchInput: filterConfig?.classNames?.searchInput ?? '',\n\t\t\t\t\t\tresetButton: filterConfig?.classNames?.resetButton ?? '',\n\t\t\t\t\t\tshowJobsButton: filterConfig?.classNames?.showJobsButton ?? '',\n\t\t\t\t\t\tfilterFooter: filterConfig?.classNames?.filterFooter ?? ''\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tconst options = generateFilterOptions(\n\t\t\t\t\tfilteredListings,\n\t\t\t\t\tallListings,\n\t\t\t\t\tsiteConfig,\n\t\t\t\t\tfilterOptions,\n\t\t\t\t\tlastKey,\n\t\t\t\t\tfavorites,\n\t\t\t\t\ttempSelectedFilters,\n\t\t\t\t\tnormalizedFilterConfig\n\t\t\t\t);\n\t\t\t\tif (options) {\n\t\t\t\t\tsetFilterOptions(options);\n\t\t\t\t\tif (firstLoad) setFirstLoad(false);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tprocessListings();\n\t}, [selectedFilters, query, listingEntities, filterByFavorites, favorites, allListings]);\n\n\tconst handleFilterListingsByLocation = (selectedLocation: any) => {\n\t\tconst { filteredListings } = filterListingsByLocation(\n\t\t\tallListings,\n\t\t\tselectedLocation,\n\t\t\tlistingEntities\n\t\t);\n\t\tsetNewFilteredListings(filteredListings);\n\t};\n\n\tconst resetEntityFilter = () => {\n\t\tlet newFilters = {...selectedFilters};\n\t\tdelete newFilters.entityId;\n\t\tsetSelectedFilters(newFilters);\n\t}\n\n\tconst handleSettingFavorites = (newFavorites: number[] | null) => {\n\t\tif (newFavorites == null) {\n\t\t\tlocalStorage.removeItem(localStorageKey + 'favorites');\n\t\t} else {\n\t\t\tsetFavorites(newFavorites);\n\t\t\tlocalStorage.setItem(localStorageKey + 'favorites', JSON.stringify(newFavorites));\n\t\t}\n\t};\n\n\treturn (\n\t\t<MapListContext.Provider value={{\n\t\t\tloading,\n\t\t\tallListings,\n\t\t\tfilteredListings,\n\t\t\tmapItems,\n\t\t\tquery,\n\t\t\tsetNewFilteredListings,\n\t\t\tsetQuery,\n\t\t\tlistingEntities,\n\t\t\tselectedFilters,\n\t\t\tsetSelectedFilters,\n\t\t\tfilterOptions,\n\t\t\trecruiters,\n\t\t\thandleFilterListingsByLocation,\n\t\t\tfilterDialogIsOpen,\n\t\t\tsetFilterDialogIsOpen,\n\t\t\tsetMobileTab,\n\t\t\tmobileTab,\n\t\t\tsiteConfig,\n\t\t\tgoogleMapsApiKey,\n\t\t\tfavorites,\n\t\t\thandleSettingFavorites,\n\t\t\tresetEntityFilter,\n\t\t\tsetFilterByFavorites,\n\t\t\tfilterByFavorites,\n\t\t\tcommuteLocation,\n\t\t\tsetCommuteLocation,\n\t\t\tnavigateToDetails,\n\t\t\tnavigateToEasyApply,\n\t\t\tLink,\n\t\t\tlinkFormat,\n\t\t\teasyApplyUrl,\n\t\t\teasyApplyText,\n\t\t\tisIframe,\n\t\t\tsortSetting,\n\t\t\tsetSortSetting,\n\t\t\ttrackEvent,\n\t\t\tdefaultFilters,\n\t\t\thiddenFilters,\n\t\t\tcontainerStyle,\n\t\t\tExpandListComponent,\n\t\t\tnoEntities,\n\t\t\tfilterConfig\n\t\t}}>\n\t\t\t{children}\n\t\t</MapListContext.Provider>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;AAiFA,MAAM,cAAc,GAAG,aAAa,CAAkC,SAAS,CAAC,CAAC;AAE1E,MAAM,UAAU,GAAG,MAAK;AAC9B,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE;AACb,QAAA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACpE,KAAA;AACD,IAAA,OAAO,OAAO,CAAC;AAChB,EAAE;AAEF,MAAM,QAAQ,GAAG,CAAC,eAA0B,GAAA,EAAE,KAAmB;IAChE,IAAI,KAAK,GAAkB,IAAI,CAAC;AAChC,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAClC,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,eAAe,GAAG,OAAO,CAAC,CAAC;AACxD,KAAA;AACD,IAAA,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAoDK,MAAM,eAAe,GAAmC,CAAC,EAC/D,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,UAAU,EACV,QAAQ,GAAG,EA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,YAAY,CAAC,YAAY,CAAC,CAAC;AAC3B,YAAA,YAAY,CAAC,OAAO,CAAC,eAAe,GAAG,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;AAClF,SAAA;AACF,KAAC,CAAC;AAEF,IAAA,QACC,KAAC,CAAA,aAAA,CAAA,cAAc,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE;YAC/B,OAAO;YACP,WAAW;YACX,gBAAgB;YAChB,QAAQ;YACR,KAAK;YACL,sBAAsB;YACtB,QAAQ;YACR,eAAe;YACf,eAAe;YACf,kBAAkB;YAClB,aAAa;YACb,UAAU;YACV,8BAA8B;YAC9B,kBAAkB;YAClB,qBAAqB;YACrB,YAAY;YACZ,SAAS;YACT,UAAU;YACV,gBAAgB;YAChB,SAAS;YACT,sBAAsB;YACtB,iBAAiB;YACjB,oBAAoB;YACpB,iBAAiB;YACjB,eAAe;YACf,kBAAkB;YAClB,iBAAiB;YACjB,mBAAmB;YACnB,IAAI;YACJ,UAAU;YACV,YAAY;YACZ,aAAa;YACb,QAAQ;YACR,WAAW;YACX,cAAc;YACd,UAAU;YACV,cAAc;YACd,aAAa;YACb,cAAc;YACd,mBAAmB;YACnB,UAAU;YACV,YAAY;SACZ,EACC,EAAA,QAAQ,CACgB,EACzB;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"mapListContext.js","sources":["../../src/contexts/mapListContext.tsx"],"sourcesContent":["import React, { createContext, useState, useEffect, useContext, ReactNode } from 'react';\n\nimport { generateFilterOptions, applyFilters, filterListingsByLocation } from '~/util/filterUtil';\nimport { getStorageObject, setStorageObject } from '~/util/localStorageUtil';\nimport { updateURLWithFilters, filtersFromURL } from '~/util/urlFilterUtil';\n\nimport { getListingEntities } from \"~/services/listingEntityService\";\nimport fetchListings from '~/services/listingAggregatorService';\n\nimport { Listing } from '~/types/Listings';\nimport { ListingEntity } from '~/types/ListingEntity';\nimport { Recruiter } from '~/types/Recruiter';\nimport { MapConfig, MapConfig as SiteConfig } from '~/types/config/MapConfig';\nimport { get } from 'http';\n\ninterface MapListContextProps {\n loading: boolean;\n allListings: Listing[];\n filteredListings: Listing[];\n mapItems: any;\n query: string | null;\n setNewFilteredListings: (filteredListings: Listing[]) => void;\n setQuery: (query: string | null) => void;\n listingEntities: Record<number, ListingEntity> | null;\n selectedFilters: Record<string, any>;\n setSelectedFilters: (filters: Record<string, any>) => void;\n filterOptions: any;\n recruiters: Record<number, Recruiter>;\n handleFilterListingsByLocation: (selectedLocation: any) => void;\n filterDialogIsOpen: boolean;\n setFilterDialogIsOpen: (isOpen: boolean) => void;\n setMobileTab: (tab: string) => void;\n mobileTab: string;\n siteConfig: SiteConfig;\n googleMapsApiKey?: string;\n favorites: number[];\n resetEntityFilter: () => void;\n handleSettingFavorites: (favorites: number[] | null) => void;\n setFilterByFavorites: (filter: boolean) => void;\n filterByFavorites: boolean;\n commuteLocation: any | null;\n setCommuteLocation: (location: any | null) => void;\n navigateToDetails: (id: number) => void;\n navigateToEasyApply: (id: number) => void;\n Link: React.ComponentType<any>;\n linkFormat: string;\n easyApplyUrl: string;\n easyApplyText: string;\n\tisIframe: boolean;\n sortSetting: { field: string; type: string };\n setSortSetting: (setting: { field: string; type: string }) => void;\n trackEvent: (event: string) => void;\n defaultFilters?: Record<string, any>;\n hiddenFilters?: string[];\n containerStyle?: any;\n ExpandListComponent?: React.ComponentType<{ listing: any }> | ((listing: any) => JSX.Element) | null;\n noEntities?: boolean;\n filterConfig?: {\n hideZeroResults?: boolean;\n dynamicCounts?: boolean;\n showFavorites?: boolean;\n collapsedByDefault?: boolean;\n sortAlphabetically?: boolean;\n classNames?: {\n filterContainer?: string;\n filterContent?: string;\n filterAccordion?: string;\n filterAccordionHeader?: string;\n filterAccordionContent?: string;\n filterItem?: string;\n filterItemLabel?: string;\n filterItemCheckbox?: string;\n filterItemCount?: string;\n searchInput?: string;\n resetButton?: string;\n showJobsButton?: string;\n filterFooter?: string;\n };\n };\n}\n\nconst MapListContext = createContext<MapListContextProps | undefined>(undefined);\n\nexport const useMapList = () => {\n\tconst context = useContext(MapListContext);\n\tif (!context) {\n\t\tthrow new Error('useMapList must be used within a MapListProvider');\n\t}\n\treturn context;\n};\n\nconst getQuery = (localStorageKey: string = ''): string | null => {\n\tlet query: string | null = null;\n\tif (typeof window !== 'undefined') {\n\t\tquery = localStorage.getItem(localStorageKey + 'query');\n\t}\n\treturn query;\n};\n\ninterface MapListProviderProps {\n children: ReactNode;\n siteConfig: MapConfig;\n googleMapsApiKey?: string;\n resetFilters: boolean;\n navigateToDetails: (id: number) => void;\n navigateToEasyApply: (id: number) => void;\n Link: React.ComponentType<any>;\n linkFormat: string;\n easyApplyUrl: string;\n easyApplyText: string;\n\tisIframe: boolean;\n trackEvent: (event: string) => void;\n listings?: Listing[];\n\tentities?: ListingEntity[];\n setFiltersUrl?:boolean;\n hiddenFilters?: string[];\n handleUrlUpdate: (searchParams: string) => void;\n defaultFilters?: Record<string, any>;\n containerStyle?: any;\n\tlocalStorageKey: string;\n\tgetListingEntitiesCallback?: (origin?: string) => Promise<any>;\n ExpandListComponent?: React.ComponentType<{ listing: Listing }> | ((listing: Listing) => JSX.Element) | null;\n hideMap?: boolean;\n hideFilters?: boolean;\n noEntities?: boolean;\n filterConfig?: {\n hideZeroResults?: boolean;\n dynamicCounts?: boolean;\n showFavorites?: boolean;\n collapsedByDefault?: boolean;\n sortAlphabetically?: boolean;\n classNames?: {\n filterContainer?: string;\n filterContent?: string;\n filterAccordion?: string;\n filterAccordionHeader?: string;\n filterAccordionContent?: string;\n filterItem?: string;\n filterItemLabel?: string;\n filterItemCheckbox?: string;\n filterItemCount?: string;\n searchInput?: string;\n resetButton?: string;\n showJobsButton?: string;\n filterFooter?: string;\n };\n };\n}\n\nexport const MapListProvider: React.FC<MapListProviderProps> = ({\n\tchildren,\n\tsiteConfig,\n\tgoogleMapsApiKey,\n\tresetFilters,\n\tnavigateToDetails,\n\tnavigateToEasyApply,\n\tLink,\n\tlinkFormat,\n\teasyApplyUrl,\n\teasyApplyText,\n\tisIframe,\n\ttrackEvent,\n\tlistings = [],\n\tentities = [],\n\tsetFiltersUrl,\n\thiddenFilters,\n\thandleUrlUpdate,\n\tdefaultFilters,\n\tcontainerStyle,\n\tExpandListComponent,\n\tgetListingEntitiesCallback,\n\tlocalStorageKey,\n\thideMap = false,\n\thideFilters = false,\n\tnoEntities = false,\n\tfilterConfig = {\n\t\thideZeroResults: false,\n\t\tdynamicCounts: true,\n\t\tshowFavorites: true,\n\t\tcollapsedByDefault: false,\n\t\tsortAlphabetically: false,\n\t\tclassNames: {\n\t\t\tfilterContainer: '',\n\t\t\tfilterContent: '',\n\t\t\tfilterAccordion: '',\n\t\t\tfilterAccordionHeader: '',\n\t\t\tfilterAccordionContent: '',\n\t\t\tfilterItem: '',\n\t\t\tfilterItemLabel: '',\n\t\t\tfilterItemCheckbox: '',\n\t\t\tfilterItemCount: '',\n\t\t\tsearchInput: '',\n\t\t\tresetButton: '',\n\t\t\tshowJobsButton: '',\n\t\t\tfilterFooter: ''\n\t\t}\n\t}\n}) => {\n\tconst firstLoadFilters = () =>{\n\t\tif (typeof window === 'undefined') {\n\t\t\treturn getStorageObject(localStorageKey + 'selectedFilters', {}) || {};\n\t\t}\n\t\tlet urlData = filtersFromURL(window.location);\n\t\tlet urlFilters = urlData?.filters;\n\n\t\t// If ls-ignore=true is in URL, don't load from localStorage\n\t\tif (urlData?.lsIgnore) {\n\t\t\treturn urlFilters || {};\n\t\t}\n\n\t\treturn (setFiltersUrl === true && urlFilters && Object.keys(urlFilters).length > 0) ? urlFilters : getStorageObject(localStorageKey + 'selectedFilters', {}) || {}\n\t}\n\n\tconst firstLoadQuery = (): string | null => {\n\t\tif (resetFilters) return null;\n\t\tif (typeof window === 'undefined') return getQuery(localStorageKey);\n\t\t// Check URL first\n\t\tconst urlData = filtersFromURL(window.location);\n\n\t\t// If ls-ignore=true is in URL, don't load from localStorage\n\t\tif (urlData?.lsIgnore) {\n\t\t\treturn urlData?.query || null;\n\t\t}\n\n\t\tif (setFiltersUrl === true && urlData?.query) {\n\t\t\treturn urlData.query;\n\t\t}\n\t\t// Fall back to localStorage\n\t\treturn getQuery(localStorageKey);\n\t}\n\n\tconst [allListings, setAllListings] = useState<Listing[]>([]);\n\tconst [filteredListings, setFilteredListings] = useState<Listing[]>([]);\n\tconst [loading, setLoading] = useState<boolean>(false);\n\tconst [mapItems, setMapItems] = useState<any>(getStorageObject(localStorageKey + 'mapItems', []) || []);\n\tconst [query, setQuery] = useState<string | null>(() => firstLoadQuery());\n\tconst [sortSetting, setSortSetting] = useState<{ field: string; type: string }>(getStorageObject(localStorageKey + 'sortSetting', { field: 'position', type: 'asc' }) || { field: 'position', type: 'asc' });\n\tconst [listingEntities, setListingEntities] = useState<Record<number, ListingEntity> | null>({});\n\tconst [firstLoad, setFirstLoad] = useState<boolean>(true);\n\tconst [commuteLocation, setCommuteLocation] = useState<any | null>(getStorageObject(localStorageKey + 'commuteLocation'));\n\tconst [selectedFilters, setSelectedFilters] = useState<Record<string, any>>(() => resetFilters ? {} : firstLoadFilters());\n\tconst [filterOptions, setFilterOptions] = useState<any>();\n\tconst [recruiters, setRecruiters] = useState<Record<number, Recruiter>>({});\n\tconst [filterDialogIsOpen, setFilterDialogIsOpen] = useState<boolean>(false);\n\tconst [mobileTab, setMobileTab] = useState<string>(\"listTab\");\n\tconst [favorites, setFavorites] = useState<number[]>([]);\n\tconst [filterByFavorites, setFilterByFavorites] = useState<boolean>(false);\n\n\tconst setNewFilteredListings = (filteredListings: Listing[]) => {\n\t\tsetFilteredListings(filteredListings);\n\t};\n\n\tuseEffect(() => {\n\t\tif (!sortSetting) return;\n\t\tif (typeof window !== 'undefined') {\n\t\t\tlocalStorage.setItem(localStorageKey + 'sortSetting', JSON.stringify(sortSetting));\n\t\t}\n\t}, [sortSetting, localStorageKey]);\n\n\tuseEffect(() => {\n\t\tif (typeof window === 'undefined') return;\n\t\tconst loadedFavorites = JSON.parse(localStorage.getItem(localStorageKey + 'favorites') || '[]');\n\t\tsetFavorites(loadedFavorites);\n\t}, [localStorageKey]);\n\n\tuseEffect(() => {\n\t\tsetStorageObject(localStorageKey + \"commuteLocation\", commuteLocation);\n\t}, [commuteLocation, localStorageKey]);\n\n\n\tuseEffect(() => {\n\t\tif (!commuteLocation || noEntities) return;\n\n\t\tasync function fetchEntities() {\n\t\t\ttry {\n\t\t\t\tlet fetchedEntities;\n\t\t\t\tif (getListingEntitiesCallback) {\n\t\t\t\t\tfetchedEntities = await getListingEntitiesCallback(`${commuteLocation.lat}, ${commuteLocation.lng}`);\n\t\t\t\t} else {\n\t\t\t\t\tfetchedEntities = await getListingEntities(`${commuteLocation.lat}, ${commuteLocation.lng}`);\n\t\t\t\t}\n\t\t\t\tsetListingEntities(fetchedEntities);\n\t\t\t\t// Update travelTime on listings\n\t\t\t\tconst newFilteredListings: Listing[] = [...filteredListings];\n\t\t\t\tfor (let i = 0; i < allListings.length; i++) {\n\t\t\t\t\tconst listing = newFilteredListings[i];\n\t\t\t\t\tif (\n\t\t\t\t\t\tlisting &&\n\t\t\t\t\t\tlisting.fields &&\n\t\t\t\t\t\tlisting.fields.entityKey &&\n\t\t\t\t\t\tlisting.fields.entityKey !== ''\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst entityKey = listing.fields.entityKey;\n\t\t\t\t\t\t// Try exact match first, then lowercase match for case-insensitive lookup\n\t\t\t\t\t\tconst travelTime = (fetchedEntities[entityKey] || fetchedEntities[entityKey.toLowerCase()])?.travelTime;\n\t\t\t\t\t\tif (travelTime !== undefined && listing.fields) {\n\t\t\t\t\t\t\tlisting.fields.travelTime = travelTime;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Failed to fetch listing entities:\", error);\n\t\t\t}\n\t\t}\n\n\t\tfetchEntities();\n\t}, [commuteLocation, allListings, siteConfig.companyId, getListingEntitiesCallback, noEntities]);\n\n\tuseEffect(() => {\n\t\tconst handleFetchListings = async () => {\n\t\tif (!(getStorageObject(localStorageKey + 'listings', []) || []).length) {\n\t\t\tsetLoading(true);\n\t\t}\n\n\t\ttry {\n\t\t\tconst {\n\t\t\t\tlistingsResult,\n\t\t\t\tentitiesByKey,\n\t\t\t\tdistinctItems\n\t\t\t} = await fetchListings(commuteLocation, entities, listings, getListingEntitiesCallback, noEntities);\n\t\t\tif (defaultFilters) {\n\t\t\t\tconst filteredListings = listingsResult.filter(listing => {\n\t\t\t\tif (!listing.fields) return false;\n\n\t\t\t\treturn Object.keys(defaultFilters).every(filterKey => {\n\t\t\t\t\tconst filterValues = defaultFilters[filterKey as keyof typeof defaultFilters];\n\t\t\t\t\tconst listingValue = listing.fields ? listing.fields[filterKey as keyof typeof listing.fields] : null;\n\t\t\t\t\treturn filterValues.includes(listingValue);\n\t\t\t\t});\n\t\t\t});\n\t\t\tsetAllListings(filteredListings);\n\t\t} else {\n\t\t\tsetAllListings(listingsResult);\n\t\t}\n\t\t\tconsole.log('handleFetchListings: Set allListings to', listingsResult.length, 'items');\n\t\t\tsetListingEntities(entitiesByKey);\n\t\t\t\tsetMapItems(distinctItems);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.log(error);\n\t\t\t}\n\t\t\tsetLoading(false);\n\t\t};\n\t\thandleFetchListings();\n\t}, [siteConfig, commuteLocation]);\n\n\tuseEffect(() => {\n\t\tconst processListings = async () => {\n\t\t\t// Don't process if allListings hasn't been loaded yet\n\t\t\tif (allListings.length === 0) {\n\t\t\t\tconsole.log('processListings: Skipping - allListings is empty');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet filteredListings: Listing[];\n\t\t\tlet tempSelectedFilters = selectedFilters;\n\t\t\tlet tempQuery = query;\n\n\t\t\tconsole.log('processListings: Running with query:', tempQuery, 'and', allListings.length, 'listings');\n\n\t\t\tconst { mapItems, filteredListings: tempFilteredListings } = await applyFilters(\n\t\t\t\tallListings,\n\t\t\t\ttempSelectedFilters,\n\t\t\t\ttempQuery,\n\t\t\t\tlistingEntities,\n\t\t\t\tfavorites,\n\t\t\t\tsiteConfig\n\t\t\t);\n\t\t\tfilteredListings = tempFilteredListings;\n\n\t\t\tif (filterByFavorites) {\n\t\t\t\tfilteredListings = filteredListings.filter((x: Listing) => favorites.includes(x.id));\n\t\t\t}\n\n\t\t\t// Batch state updates together\n\t\t\tsetNewFilteredListings(filteredListings);\n\t\t\tsetMapItems(mapItems);\n\n\t\t\tif (firstLoad && tempSelectedFilters) {\n\t\t\t\t// Update URL with filters if needed\n\t\t\t} else if (Object.keys(tempSelectedFilters).length === 0 && !firstLoad) {\n\t\t\t\tlocalStorage.removeItem(localStorageKey + 'selectedFilters');\n\t\t\t} else if (!firstLoad) {\n\t\t\t\tsetStorageObject(localStorageKey + 'selectedFilters', tempSelectedFilters);\n\t\t\t}\n\t\t\tif(setFiltersUrl === true && typeof window !== 'undefined')\n\t\t\t{\n\t\t\t\tupdateURLWithFilters(tempSelectedFilters, window.location, tempQuery, handleUrlUpdate);\n\t\t\t}\n\t\t\tif (typeof window !== 'undefined') {\n\t\t\t\ttempQuery != null ? localStorage.setItem(localStorageKey + 'query', tempQuery) : localStorage.removeItem(localStorageKey + 'query');\n\t\t\t}\n\n\t\t\tif (tempSelectedFilters) {\n\t\t\t\tconst keys = Object.keys(tempSelectedFilters);\n\t\t\t\tconst lastKey = keys[keys.length - 1];\n\n\t\t\t\t// Ensure all filterConfig properties have values\n\t\t\t\tconst normalizedFilterConfig = {\n\t\t\t\t\thideZeroResults: filterConfig?.hideZeroResults ?? false,\n\t\t\t\t\tdynamicCounts: filterConfig?.dynamicCounts ?? true,\n\t\t\t\t\tshowFavorites: filterConfig?.showFavorites ?? true,\n\t\t\t\t\tcollapsedByDefault: filterConfig?.collapsedByDefault ?? false,\n\t\t\t\t\tsortAlphabetically: filterConfig?.sortAlphabetically ?? false,\n\t\t\t\t\tclassNames: {\n\t\t\t\t\t\tfilterContainer: filterConfig?.classNames?.filterContainer ?? '',\n\t\t\t\t\t\tfilterContent: filterConfig?.classNames?.filterContent ?? '',\n\t\t\t\t\t\tfilterAccordion: filterConfig?.classNames?.filterAccordion ?? '',\n\t\t\t\t\t\tfilterAccordionHeader: filterConfig?.classNames?.filterAccordionHeader ?? '',\n\t\t\t\t\t\tfilterAccordionContent: filterConfig?.classNames?.filterAccordionContent ?? '',\n\t\t\t\t\t\tfilterItem: filterConfig?.classNames?.filterItem ?? '',\n\t\t\t\t\t\tfilterItemLabel: filterConfig?.classNames?.filterItemLabel ?? '',\n\t\t\t\t\t\tfilterItemCheckbox: filterConfig?.classNames?.filterItemCheckbox ?? '',\n\t\t\t\t\t\tfilterItemCount: filterConfig?.classNames?.filterItemCount ?? '',\n\t\t\t\t\t\tsearchInput: filterConfig?.classNames?.searchInput ?? '',\n\t\t\t\t\t\tresetButton: filterConfig?.classNames?.resetButton ?? '',\n\t\t\t\t\t\tshowJobsButton: filterConfig?.classNames?.showJobsButton ?? '',\n\t\t\t\t\t\tfilterFooter: filterConfig?.classNames?.filterFooter ?? ''\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tconst options = generateFilterOptions(\n\t\t\t\t\tfilteredListings,\n\t\t\t\t\tallListings,\n\t\t\t\t\tsiteConfig,\n\t\t\t\t\tfilterOptions,\n\t\t\t\t\tlastKey,\n\t\t\t\t\tfavorites,\n\t\t\t\t\ttempSelectedFilters,\n\t\t\t\t\tnormalizedFilterConfig\n\t\t\t\t);\n\t\t\t\tif (options) {\n\t\t\t\t\tsetFilterOptions(options);\n\t\t\t\t\tif (firstLoad) setFirstLoad(false);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tprocessListings();\n\t}, [selectedFilters, query, listingEntities, filterByFavorites, favorites, allListings]);\n\n\tconst handleFilterListingsByLocation = (selectedLocation: any) => {\n\t\tconst { filteredListings } = filterListingsByLocation(\n\t\t\tallListings,\n\t\t\tselectedLocation,\n\t\t\tlistingEntities\n\t\t);\n\t\tsetNewFilteredListings(filteredListings);\n\t};\n\n\tconst resetEntityFilter = () => {\n\t\tlet newFilters = {...selectedFilters};\n\t\tdelete newFilters.entityId;\n\t\tsetSelectedFilters(newFilters);\n\t}\n\n\tconst handleSettingFavorites = (newFavorites: number[] | null) => {\n\t\tif (typeof window === 'undefined') return;\n\t\tif (newFavorites == null) {\n\t\t\tlocalStorage.removeItem(localStorageKey + 'favorites');\n\t\t} else {\n\t\t\tsetFavorites(newFavorites);\n\t\t\tlocalStorage.setItem(localStorageKey + 'favorites', JSON.stringify(newFavorites));\n\t\t}\n\t};\n\n\treturn (\n\t\t<MapListContext.Provider value={{\n\t\t\tloading,\n\t\t\tallListings,\n\t\t\tfilteredListings,\n\t\t\tmapItems,\n\t\t\tquery,\n\t\t\tsetNewFilteredListings,\n\t\t\tsetQuery,\n\t\t\tlistingEntities,\n\t\t\tselectedFilters,\n\t\t\tsetSelectedFilters,\n\t\t\tfilterOptions,\n\t\t\trecruiters,\n\t\t\thandleFilterListingsByLocation,\n\t\t\tfilterDialogIsOpen,\n\t\t\tsetFilterDialogIsOpen,\n\t\t\tsetMobileTab,\n\t\t\tmobileTab,\n\t\t\tsiteConfig,\n\t\t\tgoogleMapsApiKey,\n\t\t\tfavorites,\n\t\t\thandleSettingFavorites,\n\t\t\tresetEntityFilter,\n\t\t\tsetFilterByFavorites,\n\t\t\tfilterByFavorites,\n\t\t\tcommuteLocation,\n\t\t\tsetCommuteLocation,\n\t\t\tnavigateToDetails,\n\t\t\tnavigateToEasyApply,\n\t\t\tLink,\n\t\t\tlinkFormat,\n\t\t\teasyApplyUrl,\n\t\t\teasyApplyText,\n\t\t\tisIframe,\n\t\t\tsortSetting,\n\t\t\tsetSortSetting,\n\t\t\ttrackEvent,\n\t\t\tdefaultFilters,\n\t\t\thiddenFilters,\n\t\t\tcontainerStyle,\n\t\t\tExpandListComponent,\n\t\t\tnoEntities,\n\t\t\tfilterConfig\n\t\t}}>\n\t\t\t{children}\n\t\t</MapListContext.Provider>\n\t);\n};\n"],"names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ACvD,SAAA;AAAM,aAAA;YACN,YAAY,CAAC,YAAY,CAAC,CAAC;AAC3B,YAAA,YAAY,CAAC,OAAO,CAAC,eAAe,GAAG,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;AAClF,SAAA;AACF,KAAC,CAAC;AAEF,IAAA,QACC,KAAC,CAAA,aAAA,CAAA,cAAc,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE;YAC/B,OAAO;YACP,WAAW;YACX,gBAAgB;YAChB,QAAQ;YACR,KAAK;YACL,sBAAsB;YACtB,QAAQ;YACR,eAAe;YACf,eAAe;YACf,kBAAkB;YAClB,aAAa;YACb,UAAU;YACV,8BAA8B;YAC9B,kBAAkB;YAClB,qBAAqB;YACrB,YAAY;YACZ,SAAS;YACT,UAAU;YACV,gBAAgB;YAChB,SAAS;YACT,sBAAsB;YACtB,iBAAiB;YACjB,oBAAoB;YACpB,iBAAiB;YACjB,eAAe;YACf,kBAAkB;YAClB,iBAAiB;YACjB,mBAAmB;YACnB,IAAI;YACJ,UAAU;YACV,YAAY;YACZ,aAAa;YACb,QAAQ;YACR,WAAW;YACX,cAAc;YACd,UAAU;YACV,cAAc;YACd,aAAa;YACb,cAAc;YACd,mBAAmB;YACnB,UAAU;YACV,YAAY;SACZ,EACC,EAAA,QAAQ,CACgB,EACzB;AACH;;;;"}
|
package/dist/hooks/useList.js
CHANGED
|
@@ -48,7 +48,9 @@ var useListLogic = function useListLogic(filteredListings) {
|
|
|
48
48
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49
49
|
}, [filteredListings.length, itemLimit]);
|
|
50
50
|
useEffect(function () {
|
|
51
|
-
|
|
51
|
+
if (typeof window !== 'undefined') {
|
|
52
|
+
localStorage.setItem('scrollPosition', scrollPosition.toString());
|
|
53
|
+
}
|
|
52
54
|
}, [scrollPosition]);
|
|
53
55
|
useEffect(function () {
|
|
54
56
|
var savedScrollPosition = scrollPosition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useList.js","sources":["../../src/hooks/useList.js"],"sourcesContent":["import { useEffect, useState, useRef } from 'react';\n\nimport { getStorageObject } from '~/util/localStorageUtil';\n\nconst getDefaultItemId = () => {\n\tlet item = getStorageObject(\"selectedListItem\");\n\tif (item?.expanded == true) {\n\t\treturn item.id;\n\t} else {\n\t\treturn null;\n\t}\n};\n\nconst useListLogic = filteredListings => {\n\tconst [itemLimit, setItemLimit] = useState(100);\n\tconst [expandedId] = useState(getDefaultItemId());\n\tconst [sortSetting, setSortSetting] = useState(getStorageObject('sortSetting', null));\n\tconst [scrollPosition, setScrollPosition] = useState(getStorageObject('scrollPosition', 0));\n\tconst loader = useRef(null);\n\tconst scrollContainerRef = useRef(null);\n\tconst itemRefs = useRef({});\n\tconst observer = useRef(null);\n\n\tuseEffect(() => {\n\t\tobserver.current = new IntersectionObserver(handleObserver, {\n\t\t\troot: scrollContainerRef.current,\n\t\t\trootMargin: \"100px 0px\",\n\t\t\tthreshold: 0.5\n\t\t});\n\t\tconst { current } = loader;\n\t\tif (current) {\n\t\t\tobserver.current.observe(current);\n\t\t}\n\t\treturn () => {\n\t\t\tif (observer.current && current) {\n\t\t\t\tobserver.current.unobserve(current);\n\t\t\t}\n\t\t};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [filteredListings.length, itemLimit]);\n\n\tuseEffect(() => {\n\t\tlocalStorage.setItem('scrollPosition', scrollPosition.toString());\n\t}, [scrollPosition]);\n\n\tuseEffect(() => {\n\t\tconst savedScrollPosition = scrollPosition;\n\t\tif (parseInt(savedScrollPosition) > 3000) {\n\t\t\tsetItemLimit(savedScrollPosition / 10);\n\t\t}\n\t\tif (savedScrollPosition && scrollContainerRef.current) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tscrollContainerRef.current.scrollTop = parseInt(savedScrollPosition, 10);\n\t\t\t}, 300);\n\t\t}\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst { current } = scrollContainerRef;\n\t\tif (current) {\n\t\t\tcurrent.addEventListener('scroll', handleScroll);\n\t\t}\n\t\treturn () => {\n\t\t\tif (current) {\n\t\t\t\tcurrent.removeEventListener('scroll', handleScroll);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\tconst handleObserver = entities => {\n\t\tconst target = entities[0];\n\t\tif (!target.isIntersecting) return;\n\t\tif (filteredListings.length > itemLimit) {\n\t\t\tsetItemLimit(prevLimit => prevLimit + 100);\n\t\t} else if (observer.current) {\n\t\t\tobserver.current.disconnect();\n\t\t}\n\t};\n\n\tconst handleScroll = () => {\n\t\tif (scrollContainerRef.current) {\n\t\t\tsetScrollPosition(scrollContainerRef.current.scrollTop);\n\t\t}\n\t};\n\n\treturn { itemLimit, expandedId, sortSetting, scrollPosition, loader, scrollContainerRef, itemRefs, setSortSetting, setScrollPosition, filteredListings };\n};\n\nexport default useListLogic;\n"],"names":["getDefaultItemId","item","getStorageObject","expanded","id","useListLogic","filteredListings","_useState","useState","_useState2","_slicedToArray","itemLimit","setItemLimit","_useState3","_useState4","expandedId","_useState5","_useState6","sortSetting","setSortSetting","_useState7","_useState8","scrollPosition","setScrollPosition","loader","useRef","scrollContainerRef","itemRefs","observer","useEffect","current","IntersectionObserver","handleObserver","root","rootMargin","threshold","observe","unobserve","length","localStorage","setItem","toString","savedScrollPosition","parseInt","setTimeout","scrollTop","addEventListener","handleScroll","removeEventListener","entities","target","isIntersecting","prevLimit","disconnect"],"mappings":";;;;AAIA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,GAAS;AAC9B,EAAA,IAAIC,IAAI,GAAGC,gBAAgB,CAAC,kBAAkB,CAAC,CAAA;EAC/C,IAAI,CAAAD,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAJA,IAAI,CAAEE,QAAQ,KAAI,IAAI,EAAE;IAC3B,OAAOF,IAAI,CAACG,EAAE,CAAA;AACf,GAAC,MAAM;AACN,IAAA,OAAO,IAAI,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G,QAAQ,GAAGH,MAAM,CAAC,IAAI,CAAC,CAAA;AAE7BI,EAAAA,SAAS,CAAC,YAAM;AACfD,IAAAA,QAAQ,CAACE,OAAO,GAAG,IAAIC,oBAAoB,CAACC,cAAc,EAAE;MAC3DC,IAAI,EAAEP,kBAAkB,CAACI,OAAO;AAChCI,MAAAA,UAAU,EAAE,WAAW;AACvBC,MAAAA,SAAS,EAAE,GAAA;AACZ,KAAC,CAAC,CAAA;AACF,IAAA,IAAQL,OAAO,GAAKN,MAAM,CAAlBM,OAAO,CAAA;AACf,IAAA,IAAIA,OAAO,EAAE;AACZF,MAAAA,QAAQ,CAACE,OAAO,CAACM,OAAO,CAACN,OAAO,CAAC,CAAA;AAClC,KAAA;AACA,IAAA,OAAO,YAAM;AACZ,MAAA,IAAIF,QAAQ,CAACE,OAAO,IAAIA,OAAO,EAAE;AAChCF,QAAAA,QAAQ,CAACE,OAAO,CAACO,SAAS,CAACP,OAAO,CAAC,CAAA;AACpC,OAAA;KACA,CAAA;AACD;GACA,EAAE,CAACxB,gBAAgB,CAACgC,MAAM,EAAE3B,SAAS,CAAC,CAAC,CAAA;AAExCkB,EAAAA,SAAS,CAAC,YAAM;
|
|
1
|
+
{"version":3,"file":"useList.js","sources":["../../src/hooks/useList.js"],"sourcesContent":["import { useEffect, useState, useRef } from 'react';\n\nimport { getStorageObject } from '~/util/localStorageUtil';\n\nconst getDefaultItemId = () => {\n\tlet item = getStorageObject(\"selectedListItem\");\n\tif (item?.expanded == true) {\n\t\treturn item.id;\n\t} else {\n\t\treturn null;\n\t}\n};\n\nconst useListLogic = filteredListings => {\n\tconst [itemLimit, setItemLimit] = useState(100);\n\tconst [expandedId] = useState(getDefaultItemId());\n\tconst [sortSetting, setSortSetting] = useState(getStorageObject('sortSetting', null));\n\tconst [scrollPosition, setScrollPosition] = useState(getStorageObject('scrollPosition', 0));\n\tconst loader = useRef(null);\n\tconst scrollContainerRef = useRef(null);\n\tconst itemRefs = useRef({});\n\tconst observer = useRef(null);\n\n\tuseEffect(() => {\n\t\tobserver.current = new IntersectionObserver(handleObserver, {\n\t\t\troot: scrollContainerRef.current,\n\t\t\trootMargin: \"100px 0px\",\n\t\t\tthreshold: 0.5\n\t\t});\n\t\tconst { current } = loader;\n\t\tif (current) {\n\t\t\tobserver.current.observe(current);\n\t\t}\n\t\treturn () => {\n\t\t\tif (observer.current && current) {\n\t\t\t\tobserver.current.unobserve(current);\n\t\t\t}\n\t\t};\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [filteredListings.length, itemLimit]);\n\n\tuseEffect(() => {\n\t\tif (typeof window !== 'undefined') {\n\t\t\tlocalStorage.setItem('scrollPosition', scrollPosition.toString());\n\t\t}\n\t}, [scrollPosition]);\n\n\tuseEffect(() => {\n\t\tconst savedScrollPosition = scrollPosition;\n\t\tif (parseInt(savedScrollPosition) > 3000) {\n\t\t\tsetItemLimit(savedScrollPosition / 10);\n\t\t}\n\t\tif (savedScrollPosition && scrollContainerRef.current) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tscrollContainerRef.current.scrollTop = parseInt(savedScrollPosition, 10);\n\t\t\t}, 300);\n\t\t}\n\t}, []);\n\n\tuseEffect(() => {\n\t\tconst { current } = scrollContainerRef;\n\t\tif (current) {\n\t\t\tcurrent.addEventListener('scroll', handleScroll);\n\t\t}\n\t\treturn () => {\n\t\t\tif (current) {\n\t\t\t\tcurrent.removeEventListener('scroll', handleScroll);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\tconst handleObserver = entities => {\n\t\tconst target = entities[0];\n\t\tif (!target.isIntersecting) return;\n\t\tif (filteredListings.length > itemLimit) {\n\t\t\tsetItemLimit(prevLimit => prevLimit + 100);\n\t\t} else if (observer.current) {\n\t\t\tobserver.current.disconnect();\n\t\t}\n\t};\n\n\tconst handleScroll = () => {\n\t\tif (scrollContainerRef.current) {\n\t\t\tsetScrollPosition(scrollContainerRef.current.scrollTop);\n\t\t}\n\t};\n\n\treturn { itemLimit, expandedId, sortSetting, scrollPosition, loader, scrollContainerRef, itemRefs, setSortSetting, setScrollPosition, filteredListings };\n};\n\nexport default useListLogic;\n"],"names":["getDefaultItemId","item","getStorageObject","expanded","id","useListLogic","filteredListings","_useState","useState","_useState2","_slicedToArray","itemLimit","setItemLimit","_useState3","_useState4","expandedId","_useState5","_useState6","sortSetting","setSortSetting","_useState7","_useState8","scrollPosition","setScrollPosition","loader","useRef","scrollContainerRef","itemRefs","observer","useEffect","current","IntersectionObserver","handleObserver","root","rootMargin","threshold","observe","unobserve","length","window","localStorage","setItem","toString","savedScrollPosition","parseInt","setTimeout","scrollTop","addEventListener","handleScroll","removeEventListener","entities","target","isIntersecting","prevLimit","disconnect"],"mappings":";;;;AAIA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,GAAS;AAC9B,EAAA,IAAIC,IAAI,GAAGC,gBAAgB,CAAC,kBAAkB,CAAC,CAAA;EAC/C,IAAI,CAAAD,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAJA,IAAI,CAAEE,QAAQ,KAAI,IAAI,EAAE;IAC3B,OAAOF,IAAI,CAACG,EAAE,CAAA;AACf,GAAC,MAAM;AACN,IAAA,OAAO,IAAI,CAAA;AACZ,GAAA;AACD,CAAC,CAAA;AAED,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAGC,gBAAgB,EAAI;AACxC,EAAA,IAAAC,SAAA,GAAkCC,QAAQ,CAAC,GAAG,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAxCI,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,YAAY,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAC9B,EAAA,IAAAI,UAAA,GAAqBL,QAAQ,CAACR,gBAAgB,EAAE,CAAC;IAAAc,UAAA,GAAAJ,cAAA,CAAAG,UAAA,EAAA,CAAA,CAAA;AAA1CE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
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import http from 'http';
|
|
2
|
+
import https from 'https';
|
|
3
|
+
import { URL } from 'url';
|
|
4
|
+
|
|
5
|
+
// src/createHttpRequester.ts
|
|
6
|
+
var agentOptions = { keepAlive: true };
|
|
7
|
+
var defaultHttpAgent = new http.Agent(agentOptions);
|
|
8
|
+
var defaultHttpsAgent = new https.Agent(agentOptions);
|
|
9
|
+
function createHttpRequester({
|
|
10
|
+
agent: userGlobalAgent,
|
|
11
|
+
httpAgent: userHttpAgent,
|
|
12
|
+
httpsAgent: userHttpsAgent,
|
|
13
|
+
requesterOptions = {}
|
|
14
|
+
} = {}) {
|
|
15
|
+
const httpAgent = userHttpAgent || userGlobalAgent || defaultHttpAgent;
|
|
16
|
+
const httpsAgent = userHttpsAgent || userGlobalAgent || defaultHttpsAgent;
|
|
17
|
+
function send(request) {
|
|
18
|
+
return new Promise((resolve) => {
|
|
19
|
+
let responseTimeout;
|
|
20
|
+
let connectTimeout;
|
|
21
|
+
const url = new URL(request.url);
|
|
22
|
+
const path = url.search === null ? url.pathname : `${url.pathname}${url.search}`;
|
|
23
|
+
const options = {
|
|
24
|
+
agent: url.protocol === "https:" ? httpsAgent : httpAgent,
|
|
25
|
+
hostname: url.hostname,
|
|
26
|
+
path,
|
|
27
|
+
method: request.method,
|
|
28
|
+
...requesterOptions,
|
|
29
|
+
headers: {
|
|
30
|
+
...request.headers,
|
|
31
|
+
...requesterOptions.headers
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
if (url.port && !requesterOptions.port) {
|
|
35
|
+
options.port = url.port;
|
|
36
|
+
}
|
|
37
|
+
const req = (url.protocol === "https:" ? https : http).request(options, (response) => {
|
|
38
|
+
let contentBuffers = [];
|
|
39
|
+
response.on("data", (chunk) => {
|
|
40
|
+
contentBuffers = contentBuffers.concat(chunk);
|
|
41
|
+
});
|
|
42
|
+
response.on("end", () => {
|
|
43
|
+
clearTimeout(connectTimeout);
|
|
44
|
+
clearTimeout(responseTimeout);
|
|
45
|
+
resolve({
|
|
46
|
+
status: response.statusCode || 0,
|
|
47
|
+
content: Buffer.concat(contentBuffers).toString(),
|
|
48
|
+
isTimedOut: false
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
const createTimeout = (timeout, content) => {
|
|
53
|
+
return setTimeout(() => {
|
|
54
|
+
req.destroy();
|
|
55
|
+
resolve({
|
|
56
|
+
status: 0,
|
|
57
|
+
content,
|
|
58
|
+
isTimedOut: true
|
|
59
|
+
});
|
|
60
|
+
}, timeout);
|
|
61
|
+
};
|
|
62
|
+
connectTimeout = createTimeout(request.connectTimeout, "Connection timeout");
|
|
63
|
+
req.on("error", (error) => {
|
|
64
|
+
clearTimeout(connectTimeout);
|
|
65
|
+
clearTimeout(responseTimeout);
|
|
66
|
+
resolve({ status: 0, content: error.message, isTimedOut: false });
|
|
67
|
+
});
|
|
68
|
+
req.once("response", () => {
|
|
69
|
+
clearTimeout(connectTimeout);
|
|
70
|
+
responseTimeout = createTimeout(request.responseTimeout, "Socket timeout");
|
|
71
|
+
});
|
|
72
|
+
if (request.data !== void 0) {
|
|
73
|
+
req.write(request.data);
|
|
74
|
+
}
|
|
75
|
+
req.end();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return { send };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { createHttpRequester };
|
|
82
|
+
//# sourceMappingURL=requester.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requester.http.js","sources":["../../../../../node_modules/@algolia/requester-node-http/dist/requester.http.js"],"sourcesContent":["// src/createHttpRequester.ts\nimport http from \"http\";\nimport https from \"https\";\nimport { URL } from \"url\";\nvar agentOptions = { keepAlive: true };\nvar defaultHttpAgent = new http.Agent(agentOptions);\nvar defaultHttpsAgent = new https.Agent(agentOptions);\nfunction createHttpRequester({\n agent: userGlobalAgent,\n httpAgent: userHttpAgent,\n httpsAgent: userHttpsAgent,\n requesterOptions = {}\n} = {}) {\n const httpAgent = userHttpAgent || userGlobalAgent || defaultHttpAgent;\n const httpsAgent = userHttpsAgent || userGlobalAgent || defaultHttpsAgent;\n function send(request) {\n return new Promise((resolve) => {\n let responseTimeout;\n let connectTimeout;\n const url = new URL(request.url);\n const path = url.search === null ? url.pathname : `${url.pathname}${url.search}`;\n const options = {\n agent: url.protocol === \"https:\" ? httpsAgent : httpAgent,\n hostname: url.hostname,\n path,\n method: request.method,\n ...requesterOptions,\n headers: {\n ...request.headers,\n ...requesterOptions.headers\n }\n };\n if (url.port && !requesterOptions.port) {\n options.port = url.port;\n }\n const req = (url.protocol === \"https:\" ? https : http).request(options, (response) => {\n let contentBuffers = [];\n response.on(\"data\", (chunk) => {\n contentBuffers = contentBuffers.concat(chunk);\n });\n response.on(\"end\", () => {\n clearTimeout(connectTimeout);\n clearTimeout(responseTimeout);\n resolve({\n status: response.statusCode || 0,\n content: Buffer.concat(contentBuffers).toString(),\n isTimedOut: false\n });\n });\n });\n const createTimeout = (timeout, content) => {\n return setTimeout(() => {\n req.destroy();\n resolve({\n status: 0,\n content,\n isTimedOut: true\n });\n }, timeout);\n };\n connectTimeout = createTimeout(request.connectTimeout, \"Connection timeout\");\n req.on(\"error\", (error) => {\n clearTimeout(connectTimeout);\n clearTimeout(responseTimeout);\n resolve({ status: 0, content: error.message, isTimedOut: false });\n });\n req.once(\"response\", () => {\n clearTimeout(connectTimeout);\n responseTimeout = createTimeout(request.responseTimeout, \"Socket timeout\");\n });\n if (request.data !== void 0) {\n req.write(request.data);\n }\n req.end();\n });\n }\n return { send };\n}\nexport {\n createHttpRequester\n};\n//# sourceMappingURL=requester.http.js.map"],"names":[],"mappings":";;;;AAAA;AAIA,IAAI,YAAY,GAAG,EAAE,SAAS,EAAE,IA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AC;AACpB,OAAO,CAAC;AACR,MAAM,cAAc,GAAG,aAAa,CAAC,OAAO,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC;AACnF,MAAM,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,KAAK;AACjC,QAAQ,YAAY,CAAC,cAAc,CAAC,CAAC;AACrC,QAAQ,YAAY,CAAC,eAAe,CAAC,CAAC;AACtC,QAAQ,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;AAC1E,OAAO,CAAC,CAAC;AACT,MAAM,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM;AACjC,QAAQ,YAAY,CAAC,cAAc,CAAC,CAAC;AACrC,QAAQ,eAAe,GAAG,aAAa,CAAC,OAAO,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;AACnF,OAAO,CAAC,CAAC;AACT,MAAM,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,EAAE;AACnC,QAAQ,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAChC,OAAO;AACP,MAAM,GAAG,CAAC,GAAG,EAAE,CAAC;AAChB,KAAK,CAAC,CAAC;AACP,GAAG;AACH,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAClB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { createHttpRequester } from '../../../../@algolia/requester-node-http/dist/requester.http.js';
|
|
2
|
+
import { createNullLogger, createNullCache, createMemoryCache, createTransporter, getAlgoliaAgent, shuffle, createAuth } from '../../../../@algolia/client-common/dist/common.js';
|
|
3
|
+
|
|
4
|
+
// lite/builds/node.ts
|
|
5
|
+
var apiClientVersion = "5.40.0";
|
|
6
|
+
function getDefaultHosts(appId) {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
url: `${appId}-dsn.algolia.net`,
|
|
10
|
+
accept: "read",
|
|
11
|
+
protocol: "https"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
url: `${appId}.algolia.net`,
|
|
15
|
+
accept: "write",
|
|
16
|
+
protocol: "https"
|
|
17
|
+
}
|
|
18
|
+
].concat(
|
|
19
|
+
shuffle([
|
|
20
|
+
{
|
|
21
|
+
url: `${appId}-1.algolianet.com`,
|
|
22
|
+
accept: "readWrite",
|
|
23
|
+
protocol: "https"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
url: `${appId}-2.algolianet.com`,
|
|
27
|
+
accept: "readWrite",
|
|
28
|
+
protocol: "https"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
url: `${appId}-3.algolianet.com`,
|
|
32
|
+
accept: "readWrite",
|
|
33
|
+
protocol: "https"
|
|
34
|
+
}
|
|
35
|
+
])
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function createLiteClient({
|
|
39
|
+
appId: appIdOption,
|
|
40
|
+
apiKey: apiKeyOption,
|
|
41
|
+
authMode,
|
|
42
|
+
algoliaAgents,
|
|
43
|
+
...options
|
|
44
|
+
}) {
|
|
45
|
+
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
46
|
+
const transporter = createTransporter({
|
|
47
|
+
hosts: getDefaultHosts(appIdOption),
|
|
48
|
+
...options,
|
|
49
|
+
algoliaAgent: getAlgoliaAgent({
|
|
50
|
+
algoliaAgents,
|
|
51
|
+
client: "Lite",
|
|
52
|
+
version: apiClientVersion
|
|
53
|
+
}),
|
|
54
|
+
baseHeaders: {
|
|
55
|
+
"content-type": "text/plain",
|
|
56
|
+
...auth.headers(),
|
|
57
|
+
...options.baseHeaders
|
|
58
|
+
},
|
|
59
|
+
baseQueryParameters: {
|
|
60
|
+
...auth.queryParameters(),
|
|
61
|
+
...options.baseQueryParameters
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
return {
|
|
65
|
+
transporter,
|
|
66
|
+
/**
|
|
67
|
+
* The `appId` currently in use.
|
|
68
|
+
*/
|
|
69
|
+
appId: appIdOption,
|
|
70
|
+
/**
|
|
71
|
+
* The `apiKey` currently in use.
|
|
72
|
+
*/
|
|
73
|
+
apiKey: apiKeyOption,
|
|
74
|
+
/**
|
|
75
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
76
|
+
*/
|
|
77
|
+
clearCache() {
|
|
78
|
+
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
82
|
+
*/
|
|
83
|
+
get _ua() {
|
|
84
|
+
return transporter.algoliaAgent.value;
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
88
|
+
*
|
|
89
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
90
|
+
* @param version - The version of the agent.
|
|
91
|
+
*/
|
|
92
|
+
addAlgoliaAgent(segment, version) {
|
|
93
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
94
|
+
},
|
|
95
|
+
/**
|
|
96
|
+
* Helper method to switch the API key used to authenticate the requests.
|
|
97
|
+
*
|
|
98
|
+
* @param params - Method params.
|
|
99
|
+
* @param params.apiKey - The new API Key to use.
|
|
100
|
+
*/
|
|
101
|
+
setClientApiKey({ apiKey }) {
|
|
102
|
+
if (!authMode || authMode === "WithinHeaders") {
|
|
103
|
+
transporter.baseHeaders["x-algolia-api-key"] = apiKey;
|
|
104
|
+
} else {
|
|
105
|
+
transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
|
110
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
111
|
+
*
|
|
112
|
+
* @summary Search multiple indices for `hits`.
|
|
113
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
114
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
115
|
+
*/
|
|
116
|
+
searchForHits(searchMethodParams, requestOptions) {
|
|
117
|
+
return this.search(searchMethodParams, requestOptions);
|
|
118
|
+
},
|
|
119
|
+
/**
|
|
120
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
|
|
121
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
122
|
+
*
|
|
123
|
+
* @summary Search multiple indices for `facets`.
|
|
124
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
125
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
126
|
+
*/
|
|
127
|
+
searchForFacets(searchMethodParams, requestOptions) {
|
|
128
|
+
return this.search(searchMethodParams, requestOptions);
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* This method lets you send requests to the Algolia REST API.
|
|
132
|
+
* @param customPost - The customPost object.
|
|
133
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
134
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
135
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
136
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
137
|
+
*/
|
|
138
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
139
|
+
if (!path) {
|
|
140
|
+
throw new Error("Parameter `path` is required when calling `customPost`.");
|
|
141
|
+
}
|
|
142
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
143
|
+
const headers = {};
|
|
144
|
+
const queryParameters = parameters ? parameters : {};
|
|
145
|
+
const request = {
|
|
146
|
+
method: "POST",
|
|
147
|
+
path: requestPath,
|
|
148
|
+
queryParameters,
|
|
149
|
+
headers,
|
|
150
|
+
data: body ? body : {}
|
|
151
|
+
};
|
|
152
|
+
return transporter.request(request, requestOptions);
|
|
153
|
+
},
|
|
154
|
+
/**
|
|
155
|
+
* Retrieves recommendations from selected AI models.
|
|
156
|
+
*
|
|
157
|
+
* Required API Key ACLs:
|
|
158
|
+
* - search
|
|
159
|
+
* @param getRecommendationsParams - The getRecommendationsParams object.
|
|
160
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
161
|
+
*/
|
|
162
|
+
getRecommendations(getRecommendationsParams, requestOptions) {
|
|
163
|
+
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
|
|
164
|
+
const newSignatureRequest = {
|
|
165
|
+
requests: getRecommendationsParams
|
|
166
|
+
};
|
|
167
|
+
getRecommendationsParams = newSignatureRequest;
|
|
168
|
+
}
|
|
169
|
+
if (!getRecommendationsParams) {
|
|
170
|
+
throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");
|
|
171
|
+
}
|
|
172
|
+
if (!getRecommendationsParams.requests) {
|
|
173
|
+
throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");
|
|
174
|
+
}
|
|
175
|
+
const requestPath = "/1/indexes/*/recommendations";
|
|
176
|
+
const headers = {};
|
|
177
|
+
const queryParameters = {};
|
|
178
|
+
const request = {
|
|
179
|
+
method: "POST",
|
|
180
|
+
path: requestPath,
|
|
181
|
+
queryParameters,
|
|
182
|
+
headers,
|
|
183
|
+
data: getRecommendationsParams,
|
|
184
|
+
useReadTransporter: true,
|
|
185
|
+
cacheable: true
|
|
186
|
+
};
|
|
187
|
+
return transporter.request(request, requestOptions);
|
|
188
|
+
},
|
|
189
|
+
/**
|
|
190
|
+
* Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.
|
|
191
|
+
*
|
|
192
|
+
* Required API Key ACLs:
|
|
193
|
+
* - search
|
|
194
|
+
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
195
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
196
|
+
*/
|
|
197
|
+
search(searchMethodParams, requestOptions) {
|
|
198
|
+
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
199
|
+
const newSignatureRequest = {
|
|
200
|
+
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
201
|
+
if (legacyRequest.type === "facet") {
|
|
202
|
+
return {
|
|
203
|
+
...legacyRequest,
|
|
204
|
+
...params,
|
|
205
|
+
type: "facet"
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
...legacyRequest,
|
|
210
|
+
...params,
|
|
211
|
+
facet: void 0,
|
|
212
|
+
maxFacetHits: void 0,
|
|
213
|
+
facetQuery: void 0
|
|
214
|
+
};
|
|
215
|
+
})
|
|
216
|
+
};
|
|
217
|
+
searchMethodParams = newSignatureRequest;
|
|
218
|
+
}
|
|
219
|
+
if (!searchMethodParams) {
|
|
220
|
+
throw new Error("Parameter `searchMethodParams` is required when calling `search`.");
|
|
221
|
+
}
|
|
222
|
+
if (!searchMethodParams.requests) {
|
|
223
|
+
throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");
|
|
224
|
+
}
|
|
225
|
+
const requestPath = "/1/indexes/*/queries";
|
|
226
|
+
const headers = {};
|
|
227
|
+
const queryParameters = {};
|
|
228
|
+
const request = {
|
|
229
|
+
method: "POST",
|
|
230
|
+
path: requestPath,
|
|
231
|
+
queryParameters,
|
|
232
|
+
headers,
|
|
233
|
+
data: searchMethodParams,
|
|
234
|
+
useReadTransporter: true,
|
|
235
|
+
cacheable: true
|
|
236
|
+
};
|
|
237
|
+
return transporter.request(request, requestOptions);
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// lite/builds/node.ts
|
|
243
|
+
function liteClient(appId, apiKey, options) {
|
|
244
|
+
if (!appId || typeof appId !== "string") {
|
|
245
|
+
throw new Error("`appId` is missing.");
|
|
246
|
+
}
|
|
247
|
+
if (!apiKey || typeof apiKey !== "string") {
|
|
248
|
+
throw new Error("`apiKey` is missing.");
|
|
249
|
+
}
|
|
250
|
+
return createLiteClient({
|
|
251
|
+
appId,
|
|
252
|
+
apiKey,
|
|
253
|
+
timeouts: {
|
|
254
|
+
connect: 2e3,
|
|
255
|
+
read: 5e3,
|
|
256
|
+
write: 3e4
|
|
257
|
+
},
|
|
258
|
+
logger: createNullLogger(),
|
|
259
|
+
requester: createHttpRequester(),
|
|
260
|
+
algoliaAgents: [{ segment: "Node.js", version: process.versions.node }],
|
|
261
|
+
responsesCache: createNullCache(),
|
|
262
|
+
requestsCache: createNullCache(),
|
|
263
|
+
hostsCache: createMemoryCache(),
|
|
264
|
+
...options
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export { apiClientVersion, liteClient };
|
|
269
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sources":["../../../../../../node_modules/algoliasearch/dist/lite/builds/node.js"],"sourcesContent":["// lite/builds/node.ts\nimport { createHttpRequester } from \"@algolia/requester-node-http\";\nimport { createMemoryCache, createNullCache, createNullLogger } from \"@algolia/client-common\";\n\n// lite/src/liteClient.ts\nimport { createAuth, createTransporter, getAlgoliaAgent, shuffle } from \"@algolia/client-common\";\nvar apiClientVersion = \"5.40.0\";\nfunction getDefaultHosts(appId) {\n return [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: \"read\",\n protocol: \"https\"\n },\n {\n url: `${appId}.algolia.net`,\n accept: \"write\",\n protocol: \"https\"\n }\n ].concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: \"readWrite\",\n protocol: \"https\"\n }\n ])\n );\n}\nfunction createLiteClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: \"Lite\",\n version: apiClientVersion\n }),\n baseHeaders: {\n \"content-type\": \"text/plain\",\n ...auth.headers(),\n ...options.baseHeaders\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters\n }\n });\n return {\n transporter,\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache() {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);\n },\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua() {\n return transporter.algoliaAgent.value;\n },\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment, version) {\n transporter.algoliaAgent.add({ segment, version });\n },\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }) {\n if (!authMode || authMode === \"WithinHeaders\") {\n transporter.baseHeaders[\"x-algolia-api-key\"] = apiKey;\n } else {\n transporter.baseQueryParameters[\"x-algolia-api-key\"] = apiKey;\n }\n },\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `hits`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForHits(searchMethodParams, requestOptions) {\n return this.search(searchMethodParams, requestOptions);\n },\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `facets`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacets(searchMethodParams, requestOptions) {\n return this.search(searchMethodParams, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost({ path, parameters, body }, requestOptions) {\n if (!path) {\n throw new Error(\"Parameter `path` is required when calling `customPost`.\");\n }\n const requestPath = \"/{path}\".replace(\"{path}\", path);\n const headers = {};\n const queryParameters = parameters ? parameters : {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {}\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves recommendations from selected AI models.\n *\n * Required API Key ACLs:\n * - search\n * @param getRecommendationsParams - The getRecommendationsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRecommendations(getRecommendationsParams, requestOptions) {\n if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {\n const newSignatureRequest = {\n requests: getRecommendationsParams\n };\n getRecommendationsParams = newSignatureRequest;\n }\n if (!getRecommendationsParams) {\n throw new Error(\"Parameter `getRecommendationsParams` is required when calling `getRecommendations`.\");\n }\n if (!getRecommendationsParams.requests) {\n throw new Error(\"Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.\");\n }\n const requestPath = \"/1/indexes/*/recommendations\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: getRecommendationsParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n },\n /**\n * Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.\n *\n * Required API Key ACLs:\n * - search\n * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n search(searchMethodParams, requestOptions) {\n if (searchMethodParams && Array.isArray(searchMethodParams)) {\n const newSignatureRequest = {\n requests: searchMethodParams.map(({ params, ...legacyRequest }) => {\n if (legacyRequest.type === \"facet\") {\n return {\n ...legacyRequest,\n ...params,\n type: \"facet\"\n };\n }\n return {\n ...legacyRequest,\n ...params,\n facet: void 0,\n maxFacetHits: void 0,\n facetQuery: void 0\n };\n })\n };\n searchMethodParams = newSignatureRequest;\n }\n if (!searchMethodParams) {\n throw new Error(\"Parameter `searchMethodParams` is required when calling `search`.\");\n }\n if (!searchMethodParams.requests) {\n throw new Error(\"Parameter `searchMethodParams.requests` is required when calling `search`.\");\n }\n const requestPath = \"/1/indexes/*/queries\";\n const headers = {};\n const queryParameters = {};\n const request = {\n method: \"POST\",\n path: requestPath,\n queryParameters,\n headers,\n data: searchMethodParams,\n useReadTransporter: true,\n cacheable: true\n };\n return transporter.request(request, requestOptions);\n }\n };\n}\n\n// lite/builds/node.ts\nfunction liteClient(appId, apiKey, options) {\n if (!appId || typeof appId !== \"string\") {\n throw new Error(\"`appId` is missing.\");\n }\n if (!apiKey || typeof apiKey !== \"string\") {\n throw new Error(\"`apiKey` is missing.\");\n }\n return createLiteClient({\n appId,\n apiKey,\n timeouts: {\n connect: 2e3,\n read: 5e3,\n write: 3e4\n },\n logger: createNullLogger(),\n requester: createHttpRequester(),\n algoliaAgents: [{ segment: \"Node.js\", version: process.versions.node }],\n responsesCache: createNullCache(),\n requestsCache: createNullCache(),\n hostsCache: createMemoryCache(),\n ...options\n });\n}\nexport {\n apiClientVersion,\n liteClient\n};\n//# sourceMappingURL=node.js.map"],"names":[],"mappings":";;;AAAA;AAMG,IAAC,gBAAgB,GAAG,SAAS;AAChC,SAAS,eAAe,CAAC,KAAK,EAAE;AAChC,EAAE,OAAO;AACT,IAAI;AACJ,MAAM,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC;AACrC,MAAM,MAAM,EAAE,MAAM;AACpB,MAAM,QAAQ,EAAE,OAAO;AACvB,KAAK;AACL,IAAI;AACJ,MAAM,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;AACjC,MAAM,MAAM,EAAE,OAAO;AACrB,MAAM,QAAQ,EAAE,OAAO;AACvB,KAAK;AACL,GAAG,CAAC,MAAM;AACV,IAAI,OAAO,CAAC;AACZ,MAAM;AACN,QAAQ,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;AACxC,QAAQ,MAAM,EAAE,WAAW;AAC3B,QAAQ,QAAQ,EAAE,OAAO;AACzB,OAAO;AACP,MAAM;AACN,QAAQ,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;AACxC,QAAQ,MAAM,EAAE,WAAW;AAC3B,QAAQ,QAAQ,EAAE,OAAO;AACzB,OAAO;AACP,MAAM;AACN,QAAQ,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;AACxC,QAAQ,MAAM,EAAE,WAAW;A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