{ "version": 3, "sources": ["libs/crm/static/src/lib/shared-pipes/truncate.pipe.ts", "libs/crm/static/src/lib/shared-pipes/activity-effective-date.pipe.ts", "libs/crm/static/src/lib/shared-pipes/is-task-overdue.pipe.ts"], "sourcesContent": ["import { Pipe, PipeTransform } from '@angular/core';\n\nconst DefaultMaxChars = 20;\n\n@Pipe({\n name: 'crmTruncate',\n standalone: true,\n})\nexport class CrmTruncatePipe implements PipeTransform {\n transform(text?: string, maxChars?: number): string {\n const max = maxChars || DefaultMaxChars;\n if (!text) {\n return '';\n }\n if (text.length <= max) {\n return text;\n }\n return text.slice(0, max) + '...';\n }\n}\n", "import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { ActivityInterface } from '@vendasta/crm';\nimport { CrmFieldService, SystemFieldIds } from '../shared-services/crm-services/field.service';\n\n@Pipe({\n name: 'crmActivityEffectiveDate',\n standalone: true,\n})\nexport class CrmActivityEffectiveDatePipe implements PipeTransform {\n private readonly fieldService? = inject(CrmFieldService);\n\n transform(activity?: ActivityInterface): Date | null {\n if (!activity || !this.fieldService) {\n return null;\n }\n return (\n this.fieldService.getFieldValueFromCrmObject(activity, SystemFieldIds.ActivityEffectiveDate)?.dateValue ?? null\n );\n }\n}\n", "import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { ActivityInterface } from '@vendasta/crm';\nimport { CrmFieldService, StandardIds, SystemFieldIds } from '../shared-services/crm-services/field.service';\n\n@Pipe({\n name: 'crmIsTaskOverdue',\n standalone: true,\n})\nexport class CrmIsTaskOverduePipe implements PipeTransform {\n private readonly fieldService? = inject(CrmFieldService);\n\n transform(activity?: ActivityInterface): boolean {\n if (!activity || !this.fieldService) {\n return false;\n }\n const taskStatus = this.fieldService.getFieldValueFromCrmObject(\n activity,\n StandardIds.ActivityTaskStatus,\n )?.stringValue;\n if (taskStatus === 'Completed') {\n return false;\n }\n const effectiveDate = this.fieldService.getFieldValueFromCrmObject(\n activity,\n SystemFieldIds.ActivityEffectiveDate,\n )?.dateValue;\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AAPoB,SAAOpB,CAAoB,GAAA", "names": ["DefaultMaxChars", "CrmTruncatePipe", "transform", "text", "maxChars", "max", "length", "slice", "pure", "standalone", "_CrmTruncatePipe", "CrmActivityEffectiveDatePipe", "constructor", "fieldService", "inject", "CrmFieldService", "transform", "activity", "getFieldValueFromCrmObject", "SystemFieldIds", "ActivityEffectiveDate", "dateValue", "pure", "standalone", "_CrmActivityEffectiveDatePipe", "CrmIsTaskOverduePipe", "constructor", "fieldService", "inject", "CrmFieldService", "transform", "activity", "getFieldValueFromCrmObject", "StandardIds", "ActivityTaskStatus", "stringValue", "effectiveDate", "SystemFieldIds", "ActivityEffectiveDate", "dateValue", "getTime", "Date", "now", "pure", "standalone", "_CrmIsTaskOverduePipe"] }