refactor: note editor relationships (#1821)

This commit is contained in:
Mo
2022-10-18 08:59:24 -05:00
committed by GitHub
parent c83dc48d3f
commit 2b66ff82ee
28 changed files with 357 additions and 299 deletions

View File

@@ -7,6 +7,7 @@ import {
ComponentFlag,
ComponentPermission,
FindNativeFeature,
NoteType,
} from '@standardnotes/features'
import { AppDataField } from '../../Abstract/Item/Types/AppDataField'
import { ComponentContent, ComponentInterface } from './ComponentContent'
@@ -177,6 +178,10 @@ export class SNComponent extends DecryptedItem<ComponentContent> implements Comp
return this.package_info as ThirdPartyFeatureDescription
}
public get noteType(): NoteType {
return this.package_info.note_type || NoteType.Plain
}
public get isDeprecated(): boolean {
let flags: string[] = this.package_info.flags ?? []
flags = flags.map((flag: string) => flag.toLowerCase())