chore(react/collections): fix imports of ViewTypeOptions

This commit is contained in:
Elian Doran 2025-08-30 14:32:06 +03:00
parent ffb90c2b4b
commit 5fb843268f
No known key found for this signature in database
10 changed files with 13 additions and 13 deletions

View File

@ -1,6 +1,6 @@
import { NoteType } from "@triliumnext/commons";
import { ViewTypeOptions } from "./note_list_renderer";
import FNote from "../entities/fnote";
import { ViewTypeOptions } from "../widgets/collections/interface";
export const byNoteType: Record<Exclude<NoteType, "book">, string | null> = {
canvas: null,

View File

@ -6,7 +6,7 @@ import { ParentComponent } from "./react/react_utils";
import { EventData, EventNames } from "../components/app_context";
import { type FloatingButtonsList, type FloatingButtonContext } from "./FloatingButtonsDefinitions";
import ActionButton from "./react/ActionButton";
import { ViewTypeOptions } from "../services/note_list_renderer";
import { ViewTypeOptions } from "./collections/interface";
interface FloatingButtonsProps {
items: FloatingButtonsList;

View File

@ -19,7 +19,7 @@ import { getHelpUrlForNote } from "../services/in_app_help";
import froca from "../services/froca";
import NoteLink from "./react/NoteLink";
import RawHtml from "./react/RawHtml";
import { ViewTypeOptions } from "../services/note_list_renderer";
import { ViewTypeOptions } from "./collections/interface";
export interface FloatingButtonContext {
parentComponent: Component;

View File

@ -0,0 +1,5 @@
import type { ViewModeArgs } from "../view_widgets/view_mode";
const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board"] as const;
export type ArgsWithoutNoteId = Omit<ViewModeArgs, "noteIds">;
export type ViewTypeOptions = typeof allViewTypes[number];

View File

@ -4,13 +4,8 @@ import CalendarView from "../view_widgets/calendar_view.js";
import GeoView from "../view_widgets/geo_view/index.js";
import ListOrGridView from "../view_widgets/list_or_grid_view.js";
import TableView from "../view_widgets/table_view/index.js";
import type { ViewModeArgs } from "../view_widgets/view_mode.js";
import type ViewMode from "../view_widgets/view_mode.js";
const allViewTypes = ["list", "grid", "calendar", "table", "geoMap", "board"] as const;
export type ArgsWithoutNoteId = Omit<ViewModeArgs, "noteIds">;
export type ViewTypeOptions = typeof allViewTypes[number];
export default class NoteListRenderer {
private viewType: ViewTypeOptions;

View File

@ -1,6 +1,5 @@
import { useContext, useMemo } from "preact/hooks";
import { t } from "../../services/i18n";
import { ViewTypeOptions } from "../../services/note_list_renderer";
import FormSelect, { FormSelectWithGroups } from "../react/FormSelect";
import { TabContext } from "./ribbon-interface";
import { mapToKeyValueArray } from "../../services/utils";
@ -12,6 +11,7 @@ import FNote from "../../entities/fnote";
import FormCheckbox from "../react/FormCheckbox";
import FormTextBox from "../react/FormTextBox";
import { ComponentChildren } from "preact";
import { ViewTypeOptions } from "../collections/interface";
const VIEW_TYPE_MAPPINGS: Record<ViewTypeOptions, string> = {
grid: t("book_properties.grid"),

View File

@ -1,9 +1,9 @@
import { t } from "i18next";
import FNote from "../../entities/fnote";
import attributes from "../../services/attributes";
import { ViewTypeOptions } from "../../services/note_list_renderer"
import NoteContextAwareWidget from "../note_context_aware_widget";
import { DEFAULT_MAP_LAYER_NAME, MAP_LAYERS, type MapLayer } from "../view_widgets/geo_view/map_layer";
import { ViewTypeOptions } from "../collections/interface";
interface BookConfig {
properties: BookProperty[];

View File

@ -6,7 +6,7 @@ import treeService from "../../services/tree.js";
import utils from "../../services/utils.js";
import type FNote from "../../entities/fnote.js";
import ViewMode, { type ViewModeArgs } from "./view_mode.js";
import type { ViewTypeOptions } from "../../services/note_list_renderer.js";
import { ViewTypeOptions } from "../collections/interface.js";
const TPL = /*html*/`
<div class="note-list">

View File

@ -2,7 +2,7 @@ import type { EventData } from "../../components/app_context.js";
import appContext from "../../components/app_context.js";
import Component from "../../components/component.js";
import type FNote from "../../entities/fnote.js";
import type { ViewTypeOptions } from "../../services/note_list_renderer.js";
import { ViewTypeOptions } from "../collections/interface.js";
import ViewModeStorage from "./view_mode_storage.js";
export interface ViewModeArgs {

View File

@ -1,6 +1,6 @@
import type FNote from "../../entities/fnote";
import type { ViewTypeOptions } from "../../services/note_list_renderer";
import server from "../../services/server";
import { ViewTypeOptions } from "../collections/interface";
const ATTACHMENT_ROLE = "viewConfig";