@widgetic/file-browser 0.5.36 → 0.5.38
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/components/core/FileBrowser.svelte +88 -98
- package/dist/components/core/FileUploader.svelte +307 -133
- package/dist/components/core/Header.svelte +1 -1
- package/dist/components/core/RecentFiles.svelte +21 -8
- package/dist/components/core/SearchDropdown.svelte +312 -0
- package/dist/components/core/SearchDropdown.svelte.d.ts +30 -0
- package/dist/components/core/UploadPanel.svelte +27 -15
- package/dist/components/core/UploadPanel.svelte.d.ts +3 -0
- package/dist/components/core/UploadRow.svelte +22 -1
- package/dist/components/core/UploadRow.svelte.d.ts +3 -0
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.js +1 -0
- package/dist/components/items/FileItem.svelte +28 -3
- package/dist/components/items/FolderItem.svelte +21 -2
- package/dist/components/modals/MoveDialog.svelte +16 -11
- package/dist/components/modals/MoveDialog.svelte.d.ts +1 -0
- package/dist/components/modals/SearchModal.svelte +4 -44
- package/dist/components/ui/DropdownMenu.svelte +7 -3
- package/dist/components/ui/DropdownMenu.svelte.d.ts +1 -0
- package/dist/i18n/messages.d.ts +7 -1
- package/dist/i18n/messages.js +7 -1
- package/dist/utils/fileNames.d.ts +9 -0
- package/dist/utils/fileNames.js +19 -0
- package/dist/utils/libraryTree.d.ts +22 -0
- package/dist/utils/libraryTree.js +177 -0
- package/dist/utils/searchItems.d.ts +27 -0
- package/dist/utils/searchItems.js +77 -0
- package/dist/utils/uploadProgressMath.d.ts +29 -0
- package/dist/utils/uploadProgressMath.js +66 -0
- package/dist/utils/uploadResponseMapping.d.ts +11 -0
- package/dist/utils/uploadResponseMapping.js +51 -0
- package/dist/utils/uploadUiHelpers.d.ts +28 -0
- package/dist/utils/uploadUiHelpers.js +49 -0
- package/dist/utils/userUploadsStorage.d.ts +2 -2
- package/dist/utils/userUploadsStorage.js +25 -17
- package/dist/utils/widgeticTusUpload.d.ts +2 -0
- package/dist/utils/widgeticTusUpload.js +4 -20
- package/dist/utils/widgeticUpload.js +3 -66
- package/dist/utils/xhrMultipartUpload.d.ts +16 -0
- package/dist/utils/xhrMultipartUpload.js +125 -0
- package/package.json +3 -3
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import '@widgetic/design-system/styles';
|
|
22
22
|
|
|
23
23
|
// Design system components
|
|
24
|
-
import { Alert, Button, DebugGrid, WScrollArea, EmptyState, ErrorState, ActionModal,
|
|
24
|
+
import { Alert, Button, DebugGrid, WScrollArea, EmptyState, ErrorState, ActionModal, DropdownMenu, Tooltip, IconButton } from '@widgetic/design-system/components';
|
|
25
25
|
import {
|
|
26
26
|
IconCheck,
|
|
27
27
|
IconPhoto,
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
|
|
43
43
|
// LOCAL COMPONENT IMPORTS
|
|
44
44
|
import { NewFolderButton } from '../modals';
|
|
45
|
-
import { RecentFiles, Header, FileUploader } from './';
|
|
45
|
+
import { RecentFiles, Header, FileUploader, SearchDropdown } from './';
|
|
46
46
|
import { FilePreview } from '../previews';
|
|
47
|
-
import { SelectedFilesModal,
|
|
47
|
+
import { SelectedFilesModal, RenameDialog, MoveDialog } from '../modals';
|
|
48
48
|
import { NewItemDialog } from '@widgetic/design-system/components';
|
|
49
49
|
import { FileItem, FolderItem } from '../items';
|
|
50
50
|
import { VirtualList, DragSelect, ControlToolbar } from '../ui';
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
import { resolveMediaLibrary, type ResolvedMediaLibrary } from '../../mediaLibrary/resolve';
|
|
118
118
|
import { appendNewFiles, createLibraryRoot, removeFiles, replaceFile, upsertFile } from '../../mediaLibrary/treeOps';
|
|
119
119
|
import type { MediaLibraryErrorCode, MediaLibraryProvider } from '../../mediaLibrary/types';
|
|
120
|
-
import { getRenamedFileName } from '../../utils/fileNames';
|
|
120
|
+
import { getRenamedFileName, splitFileName } from '../../utils/fileNames';
|
|
121
121
|
|
|
122
122
|
// I18N IMPORTS (the words of the File Browser, in the page's language)
|
|
123
123
|
import { provideI18n } from '../../i18n/context';
|
|
@@ -443,7 +443,6 @@
|
|
|
443
443
|
|
|
444
444
|
// Modal visibility states
|
|
445
445
|
let showModal = false; // Selected files modal
|
|
446
|
-
let showSearchModal = false; // Search interface
|
|
447
446
|
let showRenameDialog = false; // Rename dialog
|
|
448
447
|
let showMoveDialog = false; // Move file/folder dialog
|
|
449
448
|
let showDeleteConfirmation = false; // Delete confirmation
|
|
@@ -453,6 +452,13 @@
|
|
|
453
452
|
// It is set when the dialog opens, so the dialog names (and deletes) exactly what the visitor pointed at.
|
|
454
453
|
let itemsPendingDeletion: FileSystemItem[] = [];
|
|
455
454
|
|
|
455
|
+
// The rename dialog edits the name of a file without its extension: the extension is always kept (see handleRename).
|
|
456
|
+
$: renameDialogDisplayName = selectedItem
|
|
457
|
+
? selectedItem.type === 'file'
|
|
458
|
+
? splitFileName(selectedItem.name).baseName
|
|
459
|
+
: selectedItem.name
|
|
460
|
+
: '';
|
|
461
|
+
|
|
456
462
|
// UI state calculations
|
|
457
463
|
// let controlsVisible: boolean;
|
|
458
464
|
// $: controlsVisible = showFilters || showSorting;
|
|
@@ -471,6 +477,10 @@
|
|
|
471
477
|
// A library supplies every file, so `data` handed in by the host is not used next to it.
|
|
472
478
|
if (libraryMode) data = null;
|
|
473
479
|
|
|
480
|
+
// When the host draws the breadcrumbs in its own bar (`showBreadcrumbs` false) the first row of the browser has no
|
|
481
|
+
// header above it: it gets the top spacing of the header (Figma "Files" page, node 292:1945) so it is not cut off.
|
|
482
|
+
$: controlsTopPaddingClass = !showBreadcrumbs && !libraryMode ? (isCompactLayout ? 'pt-4' : 'pt-6') : '';
|
|
483
|
+
|
|
474
484
|
// The library as the File Browser uses it: every answer checked, every failure a MediaLibraryError.
|
|
475
485
|
let resolvedMediaLibrary: ResolvedMediaLibrary | null = null;
|
|
476
486
|
// Set when `mediaLibrary` is not a usable library: the screen says so instead of showing files.
|
|
@@ -930,22 +940,6 @@
|
|
|
930
940
|
* These functions handle user interactions with search and folder navigation
|
|
931
941
|
*/
|
|
932
942
|
|
|
933
|
-
/**
|
|
934
|
-
* Opens the search modal for file/folder search
|
|
935
|
-
*/
|
|
936
|
-
function handleSearch() {
|
|
937
|
-
if (!showModal) { // Don't show if selected files modal is open
|
|
938
|
-
showSearchModal = true;
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
/**
|
|
943
|
-
* Closes the search modal and resets search state
|
|
944
|
-
*/
|
|
945
|
-
function handleSearchClose() {
|
|
946
|
-
showSearchModal = false;
|
|
947
|
-
}
|
|
948
|
-
|
|
949
943
|
/**
|
|
950
944
|
* Handles navigation from search results
|
|
951
945
|
* Processes the path and updates current location
|
|
@@ -976,7 +970,6 @@
|
|
|
976
970
|
navigationStore.navigateToFolder(newPath, true);
|
|
977
971
|
currentFolder.set(newPath);
|
|
978
972
|
currentPath = newPath;
|
|
979
|
-
showSearchModal = false;
|
|
980
973
|
|
|
981
974
|
// If there's a preview item, handle it the same way for both search and selected files
|
|
982
975
|
if (event.detail.preview) {
|
|
@@ -1408,9 +1401,7 @@
|
|
|
1408
1401
|
$: selectedFilesCount = $selectedFiles.length;
|
|
1409
1402
|
|
|
1410
1403
|
function toggleModal() {
|
|
1411
|
-
|
|
1412
|
-
showModal = !showModal;
|
|
1413
|
-
}
|
|
1404
|
+
showModal = !showModal;
|
|
1414
1405
|
}
|
|
1415
1406
|
|
|
1416
1407
|
/**
|
|
@@ -1423,6 +1414,16 @@
|
|
|
1423
1414
|
const { action, item } = event.detail;
|
|
1424
1415
|
|
|
1425
1416
|
if (isFileSystemItem(item)) {
|
|
1417
|
+
// The built-in Uploads folder always stays at the root (the library is rebuilt around it on every load)
|
|
1418
|
+
if (
|
|
1419
|
+
item.id === 'folder_my_uploads' &&
|
|
1420
|
+
item.type === 'folder' &&
|
|
1421
|
+
(action === 'rename' || action === 'move' || action === 'delete')
|
|
1422
|
+
) {
|
|
1423
|
+
if (showLogs) console.log('[FileBrowser] Blocked action on built-in Uploads folder:', action);
|
|
1424
|
+
return;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1426
1427
|
// Use allSelectedFiles instead of validSelectedFiles to get ALL selected files across ALL folders
|
|
1427
1428
|
const validSelectedFiles = allSelectedFiles;
|
|
1428
1429
|
// console.log('Current valid selections across all folders:', validSelectedFiles);
|
|
@@ -1523,6 +1524,8 @@
|
|
|
1523
1524
|
// Store the item's ID before resetting selection
|
|
1524
1525
|
const itemId = selectedItem.id;
|
|
1525
1526
|
const oldName = selectedItem.name;
|
|
1527
|
+
// The name the item ends up with: the dialog edits a file without its extension, which is always kept
|
|
1528
|
+
const finalName = selectedItem.type === 'file' ? getRenamedFileName(selectedItem.name, newName.trim()) : newName.trim();
|
|
1526
1529
|
|
|
1527
1530
|
// Close the dialog and reset selection immediately to prevent UI blocking
|
|
1528
1531
|
showRenameDialog = false;
|
|
@@ -1542,8 +1545,10 @@
|
|
|
1542
1545
|
// The File Browser was closed while the library was working: there is no one to tell.
|
|
1543
1546
|
if (libraryMode && libraryActionsController.signal.aborted) return;
|
|
1544
1547
|
if (success) {
|
|
1548
|
+
// The new name is part of the saved tree of the Widgetic library
|
|
1549
|
+
persistMyUploadsTree();
|
|
1545
1550
|
showToast('success', $t('toast.rename.done'), {
|
|
1546
|
-
description: $t('toast.rename.doneDetail', { oldName, newName }),
|
|
1551
|
+
description: $t('toast.rename.doneDetail', { oldName, newName: finalName }),
|
|
1547
1552
|
});
|
|
1548
1553
|
} else {
|
|
1549
1554
|
showToast('error', $t('toast.rename.failed'), {
|
|
@@ -1715,11 +1720,14 @@
|
|
|
1715
1720
|
}
|
|
1716
1721
|
$: if (!libraryMode) nameBuiltInFolder($t('library.defaultLabel'));
|
|
1717
1722
|
|
|
1723
|
+
// Saves the whole root of the Widgetic library (the built-in Uploads folder, the folders next to it and the files loose
|
|
1724
|
+
// at the root), so an upload, a new folder, a rename or a move keeps its place after a reload.
|
|
1718
1725
|
function persistMyUploadsTree() {
|
|
1726
|
+
// A host's media library (and the demo content) keep nothing on this device
|
|
1727
|
+
if (libraryMode || !isWidgeticLibraryMode()) return;
|
|
1719
1728
|
const store = get(fileStore);
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
saveLibraryTreeChildren(myUploads.children);
|
|
1729
|
+
if (store.root?.children) {
|
|
1730
|
+
saveLibraryTreeChildren(store.root.children);
|
|
1723
1731
|
}
|
|
1724
1732
|
}
|
|
1725
1733
|
|
|
@@ -1918,20 +1926,21 @@
|
|
|
1918
1926
|
|
|
1919
1927
|
$: fileTypesText = formatFileTypesForDisplay($t);
|
|
1920
1928
|
|
|
1929
|
+
/** First segment of inline search location lines (header root / library label). */
|
|
1930
|
+
$: searchRootLabel = libraryMode
|
|
1931
|
+
? (resolvedMediaLibrary?.hasOwnLabel ? resolvedMediaLibrary.label : $t('library.defaultLabel'))
|
|
1932
|
+
: $t('breadcrumbs.root');
|
|
1933
|
+
|
|
1921
1934
|
function handleModalClose() {
|
|
1922
1935
|
showModal = false;
|
|
1923
1936
|
}
|
|
1924
1937
|
|
|
1925
|
-
function handleSearchModalClose() {
|
|
1926
|
-
showSearchModal = false;
|
|
1927
|
-
}
|
|
1928
|
-
|
|
1929
1938
|
/**
|
|
1930
1939
|
* Handles successful file upload
|
|
1931
1940
|
* Updates file list and sorts according to current criteria
|
|
1932
1941
|
*/
|
|
1933
1942
|
function handleFileUploaded(event: CustomEvent) {
|
|
1934
|
-
const { file, success } = event.detail;
|
|
1943
|
+
const { file, success, pathIds } = event.detail;
|
|
1935
1944
|
|
|
1936
1945
|
// A media library keeps the file itself: the list only shows what it stored. Nothing is saved on this device.
|
|
1937
1946
|
if (libraryMode) {
|
|
@@ -1949,35 +1958,38 @@
|
|
|
1949
1958
|
};
|
|
1950
1959
|
saveUserUpload(uploadedFile);
|
|
1951
1960
|
|
|
1961
|
+
// The folder the upload was started in: the visitor may have opened another folder while it was uploading
|
|
1962
|
+
const uploadPath: string[] = Array.isArray(pathIds) ? pathIds : currentPath;
|
|
1963
|
+
const isUploadFolderOpen =
|
|
1964
|
+
uploadPath.length === currentPath.length && uploadPath.every((id, index) => id === currentPath[index]);
|
|
1965
|
+
|
|
1952
1966
|
// Update the fileStore with the new file
|
|
1953
1967
|
fileStore.update(store => {
|
|
1954
1968
|
if (!store.root) return store;
|
|
1955
1969
|
|
|
1956
|
-
// Find the target folder in the store
|
|
1970
|
+
// Find the target folder in the store: an upload stays in the folder it was made in (the root too)
|
|
1957
1971
|
let currentFolder = store.root;
|
|
1958
1972
|
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1973
|
+
// Traverse to the target folder using the path of the upload
|
|
1974
|
+
for (const pathSegment of uploadPath) {
|
|
1975
|
+
const nextFolder = currentFolder.children?.find(
|
|
1976
|
+
item => item.type === 'folder' && item.id === pathSegment
|
|
1962
1977
|
);
|
|
1963
|
-
if (!
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
for (const pathSegment of currentPath) {
|
|
1968
|
-
const nextFolder = currentFolder.children?.find(
|
|
1969
|
-
item => item.type === 'folder' && item.id === pathSegment
|
|
1970
|
-
);
|
|
1971
|
-
if (!nextFolder) return store; // Path not found, return unchanged store
|
|
1972
|
-
currentFolder = nextFolder;
|
|
1978
|
+
if (!nextFolder) {
|
|
1979
|
+
// The folder is gone (deleted or moved meanwhile): the root keeps the file instead of losing it
|
|
1980
|
+
currentFolder = store.root;
|
|
1981
|
+
break;
|
|
1973
1982
|
}
|
|
1983
|
+
currentFolder = nextFolder;
|
|
1974
1984
|
}
|
|
1975
1985
|
|
|
1976
1986
|
// Add the new file to the current folder's children
|
|
1977
1987
|
if (currentFolder.children) {
|
|
1978
|
-
// Check for duplicates before adding
|
|
1988
|
+
// Check for duplicates before adding (the Widgetic library may hold two files with one name: compare ids)
|
|
1979
1989
|
const isDuplicate = currentFolder.children.some(
|
|
1980
|
-
existingFile =>
|
|
1990
|
+
existingFile => isWidgeticLibraryMode()
|
|
1991
|
+
? existingFile.id === uploadedFile.id
|
|
1992
|
+
: existingFile.name === file.name
|
|
1981
1993
|
);
|
|
1982
1994
|
|
|
1983
1995
|
if (!isDuplicate) {
|
|
@@ -2008,8 +2020,8 @@
|
|
|
2008
2020
|
}
|
|
2009
2021
|
});
|
|
2010
2022
|
|
|
2011
|
-
// Force a reactive update of the current folder content
|
|
2012
|
-
currentFolderContent = { ...currentFolder };
|
|
2023
|
+
// Force a reactive update of the current folder content (only when the upload folder is the one on screen)
|
|
2024
|
+
if (isUploadFolderOpen) currentFolderContent = { ...currentFolder };
|
|
2013
2025
|
|
|
2014
2026
|
// Update recent files if we're in the root folder
|
|
2015
2027
|
if (currentPath.length === 0) {
|
|
@@ -2017,7 +2029,7 @@
|
|
|
2017
2029
|
}
|
|
2018
2030
|
|
|
2019
2031
|
// Ensure the file appears in the virtual list by forcing an update
|
|
2020
|
-
sortedFilteredFiles = [...sortedFilteredFiles, uploadedFile].sort((a, b) => {
|
|
2032
|
+
if (isUploadFolderOpen) sortedFilteredFiles = [...sortedFilteredFiles, uploadedFile].sort((a, b) => {
|
|
2021
2033
|
if (a.type === 'folder' && b.type !== 'folder') return -1;
|
|
2022
2034
|
if (a.type !== 'folder' && b.type === 'folder') return 1;
|
|
2023
2035
|
return 0;
|
|
@@ -2026,12 +2038,12 @@
|
|
|
2026
2038
|
// Log the file addition
|
|
2027
2039
|
if(showLogs) console.log('Added file:', {
|
|
2028
2040
|
name: file.name,
|
|
2029
|
-
path:
|
|
2041
|
+
path: uploadPath,
|
|
2030
2042
|
url: file.url
|
|
2031
2043
|
});
|
|
2032
2044
|
|
|
2033
2045
|
// Scroll to and highlight the new file after a short delay to ensure rendering
|
|
2034
|
-
setTimeout(() => {
|
|
2046
|
+
if (isUploadFolderOpen) setTimeout(() => {
|
|
2035
2047
|
scrollItemIntoView(file.id);
|
|
2036
2048
|
const itemElement = findItemElement(file.id);
|
|
2037
2049
|
if (itemElement) {
|
|
@@ -2048,20 +2060,17 @@
|
|
|
2048
2060
|
// Initialize children array if it doesn't exist
|
|
2049
2061
|
currentFolder.children = [uploadedFile];
|
|
2050
2062
|
// Force a reactive update
|
|
2051
|
-
|
|
2052
|
-
|
|
2063
|
+
if (isUploadFolderOpen) {
|
|
2064
|
+
currentFolderContent = { ...currentFolder };
|
|
2065
|
+
sortedFilteredFiles = [uploadedFile];
|
|
2066
|
+
}
|
|
2053
2067
|
if(showLogs) console.log('Created new children array with file:', file.name);
|
|
2054
2068
|
}
|
|
2055
2069
|
|
|
2056
2070
|
return store;
|
|
2057
2071
|
});
|
|
2072
|
+
// The file keeps its place in the saved tree of the Widgetic library (no jump to another folder after an upload)
|
|
2058
2073
|
persistMyUploadsTree();
|
|
2059
|
-
if (isWidgeticLibraryMode() && currentPath[0] !== 'folder_my_uploads') {
|
|
2060
|
-
const myUploadsPath = ['folder_my_uploads'];
|
|
2061
|
-
navigationStore.navigateToFolder(myUploadsPath, true);
|
|
2062
|
-
currentFolder.set(myUploadsPath);
|
|
2063
|
-
if (showLogs) console.log('[FileBrowser] Navigated into My uploads after upload');
|
|
2064
|
-
}
|
|
2065
2074
|
}
|
|
2066
2075
|
}
|
|
2067
2076
|
|
|
@@ -2818,21 +2827,16 @@ mainGridClass="app-main-grid"
|
|
|
2818
2827
|
/>
|
|
2819
2828
|
|
|
2820
2829
|
<!-- FILE BROWSER CONTROLS (Search Field + filter/sort triggers) -->
|
|
2821
|
-
<!-- One row
|
|
2822
|
-
<div class="file-browser-controls flex shrink-0 gap-2 pb-4 {
|
|
2823
|
-
<div class="search-bar-container flex min-w-0 items-center
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
onKeydown={() => {}}
|
|
2832
|
-
onClear={() => {}}
|
|
2833
|
-
onPaste={() => {}}
|
|
2834
|
-
/>
|
|
2835
|
-
</div>
|
|
2830
|
+
<!-- One row at every width: the search shrinks beside the filter and sort. With no header, this row carries the top inset. -->
|
|
2831
|
+
<div class="file-browser-controls flex min-w-0 shrink-0 flex-nowrap items-center gap-2 pb-4 {controlsTopPaddingClass} {edgePaddingClass}">
|
|
2832
|
+
<div class="search-bar-container relative z-[61] flex min-w-0 flex-1 items-center">
|
|
2833
|
+
<SearchDropdown
|
|
2834
|
+
root={$fileStore.root}
|
|
2835
|
+
currentFilter={filter}
|
|
2836
|
+
rootDisplayLabel={searchRootLabel}
|
|
2837
|
+
{showLogs}
|
|
2838
|
+
on:navigate={handleSearchNavigate}
|
|
2839
|
+
/>
|
|
2836
2840
|
</div>
|
|
2837
2841
|
|
|
2838
2842
|
{#if showFilters || showSorting}
|
|
@@ -2936,11 +2940,12 @@ mainGridClass="app-main-grid"
|
|
|
2936
2940
|
{/snippet}
|
|
2937
2941
|
</Tooltip.Trigger>
|
|
2938
2942
|
<Tooltip.Portal>
|
|
2943
|
+
<!-- Opens above the button. The page portal paints it over the module box. -->
|
|
2939
2944
|
<Tooltip.Content
|
|
2940
2945
|
side="top"
|
|
2941
2946
|
align="end"
|
|
2942
2947
|
sideOffset={8}
|
|
2943
|
-
class="sort-order-tooltip bg-
|
|
2948
|
+
class="sort-order-tooltip bg-foreground text-background z-[99999] whitespace-pre-line rounded-lg px-2 py-1 text-center text-caption"
|
|
2944
2949
|
>
|
|
2945
2950
|
{$sortDirection === 'asc' ? $t('sort.orderDescending') : $t('sort.orderAscending')}
|
|
2946
2951
|
</Tooltip.Content>
|
|
@@ -3199,17 +3204,6 @@ mainGridClass="app-main-grid"
|
|
|
3199
3204
|
/>
|
|
3200
3205
|
{/if}
|
|
3201
3206
|
|
|
3202
|
-
{#if showSearchModal}
|
|
3203
|
-
<SearchModal
|
|
3204
|
-
bind:open={showSearchModal}
|
|
3205
|
-
target={rootContainerClass}
|
|
3206
|
-
currentFilter={filter}
|
|
3207
|
-
on:close={handleSearchModalClose}
|
|
3208
|
-
on:navigate={handleSearchNavigate}
|
|
3209
|
-
on:preview={(event : any) => handleFileClick(event.detail)}
|
|
3210
|
-
/>
|
|
3211
|
-
{/if}
|
|
3212
|
-
|
|
3213
3207
|
{#if previewFile}
|
|
3214
3208
|
<FilePreview
|
|
3215
3209
|
file={previewFile}
|
|
@@ -3226,7 +3220,7 @@ mainGridClass="app-main-grid"
|
|
|
3226
3220
|
{#if showRenameDialog}
|
|
3227
3221
|
<RenameDialog
|
|
3228
3222
|
isOpen={showRenameDialog}
|
|
3229
|
-
itemName={
|
|
3223
|
+
itemName={renameDialogDisplayName}
|
|
3230
3224
|
itemType={selectedItem?.type === 'folder' ? 'folder' : 'file'}
|
|
3231
3225
|
itemId={selectedItem?.id ?? ''}
|
|
3232
3226
|
title={$t('dialog.rename.title')}
|
|
@@ -3259,6 +3253,8 @@ mainGridClass="app-main-grid"
|
|
|
3259
3253
|
{sourceItems}
|
|
3260
3254
|
currentPath={currentPath}
|
|
3261
3255
|
target={rootContainerClass}
|
|
3256
|
+
localOnly={isWidgeticLibraryMode()}
|
|
3257
|
+
on:move={() => persistMyUploadsTree()}
|
|
3262
3258
|
on:resetNavigation={handleResetNavigation}
|
|
3263
3259
|
on:navigate={({ detail }: CustomEvent<NavigateEventDetail>) => {
|
|
3264
3260
|
const newPath = Array.isArray(detail.targetFolderId)
|
|
@@ -3393,11 +3389,5 @@ mainGridClass="app-main-grid"
|
|
|
3393
3389
|
transition: color 300ms ease, background-color 300ms ease, border-color 300ms ease !important;
|
|
3394
3390
|
}
|
|
3395
3391
|
|
|
3396
|
-
/* Add styles for the SearchInput component to make it read-only and clickable */
|
|
3397
|
-
:global(.search-bar-container .w-full input) {
|
|
3398
|
-
cursor: pointer !important;
|
|
3399
|
-
pointer-events: all !important;
|
|
3400
|
-
user-select: none !important;
|
|
3401
|
-
}
|
|
3402
3392
|
</style>
|
|
3403
|
-
</div>
|
|
3393
|
+
</div>
|