Skip to content

Build your personal knowledge base with Trilium Notes

fix(build): build errors

Elian Doran5a40d3f02066
diff --git a/src/public/app/components/app_context.ts b/src/public/app/components/app_context.ts
index 731f187fb2..992b6a2a0c 100644
--- a/src/public/app/components/app_context.ts
+++ b/src/public/app/components/app_context.ts
@@ -70,6 +70,7 @@ export interface ExecuteCommandData extends CommandData {
*/
export type CommandMappings = {
"api-log-messages": CommandData;
+ focusTree: CommandData,
focusOnDetail: Required<CommandData>;
focusOnSearchDefinition: Required<CommandData>;
searchNotes: CommandData & {
@@ -232,9 +233,12 @@ type EventMappings = {
activeContextChanged: {
noteContext: NoteContext;
};
+ beforeNoteSwitch: {
+ noteContext: NoteContext;
+ };
noteSwitched: {
noteContext: NoteContext;
- notePath: string;
+ notePath: string | null;
};
noteSwitchedAndActivatedEvent: {
noteContext: NoteContext;
@@ -253,12 +257,16 @@ type EventMappings = {
noteId: string;
};
hoistedNoteChanged: {
- ntxId: string;
+ noteId: string;
+ ntxId: string | null;
};
contextsReopenedEvent: {
mainNtxId: string;
tabPosition: number;
};
+ noteDetailRefreshed: {
+ ntxId?: string | null;
+ };
noteContextReorderEvent: {
oldMainNtxId: string;
newMainNtxId: string;
@@ -275,6 +283,9 @@ type EventMappings = {
geoMapCreateChildNote: {
ntxId: string | null | undefined; // TODO: deduplicate ntxId
};
+ tabReorder: {
+ ntxIdsInOrder: string[]
+ };
};
export type EventListener<T extends EventNames> = {
diff --git a/src/public/app/widgets/containers/left_pane_container.ts b/src/public/app/widgets/containers/left_pane_container.ts
index f5090b4a83..bbfedaa2a5 100644
--- a/src/public/app/widgets/containers/left_pane_container.ts
+++ b/src/public/app/widgets/containers/left_pane_container.ts
@@ -22,7 +22,7 @@ export default class LeftPaneContainer extends FlexContainer<Component> {
this.toggleInt(visible);
if (visible) {
- this.triggerEvent("focusTree");
+ this.triggerEvent("focusTree", {});
} else {
const activeNoteContext = appContext.tabManager.getActiveContext();
this.triggerEvent("focusOnDetail", { ntxId: activeNoteContext.ntxId });