( internalNames: string[], plugin: TaskNotesPlugin )
| 31 | * // Returns: ["task-status", "deadline", "tags"] |
| 32 | */ |
| 33 | export function convertInternalToUserProperties( |
| 34 | internalNames: string[], |
| 35 | plugin: TaskNotesPlugin |
| 36 | ): string[] { |
| 37 | return internalNames.map((name) => { |
| 38 | // Special properties pass through unchanged |
| 39 | if (isSpecialProperty(name)) { |
| 40 | return name; |
| 41 | } |
| 42 | |
| 43 | // Check if it's a valid FieldMapping key |
| 44 | if (name in plugin.fieldMapper.getMapping()) { |
| 45 | return plugin.fieldMapper.toUserField(name as keyof FieldMapping); |
| 46 | } |
| 47 | |
| 48 | // Unknown property, pass through unchanged |
| 49 | return name; |
| 50 | }); |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Check if a property ID represents a specific internal field. |
no test coverage detected