refactor: Reorganize frontend by moving UI components, hooks, and utilities to new components, logic, features, and lib directories
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
DocumentsFilterProvider,
|
||||
} from '../documents/context/DocumentsFilterContext';
|
||||
import { PreviewProvider, usePreviewContext } from '../preview/PreviewContext';
|
||||
import { DocumentOpenProvider } from '../contexts/DocumentOpenContext';
|
||||
import { DocumentOpenProvider } from '../lib/context/DocumentOpenContext';
|
||||
import { useWorkspaceSurface } from './useWorkspaceSurface';
|
||||
import { DocumentsHeaderBreadcrumb } from '../documents/panel/DocumentsPanelHeader';
|
||||
import { SidebarProvider, useSidebarContext } from '../sidebar/SidebarContext';
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
serializeAuthenticationCredential,
|
||||
serializeRegistrationCredential,
|
||||
} from '../utils/webauthn';
|
||||
import { useAppDispatch, useAppState } from './appState';
|
||||
import { useAppDispatch, useAppState } from '../lib/store/appState';
|
||||
import {
|
||||
finishPasskeyLogin,
|
||||
finishSignup,
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
selectTenant,
|
||||
startPasskeyLogin,
|
||||
startSignup,
|
||||
} from '../lib/apiClient';
|
||||
} from '../lib/api/apiClient';
|
||||
|
||||
type StatusVariant = 'info' | 'success' | 'error';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useCallback } from 'react';
|
||||
import SettingsModal from '../settings/SettingsModal';
|
||||
import { useAppShell } from '../appShellContext';
|
||||
import { useAppShell } from '../lib/context/AppShellContext';
|
||||
import useApiTokens from '../settings/useApiTokens';
|
||||
import useCapabilitySets from '../settings/useCapabilitySets';
|
||||
import useCapabilities from '../settings/useCapabilities';
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
WarningIcon,
|
||||
BottombarCollapseIcon,
|
||||
BottombarExpandIcon,
|
||||
} from '../ui/icons';
|
||||
import PanelHeader from '../ui/PanelHeader';
|
||||
} from '../components/icons';
|
||||
import PanelHeader from '../components/PanelHeader';
|
||||
|
||||
type UploadStatus = 'pending' | 'uploading' | 'success' | 'duplicate' | 'error' | (string & {});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import type { Dispatch, SetStateAction } from 'react';
|
||||
import { TAG_FILTER_UNTAGGED } from './workspaceUtils';
|
||||
import { listDocuments } from '../lib/apiClient';
|
||||
import { listDocuments } from '../lib/api/apiClient';
|
||||
import type { Identifier } from '../types/identifiers';
|
||||
|
||||
import type { Document } from '../types/documents';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useMemo } from 'react';
|
||||
import type { ComponentProps } from 'react';
|
||||
import { useAppShell } from '../appShellContext';
|
||||
import { useAppShell } from '../lib/context/AppShellContext';
|
||||
import type { DocumentsFilterValue } from '../documents/context/DocumentsFilterContext';
|
||||
import type Sidebar from '../sidebar/Sidebar';
|
||||
import type { UseWorkspaceSurfaceArgs } from './useWorkspaceSurface';
|
||||
|
||||
@@ -2,8 +2,8 @@ import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import type { ReactNode } from 'react';
|
||||
import TagsPanel from '../tags/TagsPanel';
|
||||
import CorrespondentsPanel, { CorrespondentsPanelProps } from '../correspondents/CorrespondentsPanel';
|
||||
import PanelHeader from '../ui/PanelHeader';
|
||||
import { CloseIcon } from '../ui/icons';
|
||||
import PanelHeader from '../components/PanelHeader';
|
||||
import { CloseIcon } from '../components/icons';
|
||||
import { CORRESPONDENTS_MODAL, TAGS_MODAL } from '../constants/app';
|
||||
|
||||
interface TagRecord {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useEffect, useMemo } from 'react';
|
||||
import type { ComponentProps, ReactNode } from 'react';
|
||||
import { SidebarExpandIcon } from '../ui/icons';
|
||||
import { SidebarExpandIcon } from '../components/icons';
|
||||
import DocumentsPanel from '../documents/panel/DocumentsPanel';
|
||||
import DocumentViewerPanel from '../preview/DocumentViewerPanel';
|
||||
import { usePanelManager } from './PanelManagerContext';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React, { useState, useCallback, useEffect, useRef } from 'react';
|
||||
import { useStatusToast } from '../contexts/StatusToastContext';
|
||||
import { useStatusToast } from '../lib/context/StatusToastContext';
|
||||
import '../styles/status-toast.css';
|
||||
|
||||
const FADE_OUT_DURATION = 300; // Match CSS animation duration
|
||||
|
||||
+6
-6
@@ -1,11 +1,11 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import DesktopPreviewCard from './DesktopPreviewCard';
|
||||
import { resolveCorrespondents } from '../documents/correspondents';
|
||||
import { getTagColorStyle } from '../utils/colors';
|
||||
import type { DocumentId } from '../types/identifiers';
|
||||
import type { Document } from '../types/documents';
|
||||
import { LayoutCard } from './LayoutSystem';
|
||||
import { useCardPointer } from './useCardPointer';
|
||||
import { resolveCorrespondents } from '../../documents/correspondents';
|
||||
import { getTagColorStyle } from '../../utils/colors';
|
||||
import type { DocumentId } from '../../types/identifiers';
|
||||
import type { Document } from '../../types/documents';
|
||||
import { LayoutCard } from '../logic/LayoutSystem';
|
||||
import { useCardPointer } from '../interactions/useCardPointer';
|
||||
|
||||
const preventAll = (event?: React.SyntheticEvent | Event | null) => {
|
||||
if (!event) return;
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
import { useMemo } from 'react';
|
||||
import type { JSX } from 'react';
|
||||
import { resolveDocumentAssetUrl } from '../asset_manager';
|
||||
import type { Identifier } from '../types/identifiers';
|
||||
import type { Document } from '../types/documents';
|
||||
import { resolveDocumentAssetUrl } from '../../lib/assets/AssetManager';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
import type { Document } from '../../types/documents';
|
||||
|
||||
import type { Asset } from '../types/assets';
|
||||
import type { Asset } from '../../types/assets';
|
||||
|
||||
type EnsureAssetUrl = (
|
||||
documentId: Identifier,
|
||||
+13
-13
@@ -5,20 +5,20 @@ import React, {
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { LayoutStore, LayoutCard } from './LayoutSystem';
|
||||
import { LayoutStore, LayoutCard } from '../logic/LayoutSystem';
|
||||
import DesktopDocumentCard from './DesktopDocumentCard';
|
||||
import usePreviewMetadata from './hooks/usePreviewMetadata';
|
||||
import { useDeskTagInteractions } from './tags/useDeskTagInteractions';
|
||||
import '../styles/workspace/workspace-layout.css';
|
||||
import '../styles/workspace/workspace-items.css';
|
||||
import '../styles/workspace/workspace-cards.css';
|
||||
import { useWorkspaceSelectionContext } from '../app/WorkspaceSelectionContext';
|
||||
import { createDocumentEntryKey } from '../app/entryKey';
|
||||
import { PointerTrackingProvider, usePointerTracking } from './PointerTrackingContext';
|
||||
import type { Identifier } from '../types/identifiers';
|
||||
import type { DocumentsListEntry, Document } from '../types/documents';
|
||||
import { useAppState } from '../app/appState';
|
||||
import { useDocumentOpen } from '../contexts/DocumentOpenContext';
|
||||
import usePreviewMetadata from '../hooks/usePreviewMetadata';
|
||||
import { useDeskTagInteractions } from '../tags/useDeskTagInteractions';
|
||||
import './workspace-layout.css';
|
||||
import './workspace-items.css';
|
||||
import './workspace-cards.css';
|
||||
import { useWorkspaceSelectionContext } from '../../app/WorkspaceSelectionContext';
|
||||
import { createDocumentEntryKey } from '../../app/entryKey';
|
||||
import { PointerTrackingProvider, usePointerTracking } from '../interactions/PointerTrackingContext';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
import type { DocumentsListEntry, Document } from '../../types/documents';
|
||||
import { useAppState } from '../../lib/store/appState';
|
||||
import { useDocumentOpen } from '../../lib/context/DocumentOpenContext';
|
||||
|
||||
interface DocumentSizeInfo {
|
||||
width: number;
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import React, { useRef, useCallback } from 'react';
|
||||
import { createSafeContext } from '../utils/createSafeContext';
|
||||
import { createSafeContext } from '../../utils/createSafeContext';
|
||||
|
||||
interface PointerTrackingContextType {
|
||||
activePointersRef: React.MutableRefObject<Map<number, string | undefined>>;
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
import React, { useCallback, useRef } from 'react';
|
||||
import { usePointerTracking } from './PointerTrackingContext';
|
||||
|
||||
import { LayoutCard } from './LayoutSystem';
|
||||
import { handleDragMove, handleDragEnd, handleDragStart, attachToDragGroup } from './CardDragLogic';
|
||||
import { LayoutCard } from '../logic/LayoutSystem';
|
||||
import { handleDragMove, handleDragEnd, handleDragStart, attachToDragGroup } from '../logic/CardDragLogic';
|
||||
|
||||
const DRAG_THRESHOLD = 3;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { constrainDimensions, getInitialPosition, CONTAINER_PADDING } from './utils/layoutUtils';
|
||||
import { constrainDimensions, getInitialPosition, CONTAINER_PADDING } from '../utils/layoutUtils';
|
||||
|
||||
import { fetchLayoutRecords, upsertLayoutRecords } from './db';
|
||||
import { CardPhysics } from './CardPhysics';
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { DocumentId } from '../types/identifiers';
|
||||
import { DB_NAME, DB_VERSION, LAYOUT_STORE } from '../constants/desktop';
|
||||
type TenantId = import('../types/identifiers').TenantId;
|
||||
import type { DocumentId } from '../../types/identifiers';
|
||||
import { DB_NAME, DB_VERSION, LAYOUT_STORE } from '../../constants/desktop';
|
||||
type TenantId = import('../../types/identifiers').TenantId;
|
||||
|
||||
const currentDbPromise: { value: Promise<IDBDatabase | null> | null } = { value: null };
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
isTagTransferEvent,
|
||||
parseTagTransferPayload,
|
||||
writeTagTransferData,
|
||||
} from '../../documents/tagTransfer';
|
||||
} from '../../documents/features/tagging/tagTransfer';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
import type { Document, DocumentTag } from '../../types/documents';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { LayoutCard } from '../LayoutSystem';
|
||||
import type { LayoutCard } from '../logic/LayoutSystem';
|
||||
|
||||
export const CONTAINER_PADDING = 18;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import UnifiedDocumentViewer from '../preview/UnifiedDocumentViewer';
|
||||
import PanelHeader from '../ui/PanelHeader';
|
||||
import { IconX, DownloadIcon, FileInfoIcon } from '../ui/icons';
|
||||
import PanelHeader from '../components/PanelHeader';
|
||||
import { IconX, DownloadIcon, FileInfoIcon } from '../components/icons';
|
||||
|
||||
import type { Document } from '../types/documents';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useEffect, useMemo } from 'react';
|
||||
import type { MutableRefObject } from 'react';
|
||||
import { resolveDocumentAssetUrl } from '../asset_manager';
|
||||
import { resolveDocumentAssetUrl } from '../lib/assets/AssetManager';
|
||||
import { useDetailPanel } from '../app/useDetailPanel';
|
||||
import { DEFAULT_FOLDER_NAME } from '../app/workspaceUtils';
|
||||
import type { DocumentInfoPanelProps } from '../documents/DocumentInfoPanel';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React, { useCallback, useEffect, useMemo, useState, type FormEvent } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { EditIcon, IconX, PlusIcon } from '../ui/icons';
|
||||
import { EditIcon, IconX, PlusIcon } from '../components/icons';
|
||||
import InlineRenameInput from './components/InlineRenameInput';
|
||||
import SelectionAssignmentMenu, {
|
||||
SelectionAssignmentMenuItem,
|
||||
type NormalizedSelectionAssignmentItem,
|
||||
} from './SelectionAssignmentMenu';
|
||||
} from './features/selection/SelectionAssignmentMenu';
|
||||
import { getTagColorStyle } from '../utils/colors';
|
||||
import {
|
||||
formatDate,
|
||||
|
||||
@@ -5,13 +5,13 @@ import {
|
||||
getAssetFromVersion,
|
||||
resolveDocumentAssetUrl,
|
||||
resolveAssetUrl,
|
||||
} from '../asset_manager';
|
||||
} from '../lib/assets/AssetManager';
|
||||
import { DEFAULT_THUMBNAIL_SIZE } from '../constants/documents';
|
||||
import type {
|
||||
Asset as AssetManagerAsset,
|
||||
EnsureAssetUrl as AssetManagerEnsureAssetUrl,
|
||||
GetAsset as AssetManagerGetAsset,
|
||||
} from '../asset_manager';
|
||||
} from '../lib/assets/AssetManager';
|
||||
|
||||
// Detect when an element becomes visible within a scroll container so we can delay loading.
|
||||
const useLazyVisibility = (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useCallback } from 'react';
|
||||
import { useDocumentViewLogic, DocumentViewLogic } from './hooks/useDocumentViewLogic';
|
||||
import { useDocumentsNavigation } from './hooks/useDocumentsNavigation';
|
||||
import { useDocumentViewLogic, DocumentViewLogic } from './logic/useDocumentViewLogic';
|
||||
import { useDocumentsNavigation } from './logic/useDocumentsNavigation';
|
||||
import { useWorkspaceSelectionContext } from '../app/WorkspaceSelectionContext';
|
||||
import { usePanelManager } from '../app/PanelManagerContext';
|
||||
import DocumentsListRow from './components/DocumentsListRow';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import type { DocumentsViewProps } from '../panel/DocumentsPanel';
|
||||
import type { DocumentViewLogic } from '../hooks/useDocumentViewLogic';
|
||||
import { useDocumentItemLogic } from '../hooks/useDocumentItemLogic';
|
||||
import type { DocumentViewLogic } from '../logic/useDocumentViewLogic';
|
||||
import { useDocumentItemLogic } from '../logic/useDocumentItemLogic';
|
||||
import EntryShell from './EntryShell';
|
||||
|
||||
interface DocumentEntryProps extends DocumentsViewProps {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useMemo } from 'react';
|
||||
import { getTagColorStyle } from '../../utils/colors';
|
||||
import { writeTagTransferData } from '../tagTransfer';
|
||||
import { writeTagTransferData } from '../features/tagging/tagTransfer';
|
||||
import type { DocumentTag } from '../../types/documents';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import { FolderIcon } from '../../ui/icons';
|
||||
import { FolderIcon } from '../../components/icons';
|
||||
import DocumentThumbnailImage from '../DocumentThumbnailImage';
|
||||
import { resolveCorrespondents } from '../correspondents';
|
||||
import type { DocumentsListEntry } from '../../types/documents';
|
||||
import type { DocumentsViewProps } from '../panel/DocumentsPanel';
|
||||
import type { DocumentViewLogic } from '../hooks/useDocumentViewLogic';
|
||||
import type { DocumentViewLogic } from '../logic/useDocumentViewLogic';
|
||||
import EditableEntryTitle from './EditableEntryTitle';
|
||||
import EntryCorrespondents from './EntryCorrespondents';
|
||||
import EntryTags from './EntryTags';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import { FolderIcon } from '../../ui/icons';
|
||||
import { FolderIcon } from '../../components/icons';
|
||||
import { formatDate } from '../../utils/date';
|
||||
import DocumentThumbnailImage from '../DocumentThumbnailImage';
|
||||
import { resolveCorrespondents } from '../correspondents';
|
||||
import type { DocumentsListEntry } from '../../types/documents';
|
||||
import type { DocumentsViewProps } from '../panel/DocumentsPanel';
|
||||
import type { DocumentViewLogic } from '../hooks/useDocumentViewLogic';
|
||||
import type { DocumentViewLogic } from '../logic/useDocumentViewLogic';
|
||||
import EditableEntryTitle from './EditableEntryTitle';
|
||||
import EntryCorrespondents from './EntryCorrespondents';
|
||||
import EntryTags from './EntryTags';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import type { DocumentsViewProps } from '../panel/DocumentsPanel';
|
||||
import type { DocumentViewLogic } from '../hooks/useDocumentViewLogic';
|
||||
import { useFolderItemLogic } from '../hooks/useFolderItemLogic';
|
||||
import type { DocumentViewLogic } from '../logic/useDocumentViewLogic';
|
||||
import { useFolderItemLogic } from '../features/folders/useFolderItemLogic';
|
||||
import EntryShell from './EntryShell';
|
||||
|
||||
interface FolderEntryProps extends DocumentsViewProps {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { CheckIcon, CloseIcon } from '../../ui/icons';
|
||||
import { CheckIcon, CloseIcon } from '../../components/icons';
|
||||
|
||||
interface InlineRenameInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'onSubmit' | 'value'> {
|
||||
value: string;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { useCallback, useEffect, useRef } from 'react';
|
||||
import type { MutableRefObject } from 'react';
|
||||
import { clearAuthToken, logoutSession, refreshSession, setAuthToken } from '../../lib/apiClient';
|
||||
import { clearAuthToken, logoutSession, refreshSession, setAuthToken } from '../../lib/api/apiClient';
|
||||
|
||||
type AppStatus = string;
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { useCallback } from 'react';
|
||||
import { assignCorrespondentsBulk } from '../../lib/apiClient';
|
||||
import { assignCorrespondentsBulk } from '../../lib/api/apiClient';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
import type { MessageOptions } from '../../types/documents';
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { MutableRefObject, useCallback, useState } from 'react';
|
||||
import type { Correspondent } from '../../types/documents';
|
||||
|
||||
import { listCorrespondents, createCorrespondent, updateCorrespondent, deleteCorrespondent } from '../../lib/apiClient';
|
||||
import { listCorrespondents, createCorrespondent, updateCorrespondent, deleteCorrespondent } from '../../lib/api/apiClient';
|
||||
|
||||
interface UseCorrespondentsOptions {
|
||||
notifyApiError: (error: unknown, fallback: string) => void;
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { useCallback, useMemo } from 'react';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
|
||||
|
||||
import { addDocumentCorrespondent, removeDocumentCorrespondent } from '../../lib/apiClient';
|
||||
import { addDocumentCorrespondent, removeDocumentCorrespondent } from '../../lib/api/apiClient';
|
||||
|
||||
interface CorrespondentOption {
|
||||
id?: string;
|
||||
+1
-1
@@ -12,7 +12,7 @@ import {
|
||||
queueDocumentReanalysis,
|
||||
trashDocument,
|
||||
updateDocument,
|
||||
} from '../../lib/apiClient';
|
||||
} from '../../lib/api/apiClient';
|
||||
import type { DocumentId, FolderId as FolderIdentifier } from '../../types/identifiers';
|
||||
import type { Document, MessageOptions } from '../../types/documents';
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import {
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
import DocumentsManager from '../../documents/DocumentsManager';
|
||||
import DocumentsManager from '../DocumentsManager';
|
||||
import type { DocumentId } from '../../types/identifiers';
|
||||
import type { Document } from '../../types/documents';
|
||||
|
||||
+20
-20
@@ -13,19 +13,19 @@ import {
|
||||
useMatch,
|
||||
useNavigate,
|
||||
} from 'react-router-dom';
|
||||
import AssetManager, { getAssetFromVersion } from '../../asset_manager';
|
||||
import useApiError from '../useApiError';
|
||||
import TagManager from '../../tag_manager';
|
||||
import AssetManager, { getAssetFromVersion } from '../../lib/assets/AssetManager';
|
||||
import useApiError from '../../hooks/useApiError';
|
||||
import TagManager from '../../lib/assets/TagManager';
|
||||
import { useManagementModals } from '../../app/useManagementModals';
|
||||
import { useAppDispatch, useAppState } from '../../app/appState';
|
||||
import { fetchAsset } from '../../lib/apiClient';
|
||||
import { useApi } from '../../app/ApiContext';
|
||||
import { useAppDispatch, useAppState } from '../../lib/store/appState';
|
||||
import { fetchAsset } from '../../lib/api/apiClient';
|
||||
import { useApi } from '../../lib/context/ApiContext';
|
||||
import { useWorkspaceSelection } from '../../app/useWorkspaceSelection';
|
||||
import { useEntryPointer as useEntryPointerCore } from '../../documents/useEntryPointer';
|
||||
import { isTagTransferEvent } from '../../documents/tagTransfer';
|
||||
import useDocumentsSelection from '../../documents/hooks/useDocumentsSelection';
|
||||
import useBulkDocumentActions from '../../documents/hooks/useBulkDocumentActions';
|
||||
import useDocumentsPanelProps from '../../documents/hooks/useDocumentsPanelProps';
|
||||
import { useEntryPointer as useEntryPointerCore } from '../features/selection/useEntryPointer';
|
||||
import { isTagTransferEvent } from '../features/tagging/tagTransfer';
|
||||
import useDocumentsSelection from '../features/selection/useDocumentsSelection';
|
||||
import useBulkDocumentActions from './useBulkDocumentActions';
|
||||
import useDocumentsPanelProps from '../logic/useDocumentsPanelProps';
|
||||
import useDocumentPreview from '../../app/useDocumentPreview';
|
||||
import useSidebarProps from '../../sidebar/useSidebarProps';
|
||||
import {
|
||||
@@ -36,21 +36,21 @@ import {
|
||||
} from '../../app/workspaceUtils';
|
||||
import { createDocumentEntryKey, createFolderEntryKey } from '../../app/entryKey';
|
||||
import useDocumentsSearch from '../../app/useDocumentsSearch';
|
||||
import { useStatusToast, type ToastVariant } from '../../contexts/StatusToastContext';
|
||||
import { useStatusToast, type ToastVariant } from '../../lib/context/StatusToastContext';
|
||||
import useAuthManager from './useAuthManager';
|
||||
import useTenantManager from './useTenantManager';
|
||||
import useDocuments from './useDocuments';
|
||||
import { fetchDocument } from '../../lib/apiClient';
|
||||
import useFolderTree from './useFolderTree';
|
||||
import useFolderTreeActions from './useFolderTreeActions';
|
||||
import useDocumentTagging from './useDocumentTagging';
|
||||
import useDocumentUploads from './useDocumentUploads';
|
||||
import useDocumentDragHandlers from './useDocumentDragHandlers';
|
||||
import { fetchDocument } from '../../lib/api/apiClient';
|
||||
import useFolderTree from '../features/folders/useFolderTree';
|
||||
import useFolderTreeActions from '../features/folders/useFolderTreeActions';
|
||||
import useDocumentTagging from '../features/tagging/useDocumentTagging';
|
||||
import useDocumentUploads from '../features/upload/useDocumentUploads';
|
||||
import useDocumentDragHandlers from '../features/upload/useDocumentDragHandlers';
|
||||
import useDocumentMutations from './useDocumentMutations';
|
||||
import useDetailWorkspace from '../../detail/useDetailWorkspace';
|
||||
import useWorkspaceTaxonomies from './useWorkspaceTaxonomies';
|
||||
import useWorkspaceBreadcrumbs from './useWorkspaceBreadcrumbs';
|
||||
import useWorkspaceSelectionSync from './useWorkspaceSelectionSync';
|
||||
import useWorkspaceBreadcrumbs from '../logic/useWorkspaceBreadcrumbs';
|
||||
import useWorkspaceSelectionSync from '../features/selection/useWorkspaceSelectionSync';
|
||||
import type { DocumentId, FolderId as FolderIdentifier, Identifier } from '../../types/identifiers';
|
||||
|
||||
const EntryType = Object.freeze({
|
||||
@@ -2,7 +2,7 @@ import { MutableRefObject, useCallback, useState } from 'react';
|
||||
import type { TagId, TenantId } from '../../types/identifiers';
|
||||
import type { Tag } from '../../types/documents';
|
||||
|
||||
import { listTags, updateTag, createTag, deleteTag } from '../../lib/apiClient';
|
||||
import { listTags, updateTag, createTag, deleteTag } from '../../lib/api/apiClient';
|
||||
|
||||
interface TagManagerInterface {
|
||||
buildPayload: (input: { label?: string; color?: string | null }) => { label: string; color: string | null };
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { MutableRefObject, useCallback } from 'react';
|
||||
import type { NavigateFunction } from 'react-router-dom';
|
||||
import type { FolderId, TenantId } from '../../types/identifiers';
|
||||
|
||||
import { api, listTenants, switchTenant } from '../../lib/apiClient';
|
||||
import { api, listTenants, switchTenant } from '../../lib/api/apiClient';
|
||||
|
||||
interface TenantOption {
|
||||
id?: TenantId;
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { useEffect, useMemo } from 'react';
|
||||
import type { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
||||
import usePasskeys from '../../settings/usePasskeys';
|
||||
import TagManager from '../../tag_manager';
|
||||
import TagManager from '../../lib/assets/TagManager';
|
||||
import useCorrespondents from './useCorrespondents';
|
||||
import useDocumentCorrespondentActions from './useDocumentCorrespondentActions';
|
||||
import useTags from './useTags';
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import React, { type DragEvent } from 'react';
|
||||
import type { DocumentsViewProps } from '../panel/DocumentsPanel';
|
||||
import type { DocumentViewLogic } from './useDocumentViewLogic';
|
||||
import type { DocumentsViewProps } from '../../panel/DocumentsPanel';
|
||||
import type { DocumentViewLogic } from '../../logic/useDocumentViewLogic';
|
||||
|
||||
interface UseFolderItemLogicProps extends DocumentsViewProps {
|
||||
folder: any;
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { getFolderTree, listFolderContents } from '../../lib/apiClient';
|
||||
import { getFolderTree, listFolderContents } from '../../../lib/api/apiClient';
|
||||
import type { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
||||
import { createRootNode, DEFAULT_FOLDER_NAME } from '../../app/workspaceUtils';
|
||||
import { createRootNode, DEFAULT_FOLDER_NAME } from '../../../app/workspaceUtils';
|
||||
import {
|
||||
getEntryId,
|
||||
isDocumentEntry,
|
||||
isFolderEntry,
|
||||
createDocumentEntryKey,
|
||||
createFolderEntryKey,
|
||||
} from '../../app/entryKey';
|
||||
import type { FolderId as FolderIdentifier, Identifier } from '../../types/identifiers';
|
||||
import type { Document } from '../../types/documents';
|
||||
} from '../../../app/entryKey';
|
||||
import type { FolderId as FolderIdentifier, Identifier } from '../../../types/identifiers';
|
||||
import type { Document } from '../../../types/documents';
|
||||
|
||||
type FolderId = FolderIdentifier | 'root';
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import type { DragEvent } from 'react';
|
||||
import { DEFAULT_FOLDER_NAME, hasFiles } from '../../app/workspaceUtils';
|
||||
import { DEFAULT_FOLDER_NAME, hasFiles } from '../../../app/workspaceUtils';
|
||||
import {
|
||||
createFolder,
|
||||
deleteFolder,
|
||||
moveFolder as moveFolderRequest,
|
||||
renameFolder as renameFolderRequest,
|
||||
} from '../../lib/apiClient';
|
||||
import type { FolderId } from '../../types/identifiers';
|
||||
import type { MessageOptions } from '../../types/documents';
|
||||
} from '../../../lib/api/apiClient';
|
||||
import type { FolderId } from '../../../types/identifiers';
|
||||
import type { MessageOptions } from '../../../types/documents';
|
||||
|
||||
type FolderKey = FolderId | 'root';
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import React, { CSSProperties, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import useFloatingMenu from '../ui/useFloatingMenu';
|
||||
import { CheckIcon, CircleDashedCheckIcon, PlusIcon } from '../ui/icons';
|
||||
import useFloatingMenu from '../../../components/useFloatingMenu';
|
||||
import { CheckIcon, CircleDashedCheckIcon, PlusIcon } from '../../../components/icons';
|
||||
|
||||
type AssignmentState = 'all' | 'partial' | 'none';
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { DEFAULT_FOLDER_NAME } from '../constants/workspace';
|
||||
import { getFolderTree } from '../lib/apiClient';
|
||||
import { DEFAULT_FOLDER_NAME } from '../../../constants/workspace';
|
||||
import { getFolderTree } from '../../../lib/api/apiClient';
|
||||
import {
|
||||
TrashIcon,
|
||||
AnalyzeIcon,
|
||||
@@ -8,14 +8,14 @@ import {
|
||||
FolderOutlineIcon,
|
||||
TagIcon,
|
||||
CorrespondentIcon,
|
||||
} from '../ui/icons';
|
||||
} from '../../../components/icons';
|
||||
import SelectionAssignmentMenu, { SelectionAssignmentMenuItem } from './SelectionAssignmentMenu';
|
||||
import SelectionFolderMenu from './SelectionFolderMenu';
|
||||
import SelectionSummary from './SelectionSummary';
|
||||
import { useAppState } from '../app/appState';
|
||||
import { useWorkspaceSelectionContext } from '../app/WorkspaceSelectionContext';
|
||||
import type { DocumentId } from '../types/identifiers';
|
||||
import type { FolderTreeNode } from '../lib/apiTypes';
|
||||
import { useAppState } from '../../../lib/store/appState';
|
||||
import { useWorkspaceSelectionContext } from '../../../app/WorkspaceSelectionContext';
|
||||
import type { DocumentId } from '../../../types/identifiers';
|
||||
import type { FolderTreeNode } from '../../../lib/api/apiTypes';
|
||||
|
||||
type NullableDocumentId = DocumentId | null;
|
||||
|
||||
@@ -34,7 +34,7 @@ interface CorrespondentOption {
|
||||
label?: string;
|
||||
}
|
||||
|
||||
import type { Document } from '../types/documents';
|
||||
import type { Document } from '../../../types/documents';
|
||||
|
||||
interface BulkTagMutationArgs {
|
||||
label: string;
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
import React, { CSSProperties, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import useFloatingMenu from '../ui/useFloatingMenu';
|
||||
import useFloatingMenu from '../../../components/useFloatingMenu';
|
||||
import {
|
||||
ArrowLeftIcon,
|
||||
FolderIcon,
|
||||
FolderMoveIcon,
|
||||
} from '../ui/icons';
|
||||
import type { FolderTreeNode } from '../lib/apiTypes';
|
||||
import type { DocumentId } from '../types/identifiers';
|
||||
} from '../../../components/icons';
|
||||
import type { FolderTreeNode } from '../../../lib/api/apiTypes';
|
||||
import type { DocumentId } from '../../../types/identifiers';
|
||||
|
||||
interface SelectionFolderMenuProps {
|
||||
label: React.ReactNode;
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { FileIcon, FolderOutlineIcon } from '../ui/icons';
|
||||
import { FileIcon, FolderOutlineIcon } from '../../../components/icons';
|
||||
|
||||
interface SelectionSummaryProps {
|
||||
documentCount?: number;
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||
import type { Dispatch, SetStateAction } from 'react';
|
||||
import { createDocumentEntryKey, createFolderEntryKey, isFolderEntry } from '../../app/entryKey';
|
||||
import type { DocumentId, FolderId } from '../../types/identifiers';
|
||||
import { createDocumentEntryKey, createFolderEntryKey, isFolderEntry } from '../../../app/entryKey';
|
||||
import type { DocumentId, FolderId } from '../../../types/identifiers';
|
||||
|
||||
interface FolderEntry {
|
||||
id: FolderId;
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { useCallback } from 'react';
|
||||
import { createDocumentEntryKey, createFolderEntryKey } from '../app/entryKey';
|
||||
import { createDocumentEntryKey, createFolderEntryKey } from '../../../app/entryKey';
|
||||
|
||||
type PointerEventLike = MouseEvent | PointerEvent;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { useEffect } from 'react';
|
||||
import type { MutableRefObject } from 'react';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
import type { Identifier } from '../../../types/identifiers';
|
||||
|
||||
interface UseWorkspaceSelectionSyncArgs {
|
||||
showingSearchResults: boolean;
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import type { DocumentId, TagId } from '../types/identifiers';
|
||||
import { TAG_MIME_TYPES, TAG_TEXT_MIME_TYPE } from '../constants/documents';
|
||||
import type { DocumentId, TagId } from '../../../types/identifiers';
|
||||
import { TAG_MIME_TYPES, TAG_TEXT_MIME_TYPE } from '../../../constants/documents';
|
||||
|
||||
interface TagPayload {
|
||||
id: TagId;
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
import type { Identifier } from '../../../types/identifiers';
|
||||
|
||||
interface TagRecord {
|
||||
id?: Identifier;
|
||||
@@ -8,7 +8,7 @@ interface TagRecord {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
import { createTag, bulkTagDocuments, bulkReanalyzeDocuments } from '../../lib/apiClient';
|
||||
import { createTag, bulkTagDocuments, bulkReanalyzeDocuments } from '../../../lib/api/apiClient';
|
||||
|
||||
interface TagManager {
|
||||
buildPayload: (input: { label: string }) => Record<string, unknown>;
|
||||
+3
-3
@@ -1,12 +1,12 @@
|
||||
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||
import type { DragEvent } from 'react';
|
||||
import { createDocumentEntryKey, createFolderEntryKey } from '../../app/entryKey';
|
||||
import type { FolderId, Identifier } from '../../types/identifiers';
|
||||
import { createDocumentEntryKey, createFolderEntryKey } from '../../../app/entryKey';
|
||||
import type { FolderId, Identifier } from '../../../types/identifiers';
|
||||
|
||||
type FolderIdentifier = FolderId | 'root';
|
||||
type FolderInput = FolderIdentifier | number;
|
||||
|
||||
import type { Document } from '../../types/documents';
|
||||
import type { Document } from '../../../types/documents';
|
||||
|
||||
type ApplySelectionFn = (
|
||||
keys: string[],
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
import { useCallback, useRef, useState } from 'react';
|
||||
import type { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
||||
import useFileDrop from './useFileDrop';
|
||||
import { DEFAULT_FOLDER_NAME, hasFiles } from '../../app/workspaceUtils';
|
||||
import { fetchDocument, uploadDocument, resolveFolderPath } from '../../lib/apiClient';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
import { DEFAULT_FOLDER_NAME, hasFiles } from '../../../app/workspaceUtils';
|
||||
import { fetchDocument, uploadDocument, resolveFolderPath } from '../../../lib/api/apiClient';
|
||||
import type { Identifier } from '../../../types/identifiers';
|
||||
|
||||
type FolderId = Identifier | 'root' | null;
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import React, { type DragEvent } from 'react';
|
||||
import { parseTagTransferPayload } from '../tagTransfer';
|
||||
import { parseTagTransferPayload } from '../features/tagging/tagTransfer';
|
||||
import { createDocumentEntryKey } from '../../app/entryKey';
|
||||
import { useDocumentOpen } from '../../contexts/DocumentOpenContext';
|
||||
import { useDocumentOpen } from '../../lib/context/DocumentOpenContext';
|
||||
import type { Document } from '../../types/documents';
|
||||
import type { DocumentsViewProps } from '../panel/DocumentsPanel';
|
||||
import type { DocumentViewLogic } from './useDocumentViewLogic';
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useWorkspaceSelectionContext } from '../../app/WorkspaceSelectionContext';
|
||||
import useInlineRename from '../useInlineRename';
|
||||
import useInlineRename from '../features/renaming/useInlineRename';
|
||||
import type { Document, Folder } from '../../types/documents';
|
||||
|
||||
interface UseDocumentViewLogicProps {
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import React, { useCallback, useMemo } from 'react';
|
||||
import type { DocumentsListEntry } from '../../types/documents';
|
||||
import { useWorkspaceSelectionContext } from '../../app/WorkspaceSelectionContext';
|
||||
import { useDocumentOpen } from '../../contexts/DocumentOpenContext';
|
||||
import { useDocumentOpen } from '../../lib/context/DocumentOpenContext';
|
||||
|
||||
interface UseDocumentsNavigationProps {
|
||||
entries: DocumentsListEntry[];
|
||||
@@ -13,9 +13,9 @@ import type {
|
||||
Document,
|
||||
DocumentTag,
|
||||
} from '../../types/documents';
|
||||
import DesktopWorkspace from '../../desktop/DesktopWorkspace';
|
||||
import { isTagTransferEvent } from '../tagTransfer';
|
||||
import { isPointerModifierEvent, isPrimaryPointerEvent } from '../useEntryPointer';
|
||||
import DesktopWorkspace from '../../desktop/components/DesktopWorkspace';
|
||||
import { isTagTransferEvent } from '../features/tagging/tagTransfer';
|
||||
import { isPointerModifierEvent, isPrimaryPointerEvent } from '../features/selection/useEntryPointer';
|
||||
import {
|
||||
WorkspaceSelectionProvider,
|
||||
useWorkspaceSelectionContext,
|
||||
@@ -25,7 +25,7 @@ import DocumentsPanelHeader, {
|
||||
DocumentsPanelHeaderConfig,
|
||||
DocumentsHeaderBreadcrumb,
|
||||
} from './DocumentsPanelHeader';
|
||||
import { SelectionFloatingPanel } from '../SelectionFloatingActions';
|
||||
import { SelectionFloatingPanel } from '../features/selection/SelectionFloatingActions';
|
||||
import { createDocumentsTableHeaderActions } from './DocumentsToolbar';
|
||||
import { useDocumentsFilter } from '../context/DocumentsFilterContext';
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import type { ReactNode } from 'react';
|
||||
import PanelHeader from '../../ui/PanelHeader';
|
||||
import BreadcrumbTrail from '../../ui/BreadcrumbTrail';
|
||||
import PanelHeader from '../../components/PanelHeader';
|
||||
import BreadcrumbTrail from '../../components/BreadcrumbTrail';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
|
||||
export interface DocumentsHeaderBreadcrumb {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
FoldersOffIcon,
|
||||
SortAscendingLettersIcon,
|
||||
SortDescendingLettersIcon,
|
||||
} from '../../ui/icons';
|
||||
} from '../../components/icons';
|
||||
import SortFieldQuickMenu from './SortFieldQuickMenu';
|
||||
|
||||
type ViewMode = 'list' | 'grid' | 'desk' | (string & {});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useCallback, useMemo } from 'react';
|
||||
import { SORT_LABEL_LOOKUP, SORT_OPTIONS } from '../../constants/documents';
|
||||
import QuickAddMenu from '../../ui/QuickAddMenu';
|
||||
import QuickAddMenu from '../../components/QuickAddMenu';
|
||||
|
||||
interface SortFieldQuickMenuProps {
|
||||
sortField: string;
|
||||
|
||||
@@ -14,12 +14,12 @@ import DocumentsRoute from './app/DocumentsRoute';
|
||||
import DropOverlay from './app/DropOverlay';
|
||||
import LoginRoute from './app/LoginRoute';
|
||||
import SettingsRoute from './app/SettingsRoute';
|
||||
import { AppStateProvider } from './app/appState';
|
||||
import { AppStateProvider } from './lib/store/appState';
|
||||
import { useDocumentsPreferences } from './app/useDocumentsPreferences';
|
||||
import { AppShellContext } from './appShellContext';
|
||||
import useDocumentsWorkspace from './hooks/documents/useDocumentsWorkspace';
|
||||
import { AppShellContext } from './lib/context/AppShellContext';
|
||||
import useDocumentsWorkspace from './documents/data/useDocumentsWorkspace';
|
||||
import UploadQueueOverlay from './app/UploadQueueOverlay';
|
||||
import { StatusToastProvider } from './contexts/StatusToastContext';
|
||||
import { StatusToastProvider } from './lib/context/StatusToastContext';
|
||||
import StatusToastOverlay from './components/StatusToastOverlay';
|
||||
|
||||
const AppLayout: React.FC = () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Types aligned with OpenAPI schemas for common endpoints.
|
||||
import type { Identifier } from '../types/identifiers';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
|
||||
export type { Identifier };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Identifier } from './types/identifiers';
|
||||
import type { Asset } from './types/assets';
|
||||
import type { DocumentVersion, Document } from './types/documents';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
import type { Asset } from '../../types/assets';
|
||||
import type { DocumentVersion, Document } from '../../types/documents';
|
||||
|
||||
type Nullable<T> = T | null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { generateRandomTagColor } from './utils/colors';
|
||||
import { generateRandomTagColor } from '../../utils/colors';
|
||||
|
||||
type ColorGenerator = () => string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useEffect, useMemo } from 'react';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import { httpClient, setAuthToken, clearAuthToken } from '../lib/apiClient';
|
||||
import { createSafeContext } from '../utils/createSafeContext';
|
||||
import { httpClient, setAuthToken, clearAuthToken } from '../api/apiClient';
|
||||
import { createSafeContext } from '../../utils/createSafeContext';
|
||||
|
||||
type HttpClient = typeof httpClient;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createSafeContext } from './utils/createSafeContext';
|
||||
import { createSafeContext } from '../../utils/createSafeContext';
|
||||
|
||||
type AppShellContextValue = Record<string, unknown>;
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import React, { useCallback } from 'react';
|
||||
import type { Document } from '../types/documents';
|
||||
import type { Identifier } from '../types/identifiers';
|
||||
import { createSafeContext } from '../utils/createSafeContext';
|
||||
import type { Document } from '../../types/documents';
|
||||
import type { Identifier } from '../../types/identifiers';
|
||||
import { createSafeContext } from '../../utils/createSafeContext';
|
||||
|
||||
type DocumentOpenTarget = 'preview' | 'sidepanel' | 'viewer';
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import React, { useState, useCallback, useEffect, useRef } from 'react';
|
||||
import { createSafeContext } from '../utils/createSafeContext';
|
||||
import { createSafeContext } from '../../utils/createSafeContext';
|
||||
|
||||
export type ToastVariant = 'info' | 'success' | 'error';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, { useEffect, useMemo, useReducer } from 'react';
|
||||
import { createSafeContext } from '../utils/createSafeContext';
|
||||
import { clearAuthToken, setAuthToken, setAuthRefreshHandlers } from '../lib/apiClient';
|
||||
import { ApiProvider } from './ApiContext';
|
||||
import { listTenants } from '../lib/apiClient';
|
||||
import { STORED_TOKEN_KEY } from '../constants/app';
|
||||
import { createSafeContext } from '../../utils/createSafeContext';
|
||||
import { clearAuthToken, setAuthToken, setAuthRefreshHandlers } from '../api/apiClient';
|
||||
import { ApiProvider } from '../context/ApiContext';
|
||||
import { listTenants } from '../api/apiClient';
|
||||
import { STORED_TOKEN_KEY } from '../../constants/app';
|
||||
|
||||
type Tenant = Record<string, unknown> | null;
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
CloseIcon,
|
||||
IconZoomInArea,
|
||||
WindowMaximizeIcon,
|
||||
} from '../ui/icons';
|
||||
} from '../components/icons';
|
||||
import {
|
||||
buildCorrespondentOptions,
|
||||
sortCorrespondents,
|
||||
@@ -19,9 +19,9 @@ import { usePreviewContext } from '../preview/PreviewContext';
|
||||
import type { DocumentSummarySectionProps } from '../documents/DocumentSummarySection';
|
||||
import { extractDocumentMetadataPayload } from '../documents/documentSummary';
|
||||
import { createDocumentActionState } from '../documents/documentActions';
|
||||
import { resolveDocumentAssetUrl } from '../asset_manager';
|
||||
import PanelHeader from '../ui/PanelHeader';
|
||||
import BreadcrumbTrail from '../ui/BreadcrumbTrail';
|
||||
import { resolveDocumentAssetUrl } from '../lib/assets/AssetManager';
|
||||
import PanelHeader from '../components/PanelHeader';
|
||||
import BreadcrumbTrail from '../components/BreadcrumbTrail';
|
||||
import DocumentViewerLayout from './DocumentViewerLayout';
|
||||
import { useViewerLayoutMode } from './useViewerLayoutMode';
|
||||
import { usePanelResizeBindings } from '../app/PanelManagerContext';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { DownloadIcon } from '../ui/icons';
|
||||
import { DownloadIcon } from '../components/icons';
|
||||
import { AUDIO_EXTENSIONS, VIDEO_EXTENSIONS } from '../constants/preview';
|
||||
|
||||
interface MediaViewerProps {
|
||||
|
||||
@@ -5,8 +5,8 @@ import React, {
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react';
|
||||
import PanelHeader from '../ui/PanelHeader';
|
||||
import { CloseIcon } from '../ui/icons';
|
||||
import PanelHeader from '../components/PanelHeader';
|
||||
import { CloseIcon } from '../components/icons';
|
||||
import { DEFAULT_SETTINGS_SECTIONS } from '../constants/settings';
|
||||
|
||||
export interface SettingsSectionConfig {
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
useState,
|
||||
} from 'react';
|
||||
import type { JSX } from 'react';
|
||||
import { CheckIcon, ChevronDownIcon } from '../../ui/icons';
|
||||
import { CheckIcon, ChevronDownIcon } from '../../components/icons';
|
||||
import type { CapabilityValue } from '../../types/identifiers';
|
||||
|
||||
export interface CapabilityDropdownOption {
|
||||
|
||||
@@ -5,7 +5,7 @@ import React, {
|
||||
useMemo,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { IconX } from '../../ui/icons';
|
||||
import { IconX } from '../../components/icons';
|
||||
import CapabilityDropdown, { CapabilityDropdownOption } from '../components/CapabilityDropdown';
|
||||
import type { CapabilitySetId, CapabilityValue } from '../../types/identifiers';
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user