%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/activity/js/
Upload File :
Create Path :
Current File : //www/varak.net/nextcloud.varak.net/apps_old/apps/activity/js/api.chunk.mjs.map

{"version":3,"file":"api.chunk.mjs","sources":["../src/utils/api.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { ActivityFactoryQueryOptions, IActivityFactory, IActivityFilter, IActivitySidebarAction } from '../models/ActivityAPI'\nimport logger from './logger'\n\ndeclare global {\n\tinterface Window {\n\t\tOCA?: {\n\t\t\tActivity?: {\n\t\t\t\t/**\n\t\t\t\t * Register new actions for a given activity type\n\t\t\t\t */\n\t\t\t\tregisterSidebarEntries: (factory: IActivityFactory) => void\n\t\t\t\t/**\n\t\t\t\t * Register an external action that should be shown in the Activity sidebar panel\n\t\t\t\t */\n\t\t\t\tregisterSidebarAction: (action: IActivitySidebarAction) => void\n\t\t\t\t/**\n\t\t\t\t * Register an filter function to filter out activities on the sidebar, useful together with `registerSidebarEntries`\n\t\t\t\t */\n\t\t\t\tregisterSidebarFilter: (filter: IActivityFilter) => void\n\t\t\t\t__sidebar_actions: IActivitySidebarAction[]\n\t\t\t\t__sidebar_factories: IActivityFactory[]\n\t\t\t\t__sidebar_filters: IActivityFilter[]\n\t\t\t},\n\t\t\tViewer?: {\n\t\t\t\topen(options: { path?: string, fileInfo?: unknown }): void\n\t\t\t\tget mimetypes(): string[]\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Register the global API\n */\nexport function registerGlobalAPI() {\n\twindow.OCA = window.OCA ?? {}\n\twindow.OCA.Activity = {\n\t\t...window.OCA.Activity,\n\t\t__sidebar_actions: window.OCA.Activity?.__sidebar_actions ?? [],\n\t\t__sidebar_factories: window.OCA.Activity?.__sidebar_factories ?? [],\n\t\t__sidebar_filters: window.OCA.Activity?.__sidebar_filters ?? [],\n\n\t\tregisterSidebarAction(action: IActivitySidebarAction) {\n\t\t\twindow.OCA!.Activity!.__sidebar_actions.push(action)\n\t\t\tlogger.debug('Registered new sidebar action')\n\t\t},\n\n\t\tregisterSidebarEntries(factory: IActivityFactory) {\n\t\t\twindow!.OCA!.Activity!.__sidebar_factories.push(factory)\n\t\t\tlogger.debug('Registered new sidebar actions factory')\n\t\t},\n\n\t\tregisterSidebarFilter(filter: IActivityFilter) {\n\t\t\twindow!.OCA!.Activity!.__sidebar_filters.push(filter)\n\t\t},\n\t}\n\n\tlogger.info('Activity API registered')\n}\n\n/**\n * Get all external actions that should be showed in the Activity panel\n */\nexport function getSidebarActions() {\n\treturn window.OCA?.Activity?.__sidebar_actions ?? []\n}\n\n/**\n * Get all additional activity stream entries for a given file object\n * @param options Filter options for the additonal entries\n */\nexport async function getAdditionalEntries(options: ActivityFactoryQueryOptions) {\n\tif (window.OCA?.Activity?.__sidebar_factories === undefined) {\n\t\treturn []\n\t}\n\n\tconst allPromises = window.OCA.Activity.__sidebar_factories.map(async (factory) => await factory(options))\n\treturn (await Promise.all(allPromises)).flat()\n}\n\n/**\n * Get all sidebar entry filters\n */\nexport function getActivityFilters() {\n\treturn window.OCA?.Activity?.__sidebar_filters ?? []\n}\n"],"names":["registerGlobalAPI","_a","_b","_c","_d","_e","_f","_g","action","logger","factory","filter","getSidebarActions","getAdditionalEntries","options","allPromises","getActivityFilters"],"mappings":";uCAuCO,SAASA,GAAoB,CAvCpC,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAwCC,OAAO,KAAMN,EAAA,OAAO,MAAP,KAAAA,EAAc,GAC3B,OAAO,IAAI,SAAW,CACrB,GAAG,OAAO,IAAI,SACd,mBAAmBE,GAAOD,EAAA,OAAA,IAAI,WAAX,KAAqB,OAAAA,EAAA,oBAArB,OAA0C,CAAC,EAC9D,qBAAqBG,GAAOD,EAAA,OAAA,IAAI,WAAX,KAAqB,OAAAA,EAAA,sBAArB,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