@conduction/nextcloud-vue 2.185.1 → 2.186.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.
Files changed (63) hide show
  1. package/dist/esm/components/CnCalendarWidget/CnCalendarWidget.vue.js +1 -1
  2. package/dist/esm/components/CnCalendarWidget/CnCalendarWidget2.vue.js +83 -2
  3. package/dist/esm/components/CnCalendarWidget/CnCalendarWidget2.vue.js.map +1 -1
  4. package/dist/esm/components/CnCalendarWidget/CnCalendarWidget3.vue.js +147 -104
  5. package/dist/esm/components/CnCalendarWidget/CnCalendarWidget3.vue.js.map +1 -1
  6. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue.js +1 -1
  7. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid2.vue.js +41 -16
  8. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid2.vue.js.map +1 -1
  9. package/dist/esm/components/CnDashboardGrid/CnDashboardGrid3.vue.js.map +1 -1
  10. package/dist/esm/components/CnDividerWidget/index.js +1 -0
  11. package/dist/esm/components/CnDividerWidget/index.js.map +1 -1
  12. package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue.js +1 -1
  13. package/dist/esm/components/CnFilesWidget/CnFilesWidget2.vue.js +158 -5
  14. package/dist/esm/components/CnFilesWidget/CnFilesWidget2.vue.js.map +1 -1
  15. package/dist/esm/components/CnFilesWidget/CnFilesWidget3.vue.js +109 -45
  16. package/dist/esm/components/CnFilesWidget/CnFilesWidget3.vue.js.map +1 -1
  17. package/dist/esm/components/CnHeaderWidget/index.js +0 -1
  18. package/dist/esm/components/CnHeaderWidget/index.js.map +1 -1
  19. package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm.vue.js +1 -1
  20. package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm2.vue.js +17 -3
  21. package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm2.vue.js.map +1 -1
  22. package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm3.vue.js +3 -3
  23. package/dist/esm/components/CnHeaderWidgetForm/CnHeaderWidgetForm3.vue.js.map +1 -1
  24. package/dist/esm/components/CnVideoWidget/CnVideoWidget.vue.js +1 -1
  25. package/dist/esm/components/CnVideoWidget/CnVideoWidget2.vue.js +63 -1
  26. package/dist/esm/components/CnVideoWidget/CnVideoWidget2.vue.js.map +1 -1
  27. package/dist/esm/components/CnVideoWidget/CnVideoWidget3.vue.js +20 -10
  28. package/dist/esm/components/CnVideoWidget/CnVideoWidget3.vue.js.map +1 -1
  29. package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm.vue.js +1 -1
  30. package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm2.vue.js +15 -0
  31. package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm2.vue.js.map +1 -1
  32. package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm3.vue.js +17 -10
  33. package/dist/esm/components/CnVideoWidgetForm/CnVideoWidgetForm3.vue.js.map +1 -1
  34. package/dist/esm/components/CnWidgetGrid/dashboardWidgetRegistry.js +1 -0
  35. package/dist/esm/components/CnWidgetGrid/dashboardWidgetRegistry.js.map +1 -1
  36. package/dist/esm/dialogs/CnAddWidgetModal.vue.js +1 -1
  37. package/dist/esm/dialogs/CnAddWidgetModal2.vue.js +18 -4
  38. package/dist/esm/dialogs/CnAddWidgetModal2.vue.js.map +1 -1
  39. package/dist/esm/dialogs/CnAddWidgetModal3.vue.js +57 -39
  40. package/dist/esm/dialogs/CnAddWidgetModal3.vue.js.map +1 -1
  41. package/dist/esm/l10n/en.json.js +96 -1
  42. package/dist/esm/l10n/en.json.js.map +1 -1
  43. package/dist/esm/l10n/nl.json.js +96 -1
  44. package/dist/esm/l10n/nl.json.js.map +1 -1
  45. package/dist/esm/library-style.js +1 -1
  46. package/dist/esm/nextcloud-vue.css +231 -114
  47. package/dist/nextcloud-vue.cjs.js +2298 -1602
  48. package/dist/nextcloud-vue.cjs.js.map +2 -2
  49. package/dist/nextcloud-vue.css +231 -114
  50. package/l10n/en.json +96 -1
  51. package/l10n/nl.json +96 -1
  52. package/package.json +1 -1
  53. package/src/components/CnCalendarWidget/CnCalendarWidget.vue +217 -75
  54. package/src/components/CnDashboardGrid/CnDashboardGrid.md +1 -1
  55. package/src/components/CnDashboardGrid/CnDashboardGrid.vue +41 -16
  56. package/src/components/CnDividerWidget/index.js +1 -0
  57. package/src/components/CnFilesWidget/CnFilesWidget.vue +278 -5
  58. package/src/components/CnHeaderWidget/index.js +0 -1
  59. package/src/components/CnHeaderWidgetForm/CnHeaderWidgetForm.vue +20 -6
  60. package/src/components/CnVideoWidget/CnVideoWidget.vue +84 -1
  61. package/src/components/CnVideoWidgetForm/CnVideoWidgetForm.vue +19 -1
  62. package/src/components/CnWidgetGrid/dashboardWidgetRegistry.js +1 -0
  63. package/src/dialogs/CnAddWidgetModal.vue +53 -14
