@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,150 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useBrowsePage as
|
|
7
|
-
import { useRecentFiles as
|
|
8
|
-
import { useStarredItems as
|
|
9
|
-
import { useBinItems as
|
|
10
|
-
import { useCreateFolder as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { generateThumbnail as
|
|
1
|
+
import { useUploadQueueState as e } from "../hooks/useUploadQueueState.js";
|
|
2
|
+
import { fileViewModel as t, folderViewModel as n } from "../utils/fileViewModel.js";
|
|
3
|
+
import { useKeyboardNavigation as r } from "../hooks/useKeyboardNavigation.js";
|
|
4
|
+
import { useFilesContext as i } from "../providers/FilesProvider.js";
|
|
5
|
+
import { useFilesStore as a } from "../store/filesStore.js";
|
|
6
|
+
import { useBrowsePage as ee } from "../hooks/useBrowsePage.js";
|
|
7
|
+
import { useRecentFiles as te } from "../hooks/useRecentFiles.js";
|
|
8
|
+
import { useStarredItems as ne } from "../hooks/useStarredItems.js";
|
|
9
|
+
import { useBinItems as re } from "../hooks/useBinItems.js";
|
|
10
|
+
import { useCreateFolder as ie } from "../hooks/useCreateFolder.js";
|
|
11
|
+
import { useUploadFile as ae } from "../hooks/useUploadFile.js";
|
|
12
|
+
import { useDeleteFile as oe } from "../hooks/useDeleteFile.js";
|
|
13
|
+
import { useDeleteFolder as se } from "../hooks/useDeleteFolder.js";
|
|
14
|
+
import { useRestoreFile as ce } from "../hooks/useRestoreFile.js";
|
|
15
|
+
import { useRestoreFolder as le } from "../hooks/useRestoreFolder.js";
|
|
16
|
+
import { usePermanentlyDeleteFile as ue } from "../hooks/usePermanentlyDeleteFile.js";
|
|
17
|
+
import { usePermanentlyDeleteFolder as de } from "../hooks/usePermanentlyDeleteFolder.js";
|
|
18
|
+
import { useToggleStar as fe } from "../hooks/useToggleStar.js";
|
|
19
|
+
import { useRenameFile as pe } from "../hooks/useRenameFile.js";
|
|
20
|
+
import { useRenameFolder as me } from "../hooks/useRenameFolder.js";
|
|
21
|
+
import { useCreateShare as he } from "../hooks/useCreateShare.js";
|
|
22
|
+
import { useCreateFolderShare as ge } from "../hooks/useCreateFolderShare.js";
|
|
23
|
+
import { useCopyFile as _e } from "../hooks/useCopyFile.js";
|
|
24
|
+
import { useMoveFile as ve } from "../hooks/useMoveFile.js";
|
|
25
|
+
import { useMoveFolder as ye } from "../hooks/useMoveFolder.js";
|
|
26
|
+
import { useBulkDelete as be } from "../hooks/useBatchOperations.js";
|
|
27
|
+
import { useSearch as xe } from "../hooks/useSearch.js";
|
|
28
|
+
import { useToast as Se } from "../hooks/useToast.js";
|
|
29
|
+
import { FileBrowser as Ce } from "../components/FileBrowser.js";
|
|
30
|
+
import { generateThumbnail as we } from "../utils/thumbnail.js";
|
|
31
|
+
import { TabBar as Te } from "../components/TabBar.js";
|
|
32
|
+
import { ShareDialog as Ee } from "../components/ShareDialog.js";
|
|
33
|
+
import { FilePreviewModal as De } from "../components/FilePreviewModal.js";
|
|
34
|
+
import { FileInfoPanel as Oe } from "../components/FileInfoPanel.js";
|
|
35
|
+
import { EmptyState as ke } from "../components/EmptyState.js";
|
|
36
|
+
import { ToastContainer as Ae } from "../components/Toast.js";
|
|
37
|
+
import { SearchBar as je } from "../components/SearchBar.js";
|
|
38
|
+
import { MoveDialog as Me } from "../components/MoveDialog.js";
|
|
39
|
+
import { CopyDialog as Ne } from "../components/CopyDialog.js";
|
|
40
|
+
import { ConfirmDialog as Pe } from "../components/ConfirmDialog.js";
|
|
41
|
+
import { UploadQueue as Fe } from "../components/UploadQueue.js";
|
|
42
|
+
import { StorageBanner as Ie } from "../components/StorageBanner.js";
|
|
43
|
+
import { useStorageQuota as Le } from "../hooks/useStorageQuota.js";
|
|
44
|
+
import { isQuotaExhaustedError as Re } from "../utils/quotaUtils.js";
|
|
45
|
+
import { nativeImpact as ze, nativeNotify as Be, nativeOpenUrl as Ve } from "../../utils/nativeBridge.js";
|
|
46
|
+
import { emitFilesEvent as He } from "../utils/events.js";
|
|
47
|
+
import { tWithFallback as o } from "../utils/i18n.js";
|
|
31
48
|
import "../utils/index.js";
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
import { MoveDialog as Pe } from "../components/MoveDialog.js";
|
|
42
|
-
import { CopyDialog as Fe } from "../components/CopyDialog.js";
|
|
43
|
-
import { ConfirmDialog as Ie } from "../components/ConfirmDialog.js";
|
|
44
|
-
import { UploadQueue as Le } from "../components/UploadQueue.js";
|
|
45
|
-
import { StorageBanner as Re } from "../components/StorageBanner.js";
|
|
46
|
-
import { useStorageQuota as ze } from "../hooks/useStorageQuota.js";
|
|
47
|
-
import { nativeImpact as Be, nativeNotify as Ve, nativeOpenUrl as He } from "../../utils/nativeBridge.js";
|
|
48
|
-
import { emitFilesEvent as Ue } from "../utils/events.js";
|
|
49
|
-
import { useEffect as We, useMemo as Ge, useState as o } from "react";
|
|
50
|
-
import { FolderPlus as Ke, FolderUp as qe, FolderX as Je, Grid3x3 as Ye, Home as Xe, List as Ze, Loader2 as s, Star as Qe, Trash2 as $e, Upload as et, X as tt } from "lucide-react";
|
|
51
|
-
import { Fragment as nt, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
52
|
-
import { useNavigate as rt, useParams as it } from "react-router";
|
|
53
|
-
import { useI18n as at } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
54
|
-
import { AuroraBackground as ot, Button as u, CTAOverflowMenu as st, EmphasisPanel as ct, GradientText as lt, IllustratedEmptyState as ut, Input as dt, NextSteps as ft, PagePurpose as pt, ResponsiveDialog as mt, ResponsiveDialogContent as ht, ResponsiveDialogFooter as gt, ResponsiveDialogHeader as _t, ResponsiveDialogTitle as vt } from "@burdenoff/fe-libs/ui";
|
|
55
|
-
//#region src/files/pages/BrowserPage.tsx
|
|
56
|
-
function d() {
|
|
57
|
-
let { t: d } = at(), { folderId: f } = it(), p = rt(), yt = e(), { workspaceId: m } = yt, bt = ze(m ?? ""), { viewMode: xt, setViewMode: St, breadcrumbs: Ct, selectedFiles: h, selectedFolders: g, clearSelection: _ } = i(), [v, y] = o("all"), wt = Ge(() => [
|
|
49
|
+
import { useEffect as Ue, useMemo as We, useState as s } from "react";
|
|
50
|
+
import { FolderPlus as Ge, FolderUp as Ke, FolderX as qe, Grid3x3 as Je, Home as Ye, List as Xe, Loader2 as c, Star as Ze, Trash2 as Qe, Upload as $e, X as et } from "lucide-react";
|
|
51
|
+
import { Fragment as tt, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
52
|
+
import { useNavigate as nt, useParams as rt } from "react-router";
|
|
53
|
+
import { useI18n as it } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
54
|
+
import { AuroraBackground as at, Button as d, CTAOverflowMenu as ot, EmphasisPanel as st, GradientText as ct, IllustratedEmptyState as lt, Input as ut, NextSteps as dt, PagePurpose as ft, ResponsiveDialog as pt, ResponsiveDialogContent as mt, ResponsiveDialogFooter as ht, ResponsiveDialogHeader as gt, ResponsiveDialogTitle as _t } from "@burdenoff/fe-libs/ui";
|
|
55
|
+
// src/files/pages/BrowserPage.tsx
|
|
56
|
+
function f() {
|
|
57
|
+
let { t: f } = it(), { folderId: p } = rt(), m = nt(), vt = i(), { workspaceId: h } = vt, yt = Le(h ?? ""), { viewMode: bt, setViewMode: xt, breadcrumbs: St, selectedFiles: g, selectedFolders: _, clearSelection: Ct } = a(), [v, wt] = s("all"), Tt = We(() => [
|
|
58
58
|
"all",
|
|
59
59
|
"recent",
|
|
60
60
|
"starred",
|
|
61
61
|
"bin"
|
|
62
62
|
], []);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, [
|
|
66
|
-
let [
|
|
67
|
-
folderId:
|
|
63
|
+
Ue(() => {
|
|
64
|
+
Tt.includes(v) || wt("all");
|
|
65
|
+
}, [Tt, v]);
|
|
66
|
+
let [Et, Dt] = s(""), [Ot, kt] = s(), y = Et.trim().length >= 2, [At, jt] = s(null), [b, Mt] = s(null), x = Se(), S = ee({
|
|
67
|
+
folderId: p || void 0,
|
|
68
68
|
pageSize: 100,
|
|
69
|
-
skip: v !== "all" ||
|
|
70
|
-
}),
|
|
71
|
-
|
|
72
|
-
if (
|
|
73
|
-
let e =
|
|
69
|
+
skip: v !== "all" || y
|
|
70
|
+
}), C = te({ skip: v !== "recent" || y }), w = ne({ skip: v !== "starred" || y }), T = re({ skip: v !== "bin" || y }), E = xe(Et, y, Ot);
|
|
71
|
+
Ue(() => {
|
|
72
|
+
if (p && S.data?.folderPath && S.data?.currentFolder) {
|
|
73
|
+
let e = S.data.folderPath.folders || [], t = S.data.currentFolder, n = [...e.map((e) => ({
|
|
74
74
|
id: e.id,
|
|
75
75
|
name: e.name
|
|
76
76
|
})), {
|
|
77
77
|
id: t.id,
|
|
78
78
|
name: t.name
|
|
79
79
|
}];
|
|
80
|
-
|
|
81
|
-
} else
|
|
82
|
-
}, [
|
|
83
|
-
let
|
|
84
|
-
if (
|
|
80
|
+
a.getState().setBreadcrumbs(n);
|
|
81
|
+
} else a.getState().setBreadcrumbs([]);
|
|
82
|
+
}, [p, S.data]);
|
|
83
|
+
let D = [], O = [], k = !1, A = null, j = !1;
|
|
84
|
+
if (y && E.data) D = E.data.files || [], O = E.data.folders || [], k = E.isLoading, A = E.error;
|
|
85
85
|
else switch (v) {
|
|
86
86
|
case "all":
|
|
87
|
-
|
|
87
|
+
D = S.data?.filesList?.files.map(t) || [], O = S.data?.foldersList?.folders.map(n) || [], k = S.loading, A = S.error || null, j = !1;
|
|
88
88
|
break;
|
|
89
89
|
case "recent":
|
|
90
|
-
|
|
90
|
+
D = C.files || [], O = C.folders || [], k = C.isLoading, A = C.error || null, j = !0;
|
|
91
91
|
break;
|
|
92
92
|
case "starred":
|
|
93
|
-
|
|
93
|
+
D = w.files, O = w.folders, k = w.isLoading, A = w.error || null, j = !0;
|
|
94
94
|
break;
|
|
95
|
-
case "bin":
|
|
95
|
+
case "bin": D = T.files, O = T.folders, k = T.isLoading, A = T.error || null, j = !0;
|
|
96
96
|
}
|
|
97
|
-
let
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
if (!
|
|
101
|
-
let e =
|
|
102
|
-
|
|
103
|
-
...
|
|
97
|
+
let Nt = v === "all" ? (S.data?.filesList?.total ?? D.length) + (S.data?.foldersList?.total ?? O.length) : null, M = g.size + _.size, [Pt, N] = s(!1), [Ft, It] = s(!1), [Lt, Rt] = s(!1), [zt, P] = s(!1), [Bt, F] = s(!1), [Vt, I] = s(!1), [Ht, Ut] = s(!1), [Wt, L] = s(null), [R, Gt] = s(null), [z, Kt] = s(null), [B, V] = s(null), [H, U] = s(""), [W, G] = s(""), { uploading: qt, uploadQueue: Jt, isUploadPanelOpen: Yt, setUploading: Xt, setUploadQueue: K, setIsUploadPanelOpen: Zt, cancelUpload: Qt } = e(), [q, J] = s(null), Y = (e, t) => {
|
|
98
|
+
He(vt, e, t);
|
|
99
|
+
}, $t = async () => {
|
|
100
|
+
if (!q || q.loading) return;
|
|
101
|
+
let e = q.onConfirm;
|
|
102
|
+
J({
|
|
103
|
+
...q,
|
|
104
104
|
loading: !0
|
|
105
105
|
});
|
|
106
106
|
try {
|
|
107
|
-
await e(),
|
|
107
|
+
await e(), J(null);
|
|
108
108
|
} catch (e) {
|
|
109
|
-
|
|
109
|
+
Y("files.api.failed", {
|
|
110
110
|
action: "confirmDialog",
|
|
111
111
|
message: e instanceof Error ? e.message : "Confirmed action failed"
|
|
112
|
-
}),
|
|
112
|
+
}), J((e) => e && {
|
|
113
113
|
...e,
|
|
114
114
|
loading: !1
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
},
|
|
117
|
+
}, X = ie(), en = ae(), tn = oe(), nn = se(), rn = ce(), an = le(), on = ue(), sn = de(), cn = fe(), Z = pe(), Q = me(), ln = he(), un = ge(), dn = _e(), fn = ve(), pn = ye(), mn = be(), hn = () => {
|
|
118
118
|
let e = document.createElement("input");
|
|
119
119
|
e.type = "file", e.multiple = !0, e.onchange = async (e) => {
|
|
120
120
|
let t = e.target.files;
|
|
121
121
|
if (t && t.length > 0) {
|
|
122
122
|
let e = await Promise.all(Array.from(t).map(async (e, t) => {
|
|
123
|
-
let n = await
|
|
123
|
+
let n = await we(e);
|
|
124
124
|
return {
|
|
125
125
|
id: `${Date.now()}-${t}-${e.name}`,
|
|
126
126
|
file: e,
|
|
127
127
|
status: "pending",
|
|
128
128
|
progress: 0,
|
|
129
|
-
folderId:
|
|
129
|
+
folderId: p || void 0,
|
|
130
130
|
thumbnailUrl: n ?? void 0
|
|
131
131
|
};
|
|
132
132
|
}));
|
|
133
|
-
|
|
134
|
-
for (let t of e) await
|
|
135
|
-
|
|
133
|
+
K((t) => [...t, ...e]), Zt(!0), Xt(!0);
|
|
134
|
+
for (let t of e) await $(t);
|
|
135
|
+
Xt(!1);
|
|
136
136
|
}
|
|
137
137
|
}, e.click();
|
|
138
|
-
},
|
|
138
|
+
}, $ = async (e) => {
|
|
139
139
|
let t = (t) => {
|
|
140
|
-
|
|
140
|
+
K((n) => n.map((n) => n.id === e.id ? {
|
|
141
141
|
...n,
|
|
142
142
|
...t
|
|
143
143
|
} : n));
|
|
144
144
|
};
|
|
145
145
|
t({ status: "uploading" });
|
|
146
146
|
try {
|
|
147
|
-
let n = await
|
|
147
|
+
let n = await en.mutateAsync({
|
|
148
148
|
file: e.file,
|
|
149
149
|
folderId: e.folderId,
|
|
150
150
|
onProgress: (e) => {
|
|
@@ -154,44 +154,44 @@ function d() {
|
|
|
154
154
|
t({
|
|
155
155
|
status: "completed",
|
|
156
156
|
progress: 100
|
|
157
|
-
}),
|
|
157
|
+
}), Y("files.file.uploaded", {
|
|
158
158
|
fileId: n.id,
|
|
159
159
|
fileName: n.name,
|
|
160
160
|
folderId: e.folderId
|
|
161
161
|
});
|
|
162
162
|
} catch (n) {
|
|
163
|
-
let r = n instanceof Error ? n.message :
|
|
164
|
-
r === "Upload paused" ? t({ status: "paused" }) :
|
|
163
|
+
let r = n instanceof Error ? n.message : o(f, "files.upload.errors.failed", "Upload failed");
|
|
164
|
+
r === "Upload paused" ? t({ status: "paused" }) : Re(n) ? (t({
|
|
165
165
|
status: "failed",
|
|
166
|
-
error:
|
|
167
|
-
}),
|
|
166
|
+
error: o(f, "files.upload.errors.quotaExceeded", "Storage quota exceeded")
|
|
167
|
+
}), Rt(!0)) : (t({
|
|
168
168
|
status: "failed",
|
|
169
169
|
error: r
|
|
170
|
-
}),
|
|
170
|
+
}), Y("files.api.failed", {
|
|
171
171
|
action: "uploadFile",
|
|
172
172
|
fileName: e.file.name,
|
|
173
173
|
message: r
|
|
174
174
|
}));
|
|
175
175
|
}
|
|
176
176
|
}, gn = (e) => {
|
|
177
|
-
|
|
177
|
+
en.pause(), K((t) => t.map((t) => t.id === e ? {
|
|
178
178
|
...t,
|
|
179
179
|
status: "paused"
|
|
180
180
|
} : t));
|
|
181
181
|
}, _n = (e) => {
|
|
182
|
-
let t =
|
|
183
|
-
t &&
|
|
182
|
+
let t = Jt.find((t) => t.id === e);
|
|
183
|
+
t && $(t);
|
|
184
184
|
}, vn = (e) => {
|
|
185
|
-
let t =
|
|
186
|
-
t && (
|
|
185
|
+
let t = Jt.find((t) => t.id === e);
|
|
186
|
+
t && (K((t) => t.map((t) => t.id === e ? {
|
|
187
187
|
...t,
|
|
188
188
|
status: "pending",
|
|
189
189
|
progress: 0,
|
|
190
190
|
error: void 0
|
|
191
|
-
} : t)),
|
|
192
|
-
}, yn =
|
|
193
|
-
if (!
|
|
194
|
-
|
|
191
|
+
} : t)), $(t));
|
|
192
|
+
}, yn = Qt, bn = () => {
|
|
193
|
+
if (!h) {
|
|
194
|
+
x.error(o(f, "files.workspace.errors.notSelected", "Workspace not selected"));
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
197
|
let e = document.createElement("input");
|
|
@@ -206,23 +206,23 @@ function d() {
|
|
|
206
206
|
let n = /* @__PURE__ */ new Map(), r = Array.from(e.keys()).sort();
|
|
207
207
|
for (let e of r) {
|
|
208
208
|
if (!e) continue;
|
|
209
|
-
let t = e.split("/"), r = "", i =
|
|
209
|
+
let t = e.split("/"), r = "", i = p || void 0;
|
|
210
210
|
for (let e of t) if (r = r ? `${r}/${e}` : e, n.has(r)) i = n.get(r);
|
|
211
211
|
else try {
|
|
212
|
-
let { data: t } = await
|
|
212
|
+
let { data: t } = await X.mutateAsync({
|
|
213
213
|
name: e,
|
|
214
214
|
parentFolderId: i
|
|
215
215
|
});
|
|
216
216
|
t?.id && (n.set(r, t.id), i = t.id);
|
|
217
217
|
} catch {}
|
|
218
218
|
}
|
|
219
|
-
let i = [],
|
|
219
|
+
let i = [], a = 0;
|
|
220
220
|
for (let [t, r] of e) {
|
|
221
|
-
let e = t ? n.get(t) :
|
|
221
|
+
let e = t ? n.get(t) : p || void 0;
|
|
222
222
|
for (let t of r) {
|
|
223
|
-
let n = await
|
|
223
|
+
let n = await we(t);
|
|
224
224
|
i.push({
|
|
225
|
-
id: `${Date.now()}-${
|
|
225
|
+
id: `${Date.now()}-${a++}-${t.name}`,
|
|
226
226
|
file: t,
|
|
227
227
|
status: "pending",
|
|
228
228
|
progress: 0,
|
|
@@ -231,42 +231,42 @@ function d() {
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
|
|
235
|
-
for (let e of i) await
|
|
236
|
-
|
|
234
|
+
K((e) => [...e, ...i]), Zt(!0), Xt(!0);
|
|
235
|
+
for (let e of i) await $(e);
|
|
236
|
+
Xt(!1), x.success(o(f, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
|
|
237
237
|
count: i.length,
|
|
238
238
|
plural: i.length > 1 ? "s" : ""
|
|
239
239
|
}));
|
|
240
240
|
}
|
|
241
241
|
}, e.click();
|
|
242
242
|
}, xn = () => {
|
|
243
|
-
|
|
243
|
+
N(!0);
|
|
244
244
|
}, Sn = async () => {
|
|
245
|
-
if (
|
|
246
|
-
let { data: e, error: t } = await
|
|
247
|
-
name:
|
|
248
|
-
parentFolderId:
|
|
245
|
+
if (W.trim() && h) {
|
|
246
|
+
let { data: e, error: t } = await X.mutateAsync({
|
|
247
|
+
name: W,
|
|
248
|
+
parentFolderId: p
|
|
249
249
|
});
|
|
250
250
|
if (t) {
|
|
251
|
-
|
|
251
|
+
Re(t) ? (N(!1), G(""), It(!0)) : (x.error(t instanceof Error ? t.message : o(f, "files.folder.errors.createFailed", "Folder creation failed")), Y("files.api.failed", {
|
|
252
252
|
action: "createFolder",
|
|
253
253
|
message: t instanceof Error ? t.message : "Folder creation failed"
|
|
254
254
|
}));
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
e && (
|
|
258
|
-
folderName:
|
|
259
|
-
parentFolderId:
|
|
257
|
+
e && (G(""), N(!1), Y("files.folder.created", {
|
|
258
|
+
folderName: W,
|
|
259
|
+
parentFolderId: p
|
|
260
260
|
}));
|
|
261
261
|
}
|
|
262
262
|
}, Cn = (e) => {
|
|
263
|
-
|
|
263
|
+
Mt(e);
|
|
264
264
|
}, wn = (e) => {
|
|
265
|
-
|
|
265
|
+
L(e), F(!0);
|
|
266
266
|
}, Tn = (e) => {
|
|
267
|
-
|
|
267
|
+
L(e), F(!0);
|
|
268
268
|
}, En = async (e) => {
|
|
269
|
-
if (!e.fileId && !e.folderId) throw Error(
|
|
269
|
+
if (!e.fileId && !e.folderId) throw Error(o(f, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
|
|
270
270
|
let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
|
|
271
271
|
if (e.fileId) {
|
|
272
272
|
let r = {
|
|
@@ -278,7 +278,7 @@ function d() {
|
|
|
278
278
|
shareType: t,
|
|
279
279
|
accessLevel: "DOWNLOAD"
|
|
280
280
|
};
|
|
281
|
-
n = (await
|
|
281
|
+
n = (await ln.mutateAsync(r))?.token ?? "", Y("files.share.created", {
|
|
282
282
|
entityType: "file",
|
|
283
283
|
fileId: e.fileId,
|
|
284
284
|
shareType: t
|
|
@@ -293,7 +293,7 @@ function d() {
|
|
|
293
293
|
shareType: t,
|
|
294
294
|
accessLevel: "DOWNLOAD"
|
|
295
295
|
};
|
|
296
|
-
n = (await
|
|
296
|
+
n = (await un.mutateAsync(r))?.token ?? "", Y("files.share.created", {
|
|
297
297
|
entityType: "folder",
|
|
298
298
|
folderId: e.folderId,
|
|
299
299
|
shareType: t
|
|
@@ -304,20 +304,20 @@ function d() {
|
|
|
304
304
|
token: n
|
|
305
305
|
};
|
|
306
306
|
}, Dn = async (e) => {
|
|
307
|
-
|
|
308
|
-
title:
|
|
309
|
-
description:
|
|
310
|
-
confirmLabel:
|
|
307
|
+
ze("medium"), J({
|
|
308
|
+
title: o(f, "files.confirm.deleteFile.title", "Delete file"),
|
|
309
|
+
description: o(f, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
|
|
310
|
+
confirmLabel: o(f, "files.common.actions.delete", "Delete"),
|
|
311
311
|
variant: "danger",
|
|
312
312
|
onConfirm: async () => {
|
|
313
313
|
try {
|
|
314
|
-
await
|
|
314
|
+
await tn.mutateAsync({ id: e.id }), Be("success"), x.success(o(f, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Y("files.file.deleted", {
|
|
315
315
|
fileId: e.id,
|
|
316
316
|
fileName: e.name,
|
|
317
317
|
permanent: !1
|
|
318
318
|
});
|
|
319
319
|
} catch (t) {
|
|
320
|
-
|
|
320
|
+
x.error(t instanceof Error ? t.message : o(f, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Be("error"), Y("files.api.failed", {
|
|
321
321
|
action: "deleteFile",
|
|
322
322
|
fileId: e.id,
|
|
323
323
|
message: t instanceof Error ? t.message : "Failed to delete file"
|
|
@@ -327,530 +327,530 @@ function d() {
|
|
|
327
327
|
});
|
|
328
328
|
}, On = async (e) => {
|
|
329
329
|
try {
|
|
330
|
-
await
|
|
330
|
+
await rn.mutateAsync({ id: e.id }), x.success(o(f, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), Y("files.file.restored", {
|
|
331
331
|
fileId: e.id,
|
|
332
332
|
fileName: e.name
|
|
333
333
|
});
|
|
334
334
|
} catch (e) {
|
|
335
|
-
|
|
335
|
+
x.error(e instanceof Error ? e.message : o(f, "files.file.errors.restoreFailed", "Failed to restore file"));
|
|
336
336
|
}
|
|
337
337
|
}, kn = async (e) => {
|
|
338
|
-
|
|
339
|
-
title:
|
|
340
|
-
description:
|
|
341
|
-
confirmLabel:
|
|
338
|
+
ze("heavy"), J({
|
|
339
|
+
title: o(f, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
|
|
340
|
+
description: o(f, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
|
|
341
|
+
confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
|
|
342
342
|
variant: "danger",
|
|
343
343
|
onConfirm: async () => {
|
|
344
344
|
try {
|
|
345
|
-
await
|
|
345
|
+
await on.mutateAsync({ id: e.id }), x.success(o(f, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Y("files.file.deleted", {
|
|
346
346
|
fileId: e.id,
|
|
347
347
|
fileName: e.name,
|
|
348
348
|
permanent: !0
|
|
349
349
|
});
|
|
350
350
|
} catch (e) {
|
|
351
|
-
|
|
351
|
+
x.error(e instanceof Error ? e.message : o(f, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
});
|
|
355
355
|
}, An = async (e) => {
|
|
356
356
|
try {
|
|
357
|
-
await
|
|
357
|
+
await cn.mutateAsync({
|
|
358
358
|
id: e.id,
|
|
359
359
|
type: "file"
|
|
360
|
-
}),
|
|
360
|
+
}), Y("files.file.starred", {
|
|
361
361
|
fileId: e.id,
|
|
362
362
|
fileName: e.name,
|
|
363
363
|
starred: !e.starred
|
|
364
364
|
});
|
|
365
365
|
} catch {
|
|
366
|
-
|
|
366
|
+
x.error(o(f, "files.file.errors.starFailed", "Failed to update starred state")), Y("files.api.failed", {
|
|
367
367
|
action: "toggleFileStar",
|
|
368
368
|
fileId: e.id
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
371
|
}, jn = (e) => {
|
|
372
|
-
|
|
372
|
+
V({
|
|
373
373
|
id: e.id,
|
|
374
374
|
name: e.name,
|
|
375
375
|
type: "file"
|
|
376
|
-
}),
|
|
376
|
+
}), U(e.name), P(!0);
|
|
377
377
|
}, Mn = async (e) => {
|
|
378
378
|
try {
|
|
379
379
|
let t = e.downloadUrl || e.url;
|
|
380
|
-
if (!t) throw Error(
|
|
380
|
+
if (!t) throw Error(o(f, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
|
|
381
381
|
let n = document.createElement("a");
|
|
382
|
-
n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n),
|
|
382
|
+
n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), x.success(o(f, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), Y("files.file.downloaded", {
|
|
383
383
|
fileId: e.id,
|
|
384
384
|
fileName: e.name
|
|
385
385
|
});
|
|
386
386
|
} catch (e) {
|
|
387
|
-
|
|
387
|
+
x.error(e instanceof Error ? e.message : o(f, "files.file.errors.downloadFailed", "Failed to download file"));
|
|
388
388
|
}
|
|
389
389
|
}, Nn = (e) => {
|
|
390
|
-
|
|
390
|
+
Kt({
|
|
391
391
|
item: e,
|
|
392
392
|
type: "file"
|
|
393
|
-
}),
|
|
393
|
+
}), Ut(!0);
|
|
394
394
|
}, Pn = (e) => {
|
|
395
|
-
|
|
395
|
+
Gt({
|
|
396
396
|
item: e,
|
|
397
397
|
type: "file"
|
|
398
|
-
}),
|
|
398
|
+
}), I(!0);
|
|
399
399
|
}, Fn = (e) => {
|
|
400
|
-
|
|
400
|
+
jt({
|
|
401
401
|
item: e,
|
|
402
402
|
type: "file"
|
|
403
403
|
});
|
|
404
404
|
}, In = (e) => {
|
|
405
|
-
|
|
405
|
+
m(`/files/browse/${e.id}`);
|
|
406
406
|
}, Ln = async (e) => {
|
|
407
|
-
|
|
408
|
-
title:
|
|
409
|
-
description:
|
|
410
|
-
confirmLabel:
|
|
407
|
+
ze("medium"), J({
|
|
408
|
+
title: o(f, "files.confirm.deleteFolder.title", "Delete folder"),
|
|
409
|
+
description: o(f, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
|
|
410
|
+
confirmLabel: o(f, "files.common.actions.delete", "Delete"),
|
|
411
411
|
variant: "danger",
|
|
412
412
|
onConfirm: async () => {
|
|
413
413
|
try {
|
|
414
|
-
await
|
|
414
|
+
await nn.mutateAsync({
|
|
415
415
|
id: e.id,
|
|
416
416
|
recursive: !0
|
|
417
|
-
}),
|
|
417
|
+
}), x.success(o(f, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), Y("files.folder.deleted", {
|
|
418
418
|
folderId: e.id,
|
|
419
419
|
folderName: e.name,
|
|
420
420
|
permanent: !1
|
|
421
421
|
});
|
|
422
422
|
} catch (e) {
|
|
423
|
-
|
|
423
|
+
x.error(e instanceof Error ? e.message : o(f, "files.folder.errors.deleteFailed", "Failed to delete folder"));
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
426
|
});
|
|
427
427
|
}, Rn = async (e) => {
|
|
428
428
|
try {
|
|
429
|
-
await
|
|
429
|
+
await an.mutateAsync({ id: e.id }), x.success(o(f, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), Y("files.folder.restored", {
|
|
430
430
|
folderId: e.id,
|
|
431
431
|
folderName: e.name
|
|
432
432
|
});
|
|
433
433
|
} catch (e) {
|
|
434
|
-
|
|
434
|
+
x.error(e instanceof Error ? e.message : o(f, "files.folder.errors.restoreFailed", "Failed to restore folder"));
|
|
435
435
|
}
|
|
436
436
|
}, zn = async (e) => {
|
|
437
|
-
|
|
438
|
-
title:
|
|
439
|
-
description:
|
|
440
|
-
confirmLabel:
|
|
437
|
+
J({
|
|
438
|
+
title: o(f, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
|
|
439
|
+
description: o(f, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
|
|
440
|
+
confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
|
|
441
441
|
variant: "danger",
|
|
442
442
|
onConfirm: async () => {
|
|
443
443
|
try {
|
|
444
|
-
await
|
|
444
|
+
await sn.mutateAsync({ id: e.id }), x.success(o(f, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), Y("files.folder.deleted", {
|
|
445
445
|
folderId: e.id,
|
|
446
446
|
folderName: e.name,
|
|
447
447
|
permanent: !0
|
|
448
448
|
});
|
|
449
449
|
} catch (e) {
|
|
450
|
-
|
|
450
|
+
x.error(e instanceof Error ? e.message : o(f, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
}, Bn = (e) => {
|
|
455
|
-
|
|
455
|
+
V({
|
|
456
456
|
id: e.id,
|
|
457
457
|
name: e.name,
|
|
458
458
|
type: "folder"
|
|
459
|
-
}),
|
|
459
|
+
}), U(e.name), P(!0);
|
|
460
460
|
}, Vn = (e) => {
|
|
461
|
-
|
|
461
|
+
Gt({
|
|
462
462
|
item: e,
|
|
463
463
|
type: "folder"
|
|
464
|
-
}),
|
|
464
|
+
}), I(!0);
|
|
465
465
|
}, Hn = async (e) => {
|
|
466
466
|
try {
|
|
467
|
-
await
|
|
467
|
+
await cn.mutateAsync({
|
|
468
468
|
id: e.id,
|
|
469
469
|
type: "folder"
|
|
470
|
-
}),
|
|
470
|
+
}), Y("files.folder.starred", {
|
|
471
471
|
folderId: e.id,
|
|
472
472
|
folderName: e.name,
|
|
473
473
|
starred: !e.starred
|
|
474
474
|
});
|
|
475
475
|
} catch {
|
|
476
|
-
|
|
476
|
+
x.error(o(f, "files.folder.errors.starFailed", "Failed to update starred state")), Y("files.api.failed", {
|
|
477
477
|
action: "toggleFolderStar",
|
|
478
478
|
folderId: e.id
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
481
|
}, Un = (e) => {
|
|
482
|
-
|
|
482
|
+
jt({
|
|
483
483
|
item: e,
|
|
484
484
|
type: "folder"
|
|
485
485
|
});
|
|
486
486
|
}, Wn = async (e) => {
|
|
487
|
-
if (
|
|
488
|
-
|
|
489
|
-
fileId:
|
|
487
|
+
if (R) try {
|
|
488
|
+
R.type === "file" ? (await fn.mutateAsync({
|
|
489
|
+
fileId: R.item.id,
|
|
490
490
|
targetFolderId: e || null
|
|
491
|
-
}),
|
|
492
|
-
fileId:
|
|
493
|
-
fileName:
|
|
491
|
+
}), x.success(o(f, "files.file.move.success", "\"{{name}}\" moved", { name: R.item.name })), Y("files.file.moved", {
|
|
492
|
+
fileId: R.item.id,
|
|
493
|
+
fileName: R.item.name,
|
|
494
494
|
destinationFolderId: e
|
|
495
|
-
})) : (await
|
|
496
|
-
folderId:
|
|
495
|
+
})) : (await pn.mutateAsync({
|
|
496
|
+
folderId: R.item.id,
|
|
497
497
|
targetParentFolderId: e
|
|
498
|
-
}),
|
|
499
|
-
folderId:
|
|
500
|
-
folderName:
|
|
498
|
+
}), x.success(o(f, "files.folder.move.success", "\"{{name}}\" moved", { name: R.item.name })), Y("files.folder.moved", {
|
|
499
|
+
folderId: R.item.id,
|
|
500
|
+
folderName: R.item.name,
|
|
501
501
|
destinationFolderId: e
|
|
502
|
-
})),
|
|
502
|
+
})), I(!1), Gt(null);
|
|
503
503
|
} catch (e) {
|
|
504
|
-
|
|
505
|
-
action:
|
|
506
|
-
itemId:
|
|
507
|
-
itemType:
|
|
504
|
+
x.error(e instanceof Error ? e.message : o(f, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: R.item.name })), Y("files.api.failed", {
|
|
505
|
+
action: R.type === "file" ? "moveFile" : "moveFolder",
|
|
506
|
+
itemId: R.item.id,
|
|
507
|
+
itemType: R.type,
|
|
508
508
|
message: e instanceof Error ? e.message : void 0
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
511
|
}, Gn = async (e, t) => {
|
|
512
|
-
if (
|
|
513
|
-
if (
|
|
514
|
-
await
|
|
515
|
-
id:
|
|
516
|
-
newName: t || `Copy of ${
|
|
512
|
+
if (z) try {
|
|
513
|
+
if (z.type !== "file") throw Error(o(f, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
|
|
514
|
+
await dn.mutateAsync({
|
|
515
|
+
id: z.item.id,
|
|
516
|
+
newName: t || `Copy of ${z.item.name}`,
|
|
517
517
|
targetFolderId: e || void 0
|
|
518
|
-
}),
|
|
519
|
-
fileId:
|
|
520
|
-
fileName:
|
|
518
|
+
}), x.success(o(f, "files.file.copy.success", "\"{{name}}\" copied", { name: z.item.name })), Y("files.file.copied", {
|
|
519
|
+
fileId: z.item.id,
|
|
520
|
+
fileName: z.item.name,
|
|
521
521
|
destinationFolderId: e
|
|
522
|
-
}),
|
|
522
|
+
}), Ut(!1), Kt(null);
|
|
523
523
|
} catch (e) {
|
|
524
|
-
|
|
524
|
+
x.error(e instanceof Error ? e.message : o(f, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: z.item.name })), Y("files.api.failed", {
|
|
525
525
|
action: "copyFile",
|
|
526
|
-
fileId:
|
|
526
|
+
fileId: z.item.id,
|
|
527
527
|
message: e instanceof Error ? e.message : void 0
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
530
|
}, Kn = async () => {
|
|
531
|
-
if (
|
|
532
|
-
let e =
|
|
533
|
-
|
|
534
|
-
fileId:
|
|
531
|
+
if (B && H.trim()) try {
|
|
532
|
+
let e = B.name, t = H.trim();
|
|
533
|
+
B.type === "file" ? (await Z.mutateAsync({
|
|
534
|
+
fileId: B.id,
|
|
535
535
|
newName: t
|
|
536
|
-
}),
|
|
537
|
-
fileId:
|
|
536
|
+
}), x.success(o(f, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), Y("files.file.renamed", {
|
|
537
|
+
fileId: B.id,
|
|
538
538
|
previousName: e,
|
|
539
539
|
name: t
|
|
540
|
-
})) : (await
|
|
541
|
-
folderId:
|
|
540
|
+
})) : (await Q.mutateAsync({
|
|
541
|
+
folderId: B.id,
|
|
542
542
|
newName: t
|
|
543
|
-
}),
|
|
544
|
-
folderId:
|
|
543
|
+
}), x.success(o(f, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), Y("files.folder.renamed", {
|
|
544
|
+
folderId: B.id,
|
|
545
545
|
previousName: e,
|
|
546
546
|
name: t
|
|
547
|
-
})),
|
|
547
|
+
})), P(!1), V(null), U("");
|
|
548
548
|
} catch (e) {
|
|
549
|
-
|
|
550
|
-
action:
|
|
551
|
-
itemId:
|
|
552
|
-
itemType:
|
|
549
|
+
x.error(e instanceof Error ? e.message : o(f, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: B.type })), Y("files.api.failed", {
|
|
550
|
+
action: B.type === "file" ? "renameFile" : "renameFolder",
|
|
551
|
+
itemId: B.id,
|
|
552
|
+
itemType: B.type,
|
|
553
553
|
message: e instanceof Error ? e.message : void 0
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
556
|
};
|
|
557
|
-
return
|
|
558
|
-
files:
|
|
559
|
-
folders:
|
|
557
|
+
return r({
|
|
558
|
+
files: D,
|
|
559
|
+
folders: O,
|
|
560
560
|
onFilePreview: Cn,
|
|
561
561
|
onFileDelete: Dn,
|
|
562
562
|
onFolderOpen: In,
|
|
563
563
|
onFolderDelete: Ln,
|
|
564
564
|
activeTab: v
|
|
565
|
-
}),
|
|
565
|
+
}), h === void 0 ? /* @__PURE__ */ u("div", {
|
|
566
566
|
className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
|
|
567
|
-
children: [/* @__PURE__ */ c
|
|
567
|
+
children: [/* @__PURE__ */ l(c, { className: "size-8 animate-spin text-text-tertiary" }), /* @__PURE__ */ l("p", {
|
|
568
568
|
className: "text-sm text-text-secondary max-w-md",
|
|
569
|
-
children:
|
|
569
|
+
children: o(f, "files.browser.workspace.waiting", "Waiting for workspace context. If this persists, the app shell may not have provided a workspaceId to the Files module. Try reloading the page or switching workspaces.")
|
|
570
570
|
})]
|
|
571
|
-
}) :
|
|
571
|
+
}) : h === "" ? /* @__PURE__ */ u("div", {
|
|
572
572
|
className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
|
|
573
|
-
children: [/* @__PURE__ */
|
|
573
|
+
children: [/* @__PURE__ */ l(qe, { className: "size-8 text-text-tertiary" }), /* @__PURE__ */ l("p", {
|
|
574
574
|
className: "text-sm text-text-secondary max-w-md",
|
|
575
|
-
children:
|
|
575
|
+
children: o(f, "files.browser.workspace.notSelected", "No workspace selected. Please select a workspace to view files.")
|
|
576
576
|
})]
|
|
577
|
-
}) : /* @__PURE__ */
|
|
577
|
+
}) : /* @__PURE__ */ u("div", {
|
|
578
578
|
className: "min-h-screen bg-bg-surface",
|
|
579
579
|
children: [
|
|
580
|
-
/* @__PURE__ */
|
|
580
|
+
/* @__PURE__ */ u("div", {
|
|
581
581
|
className: "relative overflow-hidden bg-bg-surface border-b border-border-seam px-4 py-3 sm:px-6 sm:py-4",
|
|
582
582
|
"data-tour": "files-breadcrumb-nav",
|
|
583
583
|
children: [
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ l(at, { intensity: "subtle" }),
|
|
585
|
+
/* @__PURE__ */ l("h1", {
|
|
586
586
|
className: "mb-2 text-lg font-semibold tracking-tight sm:text-xl",
|
|
587
|
-
children: /* @__PURE__ */
|
|
587
|
+
children: /* @__PURE__ */ l(ct, { children: o(f, "files.browser.rootLabel", "My Drive") })
|
|
588
588
|
}),
|
|
589
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ l("div", {
|
|
590
590
|
className: "flex items-center gap-2 sm:gap-4",
|
|
591
|
-
children: /* @__PURE__ */
|
|
591
|
+
children: /* @__PURE__ */ u("div", {
|
|
592
592
|
className: "flex items-center gap-1 sm:gap-2 text-sm overflow-x-auto",
|
|
593
|
-
children: [/* @__PURE__ */
|
|
593
|
+
children: [/* @__PURE__ */ u("button", {
|
|
594
594
|
type: "button",
|
|
595
|
-
onClick: () =>
|
|
595
|
+
onClick: () => m("/files/browse"),
|
|
596
596
|
className: "flex items-center gap-1 text-text-primary hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap",
|
|
597
|
-
title:
|
|
598
|
-
children: [/* @__PURE__ */
|
|
597
|
+
title: o(f, "files.browser.actions.goToRoot", "Go to root"),
|
|
598
|
+
children: [/* @__PURE__ */ l(Ye, { className: "size-4" }), /* @__PURE__ */ l("span", {
|
|
599
599
|
className: "hidden sm:inline",
|
|
600
|
-
children:
|
|
600
|
+
children: o(f, "files.browser.rootLabel", "My Drive")
|
|
601
601
|
})]
|
|
602
|
-
}),
|
|
602
|
+
}), St.map((e, t) => /* @__PURE__ */ u("div", {
|
|
603
603
|
className: "flex items-center gap-1 sm:gap-2",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
604
|
+
children: [/* @__PURE__ */ l("span", {
|
|
605
605
|
className: "text-text-tertiary",
|
|
606
606
|
children: "/"
|
|
607
|
-
}), /* @__PURE__ */
|
|
607
|
+
}), /* @__PURE__ */ l("button", {
|
|
608
608
|
type: "button",
|
|
609
|
-
onClick: () =>
|
|
610
|
-
className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t ===
|
|
609
|
+
onClick: () => m(`/files/browse/${e.id}`),
|
|
610
|
+
className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === St.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
|
|
611
611
|
title: `Go to ${e.name}`,
|
|
612
612
|
children: e.name
|
|
613
613
|
})]
|
|
614
614
|
}, e.id))]
|
|
615
615
|
})
|
|
616
616
|
}),
|
|
617
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ l(ft, {
|
|
618
618
|
className: "relative mt-2 max-w-3xl",
|
|
619
|
-
children:
|
|
619
|
+
children: o(f, "files.browser.purpose", "Your workspace drive: upload, organise and share documents, images, videos and more with your team. Browse folders, star what you use often, search across everything, and recover deleted items from the Bin.")
|
|
620
620
|
})
|
|
621
621
|
]
|
|
622
622
|
}),
|
|
623
|
-
!
|
|
623
|
+
!y && /* @__PURE__ */ l("div", {
|
|
624
624
|
className: "px-4 pt-3 sm:px-6",
|
|
625
|
-
children: /* @__PURE__ */
|
|
625
|
+
children: /* @__PURE__ */ l(dt, {
|
|
626
626
|
storageKey: "files-browser",
|
|
627
|
-
title:
|
|
627
|
+
title: o(f, "files.browser.nextSteps.title", "Get started with Files"),
|
|
628
628
|
steps: [
|
|
629
629
|
{
|
|
630
630
|
id: "upload",
|
|
631
|
-
label:
|
|
632
|
-
description:
|
|
633
|
-
icon: /* @__PURE__ */
|
|
634
|
-
onClick:
|
|
631
|
+
label: o(f, "files.browser.nextSteps.upload.label", "Upload your first files"),
|
|
632
|
+
description: o(f, "files.browser.nextSteps.upload.description", "Add documents, images or videos to this drive."),
|
|
633
|
+
icon: /* @__PURE__ */ l($e, { className: "size-4" }),
|
|
634
|
+
onClick: hn
|
|
635
635
|
},
|
|
636
636
|
{
|
|
637
637
|
id: "new-folder",
|
|
638
|
-
label:
|
|
639
|
-
description:
|
|
640
|
-
icon: /* @__PURE__ */
|
|
638
|
+
label: o(f, "files.browser.nextSteps.newFolder.label", "Create a folder to organise"),
|
|
639
|
+
description: o(f, "files.browser.nextSteps.newFolder.description", "Group related files so they are easy to find later."),
|
|
640
|
+
icon: /* @__PURE__ */ l(Ge, { className: "size-4" }),
|
|
641
641
|
onClick: xn
|
|
642
642
|
},
|
|
643
643
|
{
|
|
644
644
|
id: "starred",
|
|
645
|
-
label:
|
|
646
|
-
description:
|
|
647
|
-
icon: /* @__PURE__ */
|
|
648
|
-
onClick: () =>
|
|
645
|
+
label: o(f, "files.browser.nextSteps.starred.label", "Star items you use often"),
|
|
646
|
+
description: o(f, "files.browser.nextSteps.starred.description", "Starred files and folders show up under the Starred tab."),
|
|
647
|
+
icon: /* @__PURE__ */ l(Ze, { className: "size-4" }),
|
|
648
|
+
onClick: () => wt("starred")
|
|
649
649
|
},
|
|
650
650
|
{
|
|
651
651
|
id: "bin",
|
|
652
|
-
label:
|
|
653
|
-
description:
|
|
654
|
-
icon: /* @__PURE__ */
|
|
655
|
-
onClick: () =>
|
|
652
|
+
label: o(f, "files.browser.nextSteps.bin.label", "Recover deleted items from the Bin"),
|
|
653
|
+
description: o(f, "files.browser.nextSteps.bin.description", "Deleted files stay in the Bin so you can restore them."),
|
|
654
|
+
icon: /* @__PURE__ */ l(Qe, { className: "size-4" }),
|
|
655
|
+
onClick: () => wt("bin")
|
|
656
656
|
}
|
|
657
657
|
]
|
|
658
658
|
})
|
|
659
659
|
}),
|
|
660
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ l("div", {
|
|
661
661
|
"data-tour": "files-tab-bar",
|
|
662
|
-
children: /* @__PURE__ */
|
|
662
|
+
children: /* @__PURE__ */ l(Te, {
|
|
663
663
|
activeTab: v,
|
|
664
|
-
onTabChange:
|
|
665
|
-
tabs:
|
|
664
|
+
onTabChange: wt,
|
|
665
|
+
tabs: Tt
|
|
666
666
|
})
|
|
667
667
|
}),
|
|
668
|
-
/* @__PURE__ */
|
|
668
|
+
/* @__PURE__ */ u("div", {
|
|
669
669
|
className: "bg-bg-surface border-b border-border-seam px-4 py-2 sm:px-6 sm:py-3",
|
|
670
670
|
children: [
|
|
671
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ u("div", {
|
|
672
672
|
className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-inline-gap",
|
|
673
|
-
children: [/* @__PURE__ */
|
|
673
|
+
children: [/* @__PURE__ */ l("div", {
|
|
674
674
|
className: "w-full sm:flex-1 min-w-0 order-2 sm:order-1",
|
|
675
675
|
"data-tour": "files-search-bar",
|
|
676
|
-
children: /* @__PURE__ */
|
|
676
|
+
children: /* @__PURE__ */ l("div", {
|
|
677
677
|
className: "relative w-full max-w-2xl",
|
|
678
|
-
children: /* @__PURE__ */
|
|
678
|
+
children: /* @__PURE__ */ l(je, {
|
|
679
679
|
onSearch: (e, t) => {
|
|
680
|
-
|
|
680
|
+
Dt(e), kt(t);
|
|
681
681
|
},
|
|
682
|
-
placeholder:
|
|
683
|
-
initialQuery:
|
|
682
|
+
placeholder: o(f, "files.search.input.placeholder", "Search files and folders..."),
|
|
683
|
+
initialQuery: Et,
|
|
684
684
|
showFilters: !0
|
|
685
685
|
})
|
|
686
686
|
})
|
|
687
|
-
}), /* @__PURE__ */
|
|
687
|
+
}), /* @__PURE__ */ u("div", {
|
|
688
688
|
className: "flex items-center gap-2 order-1 sm:order-2 w-full sm:w-auto justify-between sm:justify-end",
|
|
689
|
-
children: [!
|
|
689
|
+
children: [!y && /* @__PURE__ */ u("div", {
|
|
690
690
|
className: "flex items-center gap-2",
|
|
691
691
|
"data-tour": "files-upload-files-button",
|
|
692
|
-
children: [/* @__PURE__ */
|
|
692
|
+
children: [/* @__PURE__ */ u(d, {
|
|
693
693
|
type: "button",
|
|
694
694
|
variant: "default",
|
|
695
|
-
onClick:
|
|
696
|
-
disabled:
|
|
697
|
-
children: [
|
|
698
|
-
}), /* @__PURE__ */
|
|
695
|
+
onClick: hn,
|
|
696
|
+
disabled: qt,
|
|
697
|
+
children: [qt ? /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ l($e, { className: "size-4" }), qt ? o(f, "files.browser.upload.uploading", "Uploading...") : o(f, "files.browser.actions.uploadFiles", "Upload Files")]
|
|
698
|
+
}), /* @__PURE__ */ l("div", {
|
|
699
699
|
"data-tour": "files-more-actions-trigger",
|
|
700
|
-
children: /* @__PURE__ */
|
|
700
|
+
children: /* @__PURE__ */ l(ot, { actions: [
|
|
701
701
|
{
|
|
702
|
-
label:
|
|
703
|
-
icon: /* @__PURE__ */
|
|
702
|
+
label: o(f, "files.browser.actions.newFolder", "New Folder"),
|
|
703
|
+
icon: /* @__PURE__ */ l(Ge, { className: "size-4" }),
|
|
704
704
|
onSelect: xn,
|
|
705
705
|
dataTour: "files-new-folder-button"
|
|
706
706
|
},
|
|
707
707
|
{
|
|
708
|
-
label:
|
|
709
|
-
icon: /* @__PURE__ */
|
|
708
|
+
label: o(f, "files.browser.actions.uploadFolder", "Upload Folder"),
|
|
709
|
+
icon: /* @__PURE__ */ l(Ke, { className: "size-4" }),
|
|
710
710
|
onSelect: bn,
|
|
711
|
-
disabled:
|
|
711
|
+
disabled: qt
|
|
712
712
|
},
|
|
713
|
-
...
|
|
714
|
-
label:
|
|
713
|
+
...D.length > 0 || O.length > 0 ? [{
|
|
714
|
+
label: o(f, "files.browser.actions.selectAll", "Select All"),
|
|
715
715
|
onSelect: () => {
|
|
716
|
-
let e =
|
|
717
|
-
|
|
716
|
+
let e = D.map((e) => e.id), t = O.map((e) => e.id);
|
|
717
|
+
a.getState().selectAllFiles(e), t.forEach((e) => a.getState().selectFolder(e));
|
|
718
718
|
}
|
|
719
719
|
}] : []
|
|
720
720
|
] })
|
|
721
721
|
})]
|
|
722
|
-
}), /* @__PURE__ */
|
|
722
|
+
}), /* @__PURE__ */ u("div", {
|
|
723
723
|
className: "flex items-center border border-border-seam rounded-lg overflow-hidden",
|
|
724
724
|
"data-tour": "files-view-mode-toggle",
|
|
725
|
-
children: [/* @__PURE__ */
|
|
725
|
+
children: [/* @__PURE__ */ l("button", {
|
|
726
726
|
type: "button",
|
|
727
|
-
onClick: () =>
|
|
728
|
-
className: `p-2 transition-colors duration-200 ${
|
|
729
|
-
"aria-label":
|
|
730
|
-
children: /* @__PURE__ */
|
|
731
|
-
}), /* @__PURE__ */
|
|
727
|
+
onClick: () => xt("grid"),
|
|
728
|
+
className: `p-2 transition-colors duration-200 ${bt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
|
|
729
|
+
"aria-label": o(f, "files.browser.view.grid", "Grid view"),
|
|
730
|
+
children: /* @__PURE__ */ l(Je, { className: "size-5" })
|
|
731
|
+
}), /* @__PURE__ */ l("button", {
|
|
732
732
|
type: "button",
|
|
733
|
-
onClick: () =>
|
|
734
|
-
className: `p-2 transition-colors duration-200 ${
|
|
735
|
-
"aria-label":
|
|
736
|
-
children: /* @__PURE__ */
|
|
733
|
+
onClick: () => xt("list"),
|
|
734
|
+
className: `p-2 transition-colors duration-200 ${bt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
|
|
735
|
+
"aria-label": o(f, "files.browser.view.list", "List view"),
|
|
736
|
+
children: /* @__PURE__ */ l(Xe, { className: "size-5" })
|
|
737
737
|
})]
|
|
738
738
|
})]
|
|
739
739
|
})]
|
|
740
740
|
}),
|
|
741
|
-
|
|
741
|
+
y && /* @__PURE__ */ u("div", {
|
|
742
742
|
className: "mt-3 flex items-center justify-between p-3 bg-status-success-bg-subtle rounded-lg border border-status-success-border transition-all duration-200",
|
|
743
|
-
children: [/* @__PURE__ */
|
|
743
|
+
children: [/* @__PURE__ */ u("span", {
|
|
744
744
|
className: "text-sm font-medium text-status-success-text",
|
|
745
|
-
children: [
|
|
746
|
-
}), /* @__PURE__ */
|
|
745
|
+
children: [o(f, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: Et }), E.data && ` (${(E.data.files?.length || 0) + (E.data.folders?.length || 0)} items)`]
|
|
746
|
+
}), /* @__PURE__ */ u("button", {
|
|
747
747
|
type: "button",
|
|
748
|
-
onClick: () =>
|
|
748
|
+
onClick: () => Dt(""),
|
|
749
749
|
className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
|
|
750
|
-
children: [/* @__PURE__ */
|
|
750
|
+
children: [/* @__PURE__ */ l(et, { className: "size-4" }), o(f, "files.browser.search.clear", "Clear search")]
|
|
751
751
|
})]
|
|
752
752
|
}),
|
|
753
|
-
|
|
753
|
+
M > 0 && /* @__PURE__ */ u(st, {
|
|
754
754
|
className: "mt-3 flex items-center justify-between p-3",
|
|
755
|
-
children: [/* @__PURE__ */
|
|
755
|
+
children: [/* @__PURE__ */ u("div", {
|
|
756
756
|
className: "flex items-center gap-4",
|
|
757
|
-
children: [/* @__PURE__ */
|
|
757
|
+
children: [/* @__PURE__ */ l("span", {
|
|
758
758
|
className: "text-sm font-medium text-text-primary",
|
|
759
|
-
children:
|
|
760
|
-
count:
|
|
761
|
-
suffix:
|
|
759
|
+
children: o(f, "files.browser.selection.selectedCount", "{{count}} item{{suffix}} selected", {
|
|
760
|
+
count: M,
|
|
761
|
+
suffix: M > 1 ? "s" : ""
|
|
762
762
|
})
|
|
763
|
-
}), /* @__PURE__ */
|
|
763
|
+
}), /* @__PURE__ */ l("div", {
|
|
764
764
|
className: "flex items-center gap-2",
|
|
765
|
-
children: v === "bin" ? /* @__PURE__ */
|
|
765
|
+
children: v === "bin" ? /* @__PURE__ */ u(tt, { children: [/* @__PURE__ */ l("button", {
|
|
766
766
|
type: "button",
|
|
767
767
|
onClick: async () => {
|
|
768
768
|
try {
|
|
769
|
-
await Promise.all([...Array.from(
|
|
769
|
+
await Promise.all([...Array.from(g).map((e) => rn.mutateAsync({ id: e })), ...Array.from(_).map((e) => an.mutateAsync({ id: e }))]), Ct(), x.success(`${M} item${M > 1 ? "s" : ""} restored`);
|
|
770
770
|
} catch (e) {
|
|
771
|
-
|
|
771
|
+
x.error(e instanceof Error ? e.message : "Failed to restore some items");
|
|
772
772
|
}
|
|
773
773
|
},
|
|
774
774
|
className: "flex items-center gap-1.5 rounded-lg border border-status-success-border bg-bg-surface px-3 py-1.5 text-sm font-medium text-status-success-text transition-colors duration-200 hover:bg-status-success-bg-subtle",
|
|
775
|
-
children:
|
|
776
|
-
}), /* @__PURE__ */
|
|
775
|
+
children: o(f, "files.browser.selection.actions.restore", "Restore")
|
|
776
|
+
}), /* @__PURE__ */ u("button", {
|
|
777
777
|
type: "button",
|
|
778
778
|
onClick: async () => {
|
|
779
|
-
|
|
780
|
-
title:
|
|
781
|
-
description:
|
|
782
|
-
count:
|
|
783
|
-
plural:
|
|
779
|
+
J({
|
|
780
|
+
title: o(f, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
|
|
781
|
+
description: o(f, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
|
|
782
|
+
count: M,
|
|
783
|
+
plural: M > 1 ? "s" : ""
|
|
784
784
|
}),
|
|
785
|
-
confirmLabel:
|
|
785
|
+
confirmLabel: o(f, "files.common.actions.deletePermanently", "Delete permanently"),
|
|
786
786
|
variant: "danger",
|
|
787
787
|
onConfirm: async () => {
|
|
788
788
|
try {
|
|
789
|
-
await Promise.all([...Array.from(
|
|
790
|
-
count:
|
|
791
|
-
plural:
|
|
789
|
+
await Promise.all([...Array.from(g).map((e) => on.mutateAsync({ id: e })), ...Array.from(_).map((e) => sn.mutateAsync({ id: e }))]), Ct(), x.success(o(f, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
|
|
790
|
+
count: M,
|
|
791
|
+
plural: M > 1 ? "s" : ""
|
|
792
792
|
}));
|
|
793
793
|
} catch (e) {
|
|
794
|
-
|
|
794
|
+
x.error(e instanceof Error ? e.message : o(f, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
|
|
795
795
|
}
|
|
796
796
|
}
|
|
797
797
|
});
|
|
798
798
|
},
|
|
799
799
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
|
|
800
|
-
children: [/* @__PURE__ */
|
|
801
|
-
})] }) : /* @__PURE__ */
|
|
800
|
+
children: [/* @__PURE__ */ l(Qe, { className: "size-4" }), o(f, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
|
|
801
|
+
})] }) : /* @__PURE__ */ u("button", {
|
|
802
802
|
type: "button",
|
|
803
803
|
onClick: async () => {
|
|
804
|
-
|
|
805
|
-
title:
|
|
806
|
-
description:
|
|
807
|
-
count:
|
|
808
|
-
plural:
|
|
804
|
+
J({
|
|
805
|
+
title: o(f, "files.confirm.bulkDelete.title", "Delete selected items"),
|
|
806
|
+
description: o(f, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
|
|
807
|
+
count: M,
|
|
808
|
+
plural: M > 1 ? "s" : ""
|
|
809
809
|
}),
|
|
810
|
-
confirmLabel:
|
|
810
|
+
confirmLabel: o(f, "files.common.actions.delete", "Delete"),
|
|
811
811
|
variant: "danger",
|
|
812
812
|
onConfirm: async () => {
|
|
813
813
|
try {
|
|
814
|
-
let e = Array.from(
|
|
815
|
-
e.length > 0 && await
|
|
814
|
+
let e = Array.from(g), t = Array.from(_);
|
|
815
|
+
e.length > 0 && await mn.mutateAsync(e), await Promise.all(t.map((e) => nn.mutateAsync({
|
|
816
816
|
id: e,
|
|
817
817
|
recursive: !0
|
|
818
|
-
}))),
|
|
819
|
-
count:
|
|
820
|
-
plural:
|
|
818
|
+
}))), Ct(), x.success(o(f, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
|
|
819
|
+
count: M,
|
|
820
|
+
plural: M > 1 ? "s" : ""
|
|
821
821
|
}));
|
|
822
822
|
} catch (e) {
|
|
823
|
-
|
|
823
|
+
x.error(e instanceof Error ? e.message : o(f, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
|
|
824
824
|
}
|
|
825
825
|
}
|
|
826
826
|
});
|
|
827
827
|
},
|
|
828
828
|
className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
|
|
829
|
-
children: [/* @__PURE__ */
|
|
829
|
+
children: [/* @__PURE__ */ l(Qe, { className: "size-4" }), o(f, "files.browser.selection.actions.delete", "Delete")]
|
|
830
830
|
})
|
|
831
831
|
})]
|
|
832
|
-
}), /* @__PURE__ */
|
|
832
|
+
}), /* @__PURE__ */ u("button", {
|
|
833
833
|
type: "button",
|
|
834
|
-
onClick:
|
|
834
|
+
onClick: Ct,
|
|
835
835
|
className: "flex items-center gap-2 text-text-link hover:text-action-primary-bg-hover text-sm font-medium transition-colors duration-200",
|
|
836
|
-
children: [/* @__PURE__ */
|
|
836
|
+
children: [/* @__PURE__ */ l(et, { className: "size-4" }), o(f, "files.common.actions.clear", "Clear")]
|
|
837
837
|
})]
|
|
838
838
|
})
|
|
839
839
|
]
|
|
840
840
|
}),
|
|
841
|
-
(
|
|
841
|
+
(yt.isExhausted || yt.isNearLimit) && /* @__PURE__ */ l("div", {
|
|
842
842
|
className: "px-4 sm:px-6 pt-3",
|
|
843
|
-
children: /* @__PURE__ */
|
|
843
|
+
children: /* @__PURE__ */ l(Ie, { quota: yt })
|
|
844
844
|
}),
|
|
845
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ u("div", {
|
|
846
846
|
className: "px-2 sm:px-4 md:px-6 py-3 sm:py-4",
|
|
847
847
|
"data-tour": "files-browser-grid",
|
|
848
|
-
children: [/* @__PURE__ */
|
|
849
|
-
files:
|
|
850
|
-
folders:
|
|
851
|
-
loading:
|
|
852
|
-
error:
|
|
853
|
-
preserveSortOrder:
|
|
848
|
+
children: [/* @__PURE__ */ l(Ce, {
|
|
849
|
+
files: D,
|
|
850
|
+
folders: O,
|
|
851
|
+
loading: k,
|
|
852
|
+
error: A,
|
|
853
|
+
preserveSortOrder: j,
|
|
854
854
|
onFilePreview: Cn,
|
|
855
855
|
onFileShare: v === "bin" ? void 0 : wn,
|
|
856
856
|
onFileDelete: v === "bin" ? kn : Dn,
|
|
@@ -869,208 +869,207 @@ function d() {
|
|
|
869
869
|
onFolderFavorite: v === "bin" ? void 0 : Hn,
|
|
870
870
|
onFolderMove: v === "bin" ? void 0 : Vn,
|
|
871
871
|
onFolderInfo: Un
|
|
872
|
-
}), !
|
|
872
|
+
}), !k && (D.length > 0 || O.length > 0) && /* @__PURE__ */ u("div", {
|
|
873
873
|
className: "mt-4 px-2 text-sm text-text-secondary",
|
|
874
|
-
children: [
|
|
874
|
+
children: [o(f, "files.browser.results.showingItems", "Showing {{count}} items", { count: D.length + O.length }), !y && v === "all" && Nt !== null && ` ${o(f, "files.browser.results.ofItems", "of {{count}} items", { count: Nt })}`]
|
|
875
875
|
})]
|
|
876
876
|
}),
|
|
877
|
-
|
|
877
|
+
Pt && /* @__PURE__ */ l(pt, {
|
|
878
878
|
open: !0,
|
|
879
879
|
onOpenChange: (e) => {
|
|
880
|
-
!e && !
|
|
880
|
+
!e && !X.isPending && (N(!1), G(""));
|
|
881
881
|
},
|
|
882
|
-
children: /* @__PURE__ */
|
|
882
|
+
children: /* @__PURE__ */ u(mt, {
|
|
883
883
|
className: "w-full max-w-xs",
|
|
884
884
|
children: [
|
|
885
|
-
/* @__PURE__ */
|
|
885
|
+
/* @__PURE__ */ l(gt, {
|
|
886
886
|
className: "text-left",
|
|
887
|
-
children: /* @__PURE__ */
|
|
887
|
+
children: /* @__PURE__ */ l(_t, {
|
|
888
888
|
id: "files-new-folder-title",
|
|
889
889
|
className: "text-base font-semibold text-text-primary",
|
|
890
|
-
children:
|
|
890
|
+
children: o(f, "files.browser.newFolderDialog.title", "New folder")
|
|
891
891
|
})
|
|
892
892
|
}),
|
|
893
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ l(ut, {
|
|
894
894
|
type: "text",
|
|
895
|
-
value:
|
|
896
|
-
onChange: (e) =>
|
|
895
|
+
value: W,
|
|
896
|
+
onChange: (e) => G(e.target.value),
|
|
897
897
|
onKeyDown: (e) => {
|
|
898
898
|
e.key === "Enter" && Sn();
|
|
899
899
|
},
|
|
900
|
-
"aria-label":
|
|
901
|
-
placeholder:
|
|
900
|
+
"aria-label": o(f, "files.browser.newFolderDialog.title", "New folder"),
|
|
901
|
+
placeholder: o(f, "files.browser.newFolderDialog.placeholder", "Folder name")
|
|
902
902
|
}),
|
|
903
|
-
/* @__PURE__ */
|
|
903
|
+
/* @__PURE__ */ u(ht, { children: [/* @__PURE__ */ l(d, {
|
|
904
904
|
type: "button",
|
|
905
905
|
variant: "outline",
|
|
906
906
|
onClick: () => {
|
|
907
|
-
|
|
907
|
+
N(!1), G("");
|
|
908
908
|
},
|
|
909
|
-
children:
|
|
910
|
-
}), /* @__PURE__ */
|
|
909
|
+
children: o(f, "files.common.actions.cancel", "Cancel")
|
|
910
|
+
}), /* @__PURE__ */ u(d, {
|
|
911
911
|
type: "button",
|
|
912
912
|
onClick: Sn,
|
|
913
|
-
disabled: !
|
|
914
|
-
children: [
|
|
913
|
+
disabled: !W.trim() || X.isPending,
|
|
914
|
+
children: [X.isPending && /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }), X.isPending ? o(f, "files.browser.newFolderDialog.actions.creating", "Creating...") : o(f, "files.common.actions.create", "Create")]
|
|
915
915
|
})] })
|
|
916
916
|
]
|
|
917
917
|
})
|
|
918
918
|
}),
|
|
919
|
-
|
|
919
|
+
zt && B && /* @__PURE__ */ l(pt, {
|
|
920
920
|
open: !0,
|
|
921
921
|
onOpenChange: (e) => {
|
|
922
|
-
|
|
922
|
+
e || Z.isPending || Q.isPending || (P(!1), V(null), U(""));
|
|
923
923
|
},
|
|
924
|
-
children: /* @__PURE__ */
|
|
924
|
+
children: /* @__PURE__ */ u(mt, {
|
|
925
925
|
className: "w-full max-w-xs",
|
|
926
926
|
children: [
|
|
927
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ l(gt, {
|
|
928
928
|
className: "text-left",
|
|
929
|
-
children: /* @__PURE__ */
|
|
929
|
+
children: /* @__PURE__ */ l(_t, {
|
|
930
930
|
id: "files-rename-title",
|
|
931
931
|
className: "text-base font-semibold text-text-primary",
|
|
932
|
-
children:
|
|
932
|
+
children: o(f, "files.browser.renameDialog.title", "Rename {{type}}", { type: B.type })
|
|
933
933
|
})
|
|
934
934
|
}),
|
|
935
|
-
/* @__PURE__ */
|
|
935
|
+
/* @__PURE__ */ l(ut, {
|
|
936
936
|
type: "text",
|
|
937
|
-
value:
|
|
938
|
-
onChange: (e) =>
|
|
937
|
+
value: H,
|
|
938
|
+
onChange: (e) => U(e.target.value),
|
|
939
939
|
onKeyDown: (e) => {
|
|
940
940
|
e.key === "Enter" && Kn();
|
|
941
941
|
},
|
|
942
|
-
"aria-label":
|
|
943
|
-
placeholder:
|
|
942
|
+
"aria-label": o(f, "files.browser.renameDialog.title", "Rename"),
|
|
943
|
+
placeholder: o(f, "files.browser.renameDialog.placeholder", "New name")
|
|
944
944
|
}),
|
|
945
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ u(ht, { children: [/* @__PURE__ */ l(d, {
|
|
946
946
|
type: "button",
|
|
947
947
|
variant: "outline",
|
|
948
948
|
onClick: () => {
|
|
949
|
-
|
|
949
|
+
P(!1), V(null), U("");
|
|
950
950
|
},
|
|
951
|
-
children:
|
|
952
|
-
}), /* @__PURE__ */
|
|
951
|
+
children: o(f, "files.common.actions.cancel", "Cancel")
|
|
952
|
+
}), /* @__PURE__ */ u(d, {
|
|
953
953
|
type: "button",
|
|
954
954
|
onClick: Kn,
|
|
955
|
-
disabled: !
|
|
956
|
-
children: [(
|
|
955
|
+
disabled: !H.trim() || H.trim() === B.name || Z.isPending || Q.isPending,
|
|
956
|
+
children: [(Z.isPending || Q.isPending) && /* @__PURE__ */ l(c, { className: "size-4 animate-spin" }), Z.isPending || Q.isPending ? o(f, "files.browser.renameDialog.actions.renaming", "Renaming...") : o(f, "files.common.actions.rename", "Rename")]
|
|
957
957
|
})] })
|
|
958
958
|
]
|
|
959
959
|
})
|
|
960
960
|
}),
|
|
961
|
-
|
|
962
|
-
item:
|
|
963
|
-
itemType: "mimeType" in
|
|
961
|
+
Bt && Wt && /* @__PURE__ */ l(Ee, {
|
|
962
|
+
item: Wt,
|
|
963
|
+
itemType: "mimeType" in Wt ? "file" : "folder",
|
|
964
964
|
onClose: () => {
|
|
965
|
-
|
|
965
|
+
F(!1), L(null);
|
|
966
966
|
},
|
|
967
967
|
onCreateShare: En,
|
|
968
|
-
isLoading:
|
|
968
|
+
isLoading: ln.isPending
|
|
969
969
|
}),
|
|
970
|
-
|
|
971
|
-
title:
|
|
972
|
-
description:
|
|
973
|
-
confirmLabel:
|
|
974
|
-
cancelLabel:
|
|
975
|
-
variant:
|
|
976
|
-
loading:
|
|
977
|
-
onConfirm:
|
|
970
|
+
q && /* @__PURE__ */ l(Pe, {
|
|
971
|
+
title: q.title,
|
|
972
|
+
description: q.description,
|
|
973
|
+
confirmLabel: q.confirmLabel,
|
|
974
|
+
cancelLabel: o(f, "files.common.actions.cancel", "Cancel"),
|
|
975
|
+
variant: q.variant,
|
|
976
|
+
loading: q.loading,
|
|
977
|
+
onConfirm: $t,
|
|
978
978
|
onCancel: () => {
|
|
979
|
-
|
|
979
|
+
q.loading || J(null);
|
|
980
980
|
}
|
|
981
981
|
}),
|
|
982
|
-
|
|
983
|
-
title:
|
|
984
|
-
description:
|
|
985
|
-
confirmLabel:
|
|
986
|
-
cancelLabel:
|
|
982
|
+
Ft && /* @__PURE__ */ l(Pe, {
|
|
983
|
+
title: o(f, "files.folder.quota.title", "Folder Limit Reached"),
|
|
984
|
+
description: o(f, "files.folder.quota.description", "You've reached the folder limit for your plan. Upgrade your plan or purchase an add-on to create more folders."),
|
|
985
|
+
confirmLabel: o(f, "files.folder.quota.upgrade", "View Billing"),
|
|
986
|
+
cancelLabel: o(f, "files.common.actions.dismiss", "Dismiss"),
|
|
987
987
|
onConfirm: () => {
|
|
988
|
-
|
|
988
|
+
It(!1), m("/billing");
|
|
989
989
|
},
|
|
990
|
-
onCancel: () =>
|
|
990
|
+
onCancel: () => It(!1)
|
|
991
991
|
}),
|
|
992
|
-
|
|
993
|
-
title:
|
|
994
|
-
description:
|
|
995
|
-
confirmLabel:
|
|
996
|
-
cancelLabel:
|
|
992
|
+
Lt && /* @__PURE__ */ l(Pe, {
|
|
993
|
+
title: o(f, "files.storage.quota.title", "Storage Limit Reached"),
|
|
994
|
+
description: o(f, "files.storage.quota.description", "You've reached the storage limit for your plan. Upgrade your plan or delete files to continue uploading."),
|
|
995
|
+
confirmLabel: o(f, "files.storage.quota.upgrade", "View Billing"),
|
|
996
|
+
cancelLabel: o(f, "files.common.actions.dismiss", "Dismiss"),
|
|
997
997
|
onConfirm: () => {
|
|
998
|
-
|
|
998
|
+
Rt(!1), m("/billing");
|
|
999
999
|
},
|
|
1000
|
-
onCancel: () =>
|
|
1000
|
+
onCancel: () => Rt(!1)
|
|
1001
1001
|
}),
|
|
1002
|
-
|
|
1003
|
-
item:
|
|
1004
|
-
type:
|
|
1002
|
+
Vt && R && /* @__PURE__ */ l(Me, {
|
|
1003
|
+
item: R.item,
|
|
1004
|
+
type: R.type,
|
|
1005
1005
|
onClose: () => {
|
|
1006
|
-
|
|
1006
|
+
I(!1), Gt(null);
|
|
1007
1007
|
},
|
|
1008
1008
|
onMove: Wn,
|
|
1009
|
-
isLoading:
|
|
1009
|
+
isLoading: fn.isPending || pn.isPending
|
|
1010
1010
|
}),
|
|
1011
|
-
|
|
1012
|
-
item:
|
|
1013
|
-
type:
|
|
1011
|
+
Ht && z && /* @__PURE__ */ l(Ne, {
|
|
1012
|
+
item: z.item,
|
|
1013
|
+
type: z.type,
|
|
1014
1014
|
onClose: () => {
|
|
1015
|
-
|
|
1015
|
+
Ut(!1), Kt(null);
|
|
1016
1016
|
},
|
|
1017
1017
|
onCopy: Gn,
|
|
1018
|
-
isLoading:
|
|
1018
|
+
isLoading: dn.isPending
|
|
1019
1019
|
}),
|
|
1020
|
-
|
|
1021
|
-
file:
|
|
1022
|
-
onClose: () =>
|
|
1020
|
+
b && /* @__PURE__ */ l(De, {
|
|
1021
|
+
file: b,
|
|
1022
|
+
onClose: () => Mt(null),
|
|
1023
1023
|
onDownload: () => {
|
|
1024
|
-
let e =
|
|
1025
|
-
e &&
|
|
1024
|
+
let e = b.downloadUrl || b.url;
|
|
1025
|
+
e && Ve(e);
|
|
1026
1026
|
},
|
|
1027
1027
|
onShare: v === "bin" ? void 0 : () => {
|
|
1028
|
-
|
|
1028
|
+
L(b), F(!0);
|
|
1029
1029
|
},
|
|
1030
|
-
onStar: v === "bin" ? void 0 : () => An(
|
|
1031
|
-
onDelete: () => v === "bin" ? kn(
|
|
1030
|
+
onStar: v === "bin" ? void 0 : () => An(b),
|
|
1031
|
+
onDelete: () => v === "bin" ? kn(b) : Dn(b)
|
|
1032
1032
|
}),
|
|
1033
|
-
|
|
1034
|
-
item:
|
|
1035
|
-
type:
|
|
1036
|
-
onClose: () =>
|
|
1033
|
+
At && /* @__PURE__ */ l(Oe, {
|
|
1034
|
+
item: At.item,
|
|
1035
|
+
type: At.type,
|
|
1036
|
+
onClose: () => jt(null)
|
|
1037
1037
|
}),
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
items:
|
|
1040
|
-
isOpen:
|
|
1041
|
-
onClose: () =>
|
|
1038
|
+
/* @__PURE__ */ l(Fe, {
|
|
1039
|
+
items: Jt,
|
|
1040
|
+
isOpen: Yt,
|
|
1041
|
+
onClose: () => Zt(!1),
|
|
1042
1042
|
onPause: gn,
|
|
1043
1043
|
onResume: _n,
|
|
1044
1044
|
onRetry: vn,
|
|
1045
1045
|
onCancel: yn
|
|
1046
1046
|
}),
|
|
1047
|
-
/* @__PURE__ */
|
|
1048
|
-
toasts:
|
|
1049
|
-
onClose:
|
|
1047
|
+
/* @__PURE__ */ l(Ae, {
|
|
1048
|
+
toasts: x.toasts,
|
|
1049
|
+
onClose: x.removeToast
|
|
1050
1050
|
}),
|
|
1051
|
-
!
|
|
1051
|
+
!k && D.length === 0 && O.length === 0 && /* @__PURE__ */ l("div", {
|
|
1052
1052
|
className: "px-6 py-12",
|
|
1053
|
-
children:
|
|
1053
|
+
children: y ? /* @__PURE__ */ l(lt, {
|
|
1054
1054
|
illustration: "empty-search",
|
|
1055
|
-
title:
|
|
1056
|
-
description:
|
|
1057
|
-
action: /* @__PURE__ */
|
|
1055
|
+
title: o(f, "files.browser.empty.search.title", "No results found"),
|
|
1056
|
+
description: o(f, "files.browser.empty.search.description", "Try adjusting your search query or filters"),
|
|
1057
|
+
action: /* @__PURE__ */ l(d, {
|
|
1058
1058
|
type: "button",
|
|
1059
1059
|
onClick: () => {
|
|
1060
|
-
|
|
1060
|
+
Dt(""), kt(void 0);
|
|
1061
1061
|
},
|
|
1062
|
-
children:
|
|
1062
|
+
children: o(f, "files.browser.search.clear", "Clear search")
|
|
1063
1063
|
})
|
|
1064
|
-
}) : /* @__PURE__ */
|
|
1064
|
+
}) : /* @__PURE__ */ l(ke, {
|
|
1065
1065
|
type: v,
|
|
1066
|
-
onUpload: v === "all" ?
|
|
1066
|
+
onUpload: v === "all" ? hn : void 0,
|
|
1067
1067
|
onNewFolder: v === "all" ? xn : void 0
|
|
1068
1068
|
})
|
|
1069
1069
|
})
|
|
1070
1070
|
]
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
|
-
|
|
1074
|
-
export { d as BrowserPage };
|
|
1073
|
+
export { f as BrowserPage };
|
|
1075
1074
|
|
|
1076
1075
|
//# sourceMappingURL=BrowserPage.js.map
|