mirror of
https://github.com/nextcloud/server.git
synced 2026-10-27 14:16:42 +01:00
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1 line
38 KiB
Plaintext
1 line
38 KiB
Plaintext
{"version":3,"file":"setup-HgSWUfgd.chunk.mjs","sources":["../build/frontend/apps/files/src/sidebar/sharedState.ts","../build/frontend/apps/files/src/sidebar/provider.ts","../build/frontend/apps/files/src/store/sidebar.ts","../build/frontend/apps/files/src/components/FilesSidebar/FilesSidebarSubname.vue","../build/frontend/apps/files/src/components/FilesSidebar/FilesSidebarTab.vue","../build/frontend/apps/files/src/composables/usePreviewImage.ts","../build/frontend/apps/files/src/views/FilesSidebar.vue","../build/frontend/apps/files/src/sidebar/mount.ts","../build/frontend/apps/files/src/sidebar/providers/standalone.ts","../build/frontend/apps/files/src/sidebar/setup.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { App, ShallowRef } from 'vue'\nimport type { ISidebarDataProvider } from './types.ts'\n\nimport { shallowRef } from 'vue'\n\n/**\n * The sidebar state that must be a singleton for the whole page.\n *\n * The `files-main` and `files-sidebar` entry points both contain the sidebar code,\n * so the state is kept on the `OCA.Files.Sidebar` namespace to share it between them.\n */\nexport interface SidebarSharedState {\n\t/** The registered data provider backing the sidebar. */\n\tdataProvider: ShallowRef<ISidebarDataProvider | undefined>\n\n\t/** The data provider used on pages where no app provides the sidebar data. */\n\tstandaloneProvider?: ISidebarDataProvider\n\n\t/** The rendered sidebar, if it is currently mounted. */\n\tinstance?: {\n\t\tapp: App\n\t\tmountpoint: HTMLElement\n\t}\n}\n\n/**\n * Get the sidebar state shared by all entry points of the current page.\n */\nexport function getSidebarSharedState(): SidebarSharedState {\n\twindow.OCA.Files ??= {}\n\twindow.OCA.Files.Sidebar ??= {}\n\twindow.OCA.Files.Sidebar._sharedState ??= {\n\t\tdataProvider: shallowRef<ISidebarDataProvider>(),\n\t}\n\n\treturn window.OCA.Files.Sidebar._sharedState\n}\n","/*!\n * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { ISidebarDataProvider } from './types.ts'\n\nimport { logger } from '../utils/logger.ts'\nimport { getSidebarSharedState } from './sharedState.ts'\n\n/**\n * Register the data provider backing the sidebar.\n * The app that renders the sidebar owns the provider, so only one can be registered.\n *\n * @param newProvider - The provider to register\n * @throws {Error} If a data provider is already registered\n */\nexport function setSidebarDataProvider(newProvider: ISidebarDataProvider): void {\n\tconst { dataProvider } = getSidebarSharedState()\n\tif (dataProvider.value !== undefined) {\n\t\tthrow new Error('A sidebar data provider is already registered.')\n\t}\n\n\tlogger.debug('sidebar: data provider registered')\n\tdataProvider.value = newProvider\n}\n\n/**\n * Get the registered sidebar data provider, if any.\n */\nexport function getSidebarDataProvider(): ISidebarDataProvider | undefined {\n\treturn getSidebarSharedState().dataProvider.value\n}\n\n/**\n * Whether a sidebar data provider is registered.\n */\nexport function hasSidebarDataProvider(): boolean {\n\treturn getSidebarDataProvider() !== undefined\n}\n\n/**\n * Unregister the current data provider.\n *\n * @internal\n */\nexport function resetSidebarDataProvider(): void {\n\tgetSidebarSharedState().dataProvider.value = undefined\n}\n","/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { INode, ISidebarAction, ISidebarContext, ISidebarTab } from '@nextcloud/files'\n\nimport { subscribe } from '@nextcloud/event-bus'\nimport { getSidebarActions, getSidebarTabs } from '@nextcloud/files'\nimport { defineStore } from 'pinia'\nimport { computed, readonly, ref, watch } from 'vue'\nimport { getSidebarDataProvider } from '../sidebar/provider.ts'\nimport { logger } from '../utils/logger.ts'\n\nexport const useSidebarStore = defineStore('sidebar', () => {\n\tconst activeTab = ref<string>()\n\tconst isOpen = ref(false)\n\tconst isFullScreen = ref(false)\n\n\tconst currentNode = computed(() => isOpen.value ? getSidebarDataProvider()?.node.value : undefined)\n\tconst hasContext = computed(() => currentNode.value !== undefined)\n\tconst currentContext = computed<ISidebarContext | undefined>(() => {\n\t\tif (!currentNode.value) {\n\t\t\treturn undefined\n\t\t}\n\n\t\tconst provider = getSidebarDataProvider()\n\t\treturn {\n\t\t\tnode: currentNode.value,\n\t\t\tfolder: provider?.folder.value,\n\t\t\tview: provider?.view.value,\n\t\t}\n\t})\n\n\tconst currentActions = computed(() => currentContext.value ? getActions(currentContext.value) : [])\n\tconst currentTabs = computed(() => currentContext.value ? getTabs(currentContext.value) : [])\n\n\t/**\n\t * Open the sidebar for a given node and optional tab ID.\n\t *\n\t * @param node - The node to display in the sidebar.\n\t * @param tabId - Optional ID of the tab to activate.\n\t * @throws {Error} If the sidebar is not available on the current page.\n\t */\n\tfunction open(node: INode, tabId?: string) {\n\t\tconst provider = getSidebarDataProvider()\n\t\tif (!provider) {\n\t\t\tthrow new Error('Cannot open the sidebar because it is not available on this page.')\n\t\t}\n\n\t\tif (isOpen.value && currentNode.value?.source === node.source) {\n\t\t\tlogger.debug('sidebar: already open for current node')\n\t\t\tif (tabId) {\n\t\t\t\tlogger.debug('sidebar: already open for current node - switching tab', { tabId })\n\t\t\t\tsetActiveTab(tabId)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tprovider.setNode(node)\n\t\tsetInitialTab(node, tabId)\n\t\tlogger.debug(`sidebar: opening for ${node.displayname}`, { node })\n\t\tisOpen.value = true\n\t}\n\n\t/**\n\t * Close the sidebar.\n\t */\n\tfunction close() {\n\t\tisOpen.value = false\n\t}\n\n\t/**\n\t * Get the available tabs for the sidebar.\n\t * If a context is provided, only tabs enabled for that context are returned.\n\t *\n\t * @param context - Optional context to filter the available tabs.\n\t */\n\tfunction getTabs(context?: ISidebarContext) {\n\t\tlet tabs = getSidebarTabs()\n\t\tif (context) {\n\t\t\ttabs = tabs.filter((tab) => isEnabled(tab, context))\n\t\t}\n\t\treturn tabs.sort((a, b) => a.order - b.order)\n\t}\n\n\t/**\n\t * Get the available actions for the sidebar.\n\t * If a context is provided, only actions enabled for that context are returned.\n\t *\n\t * @param context - Optional context to filter the available actions.\n\t */\n\tfunction getActions(context?: ISidebarContext) {\n\t\tlet actions = getSidebarActions()\n\t\tif (context) {\n\t\t\tactions = actions.filter((action) => isEnabled(action, context))\n\t\t}\n\t\treturn actions.sort((a, b) => a.order - b.order)\n\t}\n\n\t/**\n\t * Check whether a registered tab or action is enabled for a context.\n\t * Entries which cannot handle the context are skipped,\n\t * as the folder and the view of the context are only set within the files app\n\t * while entries registered by other apps might expect both to be set.\n\t *\n\t * @param entry - The registered tab or action.\n\t * @param context - The context to check the entry for.\n\t */\n\tfunction isEnabled(entry: ISidebarTab | ISidebarAction, context: ISidebarContext): boolean {\n\t\tif (entry.enabled === undefined) {\n\t\t\treturn true\n\t\t}\n\n\t\ttry {\n\t\t\treturn entry.enabled(context)\n\t\t} catch (error) {\n\t\t\tlogger.error(`sidebar: '${entry.id}' could not be checked for the current context`, { error, entry })\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Set the active tab in the sidebar.\n\t *\n\t * @param tabId - The ID of the tab to activate.\n\t */\n\tfunction setActiveTab(tabId: string) {\n\t\tif (!currentTabs.value.find(({ id }) => id === tabId)) {\n\t\t\tthrow new Error(`Cannot set sidebar tab '${tabId}' because it is not available for the current context.`)\n\t\t}\n\t\tactiveTab.value = tabId\n\t}\n\n\t/**\n\t * Render the sidebar as a fullscreen overlay of the current page.\n\t * Only meant for apps embedding the sidebar into their own app.\n\t *\n\t * @param fullScreen - Whether to render the sidebar fullscreen.\n\t */\n\tfunction setFullScreenMode(fullScreen: boolean) {\n\t\tisFullScreen.value = fullScreen\n\t}\n\n\t/**\n\t * Set the tab to show when the sidebar is opened for a node.\n\t * Falls back to the first available tab if the requested one is not available.\n\t *\n\t * @param node - The node the sidebar was opened for.\n\t * @param tabId - Optional ID of the requested tab.\n\t */\n\tfunction setInitialTab(node: INode, tabId?: string) {\n\t\tconst provider = getSidebarDataProvider()\n\t\tconst tabs = getTabs({\n\t\t\tnode,\n\t\t\tfolder: provider?.folder.value,\n\t\t\tview: provider?.view.value,\n\t\t})\n\n\t\tif (tabId && !tabs.find(({ id }) => id === tabId)) {\n\t\t\tlogger.warn(`sidebar: cannot open tab '${tabId}' because it is not available for the current context.`)\n\t\t\tactiveTab.value = tabs[0]?.id\n\t\t\treturn\n\t\t}\n\n\t\tactiveTab.value = tabId ?? tabs[0]?.id\n\t}\n\n\t// update the current node if updated\n\tsubscribe('files:node:updated', (node: INode) => {\n\t\tif (node.source === currentNode.value?.source) {\n\t\t\tgetSidebarDataProvider()?.setNode(node)\n\t\t}\n\t})\n\n\t// close the sidebar if the current node is deleted\n\tsubscribe('files:node:deleted', (node) => {\n\t\tif (node.id === currentNode.value?.id) {\n\t\t\tclose()\n\t\t}\n\t})\n\n\t// let the current app synchronize its own state, like the current URL\n\twatch(isOpen, (isOpen) => {\n\t\tgetSidebarDataProvider()?.onOpenStateChanged?.(isOpen)\n\t})\n\n\treturn {\n\t\tactiveTab,\n\t\tcurrentActions,\n\t\tcurrentContext,\n\t\tcurrentNode,\n\t\tcurrentTabs,\n\t\thasContext,\n\t\tisFullScreen: readonly(isFullScreen),\n\t\tisOpen: readonly(isOpen),\n\t\t/** Alias of `currentNode` as expected by the `ISidebar` interface of `@nextcloud/files` */\n\t\tnode: currentNode,\n\n\t\topen,\n\t\tclose,\n\t\tgetActions,\n\t\tgetTabs,\n\t\tsetActiveTab,\n\t\tsetFullScreenMode,\n\t}\n})\n","<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { INode } from '@nextcloud/files'\n\nimport { mdiStar } from '@mdi/js'\nimport { formatFileSize } from '@nextcloud/files'\nimport { t } from '@nextcloud/l10n'\nimport { computed } from 'vue'\nimport NcDateTime from '@nextcloud/vue/components/NcDateTime'\nimport NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper'\nimport NcUserBubble from '@nextcloud/vue/components/NcUserBubble'\n\nconst props = defineProps<{ node: INode }>()\n\nconst isFavourited = computed(() => props.node.attributes.favorite === 1)\nconst size = computed(() => formatFileSize(props.node.size ?? 0))\n</script>\n\n<template>\n\t<div :class=\"$style.filesSidebarSubname\">\n\t\t<NcIconSvgWrapper\n\t\t\tv-if=\"isFavourited\"\n\t\t\tinline\n\t\t\t:path=\"mdiStar\"\n\t\t\t:name=\"t('files', 'Favorite')\" />\n\n\t\t<span>{{ size }}</span>\n\n\t\t<span v-if=\"node.mtime\">\n\t\t\t<span :class=\"$style.filesSidebarSubname__separator\">•</span>\n\t\t\t<NcDateTime :timestamp=\"node.mtime\" />\n\t\t</span>\n\n\t\t<template v-if=\"node.owner\">\n\t\t\t<span :class=\"$style.filesSidebarSubname__separator\">•</span>\n\t\t\t<NcUserBubble\n\t\t\t\t:class=\"$style.filesSidebarSubname__userBubble\"\n\t\t\t\t:title=\"t('files', 'Owner')\"\n\t\t\t\t:user=\"node.owner\"\n\t\t\t\t:displayName=\"node.attributes['owner-display-name']\" />\n\t\t</template>\n\t</div>\n</template>\n\n<style module>\n.filesSidebarSubname {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-wrap: wrap;\n\tgap: 0 8px;\n}\n\n.filesSidebarSubname__separator {\n\tdisplay: inline-block;\n\tfont-weight: bold !important;\n}\n\n.filesSidebarSubname__userBubble {\n\tdisplay: inline-flex !important;\n}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { ISidebarTab } from '@nextcloud/files'\n\nimport { NcIconSvgWrapper, NcLoadingIcon } from '@nextcloud/vue'\nimport { computed, ref, toRaw, toRef, watch } from 'vue'\nimport NcAppSidebarTab from '@nextcloud/vue/components/NcAppSidebarTab'\nimport NcEmptyContent from '@nextcloud/vue/components/NcEmptyContent'\nimport { useSidebarStore } from '../../store/sidebar.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst props = defineProps<{\n\t/**\n\t * If this is the currently active tab\n\t */\n\tactive: boolean\n\n\t/**\n\t * The sidebar tab definition.\n\t */\n\ttab: ISidebarTab\n}>()\n\nconst sidebar = useSidebarStore()\n\nconst context = computed(() => {\n\tif (!sidebar.currentContext) {\n\t\treturn undefined\n\t}\n\t// The store hands out reactive proxies, which the native structuredClone\n\t// used by clone() rejects, so the raw nodes are cloned.\n\tconst { folder, node, view } = sidebar.currentContext\n\treturn {\n\t\tfolder: folder ? toRaw(folder).clone() : undefined,\n\t\tnode: toRaw(node).clone(),\n\t\tview,\n\t}\n})\n\nconst loading = ref(true)\nwatch(toRef(props, 'active'), async (active) => {\n\tif (!active) {\n\t\treturn\n\t}\n\n\tlogger.debug('sidebar: activating files sidebar tab ' + props.tab.id, { tab: props.tab })\n\tloading.value = true\n\ttry {\n\t\tif (!initializedTabs.has(props.tab.tagName)) {\n\t\t\tinitializedTabs.add(props.tab.tagName)\n\t\t\tlogger.debug('sidebar: initializing ' + props.tab.id)\n\t\t\tawait props.tab.onInit?.()\n\t\t}\n\t\tlogger.debug('sidebar: waiting for sidebar tab component becoming defined ' + props.tab.id)\n\t\tawait window.customElements.whenDefined(props.tab.tagName)\n\t\tlogger.debug('sidebar: tab component defined and loaded ' + props.tab.id)\n\t\tloading.value = false\n\t} catch (error) {\n\t\tlogger.error('Failed to get sidebar tab web component', { error })\n\t}\n}, { immediate: true })\n</script>\n\n<script lang=\"ts\">\nconst initializedTabs = new Set<string>()\n</script>\n\n<template>\n\t<NcAppSidebarTab\n\t\t:id=\"tab.id\"\n\t\t:order=\"tab.order\"\n\t\t:name=\"tab.displayName\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"tab.iconSvgInline\" />\n\t\t</template>\n\t\t<NcEmptyContent v-if=\"loading || !context\">\n\t\t\t<template #icon>\n\t\t\t\t<NcLoadingIcon />\n\t\t\t</template>\n\t\t</NcEmptyContent>\n\n\t\t<component\n\t\t\t:is=\"tab.tagName\"\n\t\t\tv-else\n\t\t\t:active.prop=\"active\"\n\t\t\t:node.prop=\"context.node\"\n\t\t\t:folder.prop=\"context.folder\"\n\t\t\t:view.prop=\"context.view\" />\n\t</NcAppSidebarTab>\n</template>\n","/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { INode } from '@nextcloud/files'\nimport type { MaybeRefOrGetter } from 'vue'\n\nimport { FileType } from '@nextcloud/files'\nimport { generateUrl } from '@nextcloud/router'\nimport { getSharingToken, isPublicShare } from '@nextcloud/sharing/public'\nimport { computed, toValue } from 'vue'\n\n/**\n * Get the preview URL for a given node.\n *\n * @param node - The node to get the preview for\n * @param options - The preview options\n * @param options.crop - Whether to crop the preview (default: true)\n * @param options.fallback - Whether to use a mime type icon as fallback (default: true)\n * @param options.size - The size of the preview in pixels (default: 128). Can be a number or a tuple [width, height]\n */\nexport function usePreviewImage(\n\tnode: MaybeRefOrGetter<INode | undefined>,\n\toptions: MaybeRefOrGetter<{ crop?: boolean, fallback?: boolean, size?: number | [number, number] }> = {},\n) {\n\treturn computed(() => {\n\t\tconst source = toValue(node)\n\t\tif (!source) {\n\t\t\treturn\n\t\t}\n\n\t\tif (source.type === FileType.Folder) {\n\t\t\treturn\n\t\t}\n\n\t\tconst fallback = toValue(options).fallback ?? true\n\t\tif (source.attributes['has-preview'] !== true\n\t\t\t&& source.mime !== undefined\n\t\t\t&& source.mime !== 'application/octet-stream') {\n\t\t\tif (!fallback) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst previewUrl = generateUrl('/core/mimeicon?mime={mime}', {\n\t\t\t\tmime: source.mime,\n\t\t\t})\n\t\t\tconst url = new URL(window.location.origin + previewUrl)\n\t\t\treturn url.href\n\t\t}\n\n\t\tconst crop = toValue(options).crop ?? true\n\t\tconst [sizeX, sizeY] = [toValue(options).size ?? 128].flat()\n\n\t\ttry {\n\t\t\tconst previewUrl = source.attributes.previewUrl\n\t\t\t\t|| (isPublicShare()\n\t\t\t\t\t? generateUrl('/apps/files_sharing/publicpreview/{token}?file={file}', {\n\t\t\t\t\t\t\ttoken: getSharingToken()!,\n\t\t\t\t\t\t\tfile: source.path,\n\t\t\t\t\t\t})\n\t\t\t\t\t: generateUrl('/core/preview?fileId={fileid}', {\n\t\t\t\t\t\t\tfileid: String(source.fileid),\n\t\t\t\t\t\t})\n\t\t\t\t)\n\t\t\tconst url = new URL(window.location.origin + previewUrl)\n\n\t\t\t// Request tiny previews\n\t\t\turl.searchParams.set('x', sizeX.toString())\n\t\t\turl.searchParams.set('y', (sizeY ?? sizeX).toString())\n\t\t\turl.searchParams.set('mimeFallback', fallback.toString())\n\n\t\t\t// Etag to force refresh preview on change\n\t\t\tconst etag = source.attributes.etag || source.mtime?.getTime() || ''\n\t\t\turl.searchParams.set('v', etag.slice(0, 6))\n\n\t\t\t// Handle cropping\n\t\t\turl.searchParams.set('a', crop ? '0' : '1')\n\t\t\treturn url.href\n\t\t} catch {\n\t\t\treturn\n\t\t}\n\t})\n}\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { ISidebarContext } from '@nextcloud/files'\n\nimport { emit } from '@nextcloud/event-bus'\nimport { t } from '@nextcloud/l10n'\nimport { computed, ref, toRef, watch } from 'vue'\nimport NcActionButton from '@nextcloud/vue/components/NcActionButton'\nimport NcAppSidebar from '@nextcloud/vue/components/NcAppSidebar'\nimport NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper'\nimport FilesSidebarSubname from '../components/FilesSidebar/FilesSidebarSubname.vue'\nimport FilesSidebarTab from '../components/FilesSidebar/FilesSidebarTab.vue'\nimport { usePreviewImage } from '../composables/usePreviewImage.ts'\nimport { useSidebarStore } from '../store/sidebar.ts'\n\nconst sidebar = useSidebarStore()\nconst previewUrl = usePreviewImage(toRef(sidebar, 'currentNode'), {\n\tcrop: false,\n\tfallback: false,\n\tsize: [512, 288],\n})\n\n// Registered actions expect a context with folder and view,\n// both are only available when the sidebar is rendered by the files app.\nconst actionContext = computed(() => sidebar.currentContext as ISidebarContext | undefined)\n\n// Apps embedding the sidebar can render it as a fullscreen overlay of their page\nwatch(() => sidebar.isFullScreen, (isFullScreen) => {\n\tconst content = document.querySelector('#content') ?? document.querySelector('#content-vue')\n\tcontent?.classList.toggle('with-sidebar--full', isFullScreen)\n})\n\nconst background = ref<string>()\nwatch(previewUrl, () => {\n\tbackground.value = undefined\n\t// only try the background if there is more than a mime icon\n\tif (previewUrl.value && !previewUrl.value.includes('/core/mimeicon')) {\n\t\tconst image = new Image()\n\t\timage.onload = () => {\n\t\t\tbackground.value = previewUrl.value\n\t\t}\n\t\timage.src = previewUrl.value\n\t}\n}, { immediate: true })\n\n/**\n * Emitted when the sidebar is fully closed.\n * Trigger the event-bus event.\n */\nfunction onClosed() {\n\tif (sidebar.isOpen) {\n\t\t// was opened again meanwhile\n\t\treturn\n\t}\n\temit('files:sidebar:closed')\n}\n\n/**\n * Emitted when the sidebar is fully opened.\n * Trigger the event-bus event.\n */\nfunction onOpened() {\n\temit('files:sidebar:opened', sidebar.currentNode!)\n}\n\n/**\n * Emitted when the sidebar open state is toggled by the sidebar toggle button.\n * As we hide the open button this is only triggered when the user closes the sidebar.\n *\n * @param open - The new open state\n */\nfunction onToggle(open: boolean) {\n\tif (!open) {\n\t\tsidebar.close()\n\t}\n}\n</script>\n\n<template>\n\t<NcAppSidebar\n\t\tv-model:active=\"sidebar.activeTab\"\n\t\tdata-cy-sidebar\n\t\tforceMenu\n\t\t:background=\"background\"\n\t\t:class=\"{ 'app-sidebar--full': sidebar.isFullScreen }\"\n\t\t:empty=\"!sidebar.hasContext\"\n\t\t:loading=\"!sidebar.hasContext\"\n\t\t:name=\"sidebar.currentNode?.displayname ?? t('files', 'Loading …')\"\n\t\tnoToggle\n\t\t:open=\"sidebar.isOpen\"\n\t\t@closed=\"onClosed\"\n\t\t@opened=\"onOpened\"\n\t\t@update:open=\"onToggle\">\n\t\t<template v-if=\"sidebar.currentNode\" #subname>\n\t\t\t<FilesSidebarSubname :node=\"sidebar.currentNode\" />\n\t\t</template>\n\n\t\t<!-- Actions menu -->\n\t\t<template v-if=\"actionContext\" #secondary-actions>\n\t\t\t<!-- we cannot use a sub component due to limitations of the NcActions component -->\n\t\t\t<NcActionButton\n\t\t\t\tv-for=\"action of sidebar.currentActions\"\n\t\t\t\t:key=\"action.id\"\n\t\t\t\tcloseAfterClick\n\t\t\t\t@click=\"action.onClick(actionContext)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcIconSvgWrapper :svg=\"action.iconSvgInline(actionContext)\" />\n\t\t\t\t</template>\n\t\t\t\t{{ action.displayName(actionContext) }}\n\t\t\t</NcActionButton>\n\t\t</template>\n\n\t\t<!-- Description -->\n\t\t<!-- <template v-if=\"hasContext\" #description>\n\t\t\t<FilesSidebarDescription />\n\t\t</template> -->\n\n\t\t<template v-if=\"sidebar.hasContext\">\n\t\t\t<FilesSidebarTab\n\t\t\t\tv-for=\"tab in sidebar.currentTabs\"\n\t\t\t\t:key=\"tab.id\"\n\t\t\t\t:active=\"sidebar.activeTab === tab.id\"\n\t\t\t\t:tab=\"tab\" />\n\t\t</template>\n\t</NcAppSidebar>\n</template>\n\n<style lang=\"scss\" scoped>\n.app-sidebar {\n\t&--has-preview:deep {\n\t\t.app-sidebar-header__figure {\n\t\t\tbackground-size: cover;\n\t\t}\n\n\t\t&[data-mimetype=\"text/plain\"],\n\t\t&[data-mimetype=\"text/markdown\"] {\n\t\t\t.app-sidebar-header__figure {\n\t\t\t\tbackground-size: contain;\n\t\t\t}\n\t\t}\n\t}\n\n\t&--full {\n\t\tposition: fixed !important;\n\t\tz-index: 2025 !important;\n\t\ttop: 0 !important;\n\t\theight: 100% !important;\n\t}\n\n\t:deep {\n\t\t.app-sidebar-header__description {\n\t\t\tmargin: 0 16px 4px 16px !important;\n\t\t}\n\t}\n\n\t.svg-icon {\n\t\t:deep(svg) {\n\t\t\twidth: 20px;\n\t\t\theight: 20px;\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n\n.sidebar__description {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\twidth: 100%;\n\t\tgap: 8px 0;\n\t}\n</style>\n","/*!\n * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { createApp } from 'vue'\nimport FilesSidebar from '../views/FilesSidebar.vue'\nimport { pinia } from '../store/index.ts'\nimport { logger } from '../utils/logger.ts'\nimport { getSidebarSharedState } from './sharedState.ts'\n\n/**\n * Whether the sidebar is currently rendered within the page.\n */\nexport function isSidebarMounted(): boolean {\n\treturn getSidebarSharedState().instance !== undefined\n}\n\n/**\n * Render the sidebar into an element of the current page.\n *\n * @param target - The element to render the sidebar into\n * @return Whether the sidebar is rendered\n */\nexport function mountSidebar(target: HTMLElement): boolean {\n\tif (!(target instanceof HTMLElement)) {\n\t\tlogger.error('sidebar: cannot render the sidebar as no element to render it into was provided', { target })\n\t\treturn false\n\t}\n\n\tconst state = getSidebarSharedState()\n\tif (state.instance !== undefined) {\n\t\tif (state.instance.mountpoint.parentElement === target) {\n\t\t\tlogger.debug('sidebar: already rendered within the requested element')\n\t\t\treturn true\n\t\t}\n\n\t\tlogger.debug('sidebar: moving the sidebar into the requested element')\n\t\tstate.instance.app.unmount()\n\t\tstate.instance.mountpoint.remove()\n\t}\n\n\t// the sidebar is rendered within the mountpoint, so let it take part in the layout of the target\n\tconst mountpoint = document.createElement('div')\n\tmountpoint.style.display = 'contents'\n\ttarget.appendChild(mountpoint)\n\n\tconst app = createApp(FilesSidebar)\n\tapp.use(pinia)\n\tapp.mount(mountpoint)\n\tstate.instance = { app, mountpoint }\n\n\tlogger.debug('sidebar: rendered within the current app')\n\treturn true\n}\n","/*!\n * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { IFolder, INode, IView } from '@nextcloud/files'\nimport type { ISidebarDataProvider } from '../types.ts'\n\nimport { shallowRef } from 'vue'\n\n/**\n * Create the data provider used when the sidebar is embedded into another app.\n *\n * Nodes are fetched from the WebDAV API on demand,\n * there is neither an active folder nor an active view outside of the files app.\n */\nexport function createStandaloneDataProvider(): ISidebarDataProvider {\n\tconst node = shallowRef<INode>()\n\tconst folder = shallowRef<IFolder>()\n\tconst view = shallowRef<IView>()\n\n\t/**\n\t * Set the node to render the sidebar for.\n\t *\n\t * @param newNode - The node to render the sidebar for\n\t */\n\tfunction setNode(newNode?: INode): void {\n\t\tnode.value = newNode\n\t}\n\n\treturn {\n\t\tnode,\n\t\tfolder,\n\t\tview,\n\n\t\tsetNode,\n\t}\n}\n","/*!\n * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { ISidebar } from '@nextcloud/files'\n\nimport { pinia } from '../store/index.ts'\nimport { useSidebarStore } from '../store/sidebar.ts'\nimport { logger } from '../utils/logger.ts'\nimport { isSidebarMounted, mountSidebar } from './mount.ts'\nimport { getSidebarDataProvider, hasSidebarDataProvider, setSidebarDataProvider } from './provider.ts'\nimport { createStandaloneDataProvider } from './providers/standalone.ts'\nimport { getSidebarSharedState } from './sharedState.ts'\n\n/**\n * Set up the sidebar for the current page.\n */\nexport function initializeSidebar(): void {\n\tif (rendersOwnSidebar()) {\n\t\texposeSidebarApi()\n\t\treturn\n\t}\n\n\tif (isSidebarMounted()) {\n\t\tlogger.debug('sidebar: already rendered by the current app')\n\t\treturn\n\t}\n\n\tconst content = document.querySelector<HTMLElement>('body > .content')\n\t\t?? document.querySelector<HTMLElement>('body > #content')\n\tif (!content) {\n\t\tlogger.error('sidebar: cannot render the sidebar as the page has no content element')\n\t\treturn\n\t}\n\n\tlogger.debug('sidebar: no data provider registered, rendering the sidebar for the current app')\n\trenderSidebar(content)\n}\n\n/**\n * Render the sidebar into an element of the current page.\n *\n * @param target - The element to render the sidebar into\n */\nexport function renderSidebar(target: HTMLElement): void {\n\tif (rendersOwnSidebar()) {\n\t\tlogger.debug('sidebar: not rendering the sidebar as the current app renders it itself')\n\t\treturn\n\t}\n\n\tif (!hasSidebarDataProvider()) {\n\t\tconst state = getSidebarSharedState()\n\t\tstate.standaloneProvider = createStandaloneDataProvider()\n\t\tsetSidebarDataProvider(state.standaloneProvider)\n\t}\n\n\tif (mountSidebar(target)) {\n\t\texposeSidebarApi()\n\t}\n}\n\n/**\n * Expose the sidebar implementation which is proxied by the `@nextcloud/files` library.\n */\nexport function exposeSidebarApi(): void {\n\twindow.OCA.Files ??= {}\n\twindow.OCA.Files._sidebar = () => useSidebarStore(pinia) satisfies Omit<ISidebar, 'available' | 'mount' | 'registerTab' | 'registerAction'>\n}\n\n/**\n * Expose rendering the sidebar, so apps can render it within their own layout.\n */\nexport function exposeSidebarMount(): void {\n\twindow.OCA.Files ??= {}\n\twindow.OCA.Files._mountSidebar = renderSidebar\n}\n\n/**\n * Whether the app of the current page renders the sidebar on its own,\n * like the files app does as part of its app layout.\n */\nfunction rendersOwnSidebar(): boolean {\n\tconst provider = getSidebarDataProvider()\n\treturn provider !== undefined && provider !== getSidebarSharedState().standaloneProvider\n}\n"],"names":["getSidebarSharedState","shallowRef","setSidebarDataProvider","newProvider","dataProvider","logger","getSidebarDataProvider","hasSidebarDataProvider","useSidebarStore","defineStore","activeTab","ref","isOpen","isFullScreen","currentNode","computed","hasContext","currentContext","provider","currentActions","getActions","currentTabs","getTabs","open","node","tabId","setActiveTab","setInitialTab","close","context","tabs","getSidebarTabs","tab","isEnabled","a","b","actions","getSidebarActions","action","entry","error","id","setFullScreenMode","fullScreen","subscribe","watch","readonly","props","__props","isFavourited","size","formatFileSize","_createElementBlock","_normalizeClass","$style","_createBlock","_unref","NcIconSvgWrapper","mdiStar","t","_createElementVNode","_hoisted_1","_createVNode","NcDateTime","_Fragment","NcUserBubble","initializedTabs","sidebar","folder","view","toRaw","loading","toRef","active","NcAppSidebarTab","NcEmptyContent","NcLoadingIcon","_resolveDynamicComponent","usePreviewImage","options","source","toValue","FileType","fallback","previewUrl","generateUrl","crop","sizeX","sizeY","isPublicShare","getSharingToken","url","etag","actionContext","background","image","onClosed","emit","onOpened","onToggle","NcAppSidebar","_cache","$event","_openBlock","_renderList","FilesSidebarTab","FilesSidebarSubname","NcActionButton","_createTextVNode","_toDisplayString","isSidebarMounted","mountSidebar","target","state","mountpoint","app","createApp","FilesSidebar","pinia","createStandaloneDataProvider","setNode","newNode","initializeSidebar","rendersOwnSidebar","exposeSidebarApi","content","renderSidebar","exposeSidebarMount"],"mappings":"87FAiCO,SAASA,GAA4C,CAC3D,OAAA,OAAO,IAAI,QAAU,CAAA,EACrB,OAAO,IAAI,MAAM,UAAY,CAAA,EAC7B,OAAO,IAAI,MAAM,QAAQ,eAAiB,CACzC,aAAcC,EAAA,CAAiC,EAGzC,OAAO,IAAI,MAAM,QAAQ,YACjC,CCxBO,SAASC,GAAuBC,EAAyC,CAC/E,KAAM,CAAE,aAAAC,CAAA,EAAiBJ,EAAA,EACzB,GAAII,EAAa,QAAU,OAC1B,MAAM,IAAI,MAAM,gDAAgD,EAGjEC,EAAO,MAAM,mCAAmC,EAChDD,EAAa,MAAQD,CACtB,CAKO,SAASG,GAA2D,CAC1E,OAAON,EAAA,EAAwB,aAAa,KAC7C,CAKO,SAASO,IAAkC,CACjD,OAAOD,MAA6B,MACrC,CCzBO,MAAME,EAAkBC,GAAY,UAAW,IAAM,CAC3D,MAAMC,EAAYC,EAAA,EACZC,EAASD,EAAI,EAAK,EAClBE,EAAeF,EAAI,EAAK,EAExBG,EAAcC,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