From 062ccf75c5106473677309508a3a075f97f17372 Mon Sep 17 00:00:00 2001 From: Davis Date: Tue, 3 Dec 2024 11:40:29 -0800 Subject: [PATCH 1/3] @stratusjs/idx inclue MLSAreaMinor in searches --- packages/idx/src/idx.ts | 45 +++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/packages/idx/src/idx.ts b/packages/idx/src/idx.ts index 97f36806..c2ebe812 100644 --- a/packages/idx/src/idx.ts +++ b/packages/idx/src/idx.ts @@ -270,8 +270,10 @@ export interface WhereOptions extends LooseObject { eCityRegion?: string[] | string, CountyOrParish?: string[] | string, eCountyOrParish?: string[] | string, - MLSAreaMajor?: string[] | string, // DEPRECATED - eMLSAreaMajor?: string[] | string, // DEPRECATED + MLSAreaMajor?: string[] | string, + eMLSAreaMajor?: string[] | string, + MLSAreaMinor?: string[] | string, + eMLSAreaMinor?: string[] | string, SubdivisionName?: string[] | string, eSubdivisionName?: string[] | string, ListPriceMin?: number | any, @@ -661,8 +663,10 @@ const angularJsService = ( ListingType: [], CountyOrParish: [], eCountyOrParish: [], - MLSAreaMajor: [], // DEPRECATED - eMLSAreaMajor: [], // DEPRECATED + MLSAreaMajor: [], + eMLSAreaMajor: [], + MLSAreaMinor: [], + eMLSAreaMinor: [], SubdivisionName: [], eSubdivisionName: [], Neighborhood: [], @@ -1959,14 +1963,22 @@ const angularJsService = ( apiField: 'SubdivisionName', type: 'stringIncludesArray' }, - MLSAreaMajor: { // DEPRECATED + MLSAreaMajor: { // Note: only 'in' seems to work as a replacement for inq when nested in another object type: 'stringLikeArray' }, - eMLSAreaMajor: { // DEPRECATED + eMLSAreaMajor: { apiField: 'MLSAreaMajor', type: 'stringIncludesArray' }, + MLSAreaMinor: { + // Note: only 'in' seems to work as a replacement for inq when nested in another object + type: 'stringLikeArray' + }, + eMLSAreaMinor: { + apiField: 'MLSAreaMinor', + type: 'stringIncludesArray' + }, CityRegion: { // Note: only 'in' seems to work as a replacement for inq when nested in another object type: 'stringLikeArray' @@ -1982,7 +1994,8 @@ const angularJsService = ( {apiField: 'CityRegion', type: 'stringLikeArray'}, {apiField: 'CountyOrParish', type: 'stringLikeArray'}, {apiField: 'SubdivisionName', type: 'stringLikeArray'}, - {apiField: 'MLSAreaMajor', type: 'stringLikeArray'}, // DEPRECATED + {apiField: 'MLSAreaMajor', type: 'stringLikeArray'}, + {apiField: 'MLSAreaMinor', type: 'stringLikeArray'}, {apiField: 'PostalCode', type: 'stringLikeArray'}, // TODO: in the future we should pass in a new defined field like Address (that will // TODO: search UnparsedAddress if it exists for the service, OR the API will parse @@ -1999,7 +2012,8 @@ const angularJsService = ( {apiField: 'CityRegion', type: 'stringIncludesArray'}, {apiField: 'CountyOrParish', type: 'stringIncludesArray'}, {apiField: 'SubdivisionName', type: 'stringIncludesArray'}, - {apiField: 'MLSAreaMajor', type: 'stringIncludesArray'}, // DEPRECATED + {apiField: 'MLSAreaMajor', type: 'stringIncludesArray'}, + {apiField: 'MLSAreaMinor', type: 'stringIncludesArray'}, {apiField: 'PostalCode', type: 'stringIncludesArray'}, // TODO: in the future we should pass in a new defined field like Address (that will // TODO: search UnparsedAddress if it exists for the service, OR the API will parse @@ -2015,7 +2029,8 @@ const angularJsService = ( andOr: [ {apiField: 'CityRegion', type: 'stringLikeArray'}, {apiField: 'SubdivisionName', type: 'stringLikeArray'}, - {apiField: 'MLSAreaMajor', type: 'stringLikeArray'} // DEPRECATED + {apiField: 'MLSAreaMajor', type: 'stringLikeArray'}, + {apiField: 'MLSAreaMinor', type: 'stringLikeArray'} ] }, eNeighborhood: { @@ -2023,7 +2038,8 @@ const angularJsService = ( andOr: [ {apiField: 'CityRegion', type: 'stringIncludesArray'}, {apiField: 'SubdivisionName', type: 'stringIncludesArray'}, - {apiField: 'MLSAreaMajor', type: 'stringIncludesArray'} // DEPRECATED + {apiField: 'MLSAreaMajor', type: 'stringIncludesArray'}, + {apiField: 'MLSAreaMinor', type: 'stringIncludesArray'} ] } } @@ -2962,7 +2978,8 @@ const angularJsService = ( 'UnitNumber', 'City', 'CityRegion', - 'MLSAreaMajor', // DEPRECATED + 'MLSAreaMajor', + 'MLSAreaMinor', 'CountyOrParish', 'StateOrProvince', 'Latitude', @@ -3007,8 +3024,10 @@ const angularJsService = ( isEmpty(options.where.eCityRegion) && isEmpty(options.where.CountyOrParish) && isEmpty(options.where.eCountyOrParish) && - isEmpty(options.where.MLSAreaMajor) && // DEPRECATED - isEmpty(options.where.eMLSAreaMajor) && // DEPRECATED + isEmpty(options.where.MLSAreaMajor) && + isEmpty(options.where.eMLSAreaMajor) && + isEmpty(options.where.MLSAreaMinor) && + isEmpty(options.where.eMLSAreaMinor) && isEmpty(options.where.PostalCode) && isEmpty(options.where.UnparsedAddress) ) { From 5b4e90aac99921de4bf18b836d05f79481348d6f Mon Sep 17 00:00:00 2001 From: Davis Date: Tue, 3 Dec 2024 11:43:13 -0800 Subject: [PATCH 2/3] @stratusjs/idx include MLSAreaMinor in details pages --- packages/idx/src/property/details.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/idx/src/property/details.component.ts b/packages/idx/src/property/details.component.ts index 5d6d6f82..3eb97132 100644 --- a/packages/idx/src/property/details.component.ts +++ b/packages/idx/src/property/details.component.ts @@ -334,7 +334,6 @@ Stratus.Components.IdxPropertyDetails = { ContinentRegion Field CountryRegion Field - MLSAreaMinor Field CrossStreet Field Directions Field @@ -349,6 +348,7 @@ Stratus.Components.IdxPropertyDetails = { CrossStreet: 'Cross Street', UnitNumber: 'Unit', MLSAreaMajor: 'Area', + MLSAreaMinor: 'Area Minor', Township: 'Township', SubdivisionName: 'Subdivision', City: 'City', @@ -666,7 +666,6 @@ Stratus.Components.IdxPropertyDetails = { ContinentRegion Field CountryRegion Field - MLSAreaMinor Field CrossStreet Field Directions Field @@ -684,6 +683,7 @@ Stratus.Components.IdxPropertyDetails = { Township: 'Township', CountyOrParish: 'County', MLSAreaMajor: 'Area', + MLSAreaMinor: 'Area Minor', SubdivisionName: 'Subdivision', StateOrProvince: 'State', StateRegion: 'State Region', From e8ca051a594edf497f08ef47234e32f64970ddac Mon Sep 17 00:00:00 2001 From: Davis Date: Tue, 3 Dec 2024 11:54:26 -0800 Subject: [PATCH 3/3] @stratusjs/idx 0.26.0 --- packages/idx/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/idx/package.json b/packages/idx/package.json index e5394ae5..a03668cb 100644 --- a/packages/idx/package.json +++ b/packages/idx/package.json @@ -1,6 +1,6 @@ { "name": "@stratusjs/idx", - "version": "0.25.0", + "version": "0.26.0", "description": "AngularJS idx/property Service and Components bundle to be used as an add on to StratusJS", "main": "./dist/idx.bundle.js", "scripts": {