@burdenoff/microfe-files 2026.1124.1 → 2026.1125.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/files/components/ConfirmDialog.js +20 -15
- package/dist/files/components/ConfirmDialog.js.map +1 -1
- package/dist/files/components/CopyDialog.js +99 -81
- package/dist/files/components/CopyDialog.js.map +1 -1
- package/dist/files/components/FileBrowser.js +124 -123
- package/dist/files/components/FileBrowser.js.map +1 -1
- package/dist/files/components/FileInfoPanel.js +109 -101
- package/dist/files/components/FileInfoPanel.js.map +1 -1
- package/dist/files/components/FileVersionPanel.js +113 -109
- package/dist/files/components/FileVersionPanel.js.map +1 -1
- package/dist/files/components/MoveDialog.js +75 -65
- package/dist/files/components/MoveDialog.js.map +1 -1
- package/dist/files/components/ShareAccessParts.js +8 -7
- package/dist/files/components/ShareAccessParts.js.map +1 -1
- package/dist/files/components/ShareDialog.js +17 -16
- package/dist/files/components/ShareDialog.js.map +1 -1
- package/dist/files/components/SharedFolderView.js +29 -26
- package/dist/files/components/SharedFolderView.js.map +1 -1
- package/dist/files/components/UploadQueue.js +1 -0
- package/dist/files/components/UploadQueue.js.map +1 -1
- package/dist/files/components/loadingSystem.d.ts +64 -0
- package/dist/files/components/loadingSystem.js +56 -0
- package/dist/files/components/loadingSystem.js.map +1 -0
- package/dist/files/pages/BrowserPage.js +495 -475
- package/dist/files/pages/BrowserPage.js.map +1 -1
- package/dist/files/v2/FilesPage.js +10 -9
- package/dist/files/v2/FilesPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,157 +2,165 @@ import { tWithFallback as e } from "../utils/i18n.js";
|
|
|
2
2
|
import { fileKindLabel as t } from "../utils/fileKind.js";
|
|
3
3
|
import { buildInfoTechnicalDetails as n } from "../utils/infoTechnicalDetails.js";
|
|
4
4
|
import { FileVisibilityControl as r } from "./FileVisibilityControl.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { CompactMarkOr as i, SectionLoaderOr as a } from "./loadingSystem.js";
|
|
6
|
+
import { Suspense as o, lazy as s, useEffect as c, useEffectEvent as l, useState as u } from "react";
|
|
7
|
+
import { Calendar as d, Clock as f, FileText as p, HardDrive as m, Link as h, User as g, X as _ } from "lucide-react";
|
|
8
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
9
|
+
import { Button as x, GlassCard as S, ShowMore as C, ShowTechnicalDetails as w } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
import { useI18n as T } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
11
|
// src/files/components/FileInfoPanel.tsx
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
let { t:
|
|
14
|
-
|
|
12
|
+
var E = s(() => import("./FileVersionPanel.js").then((e) => ({ default: e.FileVersionPanel })));
|
|
13
|
+
function D({ item: t, type: n, onClose: s, navigationV2: d = !1 }) {
|
|
14
|
+
let { t: m } = T(), h = n === "file", g = h ? t : null, [v, x] = u(!1), C = l(() => {
|
|
15
|
+
v ? x(!1) : s();
|
|
15
16
|
});
|
|
16
|
-
return
|
|
17
|
+
return c(() => {
|
|
17
18
|
let e = (e) => {
|
|
18
|
-
e.key === "Escape" &&
|
|
19
|
+
e.key === "Escape" && C();
|
|
19
20
|
};
|
|
20
21
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
21
|
-
}, []), /* @__PURE__ */
|
|
22
|
+
}, []), /* @__PURE__ */ b("div", {
|
|
22
23
|
className: "fixed inset-y-0 right-0 z-[9999] w-full max-w-full overflow-y-auto border-l border-border-seam bg-bg-surface shadow-2xl animate-in slide-in-from-right duration-200 sm:w-96 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
|
|
23
24
|
role: "dialog",
|
|
24
25
|
"aria-modal": "false",
|
|
25
|
-
"aria-label":
|
|
26
|
+
"aria-label": h ? e(m, "files.info.fileInfo", "File information") : e(m, "files.info.folderInfo", "Folder information"),
|
|
26
27
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ b("div", {
|
|
28
29
|
className: "sticky top-0 z-10 bg-bg-surface border-b border-border-seam px-6 py-4 flex items-center justify-between",
|
|
29
|
-
children: [/* @__PURE__ */
|
|
30
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
30
31
|
className: "text-lg font-semibold text-text-primary",
|
|
31
|
-
children:
|
|
32
|
-
}), /* @__PURE__ */
|
|
32
|
+
children: h ? e(m, "files.info.fileInfo", "File Information") : e(m, "files.info.folderInfo", "Folder Information")
|
|
33
|
+
}), /* @__PURE__ */ y("button", {
|
|
33
34
|
type: "button",
|
|
34
|
-
onClick:
|
|
35
|
+
onClick: s,
|
|
35
36
|
className: "p-1.5 rounded-md border border-border-default text-text-secondary bg-bg-elevated hover:bg-action-ghost-bg-hover hover:text-text-primary transition-colors shadow-sm",
|
|
36
|
-
"aria-label": e(
|
|
37
|
-
children: /* @__PURE__ */ _
|
|
37
|
+
"aria-label": e(m, "files.info.closePanel", "Close information panel"),
|
|
38
|
+
children: /* @__PURE__ */ y(_, { className: "size-5" })
|
|
38
39
|
})]
|
|
39
40
|
}),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ b("div", {
|
|
41
42
|
className: "p-6 space-y-6",
|
|
42
43
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ y(S, {
|
|
44
45
|
treatment: "metric",
|
|
45
46
|
className: "flex items-center justify-center py-8",
|
|
46
|
-
children:
|
|
47
|
-
src:
|
|
47
|
+
children: h && g?.mimeType.startsWith("image/") && (g.downloadUrl || g.url) ? /* @__PURE__ */ y("img", {
|
|
48
|
+
src: g.downloadUrl || g.url,
|
|
48
49
|
alt: t.name,
|
|
49
50
|
className: "max-w-full max-h-48 object-contain rounded"
|
|
50
|
-
}) : /* @__PURE__ */
|
|
51
|
+
}) : /* @__PURE__ */ y(p, { className: "size-20 text-text-muted" })
|
|
51
52
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
|
|
53
54
|
className: "text-xl font-semibold text-text-primary break-words",
|
|
54
55
|
children: t.name
|
|
55
|
-
}), t.description && /* @__PURE__ */
|
|
56
|
+
}), t.description && /* @__PURE__ */ y("p", {
|
|
56
57
|
className: "mt-2 text-sm text-text-secondary",
|
|
57
58
|
children: t.description
|
|
58
59
|
})] }),
|
|
59
|
-
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
g && /* @__PURE__ */ y(r, { file: g }, `${g.id}:${g.visibility}`),
|
|
61
|
+
/* @__PURE__ */ y(A, {
|
|
61
62
|
item: t,
|
|
62
63
|
type: n,
|
|
63
|
-
navigationV2:
|
|
64
|
+
navigationV2: d
|
|
64
65
|
}),
|
|
65
|
-
|
|
66
|
+
d ? /* @__PURE__ */ y(O, {
|
|
66
67
|
item: t,
|
|
67
68
|
type: n,
|
|
68
|
-
onShowVersionHistory: () =>
|
|
69
|
-
}) : /* @__PURE__ */
|
|
69
|
+
onShowVersionHistory: () => x(!0)
|
|
70
|
+
}) : /* @__PURE__ */ y(k, {
|
|
70
71
|
item: t,
|
|
71
|
-
isFile:
|
|
72
|
-
onShowVersionHistory: () =>
|
|
72
|
+
isFile: h,
|
|
73
|
+
onShowVersionHistory: () => x(!0)
|
|
73
74
|
})
|
|
74
75
|
]
|
|
75
76
|
}),
|
|
76
|
-
|
|
77
|
-
fallback: /* @__PURE__ */
|
|
77
|
+
h && g && v && /* @__PURE__ */ y(o, {
|
|
78
|
+
fallback: /* @__PURE__ */ y("div", {
|
|
78
79
|
className: "fixed inset-0 z-50 bg-bg-overlay flex items-center justify-center",
|
|
79
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ y("div", {
|
|
80
81
|
className: "bg-bg-surface rounded-lg p-8 animate-in fade-in zoom-in duration-200",
|
|
81
|
-
children: /* @__PURE__ */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
children: /* @__PURE__ */ y(a, {
|
|
83
|
+
label: e(m, "files.info.loadingVersionHistory", "Loading version history..."),
|
|
84
|
+
minHeight: "6rem",
|
|
85
|
+
today: /* @__PURE__ */ b("div", {
|
|
86
|
+
className: "flex items-center gap-3",
|
|
87
|
+
children: [/* @__PURE__ */ y(i, {
|
|
88
|
+
className: "size-6",
|
|
89
|
+
today: /* @__PURE__ */ y(f, { className: "size-6 text-action-primary-bg animate-spin" })
|
|
90
|
+
}), /* @__PURE__ */ y("span", {
|
|
91
|
+
className: "text-text-primary",
|
|
92
|
+
children: e(m, "files.info.loadingVersionHistory", "Loading version history...")
|
|
93
|
+
})]
|
|
94
|
+
})
|
|
87
95
|
})
|
|
88
96
|
})
|
|
89
97
|
}),
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
-
file:
|
|
92
|
-
onClose: () =>
|
|
98
|
+
children: /* @__PURE__ */ y(E, {
|
|
99
|
+
file: g,
|
|
100
|
+
onClose: () => x(!1)
|
|
93
101
|
})
|
|
94
102
|
})
|
|
95
103
|
]
|
|
96
104
|
});
|
|
97
105
|
}
|
|
98
|
-
function
|
|
99
|
-
let { t: a } =
|
|
100
|
-
return /* @__PURE__ */
|
|
106
|
+
function O({ item: t, type: r, onShowVersionHistory: i }) {
|
|
107
|
+
let { t: a } = T();
|
|
108
|
+
return /* @__PURE__ */ b("div", {
|
|
101
109
|
className: "pt-6 border-t border-border-seam space-y-2",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ y(w, {
|
|
103
111
|
copyable: !0,
|
|
104
112
|
children: n(a, t, r)
|
|
105
|
-
}), r === "file" && /* @__PURE__ */
|
|
113
|
+
}), r === "file" && /* @__PURE__ */ b(x, {
|
|
106
114
|
type: "button",
|
|
107
115
|
variant: "link",
|
|
108
116
|
size: "sm",
|
|
109
117
|
onClick: i,
|
|
110
118
|
className: "min-h-11 px-1",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ y(f, {
|
|
112
120
|
className: "size-4",
|
|
113
121
|
"aria-hidden": "true"
|
|
114
122
|
}), e(a, "files.info.viewVersionHistory", "View Version History")]
|
|
115
123
|
})]
|
|
116
124
|
});
|
|
117
125
|
}
|
|
118
|
-
function
|
|
119
|
-
let { t: i } =
|
|
120
|
-
return /* @__PURE__ */ v
|
|
126
|
+
function k({ item: t, isFile: n, onShowVersionHistory: r }) {
|
|
127
|
+
let { t: i } = T();
|
|
128
|
+
return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ b("div", {
|
|
121
129
|
className: "pt-6 border-t border-border-seam",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ y("h4", {
|
|
123
131
|
className: "text-sm font-semibold text-text-primary mb-3",
|
|
124
132
|
children: e(i, "files.info.properties", "Properties")
|
|
125
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ y(C, {
|
|
126
134
|
collapsedHeight: 56,
|
|
127
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ b("dl", {
|
|
128
136
|
className: "space-y-2",
|
|
129
137
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ b("div", {
|
|
131
139
|
className: "flex justify-between",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ y("dt", {
|
|
133
141
|
className: "text-sm text-text-secondary",
|
|
134
142
|
children: e(i, "files.info.status", "Status")
|
|
135
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ y("dd", {
|
|
136
144
|
className: "text-sm font-medium text-text-primary",
|
|
137
145
|
children: t.status
|
|
138
146
|
})]
|
|
139
147
|
}),
|
|
140
|
-
!n && /* @__PURE__ */
|
|
148
|
+
!n && /* @__PURE__ */ b("div", {
|
|
141
149
|
className: "flex justify-between",
|
|
142
|
-
children: [/* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ y("dt", {
|
|
143
151
|
className: "text-sm text-text-secondary",
|
|
144
152
|
children: e(i, "files.info.visibility", "Visibility")
|
|
145
|
-
}), /* @__PURE__ */
|
|
153
|
+
}), /* @__PURE__ */ y("dd", {
|
|
146
154
|
className: "text-sm font-medium text-text-primary",
|
|
147
155
|
children: t.visibility
|
|
148
156
|
})]
|
|
149
157
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ b("div", {
|
|
151
159
|
className: "flex justify-between",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ y("dt", {
|
|
153
161
|
className: "text-sm text-text-secondary",
|
|
154
162
|
children: e(i, "files.info.starred", "Starred")
|
|
155
|
-
}), /* @__PURE__ */
|
|
163
|
+
}), /* @__PURE__ */ y("dd", {
|
|
156
164
|
className: "text-sm font-medium text-text-primary",
|
|
157
165
|
children: t.starred ? e(i, "files.info.yes", "Yes") : e(i, "files.info.no", "No")
|
|
158
166
|
})]
|
|
@@ -160,55 +168,55 @@ function D({ item: t, isFile: n, onShowVersionHistory: r }) {
|
|
|
160
168
|
]
|
|
161
169
|
})
|
|
162
170
|
})]
|
|
163
|
-
}), n && /* @__PURE__ */
|
|
171
|
+
}), n && /* @__PURE__ */ y("div", {
|
|
164
172
|
className: "pt-6 border-t border-border-seam",
|
|
165
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: /* @__PURE__ */ b("button", {
|
|
166
174
|
type: "button",
|
|
167
175
|
onClick: r,
|
|
168
176
|
className: "w-full flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-action-primary-text bg-action-primary-bg/10 hover:bg-action-primary-bg/20 rounded-lg transition-colors duration-200",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
177
|
+
children: [/* @__PURE__ */ y(f, { className: "size-4" }), e(i, "files.info.viewVersionHistory", "View Version History")]
|
|
170
178
|
})
|
|
171
179
|
})] });
|
|
172
180
|
}
|
|
173
|
-
function
|
|
174
|
-
let { t: a } =
|
|
175
|
-
s && (
|
|
176
|
-
let
|
|
181
|
+
function A({ item: n, type: r, navigationV2: i }) {
|
|
182
|
+
let { t: a } = T(), o = r === "file", s = o ? n : null, c = o ? null : n, l = e(a, "files.info.unknown", "Unknown"), u = e(a, "files.info.folder", "Folder");
|
|
183
|
+
s && (u = i ? t(a, s.mimeType, s.extension) : s.mimeType || l);
|
|
184
|
+
let f = (e) => new Date(e).toLocaleString("en-US", {
|
|
177
185
|
year: "numeric",
|
|
178
186
|
month: "long",
|
|
179
187
|
day: "numeric",
|
|
180
188
|
hour: "2-digit",
|
|
181
189
|
minute: "2-digit"
|
|
182
190
|
});
|
|
183
|
-
return /* @__PURE__ */
|
|
191
|
+
return /* @__PURE__ */ b("div", {
|
|
184
192
|
className: "space-y-4",
|
|
185
193
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ b("div", {
|
|
187
195
|
className: "flex items-start gap-3",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ y(p, { className: "size-5 text-text-muted mt-0.5" }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
189
197
|
className: "text-sm font-medium text-text-primary",
|
|
190
198
|
children: e(a, "files.info.type", "Type")
|
|
191
|
-
}), /* @__PURE__ */
|
|
199
|
+
}), /* @__PURE__ */ y("p", {
|
|
192
200
|
className: "text-sm text-text-secondary",
|
|
193
|
-
children:
|
|
201
|
+
children: u
|
|
194
202
|
})] })]
|
|
195
203
|
}),
|
|
196
|
-
o && s && /* @__PURE__ */
|
|
204
|
+
o && s && /* @__PURE__ */ b("div", {
|
|
197
205
|
className: "flex items-start gap-3",
|
|
198
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ y(m, { className: "size-5 text-text-muted mt-0.5" }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
199
207
|
className: "text-sm font-medium text-text-primary",
|
|
200
208
|
children: e(a, "files.info.size", "Size")
|
|
201
|
-
}), /* @__PURE__ */
|
|
209
|
+
}), /* @__PURE__ */ y("p", {
|
|
202
210
|
className: "text-sm text-text-secondary",
|
|
203
211
|
children: ((e) => e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(2)} KB` : e < 1073741824 ? `${(e / 1024 / 1024).toFixed(2)} MB` : `${(e / 1024 / 1024 / 1024).toFixed(2)} GB`)(s.size)
|
|
204
212
|
})] })]
|
|
205
213
|
}),
|
|
206
|
-
!o && c && /* @__PURE__ */ v
|
|
214
|
+
!o && c && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ b("div", {
|
|
207
215
|
className: "flex items-start gap-3",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ y(p, { className: "size-5 text-text-muted mt-0.5" }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
209
217
|
className: "text-sm font-medium text-text-primary",
|
|
210
218
|
children: e(a, "files.info.contents", "Contents")
|
|
211
|
-
}), /* @__PURE__ */
|
|
219
|
+
}), /* @__PURE__ */ b("p", {
|
|
212
220
|
className: "text-sm text-text-secondary",
|
|
213
221
|
children: [
|
|
214
222
|
c.filesCount,
|
|
@@ -221,42 +229,42 @@ function O({ item: n, type: r, navigationV2: i }) {
|
|
|
221
229
|
e(a, "files.info.folders", "folders")
|
|
222
230
|
]
|
|
223
231
|
})] })]
|
|
224
|
-
}), c.path && !i && /* @__PURE__ */
|
|
232
|
+
}), c.path && !i && /* @__PURE__ */ b("div", {
|
|
225
233
|
className: "flex items-start gap-3",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ y(h, { className: "size-5 text-text-muted mt-0.5" }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
227
235
|
className: "text-sm font-medium text-text-primary",
|
|
228
236
|
children: e(a, "files.info.path", "Path")
|
|
229
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ y("p", {
|
|
230
238
|
className: "text-sm text-text-secondary break-all",
|
|
231
239
|
children: c.path
|
|
232
240
|
})] })]
|
|
233
241
|
})] }),
|
|
234
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ b("div", {
|
|
235
243
|
className: "flex items-start gap-3",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ y(d, { className: "size-5 text-text-muted mt-0.5" }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
237
245
|
className: "text-sm font-medium text-text-primary",
|
|
238
246
|
children: e(a, "files.info.created", "Created")
|
|
239
|
-
}), /* @__PURE__ */
|
|
247
|
+
}), /* @__PURE__ */ y("p", {
|
|
240
248
|
className: "text-sm text-text-secondary",
|
|
241
|
-
children:
|
|
249
|
+
children: f(n.createdAt)
|
|
242
250
|
})] })]
|
|
243
251
|
}),
|
|
244
|
-
n.updatedAt && /* @__PURE__ */
|
|
252
|
+
n.updatedAt && /* @__PURE__ */ b("div", {
|
|
245
253
|
className: "flex items-start gap-3",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ y(d, { className: "size-5 text-text-muted mt-0.5" }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
247
255
|
className: "text-sm font-medium text-text-primary",
|
|
248
256
|
children: e(a, "files.info.modified", "Modified")
|
|
249
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ y("p", {
|
|
250
258
|
className: "text-sm text-text-secondary",
|
|
251
|
-
children:
|
|
259
|
+
children: f(n.updatedAt)
|
|
252
260
|
})] })]
|
|
253
261
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ b("div", {
|
|
255
263
|
className: "flex items-start gap-3",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ y(g, { className: "size-5 text-text-muted mt-0.5" }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
257
265
|
className: "text-sm font-medium text-text-primary",
|
|
258
266
|
children: e(a, "files.info.owner", "Owner")
|
|
259
|
-
}), /* @__PURE__ */
|
|
267
|
+
}), /* @__PURE__ */ y("p", {
|
|
260
268
|
className: "text-sm text-text-secondary",
|
|
261
269
|
children: n.createdBy?.name || n.createdById || e(a, "files.info.unknown", "Unknown")
|
|
262
270
|
})] })]
|
|
@@ -264,6 +272,6 @@ function O({ item: n, type: r, navigationV2: i }) {
|
|
|
264
272
|
]
|
|
265
273
|
});
|
|
266
274
|
}
|
|
267
|
-
export {
|
|
275
|
+
export { D as FileInfoPanel };
|
|
268
276
|
|
|
269
277
|
//# sourceMappingURL=FileInfoPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInfoPanel.js","names":["_Fragment","LinkIcon","FileVersionPanel","lazy","m","FileInfoPanel","useI18n","isFile","type","file","item","showVersionHistory","setShowVersionHistory","useState","onEscape","useEffectEvent","onClose","useEffect","handleEscape","event","tWithFallback","t","X","GlassCard","FileText","FileVisibilityControl","InfoDetailRows","navigationV2","InfoTechnicalSection","InfoLegacyProperties","Suspense","Clock","ShowTechnicalDetails","buildInfoTechnicalDetails","Button","onShowVersionHistory","Fragment","ShowMore","folder","unknownLabel","fileTypeText","fileKindLabel","formatDate","date","HardDrive","bytes","Link","Calendar","User"],"sources":["../../../src/files/components/FileInfoPanel.tsx"],"sourcesContent":["import { useEffect, useEffectEvent, useState, lazy, Suspense } from \"react\";\nimport {\n X,\n FileText,\n Calendar,\n User,\n HardDrive,\n Link as LinkIcon,\n Clock,\n} from \"lucide-react\";\nimport { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\nimport {\n Button,\n GlassCard,\n ShowMore,\n ShowTechnicalDetails,\n} from \"@burdenoff/fe-libs/ui\";\nimport type { FileItem, FolderItem } from \"../types\";\nimport { tWithFallback } from \"../utils/i18n\";\nimport { fileKindLabel } from \"../utils/fileKind\";\nimport { buildInfoTechnicalDetails } from \"../utils/infoTechnicalDetails\";\nimport { FileVisibilityControl } from \"./FileVisibilityControl\";\n\n// Lazy load FileVersionPanel to avoid loading heavy dependencies until needed\nconst FileVersionPanel = lazy(() =>\n import(\"./FileVersionPanel\").then((m) => ({ default: m.FileVersionPanel })),\n);\n\ninterface FileInfoPanelProps {\n item: FileItem | FolderItem;\n type: \"file\" | \"folder\";\n onClose: () => void;\n /**\n * Navigation v2 (BOFF-11865), FluidGrids only: a friendly file kind instead\n * of the MIME type, and Path, Status, Visibility, the Starred line and\n * version history moved under \"Show technical details\".\n */\n navigationV2?: boolean;\n}\n\nexport function FileInfoPanel({\n item,\n type,\n onClose,\n navigationV2 = false,\n}: FileInfoPanelProps) {\n const { t } = useI18n();\n const isFile = type === \"file\";\n const file = isFile ? (item as FileItem) : null;\n const [showVersionHistory, setShowVersionHistory] = useState(false);\n\n const onEscape = useEffectEvent(() => {\n if (showVersionHistory) {\n setShowVersionHistory(false);\n return;\n }\n onClose();\n });\n\n useEffect(() => {\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n onEscape();\n }\n };\n\n document.addEventListener(\"keydown\", handleEscape);\n return () => document.removeEventListener(\"keydown\", handleEscape);\n }, []);\n\n return (\n <div\n className=\"fixed inset-y-0 right-0 z-[9999] w-full max-w-full overflow-y-auto border-l border-border-seam bg-bg-surface shadow-2xl animate-in slide-in-from-right duration-200 sm:w-96 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]\"\n role=\"dialog\"\n aria-modal=\"false\"\n aria-label={\n isFile\n ? tWithFallback(t, \"files.info.fileInfo\", \"File information\")\n : tWithFallback(t, \"files.info.folderInfo\", \"Folder information\")\n }\n >\n {/* Header */}\n <div className=\"sticky top-0 z-10 bg-bg-surface border-b border-border-seam px-6 py-4 flex items-center justify-between\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {isFile\n ? tWithFallback(t, \"files.info.fileInfo\", \"File Information\")\n : tWithFallback(t, \"files.info.folderInfo\", \"Folder Information\")}\n </h2>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1.5 rounded-md border border-border-default text-text-secondary bg-bg-elevated hover:bg-action-ghost-bg-hover hover:text-text-primary transition-colors shadow-sm\"\n aria-label={tWithFallback(\n t,\n \"files.info.closePanel\",\n \"Close information panel\",\n )}\n >\n <X className=\"size-5\" />\n </button>\n </div>\n\n {/* Content */}\n <div className=\"p-6 space-y-6\">\n {/* Preview/Icon */}\n <GlassCard\n treatment=\"metric\"\n className=\"flex items-center justify-center py-8\"\n >\n {isFile &&\n file?.mimeType.startsWith(\"image/\") &&\n (file.downloadUrl || file.url) ? (\n <img\n src={file.downloadUrl || file.url}\n alt={item.name}\n className=\"max-w-full max-h-48 object-contain rounded\"\n />\n ) : (\n <FileText className=\"size-20 text-text-muted\" />\n )}\n </GlassCard>\n\n {/* Name */}\n <div>\n <h3 className=\"text-xl font-semibold text-text-primary break-words\">\n {item.name}\n </h3>\n {item.description && (\n <p className=\"mt-2 text-sm text-text-secondary\">\n {item.description}\n </p>\n )}\n </div>\n\n {/* Details */}\n {file && (\n <FileVisibilityControl\n key={`${file.id}:${file.visibility}`}\n file={file}\n />\n )}\n <InfoDetailRows item={item} type={type} navigationV2={navigationV2} />\n\n {navigationV2 ? (\n <InfoTechnicalSection\n item={item}\n type={type}\n onShowVersionHistory={() => setShowVersionHistory(true)}\n />\n ) : (\n <InfoLegacyProperties\n item={item}\n isFile={isFile}\n onShowVersionHistory={() => setShowVersionHistory(true)}\n />\n )}\n </div>\n\n {/* Version History Modal */}\n {isFile && file && showVersionHistory && (\n <Suspense\n fallback={\n <div className=\"fixed inset-0 z-50 bg-bg-overlay flex items-center justify-center\">\n <div className=\"bg-bg-surface rounded-lg p-8 animate-in fade-in zoom-in duration-200\">\n <div className=\"flex items-center gap-3\">\n <Clock className=\"size-6 text-action-primary-bg animate-spin\" />\n <span className=\"text-text-primary\">\n {tWithFallback(\n t,\n \"files.info.loadingVersionHistory\",\n \"Loading version history...\",\n )}\n </span>\n </div>\n </div>\n </div>\n }\n >\n <FileVersionPanel\n file={file}\n onClose={() => setShowVersionHistory(false)}\n />\n </Suspense>\n )}\n </div>\n );\n}\n\n/**\n * Navigation v2: the raw properties under \"Show technical details\", with the\n * version history entry directly below. The shared piece holds text only, so\n * the entry to the version panel cannot sit inside it.\n */\nfunction InfoTechnicalSection({\n item,\n type,\n onShowVersionHistory,\n}: {\n item: FileItem | FolderItem;\n type: \"file\" | \"folder\";\n onShowVersionHistory: () => void;\n}) {\n const { t } = useI18n();\n return (\n <div className=\"pt-6 border-t border-border-seam space-y-2\">\n <ShowTechnicalDetails copyable>\n {buildInfoTechnicalDetails(t, item, type)}\n </ShowTechnicalDetails>\n {type === \"file\" && (\n <Button\n type=\"button\"\n variant=\"link\"\n size=\"sm\"\n onClick={onShowVersionHistory}\n className=\"min-h-11 px-1\"\n >\n <Clock className=\"size-4\" aria-hidden=\"true\" />\n {tWithFallback(\n t,\n \"files.info.viewVersionHistory\",\n \"View Version History\",\n )}\n </Button>\n )}\n </div>\n );\n}\n\n/** Every other app: the Properties block and the version history button. */\nfunction InfoLegacyProperties({\n item,\n isFile,\n onShowVersionHistory,\n}: {\n item: FileItem | FolderItem;\n isFile: boolean;\n onShowVersionHistory: () => void;\n}) {\n const { t } = useI18n();\n return (\n <>\n {/* Additional Info — secondary properties tucked behind progressive\n disclosure to keep the rail focused on the essentials. */}\n <div className=\"pt-6 border-t border-border-seam\">\n <h4 className=\"text-sm font-semibold text-text-primary mb-3\">\n {tWithFallback(t, \"files.info.properties\", \"Properties\")}\n </h4>\n <ShowMore collapsedHeight={56}>\n <dl className=\"space-y-2\">\n <div className=\"flex justify-between\">\n <dt className=\"text-sm text-text-secondary\">\n {tWithFallback(t, \"files.info.status\", \"Status\")}\n </dt>\n <dd className=\"text-sm font-medium text-text-primary\">\n {item.status}\n </dd>\n </div>\n {!isFile && (\n <div className=\"flex justify-between\">\n <dt className=\"text-sm text-text-secondary\">\n {tWithFallback(t, \"files.info.visibility\", \"Visibility\")}\n </dt>\n <dd className=\"text-sm font-medium text-text-primary\">\n {item.visibility}\n </dd>\n </div>\n )}\n <div className=\"flex justify-between\">\n <dt className=\"text-sm text-text-secondary\">\n {tWithFallback(t, \"files.info.starred\", \"Starred\")}\n </dt>\n <dd className=\"text-sm font-medium text-text-primary\">\n {item.starred\n ? tWithFallback(t, \"files.info.yes\", \"Yes\")\n : tWithFallback(t, \"files.info.no\", \"No\")}\n </dd>\n </div>\n </dl>\n </ShowMore>\n </div>\n\n {/* Version History Button (Files only) */}\n {isFile && (\n <div className=\"pt-6 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={onShowVersionHistory}\n className=\"w-full flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-action-primary-text bg-action-primary-bg/10 hover:bg-action-primary-bg/20 rounded-lg transition-colors duration-200\"\n >\n <Clock className=\"size-4\" />\n {tWithFallback(\n t,\n \"files.info.viewVersionHistory\",\n \"View Version History\",\n )}\n </button>\n </div>\n )}\n </>\n );\n}\n\n/** Level 1: kind, size or contents, (path), created, modified and owner. */\nfunction InfoDetailRows({\n item,\n type,\n navigationV2,\n}: {\n item: FileItem | FolderItem;\n type: \"file\" | \"folder\";\n navigationV2: boolean;\n}) {\n const { t } = useI18n();\n const isFile = type === \"file\";\n const file = isFile ? (item as FileItem) : null;\n const folder = !isFile ? (item as FolderItem) : null;\n const unknownLabel = tWithFallback(t, \"files.info.unknown\", \"Unknown\");\n let fileTypeText = tWithFallback(t, \"files.info.folder\", \"Folder\");\n if (file) {\n fileTypeText = navigationV2\n ? fileKindLabel(t, file.mimeType, file.extension)\n : file.mimeType || unknownLabel;\n }\n\n const formatDate = (date: string) => {\n return new Date(date).toLocaleString(\"en-US\", {\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n };\n\n const formatSize = (bytes: number) => {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(2)} KB`;\n if (bytes < 1024 * 1024 * 1024)\n return `${(bytes / 1024 / 1024).toFixed(2)} MB`;\n return `${(bytes / 1024 / 1024 / 1024).toFixed(2)} GB`;\n };\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex items-start gap-3\">\n <FileText className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.type\", \"Type\")}\n </p>\n <p className=\"text-sm text-text-secondary\">{fileTypeText}</p>\n </div>\n </div>\n\n {isFile && file && (\n <div className=\"flex items-start gap-3\">\n <HardDrive className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.size\", \"Size\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {formatSize(file.size)}\n </p>\n </div>\n </div>\n )}\n\n {!isFile && folder && (\n <>\n <div className=\"flex items-start gap-3\">\n <FileText className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.contents\", \"Contents\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {folder.filesCount}{\" \"}\n {tWithFallback(t, \"files.info.files\", \"files\")},{\" \"}\n {folder.subfoldersCount}{\" \"}\n {tWithFallback(t, \"files.info.folders\", \"folders\")}\n </p>\n </div>\n </div>\n\n {folder.path && !navigationV2 && (\n <div className=\"flex items-start gap-3\">\n <LinkIcon className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.path\", \"Path\")}\n </p>\n <p className=\"text-sm text-text-secondary break-all\">\n {folder.path}\n </p>\n </div>\n </div>\n )}\n </>\n )}\n\n <div className=\"flex items-start gap-3\">\n <Calendar className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.created\", \"Created\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {formatDate(item.createdAt)}\n </p>\n </div>\n </div>\n\n {item.updatedAt && (\n <div className=\"flex items-start gap-3\">\n <Calendar className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.modified\", \"Modified\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {formatDate(item.updatedAt)}\n </p>\n </div>\n </div>\n )}\n\n <div className=\"flex items-start gap-3\">\n <User className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.owner\", \"Owner\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {item.createdBy?.name ||\n item.createdById ||\n tWithFallback(t, \"files.info.unknown\", \"Unknown\")}\n </p>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAwBA,IAAME,IAAmBC,QACvB,OAAO,wBAAqB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,iBAAiB,EAAE,CAC5E;AAcA,SAAgBC,EAAc,EAC5B,SACA,SACA,YACA,kBAAe,MACM;CACrB,IAAM,EAAE,SAAMC,EAAQ,GAChBC,IAASC,MAAS,QAClBC,IAAOF,IAAUG,IAAoB,MACrC,CAACC,GAAoBC,KAAyBC,EAAS,EAAK,GAE5DC,IAAWC,QAAqB;EACpC,AAAIJ,IACFC,EAAsB,EAAK,IAG7BI,EAAQ;CACV,CAAC;CAaD,OAXAC,QAAgB;EACd,IAAMC,KAAgB,MAAyB;GAC7C,AAAIC,EAAM,QAAQ,YAChBL,EAAS;EAEb;EAGA,OADA,SAAS,iBA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V,UAAAqB,EAAWhC,EAAK,SAAS;IACzB,CAAA,CACA,EAAA,CAAA,CACF;;GAGP,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAACsC,GAAD,EAAM,WAAU,gCAAiC,CAAA,GACjD,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;KAAG,WAAU;KACV,UAAA5B,EAAcC,GAAG,oBAAoB,OAAO;IAC5C,CAAA,GACH,kBAAC,KAAD;KAAG,WAAU;KACV,UAAAX,EAAK,WAAW,QACfA,EAAK,eACLU,EAAcC,GAAG,sBAAsB,SAAS;IACjD,CAAA,CACA,EAAA,CAAA,CACF;;EACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"FileInfoPanel.js","names":["_Fragment","LinkIcon","FileVersionPanel","lazy","m","FileInfoPanel","useI18n","isFile","type","file","item","showVersionHistory","setShowVersionHistory","useState","onEscape","useEffectEvent","onClose","useEffect","handleEscape","event","tWithFallback","t","X","GlassCard","FileText","FileVisibilityControl","InfoDetailRows","navigationV2","InfoTechnicalSection","InfoLegacyProperties","Suspense","SectionLoaderOr","CompactMarkOr","Clock","ShowTechnicalDetails","buildInfoTechnicalDetails","Button","onShowVersionHistory","Fragment","ShowMore","folder","unknownLabel","fileTypeText","fileKindLabel","formatDate","date","HardDrive","bytes","Link","Calendar","User"],"sources":["../../../src/files/components/FileInfoPanel.tsx"],"sourcesContent":["import { useEffect, useEffectEvent, useState, lazy, Suspense } from \"react\";\nimport {\n X,\n FileText,\n Calendar,\n User,\n HardDrive,\n Link as LinkIcon,\n Clock,\n} from \"lucide-react\";\nimport { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\nimport {\n Button,\n GlassCard,\n ShowMore,\n ShowTechnicalDetails,\n} from \"@burdenoff/fe-libs/ui\";\nimport type { FileItem, FolderItem } from \"../types\";\nimport { tWithFallback } from \"../utils/i18n\";\nimport { fileKindLabel } from \"../utils/fileKind\";\nimport { buildInfoTechnicalDetails } from \"../utils/infoTechnicalDetails\";\nimport { FileVisibilityControl } from \"./FileVisibilityControl\";\nimport { CompactMarkOr, SectionLoaderOr } from \"./loadingSystem\";\n\n// Lazy load FileVersionPanel to avoid loading heavy dependencies until needed\nconst FileVersionPanel = lazy(() =>\n import(\"./FileVersionPanel\").then((m) => ({ default: m.FileVersionPanel })),\n);\n\ninterface FileInfoPanelProps {\n item: FileItem | FolderItem;\n type: \"file\" | \"folder\";\n onClose: () => void;\n /**\n * Navigation v2 (BOFF-11865), FluidGrids only: a friendly file kind instead\n * of the MIME type, and Path, Status, Visibility, the Starred line and\n * version history moved under \"Show technical details\".\n */\n navigationV2?: boolean;\n}\n\nexport function FileInfoPanel({\n item,\n type,\n onClose,\n navigationV2 = false,\n}: FileInfoPanelProps) {\n const { t } = useI18n();\n const isFile = type === \"file\";\n const file = isFile ? (item as FileItem) : null;\n const [showVersionHistory, setShowVersionHistory] = useState(false);\n\n const onEscape = useEffectEvent(() => {\n if (showVersionHistory) {\n setShowVersionHistory(false);\n return;\n }\n onClose();\n });\n\n useEffect(() => {\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n onEscape();\n }\n };\n\n document.addEventListener(\"keydown\", handleEscape);\n return () => document.removeEventListener(\"keydown\", handleEscape);\n }, []);\n\n return (\n <div\n className=\"fixed inset-y-0 right-0 z-[9999] w-full max-w-full overflow-y-auto border-l border-border-seam bg-bg-surface shadow-2xl animate-in slide-in-from-right duration-200 sm:w-96 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]\"\n role=\"dialog\"\n aria-modal=\"false\"\n aria-label={\n isFile\n ? tWithFallback(t, \"files.info.fileInfo\", \"File information\")\n : tWithFallback(t, \"files.info.folderInfo\", \"Folder information\")\n }\n >\n {/* Header */}\n <div className=\"sticky top-0 z-10 bg-bg-surface border-b border-border-seam px-6 py-4 flex items-center justify-between\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {isFile\n ? tWithFallback(t, \"files.info.fileInfo\", \"File Information\")\n : tWithFallback(t, \"files.info.folderInfo\", \"Folder Information\")}\n </h2>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1.5 rounded-md border border-border-default text-text-secondary bg-bg-elevated hover:bg-action-ghost-bg-hover hover:text-text-primary transition-colors shadow-sm\"\n aria-label={tWithFallback(\n t,\n \"files.info.closePanel\",\n \"Close information panel\",\n )}\n >\n <X className=\"size-5\" />\n </button>\n </div>\n\n {/* Content */}\n <div className=\"p-6 space-y-6\">\n {/* Preview/Icon */}\n <GlassCard\n treatment=\"metric\"\n className=\"flex items-center justify-center py-8\"\n >\n {isFile &&\n file?.mimeType.startsWith(\"image/\") &&\n (file.downloadUrl || file.url) ? (\n <img\n src={file.downloadUrl || file.url}\n alt={item.name}\n className=\"max-w-full max-h-48 object-contain rounded\"\n />\n ) : (\n <FileText className=\"size-20 text-text-muted\" />\n )}\n </GlassCard>\n\n {/* Name */}\n <div>\n <h3 className=\"text-xl font-semibold text-text-primary break-words\">\n {item.name}\n </h3>\n {item.description && (\n <p className=\"mt-2 text-sm text-text-secondary\">\n {item.description}\n </p>\n )}\n </div>\n\n {/* Details */}\n {file && (\n <FileVisibilityControl\n key={`${file.id}:${file.visibility}`}\n file={file}\n />\n )}\n <InfoDetailRows item={item} type={type} navigationV2={navigationV2} />\n\n {navigationV2 ? (\n <InfoTechnicalSection\n item={item}\n type={type}\n onShowVersionHistory={() => setShowVersionHistory(true)}\n />\n ) : (\n <InfoLegacyProperties\n item={item}\n isFile={isFile}\n onShowVersionHistory={() => setShowVersionHistory(true)}\n />\n )}\n </div>\n\n {/* Version History Modal */}\n {isFile && file && showVersionHistory && (\n <Suspense\n fallback={\n <div className=\"fixed inset-0 z-50 bg-bg-overlay flex items-center justify-center\">\n <div className=\"bg-bg-surface rounded-lg p-8 animate-in fade-in zoom-in duration-200\">\n <SectionLoaderOr\n label={tWithFallback(\n t,\n \"files.info.loadingVersionHistory\",\n \"Loading version history...\",\n )}\n minHeight=\"6rem\"\n today={\n <div className=\"flex items-center gap-3\">\n <CompactMarkOr\n className=\"size-6\"\n today={\n <Clock className=\"size-6 text-action-primary-bg animate-spin\" />\n }\n />\n <span className=\"text-text-primary\">\n {tWithFallback(\n t,\n \"files.info.loadingVersionHistory\",\n \"Loading version history...\",\n )}\n </span>\n </div>\n }\n />\n </div>\n </div>\n }\n >\n <FileVersionPanel\n file={file}\n onClose={() => setShowVersionHistory(false)}\n />\n </Suspense>\n )}\n </div>\n );\n}\n\n/**\n * Navigation v2: the raw properties under \"Show technical details\", with the\n * version history entry directly below. The shared piece holds text only, so\n * the entry to the version panel cannot sit inside it.\n */\nfunction InfoTechnicalSection({\n item,\n type,\n onShowVersionHistory,\n}: {\n item: FileItem | FolderItem;\n type: \"file\" | \"folder\";\n onShowVersionHistory: () => void;\n}) {\n const { t } = useI18n();\n return (\n <div className=\"pt-6 border-t border-border-seam space-y-2\">\n <ShowTechnicalDetails copyable>\n {buildInfoTechnicalDetails(t, item, type)}\n </ShowTechnicalDetails>\n {type === \"file\" && (\n <Button\n type=\"button\"\n variant=\"link\"\n size=\"sm\"\n onClick={onShowVersionHistory}\n className=\"min-h-11 px-1\"\n >\n <Clock className=\"size-4\" aria-hidden=\"true\" />\n {tWithFallback(\n t,\n \"files.info.viewVersionHistory\",\n \"View Version History\",\n )}\n </Button>\n )}\n </div>\n );\n}\n\n/** Every other app: the Properties block and the version history button. */\nfunction InfoLegacyProperties({\n item,\n isFile,\n onShowVersionHistory,\n}: {\n item: FileItem | FolderItem;\n isFile: boolean;\n onShowVersionHistory: () => void;\n}) {\n const { t } = useI18n();\n return (\n <>\n {/* Additional Info — secondary properties tucked behind progressive\n disclosure to keep the rail focused on the essentials. */}\n <div className=\"pt-6 border-t border-border-seam\">\n <h4 className=\"text-sm font-semibold text-text-primary mb-3\">\n {tWithFallback(t, \"files.info.properties\", \"Properties\")}\n </h4>\n <ShowMore collapsedHeight={56}>\n <dl className=\"space-y-2\">\n <div className=\"flex justify-between\">\n <dt className=\"text-sm text-text-secondary\">\n {tWithFallback(t, \"files.info.status\", \"Status\")}\n </dt>\n <dd className=\"text-sm font-medium text-text-primary\">\n {item.status}\n </dd>\n </div>\n {!isFile && (\n <div className=\"flex justify-between\">\n <dt className=\"text-sm text-text-secondary\">\n {tWithFallback(t, \"files.info.visibility\", \"Visibility\")}\n </dt>\n <dd className=\"text-sm font-medium text-text-primary\">\n {item.visibility}\n </dd>\n </div>\n )}\n <div className=\"flex justify-between\">\n <dt className=\"text-sm text-text-secondary\">\n {tWithFallback(t, \"files.info.starred\", \"Starred\")}\n </dt>\n <dd className=\"text-sm font-medium text-text-primary\">\n {item.starred\n ? tWithFallback(t, \"files.info.yes\", \"Yes\")\n : tWithFallback(t, \"files.info.no\", \"No\")}\n </dd>\n </div>\n </dl>\n </ShowMore>\n </div>\n\n {/* Version History Button (Files only) */}\n {isFile && (\n <div className=\"pt-6 border-t border-border-seam\">\n <button\n type=\"button\"\n onClick={onShowVersionHistory}\n className=\"w-full flex items-center justify-center gap-2 px-4 py-3 text-sm font-medium text-action-primary-text bg-action-primary-bg/10 hover:bg-action-primary-bg/20 rounded-lg transition-colors duration-200\"\n >\n <Clock className=\"size-4\" />\n {tWithFallback(\n t,\n \"files.info.viewVersionHistory\",\n \"View Version History\",\n )}\n </button>\n </div>\n )}\n </>\n );\n}\n\n/** Level 1: kind, size or contents, (path), created, modified and owner. */\nfunction InfoDetailRows({\n item,\n type,\n navigationV2,\n}: {\n item: FileItem | FolderItem;\n type: \"file\" | \"folder\";\n navigationV2: boolean;\n}) {\n const { t } = useI18n();\n const isFile = type === \"file\";\n const file = isFile ? (item as FileItem) : null;\n const folder = !isFile ? (item as FolderItem) : null;\n const unknownLabel = tWithFallback(t, \"files.info.unknown\", \"Unknown\");\n let fileTypeText = tWithFallback(t, \"files.info.folder\", \"Folder\");\n if (file) {\n fileTypeText = navigationV2\n ? fileKindLabel(t, file.mimeType, file.extension)\n : file.mimeType || unknownLabel;\n }\n\n const formatDate = (date: string) => {\n return new Date(date).toLocaleString(\"en-US\", {\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n };\n\n const formatSize = (bytes: number) => {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(2)} KB`;\n if (bytes < 1024 * 1024 * 1024)\n return `${(bytes / 1024 / 1024).toFixed(2)} MB`;\n return `${(bytes / 1024 / 1024 / 1024).toFixed(2)} GB`;\n };\n\n return (\n <div className=\"space-y-4\">\n <div className=\"flex items-start gap-3\">\n <FileText className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.type\", \"Type\")}\n </p>\n <p className=\"text-sm text-text-secondary\">{fileTypeText}</p>\n </div>\n </div>\n\n {isFile && file && (\n <div className=\"flex items-start gap-3\">\n <HardDrive className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.size\", \"Size\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {formatSize(file.size)}\n </p>\n </div>\n </div>\n )}\n\n {!isFile && folder && (\n <>\n <div className=\"flex items-start gap-3\">\n <FileText className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.contents\", \"Contents\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {folder.filesCount}{\" \"}\n {tWithFallback(t, \"files.info.files\", \"files\")},{\" \"}\n {folder.subfoldersCount}{\" \"}\n {tWithFallback(t, \"files.info.folders\", \"folders\")}\n </p>\n </div>\n </div>\n\n {folder.path && !navigationV2 && (\n <div className=\"flex items-start gap-3\">\n <LinkIcon className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.path\", \"Path\")}\n </p>\n <p className=\"text-sm text-text-secondary break-all\">\n {folder.path}\n </p>\n </div>\n </div>\n )}\n </>\n )}\n\n <div className=\"flex items-start gap-3\">\n <Calendar className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.created\", \"Created\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {formatDate(item.createdAt)}\n </p>\n </div>\n </div>\n\n {item.updatedAt && (\n <div className=\"flex items-start gap-3\">\n <Calendar className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.modified\", \"Modified\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {formatDate(item.updatedAt)}\n </p>\n </div>\n </div>\n )}\n\n <div className=\"flex items-start gap-3\">\n <User className=\"size-5 text-text-muted mt-0.5\" />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tWithFallback(t, \"files.info.owner\", \"Owner\")}\n </p>\n <p className=\"text-sm text-text-secondary\">\n {item.createdBy?.name ||\n item.createdById ||\n tWithFallback(t, \"files.info.unknown\", \"Unknown\")}\n </p>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyBA,IAAME,IAAmBC,QACvB,OAAO,wBAAqB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,iBAAiB,EAAE,CAC5E;AAcA,SAAgBC,EAAc,EAC5B,SACA,SACA,YACA,kBAAe,MACM;CACrB,IAAM,EAAE,SAAMC,EAAQ,GAChBC,IAASC,MAAS,QAClBC,IAAOF,IAAUG,IAAoB,MACrC,CAACC,GAAoBC,KAAyBC,EAAS,EAAK,GAE5DC,IAAWC,QAAqB;EACpC,AAAIJ,IACFC,EAAsB,EAAK,IAG7BI,EAAQ;CACV,CAAC;CAaD,OAXAC,QAAgB;EACd,IAAMC,KAAgB,MAAyB;GAC7C,AAAIC,EAAM,QAAQ,YAChBL,EAAS;EAEb;EAGA,OADA,SAAS,iBAAiB,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