@@ -1 +1 @@
1
- {"version":3,"file":"CnFilesWidget2.vue.js","sources":["../../../../src/components/CnFilesWidget/CnFilesWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div\n\t\tclass=\"cn-files-widget\"\n\t\t:class=\"{ 'cn-files-widget--dragging': isDragging }\"\n\t\t@dragenter=\"onDragEnter\"\n\t\t@dragover=\"onDragOver\"\n\t\t@dragleave=\"onDragLeave\"\n\t\t@drop=\"onDrop\">\n\t\t<div class=\"cn-files-widget__toolbar\">\n\t\t\t<nav\n\t\t\t\tv-if=\"!objectBound\"\n\t\t\t\tclass=\"cn-files-widget__breadcrumb\"\n\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Folder breadcrumb')\">\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-files-widget__crumb cn-files-widget__crumb--root\"\n\t\t\t\t\t:aria-current=\"currentSubPath === '/' ? 'page' : null\"\n\t\t\t\t\t@click=\"navigateTo('/')\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Root') }}\n\t\t\t\t</button>\n\t\t\t\t<template v-for=\"(segment, index) in pathSegments\" :key=\"index\">\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"cn-files-widget__separator\">/</span>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclass=\"cn-files-widget__crumb\"\n\t\t\t\t\t\t:aria-current=\"index === pathSegments.length - 1 ? 'page' : null\"\n\t\t\t\t\t\t@click=\"navigateTo(segmentPathTo(index))\">\n\t\t\t\t\t\t{{ segment }}\n\t\t\t\t\t</button>\n\t\t\t\t</template>\n\t\t\t</nav>\n\n\t\t\t<input\n\t\t\t\tv-model=\"searchQuery\"\n\t\t\t\ttype=\"search\"\n\t\t\t\tclass=\"cn-files-widget__search\"\n\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Search this folder')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Search this folder…')\">\n\n\t\t\t<button\n\t\t\t\tv-if=\"canShowUpload\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-files-widget__upload\"\n\t\t\t\t@click=\"triggerUpload\">\n\t\t\t\t{{ t('nextcloud-vue', 'Upload File') }}\n\t\t\t</button>\n\t\t\t<!--\n\t\t\t\t`:ref`, not `ref`. Note `:aria-hidden=\"true\"` does NOT save this:\n\t\t\t\ta binding to a LITERAL CONSTANT is constant-folded, so the vnode\n\t\t\t\tstays fully static and the compiler hoists it to module scope.\n\t\t\t\tA hoisted vnode's ref has no owner instance, and `setRef()`'s\n\t\t\t\tnull-owner guard — along with its early `return` — is compiled\n\t\t\t\tout of production builds, so it dereferences null and throws\n\t\t\t\t`Cannot read properties of null (reading 'refs')`, aborting the\n\t\t\t\trender of the page that mounted this widget.\n\n\t\t\t\tConfirmed by instrumenting Vue's own warning to print the ref\n\t\t\t\tname: `[DEBUG ref=\"fileInput\" vnodeType=input]`. This widget is\n\t\t\t\tthe `files` integration leaf, which is how it reaches a detail\n\t\t\t\tpage. See CnFilesTab for the full account of the mechanism.\n\t\t\t-->\n\t\t\t<input\n\t\t\t\t:ref=\"fileInputRef\"\n\t\t\t\ttype=\"file\"\n\t\t\t\tmultiple\n\t\t\t\tclass=\"cn-files-widget__file-input\"\n\t\t\t\t:aria-hidden=\"true\"\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\t@change=\"onFileInputChange\">\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"isDragging && canShowUpload\"\n\t\t\tclass=\"cn-files-widget__dropzone\"\n\t\t\taria-hidden=\"true\">\n\t\t\t{{ t('nextcloud-vue', 'Drop files to upload') }}\n\t\t</div>\n\n\t\t<div v-if=\"loading\" class=\"cn-files-widget__state\">\n\t\t\t{{ t('nextcloud-vue', 'Loading folder…') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"unavailable\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--unavailable\">\n\t\t\t{{ t('nextcloud-vue', 'Files is not available') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"errorCode === 'no_access'\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--no-access\">\n\t\t\t{{ t('nextcloud-vue', 'You don\\'t have access to this folder.') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"errorCode === 'folder_not_found'\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--not-found\">\n\t\t\t{{ t('nextcloud-vue', 'Folder no longer exists.') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"errorCode\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--error\">\n\t\t\t{{ t('nextcloud-vue', 'Failed to load folder contents.') }}\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-files-widget__retry\"\n\t\t\t\t@click=\"fetchContents\">\n\t\t\t\t{{ t('nextcloud-vue', 'Retry') }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"filteredItems.length === 0 && !searchQuery\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--empty\">\n\t\t\t{{ t('nextcloud-vue', 'This folder is empty.') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"filteredItems.length === 0 && searchQuery\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--empty\">\n\t\t\t{{ noSearchResultsLabel }}\n\t\t</div>\n\n\t\t<ul\n\t\t\tv-else\n\t\t\tclass=\"cn-files-widget__list\"\n\t\t\t:class=\"{ 'cn-files-widget__list--grid': viewMode === 'grid' }\">\n\t\t\t<li\n\t\t\t\tv-for=\"item in filteredItems\"\n\t\t\t\t:key=\"item.fileId\"\n\t\t\t\tclass=\"cn-files-widget__row\"\n\t\t\t\t:class=\"{ 'cn-files-widget__row--folder': item.isFolder }\">\n\t\t\t\t<!-- Files are real links (new tab, copyable); folders browse in-widget. -->\n\t\t\t\t<component\n\t\t\t\t\t:is=\"item.isFolder ? 'button' : 'a'\"\n\t\t\t\t\t:type=\"item.isFolder ? 'button' : undefined\"\n\t\t\t\t\t:href=\"item.isFolder ? undefined : (fileUrl(item.fileId) || undefined)\"\n\t\t\t\t\t:target=\"item.isFolder ? undefined : '_blank'\"\n\t\t\t\t\t:rel=\"item.isFolder ? undefined : 'noopener noreferrer'\"\n\t\t\t\t\tclass=\"cn-files-widget__row-name\"\n\t\t\t\t\t@click=\"onRowClick(item, $event)\">\n\t\t\t\t\t<span aria-hidden=\"true\" class=\"cn-files-widget__row-icon\">\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tv-if=\"showThumbnails && !item.isFolder && item.thumbnailUrl && !failedThumbs[item.fileId]\"\n\t\t\t\t\t\t\t:src=\"item.thumbnailUrl\"\n\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\tclass=\"cn-files-widget__row-thumb\"\n\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t@error=\"onThumbError(item)\">\n\t\t\t\t\t\t<template v-else>{{ item.isFolder ? '📁' : '📄' }}</template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"cn-files-widget__row-label\">{{ item.name }}</span>\n\t\t\t\t</component>\n\t\t\t\t<span class=\"cn-files-widget__row-modified\">{{ item.modifiedAt }}</span>\n\t\t\t\t<span class=\"cn-files-widget__row-size\">{{ formatSize(item.size, item.isFolder) }}</span>\n\t\t\t\t<button\n\t\t\t\t\tv-if=\"canDeleteItem(item)\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-files-widget__row-delete\"\n\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Delete {name}', { name: item.name })\"\n\t\t\t\t\t@click=\"confirmDelete(item)\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Delete') }}\n\t\t\t\t</button>\n\t\t\t</li>\n\t\t</ul>\n\n\t\t<div v-if=\"nextCursor\" class=\"cn-files-widget__pagination\">\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-files-widget__more\"\n\t\t\t\t@click=\"loadMore\">\n\t\t\t\t{{ t('nextcloud-vue', 'Load more') }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<CnFilePreview v-if=\"previewFile\" :file=\"previewFile\" @close=\"previewFile = null\" />\n\n\t\t<CnFilesWidgetDeleteDialog\n\t\t\t:open=\"confirmTarget !== null\"\n\t\t\t:fileName=\"confirmTarget ? confirmTarget.name : ''\"\n\t\t\t@update:open=\"onDeleteDialogToggle\"\n\t\t\t@confirm=\"performDelete\" />\n\t</div>\n</template>\n\n<script>\nimport { translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport CnFilesWidgetDeleteDialog from '../../dialogs/CnFilesWidgetDeleteDialog.vue'\nimport CnFilePreview from '../CnFilePreview/CnFilePreview.vue'\nimport { useFileOpener } from '../../composables/useFileOpener.js'\nimport { stripTrailingSlashes } from '../../utils/trailingSlashes.js'\n\n/**\n * CnFilesWidget — an inline Nextcloud Files browser rendered as a dashboard\n * widget (catalog type `files`, migrated from the launchpad `files` widget).\n *\n * NC-INTEGRATION DEPENDENCY: this widget reads folder contents from a host\n * application's `/api/widgets/files/{placementId}/...` endpoints (the same\n * contract the launchpad/mydash backend served) and deep-links file rows into\n * the Nextcloud **Files** app via the canonical `/f/{fileid}` permalink. The\n * `@nextcloud/axios` + `@nextcloud/router` helpers are imported LAZILY at call\n * time so the widget code never hard-couples to a network stack at module load\n * (keeps the no-op css transform path clean and lets a host without the backing\n * endpoint mount the component without side-effects). When the backing endpoint\n * is absent the widget degrades to a localised disabled / empty state rather\n * than throwing — see the `unavailable` data flag and the `folder_not_found` /\n * `no_access` error branches.\n *\n * Every placement instance owns its own navigation stack: the sub-path resets\n * to `/` whenever the `placement` prop changes, so re-configuring the widget\n * root never leaves the user on a stale path.\n *\n * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n */\nexport default {\n\tname: 'CnFilesWidget',\n\n\tcomponents: {\n\t\tCnFilePreview,\n\t\tCnFilesWidgetDeleteDialog,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Persisted content blob configuring the folder + toolbar — see\n\t\t * `CnFilesWidgetForm` for the full shape (`folderPath`, `fileId`,\n\t\t * `viewMode`, `allowUpload`, `allowDelete`, …).\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** Placement entity; its `id` scopes the host Files endpoint. */\n\t\tplacement: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** Whether the dashboard shell is in admin mode. */\n\t\tisAdmin: { // eslint-disable-line vue/no-unused-properties -- the dashboard shell passes this to every widget; declared so it does not fall through to $attrs.\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Whether the dashboard shell is in edit mode. */\n\t\tcanEdit: { // eslint-disable-line vue/no-unused-properties -- the dashboard shell passes this to every widget; declared so it does not fall through to $attrs.\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * App base for the host's files-widget endpoints\n\t\t * (`{apiBase}/api/widgets/files/{placementId}/...`). Lets a consuming\n\t\t * app point the widget at its own backend (e.g. `/apps/launchpad`).\n\t\t * Defaults to `/apps/files`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tapiBase: {\n\t\t\ttype: String,\n\t\t\tdefault: '/apps/files',\n\t\t},\n\n\t\t/**\n\t\t * Object-bound mode: the OpenRegister object id this widget attaches\n\t\t * files to. When `objectId` + `register` + `schema` are all set (they\n\t\t * are auto-supplied by `CnWidgetGrid`'s detail-page context merge), the\n\t\t * widget lists/uploads/deletes against the object's Nextcloud folder via\n\t\t * the OpenRegister object endpoints instead of the dashboard\n\t\t * `/api/widgets/files/...` contract. Empty (default) keeps the dashboard\n\t\t * placement behaviour unchanged.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tobjectId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Object-bound mode: the OpenRegister register slug of the bound object.\n\t\t * See the `objectId` prop.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Object-bound mode: the OpenRegister schema of the bound object. Accepts\n\t\t * either a slug string or the resolved schema object (as merged by\n\t\t * `CnWidgetGrid`); the slug is derived by the `schemaSlug` computed. See\n\t\t * the `objectId` prop.\n\t\t *\n\t\t * @type {string|object}\n\t\t */\n\t\tschema: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * App base for the OpenRegister object-file endpoints used in\n\t\t * object-bound mode (`{objectApiBase}/objects/{register}/{schema}/{id}/...`).\n\t\t * Defaults to `/apps/openregister/api`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tobjectApiBase: {\n\t\t\ttype: String,\n\t\t\tdefault: '/apps/openregister/api',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** The file shown in the in-page preview, or null. */\n\t\t\tpreviewFile: null,\n\t\t\t/**\n\t\t\t * The hidden file input, set by the template's function ref (kept off `$refs` so the ref stays dynamic — see the template).\n\t\t\t *\n\t\t\t * @type {HTMLInputElement|null}\n\t\t\t */\n\t\t\tfileInputEl: null,\n\t\t\titems: [],\n\t\t\tcurrentSubPath: '/',\n\t\t\tloading: false,\n\t\t\terrorCode: null,\n\t\t\tunavailable: false,\n\t\t\tnextCursor: null,\n\t\t\tsearchQuery: '',\n\t\t\tconfirmTarget: null,\n\t\t\t// fileId → true for thumbnails whose <img> failed to load, so the\n\t\t\t// row falls back to the generic icon instead of a broken image.\n\t\t\tfailedThumbs: {},\n\t\t\t// Whether a file drag is currently hovering the widget (drop overlay).\n\t\t\tisDragging: false,\n\t\t\t// Depth counter so nested dragenter/dragleave don't flicker the overlay.\n\t\t\tdragDepth: 0,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Numeric placement id used to scope the host Files endpoint.\n\t\t *\n\t\t * @return {number} the placement id, or `0` when no placement is bound.\n\t\t */\n\t\tplacementId() {\n\t\t\treturn Number(this.placement?.id || 0)\n\t\t},\n\n\t\t/**\n\t\t * The schema slug in object-bound mode. Accepts either a slug string or\n\t\t * the resolved schema object merged by `CnWidgetGrid` (in which case the\n\t\t * slug is read from `slug`/`id`/`uuid`).\n\t\t *\n\t\t * @return {string} the schema slug, or `''` when unavailable.\n\t\t */\n\t\tschemaSlug() {\n\t\t\tconst s = this.schema\n\t\t\tif (typeof s === 'string') {\n\t\t\t\treturn s\n\t\t\t}\n\t\t\treturn (s && (s.slug || s.id || s.uuid)) || ''\n\t\t},\n\n\t\t/**\n\t\t * Whether the widget runs in object-bound mode — i.e. it attaches files\n\t\t * to a specific OpenRegister object rather than a dashboard placement.\n\t\t *\n\t\t * @return {boolean} `true` when `objectId`, `register` and `schemaSlug` are all set.\n\t\t */\n\t\tobjectBound() {\n\t\t\treturn !!(this.objectId && this.register && this.schemaSlug)\n\t\t},\n\n\t\t/**\n\t\t * Stable identity key for the bound object, or `''` in dashboard mode.\n\t\t * Watched to (re)fetch when the object context first resolves (the schema\n\t\t * object arrives after the ids) or when the widget rebinds to another\n\t\t * object.\n\t\t *\n\t\t * @return {string} `register/schema/objectId`, or `''` when not object-bound.\n\t\t */\n\t\tobjectKey() {\n\t\t\treturn this.objectBound\n\t\t\t\t? `${this.register}/${this.schemaSlug}/${this.objectId}`\n\t\t\t\t: ''\n\t\t},\n\n\t\t/**\n\t\t * Whether the upload affordance is enabled by configuration. Defaults to\n\t\t * enabled in BOTH modes — a Files widget is an add-files surface — and is\n\t\t * only suppressed when a placement explicitly sets `allowUpload: false`.\n\t\t * (Object-bound mode already defaulted on, matching the object sidebar's\n\t\t * Files tab; beta extended the same default to dashboard placements.)\n\t\t *\n\t\t * @return {boolean} `true` unless `content.allowUpload` is explicitly false.\n\t\t */\n\t\tallowUpload() {\n\t\t\treturn this.content?.allowUpload !== false\n\t\t},\n\n\t\t/**\n\t\t * Whether per-row delete affordances are enabled by configuration. On by\n\t\t * default in object-bound mode (unless `content.allowDelete` is explicitly\n\t\t * false); opt-in (`content.allowDelete === true`) in dashboard mode.\n\t\t *\n\t\t * @return {boolean} `true` when deletes are allowed.\n\t\t */\n\t\tallowDelete() {\n\t\t\tif (this.objectBound) {\n\t\t\t\treturn this.content?.allowDelete !== false\n\t\t\t}\n\t\t\treturn this.content?.allowDelete === true\n\t\t},\n\n\t\t/**\n\t\t * Layout for the file listing, from `content.viewMode`. `'grid'` renders\n\t\t * the items as a tile grid; any other value (`'list'`, `'tree'`, unset)\n\t\t * renders the default list. Tree navigation is not implemented, so\n\t\t * `'tree'` falls back to the list layout.\n\t\t *\n\t\t * @return {string} `'grid'` or `'list'`.\n\t\t */\n\t\tviewMode() {\n\t\t\treturn this.content?.viewMode === 'grid' ? 'grid' : 'list'\n\t\t},\n\n\t\t/**\n\t\t * Whether file rows show a preview thumbnail (from `content.showThumbnails`).\n\t\t * Defaults to on; only an explicit `false` disables it. Files without a\n\t\t * backend-provided `thumbnailUrl` still fall back to the generic icon.\n\t\t *\n\t\t * @return {boolean} `true` unless `content.showThumbnails` is explicitly false.\n\t\t */\n\t\tshowThumbnails() {\n\t\t\treturn this.content?.showThumbnails !== false\n\t\t},\n\n\t\t/**\n\t\t * Heuristic write-permission check: an empty folder optimistically\n\t\t * surfaces the upload button (the backend re-validates), otherwise at\n\t\t * least one editable child is required.\n\t\t *\n\t\t * @return {boolean} `true` when the viewer is treated as having write access.\n\t\t */\n\t\tviewerCanWrite() {\n\t\t\tif (this.items.length === 0) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn this.items.some((item) => item.canEdit === true)\n\t\t},\n\n\t\t/**\n\t\t * Whether the upload button should render.\n\t\t *\n\t\t * @return {boolean} `true` when upload is allowed, writable, and not errored.\n\t\t */\n\t\tcanShowUpload() {\n\t\t\treturn this.allowUpload && this.viewerCanWrite && !this.errorCode && !this.unavailable\n\t\t},\n\n\t\t/**\n\t\t * The current sub-path split into breadcrumb segments.\n\t\t *\n\t\t * @return {string[]} the path segments (empty at root).\n\t\t */\n\t\tpathSegments() {\n\t\t\tif (!this.currentSubPath || this.currentSubPath === '/') {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn this.currentSubPath\n\t\t\t\t.split('/')\n\t\t\t\t.map((segment) => segment.trim())\n\t\t\t\t.filter((segment) => segment !== '')\n\t\t},\n\n\t\t/**\n\t\t * The items filtered by the in-widget search query.\n\t\t *\n\t\t * @return {Array<object>} the matching items (all items when the query is empty).\n\t\t */\n\t\tfilteredItems() {\n\t\t\tconst query = this.searchQuery.trim().toLowerCase()\n\t\t\tif (query === '') {\n\t\t\t\treturn this.items\n\t\t\t}\n\t\t\treturn this.items.filter((item) => {\n\t\t\t\tconst name = String(item.name || '').toLowerCase()\n\t\t\t\treturn name.includes(query)\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The localised \"no results\" label for the active search query.\n\t\t *\n\t\t * @return {string} the no-results message.\n\t\t */\n\t\tnoSearchResultsLabel() {\n\t\t\treturn t(\n\t\t\t\t'nextcloud-vue',\n\t\t\t\t'No files matching \\'{query}\\'',\n\t\t\t\t{ query: this.searchQuery },\n\t\t\t)\n\t\t},\n\t},\n\n\twatch: {\n\t\tplacement: {\n\t\t\timmediate: true,\n\t\t\t/**\n\t\t\t * Reset navigation state and refetch whenever the placement changes.\n\t\t\t * Dashboard mode only — object-bound mode is driven by `objectKey`.\n\t\t\t *\n\t\t\t * @return {void}\n\t\t\t */\n\t\t\thandler() {\n\t\t\t\tif (this.objectBound) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.resetListing()\n\t\t\t\tthis.fetchContents()\n\t\t\t},\n\t\t},\n\n\t\tobjectKey: {\n\t\t\timmediate: true,\n\t\t\t/**\n\t\t\t * Reset and refetch when the bound object first resolves or changes.\n\t\t\t *\n\t\t\t * @param {string} key the new object key (`''` in dashboard mode).\n\t\t\t * @return {void}\n\t\t\t */\n\t\t\thandler(key) {\n\t\t\t\tif (!key) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.resetListing()\n\t\t\t\tthis.fetchContents()\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Function ref for the hidden file input; a method so the binding is\n\t\t * stable across renders and the vnode stays dynamic.\n\t\t *\n\t\t * @param {HTMLInputElement|null} el The element, or null on unmount.\n\t\t * @return {void}\n\t\t */\n\t\tfileInputRef(el) {\n\t\t\tthis.fileInputEl = el || null\n\t\t},\n\n\t\t/**\n\t\t * Reset the listing/navigation state before a (re)fetch.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tresetListing() {\n\t\t\tthis.currentSubPath = '/'\n\t\t\tthis.items = []\n\t\t\tthis.nextCursor = null\n\t\t\tthis.errorCode = null\n\t\t\tthis.unavailable = false\n\t\t},\n\n\t\t/**\n\t\t * Fetch (or append) one page of folder contents from the host Files\n\t\t * endpoint. Degrades gracefully: a missing endpoint flips `unavailable`,\n\t\t * a 404/403 maps to a typed `errorCode`, and no exception escapes.\n\t\t *\n\t\t * @param {boolean} [append] whether to append to the existing list (pagination).\n\t\t * @return {Promise<void>} resolves when the fetch settles.\n\t\t */\n\t\tasync fetchContents(append = false) {\n\t\t\tif (this.objectBound) {\n\t\t\t\treturn this.fetchObjectFiles()\n\t\t\t}\n\t\t\tif (this.placementId === 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loading = !append\n\t\t\tthis.errorCode = null\n\t\t\tthis.unavailable = false\n\n\t\t\ttry {\n\t\t\t\tconst { default: axios } = await import('@nextcloud/axios')\n\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t`${this.apiBase}/api/widgets/files/{placementId}/contents`,\n\t\t\t\t\t{ placementId: this.placementId },\n\t\t\t\t)\n\t\t\t\tconst params = {\n\t\t\t\t\tcurrentPath: this.currentSubPath,\n\t\t\t\t\tlimit: 50,\n\t\t\t\t}\n\t\t\t\tif (append && this.nextCursor) {\n\t\t\t\t\tparams.cursor = this.nextCursor\n\t\t\t\t}\n\n\t\t\t\tconst response = await axios.get(url, { params })\n\t\t\t\tconst data = response?.data || {}\n\t\t\t\tconst nextItems = Array.isArray(data.items) ? data.items : []\n\t\t\t\tthis.items = append ? this.items.concat(nextItems) : nextItems\n\t\t\t\tthis.nextCursor = data.nextCursor || null\n\t\t\t} catch (err) {\n\t\t\t\tconst status = err?.response?.status\n\t\t\t\tconst code = err?.response?.data?.error\n\t\t\t\tif (status === 404 || code === 'folder_not_found') {\n\t\t\t\t\tthis.errorCode = 'folder_not_found'\n\t\t\t\t} else if (status === 403 || code === 'no_access') {\n\t\t\t\t\tthis.errorCode = 'no_access'\n\t\t\t\t} else if (status === undefined) {\n\t\t\t\t\t// No HTTP response at all — the backing Files endpoint is\n\t\t\t\t\t// not installed/reachable; degrade to the disabled state.\n\t\t\t\t\tthis.unavailable = true\n\t\t\t\t} else {\n\t\t\t\t\tthis.errorCode = 'unknown_error'\n\t\t\t\t}\n\t\t\t\tif (!append) {\n\t\t\t\t\tthis.items = []\n\t\t\t\t\tthis.nextCursor = null\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Object-bound listing: fetch the bound OpenRegister object's files from\n\t\t * `{objectApiBase}/objects/{register}/{schema}/{id}/files` and map them\n\t\t * onto the widget's flat item shape (no folder navigation). Degrades the\n\t\t * same way as the dashboard fetch: 404/403 → typed `errorCode`, no HTTP\n\t\t * response → `unavailable`.\n\t\t *\n\t\t * @return {Promise<void>} resolves when the fetch settles.\n\t\t */\n\t\tasync fetchObjectFiles() {\n\t\t\tthis.loading = true\n\t\t\tthis.errorCode = null\n\t\t\tthis.unavailable = false\n\n\t\t\ttry {\n\t\t\t\tconst { default: axios } = await import('@nextcloud/axios')\n\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t`${this.objectApiBase}/objects/{register}/{schema}/{objectId}/files`,\n\t\t\t\t\t{ register: this.register, schema: this.schemaSlug, objectId: this.objectId },\n\t\t\t\t)\n\t\t\t\tconst response = await axios.get(url)\n\t\t\t\tconst data = response?.data || {}\n\t\t\t\tconst results = Array.isArray(data)\n\t\t\t\t\t? data\n\t\t\t\t\t: (Array.isArray(data.results) ? data.results : [])\n\t\t\t\tthis.items = results.map((file) => {\n\t\t\t\t\tconst mime = file.mimeType || file.mimetype || file.type || ''\n\t\t\t\t\t// SVG: Nextcloud's rasterised /core/preview is usually\n\t\t\t\t\t// unavailable for SVG (no rsvg/imagick), so stream the raw file\n\t\t\t\t\t// from OpenRegister's authenticated per-file download endpoint\n\t\t\t\t\t// (works for the owner's un-shared uploads via the session\n\t\t\t\t\t// cookie; the widget's other calls use the same objectApiBase).\n\t\t\t\t\t// Rendered through the list's <img>, the SVG runs in the\n\t\t\t\t\t// browser's restricted image mode — inline <script> / event\n\t\t\t\t\t// handlers never execute and external refs don't load — so\n\t\t\t\t\t// untrusted SVG is shown safely without a bespoke sandbox.\n\t\t\t\t\t// Other images use the rasterised server preview; anything else\n\t\t\t\t\t// gets the generic icon (a missing preview also falls back via\n\t\t\t\t\t// the <img> @error handler).\n\t\t\t\t\tlet thumbnailUrl = null\n\t\t\t\t\tif (file.id && /^image\\/svg\\+xml$/i.test(mime)) {\n\t\t\t\t\t\tthumbnailUrl = generateUrl(`${this.objectApiBase}/files/{fileId}/download`, { fileId: file.id })\n\t\t\t\t\t} else if (file.id && /^image\\//.test(mime)) {\n\t\t\t\t\t\tthumbnailUrl = generateUrl('/core/preview?fileId={fileId}&x=256&y=256&a=1', { fileId: file.id })\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname: file.name || file.title || '',\n\t\t\t\t\t\tfileId: file.id,\n\t\t\t\t\t\tmimeType: mime,\n\t\t\t\t\t\tpath: file.path || '',\n\t\t\t\t\t\tdownloadUrl: file.id ? generateUrl(`${this.objectApiBase}/files/{fileId}/download`, { fileId: file.id }) : '',\n\t\t\t\t\t\tisFolder: false,\n\t\t\t\t\t\tsize: file.size,\n\t\t\t\t\t\tmodifiedAt: file.modified || file.updated || '',\n\t\t\t\t\t\tthumbnailUrl,\n\t\t\t\t\t\tcanEdit: true,\n\t\t\t\t\t\tcanDelete: this.allowDelete,\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tthis.nextCursor = null\n\t\t\t} catch (err) {\n\t\t\t\tconst status = err?.response?.status\n\t\t\t\tif (status === 404) {\n\t\t\t\t\tthis.errorCode = 'folder_not_found'\n\t\t\t\t} else if (status === 403) {\n\t\t\t\t\tthis.errorCode = 'no_access'\n\t\t\t\t} else if (status === undefined) {\n\t\t\t\t\tthis.unavailable = true\n\t\t\t\t} else {\n\t\t\t\t\tthis.errorCode = 'unknown_error'\n\t\t\t\t}\n\t\t\t\tthis.items = []\n\t\t\t\tthis.nextCursor = null\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Load the next page when a cursor is present.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tloadMore() {\n\t\t\tif (this.nextCursor) {\n\t\t\t\tthis.fetchContents(true)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Show a file in the in-page preview.\n\t\t *\n\t\t * @param {object} file The file to preview.\n\t\t */\n\t\tshowPreview(file) {\n\t\t\tthis.previewFile = file\n\t\t},\n\n\t\t/**\n\t\t * Handle a row click: a folder is browsed in place, a file opens through\n\t\t * the shared opener (Viewer, preview, browser, Files app).\n\t\t *\n\t\t * @param {object} item the clicked row.\n\t\t * @param {MouseEvent} [event] the click event.\n\t\t * @return {void}\n\t\t */\n\t\tonRowClick(item, event) {\n\t\t\tif (item.isFolder) {\n\t\t\t\tthis.onItemClick(item)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Keep the link's own behaviour for a modified click (new tab, etc.).\n\t\t\tif (event && (event.ctrlKey || event.metaKey || event.shiftKey || event.button === 1)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event) {\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t\tuseFileOpener({ onPreview: this.showPreview }).open({\n\t\t\t\tid: item.fileId,\n\t\t\t\tname: item.name,\n\t\t\t\ttype: item.mimeType || item.mimetype || item.type || '',\n\t\t\t\tpath: item.path || '',\n\t\t\t\taccessUrl: item.accessUrl || '',\n\t\t\t\tdownloadUrl: item.downloadUrl || '',\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Descend into a folder row.\n\t\t *\n\t\t * @param {object} item the clicked folder item.\n\t\t * @return {void}\n\t\t */\n\t\tonItemClick(item) {\n\t\t\tthis.navigateTo(this.joinPath(this.currentSubPath, item.name))\n\t\t},\n\n\t\t/**\n\t\t * Navigate to a sub-path, clearing search + pagination and refetching.\n\t\t *\n\t\t * @param {string} path the target sub-path.\n\t\t * @return {void}\n\t\t */\n\t\tnavigateTo(path) {\n\t\t\tthis.currentSubPath = path || '/'\n\t\t\tthis.searchQuery = ''\n\t\t\tthis.nextCursor = null\n\t\t\tthis.fetchContents()\n\t\t},\n\n\t\t/**\n\t\t * Build the sub-path up to (and including) a breadcrumb segment index.\n\t\t *\n\t\t * @param {number} index the segment index.\n\t\t * @return {string} the assembled sub-path.\n\t\t */\n\t\tsegmentPathTo(index) {\n\t\t\tconst segments = this.pathSegments.slice(0, index + 1)\n\t\t\treturn '/' + segments.join('/')\n\t\t},\n\n\t\t/**\n\t\t * Join a base path and a child name into a normalised sub-path.\n\t\t *\n\t\t * @param {string} base the base path.\n\t\t * @param {string} name the child name.\n\t\t * @return {string} the joined path.\n\t\t */\n\t\tjoinPath(base, name) {\n\t\t\tconst trimmedBase = stripTrailingSlashes(String(base || '/'))\n\t\t\tconst trimmedName = String(name || '').replace(/^\\/+/, '')\n\t\t\tif (trimmedBase === '' || trimmedBase === '/') {\n\t\t\t\treturn '/' + trimmedName\n\t\t\t}\n\t\t\treturn `${trimmedBase}/${trimmedName}`\n\t\t},\n\n\t\t/**\n\t\t * The Files-app permalink for a file.\n\t\t *\n\t\t * @param {number|string} fileId the Nextcloud file id.\n\t\t * @return {string} the URL, or '' without a file id.\n\t\t */\n\t\tfileUrl(fileId) {\n\t\t\tif (!fileId) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\t// Canonical permalink: `/f/{fileid}` resolves the id to its folder\n\t\t\t// and opens the file; generateUrl adds `index.php` where needed.\n\t\t\treturn generateUrl('/f/{fileid}', { fileid: fileId })\n\t\t},\n\n\t\t/**\n\t\t * Whether a per-row delete button should render for an item.\n\t\t *\n\t\t * @param {object} item the item.\n\t\t * @return {boolean} `true` when delete is allowed and the item is deletable.\n\t\t */\n\t\tcanDeleteItem(item) {\n\t\t\treturn this.allowDelete === true && item.canDelete === true\n\t\t},\n\n\t\t/**\n\t\t * Mark an item's thumbnail as failed so the row falls back to the\n\t\t * generic icon. Fires when the preview `<img>` cannot load (e.g. the\n\t\t * preview was not generated in time).\n\t\t *\n\t\t * @param {object} item the item whose thumbnail failed.\n\t\t * @return {void}\n\t\t */\n\t\tonThumbError(item) {\n\t\t\tthis.failedThumbs[item.fileId] = true\n\t\t},\n\n\t\t/**\n\t\t * Open the delete-confirmation modal for an item.\n\t\t *\n\t\t * @param {object} item the item to delete.\n\t\t * @return {void}\n\t\t */\n\t\tconfirmDelete(item) {\n\t\t\tthis.confirmTarget = item\n\t\t},\n\n\t\t/**\n\t\t * React to the delete dialog's open-state changes. Closing it (Cancel,\n\t\t * Esc, click-outside, or the header X) clears the pending target.\n\t\t *\n\t\t * @param {boolean} open the dialog's new open state.\n\t\t * @return {void}\n\t\t */\n\t\tonDeleteDialogToggle(open) {\n\t\t\tif (!open) {\n\t\t\t\tthis.confirmTarget = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Delete the confirmed target via the host Files endpoint, refreshing\n\t\t * the listing on failure so the UI stays truthful.\n\t\t *\n\t\t * @return {Promise<void>} resolves when the delete settles.\n\t\t */\n\t\tasync performDelete() {\n\t\t\tconst target = this.confirmTarget\n\t\t\tif (!target) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst { default: axios } = await import('@nextcloud/axios')\n\n\t\t\t\tconst url = this.objectBound\n\t\t\t\t\t? generateUrl(\n\t\t\t\t\t\t\t`${this.objectApiBase}/objects/{register}/{schema}/{objectId}/files/{fileId}`,\n\t\t\t\t\t\t\t{ register: this.register, schema: this.schemaSlug, objectId: this.objectId, fileId: target.fileId },\n\t\t\t\t\t\t)\n\t\t\t\t\t: generateUrl(\n\t\t\t\t\t\t\t`${this.apiBase}/api/widgets/files/{placementId}/files/{fileId}`,\n\t\t\t\t\t\t\t{ placementId: this.placementId, fileId: target.fileId },\n\t\t\t\t\t\t)\n\t\t\t\tawait axios.delete(url)\n\t\t\t\tthis.items = this.items.filter((item) => item.fileId !== target.fileId)\n\t\t\t} catch {\n\t\t\t\tthis.fetchContents()\n\t\t\t} finally {\n\t\t\t\tthis.confirmTarget = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Trigger the hidden file input from the upload button.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\ttriggerUpload() {\n\t\t\tif (this.fileInputEl) {\n\t\t\t\tthis.fileInputEl.click()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Upload the chosen files to the host Files endpoint and refresh.\n\t\t *\n\t\t * @param {Event} event the file-input change event.\n\t\t * @return {Promise<void>} resolves when the upload settles.\n\t\t */\n\t\tasync onFileInputChange(event) {\n\t\t\tconst fileList = event?.target?.files\n\t\t\tawait this.uploadFiles(fileList)\n\t\t\tif (this.fileInputEl) {\n\t\t\t\tthis.fileInputEl.value = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * POST a FileList (from the picker or a drag-and-drop) to the host Files\n\t\t * endpoint, then refresh the listing. No-op when there is nothing to upload\n\t\t * or upload is not permitted; never throws.\n\t\t *\n\t\t * @param {FileList|File[]|null} fileList the files to upload.\n\t\t * @return {Promise<void>} resolves when the upload settles.\n\t\t */\n\t\tasync uploadFiles(fileList) {\n\t\t\tif (!fileList || fileList.length === 0 || !this.canShowUpload) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst formData = new FormData()\n\t\t\tfor (let i = 0; i < fileList.length; i++) {\n\t\t\t\tformData.append('files[]', fileList[i])\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst { default: axios } = await import('@nextcloud/axios')\n\n\t\t\t\tif (this.objectBound) {\n\t\t\t\t\tconst objectUrl = generateUrl(\n\t\t\t\t\t\t`${this.objectApiBase}/objects/{register}/{schema}/{objectId}/filesMultipart`,\n\t\t\t\t\t\t{ register: this.register, schema: this.schemaSlug, objectId: this.objectId },\n\t\t\t\t\t)\n\t\t\t\t\tawait axios.post(objectUrl, formData)\n\t\t\t\t} else {\n\t\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t\t`${this.apiBase}/api/widgets/files/{placementId}/upload`,\n\t\t\t\t\t\t{ placementId: this.placementId },\n\t\t\t\t\t)\n\t\t\t\t\tawait axios.post(url, formData, {\n\t\t\t\t\t\tparams: { currentPath: this.currentSubPath },\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tthis.fetchContents()\n\t\t\t} catch {\n\t\t\t\tthis.fetchContents()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Track a drag entering the widget (depth-counted so nested elements don't\n\t\t * flicker the drop overlay).\n\t\t *\n\t\t * @param {DragEvent} event the dragenter event.\n\t\t * @return {void}\n\t\t */\n\t\tonDragEnter(event) {\n\t\t\tif (!this.canShowUpload || !this.hasFiles(event)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tevent.preventDefault()\n\t\t\tthis.dragDepth++\n\t\t\tthis.isDragging = true\n\t\t},\n\n\t\t/**\n\t\t * Keep the browser from opening the dragged file and mark the drop as a copy.\n\t\t *\n\t\t * @param {DragEvent} event the dragover event.\n\t\t * @return {void}\n\t\t */\n\t\tonDragOver(event) {\n\t\t\tif (!this.canShowUpload || !this.hasFiles(event)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tevent.preventDefault()\n\t\t\tif (event.dataTransfer) {\n\t\t\t\tevent.dataTransfer.dropEffect = 'copy'\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Track a drag leaving the widget, clearing the overlay at depth zero.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonDragLeave() {\n\t\t\tif (this.dragDepth > 0) {\n\t\t\t\tthis.dragDepth--\n\t\t\t}\n\t\t\tif (this.dragDepth === 0) {\n\t\t\t\tthis.isDragging = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle a file drop — upload the dropped files into the current folder.\n\t\t *\n\t\t * @param {DragEvent} event the drop event.\n\t\t * @return {Promise<void>} resolves when the upload settles.\n\t\t */\n\t\tasync onDrop(event) {\n\t\t\tthis.dragDepth = 0\n\t\t\tthis.isDragging = false\n\t\t\tif (!this.canShowUpload || !this.hasFiles(event)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tevent.preventDefault()\n\t\t\tawait this.uploadFiles(event.dataTransfer?.files)\n\t\t},\n\n\t\t/**\n\t\t * Whether a drag event is carrying files (vs. text / an internal drag).\n\t\t *\n\t\t * @param {DragEvent} event the drag event.\n\t\t * @return {boolean} `true` when the payload includes files.\n\t\t */\n\t\thasFiles(event) {\n\t\t\tconst types = event?.dataTransfer?.types\n\t\t\tif (!types) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn Array.from(types).includes('Files')\n\t\t},\n\n\t\t/**\n\t\t * Human-format a byte count (folders render an empty size).\n\t\t *\n\t\t * @param {number} bytes the byte count.\n\t\t * @param {boolean} isFolder whether the item is a folder.\n\t\t * @return {string} the formatted size.\n\t\t */\n\t\tformatSize(bytes, isFolder) {\n\t\t\tif (isFolder) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst value = Number(bytes || 0)\n\t\t\tif (value === 0) {\n\t\t\t\treturn '0 B'\n\t\t\t}\n\t\t\tconst units = ['B', 'KB', 'MB', 'GB', 'TB']\n\t\t\tlet unitIndex = 0\n\t\t\tlet display = value\n\t\t\twhile (display >= 1024 && unitIndex < units.length - 1) {\n\t\t\t\tdisplay = display / 1024\n\t\t\t\tunitIndex++\n\t\t\t}\n\t\t\treturn `${display.toFixed(unitIndex === 0 ? 0 : 1)} ${units[unitIndex]}`\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-files-widget {\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\theight: 100%;\n\toverflow: hidden;\n}\n\n.cn-files-widget--dragging {\n\toutline: 2px dashed var(--color-primary-element);\n\toutline-offset: -2px;\n\tborder-radius: var(--border-radius);\n}\n\n.cn-files-widget__dropzone {\n\tposition: absolute;\n\tinset: 0;\n\tz-index: 5;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpointer-events: none;\n\tbackground: var(--color-primary-element-light, rgba(0, 130, 201, 0.1));\n\tcolor: var(--color-primary-element);\n\tfont-weight: 600;\n\tborder-radius: var(--border-radius);\n}\n\n.cn-files-widget__toolbar {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tflex-wrap: wrap;\n}\n\n.cn-files-widget__breadcrumb {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 4px;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-files-widget__crumb {\n\tbackground: transparent;\n\tborder: none;\n\tpadding: 4px 6px;\n\tcursor: pointer;\n\tcolor: var(--color-primary-element);\n\tfont: inherit;\n}\n\n.cn-files-widget__crumb[aria-current='page'] {\n\tcolor: var(--color-main-text);\n\tcursor: default;\n}\n\n.cn-files-widget__separator {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-files-widget__search {\n\tflex: 0 1 200px;\n\tpadding: 4px 8px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-main-text);\n}\n\n.cn-files-widget__upload {\n\tpadding: 4px 12px;\n\tborder: 1px solid var(--color-primary-element);\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text);\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-files-widget__file-input {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tpadding: 0;\n\tmargin: -1px;\n\toverflow: hidden;\n\tclip-path: inset(50%);\n\tborder: 0;\n}\n\n.cn-files-widget__state {\n\tpadding: 16px;\n\tcolor: var(--color-text-maxcontrast);\n\ttext-align: center;\n}\n\n.cn-files-widget__retry {\n\tdisplay: block;\n\tmargin: 8px auto 0;\n\tpadding: 4px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-background-hover);\n\tcursor: pointer;\n}\n\n.cn-files-widget__list {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\toverflow: auto;\n\tflex: 1 1 auto;\n}\n\n.cn-files-widget__row {\n\tdisplay: grid;\n\tgrid-template-columns: 1fr 140px 80px auto;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 4px 6px;\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.cn-files-widget__row-name {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tbackground: transparent;\n\tborder: none;\n\tpadding: 0;\n\tcursor: pointer;\n\ttext-align: left;\n\tcolor: var(--color-main-text);\n\tfont: inherit;\n\ttext-decoration: none;\n\tmin-width: 0;\n}\n\n.cn-files-widget__row-icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tflex: 0 0 auto;\n\twidth: 24px;\n\theight: 24px;\n}\n\n.cn-files-widget__row-thumb {\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n\tborder-radius: var(--border-radius);\n\tbackground-color: var(--color-background-dark);\n}\n\n.cn-files-widget__row-label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-files-widget__row-modified,\n.cn-files-widget__row-size {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n}\n\n.cn-files-widget__row-delete {\n\tbackground: transparent;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tpadding: 2px 8px;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tcolor: var(--color-error);\n}\n\n/* Grid view (content.viewMode === 'grid'): lay the rows out as tiles. */\n.cn-files-widget__list--grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(120px, 1fr));\n\tgap: 8px;\n\tpadding: 4px;\n\talign-content: start;\n}\n\n.cn-files-widget__list--grid .cn-files-widget__row {\n\tgrid-template-columns: 1fr;\n\tjustify-items: center;\n\ttext-align: center;\n\tgap: 4px;\n\tpadding: 10px 6px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n}\n\n.cn-files-widget__list--grid .cn-files-widget__row-name {\n\tflex-direction: column;\n\talign-items: center;\n\tmax-width: 100%;\n}\n\n.cn-files-widget__list--grid .cn-files-widget__row-label {\n\tmax-width: 100%;\n}\n\n.cn-files-widget__list--grid .cn-files-widget__row-icon {\n\tfont-size: 32px;\n\twidth: 56px;\n\theight: 56px;\n}\n\n/* Keep tiles compact — the modified date is list-view detail. */\n.cn-files-widget__list--grid .cn-files-widget__row-modified {\n\tdisplay: none;\n}\n\n.cn-files-widget__pagination {\n\ttext-align: center;\n\tpadding: 8px 0;\n}\n\n.cn-files-widget__more {\n\tpadding: 4px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-background-hover);\n\tcursor: pointer;\n}\n\n</style>\n"],"names":["CnFilePreview","CnFilesWidgetDeleteDialog","t"],"mappings":";;;;;;;AAyMA;AACC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,eAAe;;CAErB,UAAU,EAAE;iBACXA,YAAa;6BACbC,UAAyB;EACzB;;AAED,CAAA,KAAK,EAAE;AACN;;;AAGC;;AAED,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,OAAO,EAAE,CAAC;GACnB;;;EAGD,SAAS,EAAE;GACV,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,OAAO,EAAE,CAAC;GACnB;;AAED;AACA,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;AAED;AACA,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,OAAO;GACb,OAAO,EA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;GAC1C,IAAI,SAAQ,GAAI;AAChB,GAAA,IAAI,OAAM,GAAI;GACd,OAAO,OAAM,IAAK,IAAG,IAAK,YAAY,KAAK,CAAC,MAAK,GAAI,CAAC,EAAE;AACvD,IAAA,UAAU,UAAU;IACpB,SAAS;AACV,GAAA;AACA,GAAA,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,SAAQ,KAAM,CAAA,GAAI,CAAA,GAAI,CAAC,CAAC,CAAA,CAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;EACxE,CAAC;EACD;AACF;;"}
1
+ {"version":3,"file":"CnFilesWidget2.vue.js","sources":["../../../../src/components/CnFilesWidget/CnFilesWidget.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2026 Conduction B.V.\n - SPDX-License-Identifier: EUPL-1.2\n-->\n\n<template>\n\t<div\n\t\tclass=\"cn-files-widget\"\n\t\t:class=\"{ 'cn-files-widget--dragging': isDragging }\"\n\t\t@dragenter=\"onDragEnter\"\n\t\t@dragover=\"onDragOver\"\n\t\t@dragleave=\"onDragLeave\"\n\t\t@drop=\"onDrop\">\n\t\t<div class=\"cn-files-widget__toolbar\">\n\t\t\t<nav\n\t\t\t\tv-if=\"!objectBound\"\n\t\t\t\tclass=\"cn-files-widget__breadcrumb\"\n\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Folder breadcrumb')\">\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-files-widget__crumb cn-files-widget__crumb--root\"\n\t\t\t\t\t:aria-current=\"currentSubPath === '/' ? 'page' : null\"\n\t\t\t\t\t@click=\"navigateTo('/')\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Root') }}\n\t\t\t\t</button>\n\t\t\t\t<template v-for=\"(segment, index) in pathSegments\" :key=\"index\">\n\t\t\t\t\t<span\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"cn-files-widget__separator\">/</span>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclass=\"cn-files-widget__crumb\"\n\t\t\t\t\t\t:aria-current=\"index === pathSegments.length - 1 ? 'page' : null\"\n\t\t\t\t\t\t@click=\"navigateTo(segmentPathTo(index))\">\n\t\t\t\t\t\t{{ segment }}\n\t\t\t\t\t</button>\n\t\t\t\t</template>\n\t\t\t</nav>\n\n\t\t\t<input\n\t\t\t\tv-model=\"searchQuery\"\n\t\t\t\ttype=\"search\"\n\t\t\t\tclass=\"cn-files-widget__search\"\n\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Search this folder')\"\n\t\t\t\t:placeholder=\"t('nextcloud-vue', 'Search this folder…')\">\n\n\t\t\t<button\n\t\t\t\tv-if=\"canShowUpload\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-files-widget__upload\"\n\t\t\t\t@click=\"triggerUpload\">\n\t\t\t\t{{ t('nextcloud-vue', 'Upload File') }}\n\t\t\t</button>\n\t\t\t<!--\n\t\t\t\t`:ref`, not `ref`. Note `:aria-hidden=\"true\"` does NOT save this:\n\t\t\t\ta binding to a LITERAL CONSTANT is constant-folded, so the vnode\n\t\t\t\tstays fully static and the compiler hoists it to module scope.\n\t\t\t\tA hoisted vnode's ref has no owner instance, and `setRef()`'s\n\t\t\t\tnull-owner guard — along with its early `return` — is compiled\n\t\t\t\tout of production builds, so it dereferences null and throws\n\t\t\t\t`Cannot read properties of null (reading 'refs')`, aborting the\n\t\t\t\trender of the page that mounted this widget.\n\n\t\t\t\tConfirmed by instrumenting Vue's own warning to print the ref\n\t\t\t\tname: `[DEBUG ref=\"fileInput\" vnodeType=input]`. This widget is\n\t\t\t\tthe `files` integration leaf, which is how it reaches a detail\n\t\t\t\tpage. See CnFilesTab for the full account of the mechanism.\n\t\t\t-->\n\t\t\t<input\n\t\t\t\t:ref=\"fileInputRef\"\n\t\t\t\ttype=\"file\"\n\t\t\t\tmultiple\n\t\t\t\tclass=\"cn-files-widget__file-input\"\n\t\t\t\t:aria-hidden=\"true\"\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\t@change=\"onFileInputChange\">\n\t\t</div>\n\n\t\t<div\n\t\t\tv-if=\"isDragging && canShowUpload\"\n\t\t\tclass=\"cn-files-widget__dropzone\"\n\t\t\taria-hidden=\"true\">\n\t\t\t{{ t('nextcloud-vue', 'Drop files to upload') }}\n\t\t</div>\n\n\t\t<div v-if=\"uploads.length > 0\" class=\"cn-files-widget__uploads\" role=\"status\">\n\t\t\t<p class=\"cn-files-widget__uploads-total\">\n\t\t\t\t{{ uploadTotalLabel }}\n\t\t\t\t<button\n\t\t\t\t\tv-if=\"!uploading\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-files-widget__notice-dismiss\"\n\t\t\t\t\t@click=\"dismissUploads\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Dismiss') }}\n\t\t\t\t</button>\n\t\t\t</p>\n\t\t\t<ul class=\"cn-files-widget__uploads-list\">\n\t\t\t\t<li\n\t\t\t\t\tv-for=\"(upload, index) in uploads\"\n\t\t\t\t\t:key=\"index\"\n\t\t\t\t\tclass=\"cn-files-widget__progress-item\"\n\t\t\t\t\t:class=\"'cn-files-widget__progress-item--' + upload.status\">\n\t\t\t\t\t<span class=\"cn-files-widget__upload-name\">{{ upload.name }}</span>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"cn-files-widget__upload-progress\"\n\t\t\t\t\t\trole=\"progressbar\"\n\t\t\t\t\t\t:aria-label=\"upload.name\"\n\t\t\t\t\t\taria-valuemin=\"0\"\n\t\t\t\t\t\taria-valuemax=\"100\"\n\t\t\t\t\t\t:aria-valuenow=\"uploadPercent(upload)\">\n\t\t\t\t\t\t<span class=\"cn-files-widget__upload-bar\" :style=\"{ width: uploadPercent(upload) + '%' }\" />\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"cn-files-widget__upload-status\">{{ uploadStatusLabel(upload) }}</span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\n\t\t<div v-if=\"deleteNotice\" class=\"cn-files-widget__notice\" role=\"alert\">\n\t\t\t<span>{{ deleteNotice }}</span>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-files-widget__notice-dismiss\"\n\t\t\t\t@click=\"deleteNotice = null\">\n\t\t\t\t{{ t('nextcloud-vue', 'Dismiss') }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<div v-if=\"loading\" class=\"cn-files-widget__state\">\n\t\t\t{{ t('nextcloud-vue', 'Loading folder…') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"unavailable\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--unavailable\">\n\t\t\t{{ t('nextcloud-vue', 'Files is not available') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"errorCode === 'no_access'\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--no-access\">\n\t\t\t{{ t('nextcloud-vue', 'You don\\'t have access to this folder.') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"errorCode === 'folder_not_found'\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--not-found\">\n\t\t\t{{ t('nextcloud-vue', 'Folder no longer exists.') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"errorCode\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--error\">\n\t\t\t{{ t('nextcloud-vue', 'Failed to load folder contents.') }}\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-files-widget__retry\"\n\t\t\t\t@click=\"fetchContents\">\n\t\t\t\t{{ t('nextcloud-vue', 'Retry') }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"filteredItems.length === 0 && !searchQuery\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--empty\">\n\t\t\t{{ t('nextcloud-vue', 'This folder is empty.') }}\n\t\t</div>\n\n\t\t<div\n\t\t\tv-else-if=\"filteredItems.length === 0 && searchQuery\"\n\t\t\tclass=\"cn-files-widget__state cn-files-widget__state--empty\">\n\t\t\t{{ noSearchResultsLabel }}\n\t\t</div>\n\n\t\t<ul\n\t\t\tv-else\n\t\t\tclass=\"cn-files-widget__list\"\n\t\t\t:class=\"{ 'cn-files-widget__list--grid': viewMode === 'grid' }\">\n\t\t\t<li\n\t\t\t\tv-for=\"item in filteredItems\"\n\t\t\t\t:key=\"item.fileId\"\n\t\t\t\tclass=\"cn-files-widget__row\"\n\t\t\t\t:class=\"{ 'cn-files-widget__row--folder': item.isFolder }\">\n\t\t\t\t<!-- Files are real links (new tab, copyable); folders browse in-widget. -->\n\t\t\t\t<component\n\t\t\t\t\t:is=\"item.isFolder ? 'button' : 'a'\"\n\t\t\t\t\t:type=\"item.isFolder ? 'button' : undefined\"\n\t\t\t\t\t:href=\"item.isFolder ? undefined : (fileUrl(item.fileId) || undefined)\"\n\t\t\t\t\t:target=\"item.isFolder ? undefined : '_blank'\"\n\t\t\t\t\t:rel=\"item.isFolder ? undefined : 'noopener noreferrer'\"\n\t\t\t\t\tclass=\"cn-files-widget__row-name\"\n\t\t\t\t\t@click=\"onRowClick(item, $event)\">\n\t\t\t\t\t<span aria-hidden=\"true\" class=\"cn-files-widget__row-icon\">\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tv-if=\"showThumbnails && !item.isFolder && item.thumbnailUrl && !failedThumbs[item.fileId]\"\n\t\t\t\t\t\t\t:src=\"item.thumbnailUrl\"\n\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\tclass=\"cn-files-widget__row-thumb\"\n\t\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t\t\t@error=\"onThumbError(item)\">\n\t\t\t\t\t\t<template v-else>{{ item.isFolder ? '📁' : '📄' }}</template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"cn-files-widget__row-label\">{{ item.name }}</span>\n\t\t\t\t</component>\n\t\t\t\t<span class=\"cn-files-widget__row-modified\">{{ item.modifiedAt }}</span>\n\t\t\t\t<span class=\"cn-files-widget__row-size\">{{ formatSize(item.size, item.isFolder) }}</span>\n\t\t\t\t<button\n\t\t\t\t\tv-if=\"canDeleteItem(item)\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclass=\"cn-files-widget__row-delete\"\n\t\t\t\t\t:aria-label=\"t('nextcloud-vue', 'Delete {name}', { name: item.name })\"\n\t\t\t\t\t@click=\"confirmDelete(item)\">\n\t\t\t\t\t{{ t('nextcloud-vue', 'Delete') }}\n\t\t\t\t</button>\n\t\t\t</li>\n\t\t</ul>\n\n\t\t<div v-if=\"nextCursor\" class=\"cn-files-widget__pagination\">\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"cn-files-widget__more\"\n\t\t\t\t@click=\"loadMore\">\n\t\t\t\t{{ t('nextcloud-vue', 'Load more') }}\n\t\t\t</button>\n\t\t</div>\n\n\t\t<CnFilePreview v-if=\"previewFile\" :file=\"previewFile\" @close=\"previewFile = null\" />\n\n\t\t<CnFilesWidgetDeleteDialog\n\t\t\t:open=\"confirmTarget !== null\"\n\t\t\t:fileName=\"confirmTarget ? confirmTarget.name : ''\"\n\t\t\t@update:open=\"onDeleteDialogToggle\"\n\t\t\t@confirm=\"performDelete\" />\n\t</div>\n</template>\n\n<script>\nimport { translatePlural as n, translate as t } from '@nextcloud/l10n'\nimport { generateUrl } from '@nextcloud/router'\nimport CnFilesWidgetDeleteDialog from '../../dialogs/CnFilesWidgetDeleteDialog.vue'\nimport CnFilePreview from '../CnFilePreview/CnFilePreview.vue'\nimport { useFileOpener } from '../../composables/useFileOpener.js'\nimport { stripTrailingSlashes } from '../../utils/trailingSlashes.js'\n\n/**\n * CnFilesWidget — an inline Nextcloud Files browser rendered as a dashboard\n * widget (catalog type `files`, migrated from the launchpad `files` widget).\n *\n * NC-INTEGRATION DEPENDENCY: this widget reads folder contents from a host\n * application's `/api/widgets/files/{placementId}/...` endpoints (the same\n * contract the launchpad/mydash backend served) and deep-links file rows into\n * the Nextcloud **Files** app via the canonical `/f/{fileid}` permalink. The\n * `@nextcloud/axios` + `@nextcloud/router` helpers are imported LAZILY at call\n * time so the widget code never hard-couples to a network stack at module load\n * (keeps the no-op css transform path clean and lets a host without the backing\n * endpoint mount the component without side-effects). When the backing endpoint\n * is absent the widget degrades to a localised disabled / empty state rather\n * than throwing — see the `unavailable` data flag and the `folder_not_found` /\n * `no_access` error branches.\n *\n * Every placement instance owns its own navigation stack: the sub-path resets\n * to `/` whenever the `placement` prop changes, so re-configuring the widget\n * root never leaves the user on a stale path.\n *\n * @spec openspec/changes/cn-widget-library/specs/cn-widget-library/spec.md\n */\nexport default {\n\tname: 'CnFilesWidget',\n\n\tcomponents: {\n\t\tCnFilePreview,\n\t\tCnFilesWidgetDeleteDialog,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Persisted content blob configuring the folder + toolbar — see\n\t\t * `CnFilesWidgetForm` for the full shape (`folderPath`, `fileId`,\n\t\t * `viewMode`, `allowUpload`, `allowDelete`, …).\n\t\t */\n\t\tcontent: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** Placement entity; its `id` scopes the host Files endpoint. */\n\t\tplacement: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({}),\n\t\t},\n\n\t\t/** Whether the dashboard shell is in admin mode. */\n\t\tisAdmin: { // eslint-disable-line vue/no-unused-properties -- the dashboard shell passes this to every widget; declared so it does not fall through to $attrs.\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/** Whether the dashboard shell is in edit mode. */\n\t\tcanEdit: { // eslint-disable-line vue/no-unused-properties -- the dashboard shell passes this to every widget; declared so it does not fall through to $attrs.\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * App base for the host's files-widget endpoints\n\t\t * (`{apiBase}/api/widgets/files/{placementId}/...`). Lets a consuming\n\t\t * app point the widget at its own backend (e.g. `/apps/launchpad`).\n\t\t * Defaults to `/apps/files`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tapiBase: {\n\t\t\ttype: String,\n\t\t\tdefault: '/apps/files',\n\t\t},\n\n\t\t/**\n\t\t * Object-bound mode: the OpenRegister object id this widget attaches\n\t\t * files to. When `objectId` + `register` + `schema` are all set (they\n\t\t * are auto-supplied by `CnWidgetGrid`'s detail-page context merge), the\n\t\t * widget lists/uploads/deletes against the object's Nextcloud folder via\n\t\t * the OpenRegister object endpoints instead of the dashboard\n\t\t * `/api/widgets/files/...` contract. Empty (default) keeps the dashboard\n\t\t * placement behaviour unchanged.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tobjectId: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Object-bound mode: the OpenRegister register slug of the bound object.\n\t\t * See the `objectId` prop.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tregister: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Object-bound mode: the OpenRegister schema of the bound object. Accepts\n\t\t * either a slug string or the resolved schema object (as merged by\n\t\t * `CnWidgetGrid`); the slug is derived by the `schemaSlug` computed. See\n\t\t * the `objectId` prop.\n\t\t *\n\t\t * @type {string|object}\n\t\t */\n\t\tschema: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * App base for the OpenRegister object-file endpoints used in\n\t\t * object-bound mode (`{objectApiBase}/objects/{register}/{schema}/{id}/...`).\n\t\t * Defaults to `/apps/openregister/api`.\n\t\t *\n\t\t * @type {string}\n\t\t */\n\t\tobjectApiBase: {\n\t\t\ttype: String,\n\t\t\tdefault: '/apps/openregister/api',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t/** The file shown in the in-page preview, or null. */\n\t\t\tpreviewFile: null,\n\t\t\t/**\n\t\t\t * The hidden file input, set by the template's function ref (kept off `$refs` so the ref stays dynamic — see the template).\n\t\t\t *\n\t\t\t * @type {HTMLInputElement|null}\n\t\t\t */\n\t\t\tfileInputEl: null,\n\t\t\titems: [],\n\t\t\tcurrentSubPath: '/',\n\t\t\tloading: false,\n\t\t\terrorCode: null,\n\t\t\tunavailable: false,\n\t\t\tnextCursor: null,\n\t\t\tsearchQuery: '',\n\t\t\tconfirmTarget: null,\n\t\t\t// fileId → true for thumbnails whose <img> failed to load, so the\n\t\t\t// row falls back to the generic icon instead of a broken image.\n\t\t\tfailedThumbs: {},\n\t\t\t// Whether a file drag is currently hovering the widget (drop overlay).\n\t\t\tisDragging: false,\n\t\t\t// Depth counter so nested dragenter/dragleave don't flicker the overlay.\n\t\t\tdragDepth: 0,\n\t\t\t// The files of the current or last upload batch, each\n\t\t\t// `{ name, size, loaded, status, error }` with status `queued`,\n\t\t\t// `uploading`, `done` or `failed`.\n\t\t\tuploads: [],\n\t\t\tuploading: false,\n\t\t\t// Why the last delete was refused, shown until dismissed.\n\t\t\tdeleteNotice: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * Numeric placement id used to scope the host Files endpoint.\n\t\t *\n\t\t * @return {number} the placement id, or `0` when no placement is bound.\n\t\t */\n\t\tplacementId() {\n\t\t\treturn Number(this.placement?.id || 0)\n\t\t},\n\n\t\t/**\n\t\t * The schema slug in object-bound mode. Accepts either a slug string or\n\t\t * the resolved schema object merged by `CnWidgetGrid` (in which case the\n\t\t * slug is read from `slug`/`id`/`uuid`).\n\t\t *\n\t\t * @return {string} the schema slug, or `''` when unavailable.\n\t\t */\n\t\tschemaSlug() {\n\t\t\tconst s = this.schema\n\t\t\tif (typeof s === 'string') {\n\t\t\t\treturn s\n\t\t\t}\n\t\t\treturn (s && (s.slug || s.id || s.uuid)) || ''\n\t\t},\n\n\t\t/**\n\t\t * Whether the widget runs in object-bound mode — i.e. it attaches files\n\t\t * to a specific OpenRegister object rather than a dashboard placement.\n\t\t *\n\t\t * @return {boolean} `true` when `objectId`, `register` and `schemaSlug` are all set.\n\t\t */\n\t\tobjectBound() {\n\t\t\treturn !!(this.objectId && this.register && this.schemaSlug)\n\t\t},\n\n\t\t/**\n\t\t * Stable identity key for the bound object, or `''` in dashboard mode.\n\t\t * Watched to (re)fetch when the object context first resolves (the schema\n\t\t * object arrives after the ids) or when the widget rebinds to another\n\t\t * object.\n\t\t *\n\t\t * @return {string} `register/schema/objectId`, or `''` when not object-bound.\n\t\t */\n\t\tobjectKey() {\n\t\t\treturn this.objectBound\n\t\t\t\t? `${this.register}/${this.schemaSlug}/${this.objectId}`\n\t\t\t\t: ''\n\t\t},\n\n\t\t/**\n\t\t * Whether the upload affordance is enabled by configuration. Defaults to\n\t\t * enabled in BOTH modes — a Files widget is an add-files surface — and is\n\t\t * only suppressed when a placement explicitly sets `allowUpload: false`.\n\t\t * (Object-bound mode already defaulted on, matching the object sidebar's\n\t\t * Files tab; beta extended the same default to dashboard placements.)\n\t\t *\n\t\t * @return {boolean} `true` unless `content.allowUpload` is explicitly false.\n\t\t */\n\t\tallowUpload() {\n\t\t\treturn this.content?.allowUpload !== false\n\t\t},\n\n\t\t/**\n\t\t * Whether per-row delete affordances are enabled by configuration. On by\n\t\t * default in object-bound mode (unless `content.allowDelete` is explicitly\n\t\t * false); opt-in (`content.allowDelete === true`) in dashboard mode.\n\t\t *\n\t\t * @return {boolean} `true` when deletes are allowed.\n\t\t */\n\t\tallowDelete() {\n\t\t\tif (this.objectBound) {\n\t\t\t\treturn this.content?.allowDelete !== false\n\t\t\t}\n\t\t\treturn this.content?.allowDelete === true\n\t\t},\n\n\t\t/**\n\t\t * Layout for the file listing, from `content.viewMode`. `'grid'` renders\n\t\t * the items as a tile grid; any other value (`'list'`, `'tree'`, unset)\n\t\t * renders the default list. Tree navigation is not implemented, so\n\t\t * `'tree'` falls back to the list layout.\n\t\t *\n\t\t * @return {string} `'grid'` or `'list'`.\n\t\t */\n\t\tviewMode() {\n\t\t\treturn this.content?.viewMode === 'grid' ? 'grid' : 'list'\n\t\t},\n\n\t\t/**\n\t\t * Whether file rows show a preview thumbnail (from `content.showThumbnails`).\n\t\t * Defaults to on; only an explicit `false` disables it. Files without a\n\t\t * backend-provided `thumbnailUrl` still fall back to the generic icon.\n\t\t *\n\t\t * @return {boolean} `true` unless `content.showThumbnails` is explicitly false.\n\t\t */\n\t\tshowThumbnails() {\n\t\t\t// Tree mode lists names only, whatever `showThumbnails` says.\n\t\t\tif (this.content?.viewMode === 'tree') {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn this.content?.showThumbnails !== false\n\t\t},\n\n\t\t/**\n\t\t * The batch line above the upload list: bytes sent of the total while\n\t\t * uploading, then how many files arrived.\n\t\t *\n\t\t * @return {string} the label.\n\t\t */\n\t\tuploadTotalLabel() {\n\t\t\tconst total = this.uploads.reduce((sum, upload) => sum + upload.size, 0)\n\t\t\tif (this.uploading) {\n\t\t\t\tconst loaded = this.uploads.reduce((sum, upload) => sum + upload.loaded, 0)\n\t\t\t\treturn t('nextcloud-vue', 'Uploading {loaded} / {total}', {\n\t\t\t\t\tloaded: this.formatSize(loaded),\n\t\t\t\t\ttotal: this.formatSize(total),\n\t\t\t\t})\n\t\t\t}\n\t\t\tconst failed = this.uploads.filter((upload) => upload.status === 'failed').length\n\t\t\tif (failed > 0) {\n\t\t\t\treturn n('nextcloud-vue', '{count} file could not be uploaded', '{count} files could not be uploaded', failed, { count: failed })\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'Upload complete')\n\t\t},\n\n\t\t/**\n\t\t * Heuristic write-permission check: an empty folder optimistically\n\t\t * surfaces the upload button (the backend re-validates), otherwise at\n\t\t * least one editable child is required.\n\t\t *\n\t\t * @return {boolean} `true` when the viewer is treated as having write access.\n\t\t */\n\t\tviewerCanWrite() {\n\t\t\tif (this.items.length === 0) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn this.items.some((item) => item.canEdit === true)\n\t\t},\n\n\t\t/**\n\t\t * Whether the upload button should render.\n\t\t *\n\t\t * @return {boolean} `true` when upload is allowed, writable, and not errored.\n\t\t */\n\t\tcanShowUpload() {\n\t\t\treturn this.allowUpload && this.viewerCanWrite && !this.errorCode && !this.unavailable\n\t\t},\n\n\t\t/**\n\t\t * The current sub-path split into breadcrumb segments.\n\t\t *\n\t\t * @return {string[]} the path segments (empty at root).\n\t\t */\n\t\tpathSegments() {\n\t\t\tif (!this.currentSubPath || this.currentSubPath === '/') {\n\t\t\t\treturn []\n\t\t\t}\n\t\t\treturn this.currentSubPath\n\t\t\t\t.split('/')\n\t\t\t\t.map((segment) => segment.trim())\n\t\t\t\t.filter((segment) => segment !== '')\n\t\t},\n\n\t\t/**\n\t\t * The items filtered by the in-widget search query.\n\t\t *\n\t\t * @return {Array<object>} the matching items (all items when the query is empty).\n\t\t */\n\t\tfilteredItems() {\n\t\t\tconst query = this.searchQuery.trim().toLowerCase()\n\t\t\tif (query === '') {\n\t\t\t\treturn this.items\n\t\t\t}\n\t\t\treturn this.items.filter((item) => {\n\t\t\t\tconst name = String(item.name || '').toLowerCase()\n\t\t\t\treturn name.includes(query)\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The localised \"no results\" label for the active search query.\n\t\t *\n\t\t * @return {string} the no-results message.\n\t\t */\n\t\tnoSearchResultsLabel() {\n\t\t\treturn t(\n\t\t\t\t'nextcloud-vue',\n\t\t\t\t'No files matching \\'{query}\\'',\n\t\t\t\t{ query: this.searchQuery },\n\t\t\t)\n\t\t},\n\t},\n\n\twatch: {\n\t\tplacement: {\n\t\t\timmediate: true,\n\t\t\t/**\n\t\t\t * Reset navigation state and refetch whenever the placement changes.\n\t\t\t * Dashboard mode only — object-bound mode is driven by `objectKey`.\n\t\t\t *\n\t\t\t * @return {void}\n\t\t\t */\n\t\t\thandler() {\n\t\t\t\tif (this.objectBound) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.resetListing()\n\t\t\t\tthis.fetchContents()\n\t\t\t},\n\t\t},\n\n\t\tobjectKey: {\n\t\t\timmediate: true,\n\t\t\t/**\n\t\t\t * Reset and refetch when the bound object first resolves or changes.\n\t\t\t *\n\t\t\t * @param {string} key the new object key (`''` in dashboard mode).\n\t\t\t * @return {void}\n\t\t\t */\n\t\t\thandler(key) {\n\t\t\t\tif (!key) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.resetListing()\n\t\t\t\tthis.fetchContents()\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\t/**\n\t\t * Function ref for the hidden file input; a method so the binding is\n\t\t * stable across renders and the vnode stays dynamic.\n\t\t *\n\t\t * @param {HTMLInputElement|null} el The element, or null on unmount.\n\t\t * @return {void}\n\t\t */\n\t\tfileInputRef(el) {\n\t\t\tthis.fileInputEl = el || null\n\t\t},\n\n\t\t/**\n\t\t * Reset the listing/navigation state before a (re)fetch.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tresetListing() {\n\t\t\tthis.currentSubPath = '/'\n\t\t\tthis.items = []\n\t\t\tthis.nextCursor = null\n\t\t\tthis.errorCode = null\n\t\t\tthis.unavailable = false\n\t\t},\n\n\t\t/**\n\t\t * Fetch (or append) one page of folder contents from the host Files\n\t\t * endpoint. Degrades gracefully: a missing endpoint flips `unavailable`,\n\t\t * a 404/403 maps to a typed `errorCode`, and no exception escapes.\n\t\t *\n\t\t * @param {boolean} [append] whether to append to the existing list (pagination).\n\t\t * @return {Promise<void>} resolves when the fetch settles.\n\t\t */\n\t\tasync fetchContents(append = false) {\n\t\t\tif (this.objectBound) {\n\t\t\t\treturn this.fetchObjectFiles()\n\t\t\t}\n\t\t\tif (this.placementId === 0) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.loading = !append\n\t\t\tthis.errorCode = null\n\t\t\tthis.unavailable = false\n\n\t\t\ttry {\n\t\t\t\tconst { default: axios } = await import('@nextcloud/axios')\n\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t`${this.apiBase}/api/widgets/files/{placementId}/contents`,\n\t\t\t\t\t{ placementId: this.placementId },\n\t\t\t\t)\n\t\t\t\tconst params = {\n\t\t\t\t\tcurrentPath: this.currentSubPath,\n\t\t\t\t\tlimit: 50,\n\t\t\t\t}\n\t\t\t\tif (append && this.nextCursor) {\n\t\t\t\t\tparams.cursor = this.nextCursor\n\t\t\t\t}\n\n\t\t\t\tconst response = await axios.get(url, { params })\n\t\t\t\tconst data = response?.data || {}\n\t\t\t\tconst nextItems = Array.isArray(data.items) ? data.items : []\n\t\t\t\tthis.items = append ? this.items.concat(nextItems) : nextItems\n\t\t\t\tthis.nextCursor = data.nextCursor || null\n\t\t\t} catch (err) {\n\t\t\t\tconst status = err?.response?.status\n\t\t\t\tconst code = err?.response?.data?.error\n\t\t\t\tif (status === 404 || code === 'folder_not_found') {\n\t\t\t\t\tthis.errorCode = 'folder_not_found'\n\t\t\t\t} else if (status === 403 || code === 'no_access') {\n\t\t\t\t\tthis.errorCode = 'no_access'\n\t\t\t\t} else if (status === undefined) {\n\t\t\t\t\t// No HTTP response at all — the backing Files endpoint is\n\t\t\t\t\t// not installed/reachable; degrade to the disabled state.\n\t\t\t\t\tthis.unavailable = true\n\t\t\t\t} else {\n\t\t\t\t\tthis.errorCode = 'unknown_error'\n\t\t\t\t}\n\t\t\t\tif (!append) {\n\t\t\t\t\tthis.items = []\n\t\t\t\t\tthis.nextCursor = null\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Object-bound listing: fetch the bound OpenRegister object's files from\n\t\t * `{objectApiBase}/objects/{register}/{schema}/{id}/files` and map them\n\t\t * onto the widget's flat item shape (no folder navigation). Degrades the\n\t\t * same way as the dashboard fetch: 404/403 → typed `errorCode`, no HTTP\n\t\t * response → `unavailable`.\n\t\t *\n\t\t * @return {Promise<void>} resolves when the fetch settles.\n\t\t */\n\t\tasync fetchObjectFiles() {\n\t\t\tthis.loading = true\n\t\t\tthis.errorCode = null\n\t\t\tthis.unavailable = false\n\n\t\t\ttry {\n\t\t\t\tconst { default: axios } = await import('@nextcloud/axios')\n\n\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t`${this.objectApiBase}/objects/{register}/{schema}/{objectId}/files`,\n\t\t\t\t\t{ register: this.register, schema: this.schemaSlug, objectId: this.objectId },\n\t\t\t\t)\n\t\t\t\tconst response = await axios.get(url)\n\t\t\t\tconst data = response?.data || {}\n\t\t\t\tconst results = Array.isArray(data)\n\t\t\t\t\t? data\n\t\t\t\t\t: (Array.isArray(data.results) ? data.results : [])\n\t\t\t\tthis.items = results.map((file) => {\n\t\t\t\t\tconst mime = file.mimeType || file.mimetype || file.type || ''\n\t\t\t\t\t// SVG: Nextcloud's rasterised /core/preview is usually\n\t\t\t\t\t// unavailable for SVG (no rsvg/imagick), so stream the raw file\n\t\t\t\t\t// from OpenRegister's authenticated per-file download endpoint\n\t\t\t\t\t// (works for the owner's un-shared uploads via the session\n\t\t\t\t\t// cookie; the widget's other calls use the same objectApiBase).\n\t\t\t\t\t// Rendered through the list's <img>, the SVG runs in the\n\t\t\t\t\t// browser's restricted image mode — inline <script> / event\n\t\t\t\t\t// handlers never execute and external refs don't load — so\n\t\t\t\t\t// untrusted SVG is shown safely without a bespoke sandbox.\n\t\t\t\t\t// Other images use the rasterised server preview; anything else\n\t\t\t\t\t// gets the generic icon (a missing preview also falls back via\n\t\t\t\t\t// the <img> @error handler).\n\t\t\t\t\tlet thumbnailUrl = null\n\t\t\t\t\tif (file.id && /^image\\/svg\\+xml$/i.test(mime)) {\n\t\t\t\t\t\tthumbnailUrl = generateUrl(`${this.objectApiBase}/files/{fileId}/download`, { fileId: file.id })\n\t\t\t\t\t} else if (file.id && /^image\\//.test(mime)) {\n\t\t\t\t\t\tthumbnailUrl = generateUrl('/core/preview?fileId={fileId}&x=256&y=256&a=1', { fileId: file.id })\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tname: file.name || file.title || '',\n\t\t\t\t\t\tfileId: file.id,\n\t\t\t\t\t\tmimeType: mime,\n\t\t\t\t\t\tpath: file.path || '',\n\t\t\t\t\t\tdownloadUrl: file.id ? generateUrl(`${this.objectApiBase}/files/{fileId}/download`, { fileId: file.id }) : '',\n\t\t\t\t\t\tisFolder: false,\n\t\t\t\t\t\tsize: file.size,\n\t\t\t\t\t\tmodifiedAt: file.modified || file.updated || '',\n\t\t\t\t\t\tthumbnailUrl,\n\t\t\t\t\t\tcanEdit: true,\n\t\t\t\t\t\tcanDelete: this.allowDelete,\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tthis.nextCursor = null\n\t\t\t} catch (err) {\n\t\t\t\tconst status = err?.response?.status\n\t\t\t\tif (status === 404) {\n\t\t\t\t\tthis.errorCode = 'folder_not_found'\n\t\t\t\t} else if (status === 403) {\n\t\t\t\t\tthis.errorCode = 'no_access'\n\t\t\t\t} else if (status === undefined) {\n\t\t\t\t\tthis.unavailable = true\n\t\t\t\t} else {\n\t\t\t\t\tthis.errorCode = 'unknown_error'\n\t\t\t\t}\n\t\t\t\tthis.items = []\n\t\t\t\tthis.nextCursor = null\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Load the next page when a cursor is present.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tloadMore() {\n\t\t\tif (this.nextCursor) {\n\t\t\t\tthis.fetchContents(true)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Show a file in the in-page preview.\n\t\t *\n\t\t * @param {object} file The file to preview.\n\t\t */\n\t\tshowPreview(file) {\n\t\t\tthis.previewFile = file\n\t\t},\n\n\t\t/**\n\t\t * Handle a row click: a folder is browsed in place, a file opens through\n\t\t * the shared opener (Viewer, preview, browser, Files app).\n\t\t *\n\t\t * @param {object} item the clicked row.\n\t\t * @param {MouseEvent} [event] the click event.\n\t\t * @return {void}\n\t\t */\n\t\tonRowClick(item, event) {\n\t\t\tif (item.isFolder) {\n\t\t\t\tthis.onItemClick(item)\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Keep the link's own behaviour for a modified click (new tab, etc.).\n\t\t\tif (event && (event.ctrlKey || event.metaKey || event.shiftKey || event.button === 1)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (event) {\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t\tuseFileOpener({ onPreview: this.showPreview }).open({\n\t\t\t\tid: item.fileId,\n\t\t\t\tname: item.name,\n\t\t\t\ttype: item.mimeType || item.mimetype || item.type || '',\n\t\t\t\tpath: item.path || '',\n\t\t\t\taccessUrl: item.accessUrl || '',\n\t\t\t\tdownloadUrl: item.downloadUrl || '',\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Descend into a folder row.\n\t\t *\n\t\t * @param {object} item the clicked folder item.\n\t\t * @return {void}\n\t\t */\n\t\tonItemClick(item) {\n\t\t\tthis.navigateTo(this.joinPath(this.currentSubPath, item.name))\n\t\t},\n\n\t\t/**\n\t\t * Navigate to a sub-path, clearing search + pagination and refetching.\n\t\t *\n\t\t * @param {string} path the target sub-path.\n\t\t * @return {void}\n\t\t */\n\t\tnavigateTo(path) {\n\t\t\tthis.currentSubPath = path || '/'\n\t\t\tthis.searchQuery = ''\n\t\t\tthis.nextCursor = null\n\t\t\tthis.fetchContents()\n\t\t},\n\n\t\t/**\n\t\t * Build the sub-path up to (and including) a breadcrumb segment index.\n\t\t *\n\t\t * @param {number} index the segment index.\n\t\t * @return {string} the assembled sub-path.\n\t\t */\n\t\tsegmentPathTo(index) {\n\t\t\tconst segments = this.pathSegments.slice(0, index + 1)\n\t\t\treturn '/' + segments.join('/')\n\t\t},\n\n\t\t/**\n\t\t * Join a base path and a child name into a normalised sub-path.\n\t\t *\n\t\t * @param {string} base the base path.\n\t\t * @param {string} name the child name.\n\t\t * @return {string} the joined path.\n\t\t */\n\t\tjoinPath(base, name) {\n\t\t\tconst trimmedBase = stripTrailingSlashes(String(base || '/'))\n\t\t\tconst trimmedName = String(name || '').replace(/^\\/+/, '')\n\t\t\tif (trimmedBase === '' || trimmedBase === '/') {\n\t\t\t\treturn '/' + trimmedName\n\t\t\t}\n\t\t\treturn `${trimmedBase}/${trimmedName}`\n\t\t},\n\n\t\t/**\n\t\t * The Files-app permalink for a file.\n\t\t *\n\t\t * @param {number|string} fileId the Nextcloud file id.\n\t\t * @return {string} the URL, or '' without a file id.\n\t\t */\n\t\tfileUrl(fileId) {\n\t\t\tif (!fileId) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\t// Canonical permalink: `/f/{fileid}` resolves the id to its folder\n\t\t\t// and opens the file; generateUrl adds `index.php` where needed.\n\t\t\treturn generateUrl('/f/{fileid}', { fileid: fileId })\n\t\t},\n\n\t\t/**\n\t\t * Whether a per-row delete button should render for an item.\n\t\t *\n\t\t * @param {object} item the item.\n\t\t * @return {boolean} `true` when delete is allowed and the item is deletable.\n\t\t */\n\t\tcanDeleteItem(item) {\n\t\t\treturn this.allowDelete === true && item.canDelete === true\n\t\t},\n\n\t\t/**\n\t\t * Mark an item's thumbnail as failed so the row falls back to the\n\t\t * generic icon. Fires when the preview `<img>` cannot load (e.g. the\n\t\t * preview was not generated in time).\n\t\t *\n\t\t * @param {object} item the item whose thumbnail failed.\n\t\t * @return {void}\n\t\t */\n\t\tonThumbError(item) {\n\t\t\tthis.failedThumbs[item.fileId] = true\n\t\t},\n\n\t\t/**\n\t\t * Open the delete-confirmation modal for an item.\n\t\t *\n\t\t * @param {object} item the item to delete.\n\t\t * @return {void}\n\t\t */\n\t\tconfirmDelete(item) {\n\t\t\tthis.confirmTarget = item\n\t\t},\n\n\t\t/**\n\t\t * React to the delete dialog's open-state changes. Closing it (Cancel,\n\t\t * Esc, click-outside, or the header X) clears the pending target.\n\t\t *\n\t\t * @param {boolean} open the dialog's new open state.\n\t\t * @return {void}\n\t\t */\n\t\tonDeleteDialogToggle(open) {\n\t\t\tif (!open) {\n\t\t\t\tthis.confirmTarget = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Delete the confirmed target via the host Files endpoint, refreshing\n\t\t * the listing on failure so the UI stays truthful.\n\t\t *\n\t\t * @return {Promise<void>} resolves when the delete settles.\n\t\t */\n\t\tasync performDelete() {\n\t\t\tconst target = this.confirmTarget\n\t\t\tif (!target) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.deleteNotice = null\n\t\t\ttry {\n\t\t\t\tconst { default: axios } = await import('@nextcloud/axios')\n\n\t\t\t\tconst url = this.objectBound\n\t\t\t\t\t? generateUrl(\n\t\t\t\t\t\t\t`${this.objectApiBase}/objects/{register}/{schema}/{objectId}/files/{fileId}`,\n\t\t\t\t\t\t\t{ register: this.register, schema: this.schemaSlug, objectId: this.objectId, fileId: target.fileId },\n\t\t\t\t\t\t)\n\t\t\t\t\t: generateUrl(\n\t\t\t\t\t\t\t`${this.apiBase}/api/widgets/files/{placementId}/files/{fileId}`,\n\t\t\t\t\t\t\t{ placementId: this.placementId, fileId: target.fileId },\n\t\t\t\t\t\t)\n\t\t\t\tawait axios.delete(url)\n\t\t\t\tthis.items = this.items.filter((item) => item.fileId !== target.fileId)\n\t\t\t} catch (err) {\n\t\t\t\tthis.deleteNotice = err?.response?.status === 403\n\t\t\t\t\t? t('nextcloud-vue', 'You no longer have permission to delete {name}.', { name: target.name })\n\t\t\t\t\t: t('nextcloud-vue', 'Could not delete {name}.', { name: target.name })\n\t\t\t\tthis.fetchContents()\n\t\t\t} finally {\n\t\t\t\tthis.confirmTarget = null\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Trigger the hidden file input from the upload button.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\ttriggerUpload() {\n\t\t\tif (this.fileInputEl) {\n\t\t\t\tthis.fileInputEl.click()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Upload the chosen files to the host Files endpoint and refresh.\n\t\t *\n\t\t * @param {Event} event the file-input change event.\n\t\t * @return {Promise<void>} resolves when the upload settles.\n\t\t */\n\t\tasync onFileInputChange(event) {\n\t\t\tconst fileList = event?.target?.files\n\t\t\tawait this.uploadFiles(fileList)\n\t\t\tif (this.fileInputEl) {\n\t\t\t\tthis.fileInputEl.value = ''\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * POST a FileList (from the picker or a drag-and-drop) to the host Files\n\t\t * endpoint, then refresh the listing. No-op when there is nothing to upload\n\t\t * or upload is not permitted; never throws.\n\t\t *\n\t\t * @param {FileList|File[]|null} fileList the files to upload.\n\t\t * @return {Promise<void>} resolves when the upload settles.\n\t\t */\n\t\tasync uploadFiles(fileList) {\n\t\t\tif (!fileList || fileList.length === 0 || !this.canShowUpload) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst formData = new FormData()\n\t\t\tconst files = []\n\t\t\tfor (let i = 0; i < fileList.length; i++) {\n\t\t\t\tformData.append('files[]', fileList[i])\n\t\t\t\tfiles.push(fileList[i])\n\t\t\t}\n\t\t\tthis.uploads = files.map((file) => ({ name: file.name, size: Number(file.size) || 0, loaded: 0, status: 'queued', error: '' }))\n\t\t\tthis.uploading = true\n\t\t\tconst onUploadProgress = (event) => this.trackUploadProgress(event)\n\n\t\t\ttry {\n\t\t\t\tconst { default: axios } = await import('@nextcloud/axios')\n\n\t\t\t\tlet response\n\t\t\t\tif (this.objectBound) {\n\t\t\t\t\tconst objectUrl = generateUrl(\n\t\t\t\t\t\t`${this.objectApiBase}/objects/{register}/{schema}/{objectId}/filesMultipart`,\n\t\t\t\t\t\t{ register: this.register, schema: this.schemaSlug, objectId: this.objectId },\n\t\t\t\t\t)\n\t\t\t\t\tresponse = await axios.post(objectUrl, formData, { onUploadProgress })\n\t\t\t\t} else {\n\t\t\t\t\tconst url = generateUrl(\n\t\t\t\t\t\t`${this.apiBase}/api/widgets/files/{placementId}/upload`,\n\t\t\t\t\t\t{ placementId: this.placementId },\n\t\t\t\t\t)\n\t\t\t\t\tresponse = await axios.post(url, formData, {\n\t\t\t\t\t\tparams: { currentPath: this.currentSubPath },\n\t\t\t\t\t\tonUploadProgress,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tthis.settleUploads(Array.isArray(response?.data?.errors) ? response.data.errors : [])\n\t\t\t\tthis.fetchContents()\n\t\t\t} catch (err) {\n\t\t\t\tconst reason = this.uploadErrorLabel(err?.response?.data?.error)\n\t\t\t\tthis.uploads = this.uploads.map((upload) => ({ ...upload, status: 'failed', error: reason }))\n\t\t\t\tthis.fetchContents()\n\t\t\t} finally {\n\t\t\t\tthis.uploading = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Spread the batch's sent bytes over its files in upload order: the\n\t\t * files before the byte count are done sending, the one it falls in is\n\t\t * uploading, the rest are queued.\n\t\t *\n\t\t * @param {{loaded: number, total?: number}} event axios' upload progress.\n\t\t * @return {void}\n\t\t */\n\t\ttrackUploadProgress(event) {\n\t\t\tconst size = this.uploads.reduce((sum, upload) => sum + upload.size, 0)\n\t\t\tconst total = Number(event?.total) || size\n\t\t\tconst scale = total > 0 ? size / total : 0\n\t\t\tlet remaining = Number(event?.loaded || 0) * scale\n\t\t\tthis.uploads = this.uploads.map((upload) => {\n\t\t\t\tconst loaded = Math.max(0, Math.min(upload.size, remaining))\n\t\t\t\tremaining -= upload.size\n\t\t\t\tlet status = 'queued'\n\t\t\t\tif (loaded >= upload.size && upload.size > 0) {\n\t\t\t\t\tstatus = 'done'\n\t\t\t\t} else if (loaded > 0) {\n\t\t\t\t\tstatus = 'uploading'\n\t\t\t\t}\n\t\t\t\treturn { ...upload, loaded, status }\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Mark the batch finished: a file the host names in `errors`\n\t\t * (`{ name, error }`) failed with that reason, every other one arrived.\n\t\t *\n\t\t * @param {Array<{name: string, error?: string}>} errors the host's per-file errors.\n\t\t * @return {void}\n\t\t */\n\t\tsettleUploads(errors) {\n\t\t\tconst byName = new Map(errors.map((entry) => [String(entry?.name ?? ''), entry]))\n\t\t\tthis.uploads = this.uploads.map((upload) => {\n\t\t\t\tconst entry = byName.get(upload.name)\n\t\t\t\tif (entry) {\n\t\t\t\t\treturn { ...upload, status: 'failed', error: this.uploadErrorLabel(entry.error) }\n\t\t\t\t}\n\t\t\t\treturn { ...upload, loaded: upload.size, status: 'done', error: '' }\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * The reason shown for a file that did not upload, from the host's code.\n\t\t *\n\t\t * @param {string|undefined} code the error code (`insufficient_storage`, …).\n\t\t * @return {string} the localised reason.\n\t\t */\n\t\tuploadErrorLabel(code) {\n\t\t\tif (code === 'insufficient_storage') {\n\t\t\t\treturn t('nextcloud-vue', 'Not enough storage space')\n\t\t\t}\n\t\t\tif (code === 'no_access' || code === 'forbidden') {\n\t\t\t\treturn t('nextcloud-vue', 'You may not upload to this folder')\n\t\t\t}\n\t\t\tif (code === 'mime_type_not_allowed' || code === 'mime_not_allowed') {\n\t\t\t\treturn t('nextcloud-vue', 'This file type is not allowed here')\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'Upload failed')\n\t\t},\n\n\t\t/**\n\t\t * The percentage of one file sent, for its progress bar.\n\t\t *\n\t\t * @param {object} upload an entry of `uploads`.\n\t\t * @return {number} 0 to 100.\n\t\t */\n\t\tuploadPercent(upload) {\n\t\t\tif (upload.status === 'done') {\n\t\t\t\treturn 100\n\t\t\t}\n\t\t\treturn upload.size > 0 ? Math.round((upload.loaded / upload.size) * 100) : 0\n\t\t},\n\n\t\t/**\n\t\t * The status text of one file in the upload list.\n\t\t *\n\t\t * @param {object} upload an entry of `uploads`.\n\t\t * @return {string} the label.\n\t\t */\n\t\tuploadStatusLabel(upload) {\n\t\t\tif (upload.status === 'failed') {\n\t\t\t\treturn upload.error\n\t\t\t}\n\t\t\tif (upload.status === 'done') {\n\t\t\t\treturn this.uploading ? t('nextcloud-vue', 'Sent') : t('nextcloud-vue', 'Uploaded')\n\t\t\t}\n\t\t\tif (upload.status === 'uploading') {\n\t\t\t\treturn t('nextcloud-vue', 'Uploading {percent}%', { percent: this.uploadPercent(upload) })\n\t\t\t}\n\t\t\treturn t('nextcloud-vue', 'Queued')\n\t\t},\n\n\t\t/**\n\t\t * Clear a finished upload list.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tdismissUploads() {\n\t\t\tthis.uploads = []\n\t\t},\n\n\t\t/**\n\t\t * Track a drag entering the widget (depth-counted so nested elements don't\n\t\t * flicker the drop overlay).\n\t\t *\n\t\t * @param {DragEvent} event the dragenter event.\n\t\t * @return {void}\n\t\t */\n\t\tonDragEnter(event) {\n\t\t\tif (!this.canShowUpload || !this.hasFiles(event)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tevent.preventDefault()\n\t\t\tthis.dragDepth++\n\t\t\tthis.isDragging = true\n\t\t},\n\n\t\t/**\n\t\t * Keep the browser from opening the dragged file and mark the drop as a copy.\n\t\t *\n\t\t * @param {DragEvent} event the dragover event.\n\t\t * @return {void}\n\t\t */\n\t\tonDragOver(event) {\n\t\t\tif (!this.canShowUpload || !this.hasFiles(event)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tevent.preventDefault()\n\t\t\tif (event.dataTransfer) {\n\t\t\t\tevent.dataTransfer.dropEffect = 'copy'\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Track a drag leaving the widget, clearing the overlay at depth zero.\n\t\t *\n\t\t * @return {void}\n\t\t */\n\t\tonDragLeave() {\n\t\t\tif (this.dragDepth > 0) {\n\t\t\t\tthis.dragDepth--\n\t\t\t}\n\t\t\tif (this.dragDepth === 0) {\n\t\t\t\tthis.isDragging = false\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle a file drop — upload the dropped files into the current folder.\n\t\t *\n\t\t * @param {DragEvent} event the drop event.\n\t\t * @return {Promise<void>} resolves when the upload settles.\n\t\t */\n\t\tasync onDrop(event) {\n\t\t\tthis.dragDepth = 0\n\t\t\tthis.isDragging = false\n\t\t\tif (!this.canShowUpload || !this.hasFiles(event)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tevent.preventDefault()\n\t\t\tawait this.uploadFiles(event.dataTransfer?.files)\n\t\t},\n\n\t\t/**\n\t\t * Whether a drag event is carrying files (vs. text / an internal drag).\n\t\t *\n\t\t * @param {DragEvent} event the drag event.\n\t\t * @return {boolean} `true` when the payload includes files.\n\t\t */\n\t\thasFiles(event) {\n\t\t\tconst types = event?.dataTransfer?.types\n\t\t\tif (!types) {\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn Array.from(types).includes('Files')\n\t\t},\n\n\t\t/**\n\t\t * Human-format a byte count (folders render an empty size).\n\t\t *\n\t\t * @param {number} bytes the byte count.\n\t\t * @param {boolean} isFolder whether the item is a folder.\n\t\t * @return {string} the formatted size.\n\t\t */\n\t\tformatSize(bytes, isFolder) {\n\t\t\tif (isFolder) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tconst value = Number(bytes || 0)\n\t\t\tif (value === 0) {\n\t\t\t\treturn '0 B'\n\t\t\t}\n\t\t\tconst units = ['B', 'KB', 'MB', 'GB', 'TB']\n\t\t\tlet unitIndex = 0\n\t\t\tlet display = value\n\t\t\twhile (display >= 1024 && unitIndex < units.length - 1) {\n\t\t\t\tdisplay = display / 1024\n\t\t\t\tunitIndex++\n\t\t\t}\n\t\t\treturn `${display.toFixed(unitIndex === 0 ? 0 : 1)} ${units[unitIndex]}`\n\t\t},\n\t},\n}\n</script>\n\n<style scoped>\n.cn-files-widget {\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px;\n\theight: 100%;\n\toverflow: hidden;\n}\n\n.cn-files-widget--dragging {\n\toutline: 2px dashed var(--color-primary-element);\n\toutline-offset: -2px;\n\tborder-radius: var(--border-radius);\n}\n\n.cn-files-widget__dropzone {\n\tposition: absolute;\n\tinset: 0;\n\tz-index: 5;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpointer-events: none;\n\tbackground: var(--color-primary-element-light, rgba(0, 130, 201, 0.1));\n\tcolor: var(--color-primary-element);\n\tfont-weight: 600;\n\tborder-radius: var(--border-radius);\n}\n\n.cn-files-widget__toolbar {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tflex-wrap: wrap;\n}\n\n.cn-files-widget__breadcrumb {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tgap: 4px;\n\tflex: 1 1 auto;\n\tmin-width: 0;\n}\n\n.cn-files-widget__crumb {\n\tbackground: transparent;\n\tborder: none;\n\tpadding: 4px 6px;\n\tcursor: pointer;\n\tcolor: var(--color-primary-element);\n\tfont: inherit;\n}\n\n.cn-files-widget__crumb[aria-current='page'] {\n\tcolor: var(--color-main-text);\n\tcursor: default;\n}\n\n.cn-files-widget__separator {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-files-widget__search {\n\tflex: 0 1 200px;\n\tpadding: 4px 8px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-main-background);\n\tcolor: var(--color-main-text);\n}\n\n.cn-files-widget__upload {\n\tpadding: 4px 12px;\n\tborder: 1px solid var(--color-primary-element);\n\tbackground: var(--color-primary-element);\n\tcolor: var(--color-primary-element-text);\n\tborder-radius: var(--border-radius);\n\tcursor: pointer;\n}\n\n.cn-files-widget__file-input {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tpadding: 0;\n\tmargin: -1px;\n\toverflow: hidden;\n\tclip-path: inset(50%);\n\tborder: 0;\n}\n\n.cn-files-widget__state {\n\tpadding: 16px;\n\tcolor: var(--color-text-maxcontrast);\n\ttext-align: center;\n}\n\n.cn-files-widget__retry {\n\tdisplay: block;\n\tmargin: 8px auto 0;\n\tpadding: 4px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-background-hover);\n\tcursor: pointer;\n}\n\n.cn-files-widget__list {\n\tlist-style: none;\n\tmargin: 0;\n\tpadding: 0;\n\toverflow: auto;\n\tflex: 1 1 auto;\n}\n\n.cn-files-widget__row {\n\tdisplay: grid;\n\tgrid-template-columns: 1fr 140px 80px auto;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 4px 6px;\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.cn-files-widget__row-name {\n\tdisplay: flex;\n\talign-items: center;\n\tgap: 8px;\n\tbackground: transparent;\n\tborder: none;\n\tpadding: 0;\n\tcursor: pointer;\n\ttext-align: left;\n\tcolor: var(--color-main-text);\n\tfont: inherit;\n\ttext-decoration: none;\n\tmin-width: 0;\n}\n\n.cn-files-widget__row-icon {\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n\tflex: 0 0 auto;\n\twidth: 24px;\n\theight: 24px;\n}\n\n.cn-files-widget__row-thumb {\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n\tborder-radius: var(--border-radius);\n\tbackground-color: var(--color-background-dark);\n}\n\n.cn-files-widget__row-label {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-files-widget__row-modified,\n.cn-files-widget__row-size {\n\tcolor: var(--color-text-maxcontrast);\n\tfont-size: 12px;\n}\n\n.cn-files-widget__row-delete {\n\tbackground: transparent;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tpadding: 2px 8px;\n\tcursor: pointer;\n\tfont-size: 12px;\n\tcolor: var(--color-error);\n}\n\n/* Grid view (content.viewMode === 'grid'): lay the rows out as tiles. */\n.cn-files-widget__list--grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(auto-fill, minmax(120px, 1fr));\n\tgap: 8px;\n\tpadding: 4px;\n\talign-content: start;\n}\n\n.cn-files-widget__list--grid .cn-files-widget__row {\n\tgrid-template-columns: 1fr;\n\tjustify-items: center;\n\ttext-align: center;\n\tgap: 4px;\n\tpadding: 10px 6px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n}\n\n.cn-files-widget__list--grid .cn-files-widget__row-name {\n\tflex-direction: column;\n\talign-items: center;\n\tmax-width: 100%;\n}\n\n.cn-files-widget__list--grid .cn-files-widget__row-label {\n\tmax-width: 100%;\n}\n\n.cn-files-widget__list--grid .cn-files-widget__row-icon {\n\tfont-size: 32px;\n\twidth: 56px;\n\theight: 56px;\n}\n\n/* Keep tiles compact — the modified date is list-view detail. */\n.cn-files-widget__list--grid .cn-files-widget__row-modified {\n\tdisplay: none;\n}\n\n.cn-files-widget__uploads,\n.cn-files-widget__notice {\n\tmargin: 4px 0 8px;\n\tpadding: 8px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tfont-size: 13px;\n}\n\n.cn-files-widget__notice {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tgap: 8px;\n\tborder-color: var(--color-error);\n}\n\n.cn-files-widget__uploads-total {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tgap: 8px;\n\tmargin: 0 0 4px;\n\tfont-weight: 600;\n}\n\n.cn-files-widget__uploads-list {\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n}\n\n.cn-files-widget__progress-item {\n\tdisplay: grid;\n\tgrid-template-columns: minmax(0, 1fr) 80px auto;\n\talign-items: center;\n\tgap: 8px;\n\tpadding: 2px 0;\n}\n\n.cn-files-widget__upload-name {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.cn-files-widget__upload-progress {\n\tdisplay: block;\n\theight: 6px;\n\toverflow: hidden;\n\tborder-radius: 3px;\n\tbackground: var(--color-background-dark);\n}\n\n.cn-files-widget__upload-bar {\n\tdisplay: block;\n\theight: 100%;\n\tbackground: var(--color-primary-element);\n}\n\n.cn-files-widget__progress-item--failed .cn-files-widget__upload-status {\n\tcolor: var(--color-error-text, var(--color-error));\n}\n\n.cn-files-widget__upload-status {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.cn-files-widget__notice-dismiss {\n\tpadding: 0;\n\tborder: none;\n\tbackground: transparent;\n\tcolor: inherit;\n\tfont: inherit;\n\tfont-weight: normal;\n\ttext-decoration: underline;\n\tcursor: pointer;\n}\n\n.cn-files-widget__pagination {\n\ttext-align: center;\n\tpadding: 8px 0;\n}\n\n.cn-files-widget__more {\n\tpadding: 4px 12px;\n\tborder: 1px solid var(--color-border);\n\tborder-radius: var(--border-radius);\n\tbackground: var(--color-background-hover);\n\tcursor: pointer;\n}\n\n</style>\n"],"names":["CnFilePreview","CnFilesWidgetDeleteDialog","t","n"],"mappings":";;;;;;;AAmPA;AACC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAED,aAAe;AACd,CAAA,IAAI,EAAE,eAAe;;CAErB,UAAU,EAAE;iBACXA,YAAa;6BACbC,UAAyB;EACzB;;AAED,CAAA,KAAK,EAAE;AACN;;;AAGC;;AAED,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,OAAO,EAAE,CAAC;GACnB;;;EAGD,SAAS,EAAE;GACV,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,OAAO,EAAE,CAAC;GACnB;;AAED;AACA,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;AAED;AACA,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,OAAO;GACb,OAAO,EAAE,KAAK;GACd;;AAED;AACC;AACA;;;AAGA;;;AAGD,EAAA,OAAO,EAAE;GACR,IAAI,EAAE,MAAM;AACZ,GAAA,OAAO,EAAE,aAAa;GACtB;;AAED;;;AAGC;AACA;;AAEA;;AAEA;;;AAGD,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE,MAAM;GACZ,OAAO,EAAE,EAAE;GACX;;AAED;;AAEC;AACA;;;AAGD,EAAA,QAAQ,EAAE;GACT,IAAI,EAAE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;AACR,GAAA;GACA,MAAM,KAAI,GAAI,MAAM,CAAC,KAAI,IAAK,CAAC;GAC/B,IAAI,KAAI,KAAM,CAAC,EAAE;AAChB,IAAA,OAAO;AACR,GAAA;AACA,GAAA,MAAM,KAAI,GAAI,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;GAC1C,IAAI,SAAQ,GAAI;AAChB,GAAA,IAAI,OAAM,GAAI;GACd,OAAO,OAAM,IAAK,IAAG,IAAK,YAAY,KAAK,CAAC,MAAK,GAAI,CAAC,EAAE;AACvD,IAAA,UAAU,UAAU;IACpB,SAAS;AACV,GAAA;AACA,GAAA,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,SAAQ,KAAM,CAAA,GAAI,CAAA,GAAI,CAAC,CAAC,CAAA,CAAE,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;EACxE,CAAC;EACD;AACF;;"}
@@ -1,4 +1,4 @@
1
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, withDirectives, vModelText, createTextVNode, createBlock, resolveDynamicComponent, withCtx, createVNode } from 'vue';
1
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, withDirectives, vModelText, createTextVNode, normalizeStyle, createBlock, resolveDynamicComponent, withCtx, createVNode } from 'vue';
2
2
 
