2025-08-30 15:44:49 +03:00
|
|
|
import FNote from "../../entities/fnote";
|
2025-08-30 14:32:06 +03:00
|
|
|
import type { ViewModeArgs } from "../view_widgets/view_mode";
|
|
|
|
|
|
2025-08-30 15:11:49 +03:00
|
|
|
export const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board"] as const;
|
2025-08-30 14:32:06 +03:00
|
|
|
export type ArgsWithoutNoteId = Omit<ViewModeArgs, "noteIds">;
|
|
|
|
|
export type ViewTypeOptions = typeof allViewTypes[number];
|
2025-08-30 15:44:49 +03:00
|
|
|
|
2025-09-03 23:57:38 +03:00
|
|
|
export interface ViewModeProps<T extends object> {
|
2025-08-30 15:44:49 +03:00
|
|
|
note: FNote;
|
2025-09-07 20:38:16 +03:00
|
|
|
notePath: string;
|
2025-08-30 15:44:49 +03:00
|
|
|
/**
|
|
|
|
|
* We're using noteIds so that it's not necessary to load all notes at once when paging.
|
|
|
|
|
*/
|
|
|
|
|
noteIds: string[];
|
2025-08-30 18:48:34 +03:00
|
|
|
highlightedTokens: string[] | null | undefined;
|
2025-09-04 15:13:48 +03:00
|
|
|
viewConfig: T | undefined;
|
|
|
|
|
saveConfig(newConfig: T): void;
|
2025-08-30 15:44:49 +03:00
|
|
|
}
|