@burdenoff/microfe-files 2026.1111.3 → 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.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/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/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/pages/BrowserPage.js +540 -495
- 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 +10 -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/translations/en.d.ts +26 -2
- package/dist/translations/en.js +30 -4
- package/dist/translations/en.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,20 @@ the browser declaration alone does not certify storage integrity.
|
|
|
24
24
|
`bun run test` exercises independent byte vectors, bounded multi-chunk reads,
|
|
25
25
|
native mutation inputs, quota failures and cancellation without network requests.
|
|
26
26
|
|
|
27
|
+
## Navigation v2 layout (FluidGrids)
|
|
28
|
+
|
|
29
|
+
`FilesRoot` takes an optional `navigationV2` prop (BOFF-11865). Only fluidgrids-app passes it. When it is on:
|
|
30
|
+
|
|
31
|
+
- the Share dialog states a link's reach under its title;
|
|
32
|
+
- the toolbar "⋯" menu keeps New Folder on its first level, with Upload Folder and Select All under "More";
|
|
33
|
+
- each upload row keeps Retry and Cancel visible and moves Pause/Resume into its own "⋯";
|
|
34
|
+
- files dropped from the desktop onto the browser upload into the folder being browsed;
|
|
35
|
+
- list column headers (Name, Owner, Size, Modified) sort on click;
|
|
36
|
+
- the Copy dialog opens in, and preselects, the folder being browsed;
|
|
37
|
+
- the Rename dialog title is translated as a whole.
|
|
38
|
+
|
|
39
|
+
Without the prop the module looks and works as before. Wording for FluidGrids lives in fluidgrids-app's own translations, not in this module's defaults.
|
|
40
|
+
|
|
27
41
|
## License
|
|
28
42
|
|
|
29
43
|
Proprietary — Copyright Burdenoff Consultancy Services Pvt. Ltd.
|
|
@@ -6,6 +6,16 @@ interface CopyDialogProps {
|
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
onCopy: (destinationFolderId: string | null, newName?: string) => Promise<void>;
|
|
8
8
|
isLoading?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Folder the dialog opens in and preselects as the destination (null is the
|
|
11
|
+
* root). Navigation v2 passes the folder being browsed (BOFF-11865).
|
|
12
|
+
*/
|
|
13
|
+
initialFolderId?: string | null;
|
|
14
|
+
/** Path to `initialFolderId`, root first, for the dialog's breadcrumb. */
|
|
15
|
+
initialBreadcrumbs?: ReadonlyArray<{
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
}>;
|
|
9
19
|
}
|
|
10
20
|
export declare const CopyDialog: FC<CopyDialogProps>;
|
|
11
21
|
export {};
|
|
@@ -1,140 +1,138 @@
|
|
|
1
1
|
import { useFoldersQuery as e } from "../hooks/useFoldersQuery.js";
|
|
2
2
|
import { tWithFallback as t } from "../utils/i18n.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { copySubmission as n } from "../utils/copyForm.js";
|
|
4
|
+
import { useState as r } from "react";
|
|
5
|
+
import { ChevronRight as i, Folder as a, Home as o, Loader2 as s } from "lucide-react";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { Button as d, Input as f, ResponsiveDialog as p, ResponsiveDialogContent as m, ResponsiveDialogFooter as h, ResponsiveDialogHeader as g, ResponsiveDialogTitle as _ } from "@burdenoff/fe-libs/ui";
|
|
8
9
|
// src/files/components/CopyDialog.tsx
|
|
9
|
-
var
|
|
10
|
-
let { t:
|
|
11
|
-
|
|
10
|
+
var v = ({ item: v, type: y, onClose: b, onCopy: x, isLoading: S = !1, initialFolderId: C = null, initialBreadcrumbs: w = [] }) => {
|
|
11
|
+
let { t: T } = u(), [E, D] = r(C), [O, k] = r(() => C ? [...w] : []), [A, j] = r(C), [M, N] = r(`${t(T, "files.copyDialog.copyOf", "Copy of")} ${v.name}`), { data: P, loading: F } = e(E || void 0), I = P?.getFolders?.folders || [], L = (e) => {
|
|
12
|
+
D(e.id), k([...O, {
|
|
12
13
|
id: e.id,
|
|
13
14
|
name: e.name
|
|
14
15
|
}]);
|
|
15
|
-
},
|
|
16
|
-
if (e === -1)
|
|
16
|
+
}, R = (e) => {
|
|
17
|
+
if (e === -1) D(null), k([]);
|
|
17
18
|
else {
|
|
18
|
-
let t =
|
|
19
|
-
|
|
19
|
+
let t = O[e];
|
|
20
|
+
D(t.id), k(O.slice(0, e + 1));
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ c(p, {
|
|
23
24
|
open: !0,
|
|
24
25
|
onOpenChange: (e) => {
|
|
25
|
-
!e && !
|
|
26
|
+
!e && !S && b();
|
|
26
27
|
},
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ l(m, {
|
|
28
29
|
className: "flex max-h-[80vh] w-full max-w-md flex-col gap-0 p-0",
|
|
29
30
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ c(g, {
|
|
31
32
|
className: "px-6 py-4 border-b border-border-default text-left",
|
|
32
|
-
children: /* @__PURE__ */ c(
|
|
33
|
+
children: /* @__PURE__ */ c(_, {
|
|
33
34
|
className: "text-lg font-semibold text-text-primary",
|
|
34
|
-
children:
|
|
35
|
-
t(S, "files.copyDialog.makeCopyOf", "Make a copy of"),
|
|
36
|
-
" ",
|
|
37
|
-
"\"",
|
|
38
|
-
_.name,
|
|
39
|
-
"\""
|
|
40
|
-
]
|
|
35
|
+
children: t(T, "files.copyDialog.makeCopyOf", "Make a copy of \"{{name}}\"", { name: v.name })
|
|
41
36
|
})
|
|
42
37
|
}),
|
|
43
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ l("div", {
|
|
44
39
|
className: "px-6 py-4 border-b border-border-default",
|
|
45
|
-
children: [/* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ c("label", {
|
|
46
41
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
47
|
-
children: t(
|
|
48
|
-
}), /* @__PURE__ */
|
|
42
|
+
children: t(T, "files.copyDialog.name", "Name")
|
|
43
|
+
}), /* @__PURE__ */ c(f, {
|
|
49
44
|
type: "text",
|
|
50
|
-
value:
|
|
51
|
-
onChange: (e) =>
|
|
52
|
-
"aria-label": t(
|
|
53
|
-
placeholder: t(
|
|
45
|
+
value: M,
|
|
46
|
+
onChange: (e) => N(e.target.value),
|
|
47
|
+
"aria-label": t(T, "files.copyDialog.name", "Name"),
|
|
48
|
+
placeholder: t(T, "files.copyDialog.enterName", "Enter name for the copy")
|
|
54
49
|
})]
|
|
55
50
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ c("div", {
|
|
57
52
|
className: "px-6 py-3 border-b border-border-default bg-bg-sunken",
|
|
58
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ l("div", {
|
|
59
54
|
className: "flex items-center gap-2 text-sm overflow-x-auto",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ l("button", {
|
|
61
56
|
type: "button",
|
|
62
|
-
onClick: () =>
|
|
57
|
+
onClick: () => R(-1),
|
|
63
58
|
className: "flex items-center gap-1.5 text-text-primary hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
65
|
-
}),
|
|
59
|
+
children: [/* @__PURE__ */ c(o, { className: "size-4" }), /* @__PURE__ */ c("span", { children: t(T, "files.copyDialog.myDrive", "My Drive") })]
|
|
60
|
+
}), O.map((e, t) => /* @__PURE__ */ l("div", {
|
|
66
61
|
className: "flex items-center gap-2 whitespace-nowrap",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ c(i, { className: "size-4 text-text-tertiary" }), /* @__PURE__ */ c("button", {
|
|
68
63
|
type: "button",
|
|
69
|
-
onClick: () =>
|
|
70
|
-
className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 ${t ===
|
|
64
|
+
onClick: () => R(t),
|
|
65
|
+
className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 ${t === O.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
|
|
71
66
|
children: e.name
|
|
72
67
|
})]
|
|
73
68
|
}, e.id))]
|
|
74
69
|
})
|
|
75
70
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ c("div", {
|
|
77
72
|
className: "flex-1 overflow-y-auto px-6 py-4",
|
|
78
|
-
children:
|
|
73
|
+
children: F ? /* @__PURE__ */ c("div", {
|
|
79
74
|
className: "flex items-center justify-center py-8",
|
|
80
|
-
children: /* @__PURE__ */ s
|
|
81
|
-
}) :
|
|
82
|
-
className: "text-center py-8",
|
|
83
|
-
children: [/* @__PURE__ */ s(i, { className: "size-12 text-text-tertiary mx-auto mb-3" }), /* @__PURE__ */ s("p", {
|
|
84
|
-
className: "text-sm text-text-secondary",
|
|
85
|
-
children: t(S, "files.copyDialog.noFolders", "No folders here")
|
|
86
|
-
})]
|
|
87
|
-
}) : /* @__PURE__ */ c("div", {
|
|
75
|
+
children: /* @__PURE__ */ c(s, { className: "size-6 text-text-tertiary animate-spin" })
|
|
76
|
+
}) : /* @__PURE__ */ l("div", {
|
|
88
77
|
className: "space-y-1",
|
|
89
|
-
children: [
|
|
90
|
-
|
|
91
|
-
onClick: () => O(C),
|
|
92
|
-
className: `w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-left transition-all duration-200 ${D === C ? "bg-bg-accent border-2 border-action-primary-border" : "hover:bg-action-ghost-bg-hover border-2 border-transparent"}`,
|
|
93
|
-
children: [/* @__PURE__ */ s(i, { className: "size-5 text-text-link" }), /* @__PURE__ */ s("span", {
|
|
94
|
-
className: "font-medium text-text-primary",
|
|
95
|
-
children: t(S, "files.copyDialog.copyHere", "Copy here")
|
|
96
|
-
})]
|
|
97
|
-
}), N.map((e) => /* @__PURE__ */ c("div", {
|
|
98
|
-
className: `flex items-center justify-between gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 ${D === e.id ? "bg-bg-accent border-2 border-action-primary-border" : "hover:bg-action-ghost-bg-hover border-2 border-transparent"}`,
|
|
99
|
-
children: [/* @__PURE__ */ c("button", {
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ l("button", {
|
|
100
80
|
type: "button",
|
|
101
|
-
onClick: () =>
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
81
|
+
onClick: () => j(E),
|
|
82
|
+
"aria-pressed": A === E,
|
|
83
|
+
className: `w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-left transition-all duration-200 ${A === E ? "bg-bg-accent border-2 border-action-primary-border" : "hover:bg-action-ghost-bg-hover border-2 border-transparent"}`,
|
|
84
|
+
children: [/* @__PURE__ */ c(a, { className: "size-5 text-text-link" }), /* @__PURE__ */ c("span", {
|
|
85
|
+
className: "font-medium text-text-primary",
|
|
86
|
+
children: t(T, "files.copyDialog.copyHere", "Copy here")
|
|
106
87
|
})]
|
|
107
|
-
}),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
88
|
+
}),
|
|
89
|
+
I.length === 0 && /* @__PURE__ */ c("p", {
|
|
90
|
+
className: "py-4 text-center text-sm text-text-secondary",
|
|
91
|
+
children: t(T, "files.copyDialog.noFolders", "No folders here")
|
|
92
|
+
}),
|
|
93
|
+
I.map((e) => /* @__PURE__ */ l("div", {
|
|
94
|
+
className: `flex items-center justify-between gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 ${A === e.id ? "bg-bg-accent border-2 border-action-primary-border" : "hover:bg-action-ghost-bg-hover border-2 border-transparent"}`,
|
|
95
|
+
children: [/* @__PURE__ */ l("button", {
|
|
96
|
+
type: "button",
|
|
97
|
+
onClick: () => j(e.id),
|
|
98
|
+
className: "flex items-center gap-3 flex-1 min-w-0",
|
|
99
|
+
children: [/* @__PURE__ */ c(a, { className: "size-5 text-text-link flex-shrink-0" }), /* @__PURE__ */ c("span", {
|
|
100
|
+
className: "font-medium text-text-primary truncate",
|
|
101
|
+
children: e.name
|
|
102
|
+
})]
|
|
103
|
+
}), /* @__PURE__ */ c("button", {
|
|
104
|
+
type: "button",
|
|
105
|
+
onClick: () => L(e),
|
|
106
|
+
className: "p-1.5 text-text-tertiary hover:text-text-secondary hover:bg-action-ghost-bg-hover rounded transition-colors duration-200 flex-shrink-0",
|
|
107
|
+
title: t(T, "files.copyDialog.openFolder", "Open folder"),
|
|
108
|
+
"aria-label": t(T, "files.copyDialog.openFolderNamed", "Open {{name}}", { name: e.name }),
|
|
109
|
+
children: /* @__PURE__ */ c(i, { className: "size-4" })
|
|
110
|
+
})]
|
|
111
|
+
}, e.id))
|
|
112
|
+
]
|
|
116
113
|
})
|
|
117
114
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ l(h, {
|
|
119
116
|
className: "px-6 py-4 border-t border-border-default",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ c(d, {
|
|
121
118
|
type: "button",
|
|
122
119
|
variant: "outline",
|
|
123
|
-
onClick:
|
|
124
|
-
children: t(
|
|
125
|
-
}), /* @__PURE__ */
|
|
120
|
+
onClick: b,
|
|
121
|
+
children: t(T, "files.common.actions.cancel", "Cancel")
|
|
122
|
+
}), /* @__PURE__ */ l(d, {
|
|
126
123
|
type: "button",
|
|
127
124
|
onClick: async () => {
|
|
128
|
-
|
|
125
|
+
let e = n(A, M);
|
|
126
|
+
await x(e.destinationFolderId, e.name), b();
|
|
129
127
|
},
|
|
130
|
-
disabled:
|
|
131
|
-
children: [
|
|
128
|
+
disabled: S || A === void 0 || !M.trim(),
|
|
129
|
+
children: [S && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), S ? t(T, "files.copyDialog.copying", "Copying...") : t(T, "files.copyDialog.copy", "Copy")]
|
|
132
130
|
})]
|
|
133
131
|
})
|
|
134
132
|
]
|
|
135
133
|
})
|
|
136
134
|
});
|
|
137
135
|
};
|
|
138
|
-
export {
|
|
136
|
+
export { v as CopyDialog };
|
|
139
137
|
|
|
140
138
|
//# sourceMappingURL=CopyDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyDialog.js","names":["CopyDialog","useI18n","currentFolderId","setCurrentFolderId","useState","breadcrumbs","setBreadcrumbs","selectedDestination","setSelectedDestination","newName","setNewName","tWithFallback","t","item","loadingFolders","useFoldersQuery","folders","data","handleFolderClick","folder","handleBreadcrumbClick","index","crumb","ResponsiveDialog","next","isLoading","onClose","ResponsiveDialogContent","ResponsiveDialogHeader","ResponsiveDialogTitle","Input","Home","ChevronRight","Loader2","Folder","ResponsiveDialogFooter","Button","onCopy"],"sources":["../../../src/files/components/CopyDialog.tsx"],"sourcesContent":["import { type FC, useState } from \"react\";\nimport { Folder, Home, ChevronRight, Loader2 } from \"lucide-react\";\nimport { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\nimport {\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogFooter,\n Button,\n Input,\n} from \"@burdenoff/fe-libs/ui\";\nimport type { FileItem, FolderItem } from \"../types\";\nimport { useFoldersQuery } from \"../hooks/useFoldersQuery\";\nimport { tWithFallback } from \"../utils/i18n\";\n\ninterface CopyDialogProps {\n item: FileItem | FolderItem;\n type: \"file\" | \"folder\";\n onClose: () => void;\n onCopy: (\n destinationFolderId: string | null,\n newName?: string,\n ) => Promise<void>;\n isLoading?: boolean;\n}\n\nexport const CopyDialog: FC<CopyDialogProps> = ({\n item,\n type,\n onClose,\n onCopy,\n isLoading = false,\n}) => {\n const { t } = useI18n();\n const [currentFolderId, setCurrentFolderId] = useState<string | null>(null);\n const [breadcrumbs, setBreadcrumbs] = useState<\n Array<{ id: string; name: string }>\n >([]);\n const [selectedDestination, setSelectedDestination] = useState<string | null>(\n null,\n );\n const [newName, setNewName] = useState(\n `${tWithFallback(t, \"files.copyDialog.copyOf\", \"Copy of\")} ${item.name}`,\n );\n\n // Fetch folders in current location\n const { data, loading: loadingFolders } = useFoldersQuery(\n currentFolderId || undefined,\n );\n const folders = (data?.getFolders?.folders || []) as FolderItem[];\n\n const handleFolderClick = (folder: FolderItem) => {\n setCurrentFolderId(folder.id);\n setBreadcrumbs([...breadcrumbs, { id: folder.id, name: folder.name }]);\n };\n\n const handleBreadcrumbClick = (index: number) => {\n if (index === -1) {\n // Go to root\n setCurrentFolderId(null);\n setBreadcrumbs([]);\n } else {\n const crumb = breadcrumbs[index];\n setCurrentFolderId(crumb.id);\n setBreadcrumbs(breadcrumbs.slice(0, index + 1));\n }\n };\n\n const handleCopy = async () => {\n await onCopy(selectedDestination, newName.trim() || undefined);\n onClose();\n };\n\n return (\n <ResponsiveDialog\n open\n onOpenChange={(next: boolean) => {\n if (!next && !isLoading) {\n onClose();\n }\n }}\n >\n <ResponsiveDialogContent className=\"flex max-h-[80vh] w-full max-w-md flex-col gap-0 p-0\">\n {/* Header */}\n <ResponsiveDialogHeader className=\"px-6 py-4 border-b border-border-default text-left\">\n <ResponsiveDialogTitle className=\"text-lg font-semibold text-text-primary\">\n {tWithFallback(t, \"files.copyDialog.makeCopyOf\", \"Make a copy of\")}{\" \"}\n "{item.name}"\n </ResponsiveDialogTitle>\n </ResponsiveDialogHeader>\n\n {/* Name input */}\n <div className=\"px-6 py-4 border-b border-border-default\">\n <label className=\"block text-sm font-medium text-text-primary mb-2\">\n {tWithFallback(t, \"files.copyDialog.name\", \"Name\")}\n </label>\n <Input\n type=\"text\"\n value={newName}\n onChange={(e) => setNewName(e.target.value)}\n aria-label={tWithFallback(t, \"files.copyDialog.name\", \"Name\")}\n placeholder={tWithFallback(\n t,\n \"files.copyDialog.enterName\",\n \"Enter name for the copy\",\n )}\n />\n </div>\n\n {/* Breadcrumb navigation */}\n <div className=\"px-6 py-3 border-b border-border-default bg-bg-sunken\">\n <div className=\"flex items-center gap-2 text-sm overflow-x-auto\">\n <button\n type=\"button\"\n onClick={() => handleBreadcrumbClick(-1)}\n className=\"flex items-center gap-1.5 text-text-primary hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap\"\n >\n <Home className=\"size-4\" />\n <span>\n {tWithFallback(t, \"files.copyDialog.myDrive\", \"My Drive\")}\n </span>\n </button>\n {breadcrumbs.map((crumb, index) => (\n <div\n key={crumb.id}\n className=\"flex items-center gap-2 whitespace-nowrap\"\n >\n <ChevronRight className=\"size-4 text-text-tertiary\" />\n <button\n type=\"button\"\n onClick={() => handleBreadcrumbClick(index)}\n className={`hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 ${\n index === breadcrumbs.length - 1\n ? \"text-text-primary font-medium\"\n : \"text-text-secondary\"\n }`}\n >\n {crumb.name}\n </button>\n </div>\n ))}\n </div>\n </div>\n\n {/* Folder list */}\n <div className=\"flex-1 overflow-y-auto px-6 py-4\">\n {loadingFolders ? (\n <div className=\"flex items-center justify-center py-8\">\n <Loader2 className=\"size-6 text-text-tertiary animate-spin\" />\n </div>\n ) : folders.length === 0 ? (\n <div className=\"text-center py-8\">\n <Folder className=\"size-12 text-text-tertiary mx-auto mb-3\" />\n <p className=\"text-sm text-text-secondary\">\n {tWithFallback(\n t,\n \"files.copyDialog.noFolders\",\n \"No folders here\",\n )}\n </p>\n </div>\n ) : (\n <div className=\"space-y-1\">\n {/* Option to copy to current folder */}\n <button\n type=\"button\"\n onClick={() => setSelectedDestination(currentFolderId)}\n className={`w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-left transition-all duration-200 ${\n selectedDestination === currentFolderId\n ? \"bg-bg-accent border-2 border-action-primary-border\"\n : \"hover:bg-action-ghost-bg-hover border-2 border-transparent\"\n }`}\n >\n <Folder className=\"size-5 text-text-link\" />\n <span className=\"font-medium text-text-primary\">\n {tWithFallback(t, \"files.copyDialog.copyHere\", \"Copy here\")}\n </span>\n </button>\n\n {/* List of subfolders */}\n {folders.map((folder) => (\n <div\n key={folder.id}\n className={`flex items-center justify-between gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 ${\n selectedDestination === folder.id\n ? \"bg-bg-accent border-2 border-action-primary-border\"\n : \"hover:bg-action-ghost-bg-hover border-2 border-transparent\"\n }`}\n >\n <button\n type=\"button\"\n onClick={() => setSelectedDestination(folder.id)}\n className=\"flex items-center gap-3 flex-1 min-w-0\"\n >\n <Folder className=\"size-5 text-text-link flex-shrink-0\" />\n <span className=\"font-medium text-text-primary truncate\">\n {folder.name}\n </span>\n </button>\n <button\n type=\"button\"\n onClick={() => handleFolderClick(folder)}\n className=\"p-1.5 text-text-tertiary hover:text-text-secondary hover:bg-action-ghost-bg-hover rounded transition-colors duration-200 flex-shrink-0\"\n title={tWithFallback(\n t,\n \"files.copyDialog.openFolder\",\n \"Open folder\",\n )}\n aria-label={`Open ${folder.name}`}\n >\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* Footer */}\n <ResponsiveDialogFooter className=\"px-6 py-4 border-t border-border-default\">\n <Button type=\"button\" variant=\"outline\" onClick={onClose}>\n {tWithFallback(t, \"files.common.actions.cancel\", \"Cancel\")}\n </Button>\n <Button\n type=\"button\"\n onClick={handleCopy}\n disabled={\n isLoading || selectedDestination === undefined || !newName.trim()\n }\n >\n {isLoading && <Loader2 className=\"size-4 animate-spin\" />}\n {isLoading\n ? tWithFallback(t, \"files.copyDialog.copying\", \"Copying...\")\n : tWithFallback(t, \"files.copyDialog.copy\", \"Copy\")}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n};\n"],"mappings":";;;;;;;;AA2BA,IAAaA,KAAmC,EAC9C,SACA,SACA,YACA,WACA,eAAY,SACR;CACJ,IAAM,EAAE,SAAMC,EAAQ,GAChB,CAACC,GAAiBC,KAAsBC,EAAwB,IAAI,GACpE,CAACC,GAAaC,KAAkBF,EAEpC,CAAC,CAAC,GACE,CAACG,GAAqBC,KAA0BJ,EACpD,IACF,GACM,CAACK,GAASC,KAAcN,EAC5B,GAAGO,EAAcC,GAAG,2BAA2B,SAAS,EAAE,GAAGC,EAAK,MACpE,GAGM,EAAE,SAAM,SAASC,MAAmBC,EACxCb,KAAmB,KAAA,CACrB,GACMc,IAAWC,GAAM,YAAY,WAAW,CAAC,GAEzCC,KAAqB,MAAuB;EAEhD,AADAf,EAAmBgB,EAAO,EAAE,GAC5Bb,EAAe,CAAC,GAAGD,GAAa;GAAE,IAAIc,EAAO;GAAI,MAAMA,EAAO;EAAK,CAAC,CAAC;CACvE,GAEMC,KAAyB,MAAkB;EAC/C,IAAIC,MAAU,IAGZ,AADAlB,EAAmB,IAAI,GACvBG,EAAe,CAAC,CAAC;OACZ;GACL,IAAMgB,IAAQjB,EAAYgB;GAE1B,AADAlB,EAAmBmB,EAAM,EAAE,GAC3BhB,EAAeD,EAAY,MAAM,GAAGgB,IAAQ,CAAC,CAAC;EAChD;CACF;CAOA,OACE,kBAACE,GAAD;EACE,MAAA;EACA,eAAe,MAAkB;GAC/B,AAAI,CAACC,KA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AAU,SAASV;MAC9C,UAAAf,EAAcC,GAAG,+BAA+B,QAAQ;KACnD,CAAA,GACR,kBAACwB,GAAD;MACE,MAAK;MACL,SAAS,YA7JY;OAE7B,AADA,MAAMC,EAAO9B,GAAqBE,EAAQ,KAAK,KAAK,KAAA,CAAS,GAC7DiB,EAAQ;MACV;MA2JU,UACED,KAAalB,MAAwB,KAAA,KAAa,CAACE,EAAQ,KAAK;MAJpE,UAAA,CAOGgB,KAAa,kBAACQ,GAAD,EAAS,WAAU,sBAAuB,CAAA,GACvDR,IACGd,EAAcC,GAAG,4BAA4B,YAAY,IACzDD,EAAcC,GAAG,yBAAyB,MAAM,CAC9C;KACc,CAAA,CAAA;;GACD;;CACT,CAAA;AAEtB"}
|
|
1
|
+
{"version":3,"file":"CopyDialog.js","names":["CopyDialog","useI18n","currentFolderId","setCurrentFolderId","useState","initialFolderId","breadcrumbs","setBreadcrumbs","initialBreadcrumbs","selectedDestination","setSelectedDestination","newName","setNewName","tWithFallback","t","item","loadingFolders","useFoldersQuery","folders","data","handleFolderClick","folder","handleBreadcrumbClick","index","crumb","ResponsiveDialog","next","isLoading","onClose","ResponsiveDialogContent","ResponsiveDialogHeader","ResponsiveDialogTitle","Input","Home","ChevronRight","Loader2","Folder","ResponsiveDialogFooter","Button","submission","copySubmission","onCopy"],"sources":["../../../src/files/components/CopyDialog.tsx"],"sourcesContent":["import { type FC, useState } from \"react\";\nimport { Folder, Home, ChevronRight, Loader2 } from \"lucide-react\";\nimport { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\nimport {\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogFooter,\n Button,\n Input,\n} from \"@burdenoff/fe-libs/ui\";\nimport type { FileItem, FolderItem } from \"../types\";\nimport { useFoldersQuery } from \"../hooks/useFoldersQuery\";\nimport { tWithFallback } from \"../utils/i18n\";\nimport { copySubmission } from \"../utils/copyForm\";\n\ninterface CopyDialogProps {\n item: FileItem | FolderItem;\n type: \"file\" | \"folder\";\n onClose: () => void;\n onCopy: (\n destinationFolderId: string | null,\n newName?: string,\n ) => Promise<void>;\n isLoading?: boolean;\n /**\n * Folder the dialog opens in and preselects as the destination (null is the\n * root). Navigation v2 passes the folder being browsed (BOFF-11865).\n */\n initialFolderId?: string | null;\n /** Path to `initialFolderId`, root first, for the dialog's breadcrumb. */\n initialBreadcrumbs?: ReadonlyArray<{ id: string; name: string }>;\n}\n\nexport const CopyDialog: FC<CopyDialogProps> = ({\n item,\n type,\n onClose,\n onCopy,\n isLoading = false,\n initialFolderId = null,\n initialBreadcrumbs = [],\n}) => {\n const { t } = useI18n();\n const [currentFolderId, setCurrentFolderId] = useState<string | null>(\n initialFolderId,\n );\n const [breadcrumbs, setBreadcrumbs] = useState<\n Array<{ id: string; name: string }>\n >(() => (initialFolderId ? [...initialBreadcrumbs] : []));\n const [selectedDestination, setSelectedDestination] = useState<string | null>(\n initialFolderId,\n );\n const [newName, setNewName] = useState(\n `${tWithFallback(t, \"files.copyDialog.copyOf\", \"Copy of\")} ${item.name}`,\n );\n\n // Fetch folders in current location\n const { data, loading: loadingFolders } = useFoldersQuery(\n currentFolderId || undefined,\n );\n const folders = (data?.getFolders?.folders || []) as FolderItem[];\n\n const handleFolderClick = (folder: FolderItem) => {\n setCurrentFolderId(folder.id);\n setBreadcrumbs([...breadcrumbs, { id: folder.id, name: folder.name }]);\n };\n\n const handleBreadcrumbClick = (index: number) => {\n if (index === -1) {\n // Go to root\n setCurrentFolderId(null);\n setBreadcrumbs([]);\n } else {\n const crumb = breadcrumbs[index];\n setCurrentFolderId(crumb.id);\n setBreadcrumbs(breadcrumbs.slice(0, index + 1));\n }\n };\n\n const handleCopy = async () => {\n const submission = copySubmission(selectedDestination, newName);\n await onCopy(submission.destinationFolderId, submission.name);\n onClose();\n };\n\n return (\n <ResponsiveDialog\n open\n onOpenChange={(next: boolean) => {\n if (!next && !isLoading) {\n onClose();\n }\n }}\n >\n <ResponsiveDialogContent className=\"flex max-h-[80vh] w-full max-w-md flex-col gap-0 p-0\">\n {/* Header */}\n <ResponsiveDialogHeader className=\"px-6 py-4 border-b border-border-default text-left\">\n <ResponsiveDialogTitle className=\"text-lg font-semibold text-text-primary\">\n {tWithFallback(\n t,\n \"files.copyDialog.makeCopyOf\",\n 'Make a copy of \"{{name}}\"',\n { name: item.name },\n )}\n </ResponsiveDialogTitle>\n </ResponsiveDialogHeader>\n\n {/* Name input */}\n <div className=\"px-6 py-4 border-b border-border-default\">\n <label className=\"block text-sm font-medium text-text-primary mb-2\">\n {tWithFallback(t, \"files.copyDialog.name\", \"Name\")}\n </label>\n <Input\n type=\"text\"\n value={newName}\n onChange={(e) => setNewName(e.target.value)}\n aria-label={tWithFallback(t, \"files.copyDialog.name\", \"Name\")}\n placeholder={tWithFallback(\n t,\n \"files.copyDialog.enterName\",\n \"Enter name for the copy\",\n )}\n />\n </div>\n\n {/* Breadcrumb navigation.\n TODO(BOFF-11841): in Navigation v2, wrap the folder picker (this\n breadcrumb and the folder list) in\n <OptionalFields storageKey=\"files.copyDialog\" label={tr('common.moreOptions','More options')}>\n once fe-libs ships it; the destination stays prefilled. */}\n <div className=\"px-6 py-3 border-b border-border-default bg-bg-sunken\">\n <div className=\"flex items-center gap-2 text-sm overflow-x-auto\">\n <button\n type=\"button\"\n onClick={() => handleBreadcrumbClick(-1)}\n className=\"flex items-center gap-1.5 text-text-primary hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap\"\n >\n <Home className=\"size-4\" />\n <span>\n {tWithFallback(t, \"files.copyDialog.myDrive\", \"My Drive\")}\n </span>\n </button>\n {breadcrumbs.map((crumb, index) => (\n <div\n key={crumb.id}\n className=\"flex items-center gap-2 whitespace-nowrap\"\n >\n <ChevronRight className=\"size-4 text-text-tertiary\" />\n <button\n type=\"button\"\n onClick={() => handleBreadcrumbClick(index)}\n className={`hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 ${\n index === breadcrumbs.length - 1\n ? \"text-text-primary font-medium\"\n : \"text-text-secondary\"\n }`}\n >\n {crumb.name}\n </button>\n </div>\n ))}\n </div>\n </div>\n\n {/* Folder list */}\n <div className=\"flex-1 overflow-y-auto px-6 py-4\">\n {loadingFolders ? (\n <div className=\"flex items-center justify-center py-8\">\n <Loader2 className=\"size-6 text-text-tertiary animate-spin\" />\n </div>\n ) : (\n <div className=\"space-y-1\">\n {/* Option to copy to current folder. Always offered, so an empty\n folder can still be the destination. */}\n <button\n type=\"button\"\n onClick={() => setSelectedDestination(currentFolderId)}\n aria-pressed={selectedDestination === currentFolderId}\n className={`w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-left transition-all duration-200 ${\n selectedDestination === currentFolderId\n ? \"bg-bg-accent border-2 border-action-primary-border\"\n : \"hover:bg-action-ghost-bg-hover border-2 border-transparent\"\n }`}\n >\n <Folder className=\"size-5 text-text-link\" />\n <span className=\"font-medium text-text-primary\">\n {tWithFallback(t, \"files.copyDialog.copyHere\", \"Copy here\")}\n </span>\n </button>\n\n {folders.length === 0 && (\n <p className=\"py-4 text-center text-sm text-text-secondary\">\n {tWithFallback(\n t,\n \"files.copyDialog.noFolders\",\n \"No folders here\",\n )}\n </p>\n )}\n\n {/* List of subfolders */}\n {folders.map((folder) => (\n <div\n key={folder.id}\n className={`flex items-center justify-between gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 ${\n selectedDestination === folder.id\n ? \"bg-bg-accent border-2 border-action-primary-border\"\n : \"hover:bg-action-ghost-bg-hover border-2 border-transparent\"\n }`}\n >\n <button\n type=\"button\"\n onClick={() => setSelectedDestination(folder.id)}\n className=\"flex items-center gap-3 flex-1 min-w-0\"\n >\n <Folder className=\"size-5 text-text-link flex-shrink-0\" />\n <span className=\"font-medium text-text-primary truncate\">\n {folder.name}\n </span>\n </button>\n <button\n type=\"button\"\n onClick={() => handleFolderClick(folder)}\n className=\"p-1.5 text-text-tertiary hover:text-text-secondary hover:bg-action-ghost-bg-hover rounded transition-colors duration-200 flex-shrink-0\"\n title={tWithFallback(\n t,\n \"files.copyDialog.openFolder\",\n \"Open folder\",\n )}\n aria-label={tWithFallback(\n t,\n \"files.copyDialog.openFolderNamed\",\n \"Open {{name}}\",\n { name: folder.name },\n )}\n >\n <ChevronRight className=\"size-4\" />\n </button>\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* Footer */}\n <ResponsiveDialogFooter className=\"px-6 py-4 border-t border-border-default\">\n <Button type=\"button\" variant=\"outline\" onClick={onClose}>\n {tWithFallback(t, \"files.common.actions.cancel\", \"Cancel\")}\n </Button>\n <Button\n type=\"button\"\n onClick={handleCopy}\n disabled={\n isLoading || selectedDestination === undefined || !newName.trim()\n }\n >\n {isLoading && <Loader2 className=\"size-4 animate-spin\" />}\n {isLoading\n ? tWithFallback(t, \"files.copyDialog.copying\", \"Copying...\")\n : tWithFallback(t, \"files.copyDialog.copy\", \"Copy\")}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n};\n"],"mappings":";;;;;;;;;AAmCA,IAAaA,KAAmC,EAC9C,SACA,SACA,YACA,WACA,eAAY,IACZ,qBAAkB,MAClB,wBAAqB,CAAC,QAClB;CACJ,IAAM,EAAE,SAAMC,EAAQ,GAChB,CAACC,GAAiBC,KAAsBC,EAC5CC,CACF,GACM,CAACC,GAAaC,KAAkBH,QAE7BC,IAAkB,CAAC,GAAGG,CAAkB,IAAI,CAAC,CAAE,GAClD,CAACC,GAAqBC,KAA0BN,EACpDC,CACF,GACM,CAACM,GAASC,KAAcR,EAC5B,GAAGS,EAAcC,GAAG,2BAA2B,SAAS,EAAE,GAAGC,EAAK,MACpE,GAGM,EAAE,SAAM,SAASC,MAAmBC,EACxCf,KAAmB,KAAA,CACrB,GACMgB,IAAWC,GAAM,YAAY,WAAW,CAAC,GAEzCC,KAAqB,MAAuB;EAEhD,AADAjB,EAAmBkB,EAAO,EAAE,GAC5Bd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kBC,CAAM;SACvC,WAAU;SACV,OAAOR,EACLC,GACA,+BACA,aACF;SACA,cAAYD,EACVC,GACA,oCACA,iBACA,EAAE,MAAMO,EAAO,KAAK,CACtB;SAEA,UAAA,kBAACa,GAAD,EAAc,WAAU,SAAU,CAAA;QAC5B,CAAA,CACL;OAnCE,GAAAb,EAAO,EAmCT,CACN;MACE;;IAEJ,CAAA;IAGL,kBAACgB,GAAD;KAAwB,WAAU;KAAlC,UAAA,CACE,kBAACC,GAAD;MAAQ,MAAK;MAAS,SAAQ;MAAU,SAASV;MAC9C,UAAAf,EAAcC,GAAG,+BAA+B,QAAQ;KACnD,CAAA,GACR,kBAACwB,GAAD;MACE,MAAK;MACL,SAAS,YA5KY;OAC7B,IAAMC,IAAaC,EAAe/B,GAAqBE,CAAO;OAE9D,AADA,MAAM8B,EAAOF,EAAW,qBAAqBA,EAAW,IAAI,GAC5DX,EAAQ;MACV;MAyKU,UACED,KAAalB,MAAwB,KAAA,KAAa,CAACE,EAAQ,KAAK;MAJpE,UAAA,CAOGgB,KAAa,kBAACQ,GAAD,EAAS,WAAU,sBAAuB,CAAA,GACvDR,IACGd,EAAcC,GAAG,4BAA4B,YAAY,IACzDD,EAAcC,GAAG,yBAAyB,MAAM,CAC9C;KACc,CAAA,CAAA;;GACD;;CACT,CAAA;AAEtB"}
|
|
@@ -21,7 +21,6 @@ interface FileBrowserProps {
|
|
|
21
21
|
onFileCopy?: (file: FileItem) => void;
|
|
22
22
|
onFileMove?: (file: FileItem) => void;
|
|
23
23
|
onFileInfo?: (file: FileItem) => void;
|
|
24
|
-
onFileActivity?: (file: FileItem) => void;
|
|
25
24
|
onFolderOpen?: (folder: FolderItem) => void;
|
|
26
25
|
/** Open the share dialog for a folder; see `onFileShare`. */
|
|
27
26
|
onFolderShare?: (folder: FolderItem, knownPermission?: "denied") => void;
|
|
@@ -32,7 +31,6 @@ interface FileBrowserProps {
|
|
|
32
31
|
onFolderCopy?: (folder: FolderItem) => void;
|
|
33
32
|
onFolderMove?: (folder: FolderItem) => void;
|
|
34
33
|
onFolderInfo?: (folder: FolderItem) => void;
|
|
35
|
-
onFolderActivity?: (folder: FolderItem) => void;
|
|
36
34
|
onMoveFile?: (fileId: string, targetFolderId: string) => Promise<void>;
|
|
37
35
|
onCopyFile?: (fileId: string, targetFolderId: string) => Promise<void>;
|
|
38
36
|
onMoveFolder?: (folderId: string, targetFolderId: string) => Promise<void>;
|