UNPKG

@stratusjs/idx

Version:

AngularJS idx/property Service and Components bundle to be used as an add on to StratusJS

765 lines (764 loc) 56.8 kB
System.register(["./details.component.less", "./details.classic.component.less", "lodash", "@stratusjs/runtime/stratus", "@stratusjs/angularjs/services/model", "@stratusjs/core/misc", "@stratusjs/core/environment", "@stratusjs/angularjs-extras", "@stratusjs/swiper"], function (exports_1, context_1) { "use strict"; var lodash_1, stratus_1, model_1, misc_1, environment_1, min, packageName, moduleName, componentName, localDir, localDistStyle; var __moduleName = context_1 && context_1.id; return { setters: [ function (_1) { }, function (_2) { }, function (lodash_1_1) { lodash_1 = lodash_1_1; }, function (stratus_1_1) { stratus_1 = stratus_1_1; }, function (model_1_1) { model_1 = model_1_1; }, function (misc_1_1) { misc_1 = misc_1_1; }, function (environment_1_1) { environment_1 = environment_1_1; }, function (_3) { }, function (_4) { } ], execute: function () { min = !environment_1.cookie('env') ? '.min' : ''; packageName = 'idx'; moduleName = 'property'; componentName = 'details'; localDir = `${stratus_1.Stratus.BaseUrl}${stratus_1.Stratus.DeploymentPath}@stratusjs/${packageName}/src/${moduleName}/`; localDistStyle = `${stratus_1.Stratus.BaseUrl}${stratus_1.Stratus.DeploymentPath}@stratusjs/${packageName}/dist/${packageName}.bundle.min.css`; stratus_1.Stratus.Components.IdxPropertyDetails = { bindings: { elementId: '@', tokenUrl: '@', urlLoad: '@', pageTitle: '@', service: '@', listingKey: '@', listingId: '@', images: '@', openhouses: '@', googleApiKey: '@', contactEmail: '@', contactName: '@', contactPhone: '@', contactWebsiteUrl: '@', hideVariables: '@', preferredStatus: '@', options: '@', template: '@', defaultListOptions: '@' }, controller($attrs, $sce, $scope, ListTrac, Idx) { $scope.uid = misc_1.safeUniqueId(packageName, moduleName, componentName); $scope.elementId = $attrs.elementId || $scope.uid; stratus_1.Stratus.Instances[$scope.elementId] = $scope; $scope.instancePath = `Stratus.Instances.${$scope.elementId}`; $scope.localDir = localDir; if ($attrs.tokenUrl) { Idx.setTokenURL($attrs.tokenUrl); } stratus_1.Stratus.Internals.CssLoader(localDistStyle).then(); let mlsVariables; let googleMapEmbed; this.$onInit = () => { $scope.model = new model_1.Model(); $scope.Idx = Idx; $scope.urlLoad = $attrs.urlLoad && misc_1.isJSON($attrs.urlLoad) ? JSON.parse($attrs.urlLoad) : true; $scope.pageTitle = $attrs.pageTitle && misc_1.isJSON($attrs.pageTitle) ? JSON.parse($attrs.pageTitle) : false; $scope.options = $attrs.options && misc_1.isJSON($attrs.options) ? JSON.parse($attrs.options) : {}; $scope.options.service = $attrs.service && misc_1.isJSON($attrs.service) ? JSON.parse($attrs.service) : null; $scope.options.ListingKey = $attrs.listingKey && misc_1.isJSON($attrs.listingKey) ? JSON.parse($attrs.listingKey) : $attrs.listingKey || null; if (lodash_1.isNumber($scope.options.ListingKey) && $scope.options.ListingKey > 1000000000000000000) { $scope.options.ListingKey = $attrs.listingKey; } $scope.options.ListingId = $attrs.listingId && misc_1.isJSON($attrs.listingId) ? JSON.parse($attrs.listingId) : $attrs.listingId || null; $scope.options.images = $attrs.images && misc_1.isJSON($attrs.images) ? JSON.parse($attrs.images) : { fields: [ 'Order', 'MediaURL', 'LongDescription' ] }; $scope.options.openhouses = $attrs.openhouses && misc_1.isJSON($attrs.openhouses) ? JSON.parse($attrs.openhouses) : { fields: '*' }; $scope.hideVariables = $attrs.hideVariables && misc_1.isJSON($attrs.hideVariables) ? JSON.parse($attrs.hideVariables) : []; $scope.preferredStatus = $attrs.preferredStatus || 'Closed'; $scope.defaultListOptions = $attrs.defaultListOptions && misc_1.isJSON($attrs.defaultListOptions) ? JSON.parse($attrs.defaultListOptions) : {}; $scope.images = []; $scope.contact = null; $scope.contactUrl = $attrs.contactWebsiteUrl || null; $scope.integrations = null; if ($attrs.contactName || $attrs.contactEmail || $attrs.contactPhone) { $scope.contact = { name: $attrs.contactName || '', emails: {}, locations: {}, phones: {}, socialUrls: {}, urls: {}, }; if ($attrs.contactEmail) { $scope.contact.emails.Main = $attrs.contactEmail; } if ($attrs.contactPhone) { $scope.contact.phones.Main = $attrs.contactPhone; } } if ($attrs.googleApiKey) { $scope.integrations = { maps: { googleMaps: { publicKey: $attrs.googleApiKey } } }; } const minorDetails = [ { section: 'Size & Style', items: { YearBuilt: 'Built', Stories: 'Stories', StructureType: 'Structure Type', LivingArea: { name: 'Living Area', comma: true, appendField: 'LivingAreaUnits', appendFieldBackup: 'LotSizeUnits', append: ' SqFt' }, LeasableArea: { name: 'Living Area', comma: true, appendField: 'LeasableAreaUnits', appendFieldBackup: 'LivingAreaUnits', append: ' SqFt' }, LotSizeAcres: { name: 'Lot Size', append: ' Acres', comma: true }, LotSizeSquareFeet: { name: 'Lot Size', append: ' SqFt', comma: true }, LotSizeArea: { name: 'Lot Size', comma: true, appendField: 'LotSizeUnits', appendFieldBackup: 'LivingAreaUnits', append: ' SqFt' }, HorseYN: { name: 'Horse Property', false: '' } } }, { section: 'Materials', items: { Roof: 'Roof', Flooring: 'Flooring', WindowFeatures: 'Windows', DoorFeatures: 'Doors', FoundationDetails: 'Foundation', FoundationArea: 'Foundation', ConstructionMaterials: 'Construction' } }, { section: 'Utilities', items: { CoolingYN: { name: 'Cooling', false: '' }, Cooling: 'Cooling', HeatingYN: { name: 'Heating', false: '' }, Heating: 'Heating', Utilities: 'Utilities', Electric: 'Electric', WaterSource: 'Water', Sewer: 'Sewer Septic', NumberOfSeparateElectricMeters: { name: 'Number Of Separate Electric Meters', comma: true }, NumberOfSeparateGasMeters: { name: 'Number Of Separate Gas Meters', comma: true }, NumberOfSeparateWaterMeters: { name: 'Number Of Separate Water Meters', comma: true } } }, { section: 'Area', items: { CrossStreet: 'Cross Street', UnitNumber: 'Unit', MLSAreaMajor: 'Area', MLSAreaMinor: 'Area Minor', Township: 'Township', SubdivisionName: 'Subdivision', City: 'City', CityRegion: 'City Region', PostalCode: 'Postal Code', CountyOrParish: 'County', StateRegion: 'Region', StateOrProvince: 'State' } }, { section: 'Business', items: { BusinessName: 'Business Name', BusinessType: 'Type', OwnershipType: 'Ownership', SeatingCapacity: { name: 'Seating Capacity', comma: true }, YearEstablished: 'Year Established', YearsCurrentOwner: { name: 'Years with Current Owner', comma: true }, HoursDaysOfOperation: 'Hours Of Operation', HoursDaysOfOperationDescription: 'Hours Of Operation', NumberOfFullTimeEmployees: { name: 'Full-Time Employees', comma: true }, NumberOfPartTimeEmployees: { name: 'Part-Time Employees', comma: true }, LaborInformation: 'Labor Info', SpecialLicenses: 'SpecialLicenses', LeaseAmount: { name: 'LeaseAmount', prepend: '$', comma: true }, LeaseAmountFrequency: 'Lease Frequency', LeaseAssignableYN: { name: 'Lease Assignable', false: '' }, LeaseExpiration: 'Lease Expiration', LeaseRenewalOptionYN: { name: 'Lease Renewable', false: '' } } }, { section: 'Farming', items: { CropsIncludedYN: { name: 'Crops Included', false: '' }, Vegetation: 'Vegetation', FarmCreditServiceInclYN: { name: 'Farm Credit Service', true: 'Shares Included', false: '' }, GrazingPermitsBlmYN: { name: 'Grazing', true: 'BLM Permitted', false: '' }, GrazingPermitsForestServiceYN: { name: 'Grazing', true: 'Forestry Service Permitted', false: '' }, GrazingPermitsPrivateYN: { name: 'Grazing', true: 'Private Permitted', false: '' }, CultivatedArea: { name: 'Cultivated Area', comma: true }, PastureArea: { name: 'Pasture Area', comma: true }, RangeArea: { name: 'Range Area', comma: true }, WoodedArea: { name: 'Wooded Area', comma: true }, IrrigationSource: 'IrrigationSource', IrrigationWaterRightsYN: { name: 'Irrigation Water Rights', false: '' }, IrrigationWaterRightsAcres: { name: 'Irrigation Water Rights', append: ' Acres', comma: true } } }, { section: 'Features', items: { HorseAmenities: 'Horse Amenities', PoolPrivateYN: { name: 'Pool', false: '' }, PoolFeatures: 'Pool', SpaYN: { true: 'Spa: Yes', false: '' }, SpaFeatures: 'Spa', LaundryFeatures: 'Laundry', Appliances: 'Appliances', FireplaceYN: { name: 'Fireplace', false: '' }, FireplaceFeatures: 'Fireplace', FireplacesTotal: 'Fireplaces', Basement: 'Basement', InteriorFeatures: 'Interior Features', SecurityFeatures: 'Security Features', ExteriorFeatures: 'Exterior Features', BuildingFeatures: 'Building Features', AccessibilityFeatures: 'Accessibility', PatioAndPorchFeatures: 'Patio And Porch', Fencing: 'Fencing', FrontageType: 'Frontage', OtherEquipment: 'Equipment', CommunityFeatures: 'Community' } }, { section: 'Parking', items: { ParkingTotal: 'Parking Spaces', GarageYN: { name: 'Garage', false: '' }, AttachedGarageYN: { name: 'Garage', true: 'Attached', false: '' }, GarageSpaces: 'Garage Spaces', CarportYN: { name: 'Carport', false: '' }, CarportSpaces: 'Carport Spaces', CoveredSpaces: 'Covered Spaces', OpenParkingSpaces: 'Open Spaces', OtherParking: 'Other Parking', ParkingFeatures: 'Parking' } }, { section: 'School', items: { ElementarySchool: 'Elementary School', ElementarySchoolDistrict: 'Elementary School District', MiddleOrJuniorSchool: 'Middle School', MiddleOrJuniorSchoolDistrict: 'Middle School District', HighSchool: 'High School', HighSchoolDistrict: 'High School District' } }, { section: 'Contract', items: { AvailabilityDate: 'Availability', PetsAllowed: { name: 'Pets Allowed' }, HomeWarrantyYN: { name: 'Home Warranty', true: 'Included', false: '' }, LeaseConsideredYN: { name: 'Leasing Considered', false: '' }, ListingAgreement: 'Listing Agreement', ListingService: 'Service', DocumentsAvailable: 'Documents Available', Ownership: 'Ownership', Contingencies: 'Contingencies', Disclosures: 'Disclosures', Exclusions: 'Exclusions', Inclusions: 'Inclusions', ListingTerms: 'ListingTerms', SpecialListingConditions: 'Special Listing Conditions', CommonInterest: 'Common Interest' } }, { section: 'Financial', items: { ConcessionsAmount: { name: 'Seller Concessions', prepend: '$', comma: true }, ConcessionsPercent: { name: 'Seller Concessions', append: '%' }, ConcessionsComments: { name: 'Seller Concessions', html: true, hideName: true }, RentControlYN: { name: 'Rent Control', false: '' }, TenantPays: 'Tenant Pays', OwnerPays: 'Owner Pays', RentIncludes: 'Rent Includes', AssociationYN: { name: 'HOA', false: '' }, AssociationFee: { name: 'HOA Fee', prepend: '$', comma: true }, AssociationFeeFrequency: 'HOA Frequency', AssociationFeeIncludes: 'HOA Includes', AssociationFee2: { name: 'Additional HOA Fee', prepend: '$', comma: true }, AssociationFeeFrequency2: 'Additional HOA Frequency', CableTvExpense: { name: 'Cable Tv Expense', prepend: '$', comma: true }, ElectricExpense: { name: 'Electric Expense', prepend: '$', comma: true }, FuelExpense: { name: 'Fuel Expense', prepend: '$', comma: true }, FurnitureReplacementExpense: { name: 'Furniture Replacement Expense', prepend: '$', comma: true }, GardenerExpense: { name: 'Gardener Expense', prepend: '$', comma: true }, InsuranceExpense: { name: 'Insurance Expense', prepend: '$', comma: true }, LicensesExpense: { name: 'Licenses Expense', prepend: '$', comma: true }, MaintenanceExpense: { name: 'Maintenance Expense', prepend: '$', comma: true }, ManagerExpense: { name: 'Manager Expense', prepend: '$', comma: true }, NewTaxesExpense: { name: 'New Taxes Expense', prepend: '$', comma: true }, OperatingExpense: { name: 'Operating Expense', prepend: '$', comma: true }, OperatingExpenseIncludes: 'Operating Expense Includes', OtherExpense: { name: 'Other Expense', prepend: '$', comma: true }, PestControlExpense: { name: 'Pest Control Expense', prepend: '$', comma: true }, PoolExpense: { name: 'Pool Expense', prepend: '$', comma: true }, ProfessionalManagementExpense: { name: 'Professional Management Expense', prepend: '$', comma: true }, SuppliesExpense: { name: 'Supplies Expense', prepend: '$', comma: true }, TrashExpense: { name: 'Trash Expense', prepend: '$', comma: true }, WaterSewerExpense: { name: 'Water Sewer Expense', prepend: '$', comma: true }, WorkmansCompensationExpense: { name: 'Workmans Compensation Expense', prepend: '$', comma: true }, TaxAnnualAmount: { name: 'Annual Tax', prepend: '$', comma: true }, TaxOtherAnnualAssessmentAmount: { name: 'Other Annual Tax', prepend: '$', comma: true }, TaxAssessedValue: { name: 'Tax Assessed Value', prepend: '$', comma: true }, TaxYear: 'Tax Year Assessed', TaxStatusCurrent: 'Tax Status', TaxParcelLetter: 'Tax Parcel Letter', ParcelNumber: 'Parcel Number', AdditionalParcelsYN: { name: 'Additional Parcels', false: '' }, AdditionalParcelsDescription: 'Parcels', Zoning: 'Zoning', ZoningDescription: 'Zoning' } }, { section: 'Sources', items: { FinancialDataSource: 'Financial Data', LotSizeSource: 'Lot Size', LotDimensionsSource: 'Lot Dimensions', LivingAreaSource: 'Living Area', BuildingAreaSource: 'Building Area', FarmLandAreaSource: 'Farm Land Area', YearBuiltSource: 'Year Built', MapCoordinateSource: 'Map Coordinate', ListAOR: { name: 'Listing AOR' }, OriginatingSystemName: { name: 'Originating System' }, OriginatingSystemKey: { name: 'Originating System', prepend: '# ' } } }, ]; const alternateMinorDetails = [ { section: 'Location', items: { UnitNumber: 'Unit', City: 'City', CityRegion: 'City Region', Township: 'Township', CountyOrParish: 'County', MLSAreaMajor: 'Area', MLSAreaMinor: 'Area Minor', SubdivisionName: 'Subdivision', StateOrProvince: 'State', StateRegion: 'State Region', PostalCode: 'Postal Code', Country: 'Country' } }, { section: 'Business', items: { BusinessName: 'Business Name', BusinessType: 'Type', OwnershipType: 'Ownership', SeatingCapacity: { name: 'Seating Capacity', comma: true }, YearEstablished: 'Year Established', YearsCurrentOwner: { name: 'Years with Current Owner', comma: true }, HoursDaysOfOperation: 'Hours Of Operation', HoursDaysOfOperationDescription: 'Hours Of Operation', NumberOfFullTimeEmployees: { name: 'Full-Time Employees', comma: true }, NumberOfPartTimeEmployees: { name: 'Part-Time Employees', comma: true }, LaborInformation: 'Labor Info', SpecialLicenses: 'SpecialLicenses', LeaseAmount: { name: 'LeaseAmount', prepend: '$', comma: true }, LeaseAmountFrequency: 'Lease Frequency', LeaseAssignableYN: { true: 'Lease Assignable', false: '' }, LeaseExpiration: 'Lease Expiration', LeaseRenewalOptionYN: { true: 'Lease Renewable', false: '' } } }, { section: 'Listing', items: { SeniorCommunityYN: { true: 'Senior Community', false: '' }, CommunityFeatures: 'Community', CurrentUse: 'Current Use', PossibleUse: 'Possible Uses', LotFeatures: 'Lot Features', LotSizeAcres: { name: 'Lot Size', append: ' Acres', comma: true }, LotSizeSquareFeet: { name: 'Lot Size', append: ' SqFt', comma: true }, LotSizeArea: { name: 'Lot Size', comma: true }, LotSizeDimensions: 'LotSizeDimensions', NumberOfBuildings: { name: 'Number of Buildings', comma: true }, NumberOfLots: { name: 'Number of Lots', comma: true }, NumberOfPads: { name: 'Number of Pads', comma: true }, NumberOfUnitsInCommunity: { name: 'Number of Units In Community', comma: true }, NumberOfUnitsTotal: { name: 'Number of Units', comma: true }, UnitsFurnished: 'Units Furnished', ViewYN: { true: 'Has a View', false: '' }, View: 'View', WaterfrontYN: { true: 'Has a Waterfront', false: '' }, WaterfrontFeatures: 'Waterfront', WaterBodyName: 'Body of Water Name' } }, { section: 'Farming', items: { CropsIncludedYN: { true: 'Crops Included', false: '' }, Vegetation: 'Vegetation', FarmCreditServiceInclYN: { true: 'Farm Credit Service Shares Included', false: '' }, GrazingPermitsBlmYN: { true: 'Grazing Permitted - BLM', false: '' }, GrazingPermitsForestServiceYN: { true: 'Grazing Permitted - Forestry Service', false: '' }, GrazingPermitsPrivateYN: { true: 'Private Grazing Permitted', false: '' }, CultivatedArea: { name: 'Cultivated Area', comma: true }, PastureArea: { name: 'Pasture Area', comma: true }, RangeArea: { name: 'Range Area', comma: true }, WoodedArea: { name: 'Wooded Area', comma: true } } }, { section: 'Interior', items: { Furnished: 'Furnished', RoomsTotal: '# of Rooms', BedroomsTotal: 'Bedrooms', BedroomsPossible: 'Possible Bedrooms', MainLevelBedrooms: 'Main Bedrooms', BathroomsTotalInteger: 'Total Bathrooms', BathroomsFull: 'Full Bathrooms', BathroomsPartial: 'Partial Bathrooms', BathroomsOneQuarter: '1/4 Bathrooms', BathroomsHalf: 'Half Bathrooms', BathroomsThreeQuarter: '3/4 Bathrooms', MainLevelBathrooms: 'Main Bathrooms', Flooring: 'Flooring', WindowFeatures: 'Windows', DoorFeatures: 'DoorFeatures', LivingArea: { name: 'Living Area', comma: true }, FireplaceYN: { true: 'Has Fireplace', false: '' }, FireplacesTotal: '# of Fireplaces', FireplaceFeatures: 'Fireplace', InteriorFeatures: 'Interior Features', Appliances: 'Appliances', SecurityFeatures: 'Security', OtherEquipment: 'Equipment' } }, { section: 'Exterior', items: { ExteriorFeatures: 'Exterior', PatioAndPorchFeatures: 'Patio And Porch', Fencing: 'Fencing', Topography: 'Topography', FrontageType: 'Frontage', FrontageLength: 'Frontage Length' } }, { section: 'Amenities', items: { HorseYN: { true: 'Horse Property', false: '' }, HorseAmenities: 'Horse Amenities', PoolPrivateYN: { true: 'Has Private Pool', false: '' }, PoolFeatures: 'Pool', SpaYN: { true: 'Has Spa', false: '' }, SpaFeatures: 'Spa', LaundryFeatures: 'Laundry' } }, { section: 'Heating & Cooling', items: { CoolingYN: { true: 'Has Cooling', false: '' }, Cooling: 'Cooling', HeatingYN: { true: 'Has Heating', false: '' }, Heating: 'Heating' } }, { section: 'Structure', items: { NewConstructionYN: { true: 'New Construction', false: '' }, DevelopmentStatus: 'Development Status', StructureType: 'Type', ArchitecturalStyle: 'Style', PropertyCondition: 'Condition', PropertyAttachedYN: { true: 'Property Attached to Existing Structure', false: '' }, Stories: 'Stories', MobileHomeRemainsYN: { true: 'Mobile Home Remains', false: '' }, Make: 'Make', Model: 'Model', BodyType: 'Body Type', MobileLength: { name: 'Mobile Length', comma: true }, MobileWidth: { name: 'Mobile Width', comma: true }, BuildingName: 'Building Name', StoriesTotal: 'Complex Stories', BuilderModel: 'Model', BuilderName: 'Builder', YearBuilt: 'Year Built', YearBuiltEffective: 'Year Renovated', YearBuiltDetails: {}, CommonWalls: 'Common Walls', BuildingFeatures: 'Building Features', AccessibilityFeatures: 'Accessibility', Basement: 'Basement', Roof: 'Roof', ConstructionMaterials: 'Construction', FoundationDetails: 'Foundation', FoundationArea: 'Foundation', OtherStructures: 'Other Structures', BuildingAreaTotal: { name: 'Building Area', comma: true }, DOH1: 'DOH1', DOH2: 'DOH2', DOH3: 'DOH3', License1: 'License', License2: 'License', License3: 'License', RVParkingDimensions: 'RV Parking', SerialU: 'Serial U', SerialX: 'Serial X', SerialXX: 'Serial XX', Skirt: 'Skirt' } }, { section: 'Parking', items: { ParkingTotal: 'Parking Spaces', GarageYN: { true: 'Has Garage', false: '' }, GarageSpaces: '# of Garage Spaces', AttachedGarageYN: { true: 'Attached Garage', false: '' }, CarportYN: { true: 'Has Carport', false: '' }, CarportSpaces: '# of Carport Spaces', CoveredSpaces: '# of Covered Spaces', OpenParkingSpaces: '# of Open Spaces', OtherParking: 'Other Parking', ParkingFeatures: 'Parking' } }, { section: 'Utilities', items: { Utilities: 'Utilities', Electric: 'Electric', WaterSource: 'Water', Sewer: 'Sewer', IrrigationSource: 'IrrigationSource', IrrigationWaterRightsYN: { true: 'Has Irrigation Water Rights', false: '' }, IrrigationWaterRightsAcres: { name: 'Irrigation Water Rights', append: ' Acres', comma: true }, NumberOfSeparateElectricMeters: { name: 'Number Of Separate Electric Meters', comma: true }, NumberOfSeparateGasMeters: { name: 'Number Of Separate Gas Meters', comma: true }, NumberOfSeparateWaterMeters: { name: 'Number Of Separate Water Meters', comma: true } } }, { section: 'School', items: { ElementarySchool: 'Elementary School', ElementarySchoolDistrict: 'Elementary School District', MiddleOrJuniorSchool: 'Middle School', MiddleOrJuniorSchoolDistrict: 'Middle School District', HighSchool: 'High School', HighSchoolDistrict: 'High School District' } }, { section: 'Contract', items: { AvailabilityDate: 'Availability', PetsAllowed: { name: 'PetsAllowed' }, HomeWarrantyYN: { true: 'Home Warranty Included', false: '' }, LeaseConsideredYN: { true: 'Leasing Considered', false: '' }, ListingAgreement: 'Listing Agreement', ListingService: 'Service', DocumentsAvailable: 'Documents Available', Ownership: 'Ownership', Contingencies: 'Contingencies', Disclosures: 'Disclosures', Exclusions: 'Exclusions', Inclusions: 'Inclusions', ListingTerms: 'ListingTerms', SpecialListingConditions: 'Special Listing Conditions', CommonInterest: 'Common Interest' } }, { section: 'Financial', items: { RentControlYN: { true: 'Rent Control', false: '' }, TenantPays: 'Tenant Pays', OwnerPays: 'Owner Pays', RentIncludes: 'Rent Includes', AssociationYN: { true: 'Has HOA', false: 'No HOA' }, AssociationFee: { name: 'HOA Fee', prepend: '$', comma: true }, AssociationFeeFrequency: 'HOA Frequency', AssociationFeeIncludes: 'HOA Includes', AssociationFee2: { name: 'Additional HOA Fee', prepend: '$', comma: true }, AssociationFeeFrequency2: 'Additional HOA Frequency', CableTvExpense: { name: 'Cable Tv Expense', prepend: '$', comma: true }, ElectricExpense: { name: 'Electric Expense', prepend: '$', comma: true }, FuelExpense: { name: 'Fuel Expense', prepend: '$', comma: true }, FurnitureReplacementExpense: { name: 'Furniture Replacement Expense', prepend: '$', comma: true }, GardenerExpense: { name: 'Gardener Expense', prepend: '$', comma: true }, InsuranceExpense: { name: 'Insurance Expense', prepend: '$', comma: true }, LicensesExpense: { name: 'Licenses Expense', prepend: '$', comma: true }, MaintenanceExpense: { name: 'Maintenance Expense', prepend: '$', comma: true }, ManagerExpense: { name: 'Manager Expense', prepend: '$', comma: true }, NewTaxesExpense: { name: 'New Taxes Expense', prepend: '$', comma: true }, OperatingExpense: { name: 'Operating Expense', prepend: '$', comma: true }, OperatingExpenseIncludes: 'Operating Expense Includes', OtherExpense: { name: 'Other Expense', prepend: '$', comma: true }, PestControlExpense: { name: 'Pest Control Expense', prepend: '$', comma: true }, PoolExpense: { name: 'Pool Expense', prepend: '$', comma: true }, ProfessionalManagementExpense: { name: 'Professional Management Expense', prepend: '$', comma: true }, SuppliesExpense: { name: 'Supplies Expense', prepend: '$', comma: true }, TrashExpense: { name: 'Trash Expense', prepend: '$', comma: true }, WaterSewerExpense: { name: 'Water Sewer Expense', prepend: '$', comma: true }, WorkmansCompensationExpense: { name: 'Workmans Compensation Expense', prepend: '$', comma: true }, TaxAnnualAmount: { name: 'Annual Tax', prepend: '$', comma: true }, TaxOtherAnnualAssessmentAmount: { name: 'Other Annual Tax', prepend: '$', comma: true }, TaxAssessedValue: { name: 'Tax Assessed Value', prepend: '$', comma: true }, TaxYear: 'Tax Year Assessed', TaxStatusCurrent: 'Tax Status', TaxParcelLetter: 'Tax Parcel Letter', ParcelNumber: 'Parcel Number', AdditionalParcelsYN: { true: 'Has Additional Prcels', false: '' }, AdditionalParcelsDescription: 'Parcels', Zoning: 'Zoning', ZoningDescription: 'Zoning' } }, { section: 'Sources', items: { FinancialDataSource: 'Financial Data', LotSizeSource: 'Lot Size', LotDimensionsSource: 'Lot Dimensions', LivingAreaSource: 'Living Area', BuildingAreaSource: 'Building Area', FarmLandAreaSource: 'Farm Land Area', YearBuiltSource: 'Year Built', MapCoordinateSource: 'Map Coordinate', ListAOR: { name: 'Listing AOR' }, OriginatingSystemName: { name: 'Originating System' }, OriginatingSystemKey: { name: 'Originating System', prepend: '# ' } } } ]; hideDetailVariables(minorDetails, $scope.hideVariables); $scope.minorDetails = minorDetails; $scope.alternateMinorDetails = alternateMinorDetails; Idx.registerDetailsInstance($scope.elementId, moduleName, $scope); if ((!$scope.options.service && $scope.options.service !== 0) || !($scope.options.ListingKey || $scope.options.ListingId)) { $scope.urlLoad = true; } if ($scope.urlLoad) { const urlOptions = Idx.getOptionsFromUrl(); if (Object.prototype.hasOwnProperty.call(urlOptions, 'Listing')) { lodash_1.extend($scope.options, urlOptions.Listing); } } $scope.fetchProperty().then(); Idx.emit('init', $scope); }; $scope.$watch('model.data', (data) => { if (data && data.hasOwnProperty('_ServiceId')) { Idx.devLog('Loaded Details Data:', data); $scope.images = $scope.getSlideshowImages(); Idx.setUrlOptions('Listing', { service: $scope.options.service, ListingKey: data.ListingKey, address: $scope.getStreetAddress() }); if ($scope.urlLoad) { Idx.refreshUrlOptions($scope.defaultListOptions); } if ($scope.pageTitle) { Idx.setPageTitle($scope.getStreetAddress()); } if ($scope.getMLSVariables().analyticsEnabled.includes('ListTrac')) { ListTrac.track('view', $scope.model.data.ListingId, $scope.model.data.PostalCode, $scope.model.data.ListAgentKey); } prepareMapMarkers(); } }); const hideDetailVariables = (detailOptions, variablesToHide) => { if (variablesToHide.length > 0) { detailOptions.forEach((section) => { Object.keys(section.items).forEach((variableName) => { if (variablesToHide.includes(variableName)) { delete section.items[variableName]; } }); }); } }; const prepareMapMarkers = () => { if (Object.prototype.hasOwnProperty.call($scope.model.data, 'Latitude') && Object.prototype.hasOwnProperty.call($scope.model.data, 'Longitude')) { $scope.mapMarkers = [{ position: { lat: $scope.model.data.Latitude, lng: $scope.model.data.Longitude }, title: $scope.getFullAddress(), }]; } }; $scope.fetchProperty = async () => { const propertyQuery = { service: $scope.options.service,