@@ -18,7 +18,6 @@ import type NoteDetailWidget from "../widgets/note_detail.js";
18
18
import type { ResolveOptions } from "../widgets/dialogs/delete_notes.js" ;
19
19
import type { PromptDialogOptions } from "../widgets/dialogs/prompt.js" ;
20
20
import type { ConfirmWithMessageOptions , ConfirmWithTitleOptions } from "../widgets/dialogs/confirm.js" ;
21
- import type { Node } from "../services/tree.js" ;
22
21
import type LoadResults from "../services/load_results.js" ;
23
22
import type { Attribute } from "../services/attribute_parser.js" ;
24
23
import type NoteTreeWidget from "../widgets/note_tree.js" ;
@@ -49,15 +48,15 @@ export interface CommandData {
49
48
* Represents a set of commands that are triggered from the context menu, providing information such as the selected note.
50
49
*/
51
50
export interface ContextMenuCommandData extends CommandData {
52
- node : Node ;
53
- notePath : string ;
51
+ node : Fancytree . FancytreeNode ;
52
+ notePath ? : string ;
54
53
noteId ?: string ;
55
- selectedOrActiveBranchIds : any ; // TODO: Remove any once type is defined
54
+ selectedOrActiveBranchIds ? : any ; // TODO: Remove any once type is defined
56
55
selectedOrActiveNoteIds : any ; // TODO: Remove any once type is defined
57
56
}
58
57
59
58
export interface NoteCommandData extends CommandData {
60
- notePath : string ;
59
+ notePath ? : string ;
61
60
hoistedNoteId ?: string ;
62
61
viewScope ?: ViewScope ;
63
62
}
@@ -72,13 +71,15 @@ export interface ExecuteCommandData<T> extends CommandData {
72
71
export type CommandMappings = {
73
72
"api-log-messages" : CommandData ;
74
73
focusTree : CommandData ,
74
+ focusOnTitle : CommandData ;
75
75
focusOnDetail : CommandData ;
76
76
focusOnSearchDefinition : Required < CommandData > ;
77
77
searchNotes : CommandData & {
78
78
searchString ?: string ;
79
79
ancestorNoteId ?: string | null ;
80
80
} ;
81
81
closeTocCommand : CommandData ;
82
+ closeHlt : CommandData ;
82
83
showLaunchBarSubtree : CommandData ;
83
84
showRevisions : CommandData ;
84
85
showOptions : CommandData & {
@@ -106,13 +107,18 @@ export type CommandMappings = {
106
107
showPromptDialog : PromptDialogOptions ;
107
108
showInfoDialog : ConfirmWithMessageOptions ;
108
109
showConfirmDialog : ConfirmWithMessageOptions ;
110
+ showRecentChanges : CommandData & { ancestorNoteId : string } ;
111
+ showImportDialog : CommandData & { noteId : string ; } ;
109
112
openNewNoteSplit : NoteCommandData ;
110
113
openInWindow : NoteCommandData ;
111
114
openNoteInNewTab : CommandData ;
112
115
openNoteInNewSplit : CommandData ;
113
116
openNoteInNewWindow : CommandData ;
117
+ openAboutDialog : CommandData ;
118
+ hideFloatingButtons : { } ;
114
119
hideLeftPane : CommandData ;
115
120
showLeftPane : CommandData ;
121
+ hoistNote : CommandData & { noteId : string } ;
116
122
leaveProtectedSession : CommandData ;
117
123
enterProtectedSession : CommandData ;
118
124
@@ -122,9 +128,12 @@ export type CommandMappings = {
122
128
insertNoteAfter : ContextMenuCommandData ;
123
129
insertChildNote : ContextMenuCommandData ;
124
130
delete : ContextMenuCommandData ;
131
+ editNoteTitle : ContextMenuCommandData ;
125
132
protectSubtree : ContextMenuCommandData ;
126
133
unprotectSubtree : ContextMenuCommandData ;
127
- openBulkActionsDialog : ContextMenuCommandData ;
134
+ openBulkActionsDialog : ContextMenuCommandData | {
135
+ selectedOrActiveNoteIds ?: string [ ]
136
+ } ;
128
137
editBranchPrefix : ContextMenuCommandData ;
129
138
convertNoteToAttachment : ContextMenuCommandData ;
130
139
duplicateSubtree : ContextMenuCommandData ;
@@ -143,6 +152,11 @@ export type CommandMappings = {
143
152
importIntoNote : ContextMenuCommandData ;
144
153
exportNote : ContextMenuCommandData ;
145
154
searchInSubtree : ContextMenuCommandData ;
155
+ moveNoteUp : ContextMenuCommandData ;
156
+ moveNoteDown : ContextMenuCommandData ;
157
+ moveNoteUpInHierarchy : ContextMenuCommandData ;
158
+ moveNoteDownInHierarchy : ContextMenuCommandData ;
159
+ selectAllNotesInParent : ContextMenuCommandData ;
146
160
147
161
addNoteLauncher : ContextMenuCommandData ;
148
162
addScriptLauncher : ContextMenuCommandData ;
@@ -175,6 +189,7 @@ export type CommandMappings = {
175
189
importMarkdownInline : CommandData ;
176
190
showPasswordNotSet : CommandData ;
177
191
showProtectedSessionPasswordDialog : CommandData ;
192
+ showUploadAttachmentsDialog : CommandData & { noteId : string } ;
178
193
closeProtectedSessionPasswordDialog : CommandData ;
179
194
copyImageReferenceToClipboard : CommandData ;
180
195
copyImageToClipboard : CommandData ;
@@ -198,6 +213,7 @@ export type CommandMappings = {
198
213
screen : Screen ;
199
214
} ;
200
215
closeTab : CommandData ;
216
+ closeToc : CommandData ;
201
217
closeOtherTabs : CommandData ;
202
218
closeRightTabs : CommandData ;
203
219
closeAllTabs : CommandData ;
@@ -216,15 +232,20 @@ export type CommandMappings = {
216
232
scrollContainerToCommand : CommandData & {
217
233
position : number ;
218
234
} ;
219
- moveThisNoteSplit : CommandData & {
220
- isMovingLeft : boolean ;
221
- } ;
235
+ scrollToEnd : CommandData ;
236
+ closeThisNoteSplit : CommandData ;
237
+ moveThisNoteSplit : CommandData & { isMovingLeft : boolean ; } ;
222
238
223
239
// Geomap
224
240
deleteFromMap : { noteId : string } ,
225
241
openGeoLocation : { noteId : string , event : JQuery . MouseDownEvent }
226
242
227
243
toggleZenMode : CommandData ;
244
+
245
+ updateAttributeList : CommandData & { attributes : Attribute [ ] } ;
246
+ saveAttributes : CommandData ;
247
+ reloadAttributes : CommandData ;
248
+ refreshNoteList : CommandData & { noteId : string ; } ;
228
249
} ;
229
250
230
251
type EventMappings = {
@@ -329,7 +350,6 @@ type EventMappings = {
329
350
showToc : {
330
351
noteId : string ;
331
352
} ;
332
- scrollToEnd : { ntxId : string } ;
333
353
noteTypeMimeChanged : { noteId : string } ;
334
354
zenModeChanged : { isEnabled : boolean } ;
335
355
} ;
0 commit comments