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