mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
refactor(react): normalize imports
This commit is contained in:
parent
11f6462a31
commit
14e09f5ea0
@ -4,9 +4,8 @@ import ReactBasicWidget from "../react/ReactBasicWidget";
|
|||||||
import Button from "../react/Button";
|
import Button from "../react/Button";
|
||||||
import FormRadioGroup from "../react/FormRadioGroup";
|
import FormRadioGroup from "../react/FormRadioGroup";
|
||||||
import NoteAutocomplete from "../react/NoteAutocomplete";
|
import NoteAutocomplete from "../react/NoteAutocomplete";
|
||||||
import { useRef, useState } from "preact/hooks";
|
import { useRef, useState, useEffect } from "preact/hooks";
|
||||||
import tree from "../../services/tree";
|
import tree from "../../services/tree";
|
||||||
import { useEffect } from "react";
|
|
||||||
import note_autocomplete, { Suggestion } from "../../services/note_autocomplete";
|
import note_autocomplete, { Suggestion } from "../../services/note_autocomplete";
|
||||||
import { default as TextTypeWidget } from "../type_widgets/editable_text.js";
|
import { default as TextTypeWidget } from "../type_widgets/editable_text.js";
|
||||||
import { logError } from "../../services/ws";
|
import { logError } from "../../services/ws";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useRef, useState } from "preact/compat";
|
import { useRef, useState } from "preact/hooks";
|
||||||
import appContext from "../../components/app_context";
|
import appContext from "../../components/app_context";
|
||||||
import { t } from "../../services/i18n";
|
import { t } from "../../services/i18n";
|
||||||
import Modal from "../react/Modal";
|
import Modal from "../react/Modal";
|
||||||
|
@ -2,7 +2,7 @@ import ReactBasicWidget from "../react/ReactBasicWidget";
|
|||||||
import Modal from "../react/Modal";
|
import Modal from "../react/Modal";
|
||||||
import Button from "../react/Button";
|
import Button from "../react/Button";
|
||||||
import { t } from "../../services/i18n";
|
import { t } from "../../services/i18n";
|
||||||
import { useState } from "react";
|
import { useState } from "preact/hooks";
|
||||||
import FormCheckbox from "../react/FormCheckbox";
|
import FormCheckbox from "../react/FormCheckbox";
|
||||||
import useTriliumEvent from "../react/hooks";
|
import useTriliumEvent from "../react/hooks";
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { t } from "../../services/i18n.js";
|
|||||||
import FormCheckbox from "../react/FormCheckbox.js";
|
import FormCheckbox from "../react/FormCheckbox.js";
|
||||||
import Modal from "../react/Modal.js";
|
import Modal from "../react/Modal.js";
|
||||||
import ReactBasicWidget from "../react/ReactBasicWidget.js";
|
import ReactBasicWidget from "../react/ReactBasicWidget.js";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "preact/hooks";
|
||||||
import type { DeleteNotesPreview } from "@triliumnext/commons";
|
import type { DeleteNotesPreview } from "@triliumnext/commons";
|
||||||
import server from "../../services/server.js";
|
import server from "../../services/server.js";
|
||||||
import froca from "../../services/froca.js";
|
import froca from "../../services/froca.js";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useRef, useState } from "preact/compat";
|
import { useRef, useState } from "preact/hooks";
|
||||||
import { t } from "../../services/i18n";
|
import { t } from "../../services/i18n";
|
||||||
import FormGroup from "../react/FormGroup";
|
import FormGroup from "../react/FormGroup";
|
||||||
import FormRadioGroup from "../react/FormRadioGroup";
|
import FormRadioGroup from "../react/FormRadioGroup";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useRef } from "react";
|
import { useRef } from "preact/hooks";
|
||||||
import { t } from "../../services/i18n.js";
|
import { t } from "../../services/i18n.js";
|
||||||
import utils from "../../services/utils.js";
|
import utils from "../../services/utils.js";
|
||||||
import Button from "../react/Button.js";
|
import Button from "../react/Button.js";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useCallback, useRef, useState } from "preact/compat";
|
import { useCallback, useRef, useState } from "preact/hooks";
|
||||||
import appContext from "../../components/app_context";
|
import appContext from "../../components/app_context";
|
||||||
import { t } from "../../services/i18n";
|
import { t } from "../../services/i18n";
|
||||||
import server from "../../services/server";
|
import server from "../../services/server";
|
||||||
|
@ -5,7 +5,7 @@ import NoteList from "../react/NoteList";
|
|||||||
import FormGroup from "../react/FormGroup";
|
import FormGroup from "../react/FormGroup";
|
||||||
import NoteAutocomplete from "../react/NoteAutocomplete";
|
import NoteAutocomplete from "../react/NoteAutocomplete";
|
||||||
import Button from "../react/Button";
|
import Button from "../react/Button";
|
||||||
import { useRef, useState } from "preact/compat";
|
import { useRef, useState } from "preact/hooks";
|
||||||
import { Suggestion, triggerRecentNotes } from "../../services/note_autocomplete";
|
import { Suggestion, triggerRecentNotes } from "../../services/note_autocomplete";
|
||||||
import tree from "../../services/tree";
|
import tree from "../../services/tree";
|
||||||
import froca from "../../services/froca";
|
import froca from "../../services/froca";
|
||||||
|
@ -14,7 +14,7 @@ import utils from "../../services/utils";
|
|||||||
import { Dispatch, StateUpdater, useEffect, useRef, useState } from "preact/hooks";
|
import { Dispatch, StateUpdater, useEffect, useRef, useState } from "preact/hooks";
|
||||||
import protected_session_holder from "../../services/protected_session_holder";
|
import protected_session_holder from "../../services/protected_session_holder";
|
||||||
import { renderMathInElement } from "../../services/math";
|
import { renderMathInElement } from "../../services/math";
|
||||||
import { CSSProperties } from "preact/compat";
|
import type { CSSProperties } from "preact/compat";
|
||||||
import open from "../../services/open";
|
import open from "../../services/open";
|
||||||
import ActionButton from "../react/ActionButton";
|
import ActionButton from "../react/ActionButton";
|
||||||
import options from "../../services/options";
|
import options from "../../services/options";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useState } from "preact/compat";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import { t } from "../../services/i18n";
|
import { t } from "../../services/i18n";
|
||||||
import Button from "../react/Button";
|
import Button from "../react/Button";
|
||||||
import FormCheckbox from "../react/FormCheckbox";
|
import FormCheckbox from "../react/FormCheckbox";
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { RefObject } from "preact";
|
import type { RefObject } from "preact";
|
||||||
import { CSSProperties } from "preact/compat";
|
import type { CSSProperties } from "preact/compat";
|
||||||
import { useRef } from "preact/hooks";
|
import { useRef } from "preact/hooks";
|
||||||
|
|
||||||
interface ButtonProps {
|
interface ButtonProps {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Tooltip } from "bootstrap";
|
import { Tooltip } from "bootstrap";
|
||||||
import { useEffect, useRef } from "preact/compat";
|
import { useEffect, useRef } from "preact/hooks";
|
||||||
import { escapeQuotes } from "../../services/utils";
|
import { escapeQuotes } from "../../services/utils";
|
||||||
import { ComponentChildren } from "preact";
|
import { ComponentChildren } from "preact";
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ComponentChildren } from "preact";
|
import { ComponentChildren } from "preact";
|
||||||
import Icon from "./Icon";
|
import Icon from "./Icon";
|
||||||
import { CSSProperties } from "preact/compat";
|
import type { CSSProperties } from "preact/compat";
|
||||||
|
|
||||||
interface FormListOpts {
|
interface FormListOpts {
|
||||||
children: ComponentChildren;
|
children: ComponentChildren;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { InputHTMLAttributes, RefObject } from "preact/compat";
|
import type { InputHTMLAttributes, RefObject } from "preact/compat";
|
||||||
|
|
||||||
interface FormTextBoxProps extends Pick<InputHTMLAttributes<HTMLInputElement>, "placeholder" | "autoComplete" | "className" | "type" | "name" | "pattern" | "title" | "style"> {
|
interface FormTextBoxProps extends Pick<InputHTMLAttributes<HTMLInputElement>, "placeholder" | "autoComplete" | "className" | "type" | "name" | "pattern" | "title" | "style"> {
|
||||||
id?: string;
|
id?: string;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { useRef } from "preact/hooks";
|
import { useRef } from "preact/hooks";
|
||||||
import { t } from "../../services/i18n";
|
import { t } from "../../services/i18n";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "preact/hooks";
|
||||||
import note_autocomplete, { Options, type Suggestion } from "../../services/note_autocomplete";
|
import note_autocomplete, { Options, type Suggestion } from "../../services/note_autocomplete";
|
||||||
import type { RefObject } from "preact";
|
import type { RefObject } from "preact";
|
||||||
import { CSSProperties } from "preact/compat";
|
import type { CSSProperties } from "preact/compat";
|
||||||
|
|
||||||
interface NoteAutocompleteProps {
|
interface NoteAutocompleteProps {
|
||||||
inputRef?: RefObject<HTMLInputElement>;
|
inputRef?: RefObject<HTMLInputElement>;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
import type FNote from "../../entities/fnote";
|
import type FNote from "../../entities/fnote";
|
||||||
import froca from "../../services/froca";
|
import froca from "../../services/froca";
|
||||||
import { CSSProperties } from "preact/compat";
|
import type { CSSProperties } from "preact/compat";
|
||||||
|
|
||||||
interface NoteListProps {
|
interface NoteListProps {
|
||||||
noteIds?: string[];
|
noteIds?: string[];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { CSSProperties } from "preact/compat";
|
import type { CSSProperties } from "preact/compat";
|
||||||
|
|
||||||
type HTMLElementLike = string | HTMLElement | JQuery<HTMLElement>;
|
type HTMLElementLike = string | HTMLElement | JQuery<HTMLElement>;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user