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-09-03 23:57:38 +03:00
|
|
|
import ViewModeStorage from "../view_widgets/view_mode_storage";
|
2025-08-30 14:32:06 +03:00
|
|
|
|
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;
|
|
|
|
|
/**
|
|
|
|
|
* 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-03 23:57:38 +03:00
|
|
|
viewStorage: ViewModeStorage<T>;
|
2025-08-30 15:44:49 +03:00
|
|
|
}
|