Skip to content

Commit

Permalink
Merge pull request #804 from apocist/master
Browse files Browse the repository at this point in the history
@stratusjs/idx 0.26.0 MLSAreaMinor
  • Loading branch information
alexgurrola authored Dec 4, 2024
2 parents 179b4d5 + e8ca051 commit 1a6ced4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/idx/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
45 changes: 32 additions & 13 deletions packages/idx/src/idx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -661,8 +663,10 @@ const angularJsService = (
ListingType: [],
CountyOrParish: [],
eCountyOrParish: [],
MLSAreaMajor: [], // DEPRECATED
eMLSAreaMajor: [], // DEPRECATED
MLSAreaMajor: [],
eMLSAreaMajor: [],
MLSAreaMinor: [],
eMLSAreaMinor: [],
SubdivisionName: [],
eSubdivisionName: [],
Neighborhood: [],
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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
Expand All @@ -2015,15 +2029,17 @@ 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: {
type: 'andOr',
andOr: [
{apiField: 'CityRegion', type: 'stringIncludesArray'},
{apiField: 'SubdivisionName', type: 'stringIncludesArray'},
{apiField: 'MLSAreaMajor', type: 'stringIncludesArray'} // DEPRECATED
{apiField: 'MLSAreaMajor', type: 'stringIncludesArray'},
{apiField: 'MLSAreaMinor', type: 'stringIncludesArray'}
]
}
}
Expand Down Expand Up @@ -2962,7 +2978,8 @@ const angularJsService = (
'UnitNumber',
'City',
'CityRegion',
'MLSAreaMajor', // DEPRECATED
'MLSAreaMajor',
'MLSAreaMinor',
'CountyOrParish',
'StateOrProvince',
'Latitude',
Expand Down Expand Up @@ -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)
) {
Expand Down
4 changes: 2 additions & 2 deletions packages/idx/src/property/details.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ Stratus.Components.IdxPropertyDetails = {
ContinentRegion Field
CountryRegion Field
MLSAreaMinor Field
CrossStreet Field
Directions Field
Expand All @@ -349,6 +348,7 @@ Stratus.Components.IdxPropertyDetails = {
CrossStreet: 'Cross Street',
UnitNumber: 'Unit',
MLSAreaMajor: 'Area',
MLSAreaMinor: 'Area Minor',
Township: 'Township',
SubdivisionName: 'Subdivision',
City: 'City',
Expand Down Expand Up @@ -666,7 +666,6 @@ Stratus.Components.IdxPropertyDetails = {
ContinentRegion Field
CountryRegion Field
MLSAreaMinor Field
CrossStreet Field
Directions Field
Expand All @@ -684,6 +683,7 @@ Stratus.Components.IdxPropertyDetails = {
Township: 'Township',
CountyOrParish: 'County',
MLSAreaMajor: 'Area',
MLSAreaMinor: 'Area Minor',
SubdivisionName: 'Subdivision',
StateOrProvince: 'State',
StateRegion: 'State Region',
Expand Down

0 comments on commit 1a6ced4

Please sign in to comment.