@brftech/filex-core 0.31.0 → 0.33.0
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 +26 -2
- package/dist/{CsvViewer-DxujFEM3.js → CsvViewer-CqWeV8VO.js} +22 -22
- package/dist/CsvViewer-CqWeV8VO.js.map +1 -0
- package/dist/{DrawioViewer-DCvWnX2t.js → DrawioViewer-BNALOB04.js} +16 -16
- package/dist/DrawioViewer-BNALOB04.js.map +1 -0
- package/dist/filex-core.js +9346 -8069
- package/dist/filex-core.js.map +1 -1
- package/dist/filex-core.umd.cjs +49 -49
- package/dist/filex-core.umd.cjs.map +1 -1
- package/dist/index.d.ts +235 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/FileExplorer.vue +776 -246
- package/src/components/CommandPalette.vue +21 -5
- package/src/components/ConnectionsPanel.vue +2 -1
- package/src/components/E2eRecoveryUnlockModal.vue +29 -4
- package/src/components/FilterBar.vue +244 -0
- package/src/components/GalleryView.vue +12 -1
- package/src/components/GridView.vue +48 -5
- package/src/components/InspectorPanel.vue +231 -8
- package/src/components/ListView.vue +12 -3
- package/src/components/NFSExportsPanel.vue +2 -1
- package/src/components/PendingOpsTray.vue +1 -1
- package/src/components/PresenceBar.vue +3 -2
- package/src/components/S3KeysPanel.vue +2 -1
- package/src/components/SSHKeysPanel.vue +2 -1
- package/src/components/SecondaryPane.vue +28 -13
- package/src/components/SideNav.vue +161 -1
- package/src/components/StarButton.vue +2 -1
- package/src/components/TabBar.vue +2 -2
- package/src/components/ThemeGallery.vue +1 -1
- package/src/components/TokensPanel.vue +2 -1
- package/src/components/Toolbar.vue +244 -58
- package/src/components/ViewSwitcher.vue +81 -0
- package/src/composables/useFileApi.ts +49 -2
- package/src/composables/useLocale.ts +1 -1
- package/src/composables/useOperations.ts +3 -3
- package/src/composables/usePendingOps.ts +1 -1
- package/src/composables/useTabs.ts +1 -1
- package/src/composables/useUploadChunked.ts +39 -7
- package/src/index.ts +8 -2
- package/src/lib/e2ecrypto.ts +191 -3
- package/src/lib/fileFilters.ts +143 -0
- package/src/lib/listing.ts +47 -0
- package/src/lib/themes.ts +7 -7
- package/src/lib/transfer.ts +6 -6
- package/src/locales/en.ts +115 -0
- package/src/locales/index.ts +1 -0
- package/src/locales/resolve.ts +66 -0
- package/src/locales/tr.ts +116 -0
- package/src/modals/ConvertModal.vue +14 -12
- package/src/modals/NewFolderModal.vue +1 -1
- package/src/modals/PermissionsModal.vue +30 -13
- package/src/modals/PreviewModal.vue +9 -9
- package/src/styles/base.css +520 -26
- package/src/styles/variables.css +1 -1
- package/src/types/ExplorerConfig.ts +18 -2
- package/src/types/FileNode.ts +1 -1
- package/src/viewers/CsvViewer.vue +4 -4
- package/src/viewers/DrawioViewer.vue +2 -2
- package/dist/CsvViewer-DxujFEM3.js.map +0 -1
- package/dist/DrawioViewer-DCvWnX2t.js.map +0 -1
package/README.md
CHANGED
|
@@ -50,7 +50,8 @@ const config = {
|
|
|
50
50
|
trashVisible: true,
|
|
51
51
|
sideNav: true, // the navigation panel (default on)
|
|
52
52
|
connections: true, // its "How to connect" + "API keys" entries
|
|
53
|
-
uiProfile: 'standard', //
|
|
53
|
+
uiProfile: 'standard', // 'simple' — one pane, list/grid, no tabs
|
|
54
|
+
// 'drive' — that, plus the Drive-shaped shell
|
|
54
55
|
};
|
|
55
56
|
</script>
|
|
56
57
|
|
|
@@ -108,7 +109,7 @@ const config = {
|
|
|
108
109
|
apiBase: 'https://files.example.com',
|
|
109
110
|
auth: { kind: 'bearer', token },
|
|
110
111
|
sideNav: true, // default; `rootPath` flips it off
|
|
111
|
-
uiProfile: 'simple', // 'standard' (default) | 'simple'
|
|
112
|
+
uiProfile: 'simple', // 'standard' (default) | 'simple' | 'drive'
|
|
112
113
|
};
|
|
113
114
|
```
|
|
114
115
|
|
|
@@ -137,6 +138,29 @@ from the build. It turns off the tab strip and the split pane, reduces the view
|
|
|
137
138
|
switcher to list + grid, and starts the navigation panel expanded, for the
|
|
138
139
|
people who want a file drive rather than a file manager.
|
|
139
140
|
|
|
141
|
+
`uiProfile: 'drive'` is `simple` plus the shell those people already know:
|
|
142
|
+
|
|
143
|
+
- one primary **+ New** menu in the panel (upload files · new folder · request
|
|
144
|
+
files) instead of the Upload / New folder pair,
|
|
145
|
+
- one **search field across the header** with a ⌘K / Ctrl+K chip that hands the
|
|
146
|
+
query to the command palette — the field searches the folder you are in, the
|
|
147
|
+
palette is where "everywhere", saved searches and commands live,
|
|
148
|
+
- a **filter row** under the breadcrumb: Type · Modified · Size,
|
|
149
|
+
- **Folders** and **Files** as labelled sections in grid view,
|
|
150
|
+
- the details panel split into **Details** and **Activity**, with "People with
|
|
151
|
+
access" and a share-link row,
|
|
152
|
+
- a **storage line** under the navigation (`GET /api/files/quota/me`).
|
|
153
|
+
|
|
154
|
+
Nothing is removed here either: density, theme, the shortcut editor, the tour
|
|
155
|
+
and the other view modes all live in the header's "⋯" menu, and the view
|
|
156
|
+
switcher and details toggle move to the breadcrumb row rather than disappearing.
|
|
157
|
+
|
|
158
|
+
⚠ There is deliberately **no People filter** and no Owner column, though the
|
|
159
|
+
mockups this profile came from draw both: a listing row carries no owner
|
|
160
|
+
(`nodes.owner_id` is quota bookkeeping, serialized by nothing) and the listing
|
|
161
|
+
endpoint reads no owner parameter. A chip that opens, offers names and changes
|
|
162
|
+
nothing is worse than no chip.
|
|
163
|
+
|
|
140
164
|
### Connections
|
|
141
165
|
|
|
142
166
|
A second surface, for reaching the same server *without* a browser. filex can
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, ref as v, onMounted as N, watch as y, computed as
|
|
1
|
+
import { defineComponent as B, ref as v, onMounted as N, watch as y, computed as _, openBlock as s, createElementBlock as r, createElementVNode as a, toDisplayString as d, Fragment as k, renderList as C, createCommentVNode as S } from "vue";
|
|
2
2
|
import { f as W } from "./useViewerFetch-czqbd2Lj.js";
|
|
3
3
|
const j = { class: "filex-viewer-csv" }, q = { class: "filex-viewer-csv__pane" }, A = {
|
|
4
4
|
key: 0,
|
|
@@ -12,7 +12,7 @@ const j = { class: "filex-viewer-csv" }, q = { class: "filex-viewer-csv__pane" }
|
|
|
12
12
|
}, Z = { class: "filex-viewer-csv__rownum" }, z = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "filex-viewer-csv__pager"
|
|
15
|
-
}, J = ["disabled"], K = { class: "filex-viewer-csv__pageno" }, Q = ["disabled"], L = 100,
|
|
15
|
+
}, J = ["disabled"], K = { class: "filex-viewer-csv__pageno" }, Q = ["disabled"], L = 100, T = 1e3, Y = /* @__PURE__ */ B({
|
|
16
16
|
__name: "CsvViewer",
|
|
17
17
|
props: {
|
|
18
18
|
url: {},
|
|
@@ -21,10 +21,10 @@ const j = { class: "filex-viewer-csv" }, q = { class: "filex-viewer-csv__pane" }
|
|
|
21
21
|
authHeaders: { type: Function },
|
|
22
22
|
authCredentials: {}
|
|
23
23
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const u =
|
|
24
|
+
setup(V) {
|
|
25
|
+
const u = V, i = v([]), f = v(null), m = v(!0), E = v(!0), D = v(""), o = v(1), h = v(","), w = v("auto");
|
|
26
26
|
let M = 0;
|
|
27
|
-
function
|
|
27
|
+
function $(l) {
|
|
28
28
|
const e = l.split(/\r?\n/).slice(0, 5).join(`
|
|
29
29
|
`), t = (e.match(/\t/g) || []).length, n = (e.match(/;/g) || []).length, c = (e.match(/,/g) || []).length;
|
|
30
30
|
return t > c && t > n ? " " : n > c && n > t ? ";" : ",";
|
|
@@ -39,12 +39,12 @@ const j = { class: "filex-viewer-csv" }, q = { class: "filex-viewer-csv__pane" }
|
|
|
39
39
|
delimiter: e,
|
|
40
40
|
skipEmptyLines: !0,
|
|
41
41
|
header: !1
|
|
42
|
-
}).data.slice(0,
|
|
42
|
+
}).data.slice(0, T);
|
|
43
43
|
} catch {
|
|
44
|
-
return l.split(/\r?\n/).filter((t) => t.length > 0).slice(0,
|
|
44
|
+
return l.split(/\r?\n/).filter((t) => t.length > 0).slice(0, T).map((t) => t.split(e));
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
async function
|
|
47
|
+
async function g() {
|
|
48
48
|
var n;
|
|
49
49
|
m.value = !0, f.value = null, i.value = [], o.value = 1;
|
|
50
50
|
const l = ++M;
|
|
@@ -60,29 +60,29 @@ const j = { class: "filex-viewer-csv" }, q = { class: "filex-viewer-csv__pane" }
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
if (l !== M) return;
|
|
63
|
-
u.ext === "tsv" ?
|
|
64
|
-
const t =
|
|
63
|
+
u.ext === "tsv" ? h.value = " " : h.value = $(e.slice(0, 4096));
|
|
64
|
+
const t = w.value === "auto" ? h.value : w.value;
|
|
65
65
|
i.value = await F(e, t), m.value = !1;
|
|
66
66
|
}
|
|
67
|
-
N(
|
|
68
|
-
i.value.length !== 0 &&
|
|
67
|
+
N(g), y(() => u.url, g), y(() => w.value, () => {
|
|
68
|
+
i.value.length !== 0 && g();
|
|
69
69
|
});
|
|
70
|
-
const H =
|
|
70
|
+
const H = _(() => !E.value || i.value.length === 0 ? i.value.length === 0 ? [] : i.value[0].map((l, e) => `Col ${e + 1}`) : i.value[0]), P = _(() => E.value ? i.value.slice(1) : i.value), p = _(() => {
|
|
71
71
|
const l = D.value.trim().toLowerCase();
|
|
72
72
|
return l ? P.value.filter(
|
|
73
73
|
(e) => e.some((t) => (t || "").toLowerCase().includes(l))
|
|
74
74
|
) : P.value;
|
|
75
|
-
}), b =
|
|
76
|
-
() => Math.max(1, Math.ceil(
|
|
77
|
-
), I =
|
|
75
|
+
}), b = _(
|
|
76
|
+
() => Math.max(1, Math.ceil(p.value.length / L))
|
|
77
|
+
), I = _(() => {
|
|
78
78
|
const l = (o.value - 1) * L;
|
|
79
|
-
return
|
|
79
|
+
return p.value.slice(l, l + L);
|
|
80
80
|
});
|
|
81
81
|
y(D, () => {
|
|
82
82
|
o.value = 1;
|
|
83
83
|
});
|
|
84
|
-
function
|
|
85
|
-
return u.t ? u.t(l) : e;
|
|
84
|
+
function R(l, e, t) {
|
|
85
|
+
return u.t ? u.t(l, t) : e;
|
|
86
86
|
}
|
|
87
87
|
return (l, e) => (s(), r("div", j, [
|
|
88
88
|
a("div", q, [
|
|
@@ -91,7 +91,7 @@ const j = { class: "filex-viewer-csv" }, q = { class: "filex-viewer-csv__pane" }
|
|
|
91
91
|
a("p", null, d(f.value), 1)
|
|
92
92
|
])) : m.value ? (s(), r("div", G, [
|
|
93
93
|
e[3] || (e[3] = a("span", { class: "filex-viewer-fallback__icon" }, "⏳", -1)),
|
|
94
|
-
a("p", null, d(
|
|
94
|
+
a("p", null, d(R("viewer.loading", "Loading…")), 1)
|
|
95
95
|
])) : (s(), r("table", O, [
|
|
96
96
|
a("thead", null, [
|
|
97
97
|
a("tr", null, [
|
|
@@ -114,7 +114,7 @@ const j = { class: "filex-viewer-csv" }, q = { class: "filex-viewer-csv__pane" }
|
|
|
114
114
|
disabled: o.value <= 1,
|
|
115
115
|
onClick: e[0] || (e[0] = (t) => o.value--)
|
|
116
116
|
}, "‹", 8, J),
|
|
117
|
-
a("span", K, d(o.value) + " / " + d(b.value) + " (" + d(
|
|
117
|
+
a("span", K, d(o.value) + " / " + d(b.value) + " (" + d(R("viewer.csv_rows", `${p.value.length} rows`, { n: p.value.length })) + ")", 1),
|
|
118
118
|
a("button", {
|
|
119
119
|
type: "button",
|
|
120
120
|
class: "filex-viewer-btn",
|
|
@@ -128,4 +128,4 @@ const j = { class: "filex-viewer-csv" }, q = { class: "filex-viewer-csv__pane" }
|
|
|
128
128
|
export {
|
|
129
129
|
Y as default
|
|
130
130
|
};
|
|
131
|
-
//# sourceMappingURL=CsvViewer-
|
|
131
|
+
//# sourceMappingURL=CsvViewer-CqWeV8VO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CsvViewer-CqWeV8VO.js","sources":["../src/viewers/CsvViewer.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * CsvViewer — lightweight CSV / TSV table preview.\n *\n * Lazy-imports `papaparse` when available (best-quality parser — handles\n * embedded quotes, multi-line cells, etc). Falls back to a simple\n * `split` parser when the peer is missing — workable for the trivial\n * \"first 1000 rows\" preview case but loses fidelity on complex files.\n *\n * UX:\n * - first-row-as-header toggle\n * - filter input that case-insensitively matches any cell\n * - 100-rows-per-page pagination\n * - tab vs comma auto-detection (manual override via toolbar)\n */\nimport { computed, onMounted, ref, watch } from 'vue';\nimport { fetchViewerText } from '../composables/useViewerFetch';\n\nconst props = defineProps<{\n url: string;\n ext: string;\n t?: (key: string, vars?: Record<string, string | number>) => string;\n authHeaders?: () => Record<string, string> | Promise<Record<string, string>>;\n authCredentials?: RequestCredentials;\n}>();\n\nconst PAGE_SIZE = 100;\nconst ROW_LIMIT = 1000;\n\nconst rows = ref<string[][]>([]);\nconst error = ref<string | null>(null);\nconst loading = ref(true);\nconst firstRowHeader = ref(true);\nconst filter = ref('');\nconst page = ref(1);\nconst detectedDelim = ref<',' | '\\t' | ';'>(',');\nconst userDelim = ref<'auto' | ',' | '\\t' | ';'>('auto');\n\nlet renderToken = 0;\n\nfunction detectDelimiter(sample: string): ',' | '\\t' | ';' {\n const sampleLines = sample.split(/\\r?\\n/).slice(0, 5).join('\\n');\n const tab = (sampleLines.match(/\\t/g) || []).length;\n const semi = (sampleLines.match(/;/g) || []).length;\n const comma = (sampleLines.match(/,/g) || []).length;\n if (tab > comma && tab > semi) return '\\t';\n if (semi > comma && semi > tab) return ';';\n return ',';\n}\n\nasync function parseWith(text: string, delim: string): Promise<string[][]> {\n try {\n const mod = await import(/* @vite-ignore */ 'papaparse');\n const Papa = (mod as any).default ?? mod;\n const result = Papa.parse(text, {\n delimiter: delim,\n skipEmptyLines: true,\n header: false,\n });\n return (result.data as string[][]).slice(0, ROW_LIMIT);\n } catch {\n // Fallback: naive line/column split. Loses quoted-comma support\n // but renders something reasonable.\n return text\n .split(/\\r?\\n/)\n .filter((l) => l.length > 0)\n .slice(0, ROW_LIMIT)\n .map((line) => line.split(delim));\n }\n}\n\nasync function load(): Promise<void> {\n loading.value = true;\n error.value = null;\n rows.value = [];\n page.value = 1;\n const myToken = ++renderToken;\n\n let text: string;\n try {\n text = await fetchViewerText({\n url: props.url,\n headers: (await props.authHeaders?.()) ?? {},\n credentials: props.authCredentials,\n });\n } catch (err) {\n error.value = err instanceof Error ? err.message : 'fetch failed';\n loading.value = false;\n return;\n }\n\n if (myToken !== renderToken) return;\n\n if (props.ext === 'tsv') {\n detectedDelim.value = '\\t';\n } else {\n detectedDelim.value = detectDelimiter(text.slice(0, 4096));\n }\n\n const delim = userDelim.value === 'auto' ? detectedDelim.value : userDelim.value;\n rows.value = await parseWith(text, delim);\n loading.value = false;\n}\n\nonMounted(load);\nwatch(() => props.url, load);\nwatch(() => userDelim.value, () => {\n if (rows.value.length === 0) return;\n // Re-parse with the new delimiter using the cached source — but we\n // didn't keep it. Cheapest path is a refetch.\n load();\n});\n\nconst headers = computed<string[]>(() => {\n if (!firstRowHeader.value || rows.value.length === 0) {\n if (rows.value.length === 0) return [];\n return rows.value[0].map((_, i) => `Col ${i + 1}`);\n }\n return rows.value[0];\n});\n\nconst dataRows = computed<string[][]>(() => {\n return firstRowHeader.value ? rows.value.slice(1) : rows.value;\n});\n\nconst filtered = computed<string[][]>(() => {\n const q = filter.value.trim().toLowerCase();\n if (!q) return dataRows.value;\n return dataRows.value.filter((r) =>\n r.some((c) => (c || '').toLowerCase().includes(q)),\n );\n});\n\nconst totalPages = computed(() =>\n Math.max(1, Math.ceil(filtered.value.length / PAGE_SIZE)),\n);\n\nconst visibleRows = computed<string[][]>(() => {\n const start = (page.value - 1) * PAGE_SIZE;\n return filtered.value.slice(start, start + PAGE_SIZE);\n});\n\nwatch(filter, () => {\n page.value = 1;\n});\n\nfunction tt(key: string, fallback: string, vars?: Record<string, string | number>): string {\n return props.t ? props.t(key, vars) : fallback;\n}\n</script>\n\n<template>\n <div class=\"filex-viewer-csv\">\n <div class=\"filex-viewer-csv__pane\">\n <div v-if=\"error\" class=\"filex-viewer-fallback\">\n <span class=\"filex-viewer-fallback__icon\">📊</span>\n <p>{{ error }}</p>\n </div>\n <div v-else-if=\"loading\" class=\"filex-viewer-fallback\">\n <span class=\"filex-viewer-fallback__icon\">⏳</span>\n <p>{{ tt('viewer.loading', 'Loading…') }}</p>\n </div>\n <table v-else class=\"filex-viewer-csv__table\">\n <thead>\n <tr>\n <th class=\"filex-viewer-csv__rownum\">#</th>\n <th v-for=\"(h, i) in headers\" :key=\"i\">{{ h }}</th>\n </tr>\n </thead>\n <tbody>\n <tr v-for=\"(row, ri) in visibleRows\" :key=\"ri\">\n <td class=\"filex-viewer-csv__rownum\">{{ (page - 1) * 100 + ri + 1 }}</td>\n <td v-for=\"(c, ci) in row\" :key=\"ci\">{{ c }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n <div v-if=\"!loading && !error && totalPages > 1\" class=\"filex-viewer-csv__pager\">\n <button\n type=\"button\"\n class=\"filex-viewer-btn\"\n :disabled=\"page <= 1\"\n @click=\"page--\"\n >‹</button>\n <span class=\"filex-viewer-csv__pageno\">{{ page }} / {{ totalPages }} ({{ tt('viewer.csv_rows', `${filtered.length} rows`, { n: filtered.length }) }})</span>\n <button\n type=\"button\"\n class=\"filex-viewer-btn\"\n :disabled=\"page >= totalPages\"\n @click=\"page++\"\n >›</button>\n </div>\n </div>\n</template>\n\n<style>\n/* ⚠ NOT `scoped`, deliberately. Vue's scoped styles compile to\n `.cls[data-v-HASH]`, and in the web-component build the hash baked into\n this CSS does not match the one Vue stamps onto the DOM — so every rule\n here silently stopped applying. Measured in the desktop app: the share\n dialog had `position: static`, no background and no radius, i.e. raw\n unstyled HTML, in EVERY embedded surface.\n Safe to drop: every selector below is prefixed (fx-/fe-/filex-), so\n there is nothing here that can leak into a host page. */\n.filex-viewer-csv {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 70vh;\n background: var(--fe-bg, #fff);\n color: var(--fe-text, #1a1e27);\n}\n.filex-viewer-csv__bar {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n background: var(--fe-bg-elev, #f7f8fa);\n border-bottom: 1px solid var(--fe-border, #e2e6ed);\n font-size: 12px;\n}\n.filex-viewer-csv__check {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n}\n.filex-viewer-csv__select,\n.filex-viewer-csv__filter {\n border: 1px solid var(--fe-border, #e2e6ed);\n background: var(--fe-bg, #fff);\n color: inherit;\n padding: 4px 8px;\n border-radius: 4px;\n font: inherit;\n font-size: 12px;\n}\n.filex-viewer-csv__filter {\n flex: 0 1 240px;\n}\n.filex-viewer-spacer { flex: 1; }\n.filex-viewer-csv__count {\n font-size: 11px;\n color: var(--fe-text-muted, #5a6475);\n font-variant-numeric: tabular-nums;\n}\n.filex-viewer-csv__pane {\n flex: 1;\n overflow: auto;\n}\n.filex-viewer-csv__table {\n border-collapse: collapse;\n width: max-content;\n min-width: 100%;\n font-size: 12px;\n font-family: var(--fe-font-mono, monospace);\n}\n.filex-viewer-csv__table th,\n.filex-viewer-csv__table td {\n padding: 4px 10px;\n border: 1px solid var(--fe-border, #e2e6ed);\n white-space: nowrap;\n max-width: 320px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.filex-viewer-csv__table th {\n background: var(--fe-bg-elev, #f7f8fa);\n position: sticky;\n top: 0;\n font-weight: 600;\n text-align: left;\n}\n.filex-viewer-csv__table tbody tr:nth-child(even) {\n background: var(--fe-bg-hover, rgba(0, 0, 0, 0.02));\n}\n.filex-viewer-csv__rownum {\n color: var(--fe-text-muted, #5a6475);\n text-align: right;\n background: var(--fe-bg-elev, #f7f8fa);\n font-variant-numeric: tabular-nums;\n position: sticky;\n left: 0;\n}\n.filex-viewer-csv__pager {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n padding: 6px;\n background: var(--fe-bg-elev, #f7f8fa);\n border-top: 1px solid var(--fe-border, #e2e6ed);\n font-size: 12px;\n}\n.filex-viewer-csv__pageno {\n font-variant-numeric: tabular-nums;\n font-size: 12px;\n}\n.filex-viewer-fallback {\n text-align: center;\n padding: 32px;\n color: var(--fe-text-muted, #5a6475);\n}\n.filex-viewer-fallback__icon {\n font-size: 48px;\n display: block;\n margin-bottom: 12px;\n}\n.filex-viewer-btn {\n border: 1px solid var(--fe-border, #e2e6ed);\n background: var(--fe-bg, #fff);\n color: var(--fe-text, #1a1e27);\n padding: 4px 10px;\n border-radius: 4px;\n cursor: pointer;\n font: inherit;\n font-size: 12px;\n}\n.filex-viewer-btn:hover:not(:disabled) {\n background: var(--fe-bg-hover, #edf0f5);\n}\n.filex-viewer-btn:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n</style>\n"],"names":["PAGE_SIZE","ROW_LIMIT","props","__props","rows","ref","error","loading","firstRowHeader","filter","page","detectedDelim","userDelim","renderToken","detectDelimiter","sample","sampleLines","tab","semi","comma","parseWith","text","delim","mod","n","l","line","load","myToken","fetchViewerText","_a","err","onMounted","watch","headers","computed","_","i","dataRows","filtered","q","r","c","totalPages","visibleRows","start","tt","key","fallback","vars","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_hoisted_3","_cache","_hoisted_4","_hoisted_5","_Fragment","_renderList","h","row","ri","_hoisted_6","_toDisplayString","ci","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10"],"mappings":";;;;;;;;;;;;;;kFA0BMA,IAAY,KACZC,IAAY;;;;;;;;;;AATlB,UAAMC,IAAQC,GAWRC,IAAOC,EAAgB,EAAE,GACzBC,IAAQD,EAAmB,IAAI,GAC/BE,IAAUF,EAAI,EAAI,GAClBG,IAAiBH,EAAI,EAAI,GACzBI,IAASJ,EAAI,EAAE,GACfK,IAAOL,EAAI,CAAC,GACZM,IAAgBN,EAAsB,GAAG,GACzCO,IAAYP,EAA+B,MAAM;AAEvD,QAAIQ,IAAc;AAElB,aAASC,EAAgBC,GAAkC;AACzD,YAAMC,IAAcD,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AG/CR,EAKQ,SAAA,MAAA;AAAA,aAJNH,EAAA,EAAA,GAAAC,EAGKQ,GAAA,MAAAC,EAHmBhB,EAAA,OAAW,CAAvBkB,GAAKC,YAAjBZ,EAGK,MAAA,EAHiC,KAAKY,KAAE;AAAA,cAC3CV,EAAyE,MAAzEW,GAAyEC,GAAhCvD,EAAA,mBAAkBqD,IAAE,CAAA,GAAA,CAAA;AAAA,eAC7Db,EAAA,EAAA,GAAAC,EAAiDQ,GAAA,MAAAC,EAA3BE,GAAG,CAAb,GAAGI,OAAfhB,EAAA,GAAAC,EAAiD,MAAA,EAArB,KAAKe,EAAA,KAAO,CAAC,GAAA,CAAA;;;;;OAKrC3D,EAAA,SAAO,CAAKD,EAAA,SAASqC,EAAA,QAAU,KAA3CO,EAAA,GAAAC,EAcM,OAdNgB,GAcM;AAAA,QAbJd,EAKW,UAAA;AAAA,UAJT,MAAK;AAAA,UACL,OAAM;AAAA,UACL,UAAU3C,EAAA,SAAI;AAAA,UACd,gCAAOA,EAAA;AAAA,QAAA,GACT,KAAC,GAAA0D,CAAA;AAAA,QACFf,EAA4J,QAA5JgB,GAA4JJ,EAAlHvD,EAAA,KAAI,IAAG,QAAGuD,EAAGtB,OAAU,IAAG,SAAKG,EAAE,mBAAA,GAAuBP,QAAS,MAAM,cAAcA,EAAA,MAAS,OAAA,CAAM,CAAA,IAAM,KAAC,CAAA;AAAA,QACrJc,EAKW,UAAA;AAAA,UAJT,MAAK;AAAA,UACL,OAAM;AAAA,UACL,UAAU3C,EAAA,SAAQiC,EAAA;AAAA,UAClB,gCAAOjC,EAAA;AAAA,QAAA,GACT,KAAC,GAAA4D,CAAA;AAAA,MAAA;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as U, ref as s, computed as
|
|
1
|
+
import { defineComponent as U, ref as s, computed as p, onMounted as E, watch as S, onBeforeUnmount as B, openBlock as u, createElementBlock as d, createElementVNode as g, toDisplayString as O } from "vue";
|
|
2
2
|
import { f as C } from "./useViewerFetch-czqbd2Lj.js";
|
|
3
3
|
const T = { class: "filex-viewer-drawio" }, $ = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "filex-viewer-fallback"
|
|
6
|
-
},
|
|
6
|
+
}, N = ["src"], j = /* @__PURE__ */ U({
|
|
7
7
|
__name: "DrawioViewer",
|
|
8
8
|
props: {
|
|
9
9
|
url: {},
|
|
@@ -17,9 +17,9 @@ const T = { class: "filex-viewer-drawio" }, $ = {
|
|
|
17
17
|
authCredentials: {}
|
|
18
18
|
},
|
|
19
19
|
setup(x) {
|
|
20
|
-
const e = x, c = s(null), i = s(null), n = s("loading"), f = s(!!e.readOnly || !e.saveUrl), o =
|
|
20
|
+
const e = x, c = s(null), i = s(null), n = s("loading"), f = s(!!e.readOnly || !e.saveUrl), o = p(
|
|
21
21
|
() => e.drawioUrl ? e.drawioUrl.replace(/\/$/, "") : null
|
|
22
|
-
), _ =
|
|
22
|
+
), _ = p(() => {
|
|
23
23
|
if (!o.value) return "";
|
|
24
24
|
const a = new URLSearchParams({
|
|
25
25
|
embed: "1",
|
|
@@ -104,37 +104,37 @@ const T = { class: "filex-viewer-drawio" }, $ = {
|
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function h() {
|
|
108
108
|
if (!o.value) {
|
|
109
|
-
i.value =
|
|
109
|
+
i.value = y("viewer.drawio.disabled", "diagrams.net is not configured for this filex instance."), n.value = "error";
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
i.value ===
|
|
112
|
+
i.value === y("viewer.drawio.disabled", "diagrams.net is not configured for this filex instance.") && (i.value = null, n.value = "loading"), k();
|
|
113
113
|
}
|
|
114
114
|
E(() => {
|
|
115
|
-
window.addEventListener("message", w),
|
|
116
|
-
}), S(() => e.drawioUrl,
|
|
115
|
+
window.addEventListener("message", w), h();
|
|
116
|
+
}), S(() => e.drawioUrl, h), B(() => {
|
|
117
117
|
window.removeEventListener("message", w);
|
|
118
118
|
});
|
|
119
|
-
function
|
|
119
|
+
function y(a, t) {
|
|
120
120
|
return e.t ? e.t(a) : t;
|
|
121
121
|
}
|
|
122
|
-
return (a, t) => (
|
|
123
|
-
i.value ? (
|
|
122
|
+
return (a, t) => (u(), d("div", T, [
|
|
123
|
+
i.value ? (u(), d("div", $, [
|
|
124
124
|
t[0] || (t[0] = g("span", { class: "filex-viewer-fallback__icon" }, "📐", -1)),
|
|
125
125
|
g("p", null, O(i.value), 1)
|
|
126
|
-
])) : (
|
|
126
|
+
])) : (u(), d("iframe", {
|
|
127
127
|
key: 1,
|
|
128
128
|
ref_key: "iframeRef",
|
|
129
129
|
ref: c,
|
|
130
130
|
src: _.value,
|
|
131
131
|
class: "filex-viewer-drawio__frame",
|
|
132
132
|
title: "diagrams.net editor"
|
|
133
|
-
}, null, 8,
|
|
133
|
+
}, null, 8, N))
|
|
134
134
|
]));
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
137
|
export {
|
|
138
|
-
|
|
138
|
+
j as default
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=DrawioViewer-
|
|
140
|
+
//# sourceMappingURL=DrawioViewer-BNALOB04.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DrawioViewer-BNALOB04.js","sources":["../src/viewers/DrawioViewer.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * DrawioViewer — embed diagrams.net via iframe + postMessage handshake.\n *\n * The diagrams.net embed mode (`?embed=1&proto=json`) handshakes via\n * window.postMessage:\n *\n * 1. iframe sends {event:'init'} ← bootstrap\n * 2. parent sends {action:'load', xml} ← our payload\n * 3. iframe sends {event:'save', xml} on save ← we POST back\n *\n * No external library required — diagrams.net hosts the entire editor\n * inside the iframe. We just fetch the source XML on mount and route\n * `save` events back to the configured `pdfSaveUrl`-style endpoint\n * (drawio uses the same shape: POST `{path, content}` body).\n */\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';\nimport { fetchViewerText } from '../composables/useViewerFetch';\n\nconst props = defineProps<{\n url: string;\n filePath: string;\n ext: string;\n drawioUrl?: string;\n /** Optional save endpoint. When unset the iframe stays read-only. */\n saveUrl?: string;\n readOnly?: boolean;\n t?: (key: string) => string;\n authHeaders?: () => Record<string, string> | Promise<Record<string, string>>;\n authCredentials?: RequestCredentials;\n}>();\n\nconst iframeRef = ref<HTMLIFrameElement | null>(null);\nconst error = ref<string | null>(null);\nconst status = ref<'loading' | 'ready' | 'saving' | 'saved' | 'error'>('loading');\nconst readOnly = ref(!!props.readOnly || !props.saveUrl);\n\n// drawioUrl=null is the operator's \"off\" signal — FileExplorer wipes it\n// when the capabilities probe reports drawio offline. Don't silently fall\n// back to the public embed.diagrams.net iframe, that defeats the point of\n// gating: render a \"not configured\" pane instead so the user understands\n// why the editor isn't loading.\n//\n// `drawioBase` MUST be a computed (not a const), otherwise a stale null\n// at mount time (capabilities probe still inflight) gets cached for the\n// component's lifetime — leading to the spurious\n// \"viewer.drawio.disabled\" fallback after the capability flips to \"ok\".\nconst drawioBase = computed<string | null>(() =>\n props.drawioUrl ? props.drawioUrl.replace(/\\/$/, '') : null,\n);\nconst iframeSrc = computed<string>(() => {\n if (!drawioBase.value) return '';\n const params = new URLSearchParams({\n embed: '1',\n proto: 'json',\n spin: '1',\n saveAndExit: '0',\n noSaveBtn: readOnly.value ? '1' : '0',\n noExitBtn: '1',\n ui: 'kennedy',\n modified: 'unsavedChanges',\n });\n return `${drawioBase.value}/?${params.toString()}`;\n});\n\nlet pendingXml: string = '';\n\nasync function loadXml(): Promise<void> {\n status.value = 'loading';\n error.value = null;\n try {\n pendingXml = await fetchViewerText({\n url: props.url,\n headers: (await props.authHeaders?.()) ?? {},\n credentials: props.authCredentials,\n });\n } catch (err) {\n error.value = err instanceof Error ? err.message : 'fetch failed';\n status.value = 'error';\n }\n}\n\nfunction send(msg: unknown): void {\n iframeRef.value?.contentWindow?.postMessage(JSON.stringify(msg), '*');\n}\n\nasync function persist(xml: string): Promise<void> {\n if (!props.saveUrl) return;\n status.value = 'saving';\n try {\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n ...((await props.authHeaders?.()) ?? {}),\n };\n const res = await fetch(props.saveUrl, {\n method: 'POST',\n headers,\n credentials: props.authCredentials || 'same-origin',\n body: JSON.stringify({ path: props.filePath, content: xml }),\n });\n if (!res.ok) {\n throw new Error(`${res.status} ${res.statusText}`);\n }\n status.value = 'saved';\n setTimeout(() => {\n if (status.value === 'saved') status.value = 'ready';\n }, 2500);\n } catch (err) {\n error.value = err instanceof Error ? err.message : 'save failed';\n status.value = 'error';\n }\n}\n\nfunction onMessage(ev: MessageEvent): void {\n if (typeof ev.data !== 'string' || ev.data.length === 0) return;\n // Drawio messages always start with '{' or '<'. Ignore anything else\n // (devtools / unrelated postMessage senders inside the same window).\n const first = ev.data[0];\n if (first !== '{' && first !== '<') return;\n let payload: any;\n try {\n payload = JSON.parse(ev.data);\n } catch {\n return;\n }\n if (!payload || typeof payload !== 'object') return;\n switch (payload.event) {\n case 'init':\n send({\n action: 'load',\n xml: pendingXml,\n autosave: 0,\n });\n status.value = 'ready';\n break;\n case 'save':\n if (typeof payload.xml === 'string') {\n persist(payload.xml);\n }\n break;\n case 'export':\n // Could persist a PNG/SVG render; out of V1 scope.\n break;\n case 'autosave':\n if (typeof payload.xml === 'string' && !readOnly.value) {\n persist(payload.xml);\n }\n break;\n default:\n break;\n }\n}\n\nfunction bootIfReady(): void {\n if (!drawioBase.value) {\n error.value = tt('viewer.drawio.disabled', 'diagrams.net is not configured for this filex instance.');\n status.value = 'error';\n return;\n }\n // Clear a previous \"disabled\" error in case the prop just became\n // available (capability probe finished after mount).\n if (error.value === tt('viewer.drawio.disabled', 'diagrams.net is not configured for this filex instance.')) {\n error.value = null;\n status.value = 'loading';\n }\n loadXml();\n}\n\nonMounted(() => {\n window.addEventListener('message', onMessage);\n bootIfReady();\n});\n\nwatch(() => props.drawioUrl, bootIfReady);\n\nonBeforeUnmount(() => {\n window.removeEventListener('message', onMessage);\n});\n\nfunction tt(key: string, fallback: string): string {\n return props.t ? props.t(key) : fallback;\n}\n</script>\n\n<template>\n <div class=\"filex-viewer-drawio\">\n <div v-if=\"error\" class=\"filex-viewer-fallback\">\n <span class=\"filex-viewer-fallback__icon\">📐</span>\n <p>{{ error }}</p>\n </div>\n <iframe\n v-else\n ref=\"iframeRef\"\n :src=\"iframeSrc\"\n class=\"filex-viewer-drawio__frame\"\n title=\"diagrams.net editor\"\n />\n </div>\n</template>\n\n<style>\n/* ⚠ NOT `scoped`, deliberately. Vue's scoped styles compile to\n `.cls[data-v-HASH]`, and in the web-component build the hash baked into\n this CSS does not match the one Vue stamps onto the DOM — so every rule\n here silently stopped applying. Measured in the desktop app: the share\n dialog had `position: static`, no background and no radius, i.e. raw\n unstyled HTML, in EVERY embedded surface.\n Safe to drop: every selector below is prefixed (fx-/fe-/filex-), so\n there is nothing here that can leak into a host page. */\n.filex-viewer-drawio {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 70vh;\n background: var(--fe-bg, #fff);\n}\n.filex-viewer-drawio__bar {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 12px;\n background: var(--fe-bg-elev, #f7f8fa);\n border-bottom: 1px solid var(--fe-border, #e2e6ed);\n font-size: 12px;\n color: var(--fe-text-muted, #5a6475);\n}\n.filex-viewer-drawio__status[data-state=\"error\"] { color: var(--fe-danger, #dc2626); }\n.filex-viewer-drawio__status[data-state=\"saved\"] { color: #059669; }\n.filex-viewer-drawio__readonly {\n font-style: italic;\n margin-left: auto;\n}\n.filex-viewer-drawio__frame {\n flex: 1;\n width: 100%;\n border: 0;\n background: #fafafa;\n min-height: 0;\n}\n.filex-viewer-fallback {\n text-align: center;\n padding: 32px;\n color: var(--fe-text-muted, #5a6475);\n}\n.filex-viewer-fallback__icon {\n font-size: 48px;\n display: block;\n margin-bottom: 12px;\n}\n</style>\n"],"names":["props","__props","iframeRef","ref","error","status","readOnly","drawioBase","computed","iframeSrc","params","pendingXml","loadXml","fetchViewerText","_a","err","send","msg","_b","persist","xml","headers","res","onMessage","ev","first","payload","bootIfReady","tt","onMounted","watch","onBeforeUnmount","key","fallback","_openBlock","_createElementBlock","_hoisted_1","_hoisted_2","_cache","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,UAAMA,IAAQC,GAaRC,IAAYC,EAA8B,IAAI,GAC9CC,IAAQD,EAAmB,IAAI,GAC/BE,IAASF,EAAwD,SAAS,GAC1EG,IAAWH,EAAI,CAAC,CAACH,EAAM,YAAY,CAACA,EAAM,OAAO,GAYjDO,IAAaC;AAAA,MAAwB,MACzCR,EAAM,YAAYA,EAAM,UAAU,QAAQ,OAAO,EAAE,IAAI;AAAA,IAAA,GAEnDS,IAAYD,EAAiB,MAAM;AACvC,UAAI,CAACD,EAAW,MAAO,QAAO;AAC9B,YAAMG,IAAS,IAAI,gBAAgB;AAAA,QACjC,OAAO;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,QACN,aAAa;AAAA,QACb,WAAWJ,EAAS,QAAQ,MAAM;AAAA,QAClC,WAAW;AAAA,QACX,IAAI;AAAA,QACJ,UAAU;AAAA,MAAA,CACX;AACD,aAAO,GAAGC,EAAW,KAAK,KAAKG,EAAO,UAAU;AAAA,IAClD,CAAC;AAED,QAAIC,IAAqB;AAEzB,mBAAeC,IAAyB;;AACtC,MAAAP,EAAO,QAAQ,WACfD,EAAM,QAAQ;AACd,UAAI;AACF,QAAAO,IAAa,MAAME,EAAgB;AAAA,UACjC,KAAKb,EAAM;AAAA,UACX,SAAU,QAAMc,IAAAd,EAAM,gBAAN,gBAAAc,EAAA,KAAAd,OAA0B,CAAA;AAAA,UAC1C,aAAaA,EAAM;AAAA,QAAA,CACpB;AAAA,MACH,SAASe,GAAK;AACZ,QAAAX,EAAM,QAAQW,aAAe,QAAQA,EAAI,UAAU,gBACnDV,EAAO,QAAQ;AAAA,MACjB;AAAA,IACF;AAEA,aAASW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