Back to Trilium

Class default

docs/Script API/classes/Frontend_Script_API._internal_.default-7.html

0.102.25.6 KB
Original Source

Class default

Index

Constructors

constructor

Methods

addAttachmentRowaddAttributeaddBranchaddNoteaddNoteContentaddNoteReorderingaddOptionaddRevisiongetAttachmentRowsgetAttributeRowsgetBranchRowsgetEntityRowgetNoteIdsgetNoteReorderingsgetOptionNameshasAttributeRelatedChangeshasRevisionForNoteisEmptyisEmptyForTreeisNoteContentReloadedisNoteReloadedisOptionReloaded

Constructors

constructor

new default(entityChanges: EntityChange[]): default

Parameters

  • entityChanges: EntityChange[]

Returns default

Methods

addAttachmentRow

addAttachmentRow(attachment: AttachmentRow): void

Parameters

Returns void

addAttribute

addAttribute(attributeId: string, componentId: string): void

Parameters

  • attributeId: string
  • componentId: string

Returns void

addBranch

addBranch(branchId: string, componentId: string): void

Parameters

  • branchId: string
  • componentId: string

Returns void

addNote

addNote(noteId: string, componentId?: null | string): void

Parameters

  • noteId: string
  • OptionalcomponentId: null | string

Returns void

addNoteContent

addNoteContent(noteId: string, componentId: string): void

Parameters

  • noteId: string
  • componentId: string

Returns void

addNoteReordering

addNoteReordering(parentNoteId: string, componentId: string): void

Parameters

  • parentNoteId: string
  • componentId: string

Returns void

addOption

addOption(name: string): void

Parameters

  • name: string

Returns void

addRevision

addRevision(
revisionId: string,
noteId?: string,
componentId?: null | string,
): void

Parameters

  • revisionId: string
  • OptionalnoteId: string
  • OptionalcomponentId: null | string

Returns void

getAttachmentRows

getAttachmentRows(): AttachmentRow[]

Returns AttachmentRow[]

getAttributeRows

getAttributeRows(componentId?: string): AttributeRow[]

Parameters

  • componentId: string = "none"

Returns AttributeRow[]

getBranchRows

getBranchRows(): BranchRow[]

Returns BranchRow[]

getEntityRow

getEntityRow<T extends keyof EntityRowMappings>(
entityName: T,
entityId: string,
): EntityRowMappings[T]

Type Parameters

  • T extends keyof EntityRowMappings

Parameters

  • entityName: T
  • entityId: string

Returns EntityRowMappings[T]

getNoteIds

getNoteIds(): string[]

Returns string[]

getNoteReorderings

getNoteReorderings(): string[]

Returns string[]

getOptionNames

getOptionNames(): string[]

Returns string[]

hasAttributeRelatedChanges

hasAttributeRelatedChanges(): boolean

Returns boolean

true if there are changes which could affect the attributes (including inherited ones) notably changes in note itself should not have any effect on attributes

hasRevisionForNote

hasRevisionForNote(noteId: string): boolean

Parameters

  • noteId: string

Returns boolean

isEmpty

isEmpty(): boolean

Returns boolean

isEmptyForTree

isEmptyForTree(): boolean

Returns boolean

isNoteContentReloaded

isNoteContentReloaded(
noteId: string,
componentId?: string,
): undefined | false | ContentNoteIdToComponentIdRow

Parameters

  • noteId: string
  • OptionalcomponentId: string

Returns undefined | false | ContentNoteIdToComponentIdRow

isNoteReloaded

isNoteReloaded(
noteId: undefined | null | string,
componentId?: null | string,
): boolean

Parameters

  • noteId: undefined | null | string
  • componentId: null | string = null

Returns boolean

isOptionReloaded

isOptionReloaded(name: string): boolean

Parameters

  • name: string

Returns boolean

Settings

Member Visibility

  • Protected
  • Inherited
  • External

ThemeOSLightDark

On This Page

Constructors constructor Methods addAttachmentRowaddAttributeaddBranchaddNoteaddNoteContentaddNoteReorderingaddOptionaddRevisiongetAttachmentRowsgetAttributeRowsgetBranchRowsgetEntityRowgetNoteIdsgetNoteReorderingsgetOptionNameshasAttributeRelatedChangeshasRevisionForNoteisEmptyisEmptyForTreeisNoteContentReloadedisNoteReloadedisOptionReloaded