@garagem-ai/site-sdk 0.13.2 → 0.13.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/index.d.mts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +32 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -5
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs.map +1 -1
- package/dist/{types-photo-search-BPLxl65M.d.mts → types-photo-search-BROgleJq.d.mts} +12 -1
- package/dist/{types-photo-search-BPLxl65M.d.ts → types-photo-search-BROgleJq.d.ts} +12 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/search-engine.ts +42 -0
- package/src/studio-contract.ts +8 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, a as Listing, b as ListingLocation, c as ListingMedia, S as SearchPathFilters, d as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, e as AppliedSearchChange, f as ListingFilters, g as ListingsResult, h as Site, i as SearchListingsParams, j as SearchListingsResult, k as SearchUi, l as QueryListingsParams, m as QueryListingsResult, n as SimilarListingsResult, C as CmsCollection, o as CmsEntriesResult, p as CmsEntry, B as BoundaryCity, q as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, r as TravelTimeCache, s as MapsFetchOptions, t as BoundaryLayer, u as ListingWithLocation, v as StaticMapOptions, w as StreetViewAvailabilityOptions, x as StreetViewAvailability, y as StreetViewOptions, N as NeighborhoodBoundaryOptions, z as NeighborhoodBoundary, D as TravelDestination, E as TravelMode, G as TravelTimeOptions, H as TravelTime, I as TravelTimesOptions, J as TravelTimeElement, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search-
|
|
2
|
-
export { W as BoundaryFeature, X as BoundaryFeatureCollection, Y as BoundaryGeometry, Z as BoundaryLayerUrlKind, _ as BoundarySourceLayer, $ as CmsEntryStatus, a0 as CmsFieldDefinition, a1 as CmsFieldType, a2 as CmsSeoData, a3 as FORBIDDEN_SEARCH_QUERY_KEYS, a4 as GaragemSdkError, a5 as GetCmsCollectionOptions, a6 as GetCmsCollectionsOptions, a7 as GetCmsEntriesOptions, a8 as GetCmsEntryOptions, a9 as GetListingOptions, aa as GetListingsOptions, ab as GetSearchUiOptions, ac as GetSimilarListingsOptions, ad as GetSiteOptions, ae as ListingBusinessType, af as ListingCardModel, ag as ListingPriceVisibility, ah as ListingPropertySummary, ai as LocationNameTables, aj as MAP_POLYGON_MAX_VERTICES, ak as MAP_SEARCH_DEFAULT_PAGE_SIZE, al as MAP_SEARCH_MAX_PAGE_SIZE, am as MAP_VIEWPORT_DEBOUNCE_MS, an as MapBounds, ao as MapBoundsSearchOptions, ap as MapBucket, aq as MapPin, ar as MapPinCluster, as as MapPolygon, at as MapPolygonSearchOptions, au as MapSearchResult, av as MapsBaseOptions, aw as QueryListingsLocation, ax as QueryListingsOptions, ay as SEARCH_EMPTY_COPY, az as SEARCH_SORT_RELEVANCE, aA as SearchChromeModel, aB as SearchListingsOptions, aC as SearchPathLocation, aD as SearchUiFilter, aE as SearchUiOption, aF as StaticMapStyle, aG as TOOLBAR_PRIMARY_FILTER_IDS, aH as applyPathFilter, aI as buildQueryListingsParams, aJ as canonicalizeSearchHref, aK as capMapPage, aL as capMapPageSize, aM as clearStagedPathFilters, aN as clusterBuckets, aO as clusterPins, aP as countFacetChoices, aQ as countOptionLabel, aR as displayPathLocation, aS as getCmsCollection, aT as getCmsCollections, aU as getCmsEntries, aV as getCmsEntry, aW as getListing, aX as getListings, aY as getSearchUi, aZ as getSimilarListings, a_ as getSite, a$ as hrefForAppliedChange, b0 as hrefForPathFilters, b1 as hrefWithExplicitPage, b2 as isListingDetailPath, b3 as isMapBounds, b4 as isMapPolygon, b5 as listingLocationLabel, b6 as mapClusterCellDegrees, b7 as mapSearchPins, b8 as paginationPages, b9 as pathFilterHasOption, ba as pathFilterValue, bb as publicSearchHref, bc as queryListings, bd as rangeDraftFromPath, be as readPublicSearch, bf as searchChromeModel, bg as searchHrefUsesLegacyFilterQuery, bh as searchListings, bi as searchListingsInBounds, bj as searchListingsInPolygon, bk as searchResultsHeading, bl as searchSortOptions, bm as toListingCardModel, bn as toolbarFilterIds, bo as visibleSearchFilters } from './types-photo-search-
|
|
1
|
+
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, a as Listing, b as ListingLocation, c as ListingMedia, S as SearchPathFilters, d as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, e as AppliedSearchChange, f as ListingFilters, g as ListingsResult, h as Site, i as SearchListingsParams, j as SearchListingsResult, k as SearchUi, l as QueryListingsParams, m as QueryListingsResult, n as SimilarListingsResult, C as CmsCollection, o as CmsEntriesResult, p as CmsEntry, B as BoundaryCity, q as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, r as TravelTimeCache, s as MapsFetchOptions, t as BoundaryLayer, u as ListingWithLocation, v as StaticMapOptions, w as StreetViewAvailabilityOptions, x as StreetViewAvailability, y as StreetViewOptions, N as NeighborhoodBoundaryOptions, z as NeighborhoodBoundary, D as TravelDestination, E as TravelMode, G as TravelTimeOptions, H as TravelTime, I as TravelTimesOptions, J as TravelTimeElement, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search-BROgleJq.mjs';
|
|
2
|
+
export { W as BoundaryFeature, X as BoundaryFeatureCollection, Y as BoundaryGeometry, Z as BoundaryLayerUrlKind, _ as BoundarySourceLayer, $ as CmsEntryStatus, a0 as CmsFieldDefinition, a1 as CmsFieldType, a2 as CmsSeoData, a3 as FORBIDDEN_SEARCH_QUERY_KEYS, a4 as GaragemSdkError, a5 as GetCmsCollectionOptions, a6 as GetCmsCollectionsOptions, a7 as GetCmsEntriesOptions, a8 as GetCmsEntryOptions, a9 as GetListingOptions, aa as GetListingsOptions, ab as GetSearchUiOptions, ac as GetSimilarListingsOptions, ad as GetSiteOptions, ae as ListingBusinessType, af as ListingCardModel, ag as ListingPriceVisibility, ah as ListingPropertySummary, ai as LocationNameTables, aj as MAP_POLYGON_MAX_VERTICES, ak as MAP_SEARCH_DEFAULT_PAGE_SIZE, al as MAP_SEARCH_MAX_PAGE_SIZE, am as MAP_VIEWPORT_DEBOUNCE_MS, an as MapBounds, ao as MapBoundsSearchOptions, ap as MapBucket, aq as MapPin, ar as MapPinCluster, as as MapPolygon, at as MapPolygonSearchOptions, au as MapSearchResult, av as MapsBaseOptions, aw as QueryListingsLocation, ax as QueryListingsOptions, ay as SEARCH_EMPTY_COPY, az as SEARCH_SORT_RELEVANCE, aA as SearchChromeModel, aB as SearchListingsOptions, aC as SearchPathLocation, aD as SearchUiFilter, aE as SearchUiOption, aF as StaticMapStyle, aG as TOOLBAR_PRIMARY_FILTER_IDS, aH as applyPathFilter, aI as buildQueryListingsParams, aJ as canonicalizeSearchHref, aK as capMapPage, aL as capMapPageSize, aM as clearStagedPathFilters, aN as clusterBuckets, aO as clusterPins, aP as countFacetChoices, aQ as countOptionLabel, aR as displayPathLocation, aS as getCmsCollection, aT as getCmsCollections, aU as getCmsEntries, aV as getCmsEntry, aW as getListing, aX as getListings, aY as getSearchUi, aZ as getSimilarListings, a_ as getSite, a$ as hrefForAppliedChange, b0 as hrefForPathFilters, b1 as hrefWithExplicitPage, b2 as isListingDetailPath, b3 as isMapBounds, b4 as isMapPolygon, b5 as listingLocationLabel, b6 as mapClusterCellDegrees, b7 as mapSearchPins, b8 as paginationPages, b9 as pathFilterHasOption, ba as pathFilterValue, bb as publicSearchHref, bc as queryListings, bd as rangeDraftFromPath, be as readPublicSearch, bf as searchChromeModel, bg as searchHrefUsesLegacyFilterQuery, bh as searchListings, bi as searchListingsInBounds, bj as searchListingsInPolygon, bk as searchResultsHeading, bl as searchSortOptions, bm as toListingCardModel, bn as toolbarFilterIds, bo as unknownSearchLocation, bp as visibleSearchFilters } from './types-photo-search-BROgleJq.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Types for the public Share Link API (`GET`/`POST /api/sites/share/{token}`).
|
|
@@ -686,11 +686,12 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
686
686
|
* Weighted map buckets (`map.buckets`, clustered by the hook) shipped
|
|
687
687
|
* in 0.11.0. Share links (`getShareLink`, `/p/[token]`) shipped in
|
|
688
688
|
* 0.12.0. Analytics catalog events (`trackListingView` plus the search
|
|
689
|
-
* and lead emitters) shipped in 0.13.0.
|
|
690
|
-
*
|
|
691
|
-
*
|
|
689
|
+
* and lead emitters) shipped in 0.13.0. `property_search` sends a city
|
|
690
|
+
* or neighborhood only when the site's location table knows it, as of
|
|
691
|
+
* 0.13.2. Search filter helpers (`visibleSearchFilters` /
|
|
692
|
+
* `toolbarFilterIds`) shipped in 0.4.12 and remain on this pin.
|
|
692
693
|
*/
|
|
693
|
-
readonly minNpmVersion: "0.13.
|
|
694
|
+
readonly minNpmVersion: "0.13.2";
|
|
694
695
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
695
696
|
readonly selfInjectSince: "0.4.2";
|
|
696
697
|
readonly chromeStrategy: "app-owned";
|
|
@@ -759,7 +760,7 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
759
760
|
* they move into `searchExports`. Independent of the 0.4.12 filter helpers
|
|
760
761
|
* already listed in `searchExports`.
|
|
761
762
|
*/
|
|
762
|
-
readonly unpublishedSearchExports: readonly ["searchChromeModel", "rangeDraftFromPath"];
|
|
763
|
+
readonly unpublishedSearchExports: readonly ["searchChromeModel", "rangeDraftFromPath", "unknownSearchLocation"];
|
|
763
764
|
/**
|
|
764
765
|
* maps.fndn.ai helpers (static map, street view, boundaries, travel
|
|
765
766
|
* time) plus friendly map search. They ship in npm 0.9.0 (`mapsSince`).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, a as Listing, b as ListingLocation, c as ListingMedia, S as SearchPathFilters, d as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, e as AppliedSearchChange, f as ListingFilters, g as ListingsResult, h as Site, i as SearchListingsParams, j as SearchListingsResult, k as SearchUi, l as QueryListingsParams, m as QueryListingsResult, n as SimilarListingsResult, C as CmsCollection, o as CmsEntriesResult, p as CmsEntry, B as BoundaryCity, q as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, r as TravelTimeCache, s as MapsFetchOptions, t as BoundaryLayer, u as ListingWithLocation, v as StaticMapOptions, w as StreetViewAvailabilityOptions, x as StreetViewAvailability, y as StreetViewOptions, N as NeighborhoodBoundaryOptions, z as NeighborhoodBoundary, D as TravelDestination, E as TravelMode, G as TravelTimeOptions, H as TravelTime, I as TravelTimesOptions, J as TravelTimeElement, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search-
|
|
2
|
-
export { W as BoundaryFeature, X as BoundaryFeatureCollection, Y as BoundaryGeometry, Z as BoundaryLayerUrlKind, _ as BoundarySourceLayer, $ as CmsEntryStatus, a0 as CmsFieldDefinition, a1 as CmsFieldType, a2 as CmsSeoData, a3 as FORBIDDEN_SEARCH_QUERY_KEYS, a4 as GaragemSdkError, a5 as GetCmsCollectionOptions, a6 as GetCmsCollectionsOptions, a7 as GetCmsEntriesOptions, a8 as GetCmsEntryOptions, a9 as GetListingOptions, aa as GetListingsOptions, ab as GetSearchUiOptions, ac as GetSimilarListingsOptions, ad as GetSiteOptions, ae as ListingBusinessType, af as ListingCardModel, ag as ListingPriceVisibility, ah as ListingPropertySummary, ai as LocationNameTables, aj as MAP_POLYGON_MAX_VERTICES, ak as MAP_SEARCH_DEFAULT_PAGE_SIZE, al as MAP_SEARCH_MAX_PAGE_SIZE, am as MAP_VIEWPORT_DEBOUNCE_MS, an as MapBounds, ao as MapBoundsSearchOptions, ap as MapBucket, aq as MapPin, ar as MapPinCluster, as as MapPolygon, at as MapPolygonSearchOptions, au as MapSearchResult, av as MapsBaseOptions, aw as QueryListingsLocation, ax as QueryListingsOptions, ay as SEARCH_EMPTY_COPY, az as SEARCH_SORT_RELEVANCE, aA as SearchChromeModel, aB as SearchListingsOptions, aC as SearchPathLocation, aD as SearchUiFilter, aE as SearchUiOption, aF as StaticMapStyle, aG as TOOLBAR_PRIMARY_FILTER_IDS, aH as applyPathFilter, aI as buildQueryListingsParams, aJ as canonicalizeSearchHref, aK as capMapPage, aL as capMapPageSize, aM as clearStagedPathFilters, aN as clusterBuckets, aO as clusterPins, aP as countFacetChoices, aQ as countOptionLabel, aR as displayPathLocation, aS as getCmsCollection, aT as getCmsCollections, aU as getCmsEntries, aV as getCmsEntry, aW as getListing, aX as getListings, aY as getSearchUi, aZ as getSimilarListings, a_ as getSite, a$ as hrefForAppliedChange, b0 as hrefForPathFilters, b1 as hrefWithExplicitPage, b2 as isListingDetailPath, b3 as isMapBounds, b4 as isMapPolygon, b5 as listingLocationLabel, b6 as mapClusterCellDegrees, b7 as mapSearchPins, b8 as paginationPages, b9 as pathFilterHasOption, ba as pathFilterValue, bb as publicSearchHref, bc as queryListings, bd as rangeDraftFromPath, be as readPublicSearch, bf as searchChromeModel, bg as searchHrefUsesLegacyFilterQuery, bh as searchListings, bi as searchListingsInBounds, bj as searchListingsInPolygon, bk as searchResultsHeading, bl as searchSortOptions, bm as toListingCardModel, bn as toolbarFilterIds, bo as visibleSearchFilters } from './types-photo-search-
|
|
1
|
+
import { L as ListingDetail, F as FetchLike, R as RequestNextOptions, a as Listing, b as ListingLocation, c as ListingMedia, S as SearchPathFilters, d as SearchUiDictionary, Q as QueryListingsFilters, A as AppliedSearchQuery, e as AppliedSearchChange, f as ListingFilters, g as ListingsResult, h as Site, i as SearchListingsParams, j as SearchListingsResult, k as SearchUi, l as QueryListingsParams, m as QueryListingsResult, n as SimilarListingsResult, C as CmsCollection, o as CmsEntriesResult, p as CmsEntry, B as BoundaryCity, q as BoundaryLayerOptions, M as MapsCoordinates, T as TravelTimeCacheOptions, r as TravelTimeCache, s as MapsFetchOptions, t as BoundaryLayer, u as ListingWithLocation, v as StaticMapOptions, w as StreetViewAvailabilityOptions, x as StreetViewAvailability, y as StreetViewOptions, N as NeighborhoodBoundaryOptions, z as NeighborhoodBoundary, D as TravelDestination, E as TravelMode, G as TravelTimeOptions, H as TravelTime, I as TravelTimesOptions, J as TravelTimeElement, P as PhotoSearchParams, K as PhotoSearchResult, O as PhotoSearchItem, U as ListingWithMatchedPhoto, V as MatchedListingPhoto } from './types-photo-search-BROgleJq.js';
|
|
2
|
+
export { W as BoundaryFeature, X as BoundaryFeatureCollection, Y as BoundaryGeometry, Z as BoundaryLayerUrlKind, _ as BoundarySourceLayer, $ as CmsEntryStatus, a0 as CmsFieldDefinition, a1 as CmsFieldType, a2 as CmsSeoData, a3 as FORBIDDEN_SEARCH_QUERY_KEYS, a4 as GaragemSdkError, a5 as GetCmsCollectionOptions, a6 as GetCmsCollectionsOptions, a7 as GetCmsEntriesOptions, a8 as GetCmsEntryOptions, a9 as GetListingOptions, aa as GetListingsOptions, ab as GetSearchUiOptions, ac as GetSimilarListingsOptions, ad as GetSiteOptions, ae as ListingBusinessType, af as ListingCardModel, ag as ListingPriceVisibility, ah as ListingPropertySummary, ai as LocationNameTables, aj as MAP_POLYGON_MAX_VERTICES, ak as MAP_SEARCH_DEFAULT_PAGE_SIZE, al as MAP_SEARCH_MAX_PAGE_SIZE, am as MAP_VIEWPORT_DEBOUNCE_MS, an as MapBounds, ao as MapBoundsSearchOptions, ap as MapBucket, aq as MapPin, ar as MapPinCluster, as as MapPolygon, at as MapPolygonSearchOptions, au as MapSearchResult, av as MapsBaseOptions, aw as QueryListingsLocation, ax as QueryListingsOptions, ay as SEARCH_EMPTY_COPY, az as SEARCH_SORT_RELEVANCE, aA as SearchChromeModel, aB as SearchListingsOptions, aC as SearchPathLocation, aD as SearchUiFilter, aE as SearchUiOption, aF as StaticMapStyle, aG as TOOLBAR_PRIMARY_FILTER_IDS, aH as applyPathFilter, aI as buildQueryListingsParams, aJ as canonicalizeSearchHref, aK as capMapPage, aL as capMapPageSize, aM as clearStagedPathFilters, aN as clusterBuckets, aO as clusterPins, aP as countFacetChoices, aQ as countOptionLabel, aR as displayPathLocation, aS as getCmsCollection, aT as getCmsCollections, aU as getCmsEntries, aV as getCmsEntry, aW as getListing, aX as getListings, aY as getSearchUi, aZ as getSimilarListings, a_ as getSite, a$ as hrefForAppliedChange, b0 as hrefForPathFilters, b1 as hrefWithExplicitPage, b2 as isListingDetailPath, b3 as isMapBounds, b4 as isMapPolygon, b5 as listingLocationLabel, b6 as mapClusterCellDegrees, b7 as mapSearchPins, b8 as paginationPages, b9 as pathFilterHasOption, ba as pathFilterValue, bb as publicSearchHref, bc as queryListings, bd as rangeDraftFromPath, be as readPublicSearch, bf as searchChromeModel, bg as searchHrefUsesLegacyFilterQuery, bh as searchListings, bi as searchListingsInBounds, bj as searchListingsInPolygon, bk as searchResultsHeading, bl as searchSortOptions, bm as toListingCardModel, bn as toolbarFilterIds, bo as unknownSearchLocation, bp as visibleSearchFilters } from './types-photo-search-BROgleJq.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Types for the public Share Link API (`GET`/`POST /api/sites/share/{token}`).
|
|
@@ -686,11 +686,12 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
686
686
|
* Weighted map buckets (`map.buckets`, clustered by the hook) shipped
|
|
687
687
|
* in 0.11.0. Share links (`getShareLink`, `/p/[token]`) shipped in
|
|
688
688
|
* 0.12.0. Analytics catalog events (`trackListingView` plus the search
|
|
689
|
-
* and lead emitters) shipped in 0.13.0.
|
|
690
|
-
*
|
|
691
|
-
*
|
|
689
|
+
* and lead emitters) shipped in 0.13.0. `property_search` sends a city
|
|
690
|
+
* or neighborhood only when the site's location table knows it, as of
|
|
691
|
+
* 0.13.2. Search filter helpers (`visibleSearchFilters` /
|
|
692
|
+
* `toolbarFilterIds`) shipped in 0.4.12 and remain on this pin.
|
|
692
693
|
*/
|
|
693
|
-
readonly minNpmVersion: "0.13.
|
|
694
|
+
readonly minNpmVersion: "0.13.2";
|
|
694
695
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
695
696
|
readonly selfInjectSince: "0.4.2";
|
|
696
697
|
readonly chromeStrategy: "app-owned";
|
|
@@ -759,7 +760,7 @@ declare const STUDIO_SDK_CONTRACT: {
|
|
|
759
760
|
* they move into `searchExports`. Independent of the 0.4.12 filter helpers
|
|
760
761
|
* already listed in `searchExports`.
|
|
761
762
|
*/
|
|
762
|
-
readonly unpublishedSearchExports: readonly ["searchChromeModel", "rangeDraftFromPath"];
|
|
763
|
+
readonly unpublishedSearchExports: readonly ["searchChromeModel", "rangeDraftFromPath", "unknownSearchLocation"];
|
|
763
764
|
/**
|
|
764
765
|
* maps.fndn.ai helpers (static map, street view, boundaries, travel
|
|
765
766
|
* time) plus friendly map search. They ship in npm 0.9.0 (`mapsSince`).
|
package/dist/index.js
CHANGED
|
@@ -223,6 +223,7 @@ __export(src_exports, {
|
|
|
223
223
|
travelTimesFromListing: () => travelTimesFromListing,
|
|
224
224
|
truncateNationalPhoneDigits: () => truncateNationalPhoneDigits,
|
|
225
225
|
unavailableReactImports: () => unavailableReactImports,
|
|
226
|
+
unknownSearchLocation: () => unknownSearchLocation,
|
|
226
227
|
uploadSellerLeadPhoto: () => uploadSellerLeadPhoto,
|
|
227
228
|
visibleSearchFilters: () => visibleSearchFilters
|
|
228
229
|
});
|
|
@@ -1259,6 +1260,27 @@ function lookupDisplay(table, slug) {
|
|
|
1259
1260
|
if (!slug || !table) return slug;
|
|
1260
1261
|
return table[slug] || table[String(slug).toLowerCase()] || slug;
|
|
1261
1262
|
}
|
|
1263
|
+
var LOCATION_FIELDS = ["state", "city", "neighborhood", "street"];
|
|
1264
|
+
var LOCATION_TABLE_KEY = {
|
|
1265
|
+
state: "states",
|
|
1266
|
+
city: "cities",
|
|
1267
|
+
neighborhood: "neighborhoods",
|
|
1268
|
+
street: "streets"
|
|
1269
|
+
};
|
|
1270
|
+
function locationTableHasSlug(table, slug) {
|
|
1271
|
+
if (!table) return false;
|
|
1272
|
+
if (Object.hasOwn(table, slug)) return true;
|
|
1273
|
+
const lower = slug.toLowerCase();
|
|
1274
|
+
return lower !== slug && Object.hasOwn(table, lower);
|
|
1275
|
+
}
|
|
1276
|
+
function unknownSearchLocation(location, tables) {
|
|
1277
|
+
if (!location) return false;
|
|
1278
|
+
const present = LOCATION_FIELDS.filter((key) => location[key]);
|
|
1279
|
+
if (present.length === 0 || !tables) return false;
|
|
1280
|
+
return present.some(
|
|
1281
|
+
(key) => !locationTableHasSlug(tables[LOCATION_TABLE_KEY[key]], location[key])
|
|
1282
|
+
);
|
|
1283
|
+
}
|
|
1262
1284
|
function displayPathLocation(location, values) {
|
|
1263
1285
|
if (!location) return null;
|
|
1264
1286
|
const table = values || {};
|
|
@@ -3348,11 +3370,12 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
3348
3370
|
* Weighted map buckets (`map.buckets`, clustered by the hook) shipped
|
|
3349
3371
|
* in 0.11.0. Share links (`getShareLink`, `/p/[token]`) shipped in
|
|
3350
3372
|
* 0.12.0. Analytics catalog events (`trackListingView` plus the search
|
|
3351
|
-
* and lead emitters) shipped in 0.13.0.
|
|
3352
|
-
*
|
|
3353
|
-
*
|
|
3373
|
+
* and lead emitters) shipped in 0.13.0. `property_search` sends a city
|
|
3374
|
+
* or neighborhood only when the site's location table knows it, as of
|
|
3375
|
+
* 0.13.2. Search filter helpers (`visibleSearchFilters` /
|
|
3376
|
+
* `toolbarFilterIds`) shipped in 0.4.12 and remain on this pin.
|
|
3354
3377
|
*/
|
|
3355
|
-
minNpmVersion: "0.13.
|
|
3378
|
+
minNpmVersion: "0.13.2",
|
|
3356
3379
|
/** Historical: older tarballs inject card CSS when those components mount. */
|
|
3357
3380
|
selfInjectSince: "0.4.2",
|
|
3358
3381
|
chromeStrategy: "app-owned",
|
|
@@ -3475,7 +3498,10 @@ var STUDIO_SDK_CONTRACT = {
|
|
|
3475
3498
|
*/
|
|
3476
3499
|
unpublishedSearchExports: [
|
|
3477
3500
|
"searchChromeModel",
|
|
3478
|
-
"rangeDraftFromPath"
|
|
3501
|
+
"rangeDraftFromPath",
|
|
3502
|
+
// `unknownSearchLocation` is in git. Prompts inline the same check with
|
|
3503
|
+
// `parseSearchPublicPath` + `locationsPath` until this name is on the pin.
|
|
3504
|
+
"unknownSearchLocation"
|
|
3479
3505
|
],
|
|
3480
3506
|
/**
|
|
3481
3507
|
* maps.fndn.ai helpers (static map, street view, boundaries, travel
|
|
@@ -5385,6 +5411,7 @@ function applyMatchedPhotoCover(cards, photoResults, options = {}) {
|
|
|
5385
5411
|
travelTimesFromListing,
|
|
5386
5412
|
truncateNationalPhoneDigits,
|
|
5387
5413
|
unavailableReactImports,
|
|
5414
|
+
unknownSearchLocation,
|
|
5388
5415
|
uploadSellerLeadPhoto,
|
|
5389
5416
|
visibleSearchFilters
|
|
5390
5417
|
});
|