@launchmenu/applet-notes
Version:
An applet to make short notes
36 lines • 1.75 kB
TypeScript
import { Command, IMenuItem } from "@launchmenu/core";
import { NoteCategory } from "../../../dataModel/NoteCategory";
import { NotesSource } from "../../../dataModel/NotesSource";
import { INoteCategoryMetadata } from "../../../dataModel/_types/INoteCategoryMetadata";
/**
* Creates a new menu item to add new note categories
* @param notesSource The notes source to add the item to
* @param onCreate A callback for when a note category is created
* @returns The menu item that can be used to create new note categories
*/
export declare function createAddNoteCategoryMenuItem(notesSource: NotesSource, onCreate?: (noteCategory: NoteCategory, initial: boolean) => void): IMenuItem;
/** A command to add a note category to a notes source */
export declare class AddNoteCategoryCommand extends Command {
metadata: {
name: string;
};
protected notesSource: NotesSource;
protected noteCategory: NoteCategory;
protected name: string;
protected noteCategoryData: INoteCategoryMetadata | undefined;
protected onCreate: (noteCategory: NoteCategory, initial: boolean) => void;
/**
* Creates a new add note category command
* @param name The name of the note category
* @param source The notes source to add the note to
* @param onCreate A callback for when the category is created
*/
constructor(name: string, source: NotesSource, onCreate?: (noteCategory: NoteCategory,
/** Whether it was the first creation, not a redo */
initial: boolean) => void);
/** @override */
protected onExecute(): Promise<void>;
/** @override */
protected onRevert(): Promise<void>;
}
//# sourceMappingURL=createAddNoteCategoryMenuItem.d.ts.map