@brftech/filex-core 0.42.1 → 0.43.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 +14 -2
- package/dist/ArchiveViewer-BqU761Wk.js +149 -0
- package/dist/ArchiveViewer-BqU761Wk.js.map +1 -0
- package/dist/CsvViewer-ByHVK5ga.js +172 -0
- package/dist/CsvViewer-ByHVK5ga.js.map +1 -0
- package/dist/{DrawioViewer-BuhZOAx6.js → DrawioViewer-Bgrj8-zG.js} +45 -44
- package/dist/DrawioViewer-Bgrj8-zG.js.map +1 -0
- package/dist/{EpubViewer-DS3mb3k8.js → EpubViewer-DJwUKlHW.js} +50 -50
- package/dist/EpubViewer-DJwUKlHW.js.map +1 -0
- package/dist/IpynbViewer-Bz0eJ4NS.js +184 -0
- package/dist/IpynbViewer-Bz0eJ4NS.js.map +1 -0
- package/dist/MermaidViewer-CEDTD_pp.js +136 -0
- package/dist/MermaidViewer-CEDTD_pp.js.map +1 -0
- package/dist/PsdViewer-CZcxUpZO.js +121 -0
- package/dist/PsdViewer-CZcxUpZO.js.map +1 -0
- package/dist/TiffViewer-BwI62CbQ.js +141 -0
- package/dist/TiffViewer-BwI62CbQ.js.map +1 -0
- package/dist/{Viewer3D-CIrOn63I.js → Viewer3D-DoeZcuMm.js} +16 -16
- package/dist/Viewer3D-DoeZcuMm.js.map +1 -0
- package/dist/filex-core.js +475 -219
- package/dist/filex-core.umd.cjs +165 -108
- package/dist/filex-core.umd.cjs.map +1 -1
- package/dist/fonts/caveat-latin-ext.woff2 +0 -0
- package/dist/fonts/caveat-latin.woff2 +0 -0
- package/dist/fonts/dancing-script-latin-ext.woff2 +0 -0
- package/dist/fonts/dancing-script-latin.woff2 +0 -0
- package/dist/fonts/homemade-apple-latin.woff2 +0 -0
- package/dist/fonts/source-serif-4-latin-ext.woff2 +0 -0
- package/dist/fonts/source-serif-4-latin.woff2 +0 -0
- package/dist/index-DuWnGuv5.js +35901 -0
- package/dist/index-DuWnGuv5.js.map +1 -0
- package/dist/index.d.ts +5241 -553
- package/dist/pdf-CaPYsOUo.js +21302 -0
- package/dist/pdf-CaPYsOUo.js.map +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/FileExplorer.vue +1207 -343
- package/src/assets/fonts/LICENSE-Apache-2.0.txt +202 -0
- package/src/assets/fonts/LICENSE-OFL-1.1.txt +93 -0
- package/src/assets/fonts/README.md +58 -0
- package/src/assets/fonts/caveat-latin-ext.woff2 +0 -0
- package/src/assets/fonts/caveat-latin.woff2 +0 -0
- package/src/assets/fonts/dancing-script-latin-ext.woff2 +0 -0
- package/src/assets/fonts/dancing-script-latin.woff2 +0 -0
- package/src/assets/fonts/homemade-apple-latin.woff2 +0 -0
- package/src/assets/fonts/source-serif-4-latin-ext.woff2 +0 -0
- package/src/assets/fonts/source-serif-4-latin.woff2 +0 -0
- package/src/components/AdvancedSearch.vue +49 -0
- package/src/components/Breadcrumb.vue +5 -5
- package/src/components/ChoiceButtons.vue +152 -0
- package/src/components/CommandPalette.vue +5 -5
- package/src/components/ConnectionGuideView.vue +1 -1
- package/src/components/ConnectionNotice.vue +59 -0
- package/src/components/ConnectionsPanel.vue +30 -568
- package/src/components/ContextMenu.vue +31 -5
- package/src/components/DataTable.vue +1331 -0
- package/src/components/FilePane.vue +3 -0
- package/src/components/FilterBar.vue +12 -5
- package/src/components/GalleryView.vue +50 -2
- package/src/components/GridView.vue +51 -3
- package/src/components/HomeView.vue +18 -6
- package/src/components/InspectorPanel.vue +134 -17
- package/src/components/ListView.vue +366 -900
- package/src/components/LogoMark.vue +57 -0
- package/src/components/NFSExportsPanel.vue +76 -28
- package/src/components/OnboardingTour.vue +19 -7
- package/src/components/OperationsCenter.vue +77 -1
- package/src/components/PendingOpsTray.vue +59 -5
- package/src/components/PresenceBar.vue +7 -7
- package/src/components/ProductVersion.vue +31 -0
- package/src/components/QuickLook.vue +10 -14
- package/src/components/RecentlyOpened.vue +47 -17
- package/src/components/RecoveryKeyModal.vue +1 -1
- package/src/components/RowActions.vue +134 -0
- package/src/components/S3KeysPanel.vue +98 -56
- package/src/components/SSHKeysPanel.vue +79 -26
- package/src/components/SideNav.vue +260 -96
- package/src/components/StarButton.vue +1 -0
- package/src/components/StorageFields.vue +74 -6
- package/src/components/StorageTags.vue +62 -0
- package/src/components/TabBar.vue +1 -1
- package/src/components/TagKindIcon.vue +56 -0
- package/src/components/TagPicker.vue +226 -40
- package/src/components/ThemePalette.vue +4 -4
- package/src/components/TimeZonePicker.vue +29 -10
- package/src/components/TokensPanel.vue +82 -27
- package/src/components/Toolbar.vue +28 -6
- package/src/components/plugin/PluginConfirmModal.vue +54 -0
- package/src/components/plugin/PluginInspectorSection.vue +149 -0
- package/src/components/plugin/PluginPageView.vue +339 -0
- package/src/components/plugin/PluginViewModal.vue +159 -0
- package/src/components/plugin/SurfaceConversation.vue +76 -0
- package/src/components/plugin/SurfaceFooterButtons.vue +73 -0
- package/src/components/plugin/SurfaceRenderer.vue +299 -0
- package/src/components/plugin/SurfaceSections.vue +91 -0
- package/src/components/plugin/nodes/PdfFieldEditor.vue +509 -0
- package/src/components/plugin/nodes/SurfaceFileChooser.vue +94 -0
- package/src/components/plugin/nodes/SurfaceForm.vue +82 -0
- package/src/components/plugin/nodes/SurfaceList.vue +127 -0
- package/src/components/plugin/nodes/SurfacePdfFields.vue +1285 -0
- package/src/components/plugin/nodes/SurfacePeoplePicker.vue +213 -0
- package/src/components/plugin/nodes/SurfacePinInput.vue +57 -0
- package/src/components/plugin/nodes/SurfacePreview.vue +119 -0
- package/src/components/plugin/nodes/SurfaceProgress.vue +48 -0
- package/src/components/plugin/nodes/SurfaceSignaturePad.vue +472 -0
- package/src/components/plugin/nodes/SurfaceSteps.vue +53 -0
- package/src/components/public/PublicLanguagePicker.vue +58 -0
- package/src/components/public/PublicLinkPage.vue +286 -0
- package/src/components/public/PublicLinkPreview.vue +85 -0
- package/src/components/public/PublicPinGate.vue +108 -0
- package/src/components/public/PublicRequestBody.vue +204 -0
- package/src/components/public/PublicShareBody.vue +188 -0
- package/src/components/public/PublicShell.vue +332 -0
- package/src/composables/useConnections.ts +8 -2
- package/src/composables/useFileApi.ts +183 -44
- package/src/composables/useLocale.ts +277 -41
- package/src/composables/useNFSExports.ts +8 -10
- package/src/composables/useOperations.ts +44 -3
- package/src/composables/usePendingOps.ts +59 -8
- package/src/composables/usePluginActions.ts +121 -0
- package/src/composables/usePluginSurface.ts +223 -0
- package/src/composables/usePublicBranding.ts +172 -0
- package/src/composables/usePublicLink.ts +573 -0
- package/src/composables/usePublicPage.ts +61 -0
- package/src/composables/useS3Keys.ts +17 -12
- package/src/composables/useSSHKeys.ts +8 -10
- package/src/composables/useTokens.ts +8 -12
- package/src/composables/useUploadChunked.ts +18 -8
- package/src/composables/useViewerFetch.ts +6 -3
- package/src/index.ts +404 -8
- package/src/lib/actionIcons.ts +46 -1
- package/src/lib/advSearch.ts +14 -7
- package/src/lib/appLock.ts +130 -0
- package/src/lib/connection.ts +110 -0
- package/src/lib/destinationTree.ts +19 -3
- package/src/lib/direction.ts +353 -0
- package/src/lib/dragGhost.ts +6 -0
- package/src/lib/dropLimits.ts +69 -0
- package/src/lib/errorWords.ts +394 -0
- package/src/lib/externalReach.ts +5 -1
- package/src/lib/fileFilters.ts +7 -2
- package/src/lib/fileIcons.ts +4 -0
- package/src/lib/internalPaths.ts +77 -0
- package/src/lib/listInput.ts +64 -0
- package/src/lib/listing.ts +58 -23
- package/src/lib/modalStack.ts +26 -0
- package/src/lib/nodeRow.ts +121 -0
- package/src/lib/pdfFieldRules.ts +126 -0
- package/src/lib/pdfFields.ts +589 -0
- package/src/lib/pdfFieldsGeom.ts +203 -0
- package/src/lib/pdfjsLoader.ts +51 -0
- package/src/lib/personName.ts +47 -0
- package/src/lib/pluginApplies.ts +123 -0
- package/src/lib/pluginLabel.ts +72 -0
- package/src/lib/pluginMenu.ts +253 -0
- package/src/lib/pluginPage.ts +58 -0
- package/src/lib/plural.ts +181 -0
- package/src/lib/popupLayer.ts +103 -0
- package/src/lib/prefs.ts +563 -0
- package/src/lib/productVersion.ts +35 -0
- package/src/lib/publicLayout.ts +39 -0
- package/src/lib/serviceGate.ts +104 -0
- package/src/lib/shareTtl.ts +25 -11
- package/src/lib/signFonts.ts +85 -0
- package/src/lib/signaturePad.ts +111 -0
- package/src/lib/sortOrder.ts +100 -38
- package/src/lib/star.ts +7 -1
- package/src/lib/surfaceCell.ts +41 -0
- package/src/lib/surfaceConditions.ts +156 -0
- package/src/lib/surfaceOpen.ts +106 -0
- package/src/lib/surfaceSteps.ts +68 -0
- package/src/lib/surfaceValues.ts +191 -0
- package/src/lib/symlink.ts +150 -0
- package/src/lib/tableColumns.ts +493 -0
- package/src/lib/tableEnv.ts +34 -0
- package/src/lib/tablePrefs.ts +84 -0
- package/src/lib/tags.ts +121 -12
- package/src/lib/themes.ts +286 -18
- package/src/lib/tour.ts +152 -0
- package/src/lib/trashEmpty.ts +111 -0
- package/src/lib/trashTimeLeft.ts +23 -0
- package/src/lib/uiLocales.ts +460 -0
- package/src/lib/viewPrefs.ts +696 -660
- package/src/lib/viewPrefsHttp.ts +78 -0
- package/src/locales/en.ts +522 -119
- package/src/locales/resolve.ts +17 -8
- package/src/locales/tr.ts +539 -155
- package/src/modals/ConvertModal.vue +62 -11
- package/src/modals/DestinationPickerModal.vue +59 -16
- package/src/modals/Modal.vue +113 -23
- package/src/modals/NewDocumentModal.vue +16 -6
- package/src/modals/NewFolderModal.vue +8 -0
- package/src/modals/PermissionsModal.vue +272 -163
- package/src/modals/PreviewModal.vue +119 -20
- package/src/modals/RenameModal.vue +37 -1
- package/src/styles/base.css +2895 -241
- package/src/styles/sign-fonts.css +118 -0
- package/src/styles/variables.css +60 -0
- package/src/types/Connections.ts +17 -0
- package/src/types/ExplorerConfig.ts +117 -1
- package/src/types/FileNode.ts +58 -0
- package/src/types/Plugins.ts +494 -0
- package/src/types/Public.ts +212 -0
- package/src/viewers/ArchiveViewer.vue +93 -48
- package/src/viewers/CsvViewer.vue +99 -53
- package/src/viewers/DrawioViewer.vue +35 -9
- package/src/viewers/EpubViewer.vue +7 -8
- package/src/viewers/IpynbViewer.vue +3 -1
- package/src/viewers/MermaidViewer.vue +4 -5
- package/src/viewers/PdfViewer.vue +8 -17
- package/src/viewers/PsdViewer.vue +2 -4
- package/src/viewers/TiffViewer.vue +4 -5
- package/src/viewers/Viewer3D.vue +1 -1
- package/LICENSE +0 -21
- package/dist/ArchiveViewer-CLNevfPE.js +0 -124
- package/dist/ArchiveViewer-CLNevfPE.js.map +0 -1
- package/dist/CsvViewer-K8XA3z7N.js +0 -141
- package/dist/CsvViewer-K8XA3z7N.js.map +0 -1
- package/dist/DrawioViewer-BuhZOAx6.js.map +0 -1
- package/dist/EpubViewer-DS3mb3k8.js.map +0 -1
- package/dist/IpynbViewer-BTk7p4Dn.js +0 -184
- package/dist/IpynbViewer-BTk7p4Dn.js.map +0 -1
- package/dist/MermaidViewer-DqucH_io.js +0 -137
- package/dist/MermaidViewer-DqucH_io.js.map +0 -1
- package/dist/PsdViewer-CwiVENmq.js +0 -122
- package/dist/PsdViewer-CwiVENmq.js.map +0 -1
- package/dist/TiffViewer-CpewSVmQ.js +0 -142
- package/dist/TiffViewer-CpewSVmQ.js.map +0 -1
- package/dist/Viewer3D-CIrOn63I.js.map +0 -1
- package/dist/index-Dx0IbBcI.js +0 -26831
- package/dist/index-Dx0IbBcI.js.map +0 -1
- package/dist/useViewerFetch-czqbd2Lj.js +0 -25
- package/dist/useViewerFetch-czqbd2Lj.js.map +0 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* SurfaceList — a plugin surface's `list` node: a table whose rows may carry
|
|
4
|
+
* actions. Picking one posts `event: "action"` with the button's id and
|
|
5
|
+
* `data.row_id` — the plugin answers with a new screen (or a job).
|
|
6
|
+
*
|
|
7
|
+
* ⚠⚠ THIS IS THE PRODUCT'S ONE TABLE (DataTable — the explorer's own), not a
|
|
8
|
+
* table of the plugin surface's own. `/admin/apps/<plugin>/<view>` is a menu
|
|
9
|
+
* in the admin panel (Signatures is the one the owner opens daily), and the
|
|
10
|
+
* owner's rule since 2026-09-21 is that every table in the product is the
|
|
11
|
+
* explorer's: "bir yere tablo gerekiyorsa bu tabloyu koymak zorundayız." So an
|
|
12
|
+
* app's list resizes, sorts, hides and moves its columns like the file list
|
|
13
|
+
* does, and remembers that on the account per app and node
|
|
14
|
+
* (`app.<plugin>.<node id>`), with:
|
|
15
|
+
*
|
|
16
|
+
* · the first column frozen left (it is what says which row this is),
|
|
17
|
+
* · ONE `Actions` control frozen right, opening the same ContextMenu the
|
|
18
|
+
* explorer's ⋮ opens, instead of a scatter of loose buttons,
|
|
19
|
+
* · the shared empty state rather than a paragraph above an absent table.
|
|
20
|
+
*
|
|
21
|
+
* ⚠ The wire contract is unchanged and every field below is OPTIONAL
|
|
22
|
+
* (docs/APP-PLUGINS-API.md → `list`): a plugin written against the old node
|
|
23
|
+
* draws the same rows, now sortable. Sorting is on by default because a list
|
|
24
|
+
* node carries ALL its rows — nothing is paged away, so sorting what is on
|
|
25
|
+
* screen is sorting the list. A plugin that needs a fixed order says
|
|
26
|
+
* `sortable: false` on the column; one whose cells are formatted for people
|
|
27
|
+
* (a localised date, "1.2 MB") hands the table the raw value to sort by in
|
|
28
|
+
* `row.sort`.
|
|
29
|
+
*
|
|
30
|
+
* ⚠ A plugin's own action ids and labels are passed straight through, so a
|
|
31
|
+
* plugin that offered three buttons still offers three verbs — nothing is
|
|
32
|
+
* dropped in the move, and `danger` still paints the destructive one apart.
|
|
33
|
+
*/
|
|
34
|
+
import { computed } from 'vue';
|
|
35
|
+
import type { LocaleCode } from '../../../types/ExplorerConfig';
|
|
36
|
+
import type { ListNodeProps, PluginText } from '../../../types/Plugins';
|
|
37
|
+
import type { ContextAction } from '../../ContextMenu.vue';
|
|
38
|
+
import DataTable, { type DataColumn } from '../../DataTable.vue';
|
|
39
|
+
import { useLocale } from '../../../composables/useLocale';
|
|
40
|
+
import { appTextOr, labelOf } from '../../../lib/pluginLabel';
|
|
41
|
+
import { formatSurfaceCell } from '../../../lib/surfaceCell';
|
|
42
|
+
|
|
43
|
+
type ListRow = ListNodeProps['rows'][number];
|
|
44
|
+
|
|
45
|
+
const props = defineProps<{
|
|
46
|
+
columns: ListNodeProps['columns'];
|
|
47
|
+
rows: ListNodeProps['rows'];
|
|
48
|
+
empty?: PluginText | string;
|
|
49
|
+
locale: LocaleCode;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
/** Where the table's arrangement is remembered (`app.<plugin>.<node>`). */
|
|
52
|
+
tableId?: string;
|
|
53
|
+
}>();
|
|
54
|
+
|
|
55
|
+
const emit = defineEmits<{
|
|
56
|
+
(e: 'action', p: { action_id: string; row_id: string }): void;
|
|
57
|
+
}>();
|
|
58
|
+
|
|
59
|
+
const { t, formatDate } = useLocale(() => props.locale);
|
|
60
|
+
|
|
61
|
+
const rows = computed(() => props.rows ?? []);
|
|
62
|
+
|
|
63
|
+
/** The actions column's control exists when ANY row has a verb — one shape for
|
|
64
|
+
* the whole table, so the column does not go ragged from row to row. */
|
|
65
|
+
const hasActions = computed(() => rows.value.some((r) => (r.actions ?? []).length > 0));
|
|
66
|
+
|
|
67
|
+
/* ⚠ The app's empty line for THIS reader, else filex's own, else whatever
|
|
68
|
+
language the app has — see `appTextOr`. */
|
|
69
|
+
const emptyText = computed(() => appTextOr(props.empty, props.locale, () => t('plugin.list.empty')));
|
|
70
|
+
|
|
71
|
+
function cell(row: ListRow, key: string): string {
|
|
72
|
+
return labelOf(row.cells?.[key], props.locale);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** The node's columns, as the table draws them. Width is clamped to what a
|
|
76
|
+
* person could have dragged it to; a plugin cannot make a column that no
|
|
77
|
+
* handle can reach. */
|
|
78
|
+
const columns = computed<DataColumn<ListRow>[]>(() =>
|
|
79
|
+
(props.columns ?? []).map((c) => {
|
|
80
|
+
const w =
|
|
81
|
+
typeof c.width === 'number' && Number.isFinite(c.width) ? Math.round(c.width) : undefined;
|
|
82
|
+
return {
|
|
83
|
+
id: c.key,
|
|
84
|
+
label: labelOf(c.label, props.locale),
|
|
85
|
+
width: w === undefined ? undefined : Math.min(900, Math.max(60, w)),
|
|
86
|
+
align: c.align,
|
|
87
|
+
sortable: c.sortable !== false,
|
|
88
|
+
// A date column is printed the explorer's way, and sorted by the value.
|
|
89
|
+
format: (row: ListRow) => formatSurfaceCell(cell(row, c.key), c.format, props.locale, formatDate),
|
|
90
|
+
sortValue: (row: ListRow) => {
|
|
91
|
+
const raw = row.sort?.[c.key];
|
|
92
|
+
return typeof raw === 'number' || typeof raw === 'string' ? raw : cell(row, c.key);
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}),
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
/** The plugin's buttons, as menu entries. `testid` keeps the address each
|
|
99
|
+
* action already had (`surface-list-action-<row>-<action>`) so a spec, and a
|
|
100
|
+
* plugin's own e2e, can still reach a named verb. */
|
|
101
|
+
function actionsOf(row: ListRow): ContextAction[] {
|
|
102
|
+
return (row.actions ?? []).map((a) => ({
|
|
103
|
+
key: a.id,
|
|
104
|
+
label: labelOf(a.label, props.locale),
|
|
105
|
+
danger: a.danger,
|
|
106
|
+
disabled: props.disabled,
|
|
107
|
+
testid: `surface-list-action-${row.id}-${a.id}`,
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
</script>
|
|
111
|
+
|
|
112
|
+
<template>
|
|
113
|
+
<div class="fe-slist" data-testid="surface-list">
|
|
114
|
+
<DataTable
|
|
115
|
+
:table-id="tableId"
|
|
116
|
+
:columns="columns"
|
|
117
|
+
:rows="rows"
|
|
118
|
+
row-key="id"
|
|
119
|
+
:locale="locale"
|
|
120
|
+
:empty="emptyText"
|
|
121
|
+
:row-attrs="(r: ListRow) => ({ 'data-row': r.id })"
|
|
122
|
+
:row-actions="hasActions ? actionsOf : undefined"
|
|
123
|
+
:row-actions-test-id="(r: ListRow) => ((r.actions ?? []).length ? `surface-list-actions-${r.id}` : undefined)"
|
|
124
|
+
@row-action="(key: string, r: ListRow) => emit('action', { action_id: key, row_id: r.id })"
|
|
125
|
+
/>
|
|
126
|
+
</div>
|
|
127
|
+
</template>
|