( propertyId: string, plugin: TaskNotesPlugin, propertyLabels?: Record<string, string> )
| 42 | } |
| 43 | |
| 44 | function getMappedPropertyLabel( |
| 45 | propertyId: string, |
| 46 | plugin: TaskNotesPlugin, |
| 47 | propertyLabels?: Record<string, string> |
| 48 | ): string | undefined { |
| 49 | if (!propertyLabels) { |
| 50 | return undefined; |
| 51 | } |
| 52 | |
| 53 | for (const [candidatePropertyId, label] of Object.entries(propertyLabels)) { |
| 54 | if (candidatePropertyId === propertyId || label.trim() === "") { |
| 55 | continue; |
| 56 | } |
| 57 | |
| 58 | if (plugin.fieldMapper?.lookupMappingKey?.(candidatePropertyId) === propertyId) { |
| 59 | return label; |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | return undefined; |
| 64 | } |
| 65 | |
| 66 | export function getRecurrenceTooltip( |
| 67 | plugin: TaskNotesPlugin, |
no test coverage detected