@abcagency/hc-ui-components 1.7.3 → 1.7.4
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.map +1 -1
- package/dist/contexts/mapContext.js +13 -7
- package/dist/contexts/mapContext.js.map +1 -1
- package/dist/contexts/mapListContext.js +9 -2
- 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 +0 -1
- package/dist/index.js.map +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/components/HireControlMap.js +0 -1
- package/src/contexts/mapContext.tsx +12 -6
- package/src/contexts/mapListContext.tsx +8 -2
- 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":"HireControlMap.js","sources":["../../src/components/HireControlMap.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useLoadScript } from '@react-google-maps/api';\n\nimport Grid from '~/components/modules/grid';\nimport Filter from '~/components/containers/filter/filter-container';\nimport MapList from '~/components/containers/maps/map-list-container';\nimport MapSkeleton from '~/components/modules/skeleton/map-skeleton';\n\n// Context imports\nimport { MapProvider } from '~/contexts/mapContext';\nimport { PlacesProvider } from '~/contexts/placesContext';\nimport { MapListProvider } from '~/contexts/mapListContext';\nimport { TrackEventProvider } from '~/contexts/trackEventContext';\nimport { ThemeProvider } from '~/contexts/themeContext';\n\nimport { getMapConfig } from '~/services/configService';\nimport { setClientAuthKey } from '~/clientToken.js';\nimport { initializeAlgoliaSearch } from '~/util/algoliaSearchUtil';\n\nimport '../styles/components.css';\n\n// Libraries for Google Maps\nconst LIBRARIES = ['places'];\n\n// Custom hook to fetch site configuration\nfunction useSiteConfig(clientToken, siteConfiguration = null) {\n\tconst [siteConfig, setSiteConfig] = useState(siteConfiguration);\n\tconst [isLoading, setIsLoading] = useState(!siteConfiguration); // If config provided, not loading\n\tconst [error, setError] = useState(null);\n\n\tuseEffect(() => {\n\t\tconst fetchSiteConfig = async () => {\n\t\t\ttry {\n\t\t\t\tsetClientAuthKey(clientToken);\n\t\t\t\tconst configData = await getMapConfig(clientToken);\n\t\t\t\tsetSiteConfig(configData);\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error('Failed to fetch site configuration:', err);\n\t\t\t\tsetError(err);\n\t\t\t} finally {\n\t\t\t\tsetIsLoading(false);\n\t\t\t}\n\t\t};\n\t\tif(!siteConfig){\n\t\t\tfetchSiteConfig();\n\t\t} else {\n\t\t\tsetIsLoading(false); // Config already provided\n\t\t}\n\t}, [clientToken, siteConfig]);\n\n\treturn { siteConfig, isLoading, error };\n}\n\n// Component to handle all context providers\nconst ContextProviders = ({ children, siteConfig, trackEvent, googleMapsApiKey, ...mapListProps }) => { return(\n\t<TrackEventProvider trackEvent={trackEvent}>\n\t\t<ThemeProvider\n\t\t\tuiText={siteConfig.colors.uiText}\n\t\t\tuiAccent={siteConfig.colors.uiAccent}\n\t\t\tprimary={siteConfig.colors.primary}\n\t\t\tprimaryDark={siteConfig.colors.primaryDark}\n\t\t\tsecondary={siteConfig.colors.secondary}\n\t\t\tsecondaryDark={siteConfig.colors.secondaryDark}\n\t\t>\n\t\t\t<MapListProvider siteConfig={siteConfig} googleMapsApiKey={googleMapsApiKey} {...mapListProps}>\n\t\t\t\t<MapProvider resetFilters={mapListProps.resetFilters} defaultZoomOverride={mapListProps.defaultZoomOverride} localStorageKey={mapListProps.localStorageKey}>\n\t\t\t\t\t<PlacesProvider\n\t\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\t\tadditionalMapMarkers={mapListProps.additionalMapMarkers}\n\t\t\t\t\t\tgoogleMapsApiKey={googleMapsApiKey}\n\t\t\t\t\t\tmarkerColors={{\n\t\t\t\t\t\t\tfillColor: siteConfig.colors.primary,\n\t\t\t\t\t\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\t\t\t\t\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\t\t\t\t\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\t\t\t\t\t\tplaceMarkers: {\n\t\t\t\t\t\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\t\t\t\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</PlacesProvider>\n\t\t\t\t</MapProvider>\n\t\t\t</MapListProvider>\n\t\t</ThemeProvider>\n\t</TrackEventProvider>\n);};\n\n// Main component\n//\nexport const HireControlMap = ({\n\tclientToken,\n\tgoogleMapsApiKey, // Required: Google Maps API key from Next.js\n\tcontainerStyle = { height: '100vh' },\n\tnavigateToDetails = null,\n\tnavigateToEasyApply = null,\n\thandleUrlUpdate = null,\n\tLink = null,\n\tlinkFormat = '/jobs/[slug]',\n\teasyApplyUrl = null,\n\teasyApplyText = 'Easy Apply',\n\tisIframe = false,\n\thideMap = false, // Override to hide map even if siteConfig.showMap is true\n\thideFilters = false, // Hide the entire filter section\n\tnoEntities = false, // Skip entity fetching and hide entity-related filters\n\ttrackEvent = (eventType, eventObj) => {\n\t\tconsole.log(eventType);\n\t\tconsole.log(eventObj);\n\t},\n\t//providing listings entities and a getListingEntities function should negate the need for map code to fetch data\n\tlistings = [],\n\tentities = [],\n\tgetListingEntitiesCallback = null,\n\tdefaultFilters = null,\n\thiddenFilters = null,\n\tsetFiltersUrl = null,\n\tExpandListComponent = null,\n\tadditionalMapMarkers = [],\n\tdefaultZoomOverride = null,\n\t//Default site configuration file passed here stops need to fetch from api\n\tsiteConfiguration = null,\n\tlocalStorageKey = 'defaultKey.',\n\t// Algolia search configuration (optional)\n\talgoliaAppId = null,\n\talgoliaApiKey = null,\n\talgoliaIndexName = null,\n\t/**\n\t * Filter configuration (optional)\n\t * @param {boolean} hideZeroResults - Hide filter options with 0 results (default: false)\n\t * @param {boolean} dynamicCounts - Update counts based on active filters.\n\t * If false, shows initial/total counts (default: true)\n\t * @param {boolean} showFavorites - Show favorites special feature filter (default: true)\n\t * @param {boolean} collapsedByDefault - Start with all filter sections collapsed (default: false)\n\t * @param {boolean} sortAlphabetically - Sort filter options alphabetically instead of by count (default: false)\n\t * @param {object} classNames - Custom Tailwind classes to apply to filter components\n\t * @param {string} classNames.filterContainer - Classes for the main filter container wrapper\n\t * @param {string} classNames.filterContent - Classes for the scrollable filter content area\n\t * @param {string} classNames.filterAccordion - Classes for each filter accordion section\n\t * @param {string} classNames.filterAccordionHeader - Classes for accordion header/trigger\n\t * @param {string} classNames.filterAccordionContent - Classes for accordion content area\n\t * @param {string} classNames.filterItem - Classes for individual filter items (checkboxes/options)\n\t * @param {string} classNames.filterItemLabel - Classes for filter item labels\n\t * @param {string} classNames.filterItemCheckbox - Classes for filter item checkboxes\n\t * @param {string} classNames.filterItemCount - Classes for filter item count badges\n\t * @param {string} classNames.searchInput - Classes for search input field\n\t * @param {string} classNames.resetButton - Classes for reset all button\n\t * @param {string} classNames.showJobsButton - Classes for show jobs button\n\t * @param {string} classNames.filterFooter - Classes for the footer containing buttons\n\t */\n\tfilterConfig = {\n\t\thideZeroResults: false, // Hide filter options with 0 results\n\t\tdynamicCounts: true, // Update counts based on other active filters (false = show initial counts only)\n\t\tshowFavorites: true, // Show favorites filter\n\t\tcollapsedByDefault: false, // Start with all filter sections collapsed\n\t\tsortAlphabetically: false, // Sort filter options alphabetically instead of by count\n\t\tclassNames: {\n\t\t\tfilterContainer: '', // Main filter container wrapper\n\t\t\tfilterContent: '', // Scrollable content area\n\t\t\tfilterAccordion: '', // Filter accordion section\n\t\t\tfilterAccordionHeader: '', // Accordion header/trigger\n\t\t\tfilterAccordionContent: '', // Accordion content body\n\t\t\tfilterItem: '', // Individual filter items\n\t\t\tfilterItemLabel: '', // Filter item labels\n\t\t\tfilterItemCheckbox: '', // Filter item checkboxes\n\t\t\tfilterItemCount: '', // Filter item count badges\n\t\t\tsearchInput: '', // Search input field\n\t\t\tresetButton: '', // Reset all button\n\t\t\tshowJobsButton: '', // Show jobs button\n\t\t\tfilterFooter: '' // Footer with buttons\n\t\t}\n\t}\n}) => {\n\t// Load site configuration (non-blocking)\n\tconst { siteConfig, isLoading: isConfigLoading, error } = useSiteConfig(clientToken, siteConfiguration);\n\n\t// Initialize Algolia immediately if credentials are provided\n\tconst [algoliaInitialized, setAlgoliaInitialized] = useState(() => {\n\t\tif (algoliaAppId && algoliaApiKey && algoliaIndexName) {\n\t\t\tconst initialized = initializeAlgoliaSearch(algoliaAppId, algoliaApiKey, algoliaIndexName);\n\t\t\tif (initialized) {\n\t\t\t\tconsole.log('Algolia search initialized successfully');\n\t\t\t}\n\t\t\treturn initialized;\n\t\t}\n\t\treturn false;\n\t});\n\n\t// Load Google Maps (non-blocking - map component will handle this)\n\tconst { isLoaded: isMapsLoaded, loadError } = useLoadScript({\n\t\tgoogleMapsApiKey: googleMapsApiKey,\n\t\tversion: 'quarterly',\n\t\tlibraries: LIBRARIES\n\t});\n\n\t// Only show errors for critical failures\n\tif (!googleMapsApiKey) {\n\t\tconsole.error('Google Maps API key is required');\n\t\treturn <div className=\"hc-p-4\">Google Maps API key is required</div>;\n\t}\n\n\tif (loadError) {\n\t\tconsole.error('Google Maps failed to load:', loadError);\n\t\treturn <div className=\"hc-p-4\">Error loading Google Maps</div>;\n\t}\n\n\tif (error) {\n\t\treturn <div className=\"hc-p-4\">Error loading configuration</div>;\n\t}\n\n\t// Render immediately even if config is loading - use defaults or provided siteConfiguration\n\tif (!siteConfig) {\n\t\treturn null; // Brief flash, config should load very quickly\n\t}\n\n\t// Prepare props for MapListProvider\n\tconst mapListProps = {\n\t\tresetFilters: false,\n\t\tnavigateToDetails,\n\t\tnavigateToEasyApply,\n\t\tLink,\n\t\tlinkFormat,\n\t\teasyApplyUrl,\n\t\teasyApplyText,\n\t\tlistings,\n\t\tentities,\n\t\tsiteConfig,\n\t\tgetListingEntitiesCallback,\n\t\tsetFiltersUrl,\n\t\thiddenFilters,\n\t\thandleUrlUpdate,\n\t\tdefaultFilters,\n\t\tdefaultZoomOverride, // will usually fit bounds\n\t\tcontainerStyle,\n\t\tExpandListComponent: ExpandListComponent ?? null,\n\t\tadditionalMapMarkers,\n\t\tisIframe,\n\t\tlocalStorageKey,\n\t\thideMap,\n\t\thideFilters,\n\t\tnoEntities,\n\t\tfilterConfig\n\t};\n\n\t// Calculate effective showMap value\n\tconst effectiveShowMap = hideMap ? false : siteConfig.showMap;\n\n\t// Prepare marker configuration\n\tconst markerConfigs = {\n\t\tfillColor: siteConfig.colors.primary,\n\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\tplaceMarkers: {\n\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t}\n\t};\n\n\t// Render immediately - individual components handle their own loading\n\t// Only Google Maps components will wait for isMapsLoaded\n\treturn (\n\t\t<ContextProviders\n\t\t\tsiteConfig={siteConfig}\n\t\t\ttrackEvent={trackEvent}\n\t\t\tgoogleMapsApiKey={googleMapsApiKey || process.env.GOOGLE_MAPS_API_KEY}\n\t\t\t{...mapListProps}\n\t\t>\n\t\t\t<Grid\n\t\t\t\tas='section'\n\t\t\t\tid='job-search-interface'\n\t\t\t\tcolumns={hideFilters ? 'hc-grid-cols-1' : 'md:hc-grid-cols-[1fr_2.5fr] lg:hc-grid-cols-[1fr_3.5fr]'}\n\t\t\t\tgap='hc-gap-0'\n\t\t\t\tautoRows={false}\n\t\t\t\tclassName={'hc-bundle hc-items-stretch hc-divide-x hc-divide-uiAccent/20'}\n\t\t\t>\n\t\t\t\t{!hideFilters && (\n\t\t\t\t\t<Grid.Item className='hc-bg-gray-100'>\n\t\t\t\t\t\t<Filter isDesktop={true} showMap={effectiveShowMap} className='hc-hidden md:hc-block' />\n\t\t\t\t\t</Grid.Item>\n\t\t\t\t)}\n\t\t\t\t<MapList\n\t\t\t\t\tcontainerStyle={containerStyle}\n\t\t\t\t\tmapPosition={siteConfig.mapPosition}\n\t\t\t\t\tshowMap={effectiveShowMap}\n\t\t\t\t\tfieldsShown={siteConfig.fieldsShown}\n\t\t\t\t\tspecialFeatures={siteConfig.specialFeatures}\n\t\t\t\t\tfieldNames={siteConfig.fieldNames}\n\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\tmarkerConfigs={markerConfigs}\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</ContextProviders>\n\t);\n};\n\nexport default HireControlMap;\n"],"names":["LIBRARIES","useSiteConfig","clientToken","siteConfiguration","arguments","length","undefined","_useState","useState","_useState2","_slicedToArray","siteConfig","setSiteConfig","_useState3","_useState4","isLoading","setIsLoading","_useState5","_useState6","error","setError","useEffect","fetchSiteConfig","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","configData","wrap","_callee$","_context","prev","next","setClientAuthKey","getMapConfig","sent","t0","console","finish","stop","apply","ContextProviders","_ref2","_siteConfig$pointsOfI","children","trackEvent","googleMapsApiKey","mapListProps","_objectWithoutProperties","_excluded","React","createElement","TrackEventProvider","ThemeProvider","uiText","colors","uiAccent","primary","primaryDark","secondary","secondaryDark","MapListProvider","_extends","MapProvider","resetFilters","defaultZoomOverride","localStorageKey","PlacesProvider","placeMappings","pointsOfInterestConfig","additionalMapMarkers","markerColors","fillColor","strokeColor","selectedFillColor","selectedStrokeColor","placeMarkers","placeMarkerColors","size","placeMarkerSize","HireControlMap","_ref3","_siteConfig$pointsOfI2","_ref3$containerStyle","containerStyle","height","_ref3$navigateToDetai","navigateToDetails","_ref3$navigateToEasyA","navigateToEasyApply","_ref3$handleUrlUpdate","handleUrlUpdate","_ref3$Link","Link","_ref3$linkFormat","linkFormat","_ref3$easyApplyUrl","easyApplyUrl","_ref3$easyApplyText","easyApplyText","_ref3$isIframe","isIframe","_ref3$hideMap","hideMap","_ref3$hideFilters","hideFilters","_ref3$noEntities","noEntities","_ref3$trackEvent","eventType","eventObj","log","_ref3$listings","listings","_ref3$entities","entities","_ref3$getListingEntit","getListingEntitiesCallback","_ref3$defaultFilters","defaultFilters","_ref3$hiddenFilters","hiddenFilters","_ref3$setFiltersUrl","setFiltersUrl","_ref3$ExpandListCompo","ExpandListComponent","_ref3$additionalMapMa","_ref3$defaultZoomOver","_ref3$siteConfigurati","_ref3$localStorageKey","_ref3$algoliaAppId","algoliaAppId","_ref3$algoliaApiKey","algoliaApiKey","_ref3$algoliaIndexNam","algoliaIndexName","_ref3$filterConfig","filterConfig","hideZeroResults","dynamicCounts","showFavorites","collapsedByDefault","sortAlphabetically","classNames","filterContainer","filterContent","filterAccordion","filterAccordionHeader","filterAccordionContent","filterItem","filterItemLabel","filterItemCheckbox","filterItemCount","searchInput","resetButton","showJobsButton","filterFooter","_useSiteConfig","_useState7","initialized","initializeAlgoliaSearch","_useState8","algoliaInitialized","setAlgoliaInitialized","_useLoadScript","useLoadScript","version","libraries","isLoaded","loadError","className","effectiveShowMap","showMap","markerConfigs","process","env","GOOGLE_MAPS_API_KEY","Grid","as","id","columns","gap","autoRows","Item","Filter","isDesktop","MapList","mapPosition","fieldsShown","specialFeatures","fieldNames"],"mappings":";;;;;;;;;;;;;;;;;AAqBA;AACA,IAAMA,SAAS,GAAG,CAAC,QAAQ,CAAC,CAAA;;AAE5B;AACA,SAASC,aAAaA,CAACC,WAAW,EAA4B;AAAA,EAAA,IAA1BC,iBAAiB,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,IAAI,CAAA;AAC3D,EAAA,IAAAG,SAAA,GAAoCC,QAA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jL,UAAU,CAACiL,WAAY;AACpCf,IAAAA,OAAO,EAAED,gBAAiB;IAC1BiB,WAAW,EAAElL,UAAU,CAACkL,WAAY;IACpCC,eAAe,EAAEnL,UAAU,CAACmL,eAAgB;IAC5CC,UAAU,EAAEpL,UAAU,CAACoL,UAAW;AAClC1H,IAAAA,aAAa,EAAAc,CAAAA,sBAAA,GAAExE,UAAU,CAAC2D,sBAAsB,CAACD,aAAa,MAAA,IAAA,IAAAc,sBAAA,KAAA,KAAA,CAAA,GAAAA,sBAAA,GAAI,EAAG;AACrE2F,IAAAA,aAAa,EAAEA,aAAAA;GACf,CACI,CACW,CAAC,CAAA;AAErB;;;;"}
|
|
1
|
+
{"version":3,"file":"HireControlMap.js","sources":["../../src/components/HireControlMap.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useLoadScript } from '@react-google-maps/api';\n\nimport Grid from '~/components/modules/grid';\nimport Filter from '~/components/containers/filter/filter-container';\nimport MapList from '~/components/containers/maps/map-list-container';\n\n// Context imports\nimport { MapProvider } from '~/contexts/mapContext';\nimport { PlacesProvider } from '~/contexts/placesContext';\nimport { MapListProvider } from '~/contexts/mapListContext';\nimport { TrackEventProvider } from '~/contexts/trackEventContext';\nimport { ThemeProvider } from '~/contexts/themeContext';\n\nimport { getMapConfig } from '~/services/configService';\nimport { setClientAuthKey } from '~/clientToken.js';\nimport { initializeAlgoliaSearch } from '~/util/algoliaSearchUtil';\n\nimport '../styles/components.css';\n\n// Libraries for Google Maps\nconst LIBRARIES = ['places'];\n\n// Custom hook to fetch site configuration\nfunction useSiteConfig(clientToken, siteConfiguration = null) {\n\tconst [siteConfig, setSiteConfig] = useState(siteConfiguration);\n\tconst [isLoading, setIsLoading] = useState(!siteConfiguration); // If config provided, not loading\n\tconst [error, setError] = useState(null);\n\n\tuseEffect(() => {\n\t\tconst fetchSiteConfig = async () => {\n\t\t\ttry {\n\t\t\t\tsetClientAuthKey(clientToken);\n\t\t\t\tconst configData = await getMapConfig(clientToken);\n\t\t\t\tsetSiteConfig(configData);\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error('Failed to fetch site configuration:', err);\n\t\t\t\tsetError(err);\n\t\t\t} finally {\n\t\t\t\tsetIsLoading(false);\n\t\t\t}\n\t\t};\n\t\tif(!siteConfig){\n\t\t\tfetchSiteConfig();\n\t\t} else {\n\t\t\tsetIsLoading(false); // Config already provided\n\t\t}\n\t}, [clientToken, siteConfig]);\n\n\treturn { siteConfig, isLoading, error };\n}\n\n// Component to handle all context providers\nconst ContextProviders = ({ children, siteConfig, trackEvent, googleMapsApiKey, ...mapListProps }) => { return(\n\t<TrackEventProvider trackEvent={trackEvent}>\n\t\t<ThemeProvider\n\t\t\tuiText={siteConfig.colors.uiText}\n\t\t\tuiAccent={siteConfig.colors.uiAccent}\n\t\t\tprimary={siteConfig.colors.primary}\n\t\t\tprimaryDark={siteConfig.colors.primaryDark}\n\t\t\tsecondary={siteConfig.colors.secondary}\n\t\t\tsecondaryDark={siteConfig.colors.secondaryDark}\n\t\t>\n\t\t\t<MapListProvider siteConfig={siteConfig} googleMapsApiKey={googleMapsApiKey} {...mapListProps}>\n\t\t\t\t<MapProvider resetFilters={mapListProps.resetFilters} defaultZoomOverride={mapListProps.defaultZoomOverride} localStorageKey={mapListProps.localStorageKey}>\n\t\t\t\t\t<PlacesProvider\n\t\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\t\tadditionalMapMarkers={mapListProps.additionalMapMarkers}\n\t\t\t\t\t\tgoogleMapsApiKey={googleMapsApiKey}\n\t\t\t\t\t\tmarkerColors={{\n\t\t\t\t\t\t\tfillColor: siteConfig.colors.primary,\n\t\t\t\t\t\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\t\t\t\t\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\t\t\t\t\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\t\t\t\t\t\tplaceMarkers: {\n\t\t\t\t\t\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\t\t\t\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</PlacesProvider>\n\t\t\t\t</MapProvider>\n\t\t\t</MapListProvider>\n\t\t</ThemeProvider>\n\t</TrackEventProvider>\n);};\n\n// Main component\n//\nexport const HireControlMap = ({\n\tclientToken,\n\tgoogleMapsApiKey, // Required: Google Maps API key from Next.js\n\tcontainerStyle = { height: '100vh' },\n\tnavigateToDetails = null,\n\tnavigateToEasyApply = null,\n\thandleUrlUpdate = null,\n\tLink = null,\n\tlinkFormat = '/jobs/[slug]',\n\teasyApplyUrl = null,\n\teasyApplyText = 'Easy Apply',\n\tisIframe = false,\n\thideMap = false, // Override to hide map even if siteConfig.showMap is true\n\thideFilters = false, // Hide the entire filter section\n\tnoEntities = false, // Skip entity fetching and hide entity-related filters\n\ttrackEvent = (eventType, eventObj) => {\n\t\tconsole.log(eventType);\n\t\tconsole.log(eventObj);\n\t},\n\t//providing listings entities and a getListingEntities function should negate the need for map code to fetch data\n\tlistings = [],\n\tentities = [],\n\tgetListingEntitiesCallback = null,\n\tdefaultFilters = null,\n\thiddenFilters = null,\n\tsetFiltersUrl = null,\n\tExpandListComponent = null,\n\tadditionalMapMarkers = [],\n\tdefaultZoomOverride = null,\n\t//Default site configuration file passed here stops need to fetch from api\n\tsiteConfiguration = null,\n\tlocalStorageKey = 'defaultKey.',\n\t// Algolia search configuration (optional)\n\talgoliaAppId = null,\n\talgoliaApiKey = null,\n\talgoliaIndexName = null,\n\t/**\n\t * Filter configuration (optional)\n\t * @param {boolean} hideZeroResults - Hide filter options with 0 results (default: false)\n\t * @param {boolean} dynamicCounts - Update counts based on active filters.\n\t * If false, shows initial/total counts (default: true)\n\t * @param {boolean} showFavorites - Show favorites special feature filter (default: true)\n\t * @param {boolean} collapsedByDefault - Start with all filter sections collapsed (default: false)\n\t * @param {boolean} sortAlphabetically - Sort filter options alphabetically instead of by count (default: false)\n\t * @param {object} classNames - Custom Tailwind classes to apply to filter components\n\t * @param {string} classNames.filterContainer - Classes for the main filter container wrapper\n\t * @param {string} classNames.filterContent - Classes for the scrollable filter content area\n\t * @param {string} classNames.filterAccordion - Classes for each filter accordion section\n\t * @param {string} classNames.filterAccordionHeader - Classes for accordion header/trigger\n\t * @param {string} classNames.filterAccordionContent - Classes for accordion content area\n\t * @param {string} classNames.filterItem - Classes for individual filter items (checkboxes/options)\n\t * @param {string} classNames.filterItemLabel - Classes for filter item labels\n\t * @param {string} classNames.filterItemCheckbox - Classes for filter item checkboxes\n\t * @param {string} classNames.filterItemCount - Classes for filter item count badges\n\t * @param {string} classNames.searchInput - Classes for search input field\n\t * @param {string} classNames.resetButton - Classes for reset all button\n\t * @param {string} classNames.showJobsButton - Classes for show jobs button\n\t * @param {string} classNames.filterFooter - Classes for the footer containing buttons\n\t */\n\tfilterConfig = {\n\t\thideZeroResults: false, // Hide filter options with 0 results\n\t\tdynamicCounts: true, // Update counts based on other active filters (false = show initial counts only)\n\t\tshowFavorites: true, // Show favorites filter\n\t\tcollapsedByDefault: false, // Start with all filter sections collapsed\n\t\tsortAlphabetically: false, // Sort filter options alphabetically instead of by count\n\t\tclassNames: {\n\t\t\tfilterContainer: '', // Main filter container wrapper\n\t\t\tfilterContent: '', // Scrollable content area\n\t\t\tfilterAccordion: '', // Filter accordion section\n\t\t\tfilterAccordionHeader: '', // Accordion header/trigger\n\t\t\tfilterAccordionContent: '', // Accordion content body\n\t\t\tfilterItem: '', // Individual filter items\n\t\t\tfilterItemLabel: '', // Filter item labels\n\t\t\tfilterItemCheckbox: '', // Filter item checkboxes\n\t\t\tfilterItemCount: '', // Filter item count badges\n\t\t\tsearchInput: '', // Search input field\n\t\t\tresetButton: '', // Reset all button\n\t\t\tshowJobsButton: '', // Show jobs button\n\t\t\tfilterFooter: '' // Footer with buttons\n\t\t}\n\t}\n}) => {\n\t// Load site configuration (non-blocking)\n\tconst { siteConfig, isLoading: isConfigLoading, error } = useSiteConfig(clientToken, siteConfiguration);\n\n\t// Initialize Algolia immediately if credentials are provided\n\tconst [algoliaInitialized, setAlgoliaInitialized] = useState(() => {\n\t\tif (algoliaAppId && algoliaApiKey && algoliaIndexName) {\n\t\t\tconst initialized = initializeAlgoliaSearch(algoliaAppId, algoliaApiKey, algoliaIndexName);\n\t\t\tif (initialized) {\n\t\t\t\tconsole.log('Algolia search initialized successfully');\n\t\t\t}\n\t\t\treturn initialized;\n\t\t}\n\t\treturn false;\n\t});\n\n\t// Load Google Maps (non-blocking - map component will handle this)\n\tconst { isLoaded: isMapsLoaded, loadError } = useLoadScript({\n\t\tgoogleMapsApiKey: googleMapsApiKey,\n\t\tversion: 'quarterly',\n\t\tlibraries: LIBRARIES\n\t});\n\n\t// Only show errors for critical failures\n\tif (!googleMapsApiKey) {\n\t\tconsole.error('Google Maps API key is required');\n\t\treturn <div className=\"hc-p-4\">Google Maps API key is required</div>;\n\t}\n\n\tif (loadError) {\n\t\tconsole.error('Google Maps failed to load:', loadError);\n\t\treturn <div className=\"hc-p-4\">Error loading Google Maps</div>;\n\t}\n\n\tif (error) {\n\t\treturn <div className=\"hc-p-4\">Error loading configuration</div>;\n\t}\n\n\t// Render immediately even if config is loading - use defaults or provided siteConfiguration\n\tif (!siteConfig) {\n\t\treturn null; // Brief flash, config should load very quickly\n\t}\n\n\t// Prepare props for MapListProvider\n\tconst mapListProps = {\n\t\tresetFilters: false,\n\t\tnavigateToDetails,\n\t\tnavigateToEasyApply,\n\t\tLink,\n\t\tlinkFormat,\n\t\teasyApplyUrl,\n\t\teasyApplyText,\n\t\tlistings,\n\t\tentities,\n\t\tsiteConfig,\n\t\tgetListingEntitiesCallback,\n\t\tsetFiltersUrl,\n\t\thiddenFilters,\n\t\thandleUrlUpdate,\n\t\tdefaultFilters,\n\t\tdefaultZoomOverride, // will usually fit bounds\n\t\tcontainerStyle,\n\t\tExpandListComponent: ExpandListComponent ?? null,\n\t\tadditionalMapMarkers,\n\t\tisIframe,\n\t\tlocalStorageKey,\n\t\thideMap,\n\t\thideFilters,\n\t\tnoEntities,\n\t\tfilterConfig\n\t};\n\n\t// Calculate effective showMap value\n\tconst effectiveShowMap = hideMap ? false : siteConfig.showMap;\n\n\t// Prepare marker configuration\n\tconst markerConfigs = {\n\t\tfillColor: siteConfig.colors.primary,\n\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\tplaceMarkers: {\n\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t}\n\t};\n\n\t// Render immediately - individual components handle their own loading\n\t// Only Google Maps components will wait for isMapsLoaded\n\treturn (\n\t\t<ContextProviders\n\t\t\tsiteConfig={siteConfig}\n\t\t\ttrackEvent={trackEvent}\n\t\t\tgoogleMapsApiKey={googleMapsApiKey || process.env.GOOGLE_MAPS_API_KEY}\n\t\t\t{...mapListProps}\n\t\t>\n\t\t\t<Grid\n\t\t\t\tas='section'\n\t\t\t\tid='job-search-interface'\n\t\t\t\tcolumns={hideFilters ? 'hc-grid-cols-1' : 'md:hc-grid-cols-[1fr_2.5fr] lg:hc-grid-cols-[1fr_3.5fr]'}\n\t\t\t\tgap='hc-gap-0'\n\t\t\t\tautoRows={false}\n\t\t\t\tclassName={'hc-bundle hc-items-stretch hc-divide-x hc-divide-uiAccent/20'}\n\t\t\t>\n\t\t\t\t{!hideFilters && (\n\t\t\t\t\t<Grid.Item className='hc-bg-gray-100'>\n\t\t\t\t\t\t<Filter isDesktop={true} showMap={effectiveShowMap} className='hc-hidden md:hc-block' />\n\t\t\t\t\t</Grid.Item>\n\t\t\t\t)}\n\t\t\t\t<MapList\n\t\t\t\t\tcontainerStyle={containerStyle}\n\t\t\t\t\tmapPosition={siteConfig.mapPosition}\n\t\t\t\t\tshowMap={effectiveShowMap}\n\t\t\t\t\tfieldsShown={siteConfig.fieldsShown}\n\t\t\t\t\tspecialFeatures={siteConfig.specialFeatures}\n\t\t\t\t\tfieldNames={siteConfig.fieldNames}\n\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\tmarkerConfigs={markerConfigs}\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</ContextProviders>\n\t);\n};\n\nexport default HireControlMap;\n"],"names":["LIBRARIES","useSiteConfig","clientToken","siteConfiguration","arguments","length","undefined","_useState","useState","_useState2","_slicedToArray","siteConfig","setSiteConfig","_useState3","_useState4","isLoading","setIsLoading","_useState5","_useState6","error","setError","useEffect","fetchSiteConfig","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","configData","wrap","_callee$","_context","prev","next","setClientAuthKey","getMapConfig","sent","t0","console","finish","stop","apply","ContextProviders","_ref2","_siteConfig$pointsOfI","children","trackEvent","googleMapsApiKey","mapListProps","_objectWithoutProperties","_excluded","React","createElement","TrackEventProvider","ThemeProvider","uiText","colors","uiAccent","primary","primaryDark","secondary","secondaryDark","MapListProvider","_extends","MapProvider","resetFilters","defaultZoomOverride","localStorageKey","PlacesProvider","placeMappings","pointsOfInterestConfig","additionalMapMarkers","markerColors","fillColor","strokeColor","selectedFillColor","selectedStrokeColor","placeMarkers","placeMarkerColors","size","placeMarkerSize","HireControlMap","_ref3","_siteConfig$pointsOfI2","_ref3$containerStyle","containerStyle","height","_ref3$navigateToDetai","navigateToDetails","_ref3$navigateToEasyA","navigateToEasyApply","_ref3$handleUrlUpdate","handleUrlUpdate","_ref3$Link","Link","_ref3$linkFormat","linkFormat","_ref3$easyApplyUrl","easyApplyUrl","_ref3$easyApplyText","easyApplyText","_ref3$isIframe","isIframe","_ref3$hideMap","hideMap","_ref3$hideFilters","hideFilters","_ref3$noEntities","noEntities","_ref3$trackEvent","eventType","eventObj","log","_ref3$listings","listings","_ref3$entities","entities","_ref3$getListingEntit","getListingEntitiesCallback","_ref3$defaultFilters","defaultFilters","_ref3$hiddenFilters","hiddenFilters","_ref3$setFiltersUrl","setFiltersUrl","_ref3$ExpandListCompo","ExpandListComponent","_ref3$additionalMapMa","_ref3$defaultZoomOver","_ref3$siteConfigurati","_ref3$localStorageKey","_ref3$algoliaAppId","algoliaAppId","_ref3$algoliaApiKey","algoliaApiKey","_ref3$algoliaIndexNam","algoliaIndexName","_ref3$filterConfig","filterConfig","hideZeroResults","dynamicCounts","showFavorites","collapsedByDefault","sortAlphabetically","classNames","filterContainer","filterContent","filterAccordion","filterAccordionHeader","filterAccordionContent","filterItem","filterItemLabel","filterItemCheckbox","filterItemCount","searchInput","resetButton","showJobsButton","filterFooter","_useSiteConfig","_useState7","initialized","initializeAlgoliaSearch","_useState8","algoliaInitialized","setAlgoliaInitialized","_useLoadScript","useLoadScript","version","libraries","isLoaded","loadError","className","effectiveShowMap","showMap","markerConfigs","process","env","GOOGLE_MAPS_API_KEY","Grid","as","id","columns","gap","autoRows","Item","Filter","isDesktop","MapList","mapPosition","fieldsShown","specialFeatures","fieldNames"],"mappings":";;;;;;;;;;;;;;;;;AAoBA;AACA,IAAMA,SAAS,GAAG,CAAC,QAAQ,CAAC,CAAA;;AAE5B;AACA,SAASC,aAAaA,CAACC,WAAW,EAA4B;AAAA,EAAA,IAA1BC,iBAAiB,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,IAAI,CAAA;AAC3D,EAAA,IAAAG,SAAA,GAAoCC,QAAQ,CAACL,iBAAiB,CAAC;IAAAM,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAxDI,IAAAA,UAAU,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,aAAa,GAAAH,UAAA,CAAA,CAAA,C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W;AAClC1H,IAAAA,aAAa,EAAAc,CAAAA,sBAAA,GAAExE,UAAU,CAAC2D,sBAAsB,CAACD,aAAa,MAAA,IAAA,IAAAc,sBAAA,KAAA,KAAA,CAAA,GAAAA,sBAAA,GAAI,EAAG;AACrE2F,IAAAA,aAAa,EAAEA,aAAAA;GACf,CACI,CACW,CAAC,CAAA;AAErB;;;;"}
|
|
@@ -22,14 +22,18 @@ const MapProvider = ({ children, resetFilters, defaultZoomOverride, localStorage
|
|
|
22
22
|
setStorageObject(localStorageKey + "selectedListItem", selectedListItem);
|
|
23
23
|
}, [selectedListItem, localStorageKey]);
|
|
24
24
|
useEffect(() => {
|
|
25
|
-
|
|
25
|
+
if (typeof window !== 'undefined') {
|
|
26
|
+
localStorage.setItem(localStorageKey + "zoom", zoom.toString());
|
|
27
|
+
}
|
|
26
28
|
}, [zoom, localStorageKey]);
|
|
27
29
|
useEffect(() => {
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
if (typeof window !== 'undefined') {
|
|
31
|
+
if (location == null) {
|
|
32
|
+
localStorage.removeItem(localStorageKey + "location");
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
setStorageObject(localStorageKey + "location", location);
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
}, [location, localStorageKey]);
|
|
35
39
|
useEffect(() => {
|
|
@@ -61,7 +65,9 @@ const MapProvider = ({ children, resetFilters, defaultZoomOverride, localStorage
|
|
|
61
65
|
}
|
|
62
66
|
}, [resetFilters]);
|
|
63
67
|
const selectLocationEntity = (location) => {
|
|
64
|
-
|
|
68
|
+
if (typeof window !== 'undefined') {
|
|
69
|
+
localStorage.removeItem(localStorageKey + "selectedListItem");
|
|
70
|
+
}
|
|
65
71
|
setTimeout(() => setLocation(location), 200);
|
|
66
72
|
setSelectedListItem(null);
|
|
67
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapContext.js","sources":["../../src/contexts/mapContext.tsx"],"sourcesContent":["import React, { createContext, useState, useContext, useEffect, useRef, ReactNode } from 'react';\nimport { getStorageObject, setStorageObject } from '~/util/localStorageUtil';\nimport { Listing } from '~/types/Listings';\nimport { LatLng } from '~/types/LatLng';\ninterface IMapContext {\n selectedListItem: Listing | null;\n setSelectedListItem: (item: Listing | null) => void;\n location: any | null;\n setLocation: (location: LatLng | null) => void;\n center: LatLng;\n setCenter: (center: LatLng) => void;\n zoom: number;\n setZoom: (zoom: number) => void;\n selectedPlaces: string[];\n setSelectedPlaces: (places: string[]) => void;\n mapInteracted: boolean;\n setMapInteracted: (interacted: boolean) => void;\n userSetZoom: React.MutableRefObject<boolean>;\n firstLoadListItem: any;\n selectItem: (item: Listing, itemLocation: LatLng | null, zoom: number, center: LatLng) => void;\n filterReset: () => void;\n selectLocationEntity: (location: LatLng) => void;\n\tdefaultZoomOverride?: number | null;\n}\n\nconst MapContext = createContext<IMapContext | undefined>(undefined);\n\nexport const useMap = () => {\n\tconst context = useContext(MapContext);\n\tif (!context) {\n\t\tthrow new Error(\"useMap must be used within a MapProvider\");\n\t}\n\treturn context;\n};\n\ninterface MapProviderProps {\n children: ReactNode;\n resetFilters: boolean;\n\tdefaultZoomOverride?: number | null;\n\tlocalStorageKey?: string;\n}\n\nexport const MapProvider: React.FC<MapProviderProps> = ({ children, resetFilters, defaultZoomOverride, localStorageKey = '' }) => {\n\tconst [selectedListItem, setSelectedListItem] = useState<Listing | null>(getStorageObject(localStorageKey + 'selectedListItem'));\n\tconst [location, setLocation] = useState<any>(getStorageObject(localStorageKey + 'location'));\n\tconst [center, setCenter] = useState<LatLng>(getStorageObject(localStorageKey + \"center\", { lat: 39.8283, lng: -98.5795 }) || { lat: 39.8283, lng: -98.5795 });\n\tconst [zoom, setZoom] = useState<number>(getStorageObject(localStorageKey + \"zoom\", 9) || 9);\n\tconst [selectedPlaces, setSelectedPlaces] = useState<string[]>([]);\n\tconst [mapInteracted, setMapInteracted] = useState<boolean>(false);\n\tconst [firstLoadListItem] = useState<any>(getStorageObject(localStorageKey + 'selectedListItem', { id: \"defaultId\" }));\n\tconst userSetZoom = useRef<boolean>(true);\n\n\tuseEffect(() => {\n\t\tsetStorageObject(localStorageKey + \"selectedListItem\", selectedListItem);\n\t}, [selectedListItem, localStorageKey]);\n\n\tuseEffect(() => {\n\t\tlocalStorage.setItem(localStorageKey + \"zoom\", zoom.toString());\n\t}, [zoom, localStorageKey]);\n\n\tuseEffect(() => {\n\t\tif (location == null) {\n\t\t\tlocalStorage.removeItem(localStorageKey + \"location\");\n\t\t} else {\n\t\t\tsetStorageObject(localStorageKey + \"location\", location);\n\t\t}\n\t}, [location, localStorageKey]);\n\n\tuseEffect(() => {\n\t\tsetStorageObject(localStorageKey + \"center\", center);\n\t}, [center, localStorageKey]);\n\n\tconst selectItem = (item: Listing, itemLocation: LatLng | null, zoom: number, center: LatLng) => {\n\t\tsetSelectedListItem(item);\n\t\tif (mapInteracted === false && itemLocation != null) {\n\t\t\tsetLocation(itemLocation);\n\t\t}\n\t\tif (mapInteracted === false || itemLocation != null) {\n\t\t\tsetLocation(itemLocation);\n\t\t\tsetCenter(center);\n\t\t}\n\t\tif (mapInteracted === false) {\n\t\t\tsetZoom(zoom);\n\t\t}\n\t};\n\n\tconst filterReset = () => {\n\t\tsetSelectedPlaces([]);\n\t\tsetSelectedListItem(null);\n\t\tsetLocation(null);\n\t\tsetZoom(8);\n\t\tsetMapInteracted(false);\n\t};\n\n\tuseEffect(() => {\n\t\tif (resetFilters === true) {\n\t\t\tfilterReset();\n\t\t}\n\t}, [resetFilters]);\n\n\tconst selectLocationEntity = (location: LatLng) => {\n\t\tlocalStorage.removeItem(localStorageKey + \"selectedListItem\");\n\t\tsetTimeout(() => setLocation(location), 200);\n\t\tsetSelectedListItem(null);\n\t};\n\n\treturn (\n\t\t<MapContext.Provider\n\t\t\tvalue={{\n\t\t\t\tselectedListItem,\n\t\t\t\tsetSelectedListItem,\n\t\t\t\tlocation,\n\t\t\t\tcenter,\n\t\t\t\tsetCenter,\n\t\t\t\tzoom,\n\t\t\t\tsetZoom,\n\t\t\t\tselectItem,\n\t\t\t\tsetSelectedPlaces,\n\t\t\t\tselectedPlaces,\n\t\t\t\tselectLocationEntity,\n\t\t\t\tsetLocation,\n\t\t\t\tsetMapInteracted,\n\t\t\t\tmapInteracted,\n\t\t\t\tuserSetZoom,\n\t\t\t\tfirstLoadListItem,\n\t\t\t\tfilterReset,\n\t\t\t\tdefaultZoomOverride\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</MapContext.Provider>\n\t);\n};\n"],"names":[],"mappings":";;;AAyBA,MAAM,UAAU,GAAG,aAAa,CAA0B,SAAS,CAAC,CAAC;AAE9D,MAAM,MAAM,GAAG,MAAK;AAC1B,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACvC,IAAI,CAAC,OAAO,EAAE;AACb,QAAA,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;AAC5D,KAAA;AACD,IAAA,OAAO,OAAO,CAAC;AAChB,EAAE;AASW,MAAA,WAAW,GAA+B,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,GAAG,EAAE,EAAE,KAAI;AAChI,IAAA,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAiB,gBAAgB,CAAC,eAAe,GAAG,kBAAkB,CAAC,CAAC,CAAC;AACjI,IAAA,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAM,gBAAgB,CAAC,eAAe,GAAG,UAAU,CAAC,CAAC,CAAC;AAC9F,IAAA,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAS,gBAAgB,CAAC,eAAe,GAAG,QAAQ,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;AAC/J,IAAA,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAS,gBAAgB,CAAC,eAAe,GAAG,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7F,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IACnE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;AACnE,IAAA,MAAM,CAAC,iBAAiB,CAAC,GAAG,QAAQ,CAAM,gBAAgB,CAAC,eAAe,GAAG,kBAAkB,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;AACvH,IAAA,MAAM,WAAW,GAAG,MAAM,CAAU,IAAI,CAAC,CAAC;IAE1C,SAAS,CAAC,MAAK;AACd,QAAA,gBAAgB,CAAC,eAAe,GAAG,kBAAkB,EAAE,gBAAgB,CAAC,CAAC;AAC1E,KAAC,EAAE,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC,CAAC;IAExC,SAAS,CAAC,MAAK;AACd,QAAA,YAAY,CAAC,OAAO,CAAC,eAAe,GAAG,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"mapContext.js","sources":["../../src/contexts/mapContext.tsx"],"sourcesContent":["import React, { createContext, useState, useContext, useEffect, useRef, ReactNode } from 'react';\nimport { getStorageObject, setStorageObject } from '~/util/localStorageUtil';\nimport { Listing } from '~/types/Listings';\nimport { LatLng } from '~/types/LatLng';\ninterface IMapContext {\n selectedListItem: Listing | null;\n setSelectedListItem: (item: Listing | null) => void;\n location: any | null;\n setLocation: (location: LatLng | null) => void;\n center: LatLng;\n setCenter: (center: LatLng) => void;\n zoom: number;\n setZoom: (zoom: number) => void;\n selectedPlaces: string[];\n setSelectedPlaces: (places: string[]) => void;\n mapInteracted: boolean;\n setMapInteracted: (interacted: boolean) => void;\n userSetZoom: React.MutableRefObject<boolean>;\n firstLoadListItem: any;\n selectItem: (item: Listing, itemLocation: LatLng | null, zoom: number, center: LatLng) => void;\n filterReset: () => void;\n selectLocationEntity: (location: LatLng) => void;\n\tdefaultZoomOverride?: number | null;\n}\n\nconst MapContext = createContext<IMapContext | undefined>(undefined);\n\nexport const useMap = () => {\n\tconst context = useContext(MapContext);\n\tif (!context) {\n\t\tthrow new Error(\"useMap must be used within a MapProvider\");\n\t}\n\treturn context;\n};\n\ninterface MapProviderProps {\n children: ReactNode;\n resetFilters: boolean;\n\tdefaultZoomOverride?: number | null;\n\tlocalStorageKey?: string;\n}\n\nexport const MapProvider: React.FC<MapProviderProps> = ({ children, resetFilters, defaultZoomOverride, localStorageKey = '' }) => {\n\tconst [selectedListItem, setSelectedListItem] = useState<Listing | null>(getStorageObject(localStorageKey + 'selectedListItem'));\n\tconst [location, setLocation] = useState<any>(getStorageObject(localStorageKey + 'location'));\n\tconst [center, setCenter] = useState<LatLng>(getStorageObject(localStorageKey + \"center\", { lat: 39.8283, lng: -98.5795 }) || { lat: 39.8283, lng: -98.5795 });\n\tconst [zoom, setZoom] = useState<number>(getStorageObject(localStorageKey + \"zoom\", 9) || 9);\n\tconst [selectedPlaces, setSelectedPlaces] = useState<string[]>([]);\n\tconst [mapInteracted, setMapInteracted] = useState<boolean>(false);\n\tconst [firstLoadListItem] = useState<any>(getStorageObject(localStorageKey + 'selectedListItem', { id: \"defaultId\" }));\n\tconst userSetZoom = useRef<boolean>(true);\n\n\tuseEffect(() => {\n\t\tsetStorageObject(localStorageKey + \"selectedListItem\", selectedListItem);\n\t}, [selectedListItem, localStorageKey]);\n\n\tuseEffect(() => {\n\t\tif (typeof window !== 'undefined') {\n\t\t\tlocalStorage.setItem(localStorageKey + \"zoom\", zoom.toString());\n\t\t}\n\t}, [zoom, localStorageKey]);\n\n\tuseEffect(() => {\n\t\tif (typeof window !== 'undefined') {\n\t\t\tif (location == null) {\n\t\t\t\tlocalStorage.removeItem(localStorageKey + \"location\");\n\t\t\t} else {\n\t\t\t\tsetStorageObject(localStorageKey + \"location\", location);\n\t\t\t}\n\t\t}\n\t}, [location, localStorageKey]);\n\n\tuseEffect(() => {\n\t\tsetStorageObject(localStorageKey + \"center\", center);\n\t}, [center, localStorageKey]);\n\n\tconst selectItem = (item: Listing, itemLocation: LatLng | null, zoom: number, center: LatLng) => {\n\t\tsetSelectedListItem(item);\n\t\tif (mapInteracted === false && itemLocation != null) {\n\t\t\tsetLocation(itemLocation);\n\t\t}\n\t\tif (mapInteracted === false || itemLocation != null) {\n\t\t\tsetLocation(itemLocation);\n\t\t\tsetCenter(center);\n\t\t}\n\t\tif (mapInteracted === false) {\n\t\t\tsetZoom(zoom);\n\t\t}\n\t};\n\n\tconst filterReset = () => {\n\t\tsetSelectedPlaces([]);\n\t\tsetSelectedListItem(null);\n\t\tsetLocation(null);\n\t\tsetZoom(8);\n\t\tsetMapInteracted(false);\n\t};\n\n\tuseEffect(() => {\n\t\tif (resetFilters === true) {\n\t\t\tfilterReset();\n\t\t}\n\t}, [resetFilters]);\n\n\tconst selectLocationEntity = (location: LatLng) => {\n\t\tif (typeof window !== 'undefined') {\n\t\t\tlocalStorage.removeItem(localStorageKey + \"selectedListItem\");\n\t\t}\n\t\tsetTimeout(() => setLocation(location), 200);\n\t\tsetSelectedListItem(null);\n\t};\n\n\treturn (\n\t\t<MapContext.Provider\n\t\t\tvalue={{\n\t\t\t\tselectedListItem,\n\t\t\t\tsetSelectedListItem,\n\t\t\t\tlocation,\n\t\t\t\tcenter,\n\t\t\t\tsetCenter,\n\t\t\t\tzoom,\n\t\t\t\tsetZoom,\n\t\t\t\tselectItem,\n\t\t\t\tsetSelectedPlaces,\n\t\t\t\tselectedPlaces,\n\t\t\t\tselectLocationEntity,\n\t\t\t\tsetLocation,\n\t\t\t\tsetMapInteracted,\n\t\t\t\tmapInteracted,\n\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AA,aAAA,CAAA,UAAU,CAAC,QAAQ,EAAA,EACnB,KAAK,EAAE;YACN,gBAAgB;YAChB,mBAAmB;YACnB,QAAQ;YACR,MAAM;YACN,SAAS;YACT,IAAI;YACJ,OAAO;YACP,UAAU;YACV,iBAAiB;YACjB,cAAc;YACd,oBAAoB;YACpB,WAAW;YACX,gBAAgB;YAChB,aAAa;YACb,WAAW;YACX,iBAAiB;YACjB,WAAW;YACX,mBAAmB;SACnB,EAEA,EAAA,QAAQ,CACY,EACrB;AACH;;;;"}
|
|
@@ -43,6 +43,9 @@ const MapListProvider = ({ children, siteConfig, googleMapsApiKey, resetFilters,
|
|
|
43
43
|
}
|
|
44
44
|
} }) => {
|
|
45
45
|
const firstLoadFilters = () => {
|
|
46
|
+
if (typeof window === 'undefined') {
|
|
47
|
+
return getStorageObject(localStorageKey + 'selectedFilters', {}) || {};
|
|
48
|
+
}
|
|
46
49
|
let urlData = filtersFromURL(window.location);
|
|
47
50
|
let urlFilters = urlData?.filters;
|
|
48
51
|
// If ls-ignore=true is in URL, don't load from localStorage
|
|
@@ -54,6 +57,8 @@ const MapListProvider = ({ children, siteConfig, googleMapsApiKey, resetFilters,
|
|
|
54
57
|
const firstLoadQuery = () => {
|
|
55
58
|
if (resetFilters)
|
|
56
59
|
return null;
|
|
60
|
+
if (typeof window === 'undefined')
|
|
61
|
+
return getQuery(localStorageKey);
|
|
57
62
|
// Check URL first
|
|
58
63
|
const urlData = filtersFromURL(window.location);
|
|
59
64
|
// If ls-ignore=true is in URL, don't load from localStorage
|
|
@@ -192,10 +197,12 @@ const MapListProvider = ({ children, siteConfig, googleMapsApiKey, resetFilters,
|
|
|
192
197
|
else if (!firstLoad) {
|
|
193
198
|
setStorageObject(localStorageKey + 'selectedFilters', tempSelectedFilters);
|
|
194
199
|
}
|
|
195
|
-
if (setFiltersUrl === true) {
|
|
200
|
+
if (setFiltersUrl === true && typeof window !== 'undefined') {
|
|
196
201
|
updateURLWithFilters(tempSelectedFilters, window.location, tempQuery, handleUrlUpdate);
|
|
197
202
|
}
|
|
198
|
-
|
|
203
|
+
if (typeof window !== 'undefined') {
|
|
204
|
+
tempQuery != null ? localStorage.setItem(localStorageKey + 'query', tempQuery) : localStorage.removeItem(localStorageKey + 'query');
|
|
205
|
+
}
|
|
199
206
|
if (tempSelectedFilters) {
|
|
200
207
|
const keys = Object.keys(tempSelectedFilters);
|
|
201
208
|
const lastKey = keys[keys.length - 1];
|
|
@@ -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,EAAE,E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Y,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\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 && 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 (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,UAA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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,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,CA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AAE,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,IAAAA,UAAU,GAAAD,UAAA,CAAA,CAAA,CAAA,CAAA;EACjB,IAAAE,UAAA,GAAsCR,QAAQ,CAACN,gBAAgB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAAAe,UAAA,GAAAP,cAAA,CAAAM,UAAA,EAAA,CAAA,CAAA;AAA9EE,IAAAA,WAAW,GAAAD,UAAA,CAAA,CAAA,CAAA;A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A,IAAI,CAACC,MAAM,CAACC,cAAc,EAAE,OAAA;AAC5B,IAAA,IAAI9C,gBAAgB,CAACgC,MAAM,GAAG3B,SAAS,EAAE;MACxCC,YAAY,CAAC,UAAAyC,SAAS,EAAA;QAAA,OAAIA,SAAS,GAAG,GAAG,CAAA;OAAC,CAAA,CAAA;AAC3C,KAAC,MAAM,IAAIzB,QAAQ,CAACE,OAAO,EAAE;AAC5BF,MAAAA,QAAQ,CAACE,OAAO,CAACwB,UAAU,EAAE,CAAA;AAC9B,KAAA;GACA,CAAA;AAED,EAAA,IAAMN,YAAY,GAAG,SAAfA,YAAYA,GAAS;IAC1B,IAAItB,kBAAkB,CAACI,OAAO,EAAE;AAC/BP,MAAAA,iBAAiB,CAACG,kBAAkB,CAACI,OAAO,CAACgB,SAAS,CAAC,CAAA;AACxD,KAAA;GACA,CAAA;EAED,OAAO;AAAEnC,IAAAA,SAAS,EAATA,SAAS;AAAEI,IAAAA,UAAU,EAAVA,UAAU;AAAEG,IAAAA,WAAW,EAAXA,WAAW;AAAEI,IAAAA,cAAc,EAAdA,cAAc;AAAEE,IAAAA,MAAM,EAANA,MAAM;AAAEE,IAAAA,kBAAkB,EAAlBA,kBAAkB;AAAEC,IAAAA,QAAQ,EAARA,QAAQ;AAAER,IAAAA,cAAc,EAAdA,cAAc;AAAEI,IAAAA,iBAAiB,EAAjBA,iBAAiB;AAAEjB,IAAAA,gBAAgB,EAAhBA,gBAAAA;GAAkB,CAAA;AACzJ;;;;"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/styles/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.hc-sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.hc-pointer-events-none{pointer-events:none}.hc-invisible{visibility:hidden}.hc-fixed{position:fixed}.hc-absolute{position:absolute}.hc-relative{position:relative}.hc-sticky{position:sticky}.hc-inset-0{bottom:0;left:0;right:0;top:0}.hc-bottom-0{bottom:0}.hc-bottom-10{bottom:2.5rem}.hc-left-0{left:0}.hc-left-2{left:.5rem}.hc-left-2\.5{left:.625rem}.hc-right-0{right:0}.hc-right-\[10px\]{right:10px}.hc-top-0{top:0}.hc-top-1{top:.25rem}.hc-top-1\.5{top:.375rem}.hc-top-\[10px\]{top:10px}.hc-z-10{z-index:10}.hc-z-20{z-index:20}.hc-z-50{z-index:50}.hc-z-\[200\]{z-index:200}.hc-z-\[2\]{z-index:2}.hc-order-1{order:1}.hc-order-2{order:2}.hc-order-first{order:-9999}.hc-order-last{order:9999}.hc-col-span-1{grid-column:span 1/span 1}.hc-col-span-2{grid-column:span 2/span 2}.hc-col-span-4{grid-column:span 4/span 4}.hc-float-right{float:right}.hc-m-auto{margin:auto}.hc-my-1{margin-bottom:.25rem;margin-top:.25rem}.hc-mb-2{margin-bottom:.5rem}.hc-mb-3{margin-bottom:.75rem}.hc-mb-5{margin-bottom:1.25rem}.hc-ml-auto{margin-left:auto}.hc-mr-1{margin-right:.25rem}.hc-mr-1\.5{margin-right:.375rem}.hc-mr-2{margin-right:.5rem}.hc-mt-1{margin-top:.25rem}.hc-mt-2{margin-top:.5rem}.hc-mt-4{margin-top:1rem}.hc-mt-6{margin-top:1.5rem}.hc-mt-px{margin-top:1px}.hc-block{display:block}.hc-inline-block{display:inline-block}.hc-inline{display:inline}.hc-flex{display:flex}.hc-inline-flex{display:inline-flex}.hc-grid{display:grid}.hc-hidden{display:none}.hc-size-2{height:.5rem;width:.5rem}.hc-size-2\.5{height:.625rem;width:.625rem}.hc-size-3{height:.75rem;width:.75rem}.hc-size-3\.5{height:.875rem;width:.875rem}.hc-size-4{height:1rem;width:1rem}.hc-size-5{height:1.25rem;width:1.25rem}.hc-size-8{height:2rem;width:2rem}.hc-h-5{height:1.25rem}.hc-h-\[100vh\]{height:100vh}.hc-h-\[25px\]{height:25px}.hc-h-\[calc\(100vh-180px\)\]{height:calc(100vh - 180px)}.hc-h-auto{height:auto}.hc-h-fit{height:-moz-fit-content;height:fit-content}.hc-h-full{height:100%}.hc-max-h-60{max-height:15rem}.hc-max-h-\[20vh\]{max-height:20vh}.hc-max-h-\[85vh\]{max-height:85vh}.hc-max-h-\[calc\(100vh-158px\)\]{max-height:calc(100vh - 158px)}.hc-max-h-full{max-height:100%}.hc-w-2\/5{width:40%}.hc-w-8{width:2rem}.hc-w-\[25px\]{width:25px}.hc-w-\[90vw\]{width:90vw}.hc-w-full{width:100%}.hc-min-w-\[100\%\]{min-width:100%}.hc-max-w-\[450px\]{max-width:450px}.hc-flex-1{flex:1 1 0%}.hc-flex-auto{flex:1 1 auto}.hc-shrink-0{flex-shrink:0}.hc-flex-grow,.hc-grow{flex-grow:1}.hc-rotate-45{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(45deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hc-contentShow{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.hc-animate-contentShow{animation:hc-contentShow .15s cubic-bezier(.16,1,.3,1)}@keyframes hc-overlayShow{0%{opacity:0}to{opacity:1}}.hc-animate-overlayShow{animation:hc-overlayShow .15s cubic-bezier(.16,1,.3,1)}@keyframes hc-pulse{50%{opacity:.5}}.hc-animate-pulse{animation:hc-pulse 2s cubic-bezier(.4,0,.6,1) infinite}.hc-cursor-default{cursor:default}.hc-cursor-not-allowed{cursor:not-allowed}.hc-cursor-pointer{cursor:pointer}.hc-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.hc-auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.hc-grid-flow-col{grid-auto-flow:column}.hc-auto-rows-min{grid-auto-rows:min-content}.hc-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.hc-flex-row{flex-direction:row}.hc-flex-col{flex-direction:column}.hc-flex-wrap{flex-wrap:wrap}.hc-items-start{align-items:flex-start}.hc-items-center{align-items:center}.hc-items-stretch{align-items:stretch}.hc-justify-end{justify-content:flex-end}.hc-justify-center{justify-content:center}.hc-justify-between{justify-content:space-between}.hc-gap-0{gap:0}.hc-gap-1{gap:.25rem}.hc-gap-1\.5{gap:.375rem}.hc-gap-12{gap:3rem}.hc-gap-2{gap:.5rem}.hc-gap-4{gap:1rem}.hc-gap-px{gap:1px}.hc-gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.hc-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:1rem;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:0;margin-right:calc(1rem*var(--tw-space-x-reverse))}.hc-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:.5rem;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.hc-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:1rem;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.hc-divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:1px;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:0;border-right-width:calc(1px*var(--tw-divide-x-reverse))}.hc-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:1px;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.hc-divide-primary>:not([hidden])~:not([hidden]){border-color:#959595;border-color:var(--primary)}.hc-overflow-auto{overflow:auto}.hc-overflow-hidden{overflow:hidden}.hc-overflow-y-auto{overflow-y:auto}.hc-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hc-text-balance{text-wrap:balance}.hc-break-words{word-wrap:break-word}.hc-rounded{border-radius:.25rem}.hc-rounded-\[6px\]{border-radius:6px}.hc-rounded-full{border-radius:9999px}.hc-rounded-md{border-radius:.375rem}.hc-rounded-none{border-radius:0}.hc-rounded-sm{border-radius:.125rem}.hc-rounded-b{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.hc-border{border-width:1px}.hc-border-0{border-width:0}.hc-border-x-0{border-left-width:0;border-right-width:0}.hc-border-b{border-bottom-width:1px}.hc-border-b-0{border-bottom-width:0}.hc-border-t{border-top-width:1px}.hc-border-t-0{border-top-width:0}.hc-border-none{border-style:none}.\!hc-border-secondary{border-color:#959595!important;border-color:var(--secondary)!important}.hc-border-gray-100{--tw-border-opacity:1;border-color:#f3f4f6;border-color:rgba(243,244,246,var(--tw-border-opacity))}.hc-border-gray-200{--tw-border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--tw-border-opacity))}.hc-border-primary{border-color:#959595;border-color:var(--primary)}.hc-border-secondary{border-color:#959595;border-color:var(--secondary)}.hc-border-transparent{border-color:transparent}.hc-bg-black\/50{background-color:rgba(0,0,0,.5)}.hc-bg-gray-100{--tw-bg-opacity:1;background-color:#f3f4f6;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hc-bg-gray-50{--tw-bg-opacity:1;background-color:#f9fafb;background-color:rgba(249,250,251,var(--tw-bg-opacity))}.hc-bg-primary{background-color:#959595;background-color:var(--primary)}.hc-bg-secondary{background-color:#959595;background-color:var(--secondary)}.hc-bg-transparent{background-color:transparent}.hc-bg-white{--tw-bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.hc-bg-clip-border{background-clip:border-box}.hc-object-cover{-o-object-fit:cover;object-fit:cover}.\!hc-p-0{padding:0!important}.\!hc-p-3{padding:.75rem!important}.hc-p-1{padding:.25rem}.hc-p-1\.5{padding:.375rem}.hc-p-2{padding:.5rem}.hc-p-2\.5{padding:.625rem}.hc-p-3{padding:.75rem}.hc-p-4{padding:1rem}.hc-p-\[25px\]{padding:25px}.hc-px-0{padding-left:0;padding-right:0}.hc-px-10{padding-left:2.5rem;padding-right:2.5rem}.hc-px-2{padding-left:.5rem;padding-right:.5rem}.hc-px-3{padding-left:.75rem;padding-right:.75rem}.hc-px-4{padding-left:1rem;padding-right:1rem}.hc-px-6{padding-left:1.5rem;padding-right:1.5rem}.hc-py-0{padding-bottom:0;padding-top:0}.hc-py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.hc-py-1{padding-bottom:.25rem;padding-top:.25rem}.hc-py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.hc-py-2{padding-bottom:.5rem;padding-top:.5rem}.hc-py-4{padding-bottom:1rem;padding-top:1rem}.hc-pb-1{padding-bottom:.25rem}.hc-pb-16{padding-bottom:4rem}.hc-pb-2{padding-bottom:.5rem}.hc-pb-4{padding-bottom:1rem}.hc-pl-1{padding-left:.25rem}.hc-pl-1\.5{padding-left:.375rem}.hc-pl-2{padding-left:.5rem}.hc-pl-4{padding-left:1rem}.hc-pl-7{padding-left:1.75rem}.hc-pr-1{padding-right:.25rem}.hc-pr-2{padding-right:.5rem}.hc-pr-3{padding-right:.75rem}.hc-pr-4{padding-right:1rem}.hc-pt-0{padding-top:0}.hc-pt-0\.5{padding-top:.125rem}.hc-pt-1{padding-top:.25rem}.hc-pt-1\.5{padding-top:.375rem}.hc-pt-2{padding-top:.5rem}.hc-pt-20{padding-top:5rem}.hc-text-left{text-align:left}.hc-text-center{text-align:center}.hc-align-middle{vertical-align:middle}.\!hc-font-\[inherit\]{font-family:inherit!important}.hc-text-2xl{font-size:1.5rem;line-height:2rem}.hc-text-\[15px\]{font-size:15px}.hc-text-\[17px\]{font-size:17px}.hc-text-base{font-size:1rem;line-height:1.5rem}.hc-text-lg{font-size:1.125rem;line-height:1.75rem}.hc-text-sm{font-size:.875rem;line-height:1.25rem}.hc-text-xs{font-size:.75rem;line-height:1rem}.hc-font-bold{font-weight:700}.hc-font-medium{font-weight:500}.hc-font-semibold{font-weight:600}.hc-uppercase{text-transform:uppercase}.hc-capitalize{text-transform:capitalize}.hc-normal-case{text-transform:none}.hc-leading-5{line-height:1.25rem}.hc-leading-none{line-height:1}.hc-leading-normal{line-height:1.5}.hc-leading-tight{line-height:1.25}.hc-text-black{--tw-text-opacity:1;color:#000;color:rgba(0,0,0,var(--tw-text-opacity))}.hc-text-blue-500{--tw-text-opacity:1;color:#3b82f6;color:rgba(59,130,246,var(--tw-text-opacity))}.hc-text-current{color:currentColor}.hc-text-gray-400{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.hc-text-gray-500{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.hc-text-gray-900{--tw-text-opacity:1;color:#111827;color:rgba(17,24,39,var(--tw-text-opacity))}.hc-text-inherit{color:inherit}.hc-text-primary{color:#959595;color:var(--primary)}.hc-text-uiAccent{color:#959595;color:var(--ui-accent)}.hc-text-uiText{color:#000;color:var(--ui-text)}.hc-text-white{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.hc-opacity-0{opacity:0}.hc-opacity-100{opacity:1}.hc-opacity-30{opacity:.3}.hc-opacity-85{opacity:.85}.hc-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hc-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hc-outline-none{outline:2px solid transparent;outline-offset:2px}.hc-ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.hc-ring-inset{--tw-ring-inset:inset}.hc-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-duration-100{transition-duration:.1s}.hc-duration-200{transition-duration:.2s}.hc-duration-300{transition-duration:.3s}.hc-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}@keyframes enter{0%{opacity:1;opacity:var(--tw-enter-opacity,1);transform:translateZ(0) scaleX(1) rotate(0);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:1;opacity:var(--tw-exit-opacity,1);transform:translateZ(0) scaleX(1) rotate(0);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.hc-animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-duration:.15s;animation-name:enter}.hc-fade-in{--tw-enter-opacity:0}.hc-slide-in-from-bottom-2{--tw-enter-translate-y:0.5rem}.hc-duration-100{animation-duration:.1s}.hc-duration-200{animation-duration:.2s}.hc-duration-300{animation-duration:.3s}.hc-ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.fit-content{height:-moz-fit-content;height:fit-content}:root{--ui-text:#000;--ui-accent:#959595;--primary:#959595;--primary-dark:#959595;--secondary:#959595;--secondary-dark:#959595}.placeholder\:hc-text-gray-400::-moz-placeholder{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.placeholder\:hc-text-gray-400::placeholder{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.focus-within\:hc-ring-1:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-within\:hc-ring-uiAccent:focus-within{--tw-ring-color:var(--ui-accent)}.hover\:hc-border-indigo-300:hover{--tw-border-opacity:1;border-color:#a5b4fc;border-color:rgba(165,180,252,var(--tw-border-opacity))}.hover\:hc-border-primaryDark:hover{border-color:#959595;border-color:var(--primary-dark)}.hover\:hc-bg-primaryDark:hover{background-color:#959595;background-color:var(--primary-dark)}.hover\:hc-bg-opacity-70:hover{--tw-bg-opacity:0.7}.hover\:hc-text-gray-500:hover{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.hover\:hc-text-primary:hover{color:#959595;color:var(--primary)}.hover\:hc-text-uiText:hover{color:#000;color:var(--ui-text)}.hover\:hc-text-white:hover{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.hover\:hc-opacity-70:hover{opacity:.7}.hover\:hc-opacity-75:hover{opacity:.75}.hover\:hc-shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\:hc-border-indigo-300:focus{--tw-border-opacity:1;border-color:#a5b4fc;border-color:rgba(165,180,252,var(--tw-border-opacity))}.focus\:hc-border-primaryDark:focus{border-color:#959595;border-color:var(--primary-dark)}.focus\:hc-bg-primaryDark:focus{background-color:#959595;background-color:var(--primary-dark)}.focus\:hc-bg-opacity-70:focus{--tw-bg-opacity:0.7}.focus\:hc-text-primary:focus{color:#959595;color:var(--primary)}.focus\:hc-text-uiText:focus{color:#000;color:var(--ui-text)}.focus\:hc-text-white:focus{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.focus\:hc-opacity-70:focus{opacity:.7}.focus\:hc-shadow-xl:focus{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\:hc-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:hc-ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-visible\:hc-ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-visible\:hc-ring-uiAccent:focus-visible{--tw-ring-color:var(--ui-accent)}.focus-visible\:hc-ring-opacity-75:focus-visible{--tw-ring-opacity:0.75}.hc-group:active .group-active\:hc-opacity-100,.hc-group:hover .group-hover\:hc-opacity-100{opacity:1}.data-\[disabled\]\:hc-pointer-events-none[data-disabled]{pointer-events:none}@keyframes hc-slideUp{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:hc-animate-slideUp[data-state=closed]{animation:hc-slideUp .3s cubic-bezier(.87,0,.13,1)}@keyframes hc-slideDown{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:hc-animate-slideDown[data-state=open]{animation:hc-slideDown .3s cubic-bezier(.87,0,.13,1)}.data-\[state\=open\]\:hc-rounded-b-none[data-state=open]{border-bottom-left-radius:0;border-bottom-right-radius:0}.data-\[state\=open\]\:hc-border-b-transparent[data-state=open]{border-bottom-color:transparent}.data-\[highlighted\]\:hc-bg-primary[data-highlighted],.data-\[state\=active\]\:hc-bg-primary[data-state=active]{background-color:#959595;background-color:var(--primary)}.data-\[disabled\]\:hc-text-gray-500[data-disabled]{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.data-\[highlighted\]\:hc-text-white[data-highlighted],.data-\[state\=active\]\:hc-text-white[data-state=active]{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.data-\[state\=open\]\:hc-text-primary[data-state=open]{color:#959595;color:var(--primary)}.data-\[highlighted\]\:hc-outline-none[data-highlighted]{outline:2px solid transparent;outline-offset:2px}.hc-group[data-state=open] .group-data-\[state\=open\]\:\!hc-rotate-180{--tw-rotate:180deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(180deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@media (min-width:640px){.sm\:hc-w-1\/3{width:33.333333%}.sm\:hc-text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:768px){.md\:hc-absolute{position:absolute}.md\:hc-relative{position:relative}.md\:hc-left-1{left:.25rem}.md\:hc-left-1\.5{left:.375rem}.md\:hc-order-1{order:1}.md\:hc-order-2{order:2}.md\:hc-mb-2{margin-bottom:.5rem}.md\:hc-block{display:block}.md\:hc-flex{display:flex}.md\:hc-grid{display:grid}.md\:hc-hidden{display:none}.md\:hc-h-\[calc\(100\%-48px\)\]{height:calc(100% - 48px)}.md\:hc-max-h-\[100\%\]{max-height:100%}.md\:hc-max-h-\[25vh\]{max-height:25vh}.md\:hc-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:hc-grid-cols-\[1fr_2\.5fr\]{grid-template-columns:1fr 2.5fr}.md\:hc-grid-rows-\[100\%\]{grid-template-rows:100%}.md\:hc-grid-rows-\[50\%_50\%\]{grid-template-rows:50% 50%}.md\:hc-flex-row{flex-direction:row}.md\:hc-flex-col{flex-direction:column}.md\:hc-justify-start{justify-content:flex-start}.md\:hc-self-center{align-self:center}.md\:hc-overflow-y-auto{overflow-y:auto}.md\:hc-border-none{border-style:none}.md\:hc-bg-transparent{background-color:transparent}.md\:hc-p-0{padding:0}.md\:hc-px-4{padding-left:1rem;padding-right:1rem}.md\:hc-px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:hc-pb-0{padding-bottom:0}.md\:hc-pb-16{padding-bottom:4rem}.md\:hc-pt-4{padding-top:1rem}.md\:hc-text-sm{font-size:.875rem;line-height:1.25rem}.md\:hc-text-xs{font-size:.75rem;line-height:1rem}}@media (min-width:1024px){.lg\:hc-order-last{order:9999}.lg\:hc-mb-0{margin-bottom:0}.lg\:hc-inline{display:inline}.lg\:hc-w-auto{width:auto}.lg\:hc-grid-cols-\[1fr_3\.5fr\]{grid-template-columns:1fr 3.5fr}.lg\:hc-flex-row{flex-direction:row}.lg\:hc-gap-16{gap:4rem}.lg\:hc-border-none{border-style:none}.lg\:hc-p-0{padding:0}.lg\:hc-px-8{padding-left:2rem;padding-right:2rem}.lg\:hc-pt-2{padding-top:.5rem}.lg\:hc-text-sm{font-size:.875rem;line-height:1.25rem}}
|
|
1
|
+
.hc-sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.hc-pointer-events-none{pointer-events:none}.hc-invisible{visibility:hidden}.hc-fixed{position:fixed}.hc-absolute{position:absolute}.hc-relative{position:relative}.hc-sticky{position:sticky}.hc-inset-0{bottom:0;left:0;right:0;top:0}.hc-bottom-0{bottom:0}.hc-bottom-10{bottom:2.5rem}.hc-left-0{left:0}.hc-left-2{left:.5rem}.hc-left-2\.5{left:.625rem}.hc-right-0{right:0}.hc-right-\[10px\]{right:10px}.hc-top-0{top:0}.hc-top-1{top:.25rem}.hc-top-1\.5{top:.375rem}.hc-top-\[10px\]{top:10px}.hc-z-10{z-index:10}.hc-z-20{z-index:20}.hc-z-50{z-index:50}.hc-z-\[200\]{z-index:200}.hc-z-\[2\]{z-index:2}.hc-order-first{order:-9999}.hc-order-last{order:9999}.hc-col-span-1{grid-column:span 1/span 1}.hc-col-span-2{grid-column:span 2/span 2}.hc-col-span-4{grid-column:span 4/span 4}.hc-float-right{float:right}.hc-m-auto{margin:auto}.hc-my-1{margin-bottom:.25rem;margin-top:.25rem}.hc-mb-2{margin-bottom:.5rem}.hc-mb-3{margin-bottom:.75rem}.hc-mb-5{margin-bottom:1.25rem}.hc-ml-auto{margin-left:auto}.hc-mr-1{margin-right:.25rem}.hc-mr-1\.5{margin-right:.375rem}.hc-mr-2{margin-right:.5rem}.hc-mt-1{margin-top:.25rem}.hc-mt-2{margin-top:.5rem}.hc-mt-4{margin-top:1rem}.hc-mt-6{margin-top:1.5rem}.hc-mt-px{margin-top:1px}.hc-block{display:block}.hc-inline-block{display:inline-block}.hc-inline{display:inline}.hc-flex{display:flex}.hc-inline-flex{display:inline-flex}.hc-grid{display:grid}.hc-hidden{display:none}.hc-size-2{height:.5rem;width:.5rem}.hc-size-2\.5{height:.625rem;width:.625rem}.hc-size-3{height:.75rem;width:.75rem}.hc-size-3\.5{height:.875rem;width:.875rem}.hc-size-4{height:1rem;width:1rem}.hc-size-5{height:1.25rem;width:1.25rem}.hc-size-8{height:2rem;width:2rem}.hc-h-5{height:1.25rem}.hc-h-\[100vh\]{height:100vh}.hc-h-\[25px\]{height:25px}.hc-h-\[calc\(100vh-180px\)\]{height:calc(100vh - 180px)}.hc-h-auto{height:auto}.hc-h-fit{height:-moz-fit-content;height:fit-content}.hc-h-full{height:100%}.hc-max-h-60{max-height:15rem}.hc-max-h-\[20vh\]{max-height:20vh}.hc-max-h-\[85vh\]{max-height:85vh}.hc-max-h-\[calc\(100vh-158px\)\]{max-height:calc(100vh - 158px)}.hc-max-h-full{max-height:100%}.hc-w-2\/5{width:40%}.hc-w-8{width:2rem}.hc-w-\[25px\]{width:25px}.hc-w-\[90vw\]{width:90vw}.hc-w-full{width:100%}.hc-min-w-\[100\%\]{min-width:100%}.hc-max-w-\[450px\]{max-width:450px}.hc-flex-1{flex:1 1 0%}.hc-flex-auto{flex:1 1 auto}.hc-shrink-0{flex-shrink:0}.hc-flex-grow,.hc-grow{flex-grow:1}.hc-rotate-45{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(45deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hc-contentShow{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.hc-animate-contentShow{animation:hc-contentShow .15s cubic-bezier(.16,1,.3,1)}@keyframes hc-overlayShow{0%{opacity:0}to{opacity:1}}.hc-animate-overlayShow{animation:hc-overlayShow .15s cubic-bezier(.16,1,.3,1)}@keyframes hc-pulse{50%{opacity:.5}}.hc-animate-pulse{animation:hc-pulse 2s cubic-bezier(.4,0,.6,1) infinite}.hc-cursor-default{cursor:default}.hc-cursor-not-allowed{cursor:not-allowed}.hc-cursor-pointer{cursor:pointer}.hc-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.hc-auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.hc-grid-flow-col{grid-auto-flow:column}.hc-auto-rows-min{grid-auto-rows:min-content}.hc-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.hc-flex-row{flex-direction:row}.hc-flex-col{flex-direction:column}.hc-flex-wrap{flex-wrap:wrap}.hc-items-start{align-items:flex-start}.hc-items-center{align-items:center}.hc-items-stretch{align-items:stretch}.hc-justify-end{justify-content:flex-end}.hc-justify-center{justify-content:center}.hc-justify-between{justify-content:space-between}.hc-gap-0{gap:0}.hc-gap-1{gap:.25rem}.hc-gap-1\.5{gap:.375rem}.hc-gap-12{gap:3rem}.hc-gap-2{gap:.5rem}.hc-gap-4{gap:1rem}.hc-gap-px{gap:1px}.hc-gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.hc-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:1rem;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:0;margin-right:calc(1rem*var(--tw-space-x-reverse))}.hc-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:.5rem;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.hc-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:1rem;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.hc-divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:1px;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:0;border-right-width:calc(1px*var(--tw-divide-x-reverse))}.hc-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:1px;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.hc-divide-primary>:not([hidden])~:not([hidden]){border-color:#959595;border-color:var(--primary)}.hc-overflow-auto{overflow:auto}.hc-overflow-hidden{overflow:hidden}.hc-overflow-y-auto{overflow-y:auto}.hc-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hc-text-balance{text-wrap:balance}.hc-break-words{word-wrap:break-word}.hc-rounded{border-radius:.25rem}.hc-rounded-\[6px\]{border-radius:6px}.hc-rounded-full{border-radius:9999px}.hc-rounded-md{border-radius:.375rem}.hc-rounded-none{border-radius:0}.hc-rounded-sm{border-radius:.125rem}.hc-rounded-b{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.hc-border{border-width:1px}.hc-border-0{border-width:0}.hc-border-x-0{border-left-width:0;border-right-width:0}.hc-border-b{border-bottom-width:1px}.hc-border-b-0{border-bottom-width:0}.hc-border-t{border-top-width:1px}.hc-border-t-0{border-top-width:0}.hc-border-none{border-style:none}.\!hc-border-secondary{border-color:#959595!important;border-color:var(--secondary)!important}.hc-border-gray-100{--tw-border-opacity:1;border-color:#f3f4f6;border-color:rgba(243,244,246,var(--tw-border-opacity))}.hc-border-gray-200{--tw-border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--tw-border-opacity))}.hc-border-primary{border-color:#959595;border-color:var(--primary)}.hc-border-secondary{border-color:#959595;border-color:var(--secondary)}.hc-border-transparent{border-color:transparent}.hc-bg-black\/50{background-color:rgba(0,0,0,.5)}.hc-bg-gray-100{--tw-bg-opacity:1;background-color:#f3f4f6;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hc-bg-primary{background-color:#959595;background-color:var(--primary)}.hc-bg-secondary{background-color:#959595;background-color:var(--secondary)}.hc-bg-transparent{background-color:transparent}.hc-bg-white{--tw-bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.hc-bg-clip-border{background-clip:border-box}.hc-object-cover{-o-object-fit:cover;object-fit:cover}.\!hc-p-0{padding:0!important}.\!hc-p-3{padding:.75rem!important}.hc-p-1{padding:.25rem}.hc-p-1\.5{padding:.375rem}.hc-p-2{padding:.5rem}.hc-p-2\.5{padding:.625rem}.hc-p-3{padding:.75rem}.hc-p-4{padding:1rem}.hc-p-\[25px\]{padding:25px}.hc-px-0{padding-left:0;padding-right:0}.hc-px-10{padding-left:2.5rem;padding-right:2.5rem}.hc-px-2{padding-left:.5rem;padding-right:.5rem}.hc-px-3{padding-left:.75rem;padding-right:.75rem}.hc-px-4{padding-left:1rem;padding-right:1rem}.hc-px-6{padding-left:1.5rem;padding-right:1.5rem}.hc-py-0{padding-bottom:0;padding-top:0}.hc-py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.hc-py-1{padding-bottom:.25rem;padding-top:.25rem}.hc-py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.hc-py-2{padding-bottom:.5rem;padding-top:.5rem}.hc-py-4{padding-bottom:1rem;padding-top:1rem}.hc-pb-1{padding-bottom:.25rem}.hc-pb-16{padding-bottom:4rem}.hc-pb-2{padding-bottom:.5rem}.hc-pb-4{padding-bottom:1rem}.hc-pl-1{padding-left:.25rem}.hc-pl-1\.5{padding-left:.375rem}.hc-pl-2{padding-left:.5rem}.hc-pl-4{padding-left:1rem}.hc-pl-7{padding-left:1.75rem}.hc-pr-1{padding-right:.25rem}.hc-pr-2{padding-right:.5rem}.hc-pr-3{padding-right:.75rem}.hc-pr-4{padding-right:1rem}.hc-pt-0{padding-top:0}.hc-pt-0\.5{padding-top:.125rem}.hc-pt-1{padding-top:.25rem}.hc-pt-1\.5{padding-top:.375rem}.hc-pt-2{padding-top:.5rem}.hc-pt-20{padding-top:5rem}.hc-text-left{text-align:left}.hc-text-center{text-align:center}.hc-align-middle{vertical-align:middle}.\!hc-font-\[inherit\]{font-family:inherit!important}.hc-text-2xl{font-size:1.5rem;line-height:2rem}.hc-text-\[15px\]{font-size:15px}.hc-text-\[17px\]{font-size:17px}.hc-text-base{font-size:1rem;line-height:1.5rem}.hc-text-lg{font-size:1.125rem;line-height:1.75rem}.hc-text-sm{font-size:.875rem;line-height:1.25rem}.hc-text-xs{font-size:.75rem;line-height:1rem}.hc-font-bold{font-weight:700}.hc-font-medium{font-weight:500}.hc-font-semibold{font-weight:600}.hc-uppercase{text-transform:uppercase}.hc-capitalize{text-transform:capitalize}.hc-normal-case{text-transform:none}.hc-leading-5{line-height:1.25rem}.hc-leading-none{line-height:1}.hc-leading-normal{line-height:1.5}.hc-leading-tight{line-height:1.25}.hc-text-black{--tw-text-opacity:1;color:#000;color:rgba(0,0,0,var(--tw-text-opacity))}.hc-text-blue-500{--tw-text-opacity:1;color:#3b82f6;color:rgba(59,130,246,var(--tw-text-opacity))}.hc-text-current{color:currentColor}.hc-text-gray-400{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.hc-text-gray-500{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.hc-text-gray-900{--tw-text-opacity:1;color:#111827;color:rgba(17,24,39,var(--tw-text-opacity))}.hc-text-inherit{color:inherit}.hc-text-primary{color:#959595;color:var(--primary)}.hc-text-uiAccent{color:#959595;color:var(--ui-accent)}.hc-text-uiText{color:#000;color:var(--ui-text)}.hc-text-white{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.hc-opacity-0{opacity:0}.hc-opacity-100{opacity:1}.hc-opacity-30{opacity:.3}.hc-opacity-85{opacity:.85}.hc-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hc-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hc-outline-none{outline:2px solid transparent;outline-offset:2px}.hc-ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.hc-ring-inset{--tw-ring-inset:inset}.hc-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-duration-100{transition-duration:.1s}.hc-duration-200{transition-duration:.2s}.hc-duration-300{transition-duration:.3s}.hc-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}@keyframes enter{0%{opacity:1;opacity:var(--tw-enter-opacity,1);transform:translateZ(0) scaleX(1) rotate(0);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:1;opacity:var(--tw-exit-opacity,1);transform:translateZ(0) scaleX(1) rotate(0);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.hc-animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-duration:.15s;animation-name:enter}.hc-fade-in{--tw-enter-opacity:0}.hc-slide-in-from-bottom-2{--tw-enter-translate-y:0.5rem}.hc-duration-100{animation-duration:.1s}.hc-duration-200{animation-duration:.2s}.hc-duration-300{animation-duration:.3s}.hc-ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.fit-content{height:-moz-fit-content;height:fit-content}:root{--ui-text:#000;--ui-accent:#959595;--primary:#959595;--primary-dark:#959595;--secondary:#959595;--secondary-dark:#959595}.placeholder\:hc-text-gray-400::-moz-placeholder{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.placeholder\:hc-text-gray-400::placeholder{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.focus-within\:hc-ring-1:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-within\:hc-ring-uiAccent:focus-within{--tw-ring-color:var(--ui-accent)}.hover\:hc-border-indigo-300:hover{--tw-border-opacity:1;border-color:#a5b4fc;border-color:rgba(165,180,252,var(--tw-border-opacity))}.hover\:hc-border-primaryDark:hover{border-color:#959595;border-color:var(--primary-dark)}.hover\:hc-bg-primaryDark:hover{background-color:#959595;background-color:var(--primary-dark)}.hover\:hc-bg-opacity-70:hover{--tw-bg-opacity:0.7}.hover\:hc-text-gray-500:hover{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.hover\:hc-text-primary:hover{color:#959595;color:var(--primary)}.hover\:hc-text-uiText:hover{color:#000;color:var(--ui-text)}.hover\:hc-text-white:hover{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.hover\:hc-opacity-70:hover{opacity:.7}.hover\:hc-opacity-75:hover{opacity:.75}.hover\:hc-shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\:hc-border-indigo-300:focus{--tw-border-opacity:1;border-color:#a5b4fc;border-color:rgba(165,180,252,var(--tw-border-opacity))}.focus\:hc-border-primaryDark:focus{border-color:#959595;border-color:var(--primary-dark)}.focus\:hc-bg-primaryDark:focus{background-color:#959595;background-color:var(--primary-dark)}.focus\:hc-bg-opacity-70:focus{--tw-bg-opacity:0.7}.focus\:hc-text-primary:focus{color:#959595;color:var(--primary)}.focus\:hc-text-uiText:focus{color:#000;color:var(--ui-text)}.focus\:hc-text-white:focus{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.focus\:hc-opacity-70:focus{opacity:.7}.focus\:hc-shadow-xl:focus{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\:hc-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:hc-ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-visible\:hc-ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-visible\:hc-ring-uiAccent:focus-visible{--tw-ring-color:var(--ui-accent)}.focus-visible\:hc-ring-opacity-75:focus-visible{--tw-ring-opacity:0.75}.hc-group:active .group-active\:hc-opacity-100,.hc-group:hover .group-hover\:hc-opacity-100{opacity:1}.data-\[disabled\]\:hc-pointer-events-none[data-disabled]{pointer-events:none}@keyframes hc-slideUp{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:hc-animate-slideUp[data-state=closed]{animation:hc-slideUp .3s cubic-bezier(.87,0,.13,1)}@keyframes hc-slideDown{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:hc-animate-slideDown[data-state=open]{animation:hc-slideDown .3s cubic-bezier(.87,0,.13,1)}.data-\[state\=open\]\:hc-rounded-b-none[data-state=open]{border-bottom-left-radius:0;border-bottom-right-radius:0}.data-\[state\=open\]\:hc-border-b-transparent[data-state=open]{border-bottom-color:transparent}.data-\[highlighted\]\:hc-bg-primary[data-highlighted],.data-\[state\=active\]\:hc-bg-primary[data-state=active]{background-color:#959595;background-color:var(--primary)}.data-\[disabled\]\:hc-text-gray-500[data-disabled]{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.data-\[highlighted\]\:hc-text-white[data-highlighted],.data-\[state\=active\]\:hc-text-white[data-state=active]{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.data-\[state\=open\]\:hc-text-primary[data-state=open]{color:#959595;color:var(--primary)}.data-\[highlighted\]\:hc-outline-none[data-highlighted]{outline:2px solid transparent;outline-offset:2px}.hc-group[data-state=open] .group-data-\[state\=open\]\:\!hc-rotate-180{--tw-rotate:180deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(180deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@media (min-width:640px){.sm\:hc-w-1\/3{width:33.333333%}.sm\:hc-text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:768px){.md\:hc-absolute{position:absolute}.md\:hc-relative{position:relative}.md\:hc-left-1{left:.25rem}.md\:hc-left-1\.5{left:.375rem}.md\:hc-mb-2{margin-bottom:.5rem}.md\:hc-block{display:block}.md\:hc-flex{display:flex}.md\:hc-grid{display:grid}.md\:hc-hidden{display:none}.md\:hc-h-\[calc\(100\%-48px\)\]{height:calc(100% - 48px)}.md\:hc-max-h-\[100\%\]{max-height:100%}.md\:hc-max-h-\[25vh\]{max-height:25vh}.md\:hc-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:hc-grid-cols-\[1fr_2\.5fr\]{grid-template-columns:1fr 2.5fr}.md\:hc-grid-rows-\[100\%\]{grid-template-rows:100%}.md\:hc-grid-rows-\[50\%_50\%\]{grid-template-rows:50% 50%}.md\:hc-flex-col{flex-direction:column}.md\:hc-justify-start{justify-content:flex-start}.md\:hc-self-center{align-self:center}.md\:hc-overflow-y-auto{overflow-y:auto}.md\:hc-border-none{border-style:none}.md\:hc-bg-transparent{background-color:transparent}.md\:hc-p-0{padding:0}.md\:hc-px-4{padding-left:1rem;padding-right:1rem}.md\:hc-px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:hc-pb-0{padding-bottom:0}.md\:hc-pb-16{padding-bottom:4rem}.md\:hc-pt-4{padding-top:1rem}.md\:hc-text-sm{font-size:.875rem;line-height:1.25rem}.md\:hc-text-xs{font-size:.75rem;line-height:1rem}}@media (min-width:1024px){.lg\:hc-order-last{order:9999}.lg\:hc-mb-0{margin-bottom:0}.lg\:hc-inline{display:inline}.lg\:hc-w-auto{width:auto}.lg\:hc-grid-cols-\[1fr_3\.5fr\]{grid-template-columns:1fr 3.5fr}.lg\:hc-flex-row{flex-direction:row}.lg\:hc-gap-16{gap:4rem}.lg\:hc-border-none{border-style:none}.lg\:hc-p-0{padding:0}.lg\:hc-px-8{padding-left:2rem;padding-right:2rem}.lg\:hc-pt-2{padding-top:.5rem}.lg\:hc-text-sm{font-size:.875rem;line-height:1.25rem}}
|
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ import { useLoadScript } from '@react-google-maps/api';
|
|
|
4
4
|
import Grid from '~/components/modules/grid';
|
|
5
5
|
import Filter from '~/components/containers/filter/filter-container';
|
|
6
6
|
import MapList from '~/components/containers/maps/map-list-container';
|
|
7
|
-
import MapSkeleton from '~/components/modules/skeleton/map-skeleton';
|
|
8
7
|
|
|
9
8
|
// Context imports
|
|
10
9
|
import { MapProvider } from '~/contexts/mapContext';
|
|
@@ -55,14 +55,18 @@ export const MapProvider: React.FC<MapProviderProps> = ({ children, resetFilters
|
|
|
55
55
|
}, [selectedListItem, localStorageKey]);
|
|
56
56
|
|
|
57
57
|
useEffect(() => {
|
|
58
|
-
|
|
58
|
+
if (typeof window !== 'undefined') {
|
|
59
|
+
localStorage.setItem(localStorageKey + "zoom", zoom.toString());
|
|
60
|
+
}
|
|
59
61
|
}, [zoom, localStorageKey]);
|
|
60
62
|
|
|
61
63
|
useEffect(() => {
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
if (typeof window !== 'undefined') {
|
|
65
|
+
if (location == null) {
|
|
66
|
+
localStorage.removeItem(localStorageKey + "location");
|
|
67
|
+
} else {
|
|
68
|
+
setStorageObject(localStorageKey + "location", location);
|
|
69
|
+
}
|
|
66
70
|
}
|
|
67
71
|
}, [location, localStorageKey]);
|
|
68
72
|
|
|
@@ -99,7 +103,9 @@ export const MapProvider: React.FC<MapProviderProps> = ({ children, resetFilters
|
|
|
99
103
|
}, [resetFilters]);
|
|
100
104
|
|
|
101
105
|
const selectLocationEntity = (location: LatLng) => {
|
|
102
|
-
|
|
106
|
+
if (typeof window !== 'undefined') {
|
|
107
|
+
localStorage.removeItem(localStorageKey + "selectedListItem");
|
|
108
|
+
}
|
|
103
109
|
setTimeout(() => setLocation(location), 200);
|
|
104
110
|
setSelectedListItem(null);
|
|
105
111
|
};
|
|
@@ -197,6 +197,9 @@ export const MapListProvider: React.FC<MapListProviderProps> = ({
|
|
|
197
197
|
}
|
|
198
198
|
}) => {
|
|
199
199
|
const firstLoadFilters = () =>{
|
|
200
|
+
if (typeof window === 'undefined') {
|
|
201
|
+
return getStorageObject(localStorageKey + 'selectedFilters', {}) || {};
|
|
202
|
+
}
|
|
200
203
|
let urlData = filtersFromURL(window.location);
|
|
201
204
|
let urlFilters = urlData?.filters;
|
|
202
205
|
|
|
@@ -210,6 +213,7 @@ export const MapListProvider: React.FC<MapListProviderProps> = ({
|
|
|
210
213
|
|
|
211
214
|
const firstLoadQuery = (): string | null => {
|
|
212
215
|
if (resetFilters) return null;
|
|
216
|
+
if (typeof window === 'undefined') return getQuery(localStorageKey);
|
|
213
217
|
// Check URL first
|
|
214
218
|
const urlData = filtersFromURL(window.location);
|
|
215
219
|
|
|
@@ -375,11 +379,13 @@ export const MapListProvider: React.FC<MapListProviderProps> = ({
|
|
|
375
379
|
} else if (!firstLoad) {
|
|
376
380
|
setStorageObject(localStorageKey + 'selectedFilters', tempSelectedFilters);
|
|
377
381
|
}
|
|
378
|
-
if(setFiltersUrl === true)
|
|
382
|
+
if(setFiltersUrl === true && typeof window !== 'undefined')
|
|
379
383
|
{
|
|
380
384
|
updateURLWithFilters(tempSelectedFilters, window.location, tempQuery, handleUrlUpdate);
|
|
381
385
|
}
|
|
382
|
-
|
|
386
|
+
if (typeof window !== 'undefined') {
|
|
387
|
+
tempQuery != null ? localStorage.setItem(localStorageKey + 'query', tempQuery) : localStorage.removeItem(localStorageKey + 'query');
|
|
388
|
+
}
|
|
383
389
|
|
|
384
390
|
if (tempSelectedFilters) {
|
|
385
391
|
const keys = Object.keys(tempSelectedFilters);
|
package/src/hooks/useList.js
CHANGED
|
@@ -40,7 +40,9 @@ const useListLogic = filteredListings => {
|
|
|
40
40
|
}, [filteredListings.length, itemLimit]);
|
|
41
41
|
|
|
42
42
|
useEffect(() => {
|
|
43
|
-
|
|
43
|
+
if (typeof window !== 'undefined') {
|
|
44
|
+
localStorage.setItem('scrollPosition', scrollPosition.toString());
|
|
45
|
+
}
|
|
44
46
|
}, [scrollPosition]);
|
|
45
47
|
|
|
46
48
|
useEffect(() => {
|
package/src/index.js
CHANGED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Grid from '~/components/modules/grid';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Simple skeleton component that renders the basic structure
|
|
6
|
-
* Shows placeholder boxes for filters, list, and map
|
|
7
|
-
*/
|
|
8
|
-
const MapSkeleton = ({
|
|
9
|
-
hideFilters = false,
|
|
10
|
-
showMap = true,
|
|
11
|
-
containerStyle = { height: '100vh' },
|
|
12
|
-
mapPosition = 'right'
|
|
13
|
-
}) => {
|
|
14
|
-
const isMapOnTop = mapPosition === 'top';
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<div className="hc-bundle" style={containerStyle}>
|
|
18
|
-
<Grid
|
|
19
|
-
as='section'
|
|
20
|
-
id='job-search-interface'
|
|
21
|
-
columns={hideFilters ? 'hc-grid-cols-1' : 'md:hc-grid-cols-[1fr_2.5fr] lg:hc-grid-cols-[1fr_3.5fr]'}
|
|
22
|
-
gap='hc-gap-0'
|
|
23
|
-
autoRows={false}
|
|
24
|
-
className={'hc-items-stretch hc-divide-x hc-divide-uiAccent/20'}
|
|
25
|
-
>
|
|
26
|
-
{/* Filter Column */}
|
|
27
|
-
{!hideFilters && (
|
|
28
|
-
<Grid.Item className='hc-bg-gray-50 hc-animate-pulse hc-hidden md:hc-block' />
|
|
29
|
-
)}
|
|
30
|
-
|
|
31
|
-
{/* Main Content Area */}
|
|
32
|
-
<Grid.Item>
|
|
33
|
-
{showMap ? (
|
|
34
|
-
<div className={`hc-h-full hc-flex ${isMapOnTop ? 'hc-flex-col' : 'hc-flex-col md:hc-flex-row'}`}>
|
|
35
|
-
{/* List Box */}
|
|
36
|
-
<div className={`hc-flex-1 hc-bg-white hc-animate-pulse ${isMapOnTop ? 'hc-order-2' : 'hc-order-2 md:hc-order-1'}`} />
|
|
37
|
-
|
|
38
|
-
{/* Map Box */}
|
|
39
|
-
<div className={`hc-flex-1 hc-bg-gray-100 hc-animate-pulse ${isMapOnTop ? 'hc-order-1' : 'hc-order-1 md:hc-order-2'}`} style={{ minHeight: '300px' }} />
|
|
40
|
-
</div>
|
|
41
|
-
) : (
|
|
42
|
-
/* Just List Box */
|
|
43
|
-
<div className="hc-h-full hc-bg-white hc-animate-pulse" />
|
|
44
|
-
)}
|
|
45
|
-
</Grid.Item>
|
|
46
|
-
</Grid>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export default MapSkeleton;
|