{ "version": 3, "sources": ["src/app/shared/enums/OwnershipCalculationType.enum.ts", "src/app/shared/enums/CommitmentsEnabled.enum.ts", "src/app/shared/models/LenderInformation.model.ts", "src/app/shared/models/ProjectBudget.model.ts", "src/app/shared/models/ProjectedPerformance.model.ts", "src/app/dashboard/shared/holding/create-edit-holding.service.ts"], "sourcesContent": ["// Must match the server enum\nexport enum OwnershipCalculationType {\n ByContributions = 0,\n ByCommitments = 1\n}\n\nexport namespace OwnershipCalculationType {\n export function toString(item: OwnershipCalculationType): string {\n switch (item) {\n case OwnershipCalculationType.ByCommitments:\n return 'Commitments';\n case OwnershipCalculationType.ByContributions:\n return 'Contributions';\n default:\n return '';\n }\n }\n}\n\nexport default OwnershipCalculationType;\n", "// Must match the server enum\nexport enum CommitmentsEnabled {\n No = 0,\n Yes = 1\n}\n\n", "import LoanType from 'src/app/shared/enums/LoanType.enum';\nimport InterestType from 'src/app/shared/enums/InterestType.enum';\n\nexport class LenderInformation {\n public lenderName: string;\n public amount: number;\n public loanToValue: number;\n public interestRate: number;\n public interestType: InterestType;\n public closingDate: Date;\n public maturityDate: Date;\n public additionalTerms: string;\n public loanType: LoanType;\n public totalFinancingPerGrossAreaUnit: number;\n public totalFinancingPerNetAreaUnit: number;\n\n public amountJunior: number;\n public loanToValueJunior: number;\n public interestRateJunior: number;\n public interestTypeJunior: InterestType;\n public closingDateJunior: Date;\n public maturityDateJunior: Date;\n public additionalTermsJunior: string;\n public loanTypeJunior: LoanType;\n public totalFinancingPerGrossAreaUnitJunior: number;\n public totalFinancingPerNetAreaUnitJunior: number;\n}\n", "export class ProjectBudget {\n public acquisition: number;\n public hardCost: number;\n public softCost: number;\n public financing: number;\n public totalCosts: number;\n public totalCostsPerGrossAreaUnit: number;\n public totalCostsPerNetAreaUnit: number;\n public hasValue: boolean;\n}\n", "export class ProjectedPerformance {\n public cashOnCashRate: number;\n public cashOnCashRateMax: number;\n\n public nonLeveragedCapRate: number;\n public nonLeveragedCapRateMax: number;\n\n public targetInvestmentIrr: number;\n public targetInvestmentIrrMax: number;\n\n public expectedRoi: number;\n public expectedRoiMax: number;\n\n public targetEquityMultiplier: number;\n public targetEquityMultiplierMax: number;\n\n public targetInvestmentPeriod: number;\n public targetInvestmentPeriodMax: number;\n\n public targetInvestmentPeriodMonths: number;\n public targetInvestmentPeriodMonthsMax: number;\n\n public preferredReturn: number;\n public preferredReturnMax: number;\n}\n", "import { Injectable } from '@angular/core';\nimport {combineLatest, Observable, of, timer} from 'rxjs';\nimport {OnDestroyMixin} from '@w11k/ngx-componentdestroyed';\nimport {AbstractControl} from '@angular/forms';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {ResourceService} from '../../../services/resource.service';\n\n@Injectable()\nexport abstract class CreateEditHoldingService extends OnDestroyMixin {\n public readonly forbiddenCharsInHoldingName = this.resourceService.forbiddenCharactersInHoldingName;\n protected abstract isHoldingNameExist(holdingName: string): Observable;\n\n protected constructor(protected resourceService: ResourceService) {\n super();\n }\n\n /**\n * Checks if holding name is valid\n */\n protected validateHoldingName(control: AbstractControl, originalValue = '') {\n const {value}: { value: string } = control;\n if (!value || value === originalValue) {\n return of(null);\n }\n\n return timer(1000).pipe(\n switchMap(_ => combineLatest([this.isHoldingNameContainsForbiddenCharacter(value), this.isHoldingNameExist(value)])),\n map(([includesForbiddenCharacter, nameExist]) => {\n if (includesForbiddenCharacter) {\n return {includeForbiddenCharacter: true};\n } else if (nameExist) {\n return {holdingNameTaken: true};\n }\n\n return null;\n })\n );\n }\n\n /**\n * Checks if holding's name contains forbidden character\n * @param holdingName holding name\n */\n private isHoldingNameContainsForbiddenCharacter(holdingName: string): Observable {\n return of(this.forbiddenCharsInHoldingName.some(char => holdingName.indexOf(char) !== -1));\n }\n}\n"], "mappings": "qIACA,IAAYA,EAAZ,SAAYA,EAAwB,CAClCA,OAAAA,EAAAA,EAAA,gBAAA,CAAA,EAAA,kBACAA,EAAAA,EAAA,cAAA,CAAA,EAAA,gBAFUA,CAGZ,EAHYA,GAAwB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,EAAAC,CAAA,CAAA,CAAA,wBAAxB5B,EAAwB6B,QAAxB7B,EAAwB8B,SAAA,CAAA,EAAxC,IAAgB9B,EAAhB+B,SAAgB/B,CAAyB,GAAA", "names": ["OwnershipCalculationType", "toString", "item", "ByCommitments", "ByContributions", "OwnershipCalculationType_enum_default", "CommitmentsEnabled", "LenderInformation", "ProjectBudget", "ProjectedPerformance", "CreateEditHoldingService", "OnDestroyMixin", "constructor", "resourceService", "forbiddenCharsInHoldingName", "forbiddenCharactersInHoldingName", "validateHoldingName", "control", "originalValue", "value", "of", "timer", "pipe", "switchMap", "_", "combineLatest", "isHoldingNameContainsForbiddenCharacter", "isHoldingNameExist", "map", "includesForbiddenCharacter", "nameExist", "includeForbiddenCharacter", "holdingNameTaken", "holdingName", "some", "char", "indexOf", "\u0275\u0275inject", "ResourceService", "factory", "\u0275fac", "_CreateEditHoldingService"] }