@brftech/filex-core 0.40.0 → 0.41.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 +32 -25
- package/dist/ArchiveViewer-DxxjhYZD.js +124 -0
- package/dist/ArchiveViewer-DxxjhYZD.js.map +1 -0
- package/dist/CsvViewer-CyuwENI_.js +141 -0
- package/dist/CsvViewer-CyuwENI_.js.map +1 -0
- package/dist/{DrawioViewer-BNALOB04.js → DrawioViewer-BIYsTX97.js} +48 -42
- package/dist/DrawioViewer-BIYsTX97.js.map +1 -0
- package/dist/EpubViewer-K9PjCMmS.js +163 -0
- package/dist/EpubViewer-K9PjCMmS.js.map +1 -0
- package/dist/IpynbViewer-DYU6Zgz2.js +184 -0
- package/dist/IpynbViewer-DYU6Zgz2.js.map +1 -0
- package/dist/MermaidViewer-Bp73aId8.js +137 -0
- package/dist/MermaidViewer-Bp73aId8.js.map +1 -0
- package/dist/PsdViewer-C2eLivw1.js +122 -0
- package/dist/PsdViewer-C2eLivw1.js.map +1 -0
- package/dist/TiffViewer-DsHg5gcz.js +142 -0
- package/dist/TiffViewer-DsHg5gcz.js.map +1 -0
- package/dist/Viewer3D-C_dc2HN9.js +75 -0
- package/dist/Viewer3D-C_dc2HN9.js.map +1 -0
- package/dist/filex-core.js +218 -20361
- package/dist/filex-core.js.map +1 -1
- package/dist/filex-core.umd.cjs +61 -62
- package/dist/filex-core.umd.cjs.map +1 -1
- package/dist/index-vxMZpYb-.js +26700 -0
- package/dist/index-vxMZpYb-.js.map +1 -0
- package/dist/index.d.ts +4212 -862
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/FileExplorer.vue +2154 -506
- package/src/components/AdvancedSearch.vue +870 -0
- package/src/components/Breadcrumb.vue +191 -19
- package/src/components/CommandPalette.vue +66 -22
- package/src/components/ConnectionsPanel.vue +6 -2
- package/src/components/ContextMenu.vue +39 -2
- package/src/components/EncryptedFolderModal.vue +31 -25
- package/src/components/FilePane.vue +951 -0
- package/src/components/FilterBar.vue +568 -72
- package/src/components/GalleryView.vue +172 -56
- package/src/components/GridView.vue +331 -82
- package/src/components/HomeView.vue +331 -0
- package/src/components/InspectorPanel.vue +296 -53
- package/src/components/ListView.vue +1173 -194
- package/src/components/NFSExportsPanel.vue +7 -4
- package/src/components/OnboardingTour.vue +156 -33
- package/src/components/QuickLook.vue +26 -1
- package/src/components/RecentlyOpened.vue +17 -2
- package/src/components/S3KeysPanel.vue +7 -4
- package/src/components/SSHKeysPanel.vue +7 -4
- package/src/components/ShortcutSettings.vue +6 -2
- package/src/components/ShortcutsHelp.vue +4 -1
- package/src/components/SideNav.vue +206 -140
- package/src/components/StorageFields.vue +19 -1
- package/src/components/TabBar.vue +87 -1
- package/src/components/TagPicker.vue +77 -6
- package/src/components/ThemeGallery.vue +13 -198
- package/src/components/ThemePalette.vue +244 -0
- package/src/components/TimeZoneDialog.vue +135 -0
- package/src/components/TimeZonePicker.vue +696 -0
- package/src/components/TokensPanel.vue +35 -14
- package/src/components/Toolbar.vue +953 -465
- package/src/components/ViewSwitcher.vue +9 -4
- package/src/composables/useConnections.ts +35 -4
- package/src/composables/useExplorerTimeZone.ts +89 -0
- package/src/composables/useFileApi.ts +53 -4
- package/src/composables/useLocale.ts +382 -26
- package/src/composables/useRowTouch.ts +95 -0
- package/src/index.ts +177 -3
- package/src/lib/actionIcons.ts +330 -0
- package/src/lib/advSearch.ts +162 -0
- package/src/lib/dateGroups.ts +197 -0
- package/src/lib/destinationTree.ts +235 -0
- package/src/lib/downloadSelection.ts +154 -0
- package/src/lib/fileFilters.ts +319 -12
- package/src/lib/fileIcons.ts +299 -5
- package/src/lib/filePreview.ts +605 -0
- package/src/lib/listing.ts +72 -0
- package/src/lib/shareTtl.ts +31 -2
- package/src/lib/sortOrder.ts +459 -0
- package/src/lib/themes.ts +151 -116
- package/src/lib/timezone.ts +501 -0
- package/src/lib/uiProfile.ts +82 -0
- package/src/lib/viewPrefs.ts +1036 -0
- package/src/locales/en.ts +416 -26
- package/src/locales/tr.ts +409 -26
- package/src/modals/ConvertModal.vue +23 -3
- package/src/modals/DestinationPickerModal.vue +341 -0
- package/src/modals/Modal.vue +18 -4
- package/src/modals/NewDocumentModal.vue +525 -0
- package/src/modals/NewFolderModal.vue +15 -9
- package/src/modals/PermissionsModal.vue +557 -476
- package/src/modals/PreviewModal.vue +516 -156
- package/src/styles/base.css +5409 -8
- package/src/styles/variables.css +139 -65
- package/src/types/Connections.ts +9 -0
- package/src/types/ExplorerConfig.ts +144 -39
- package/src/types/FileNode.ts +28 -0
- package/src/viewers/ArchiveViewer.vue +46 -8
- package/src/viewers/CsvViewer.vue +19 -2
- package/src/viewers/DrawioViewer.vue +12 -1
- package/src/viewers/EpubViewer.vue +50 -6
- package/src/viewers/IpynbViewer.vue +19 -2
- package/src/viewers/MermaidViewer.vue +20 -3
- package/src/viewers/PdfViewer.vue +24 -4
- package/src/viewers/PsdViewer.vue +28 -4
- package/src/viewers/TiffViewer.vue +19 -2
- package/src/viewers/Viewer3D.vue +36 -2
- package/dist/ArchiveViewer-Cdfv9LFC.js +0 -99
- package/dist/ArchiveViewer-Cdfv9LFC.js.map +0 -1
- package/dist/CsvViewer-CqWeV8VO.js +0 -131
- package/dist/CsvViewer-CqWeV8VO.js.map +0 -1
- package/dist/DrawioViewer-BNALOB04.js.map +0 -1
- package/dist/EpubViewer-BPmlImG7.js +0 -145
- package/dist/EpubViewer-BPmlImG7.js.map +0 -1
- package/dist/IpynbViewer-CDlQmuCV.js +0 -175
- package/dist/IpynbViewer-CDlQmuCV.js.map +0 -1
- package/dist/MermaidViewer-sfZWdR-d.js +0 -127
- package/dist/MermaidViewer-sfZWdR-d.js.map +0 -1
- package/dist/PsdViewer-DwuySZsb.js +0 -112
- package/dist/PsdViewer-DwuySZsb.js.map +0 -1
- package/dist/TiffViewer-BDQ3d3CQ.js +0 -132
- package/dist/TiffViewer-BDQ3d3CQ.js.map +0 -1
- package/dist/Viewer3D-CJJJgkuv.js +0 -60
- package/dist/Viewer3D-CJJJgkuv.js.map +0 -1
- package/src/components/SecondaryPane.vue +0 -447
- package/src/modals/ShareModal.vue +0 -139
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed, ref, watch } from 'vue';
|
|
3
|
-
import type { LocaleCode } from '../types/ExplorerConfig';
|
|
4
|
-
import type { ShareInfo } from '../types/FileNode';
|
|
5
|
-
import { useLocale } from '../composables/useLocale';
|
|
6
|
-
import { shareCliCommand } from '../lib/shareCli';
|
|
7
|
-
import { clampExpiryDate, expiryInputMax, ttlCeilingHint, validUntilLine } from '../lib/shareTtl';
|
|
8
|
-
import Modal from './Modal.vue';
|
|
9
|
-
|
|
10
|
-
const props = defineProps<{
|
|
11
|
-
open: boolean;
|
|
12
|
-
locale: LocaleCode;
|
|
13
|
-
share?: (ShareInfo & { url: string; filename?: string }) | null;
|
|
14
|
-
/** Server ceiling on a new link's life in days (0/undefined = none). */
|
|
15
|
-
shareMaxTtlDays?: number;
|
|
16
|
-
}>();
|
|
17
|
-
|
|
18
|
-
const emit = defineEmits<{
|
|
19
|
-
(e: 'close'): void;
|
|
20
|
-
(
|
|
21
|
-
e: 'submit',
|
|
22
|
-
payload: { password: boolean; expires_at: string | null; max_downloads: number | null },
|
|
23
|
-
): void;
|
|
24
|
-
(e: 'toast', msg: string): void;
|
|
25
|
-
}>();
|
|
26
|
-
|
|
27
|
-
const { t } = useLocale(() => props.locale);
|
|
28
|
-
|
|
29
|
-
const usePin = ref(false);
|
|
30
|
-
const expiresAt = ref<string>('');
|
|
31
|
-
const maxDownloads = ref<string>('');
|
|
32
|
-
|
|
33
|
-
watch(() => props.open, (v) => {
|
|
34
|
-
if (v) {
|
|
35
|
-
usePin.value = false;
|
|
36
|
-
expiresAt.value = '';
|
|
37
|
-
maxDownloads.value = '';
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
// The picker is capped at the server's ceiling and the value is clamped once
|
|
42
|
-
// more on submit — the server clamps too, but asking for a date it will
|
|
43
|
-
// refuse is how the user ends up with a link that says one thing and does
|
|
44
|
-
// another.
|
|
45
|
-
const expiryMax = computed(() => expiryInputMax(props.shareMaxTtlDays));
|
|
46
|
-
const ttlHint = computed(() => ttlCeilingHint(props.shareMaxTtlDays, props.locale === 'tr' ? 'tr' : 'en'));
|
|
47
|
-
const validUntil = computed(() =>
|
|
48
|
-
props.share ? validUntilLine(props.share.expires_at ?? null, props.locale === 'tr' ? 'tr' : 'en') : '',
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
function submit() {
|
|
52
|
-
const chosen = expiresAt.value ? new Date(expiresAt.value) : null;
|
|
53
|
-
emit('submit', {
|
|
54
|
-
password: usePin.value,
|
|
55
|
-
expires_at: clampExpiryDate(chosen, props.shareMaxTtlDays).iso,
|
|
56
|
-
max_downloads: maxDownloads.value ? Number(maxDownloads.value) : null,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async function copy(value: string, toast: string) {
|
|
61
|
-
try {
|
|
62
|
-
await navigator.clipboard.writeText(value);
|
|
63
|
-
emit('toast', toast);
|
|
64
|
-
} catch {
|
|
65
|
-
/* no-op */
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// One-line curl that downloads the shared file straight onto a server.
|
|
70
|
-
// Built by the shared helper so this dialog and the "Share / Permissions"
|
|
71
|
-
// panel cannot drift into two different commands.
|
|
72
|
-
const cliCommand = computed(() =>
|
|
73
|
-
shareCliCommand(props.share ? { url: props.share.url, pin: props.share.password_pin, filename: props.share.filename } : null),
|
|
74
|
-
);
|
|
75
|
-
</script>
|
|
76
|
-
|
|
77
|
-
<template>
|
|
78
|
-
<Modal :open="open" :title="t('modal.share.title')" size="md" @close="emit('close')">
|
|
79
|
-
<template v-if="!share">
|
|
80
|
-
<form class="fe-form" @submit.prevent="submit">
|
|
81
|
-
<label class="fe-form__row">
|
|
82
|
-
<input v-model="usePin" type="checkbox" />
|
|
83
|
-
<span>{{ t('modal.share.pin') }}</span>
|
|
84
|
-
</label>
|
|
85
|
-
<label class="fe-form__row fe-form__row--stack">
|
|
86
|
-
<span>{{ t('modal.share.expires') }}</span>
|
|
87
|
-
<input v-model="expiresAt" type="datetime-local" class="fe-input" :max="expiryMax" />
|
|
88
|
-
<small v-if="ttlHint" class="fe-form__hint">{{ ttlHint }}</small>
|
|
89
|
-
</label>
|
|
90
|
-
<label class="fe-form__row fe-form__row--stack">
|
|
91
|
-
<span>{{ t('modal.share.max_downloads') }}</span>
|
|
92
|
-
<input v-model="maxDownloads" type="number" min="1" class="fe-input" />
|
|
93
|
-
</label>
|
|
94
|
-
</form>
|
|
95
|
-
</template>
|
|
96
|
-
<template v-else>
|
|
97
|
-
<div class="fe-share-result">
|
|
98
|
-
<div class="fe-share-result__row fe-share-result__row--note">
|
|
99
|
-
<small>{{ validUntil }}<template v-if="share.expiry_clamped"> {{ t('modal.share.limit_applied') }}</template></small>
|
|
100
|
-
</div>
|
|
101
|
-
<div class="fe-share-result__row">
|
|
102
|
-
<label>Link</label>
|
|
103
|
-
<div class="fe-share-result__copy">
|
|
104
|
-
<input :value="share.url" readonly class="fe-input" />
|
|
105
|
-
<button type="button" class="fe-btn" @click="copy(share.url, t('modal.share.url_copied'))">
|
|
106
|
-
{{ t('modal.share.copy') }}
|
|
107
|
-
</button>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
<div v-if="share.password_pin" class="fe-share-result__row">
|
|
111
|
-
<label>PIN</label>
|
|
112
|
-
<div class="fe-share-result__copy">
|
|
113
|
-
<input :value="share.password_pin" readonly class="fe-input fe-input--mono" />
|
|
114
|
-
<button type="button" class="fe-btn" @click="copy(share.password_pin, t('modal.share.pin_copied'))">
|
|
115
|
-
{{ t('modal.share.copy') }}
|
|
116
|
-
</button>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
<div class="fe-share-result__row">
|
|
120
|
-
<label>CLI</label>
|
|
121
|
-
<div class="fe-share-result__copy">
|
|
122
|
-
<input :value="cliCommand" readonly class="fe-input fe-input--mono" />
|
|
123
|
-
<button type="button" class="fe-btn" @click="copy(cliCommand, t('modal.share.cli_copied'))">
|
|
124
|
-
{{ t('modal.share.copy') }}
|
|
125
|
-
</button>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
</template>
|
|
130
|
-
<template #actions>
|
|
131
|
-
<button type="button" class="fe-btn" @click="emit('close')">
|
|
132
|
-
{{ share ? t('modal.share.close') : t('modal.share.cancel') }}
|
|
133
|
-
</button>
|
|
134
|
-
<button v-if="!share" type="button" class="fe-btn fe-btn--primary" @click="submit">
|
|
135
|
-
{{ t('modal.share.create') }}
|
|
136
|
-
</button>
|
|
137
|
-
</template>
|
|
138
|
-
</Modal>
|
|
139
|
-
</template>
|