folder in summary
This commit is contained in:
@@ -25,11 +25,6 @@ interface FolderNode {
|
||||
parentId?: Identifier | 'root';
|
||||
}
|
||||
|
||||
type DocumentLink = {
|
||||
url?: string;
|
||||
contentType?: string | null;
|
||||
} | null;
|
||||
|
||||
interface UseDetailWorkspaceArgs {
|
||||
documents: DocumentLike[];
|
||||
selectionOrder: string[];
|
||||
@@ -39,7 +34,6 @@ interface UseDetailWorkspaceArgs {
|
||||
ensureFolderData: (folderId: Identifier | 'root', options?: { force?: boolean; includeDocuments?: boolean }) => Promise<void>;
|
||||
detailPanelControlRef: MutableRefObject<{ open?: (args?: { documentIds?: Identifier[] }) => void; close?: () => void } | null>;
|
||||
detailFolderFetchRef: MutableRefObject<Set<Identifier | 'root'>>;
|
||||
documentLinks: Map<Identifier, DocumentLink>;
|
||||
previewDocumentId?: Identifier | null;
|
||||
activePreviewId?: Identifier | null;
|
||||
openDocumentPreview?: (args: { documentIds: Identifier[] }) => void;
|
||||
@@ -67,7 +61,6 @@ interface UseDetailWorkspaceResult {
|
||||
inspectDocument: (docId: Identifier | null) => void;
|
||||
previewActive: boolean;
|
||||
previewWorkspaceDocument: DocumentLike | null;
|
||||
documentLink: DocumentLink;
|
||||
resolveThumbnailUrlForDoc: (doc: DocumentLike | null) => string | null;
|
||||
resolveFolderPath: (folderId?: Identifier | 'root') => Array<{ id: Identifier | 'root'; name: string }>;
|
||||
}
|
||||
@@ -81,7 +74,6 @@ const useDetailWorkspace = ({
|
||||
ensureFolderData,
|
||||
detailPanelControlRef,
|
||||
detailFolderFetchRef,
|
||||
documentLinks,
|
||||
previewDocumentId,
|
||||
activePreviewId,
|
||||
openDocumentPreview,
|
||||
@@ -239,11 +231,6 @@ const useDetailWorkspace = ({
|
||||
[folderNodes],
|
||||
);
|
||||
|
||||
const documentLink = useMemo(
|
||||
() => (detailPanelDocument ? documentLinks.get(detailPanelDocument.id) || null : null),
|
||||
[detailPanelDocument, documentLinks],
|
||||
);
|
||||
|
||||
const previewWorkspaceDocument = useMemo(() => {
|
||||
if (!previewDocumentId) {
|
||||
return null;
|
||||
@@ -285,7 +272,6 @@ const useDetailWorkspace = ({
|
||||
tagLookupById,
|
||||
onTagAdd: handleDocumentTagAdd,
|
||||
onTagRemove: handleTagRemove,
|
||||
documentLink,
|
||||
onOpenPreview: openDocumentPreview,
|
||||
activePreviewId,
|
||||
onUpdateTitle: handleDocumentTitleUpdate,
|
||||
@@ -299,6 +285,8 @@ const useDetailWorkspace = ({
|
||||
onFolderNavigate: selectFolder,
|
||||
onClose: handleDetailPanelClose,
|
||||
resolveFolderPath,
|
||||
folderNodes,
|
||||
ensureFolderData,
|
||||
}),
|
||||
[
|
||||
activePreviewId,
|
||||
@@ -313,11 +301,12 @@ const useDetailWorkspace = ({
|
||||
handleDocumentIssuedUpdate,
|
||||
handleDocumentTitleUpdate,
|
||||
handleTagRemove,
|
||||
folderNodes,
|
||||
ensureFolderData,
|
||||
openDocumentPreview,
|
||||
resolveApiPath,
|
||||
resolveFolderPath,
|
||||
selectFolder,
|
||||
documentLink,
|
||||
tags,
|
||||
tagLookupById,
|
||||
],
|
||||
@@ -332,7 +321,6 @@ const useDetailWorkspace = ({
|
||||
inspectDocument,
|
||||
previewActive,
|
||||
previewWorkspaceDocument,
|
||||
documentLink,
|
||||
resolveThumbnailUrlForDoc,
|
||||
resolveFolderPath,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user