@burdenoff/microfe-files 2026.1023.1 → 2026.1108.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +1 -2
- package/dist/dev/main.d.ts +0 -1
- package/dist/files/FilesRoot.d.ts +0 -1
- package/dist/files/FilesRoot.js +5 -6
- package/dist/files/FilesRoutes.d.ts +0 -1
- package/dist/files/FilesRoutes.js +10 -11
- package/dist/files/components/ActionMenu.d.ts +0 -1
- package/dist/files/components/ActionMenu.js +1 -2
- package/dist/files/components/ConfirmDialog.d.ts +0 -1
- package/dist/files/components/ConfirmDialog.js +1 -2
- package/dist/files/components/ContextMenu.d.ts +0 -1
- package/dist/files/components/ContextMenu.js +1 -2
- package/dist/files/components/CopyDialog.d.ts +0 -1
- package/dist/files/components/CopyDialog.js +21 -22
- package/dist/files/components/CopyDialog.js.map +1 -1
- package/dist/files/components/EmptyState.d.ts +0 -1
- package/dist/files/components/EmptyState.js +1 -2
- package/dist/files/components/FileBrowser.d.ts +0 -1
- package/dist/files/components/FileBrowser.js +220 -221
- package/dist/files/components/FileBrowser.js.map +1 -1
- package/dist/files/components/FileCard.d.ts +0 -1
- package/dist/files/components/FileCard.js +40 -41
- package/dist/files/components/FileCard.js.map +1 -1
- package/dist/files/components/FileInfoPanel.d.ts +0 -1
- package/dist/files/components/FileInfoPanel.js +1 -2
- package/dist/files/components/FileListItem.d.ts +0 -1
- package/dist/files/components/FileListItem.js +148 -149
- package/dist/files/components/FileListItem.js.map +1 -1
- package/dist/files/components/FilePreviewModal.d.ts +0 -1
- package/dist/files/components/FilePreviewModal.js +1 -2
- package/dist/files/components/FileVersionPanel.d.ts +0 -1
- package/dist/files/components/FileVersionPanel.js +54 -55
- package/dist/files/components/FolderCard.d.ts +0 -1
- package/dist/files/components/FolderCard.js +29 -30
- package/dist/files/components/FolderCard.js.map +1 -1
- package/dist/files/components/MoveDialog.d.ts +0 -1
- package/dist/files/components/MoveDialog.js +19 -20
- package/dist/files/components/SearchBar.d.ts +0 -1
- package/dist/files/components/SearchBar.js +1 -2
- package/dist/files/components/ShareDialog.d.ts +0 -1
- package/dist/files/components/ShareDialog.js +1 -2
- package/dist/files/components/StorageBanner.d.ts +0 -1
- package/dist/files/components/StorageBanner.js +1 -2
- package/dist/files/components/TabBar.d.ts +0 -1
- package/dist/files/components/TabBar.js +1 -2
- package/dist/files/components/Toast.d.ts +0 -1
- package/dist/files/components/Toast.js +1 -2
- package/dist/files/components/UploadQueue.d.ts +0 -1
- package/dist/files/components/UploadQueue.js +1 -2
- package/dist/files/components/actionMenuPosition.d.ts +0 -1
- package/dist/files/components/actionMenuPosition.js +1 -2
- package/dist/files/components/contextMenuItems.d.ts +0 -1
- package/dist/files/components/contextMenuItems.js +1 -2
- package/dist/files/components/viewers/AudioPlayer.d.ts +0 -1
- package/dist/files/components/viewers/AudioPlayer.js +1 -2
- package/dist/files/components/viewers/CodeViewer.d.ts +0 -1
- package/dist/files/components/viewers/CodeViewer.js +1 -2
- package/dist/files/components/viewers/ImageViewer.d.ts +0 -1
- package/dist/files/components/viewers/ImageViewer.js +1 -2
- package/dist/files/components/viewers/PDFViewer.d.ts +0 -1
- package/dist/files/components/viewers/PDFViewer.js +1 -2
- package/dist/files/components/viewers/TextViewer.d.ts +0 -1
- package/dist/files/components/viewers/TextViewer.js +1 -2
- package/dist/files/components/viewers/VideoPlayer.d.ts +0 -1
- package/dist/files/components/viewers/VideoPlayer.js +1 -2
- package/dist/files/graphql-types.d.ts +0 -1
- package/dist/files/hooks/useBatchOperations.d.ts +0 -1
- package/dist/files/hooks/useBatchOperations.js +1 -2
- package/dist/files/hooks/useBinItems.d.ts +0 -1
- package/dist/files/hooks/useBinItems.js +1 -2
- package/dist/files/hooks/useBrowsePage.d.ts +0 -1
- package/dist/files/hooks/useBrowsePage.js +1 -2
- package/dist/files/hooks/useCopyFile.d.ts +0 -1
- package/dist/files/hooks/useCopyFile.js +1 -2
- package/dist/files/hooks/useCreateFolder.d.ts +0 -1
- package/dist/files/hooks/useCreateFolder.js +8 -9
- package/dist/files/hooks/useCreateFolderShare.d.ts +7 -21
- package/dist/files/hooks/useCreateFolderShare.js +49 -23
- package/dist/files/hooks/useCreateFolderShare.js.map +1 -1
- package/dist/files/hooks/useCreateShare.d.ts +18 -20
- package/dist/files/hooks/useCreateShare.js +52 -24
- package/dist/files/hooks/useCreateShare.js.map +1 -1
- package/dist/files/hooks/useDeleteFile.d.ts +0 -1
- package/dist/files/hooks/useDeleteFile.js +1 -2
- package/dist/files/hooks/useDeleteFolder.d.ts +0 -1
- package/dist/files/hooks/useDeleteFolder.js +1 -2
- package/dist/files/hooks/useDragDrop.d.ts +0 -1
- package/dist/files/hooks/useDragDrop.js +1 -2
- package/dist/files/hooks/useFileVersions.d.ts +0 -1
- package/dist/files/hooks/useFileVersions.js +1 -2
- package/dist/files/hooks/useFoldersQuery.d.ts +0 -1
- package/dist/files/hooks/useFoldersQuery.js +1 -2
- package/dist/files/hooks/useKeyboardNavigation.d.ts +0 -1
- package/dist/files/hooks/useKeyboardNavigation.js +1 -2
- package/dist/files/hooks/useMoveFile.d.ts +0 -1
- package/dist/files/hooks/useMoveFile.js +1 -2
- package/dist/files/hooks/useMoveFolder.d.ts +0 -1
- package/dist/files/hooks/useMoveFolder.js +1 -2
- package/dist/files/hooks/usePermanentlyDeleteFile.d.ts +0 -1
- package/dist/files/hooks/usePermanentlyDeleteFile.js +1 -2
- package/dist/files/hooks/usePermanentlyDeleteFolder.d.ts +0 -1
- package/dist/files/hooks/usePermanentlyDeleteFolder.js +1 -2
- package/dist/files/hooks/useRecentFiles.d.ts +0 -1
- package/dist/files/hooks/useRecentFiles.js +1 -2
- package/dist/files/hooks/useRenameFile.d.ts +0 -1
- package/dist/files/hooks/useRenameFile.js +1 -2
- package/dist/files/hooks/useRenameFolder.d.ts +0 -1
- package/dist/files/hooks/useRenameFolder.js +1 -2
- package/dist/files/hooks/useRestoreFile.d.ts +0 -1
- package/dist/files/hooks/useRestoreFile.js +1 -2
- package/dist/files/hooks/useRestoreFolder.d.ts +0 -1
- package/dist/files/hooks/useRestoreFolder.js +1 -2
- package/dist/files/hooks/useSearch.d.ts +0 -1
- package/dist/files/hooks/useSearch.js +7 -8
- package/dist/files/hooks/useStarredItems.d.ts +0 -1
- package/dist/files/hooks/useStarredItems.js +1 -2
- package/dist/files/hooks/useStorageQuota.d.ts +0 -1
- package/dist/files/hooks/useStorageQuota.js +1 -2
- package/dist/files/hooks/useToast.d.ts +0 -1
- package/dist/files/hooks/useToast.js +1 -2
- package/dist/files/hooks/useToggleStar.d.ts +0 -1
- package/dist/files/hooks/useToggleStar.js +1 -2
- package/dist/files/hooks/useUploadFile.d.ts +0 -1
- package/dist/files/hooks/useUploadFile.js +4 -5
- package/dist/files/hooks/useUploadQueueState.d.ts +0 -1
- package/dist/files/hooks/useUploadQueueState.js +1 -2
- package/dist/files/index.d.ts +0 -1
- package/dist/files/index.js +4 -4
- package/dist/files/pages/BrowserPage.d.ts +0 -1
- package/dist/files/pages/BrowserPage.js +470 -471
- package/dist/files/pages/BrowserPage.js.map +1 -1
- package/dist/files/pages/ShareAccessPage.d.ts +0 -1
- package/dist/files/pages/ShareAccessPage.js +26 -27
- package/dist/files/pages/ShareAccessPage.js.map +1 -1
- package/dist/files/providers/FilesProvider.d.ts +0 -1
- package/dist/files/providers/FilesProvider.js +1 -2
- package/dist/files/store/filesStore.d.ts +0 -1
- package/dist/files/store/filesStore.js +1 -2
- package/dist/files/types.d.ts +0 -1
- package/dist/files/utils/events.d.ts +0 -1
- package/dist/files/utils/events.js +1 -2
- package/dist/files/utils/fileViewModel.d.ts +0 -1
- package/dist/files/utils/fileViewModel.js +1 -2
- package/dist/files/utils/i18n.d.ts +0 -1
- package/dist/files/utils/i18n.js +1 -2
- package/dist/files/utils/index.d.ts +0 -1
- package/dist/files/utils/index.js +1 -2
- package/dist/files/utils/quotaUtils.d.ts +0 -1
- package/dist/files/utils/thumbnail.d.ts +0 -1
- package/dist/files/utils/thumbnail.js +1 -2
- package/dist/files/utils/uploadDigest.d.ts +0 -1
- package/dist/files/utils/uploadDigest.js +1 -2
- package/dist/files.js +3 -3
- package/dist/generated/global-operations.d.ts +0 -1
- package/dist/generated/global-types.d.ts +0 -1
- package/dist/generated/wspace-operations.d.ts +61 -211
- package/dist/generated/wspace-operations.js +676 -404
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +12 -1
- package/dist/generated/wspace-types.js +4 -9
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/shared/hooks/useTr.d.ts +0 -1
- package/dist/shared/hooks/useTr.js +1 -2
- package/dist/shared/types/index.d.ts +0 -1
- package/dist/test/happydom.d.ts +1 -0
- package/dist/translations/en.d.ts +0 -1
- package/dist/translations/en.js +1 -2
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/package.json +64 -46
- package/src/styles/dark.css +1 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/files/FilesRoot.d.ts.map +0 -1
- package/dist/files/FilesRoutes.d.ts.map +0 -1
- package/dist/files/components/ActionMenu.d.ts.map +0 -1
- package/dist/files/components/ConfirmDialog.d.ts.map +0 -1
- package/dist/files/components/ContextMenu.d.ts.map +0 -1
- package/dist/files/components/CopyDialog.d.ts.map +0 -1
- package/dist/files/components/EmptyState.d.ts.map +0 -1
- package/dist/files/components/FileBrowser.d.ts.map +0 -1
- package/dist/files/components/FileCard.d.ts.map +0 -1
- package/dist/files/components/FileInfoPanel.d.ts.map +0 -1
- package/dist/files/components/FileListItem.d.ts.map +0 -1
- package/dist/files/components/FilePreviewModal.d.ts.map +0 -1
- package/dist/files/components/FileVersionPanel.d.ts.map +0 -1
- package/dist/files/components/FolderCard.d.ts.map +0 -1
- package/dist/files/components/MoveDialog.d.ts.map +0 -1
- package/dist/files/components/SearchBar.d.ts.map +0 -1
- package/dist/files/components/ShareDialog.d.ts.map +0 -1
- package/dist/files/components/StorageBanner.d.ts.map +0 -1
- package/dist/files/components/TabBar.d.ts.map +0 -1
- package/dist/files/components/Toast.d.ts.map +0 -1
- package/dist/files/components/UploadQueue.d.ts.map +0 -1
- package/dist/files/components/actionMenuPosition.d.ts.map +0 -1
- package/dist/files/components/contextMenuItems.d.ts.map +0 -1
- package/dist/files/components/viewers/AudioPlayer.d.ts.map +0 -1
- package/dist/files/components/viewers/CodeViewer.d.ts.map +0 -1
- package/dist/files/components/viewers/ImageViewer.d.ts.map +0 -1
- package/dist/files/components/viewers/PDFViewer.d.ts.map +0 -1
- package/dist/files/components/viewers/TextViewer.d.ts.map +0 -1
- package/dist/files/components/viewers/VideoPlayer.d.ts.map +0 -1
- package/dist/files/graphql-types.d.ts.map +0 -1
- package/dist/files/hooks/useBatchOperations.d.ts.map +0 -1
- package/dist/files/hooks/useBinItems.d.ts.map +0 -1
- package/dist/files/hooks/useBrowsePage.d.ts.map +0 -1
- package/dist/files/hooks/useCopyFile.d.ts.map +0 -1
- package/dist/files/hooks/useCreateFolder.d.ts.map +0 -1
- package/dist/files/hooks/useCreateFolderShare.d.ts.map +0 -1
- package/dist/files/hooks/useCreateShare.d.ts.map +0 -1
- package/dist/files/hooks/useDeleteFile.d.ts.map +0 -1
- package/dist/files/hooks/useDeleteFolder.d.ts.map +0 -1
- package/dist/files/hooks/useDragDrop.d.ts.map +0 -1
- package/dist/files/hooks/useFileVersions.d.ts.map +0 -1
- package/dist/files/hooks/useFoldersQuery.d.ts.map +0 -1
- package/dist/files/hooks/useKeyboardNavigation.d.ts.map +0 -1
- package/dist/files/hooks/useMoveFile.d.ts.map +0 -1
- package/dist/files/hooks/useMoveFolder.d.ts.map +0 -1
- package/dist/files/hooks/usePermanentlyDeleteFile.d.ts.map +0 -1
- package/dist/files/hooks/usePermanentlyDeleteFolder.d.ts.map +0 -1
- package/dist/files/hooks/useRecentFiles.d.ts.map +0 -1
- package/dist/files/hooks/useRenameFile.d.ts.map +0 -1
- package/dist/files/hooks/useRenameFolder.d.ts.map +0 -1
- package/dist/files/hooks/useRestoreFile.d.ts.map +0 -1
- package/dist/files/hooks/useRestoreFolder.d.ts.map +0 -1
- package/dist/files/hooks/useSearch.d.ts.map +0 -1
- package/dist/files/hooks/useStarredItems.d.ts.map +0 -1
- package/dist/files/hooks/useStorageQuota.d.ts.map +0 -1
- package/dist/files/hooks/useToast.d.ts.map +0 -1
- package/dist/files/hooks/useToggleStar.d.ts.map +0 -1
- package/dist/files/hooks/useUploadFile.d.ts.map +0 -1
- package/dist/files/hooks/useUploadQueueState.d.ts.map +0 -1
- package/dist/files/index.d.ts.map +0 -1
- package/dist/files/pages/BrowserPage.d.ts.map +0 -1
- package/dist/files/pages/ShareAccessPage.d.ts.map +0 -1
- package/dist/files/providers/FilesProvider.d.ts.map +0 -1
- package/dist/files/store/filesStore.d.ts.map +0 -1
- package/dist/files/types.d.ts.map +0 -1
- package/dist/files/utils/events.d.ts.map +0 -1
- package/dist/files/utils/fileViewModel.d.ts.map +0 -1
- package/dist/files/utils/i18n.d.ts.map +0 -1
- package/dist/files/utils/index.d.ts.map +0 -1
- package/dist/files/utils/quotaUtils.d.ts.map +0 -1
- package/dist/files/utils/thumbnail.d.ts.map +0 -1
- package/dist/files/utils/uploadDigest.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/shared/hooks/useTr.d.ts.map +0 -1
- package/dist/shared/types/index.d.ts.map +0 -1
- package/dist/translations/en.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -1,29 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CreateFolderShareLinkDocument as e, ShareFolderDocument as t } from "../../generated/wspace-operations.js";
|
|
2
|
+
import { extractShareToken as n } from "./useCreateShare.js";
|
|
3
3
|
import { useMutation as r } from "@apollo/client/react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
// src/files/hooks/useCreateFolderShare.ts
|
|
5
|
+
function i(e) {
|
|
6
|
+
switch (e) {
|
|
7
|
+
case "COMMENT": return "COMMENTER";
|
|
8
|
+
case "EDIT": return "EDITOR";
|
|
9
|
+
default: return "VIEWER";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
var a = () => {
|
|
13
|
+
let [a, { loading: o, error: s }] = r(t), [c, { loading: l, error: u }] = r(e);
|
|
7
14
|
return {
|
|
8
|
-
mutateAsync: async (e) =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
mutateAsync: async (e) => {
|
|
16
|
+
let t = e.accessLevel.toUpperCase();
|
|
17
|
+
if (e.shareType === "PUBLIC_LINK") {
|
|
18
|
+
let r = {
|
|
19
|
+
input: {
|
|
20
|
+
resourceId: e.folderId,
|
|
21
|
+
role: i(e.accessLevel),
|
|
22
|
+
expiresAt: e.expiresAt ?? null
|
|
23
|
+
},
|
|
24
|
+
options: {
|
|
25
|
+
password: e.password ?? null,
|
|
26
|
+
maxDownloads: e.maxDownloads ?? null,
|
|
27
|
+
accessLevel: t
|
|
28
|
+
}
|
|
29
|
+
}, a = await c({ variables: r });
|
|
30
|
+
return { token: n(a.data?.createFolderShareLink.shareUrl ?? "") };
|
|
31
|
+
}
|
|
32
|
+
if (e.shareType !== "EMAIL_INVITE" || !e.invitedEmail) throw Error("Email invite shares require an invitedEmail");
|
|
33
|
+
let r = {
|
|
34
|
+
input: {
|
|
35
|
+
resourceId: e.folderId,
|
|
36
|
+
email: e.invitedEmail,
|
|
37
|
+
role: i(e.accessLevel),
|
|
38
|
+
message: null,
|
|
39
|
+
expiresAt: e.expiresAt ?? null
|
|
40
|
+
},
|
|
41
|
+
options: {
|
|
42
|
+
password: e.password ?? null,
|
|
43
|
+
maxDownloads: e.maxDownloads ?? null,
|
|
44
|
+
accessLevel: t
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return await a({ variables: r }), { token: "" };
|
|
48
|
+
},
|
|
49
|
+
isPending: o || l,
|
|
50
|
+
error: s ?? u
|
|
24
51
|
};
|
|
25
52
|
};
|
|
26
|
-
|
|
27
|
-
export { i as useCreateFolderShare };
|
|
53
|
+
export { a as useCreateFolderShare };
|
|
28
54
|
|
|
29
55
|
//# sourceMappingURL=useCreateFolderShare.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateFolderShare.js","names":["useCreateFolderShare","
|
|
1
|
+
{"version":3,"file":"useCreateFolderShare.js","names":["toShareRole","accessLevel","useCreateFolderShare","shareFolderMutation","inviteLoading","inviteError","useMutation","ShareFolderDocument","createLinkMutation","linkLoading","linkError","CreateFolderShareLinkDocument","input","variables","result","extractShareToken"],"sources":["../../../src/files/hooks/useCreateFolderShare.ts"],"sourcesContent":["import { useMutation } from \"@apollo/client/react\";\n\nimport {\n CreateFolderShareLinkDocument,\n ShareFolderDocument,\n} from \"../../generated/wspace-operations\";\nimport type {\n FileShareAccessLevel,\n ShareRole,\n} from \"../../generated/wspace-types\";\nimport type {\n CreateFolderShareLinkMutationVariables,\n ShareFolderMutationVariables,\n} from \"../../generated/wspace-operations\";\nimport { extractShareToken, type ShareCreationResult } from \"./useCreateShare\";\n\nexport interface CreateFolderShareInput {\n folderId: string;\n shareType: \"PUBLIC_LINK\" | \"EMAIL_INVITE\" | \"GROUP_SHARE\";\n accessLevel: \"VIEW\" | \"COMMENT\" | \"DOWNLOAD\" | \"EDIT\";\n expiresAt?: string;\n password?: string;\n maxDownloads?: number;\n invitedEmail?: string;\n invitedUserIds?: string[];\n}\n\n/** Generic ShareRole for the legacy access levels (DOWNLOAD has no dedicated role). */\nfunction toShareRole(\n accessLevel: CreateFolderShareInput[\"accessLevel\"],\n): ShareRole {\n switch (accessLevel) {\n case \"COMMENT\":\n return \"COMMENTER\" as ShareRole;\n case \"EDIT\":\n return \"EDITOR\" as ShareRole;\n default:\n return \"VIEWER\" as ShareRole;\n }\n}\n\n/**\n * Create a folder share through the consolidated ShareGrant stack (BOFF-5302).\n * Same cutover as useCreateShare: public links become PUBLIC_LINK grants,\n * email invites become PENDING grants + accept email.\n */\nexport const useCreateFolderShare = () => {\n const [shareFolderMutation, { loading: inviteLoading, error: inviteError }] =\n useMutation(ShareFolderDocument);\n const [createLinkMutation, { loading: linkLoading, error: linkError }] =\n useMutation(CreateFolderShareLinkDocument);\n\n const loading = inviteLoading || linkLoading;\n const error = inviteError ?? linkError;\n\n return {\n mutateAsync: async (\n input: CreateFolderShareInput,\n ): Promise<ShareCreationResult> => {\n const accessLevel = input.accessLevel.toUpperCase() as\n \"VIEW\" | \"COMMENT\" | \"DOWNLOAD\" | \"EDIT\";\n if (input.shareType === \"PUBLIC_LINK\") {\n const variables: CreateFolderShareLinkMutationVariables = {\n input: {\n resourceId: input.folderId,\n role: toShareRole(input.accessLevel),\n expiresAt: input.expiresAt ?? null,\n },\n options: {\n password: input.password ?? null,\n maxDownloads: input.maxDownloads ?? null,\n accessLevel: accessLevel as unknown as FileShareAccessLevel,\n },\n };\n const result = await createLinkMutation({ variables });\n return {\n token: extractShareToken(\n result.data?.createFolderShareLink.shareUrl ?? \"\",\n ),\n };\n }\n\n if (input.shareType !== \"EMAIL_INVITE\" || !input.invitedEmail) {\n throw new Error(\"Email invite shares require an invitedEmail\");\n }\n\n const variables: ShareFolderMutationVariables = {\n input: {\n resourceId: input.folderId,\n email: input.invitedEmail,\n role: toShareRole(input.accessLevel),\n message: null,\n expiresAt: input.expiresAt ?? null,\n },\n options: {\n password: input.password ?? null,\n maxDownloads: input.maxDownloads ?? null,\n accessLevel: accessLevel as unknown as FileShareAccessLevel,\n },\n };\n await shareFolderMutation({ variables });\n return { token: \"\" };\n },\n isPending: loading,\n error,\n };\n};\n"],"mappings":";;;;AA4BA,SAASA,EACP,GACW;CACX,QAAQC,GAAR;EACE,KAAK,WACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,SACE,OAAO;CACX;AACF;AAOA,IAAaC,UAA6B;CACxC,IAAM,CAACC,GAAqB,EAAE,SAASC,GAAe,OAAOC,OAC3DC,EAAYC,CAAmB,GAC3B,CAACC,GAAoB,EAAE,SAASC,GAAa,OAAOC,OACxDJ,EAAYK,CAA6B;CAK3C,OAAO;EACL,aAAa,OACX,MACiC;GACjC,IAAMV,IAAcW,EAAM,YAAY,YAAY;GAElD,IAAIA,EAAM,cAAc,eAAe;IACrC,IAAMC,IAAoD;KACxD,OAAO;MACL,YAAYD,EAAM;MAClB,MAAMZ,EAAYY,EAAM,WAAW;MACnC,WAAWA,EAAM,aAAa;KAChC;KACA,SAAS;MACP,UAAUA,EAAM,YAAY;MAC5B,cAAcA,EAAM,gBAAgB;MACvB;KACf;IACF,GACME,IAAS,MAAMN,EAAmB,EAAE,aAAU,CAAC;IACrD,OAAO,EACL,OAAOO,EACLD,EAAO,MAAM,sBAAsB,YAAY,EACjD,EACF;GACF;GAEA,IAAIF,EAAM,cAAc,kBAAkB,CAACA,EAAM,cAC/C,MAAU,MAAM,6CAA6C;GAG/D,IAAMC,IAA0C;IAC9C,OAAO;KACL,YAAYD,EAAM;KAClB,OAAOA,EAAM;KACb,MAAMZ,EAAYY,EAAM,WAAW;KACnC,SAAS;KACT,WAAWA,EAAM,aAAa;IAChC;IACA,SAAS;KACP,UAAUA,EAAM,YAAY;KAC5B,cAAcA,EAAM,gBAAgB;KACvB;IACf;GACF;GAEA,OADA,MAAMT,EAAoB,EAAE,aAAU,CAAC,GAChC,EAAE,OAAO,GAAG;EACrB;EACA,WAnDcC,KAAiBK;EAoD/B,OAnDYJ,KAAeK;CAoD7B;AACF"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FileShareAccessLevel, FileShareType } from '../../generated/wspace-types';
|
|
2
1
|
export interface CreateShareInput {
|
|
3
2
|
fileId: string;
|
|
4
3
|
shareType: "PUBLIC_LINK" | "EMAIL_INVITE" | "GROUP_SHARE";
|
|
@@ -9,26 +8,25 @@ export interface CreateShareInput {
|
|
|
9
8
|
invitedEmail?: string;
|
|
10
9
|
invitedUserIds?: string[];
|
|
11
10
|
}
|
|
11
|
+
export interface ShareCreationResult {
|
|
12
|
+
/** Raw share token (public links only) — drives the `/files/share/:token` URL. */
|
|
13
|
+
token: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Extract the raw share token from a grant `shareUrl`
|
|
17
|
+
* (`{origin}/share/accept/{token}`). Falls back to the trimmed whole string
|
|
18
|
+
* when no path segment is present.
|
|
19
|
+
*/
|
|
20
|
+
export declare function extractShareToken(shareUrl: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Create a file share through the consolidated ShareGrant stack (BOFF-5302).
|
|
23
|
+
* Public links become PUBLIC_LINK grants; email invites become PENDING
|
|
24
|
+
* grants + a `resource-shared` accept email from the service. The legacy
|
|
25
|
+
* access level is preserved on the grant so the token-access path keeps
|
|
26
|
+
* issuing download URLs for DOWNLOAD shares.
|
|
27
|
+
*/
|
|
12
28
|
export declare const useCreateShare: () => {
|
|
13
|
-
mutateAsync: (input: CreateShareInput) => Promise<
|
|
14
|
-
id: string;
|
|
15
|
-
fileId: string;
|
|
16
|
-
shareType: FileShareType;
|
|
17
|
-
accessLevel: FileShareAccessLevel;
|
|
18
|
-
token: string | null;
|
|
19
|
-
invitedEmail: string | null;
|
|
20
|
-
requiresPassword: boolean;
|
|
21
|
-
expiresAt: string | null;
|
|
22
|
-
maxDownloads: number | null;
|
|
23
|
-
accessCount: number;
|
|
24
|
-
downloadCount: number;
|
|
25
|
-
lastAccessedAt: string | null;
|
|
26
|
-
revokedAt: string | null;
|
|
27
|
-
createdById: string;
|
|
28
|
-
createdAt: string;
|
|
29
|
-
updatedAt: string;
|
|
30
|
-
} | undefined>;
|
|
29
|
+
mutateAsync: (input: CreateShareInput) => Promise<ShareCreationResult>;
|
|
31
30
|
isPending: boolean;
|
|
32
31
|
error: import('@apollo/client').ErrorLike | undefined;
|
|
33
32
|
};
|
|
34
|
-
//# sourceMappingURL=useCreateShare.d.ts.map
|
|
@@ -1,29 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { CreateFileShareLinkDocument as e, ShareFileDocument as t } from "../../generated/wspace-operations.js";
|
|
2
|
+
import { useMutation as n } from "@apollo/client/react";
|
|
3
|
+
// src/files/hooks/useCreateShare.ts
|
|
4
|
+
function r(e) {
|
|
5
|
+
switch (e) {
|
|
6
|
+
case "COMMENT": return "COMMENTER";
|
|
7
|
+
case "EDIT": return "EDITOR";
|
|
8
|
+
default: return "VIEWER";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function i(e) {
|
|
12
|
+
return (e.match(/\/share\/accept\/([^/?#]+)$/)?.[1] ?? e).trim();
|
|
13
|
+
}
|
|
14
|
+
var a = () => {
|
|
15
|
+
let [a, { loading: o, error: s }] = n(t), [c, { loading: l, error: u }] = n(e);
|
|
7
16
|
return {
|
|
8
|
-
mutateAsync: async (e) =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
mutateAsync: async (e) => {
|
|
18
|
+
let t = e.accessLevel.toUpperCase();
|
|
19
|
+
if (e.shareType === "PUBLIC_LINK") {
|
|
20
|
+
let n = {
|
|
21
|
+
input: {
|
|
22
|
+
resourceId: e.fileId,
|
|
23
|
+
role: r(e.accessLevel),
|
|
24
|
+
expiresAt: e.expiresAt ?? null
|
|
25
|
+
},
|
|
26
|
+
options: {
|
|
27
|
+
password: e.password ?? null,
|
|
28
|
+
maxDownloads: e.maxDownloads ?? null,
|
|
29
|
+
accessLevel: t
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return { token: i((await c({ variables: n })).data?.createFileShareLink.shareUrl ?? "") };
|
|
33
|
+
}
|
|
34
|
+
if (e.shareType !== "EMAIL_INVITE" || !e.invitedEmail) throw Error("Email invite shares require an invitedEmail");
|
|
35
|
+
let n = {
|
|
36
|
+
input: {
|
|
37
|
+
resourceId: e.fileId,
|
|
38
|
+
email: e.invitedEmail,
|
|
39
|
+
role: r(e.accessLevel),
|
|
40
|
+
message: null,
|
|
41
|
+
expiresAt: e.expiresAt ?? null
|
|
42
|
+
},
|
|
43
|
+
options: {
|
|
44
|
+
password: e.password ?? null,
|
|
45
|
+
maxDownloads: e.maxDownloads ?? null,
|
|
46
|
+
accessLevel: t
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
return await a({ variables: n }), { token: "" };
|
|
50
|
+
},
|
|
51
|
+
isPending: o || l,
|
|
52
|
+
error: s ?? u
|
|
24
53
|
};
|
|
25
54
|
};
|
|
26
|
-
|
|
27
|
-
export { i as useCreateShare };
|
|
55
|
+
export { i as extractShareToken, a as useCreateShare };
|
|
28
56
|
|
|
29
57
|
//# sourceMappingURL=useCreateShare.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateShare.js","names":["useCreateShare","
|
|
1
|
+
{"version":3,"file":"useCreateShare.js","names":["toShareRole","accessLevel","extractShareToken","shareUrl","useCreateShare","shareFileMutation","inviteLoading","inviteError","useMutation","ShareFileDocument","createLinkMutation","linkLoading","linkError","CreateFileShareLinkDocument","input","variables"],"sources":["../../../src/files/hooks/useCreateShare.ts"],"sourcesContent":["import { useMutation } from \"@apollo/client/react\";\n\nimport {\n CreateFileShareLinkDocument,\n ShareFileDocument,\n} from \"../../generated/wspace-operations\";\nimport type {\n FileShareAccessLevel,\n ShareRole,\n} from \"../../generated/wspace-types\";\nimport type {\n CreateFileShareLinkMutationVariables,\n ShareFileMutationVariables,\n} from \"../../generated/wspace-operations\";\n\nexport interface CreateShareInput {\n fileId: string;\n shareType: \"PUBLIC_LINK\" | \"EMAIL_INVITE\" | \"GROUP_SHARE\";\n accessLevel: \"VIEW\" | \"COMMENT\" | \"DOWNLOAD\" | \"EDIT\";\n expiresAt?: string;\n password?: string;\n maxDownloads?: number;\n invitedEmail?: string;\n invitedUserIds?: string[];\n}\n\nexport interface ShareCreationResult {\n /** Raw share token (public links only) — drives the `/files/share/:token` URL. */\n token: string;\n}\n\n/** Generic ShareRole for the legacy access levels (DOWNLOAD has no dedicated role). */\nfunction toShareRole(accessLevel: CreateShareInput[\"accessLevel\"]): ShareRole {\n switch (accessLevel) {\n case \"COMMENT\":\n return \"COMMENTER\" as ShareRole;\n case \"EDIT\":\n return \"EDITOR\" as ShareRole;\n default:\n return \"VIEWER\" as ShareRole;\n }\n}\n\n/**\n * Extract the raw share token from a grant `shareUrl`\n * (`{origin}/share/accept/{token}`). Falls back to the trimmed whole string\n * when no path segment is present.\n */\nexport function extractShareToken(shareUrl: string): string {\n const match = shareUrl.match(/\\/share\\/accept\\/([^/?#]+)$/);\n return (match?.[1] ?? shareUrl).trim();\n}\n\n/**\n * Create a file share through the consolidated ShareGrant stack (BOFF-5302).\n * Public links become PUBLIC_LINK grants; email invites become PENDING\n * grants + a `resource-shared` accept email from the service. The legacy\n * access level is preserved on the grant so the token-access path keeps\n * issuing download URLs for DOWNLOAD shares.\n */\nexport const useCreateShare = () => {\n const [shareFileMutation, { loading: inviteLoading, error: inviteError }] =\n useMutation(ShareFileDocument);\n const [createLinkMutation, { loading: linkLoading, error: linkError }] =\n useMutation(CreateFileShareLinkDocument);\n\n const loading = inviteLoading || linkLoading;\n const error = inviteError ?? linkError;\n\n return {\n mutateAsync: async (\n input: CreateShareInput,\n ): Promise<ShareCreationResult> => {\n const accessLevel = input.accessLevel.toUpperCase() as\n \"VIEW\" | \"COMMENT\" | \"DOWNLOAD\" | \"EDIT\";\n if (input.shareType === \"PUBLIC_LINK\") {\n const variables: CreateFileShareLinkMutationVariables = {\n input: {\n resourceId: input.fileId,\n role: toShareRole(input.accessLevel),\n expiresAt: input.expiresAt ?? null,\n },\n options: {\n password: input.password ?? null,\n maxDownloads: input.maxDownloads ?? null,\n accessLevel: accessLevel as unknown as FileShareAccessLevel,\n },\n };\n const result = await createLinkMutation({ variables });\n return {\n token: extractShareToken(\n result.data?.createFileShareLink.shareUrl ?? \"\",\n ),\n };\n }\n\n if (input.shareType !== \"EMAIL_INVITE\" || !input.invitedEmail) {\n throw new Error(\"Email invite shares require an invitedEmail\");\n }\n\n const variables: ShareFileMutationVariables = {\n input: {\n resourceId: input.fileId,\n email: input.invitedEmail,\n role: toShareRole(input.accessLevel),\n message: null,\n expiresAt: input.expiresAt ?? null,\n },\n options: {\n password: input.password ?? null,\n maxDownloads: input.maxDownloads ?? null,\n accessLevel: accessLevel as unknown as FileShareAccessLevel,\n },\n };\n await shareFileMutation({ variables });\n // Invites are opened through the accept flow, not a public URL.\n return { token: \"\" };\n },\n isPending: loading,\n error,\n };\n};\n"],"mappings":";;;AAgCA,SAASA,EAAY,GAAyD;CAC5E,QAAQC,GAAR;EACE,KAAK,WACH,OAAO;EACT,KAAK,QACH,OAAO;EACT,SACE,OAAO;CACX;AACF;AAOA,SAAgBC,EAAkB,GAA0B;CAE1D,QADcC,EAAS,MAAM,6BACrB,CAAA,GAAQ,MAAMA,EAAA,CAAU,KAAK;AACvC;AASA,IAAaC,UAAuB;CAClC,IAAM,CAACC,GAAmB,EAAE,SAASC,GAAe,OAAOC,OACzDC,EAAYC,CAAiB,GACzB,CAACC,GAAoB,EAAE,SAASC,GAAa,OAAOC,OACxDJ,EAAYK,CAA2B;CAKzC,OAAO;EACL,aAAa,OACX,MACiC;GACjC,IAAMZ,IAAca,EAAM,YAAY,YAAY;GAElD,IAAIA,EAAM,cAAc,eAAe;IACrC,IAAMC,IAAkD;KACtD,OAAO;MACL,YAAYD,EAAM;MAClB,MAAMd,EAAYc,EAAM,WAAW;MACnC,WAAWA,EAAM,aAAa;KAChC;KACA,SAAS;MACP,UAAUA,EAAM,YAAY;MAC5B,cAAcA,EAAM,gBAAgB;MACvB;KACf;IACF;IAEA,OAAO,EACL,OAAOZ,GACL,MAHiBQ,EAAmB,EAAE,aAAU,CAAC,EAAA,CAG1C,MAAM,oBAAoB,YAAY,EAC/C,EACF;GACF;GAEA,IAAII,EAAM,cAAc,kBAAkB,CAACA,EAAM,cAC/C,MAAU,MAAM,6CAA6C;GAG/D,IAAMC,IAAwC;IAC5C,OAAO;KACL,YAAYD,EAAM;KAClB,OAAOA,EAAM;KACb,MAAMd,EAAYc,EAAM,WAAW;KACnC,SAAS;KACT,WAAWA,EAAM,aAAa;IAChC;IACA,SAAS;KACP,UAAUA,EAAM,YAAY;KAC5B,cAAcA,EAAM,gBAAgB;KACvB;IACf;GACF;GAGA,OAFA,MAAMT,EAAkB,EAAE,aAAU,CAAC,GAE9B,EAAE,OAAO,GAAG;EACrB;EACA,WApDcC,KAAiBK;EAqD/B,OApDYJ,KAAeK;CAqD7B;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeleteFileDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useDeleteFile.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetFiles",
|
|
@@ -15,7 +15,6 @@ var n = () => {
|
|
|
15
15
|
error: i
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { n as useDeleteFile };
|
|
20
19
|
|
|
21
20
|
//# sourceMappingURL=useDeleteFile.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeleteFolderDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useDeleteFolder.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetFolders",
|
|
@@ -19,7 +19,6 @@ var n = () => {
|
|
|
19
19
|
error: i
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { n as useDeleteFolder };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=useDeleteFolder.js.map
|
|
@@ -28,4 +28,3 @@ export interface UseDragDropReturn {
|
|
|
28
28
|
export declare const useDragDrop: (options?: UseDragDropOptions) => UseDragDropReturn;
|
|
29
29
|
export declare const getDragOperation: (event: React.DragEvent) => DragOperation;
|
|
30
30
|
export declare const canDropOnFolder: (draggedItem: DragData | null, targetFolder: FolderItem) => boolean;
|
|
31
|
-
//# sourceMappingURL=useDragDrop.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback as e, useState as t } from "react";
|
|
2
|
-
|
|
2
|
+
// src/files/hooks/useDragDrop.ts
|
|
3
3
|
var n = (n = {}) => {
|
|
4
4
|
let [r, i] = t(null), [a, o] = t(null), s = r !== null, c = a !== null && r !== null, l = e((e) => {
|
|
5
5
|
i(e);
|
|
@@ -39,7 +39,6 @@ var n = (n = {}) => {
|
|
|
39
39
|
}
|
|
40
40
|
return !0;
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { i as canDropOnFolder, r as getDragOperation, n as useDragDrop };
|
|
44
43
|
|
|
45
44
|
//# sourceMappingURL=useDragDrop.js.map
|
|
@@ -63,4 +63,3 @@ export declare const useVersionDownloadUrl: (_versionId?: string, _expiresIn?: n
|
|
|
63
63
|
error: import('@apollo/client').ErrorLike | undefined;
|
|
64
64
|
getDownloadUrl: (versionId?: string | undefined, expiresIn?: number | undefined) => Promise<string | undefined>;
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=useFileVersions.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DeleteFileVersionDocument as e, GetFileVersionDownloadUrlDocument as t, GetFileVersionsDocument as n, RestoreFileVersionDocument as r } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useLazyQuery as i, useMutation as a, useQuery as o } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useFileVersions.ts
|
|
4
4
|
var s = (e, t = !0) => {
|
|
5
5
|
let r = o(n, {
|
|
6
6
|
variables: {
|
|
@@ -47,7 +47,6 @@ var s = (e, t = !0) => {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
|
-
//#endregion
|
|
51
50
|
export { l as useDeleteFileVersion, s as useFileVersions, c as useRestoreFileVersion, u as useVersionDownloadUrl };
|
|
52
51
|
|
|
53
52
|
//# sourceMappingURL=useFileVersions.js.map
|
|
@@ -8,4 +8,3 @@ export declare const useFoldersQuery: (parentFolderId?: string | null, options?:
|
|
|
8
8
|
filter?: import('../graphql-types').FolderFilterInput | null | undefined;
|
|
9
9
|
pagination?: import('../../generated/wspace-types').PaginationInput | null | undefined;
|
|
10
10
|
}, undefined>;
|
|
11
|
-
//# sourceMappingURL=useFoldersQuery.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetFoldersDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useQuery as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useFoldersQuery.ts
|
|
4
4
|
var n = (n, r) => t(e, {
|
|
5
5
|
variables: {
|
|
6
6
|
filter: n === void 0 ? { parentFolderId: null } : { parentFolderId: n },
|
|
@@ -8,7 +8,6 @@ var n = (n, r) => t(e, {
|
|
|
8
8
|
},
|
|
9
9
|
skip: r?.skip
|
|
10
10
|
});
|
|
11
|
-
//#endregion
|
|
12
11
|
export { n as useFoldersQuery };
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=useFoldersQuery.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useFilesStore as e } from "../store/filesStore.js";
|
|
2
2
|
import { useCallback as t, useEffect as n, useMemo as r, useRef as i } from "react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useKeyboardNavigation.ts
|
|
4
4
|
function a({ files: a, folders: o, onFilePreview: s, onFileDelete: c, onFolderOpen: l, onFolderDelete: u, activeTab: d }) {
|
|
5
5
|
let f = i(-1), { selectedFiles: p, selectedFolders: m, clearSelection: h, selectFile: g, selectFolder: _, toggleFileSelection: v, toggleFolderSelection: y, selectAllFiles: b, selectAllFolders: x } = e(), S = r(() => [...o, ...a], [o, a]), C = S.length, w = t((e) => {
|
|
6
6
|
let t = Math.max(-1, Math.min(e, C - 1));
|
|
@@ -98,7 +98,6 @@ function a({ files: a, folders: o, onFilePreview: s, onFileDelete: c, onFolderOp
|
|
|
98
98
|
getFocusedItem: T
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
//#endregion
|
|
102
101
|
export { a as useKeyboardNavigation };
|
|
103
102
|
|
|
104
103
|
//# sourceMappingURL=useKeyboardNavigation.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MoveFileDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useMoveFile.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetFilesRootBrowsePage",
|
|
@@ -16,7 +16,6 @@ var n = () => {
|
|
|
16
16
|
error: i
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { n as useMoveFile };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=useMoveFile.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MoveFolderDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useMoveFolder.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetFilesRootBrowsePage",
|
|
@@ -17,7 +17,6 @@ var n = () => {
|
|
|
17
17
|
error: i
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { n as useMoveFolder };
|
|
22
21
|
|
|
23
22
|
//# sourceMappingURL=useMoveFolder.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PermanentlyDeleteFileDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/usePermanentlyDeleteFile.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetBinFiles",
|
|
@@ -13,7 +13,6 @@ var n = () => {
|
|
|
13
13
|
error: i
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
//#endregion
|
|
17
16
|
export { n as usePermanentlyDeleteFile };
|
|
18
17
|
|
|
19
18
|
//# sourceMappingURL=usePermanentlyDeleteFile.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PermanentlyDeleteFolderDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/usePermanentlyDeleteFolder.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetBinFolders",
|
|
@@ -13,7 +13,6 @@ var n = () => {
|
|
|
13
13
|
error: i
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
//#endregion
|
|
17
16
|
export { n as usePermanentlyDeleteFolder };
|
|
18
17
|
|
|
19
18
|
//# sourceMappingURL=usePermanentlyDeleteFolder.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fileViewModel as e, folderViewModel as t } from "../utils/fileViewModel.js";
|
|
2
2
|
import { GetFilesRecentPageDocument as n } from "../../generated/wspace-operations.js";
|
|
3
3
|
import { useQuery as r } from "@apollo/client/react";
|
|
4
|
-
|
|
4
|
+
// src/files/hooks/useRecentFiles.ts
|
|
5
5
|
var i = (i) => {
|
|
6
6
|
let a = r(n, {
|
|
7
7
|
variables: {
|
|
@@ -20,7 +20,6 @@ var i = (i) => {
|
|
|
20
20
|
error: a.error
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
export { i as useRecentFiles };
|
|
25
24
|
|
|
26
25
|
//# sourceMappingURL=useRecentFiles.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UpdateFileDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useRenameFile.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetFiles",
|
|
@@ -16,7 +16,6 @@ var n = () => {
|
|
|
16
16
|
error: i
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { n as useRenameFile };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=useRenameFile.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UpdateFolderDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useRenameFolder.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetFolders",
|
|
@@ -16,7 +16,6 @@ var n = () => {
|
|
|
16
16
|
error: i
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { n as useRenameFolder };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=useRenameFolder.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RestoreFileDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useRestoreFile.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetFiles",
|
|
@@ -16,7 +16,6 @@ var n = () => {
|
|
|
16
16
|
error: i
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { n as useRestoreFile };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=useRestoreFile.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RestoreFolderDocument as e } from "../../generated/wspace-operations.js";
|
|
2
2
|
import { useMutation as t } from "@apollo/client/react";
|
|
3
|
-
|
|
3
|
+
// src/files/hooks/useRestoreFolder.ts
|
|
4
4
|
var n = () => {
|
|
5
5
|
let [n, { loading: r, error: i }] = t(e, { refetchQueries: [
|
|
6
6
|
"GetFiles",
|
|
@@ -16,7 +16,6 @@ var n = () => {
|
|
|
16
16
|
error: i
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { n as useRestoreFolder };
|
|
21
20
|
|
|
22
21
|
//# sourceMappingURL=useRestoreFolder.js.map
|