3
3
  const _hoisted_1 = { class: "cn-files-widget__toolbar" };
4
4
  const _hoisted_2 = ["aria-label"];
@@ -12,43 +12,58 @@ const _hoisted_6 = {
12
12
  };
13
13
  const _hoisted_7 = {
14
14
  key: 1,
15
- class: "cn-files-widget__state"
15
+ class: "cn-files-widget__uploads",
16
+ role: "status"
16
17
  };
17
- const _hoisted_8 = {
18
+ const _hoisted_8 = { class: "cn-files-widget__uploads-total" };
19
+ const _hoisted_9 = { class: "cn-files-widget__uploads-list" };
20
+ const _hoisted_10 = { class: "cn-files-widget__upload-name" };
21
+ const _hoisted_11 = ["aria-label", "aria-valuenow"];
22
+ const _hoisted_12 = { class: "cn-files-widget__upload-status" };
23
+ const _hoisted_13 = {
18
24
  key: 2,
19
- class: "cn-files-widget__state cn-files-widget__state--unavailable"
25
+ class: "cn-files-widget__notice",
26
+ role: "alert"
20
27
  };
21
- const _hoisted_9 = {
28
+ const _hoisted_14 = {
22
29
  key: 3,
23
- class: "cn-files-widget__state cn-files-widget__state--no-access"
30
+ class: "cn-files-widget__state"
24
31
  };
25
- const _hoisted_10 = {
32
+ const _hoisted_15 = {
26
33
  key: 4,
27
- class: "cn-files-widget__state cn-files-widget__state--not-found"
34
+ class: "cn-files-widget__state cn-files-widget__state--unavailable"
28
35
  };
29
- const _hoisted_11 = {
36
+ const _hoisted_16 = {
30
37
  key: 5,
31
- class: "cn-files-widget__state cn-files-widget__state--error"
38
+ class: "cn-files-widget__state cn-files-widget__state--no-access"
32
39
  };
33
- const _hoisted_12 = {
40
+ const _hoisted_17 = {
34
41
  key: 6,
35
- class: "cn-files-widget__state cn-files-widget__state--empty"
42
+ class: "cn-files-widget__state cn-files-widget__state--not-found"
36
43
  };
37
- const _hoisted_13 = {
44
+ const _hoisted_18 = {
38
45
  key: 7,
46
+ class: "cn-files-widget__state cn-files-widget__state--error"
47
+ };
48
+ const _hoisted_19 = {
49
+ key: 8,
39
50
  class: "cn-files-widget__state cn-files-widget__state--empty"
40
51
  };
41
- const _hoisted_14 = {
52
+ const _hoisted_20 = {
53
+ key: 9,
54
+ class: "cn-files-widget__state cn-files-widget__state--empty"
55
+ };
56
+ const _hoisted_21 = {
42
57
  "aria-hidden": "true",
43
58
  class: "cn-files-widget__row-icon"
44
59
  };
45
- const _hoisted_15 = ["src", "onError"];
46
- const _hoisted_16 = { class: "cn-files-widget__row-label" };
47
- const _hoisted_17 = { class: "cn-files-widget__row-modified" };
48
- const _hoisted_18 = { class: "cn-files-widget__row-size" };
49
- const _hoisted_19 = ["aria-label", "onClick"];
50
- const _hoisted_20 = {
51
- key: 9,
60
+ const _hoisted_22 = ["src", "onError"];
61
+ const _hoisted_23 = { class: "cn-files-widget__row-label" };
62
+ const _hoisted_24 = { class: "cn-files-widget__row-modified" };
63
+ const _hoisted_25 = { class: "cn-files-widget__row-size" };
64
+ const _hoisted_26 = ["aria-label", "onClick"];
65
+ const _hoisted_27 = {
66
+ key: 11,
52
67
  class: "cn-files-widget__pagination"
53
68
  };
54
69
 
@@ -58,10 +73,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
58
73
 
59
74
  return (openBlock(), createElementBlock("div", {
60
75
  class: normalizeClass(["cn-files-widget", { 'cn-files-widget--dragging': $data.isDragging }]),
61
- onDragenter: _cache[7] || (_cache[7] = (...args) => ($options.onDragEnter && $options.onDragEnter(...args))),
62
- onDragover: _cache[8] || (_cache[8] = (...args) => ($options.onDragOver && $options.onDragOver(...args))),
63
- onDragleave: _cache[9] || (_cache[9] = (...args) => ($options.onDragLeave && $options.onDragLeave(...args))),
64
- onDrop: _cache[10] || (_cache[10] = (...args) => ($options.onDrop && $options.onDrop(...args)))
76
+ onDragenter: _cache[9] || (_cache[9] = (...args) => ($options.onDragEnter && $options.onDragEnter(...args))),
77
+ onDragover: _cache[10] || (_cache[10] = (...args) => ($options.onDragOver && $options.onDragOver(...args))),
78
+ onDragleave: _cache[11] || (_cache[11] = (...args) => ($options.onDragLeave && $options.onDragLeave(...args))),
79
+ onDrop: _cache[12] || (_cache[12] = (...args) => ($options.onDrop && $options.onDrop(...args)))
65
80
  }, [
66
81
  createElementVNode("div", _hoisted_1, [
67
82
  (!$options.objectBound)
@@ -78,7 +93,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
78
93
  }, toDisplayString($options.t('nextcloud-vue', 'Root')), 9 /* TEXT, PROPS */, _hoisted_3),
79
94
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.pathSegments, (segment, index) => {
80
95
  return (openBlock(), createElementBlock(Fragment, { key: index }, [
81
- _cache[11] || (_cache[11] = createElementVNode("span", {
96
+ _cache[13] || (_cache[13] = createElementVNode("span", {
82
97
  "aria-hidden": "true",
83
98
  class: "cn-files-widget__separator"
84
99
  }, "/", -1 /* CACHED */)),
@@ -122,29 +137,78 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
122
137
  ($data.isDragging && $options.canShowUpload)
123
138
  ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString($options.t('nextcloud-vue', 'Drop files to upload')), 1 /* TEXT */))
124
139
  : createCommentVNode("v-if", true),
140
+ ($data.uploads.length > 0)
141
+ ? (openBlock(), createElementBlock("div", _hoisted_7, [
142
+ createElementVNode("p", _hoisted_8, [
143
+ createTextVNode(toDisplayString($options.uploadTotalLabel) + " ", 1 /* TEXT */),
144
+ (!$data.uploading)
145
+ ? (openBlock(), createElementBlock("button", {
146
+ key: 0,
147
+ type: "button",
148
+ class: "cn-files-widget__notice-dismiss",
149
+ onClick: _cache[4] || (_cache[4] = (...args) => ($options.dismissUploads && $options.dismissUploads(...args)))
150
+ }, toDisplayString($options.t('nextcloud-vue', 'Dismiss')), 1 /* TEXT */))
151
+ : createCommentVNode("v-if", true)
152
+ ]),
153
+ createElementVNode("ul", _hoisted_9, [
154
+ (openBlock(true), createElementBlock(Fragment, null, renderList($data.uploads, (upload, index) => {
155
+ return (openBlock(), createElementBlock("li", {
156
+ key: index,
157
+ class: normalizeClass(["cn-files-widget__progress-item", 'cn-files-widget__progress-item--' + upload.status])
158
+ }, [
159
+ createElementVNode("span", _hoisted_10, toDisplayString(upload.name), 1 /* TEXT */),
160
+ createElementVNode("span", {
161
+ class: "cn-files-widget__upload-progress",
162
+ role: "progressbar",
163
+ "aria-label": upload.name,
164
+ "aria-valuemin": "0",
165
+ "aria-valuemax": "100",
166
+ "aria-valuenow": $options.uploadPercent(upload)
167
+ }, [
168
+ createElementVNode("span", {
169
+ class: "cn-files-widget__upload-bar",
170
+ style: normalizeStyle({ width: $options.uploadPercent(upload) + '%' })
171
+ }, null, 4 /* STYLE */)
172
+ ], 8 /* PROPS */, _hoisted_11),
173
+ createElementVNode("span", _hoisted_12, toDisplayString($options.uploadStatusLabel(upload)), 1 /* TEXT */)
174
+ ], 2 /* CLASS */))
175
+ }), 128 /* KEYED_FRAGMENT */))
176
+ ])
177
+ ]))
178
+ : createCommentVNode("v-if", true),
179
+ ($data.deleteNotice)
180
+ ? (openBlock(), createElementBlock("div", _hoisted_13, [
181
+ createElementVNode("span", null, toDisplayString($data.deleteNotice), 1 /* TEXT */),
182
+ createElementVNode("button", {
183
+ type: "button",
184
+ class: "cn-files-widget__notice-dismiss",
185
+ onClick: _cache[5] || (_cache[5] = $event => ($data.deleteNotice = null))
186
+ }, toDisplayString($options.t('nextcloud-vue', 'Dismiss')), 1 /* TEXT */)
187
+ ]))
188
+ : createCommentVNode("v-if", true),
125
189
  ($data.loading)
126
- ? (openBlock(), createElementBlock("div", _hoisted_7, toDisplayString($options.t('nextcloud-vue', 'Loading folder…')), 1 /* TEXT */))
190
+ ? (openBlock(), createElementBlock("div", _hoisted_14, toDisplayString($options.t('nextcloud-vue', 'Loading folder…')), 1 /* TEXT */))
127
191
  : ($data.unavailable)
128
- ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString($options.t('nextcloud-vue', 'Files is not available')), 1 /* TEXT */))
192
+ ? (openBlock(), createElementBlock("div", _hoisted_15, toDisplayString($options.t('nextcloud-vue', 'Files is not available')), 1 /* TEXT */))
129
193
  : ($data.errorCode === 'no_access')
130
- ? (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString($options.t('nextcloud-vue', 'You don\'t have access to this folder.')), 1 /* TEXT */))
194
+ ? (openBlock(), createElementBlock("div", _hoisted_16, toDisplayString($options.t('nextcloud-vue', 'You don\'t have access to this folder.')), 1 /* TEXT */))
131
195
  : ($data.errorCode === 'folder_not_found')
132
- ? (openBlock(), createElementBlock("div", _hoisted_10, toDisplayString($options.t('nextcloud-vue', 'Folder no longer exists.')), 1 /* TEXT */))
196
+ ? (openBlock(), createElementBlock("div", _hoisted_17, toDisplayString($options.t('nextcloud-vue', 'Folder no longer exists.')), 1 /* TEXT */))
133
197
  : ($data.errorCode)
134
- ? (openBlock(), createElementBlock("div", _hoisted_11, [
198
+ ? (openBlock(), createElementBlock("div", _hoisted_18, [
135
199
  createTextVNode(toDisplayString($options.t('nextcloud-vue', 'Failed to load folder contents.')) + " ", 1 /* TEXT */),
136
200
  createElementVNode("button", {
137
201
  type: "button",
138
202
  class: "cn-files-widget__retry",
139
- onClick: _cache[4] || (_cache[4] = (...args) => ($options.fetchContents && $options.fetchContents(...args)))
203
+ onClick: _cache[6] || (_cache[6] = (...args) => ($options.fetchContents && $options.fetchContents(...args)))
140
204
  }, toDisplayString($options.t('nextcloud-vue', 'Retry')), 1 /* TEXT */)
141
205
  ]))
142
206
  : ($options.filteredItems.length === 0 && !$data.searchQuery)
143
- ? (openBlock(), createElementBlock("div", _hoisted_12, toDisplayString($options.t('nextcloud-vue', 'This folder is empty.')), 1 /* TEXT */))
207
+ ? (openBlock(), createElementBlock("div", _hoisted_19, toDisplayString($options.t('nextcloud-vue', 'This folder is empty.')), 1 /* TEXT */))
144
208
  : ($options.filteredItems.length === 0 && $data.searchQuery)
145
- ? (openBlock(), createElementBlock("div", _hoisted_13, toDisplayString($options.noSearchResultsLabel), 1 /* TEXT */))
209
+ ? (openBlock(), createElementBlock("div", _hoisted_20, toDisplayString($options.noSearchResultsLabel), 1 /* TEXT */))
146
210
  : (openBlock(), createElementBlock("ul", {
147
- key: 8,
211
+ key: 10,
148
212
  class: normalizeClass(["cn-files-widget__list", { 'cn-files-widget__list--grid': $options.viewMode === 'grid' }])
149
213
  }, [
150
214
  (openBlock(true), createElementBlock(Fragment, null, renderList($options.filteredItems, (item) => {
@@ -161,7 +225,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
161
225
  onClick: $event => ($options.onRowClick(item, $event))
162
226
  }, {
163
227
  default: withCtx(() => [
164
- createElementVNode("span", _hoisted_14, [
228
+ createElementVNode("span", _hoisted_21, [
165
229
  ($options.showThumbnails && !item.isFolder && item.thumbnailUrl && !$data.failedThumbs[item.fileId])
166
230
  ? (openBlock(), createElementBlock("img", {
167
231
  key: 0,
@@ -170,17 +234,17 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
170
234
  class: "cn-files-widget__row-thumb",
171
235
  loading: "lazy",
172
236
  onError: $event => ($options.onThumbError(item))
173
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_15))
237
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_22))
174
238
  : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
175
239
  createTextVNode(toDisplayString(item.isFolder ? '📁' : '📄'), 1 /* TEXT */)
176
240
  ], 64 /* STABLE_FRAGMENT */))
177
241
  ]),
178
- createElementVNode("span", _hoisted_16, toDisplayString(item.name), 1 /* TEXT */)
242
+ createElementVNode("span", _hoisted_23, toDisplayString(item.name), 1 /* TEXT */)
179
243
  ]),
180
244
  _: 2 /* DYNAMIC */
181
245
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["type", "href", "target", "rel", "onClick"])),
182
- createElementVNode("span", _hoisted_17, toDisplayString(item.modifiedAt), 1 /* TEXT */),
183
- createElementVNode("span", _hoisted_18, toDisplayString($options.formatSize(item.size, item.isFolder)), 1 /* TEXT */),
246
+ createElementVNode("span", _hoisted_24, toDisplayString(item.modifiedAt), 1 /* TEXT */),
247
+ createElementVNode("span", _hoisted_25, toDisplayString($options.formatSize(item.size, item.isFolder)), 1 /* TEXT */),
184
248
  ($options.canDeleteItem(item))
185
249
  ? (openBlock(), createElementBlock("button", {
186
250
  key: 0,
@@ -188,25 +252,25 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
188
252
  class: "cn-files-widget__row-delete",
189
253
  "aria-label": $options.t('nextcloud-vue', 'Delete {name}', { name: item.name }),
190
254
  onClick: $event => ($options.confirmDelete(item))
191
- }, toDisplayString($options.t('nextcloud-vue', 'Delete')), 9 /* TEXT, PROPS */, _hoisted_19))
255
+ }, toDisplayString($options.t('nextcloud-vue', 'Delete')), 9 /* TEXT, PROPS */, _hoisted_26))
192
256
  : createCommentVNode("v-if", true)
193
257
  ], 2 /* CLASS */))
194
258
  }), 128 /* KEYED_FRAGMENT */))
195
259
  ], 2 /* CLASS */)),
196
260
  ($data.nextCursor)
197
- ? (openBlock(), createElementBlock("div", _hoisted_20, [
261
+ ? (openBlock(), createElementBlock("div", _hoisted_27, [
198
262
  createElementVNode("button", {
199
263
  type: "button",
200
264
  class: "cn-files-widget__more",
201
- onClick: _cache[5] || (_cache[5] = (...args) => ($options.loadMore && $options.loadMore(...args)))
265
+ onClick: _cache[7] || (_cache[7] = (...args) => ($options.loadMore && $options.loadMore(...args)))
202
266
  }, toDisplayString($options.t('nextcloud-vue', 'Load more')), 1 /* TEXT */)
203
267
  ]))
204
268
  : createCommentVNode("v-if", true),
205
269
  ($data.previewFile)
206
270
  ? (openBlock(), createBlock(_component_CnFilePreview, {
207
- key: 10,
271
+ key: 12,
208
272
  file: $data.previewFile,
209
- onClose: _cache[6] || (_cache[6] = $event => ($data.previewFile = null))
273
+ onClose: _cache[8] || (_cache[8] = $event => ($data.previewFile = null))
210
274
  }, null, 8 /* PROPS */, ["file"]))
211
275
  : createCommentVNode("v-if", true),
212
276
  createVNode(_component_CnFilesWidgetDeleteDialog, {