]> source.dussan.org Git - nextcloud-server.git/commitdiff
Port Files navigation to vue
authorJohn Molakvoæ <skjnldsv@protonmail.com>
Thu, 1 Dec 2022 13:34:23 +0000 (14:34 +0100)
committerJohn Molakvoæ <skjnldsv@protonmail.com>
Wed, 4 Jan 2023 15:45:41 +0000 (16:45 +0100)
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
21 files changed:
apps/files/appinfo/routes.php
apps/files/js/app.js
apps/files/js/merged-index.json
apps/files/lib/AppInfo/Application.php
apps/files/lib/Controller/ApiController.php
apps/files/lib/Controller/ViewController.php
apps/files/src/legacy/navigationMapper.js [new file with mode: 0644]
apps/files/src/logger.js
apps/files/src/main.js
apps/files/src/router/router.js [new file with mode: 0644]
apps/files/src/services/Navigation.ts [new file with mode: 0644]
apps/files/src/views/Navigation.vue [new file with mode: 0644]
apps/files/templates/appnavigation.php
apps/files/templates/index.php
apps/files/tests/Controller/ViewControllerTest.php
apps/files_sharing/lib/AppInfo/Application.php
babel.config.js
package-lock.json
package.json
tsconfig.json
webpack.common.js

index 6c94490b0855ae971d445917b70272353dc54d71..29859d78b0d7716f5e11b9d9890d850b032452da 100644 (file)
@@ -45,13 +45,34 @@ $application->registerRoutes(
        $this,
        [
                'routes' => [
+                       [
+                               'name' => 'view#index',
+                               'url' => '/',
+                               'verb' => 'GET',
+                       ],
+                       [
+                               'name' => 'view#index',
+                               'url' => '/{view}',
+                               'verb' => 'GET',
+                               'postfix' => 'view',
+                       ],
+                       [
+                               'name' => 'view#index',
+                               'url' => '/{view}/{fileid}',
+                               'verb' => 'GET',
+                               'postfix' => 'fileid',
+                       ],
                        [
                                'name' => 'View#showFile',
                                'url' => '/f/{fileid}',
                                'verb' => 'GET',
                                'root' => '',
                        ],
-
+                       [
+                               'name' => 'ajax#getStorageStats',
+                               'url' => '/ajax/getstoragestats',
+                               'verb' => 'GET',
+                       ],
                        [
                                'name' => 'API#getThumbnail',
                                'url' => '/api/v1/thumbnail/{x}/{y}/{file}',
@@ -94,16 +115,6 @@ $application->registerRoutes(
                                'url' => '/api/v1/showgridview',
                                'verb' => 'GET'
                        ],
-                       [
-                               'name' => 'view#index',
-                               'url' => '/',
-                               'verb' => 'GET',
-                       ],
-                       [
-                               'name' => 'ajax#getStorageStats',
-                               'url' => '/ajax/getstoragestats',
-                               'verb' => 'GET',
-                       ],
                        [
                                'name' => 'API#toggleShowFolder',
                                'url' => '/api/v1/toggleShowFolder/{key}',
index 8053f89268cee15a534d85781bbc1ae43b039b9c..c88ea42a48700960e90637f15c0db4d211987248 100644 (file)
@@ -27,9 +27,9 @@
         */
        OCA.Files.App = {
                /**
-                * Navigation control
+                * Navigation instance
                 *
-                * @member {OCA.Files.Navigation}
+                * @member {OCP.Files.Navigation}
                 */
                navigation: null,
 
@@ -51,7 +51,7 @@
                 * Initializes the files app
                 */
                initialize: function() {
-                       this.navigation = new OCA.Files.Navigation($('#app-navigation'));
+                       this.navigation = OCP.Files.Navigation;
                        this.$showHiddenFiles = $('input#showhiddenfilesToggle');
                        var showHidden = $('#showHiddenFiles').val() === "1";
                        this.$showHiddenFiles.prop('checked', showHidden);
                 * Destroy the app
                 */
                destroy: function() {
-                       this.navigation = null;
                        this.fileList.destroy();
                        this.fileList = null;
                        this.files = null;
                 * @return app container
                 */
                getCurrentAppContainer: function() {
-                       return this.navigation.getActiveContainer();
+                       var viewId = this.getActiveView();
+                       return $('#app-content-' + viewId);
                },
 
                /**
                 * @param viewId view id
                 */
                setActiveView: function(viewId, options) {
-                       this.navigation.setActiveItem(viewId, options);
+                       window._nc_event_bus.emit('files:view:changed', { id: viewId })
                },
 
                /**
                 * @return view id
                 */
                getActiveView: function() {
-                       return this.navigation.getActiveItem();
+                       return this.navigation.active
+                               && this.navigation.active.id;
                },
 
                /**
                        $('#app-content').delegate('>div', 'afterChangeDirectory', _.bind(this._onAfterDirectoryChanged, this));
                        $('#app-content').delegate('>div', 'changeViewerMode', _.bind(this._onChangeViewerMode, this));
 
+                       window._nc_event_bus.subscribe('files:view:changed', _.bind(this._onNavigationChanged, this))
                        $('#app-navigation').on('itemChanged', _.bind(this._onNavigationChanged, this));
                        this.$showHiddenFiles.on('change', _.bind(this._onShowHiddenFilesChange, this));
                        this.$cropImagePreviews.on('change', _.bind(this._onCropImagePreviewsChange, this));
                /**
                 * Event handler for when the current navigation item has changed
                 */
-               _onNavigationChanged: function(e) {
+               _onNavigationChanged: function(view) {
                        var params;
-                       if (e && e.itemId) {
-                               params = {
-                                       view: typeof e.view === 'string' && e.view !== '' ? e.view : e.itemId,
-                                       dir: e.dir ? e.dir : '/'
-                               };
+                       if (view && (view.itemId || view.id)) {
+                               if (view.id) {
+                                       params = {
+                                               view: view.id,
+                                               dir: '/',
+                                       }
+                               } else {
+                                       // Legacy handling
+                                       params = {
+                                               view: typeof view.view === 'string' && view.view !== '' ? view.view : view.itemId,
+                                               dir: view.dir ? view.dir : '/'
+                                       }
+                               }
                                this._changeUrl(params.view, params.dir);
                                OCA.Files.Sidebar.close();
-                               this.navigation.getActiveContainer().trigger(new $.Event('urlChanged', params));
+                               this.getCurrentAppContainer().trigger(new $.Event('urlChanged', params));
                                window._nc_event_bus.emit('files:navigation:changed')
                        }
                },
                 */
                _onDirectoryChanged: function(e) {
                        if (e.dir && !e.changedThroughUrl) {
-                               this._changeUrl(this.navigation.getActiveItem(), e.dir, e.fileId);
+                               this._changeUrl(this.getActiveView(), e.dir, e.fileId);
                        }
                },
 
                 */
                _onAfterDirectoryChanged: function(e) {
                        if (e.dir && e.fileId) {
-                               this._changeUrl(this.navigation.getActiveItem(), e.dir, e.fileId);
+                               this._changeUrl(this.getActiveView(), e.dir, e.fileId);
                        }
                },
 
                                dir: '/',
                                view: 'files'
                        }, params);
-                       var lastId = this.navigation.getActiveItem();
-                       if (!this.navigation.itemExists(params.view)) {
+                       var lastId = this.navigation.active;
+                       if (!this.navigation.views.find(view => view.id === params.view)) {
                                params.view = 'files';
                        }
-                       this.navigation.setActiveItem(params.view, {silent: true});
-                       if (lastId !== this.navigation.getActiveItem()) {
-                               this.navigation.getActiveContainer().trigger(new $.Event('show'));
+                       this.setActiveView(params.view, {silent: true});
+                       if (lastId !== this.getActiveView()) {
+                               this.getCurrentAppContainer().trigger(new $.Event('show'));
                        }
-                       this.navigation.getActiveContainer().trigger(new $.Event('urlChanged', params));
+                       this.getCurrentAppContainer().trigger(new $.Event('urlChanged', params));
                        window._nc_event_bus.emit('files:navigation:changed')
                },
 
index 478db35f6fb4ce17671ab6c92e2b408b684bfc0b..01a46958d8bda53f47af33bc6910c377a2736126 100644 (file)
@@ -19,7 +19,6 @@
   "jquery.fileupload.js",
   "keyboardshortcuts.js",
   "mainfileinfodetailview.js",
-  "navigation.js",
   "newfilemenu.js",
   "operationprogressbar.js",
   "recentfilelist.js",
index 2662f2d6e9b48b5ea62ee648435ce887684b02f4..f2104be4df864723b74811a31f710b0a1c04e362 100644 (file)
@@ -172,7 +172,6 @@ class Application extends App implements IBootstrap {
                                'script' => 'simplelist.php',
                                'order' => 5,
                                'name' => $l10n->t('Favorites'),
-                               'expandedState' => 'show_Quick_Access'
                        ];
                });
        }
index e29e81d6296d4e1698b2ffbd0ec0ff06d81495db..a87b4f9490a1a25e12f35079a572de74a0ec6608 100644 (file)
@@ -346,18 +346,18 @@ class ApiController extends Controller {
         * @throws \OCP\PreConditionNotMetException
         */
        public function toggleShowFolder(int $show, string $key): Response {
-               // ensure the edited key exists
-               $navItems = \OCA\Files\App::getNavigationManager()->getAll();
-               foreach ($navItems as $item) {
-                       // check if data is valid
-                       if (($show === 0 || $show === 1) && isset($item['expandedState']) && $key === $item['expandedState']) {
-                               $this->config->setUserValue($this->userSession->getUser()->getUID(), 'files', $key, (string)$show);
-                               return new Response();
-                       }
+               if ($show !== 0 && $show !== 1) {
+                       return new DataResponse([
+                               'message' => 'Invalid show value. Only 0 and 1 are allowed.'
+                       ], Http::STATUS_BAD_REQUEST);
                }
-               $response = new Response();
-               $response->setStatus(Http::STATUS_FORBIDDEN);
-               return $response;
+
+               $userId = $this->userSession->getUser()->getUID();
+
+               // Set the new value and return it
+               // Using a prefix prevents the user from setting arbitrary keys
+               $this->config->setUserValue($userId, 'files', 'show_' . $key, (string)$show);
+               return new JSONResponse([$key => $show]);
        }
 
        /**
index 1da9814d7e829388d581f767ab63bd73cf32b500..63863b3e3677c11e1460a75c9544c6f81c8eebb5 100644 (file)
@@ -186,13 +186,14 @@ class ViewController extends Controller {
         * @throws NotFoundException
         */
        public function index($dir = '', $view = '', $fileid = null, $fileNotFound = false, $openfile = null) {
-               if ($fileid !== null && $dir === '') {
-                       try {
-                               return $this->redirectToFile($fileid);
-                       } catch (NotFoundException $e) {
-                               return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index', ['fileNotFound' => true]));
-                       }
-               }
+
+               // if ($fileid !== null && $dir === '') {
+               //      try {
+               //              return $this->redirectToFile($fileid);
+               //      } catch (NotFoundException $e) {
+               //              return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index', ['fileNotFound' => true]));
+               //      }
+               // }
 
                $nav = new \OCP\Template('files', 'appnavigation', '');
 
@@ -205,11 +206,11 @@ class ViewController extends Controller {
                // FIXME: Make non static
                $storageInfo = $this->getStorageInfo();
 
-               $user = $this->userSession->getUser()->getUID();
+               $userId = $this->userSession->getUser()->getUID();
 
                // Get all the user favorites to create a submenu
                try {
-                       $favElements = $this->activityHelper->getFavoriteFilePaths($this->userSession->getUser()->getUID());
+                       $favElements = $this->activityHelper->getFavoriteFilePaths($userId);
                } catch (\RuntimeException $e) {
                        $favElements['folders'] = [];
                }
@@ -234,7 +235,7 @@ class ViewController extends Controller {
                                'order' => $navBarPositionPosition,
                                'folderPosition' => $sortingValue,
                                'name' => basename($favElement),
-                               'icon' => 'files',
+                               'icon' => 'folder',
                                'quickaccesselement' => 'true'
                        ];
 
@@ -248,11 +249,9 @@ class ViewController extends Controller {
                $navItems['favorites']['sublist'] = $favoritesSublistArray;
                $navItems['favorites']['classes'] = $collapseClasses;
 
-               // parse every menu and add the expandedState user value
+               // parse every menu and add the expanded user value
                foreach ($navItems as $key => $item) {
-                       if (isset($item['expandedState'])) {
-                               $navItems[$key]['defaultExpandedState'] = $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', $item['expandedState'], '0') === '1';
-                       }
+                       $navItems[$key]['expanded'] = $this->config->getUserValue($userId, 'files', 'show_' . $item['id'], '0') === '1';
                }
 
                $nav->assign('navigationItems', $navItems);
@@ -267,10 +266,12 @@ class ViewController extends Controller {
                $nav->assign('quota', $storageInfo['quota']);
                $nav->assign('usage_relative', $storageInfo['relative']);
 
-               $nav->assign('webdav_url', \OCP\Util::linkToRemote('dav/files/' . rawurlencode($user)));
+               $nav->assign('webdav_url', \OCP\Util::linkToRemote('dav/files/' . rawurlencode($userId)));
 
                $contentItems = [];
 
+               $this->initialState->provideInitialState('navigation', $navItems);
+
                // render the container content for every navigation item
                foreach ($navItems as $item) {
                        $content = '';
@@ -314,12 +315,12 @@ class ViewController extends Controller {
                $params['ownerDisplayName'] = $storageInfo['ownerDisplayName'] ?? '';
                $params['isPublic'] = false;
                $params['allowShareWithLink'] = $this->shareManager->shareApiAllowLinks() ? 'yes' : 'no';
-               $params['defaultFileSorting'] = $this->config->getUserValue($user, 'files', 'file_sorting', 'name');
-               $params['defaultFileSortingDirection'] = $this->config->getUserValue($user, 'files', 'file_sorting_direction', 'asc');
-               $params['showgridview'] = $this->config->getUserValue($user, 'files', 'show_grid', false);
-               $showHidden = (bool) $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'show_hidden', false);
+               $params['defaultFileSorting'] = $this->config->getUserValue($userId, 'files', 'file_sorting', 'name');
+               $params['defaultFileSortingDirection'] = $this->config->getUserValue($userId, 'files', 'file_sorting_direction', 'asc');
+               $params['showgridview'] = $this->config->getUserValue($userId, 'files', 'show_grid', false);
+               $showHidden = (bool) $this->config->getUserValue($userId, 'files', 'show_hidden', false);
                $params['showHiddenFiles'] = $showHidden ? 1 : 0;
-               $cropImagePreviews = (bool) $this->config->getUserValue($this->userSession->getUser()->getUID(), 'files', 'crop_image_previews', true);
+               $cropImagePreviews = (bool) $this->config->getUserValue($userId, 'files', 'crop_image_previews', true);
                $params['cropImagePreviews'] = $cropImagePreviews ? 1 : 0;
                $params['fileNotFound'] = $fileNotFound ? 1 : 0;
                $params['appNavigation'] = $nav;
diff --git a/apps/files/src/legacy/navigationMapper.js b/apps/files/src/legacy/navigationMapper.js
new file mode 100644 (file)
index 0000000..a78faf0
--- /dev/null
@@ -0,0 +1,54 @@
+/**
+ * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @license AGPL-3.0-or-later
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+import { loadState } from '@nextcloud/initial-state'
+import logger from '../logger.js'
+
+/**
+ * Fetch and register the legacy files views
+ */
+export default function() {
+       const legacyViews = Object.values(loadState('files', 'navigation', {}))
+
+       if (legacyViews.length > 0) {
+               logger.debug('Legacy files views detected. Processing...', legacyViews)
+               legacyViews.forEach(view => {
+                       registerLegacyView(view)
+                       if (view.sublist) {
+                               view.sublist.forEach(subview => registerLegacyView({ ...subview, parent: view.id }))
+                       }
+               })
+       }
+}
+
+const registerLegacyView = function({ id, name, order, icon, parent, classes = '', expanded }) {
+       OCP.Files.Navigation.register({
+               id,
+               name,
+               iconClass: icon ? `icon-${icon}` : 'nav-icon-' + id,
+               order,
+               parent,
+               legacy: true,
+               sticky: classes.includes('pinned'),
+               expanded: expanded === true,
+       })
+}
index 0005ee13cb4ed16b1d71677bc6fccc38d77db35e..39283bd331dae0799a6a03dd381c1dc3dbb703f1 100644 (file)
@@ -1,8 +1,7 @@
 /**
- * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
  *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
  *
  * @license AGPL-3.0-or-later
  *
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  */
-
-import { getCurrentUser } from '@nextcloud/auth'
 import { getLoggerBuilder } from '@nextcloud/logger'
 
-const getLogger = user => {
-       if (user === null) {
-               return getLoggerBuilder()
-                       .setApp('files')
-                       .build()
-       }
-       return getLoggerBuilder()
-               .setApp('files')
-               .setUid(user.uid)
-               .build()
-}
-
-export default getLogger(getCurrentUser())
+export default getLoggerBuilder()
+       .setApp('files')
+       .detectUser()
+       .build()
index a979822bdc48d1b2beb97dcdcd2cf0a7068e3f70..948e1b68acaed395444cdd6d2796368c45e4b3a3 100644 (file)
@@ -1,3 +1,31 @@
-import './files-app-settings'
-import './templates'
-import './legacy/filelistSearch'
+import './files-app-settings.js'
+import './templates.js'
+import './legacy/filelistSearch.js'
+import processLegacyFilesViews from './legacy/navigationMapper.js'
+
+import Vue from 'vue'
+import NavigationService from './services/Navigation.ts'
+import NavigationView from './views/Navigation.vue'
+
+import router from './router/router.js'
+
+// Init Files App Navigation Service
+const Navigation = new NavigationService()
+
+// Assign Navigation Service to the global OCP.Files
+window.OCP.Files = window.OCP.Files ?? {}
+Object.assign(window.OCP.Files, { Navigation })
+
+// Init Navigation View
+const View = Vue.extend(NavigationView)
+const FilesNavigationRoot = new View({
+       name: 'FilesNavigationRoot',
+       propsData: {
+               Navigation,
+       },
+       router,
+})
+FilesNavigationRoot.$mount('#app-navigation-files')
+
+// Init legacy files views
+processLegacyFilesViews()
diff --git a/apps/files/src/router/router.js b/apps/files/src/router/router.js
new file mode 100644 (file)
index 0000000..a2d063a
--- /dev/null
@@ -0,0 +1,52 @@
+/**
+ * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @license AGPL-3.0-or-later
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+import Vue from 'vue'
+import Router from 'vue-router'
+import { generateUrl } from '@nextcloud/router'
+
+Vue.use(Router)
+
+export default new Router({
+       mode: 'history',
+
+       // if index.php is in the url AND we got this far, then it's working:
+       // let's keep using index.php in the url
+       base: generateUrl('/apps/files', ''),
+       linkActiveClass: 'active',
+
+       routes: [
+               {
+                       path: '/',
+                       // Pretending we're using the default view
+                       alias: '/files',
+               },
+               {
+                       path: '/:view/:fileId?',
+                       name: 'filelist',
+                       props: true,
+               },
+               {
+                       path: '/not-found',
+                       name: 'notfound',
+               },
+       ],
+})
diff --git a/apps/files/src/services/Navigation.ts b/apps/files/src/services/Navigation.ts
new file mode 100644 (file)
index 0000000..e3286c7
--- /dev/null
@@ -0,0 +1,217 @@
+/**
+ * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @license AGPL-3.0-or-later
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+import type Node from '@nextcloud/files/dist/files/node'
+import isSvg from 'is-svg'
+
+import logger from '../logger'
+
+export interface Column {
+       /** Unique column ID */
+       id: string
+       /** Translated column title */
+       title: string
+       /** Property key from Node main or additional attributes.
+       Will be used if no custom sort function is provided.
+       Sorting will be done by localCompare */
+       property: string
+       /** Special function used to sort Nodes between them */
+       sortFunction?: (nodeA: Node, nodeB: Node) => number;
+       /** Custom summary of the column to display at the end of the list.
+        Will not be displayed if  nothing is provided */
+       summary?: (node: Node[]) => string
+}
+
+export interface Navigation {
+       /** Unique view ID */
+       id: string
+       /** Translated view name */
+       name: string
+       /** Method return the content of the  provided path */
+       getFiles: (path: string) => Node[]
+       /** The view icon as an inline svg */
+       icon: string
+       /** The view order */
+       order: number
+       /** This view column(s). Name and actions are
+       by default always included */
+       columns?: Column[]
+       /** The empty view element to render your empty content into */
+       emptyView?: (div: HTMLDivElement) => void
+       /** The parent unique ID */
+       parent?: string
+       /** This view is sticky (sent at the bottom) */
+       sticky?: boolean
+       /** This view has children and is expanded or not */
+       expanded?: boolean
+
+       /**
+        * This view is sticky a legacy view.
+        * Here until all the views are migrated to Vue.
+        * @deprecated It will be removed in a near future
+        */
+       legacy?: boolean
+       /**
+        * An icon class. 
+        * @deprecated It will be removed in a near future
+        */
+       iconClass?: string
+}
+
+export default class {
+
+       private _views: Navigation[] = []
+       private _currentView: Navigation | null = null
+
+       constructor() {
+               logger.debug('Navigation service initialized')
+       }
+
+       register(view: Navigation) {
+               try {
+                       isValidNavigation(view)
+                       isUniqueNavigation(view, this._views)
+               } catch (e) {
+                       if (e instanceof Error) {
+                               logger.error(e.message, { view })
+                       }
+                       throw e
+               }
+
+               if (view.legacy) {
+                       logger.warn('Legacy view detected, please migrate to Vue')
+               }
+
+               if (view.iconClass) {
+                       view.legacy = true
+               }
+
+               this._views.push(view)
+       }
+
+       get views(): Navigation[] {
+               return this._views
+       }
+
+       setActive(view: Navigation | null) {
+               this._currentView = view
+       }
+
+       get active(): Navigation | null {
+               return this._currentView
+       }
+
+}
+
+/**
+ * Make sure the given view is unique
+ * and not already registered.
+ */
+const isUniqueNavigation = function(view: Navigation, views: Navigation[]): boolean {
+       if (views.find(search => search.id === view.id)) {
+               throw new Error(`Navigation id ${view.id} is already registered`)
+       }
+       return true
+}
+
+/**
+ * Typescript cannot validate an interface.
+ * Please keep in sync with the Navigation interface requirements.
+ */
+const isValidNavigation = function(view: Navigation): boolean {
+       if (!view.id || typeof view.id !== 'string') {
+               throw new Error('Navigation id is required and must be a string')
+       }
+
+       if (!view.name || typeof view.name !== 'string') {
+               throw new Error('Navigation name is required and must be a string')
+       }
+
+       /**
+        * Legacy handle their content and icon differently
+        * TODO: remove when support for legacy views is removed
+        */
+       if (!view.legacy) {
+               if (!view.getFiles || typeof view.getFiles !== 'function') {
+                       throw new Error('Navigation getFiles is required and must be a function')
+               }
+
+               if (!view.icon || typeof view.icon !== 'string' || !isSvg(view.icon)) {
+                       throw new Error('Navigation icon is required and must be a valid svg string')
+               }
+       }
+
+       if (!('order' in view) || typeof view.order !== 'number') {
+               throw new Error('Navigation order is required and must be a number')
+       }
+
+       // Optional properties
+       if (view.columns) {
+               view.columns.forEach(isValidColumn)
+       }
+
+       if (view.emptyView && typeof view.emptyView !== 'function') {
+               throw new Error('Navigation emptyView must be a function')
+       }
+
+       if (view.parent && typeof view.parent !== 'string') {
+               throw new Error('Navigation parent must be a string')
+       }
+
+       if ('sticky' in view && typeof view.sticky !== 'boolean') {
+               throw new Error('Navigation sticky must be a boolean')
+       }
+
+       if ('expanded' in view && typeof view.expanded !== 'boolean') {
+               throw new Error('Navigation expanded must be a boolean')
+       }
+
+       return true
+}
+
+/**
+ * Typescript cannot validate an interface.
+ * Please keep in sync with the Column interface requirements.
+ */
+const isValidColumn = function(column: Column): boolean {
+       if (!column.id || typeof column.id !== 'string') {
+               throw new Error('Column id is required')
+       }
+
+       if (!column.title || typeof column.title !== 'string') {
+               throw new Error('Column title is required')
+       }
+
+       if (!column.property || typeof column.property !== 'string') {
+               throw new Error('Column property is required')
+       }
+
+       // Optional properties
+       if (column.sortFunction && typeof column.sortFunction !== 'function') {
+               throw new Error('Column sortFunction must be a function')
+       }
+
+       if (column.summary && typeof column.summary !== 'function') {
+               throw new Error('Column summary must be a function')
+       }
+
+       return true
+}
diff --git a/apps/files/src/views/Navigation.vue b/apps/files/src/views/Navigation.vue
new file mode 100644 (file)
index 0000000..50f5e6f
--- /dev/null
@@ -0,0 +1,156 @@
+<!--
+  - @copyright Copyright (c) 2019 Gary Kim <gary@garykim.dev>
+  -
+  - @author Gary Kim <gary@garykim.dev>
+  -
+  - @license GNU AGPL version 3 or any later version
+  -
+  - This program is free software: you can redistribute it and/or modify
+  - it under the terms of the GNU Affero General Public License as
+  - published by the Free Software Foundation, either version 3 of the
+  - License, or (at your option) any later version.
+  -
+  - This program is distributed in the hope that it will be useful,
+  - but WITHOUT ANY WARRANTY; without even the implied warranty of
+  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  - GNU Affero General Public License for more details.
+  -
+  - You should have received a copy of the GNU Affero General Public License
+  - along with this program. If not, see <http://www.gnu.org/licenses/>.
+  -
+  -->
+<template>
+       <NcAppNavigation>
+               <NcAppNavigationItem v-for="view in parentViews"
+                       :key="view.id"
+                       :allow-collapse="true"
+                       :to="{name: 'filelist', params: { view: view.id }}"
+                       :icon="view.iconClass"
+                       :open="view.expanded"
+                       :pinned="view.sticky"
+                       :title="view.name"
+                       @update:open="onToggleExpand(view)">
+                       <NcAppNavigationItem v-for="child in childViews[view.id]"
+                               :key="child.id"
+                               :to="{name: 'filelist', params: { view: child.id }}"
+                               :icon="child.iconClass"
+                               :title="child.name" />
+               </NcAppNavigationItem>
+       </NcAppNavigation>
+</template>
+
+<script>
+import { emit } from '@nextcloud/event-bus'
+import { generateUrl } from '@nextcloud/router'
+import axios from '@nextcloud/axios'
+import NcAppNavigation from '@nextcloud/vue/dist/Components/NcAppNavigation.js'
+import NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js'
+
+import Navigation from '../services/Navigation.ts'
+import logger from '../logger.js'
+
+export default {
+       name: 'Navigation',
+
+       components: {
+               NcAppNavigation,
+               NcAppNavigationItem,
+       },
+
+       props: {
+               // eslint-disable-next-line vue/prop-name-casing
+               Navigation: {
+                       type: Navigation,
+                       required: true,
+               },
+       },
+
+       data() {
+               return {
+                       key: 'value',
+               }
+       },
+
+       computed: {
+               currentViewId() {
+                       return this.$route.params.view || 'files'
+               },
+               currentView() {
+                       return this.views.find(view => view.id === this.currentViewId)
+               },
+
+               /** @return {Navigation[]} */
+               views() {
+                       return this.Navigation.views
+               },
+               parentViews() {
+                       return this.views
+                               // filter child views
+                               .filter(view => !view.parent)
+                               // sort views by order
+                               .sort((a, b) => {
+                                       return a.order - b.order
+                               })
+               },
+               childViews() {
+                       return this.views
+                               // filter parent views
+                               .filter(view => !!view.parent)
+                               // create a map of parents and their children
+                               .reduce((list, view) => {
+                                       list[view.parent] = [...(list[view.parent] || []), view]
+                                       // Sort children by order
+                                       list[view.parent].sort((a, b) => {
+                                               return a.order - b.order
+                                       })
+                                       return list
+                               }, {})
+               },
+       },
+
+       watch: {
+               currentView(view, oldView) {
+                       logger.debug('View changed', { view })
+                       this.showView(view, oldView)
+               },
+       },
+
+       beforeMount() {
+               if (this.currentView) {
+                       logger.debug('Navigation mounted. Showing requested view', { view: this.currentView })
+                       this.showView(this.currentView)
+               }
+       },
+
+       methods: {
+               /**
+                * @param {Navigation} view the new active view
+                * @param {Navigation} oldView the old active view
+                */
+               showView(view, oldView) {
+                       if (view.legacy) {
+                               document.querySelectorAll('#app-content .viewcontainer').forEach(el => {
+                                       el.classList.add('hidden')
+                               })
+                               document.querySelector('#app-content #app-content-' + this.currentView.id + '.viewcontainer').classList.remove('hidden')
+                       }
+                       this.Navigation.setActive(view)
+                       emit('files:view:changed', view)
+               },
+
+               onToggleExpand(view) {
+                       // Invert state
+                       view.expanded = !view.expanded
+                       axios.post(generateUrl(`/apps/files/api/v1/toggleShowFolder/${view.id}`), { show: view.expanded })
+               },
+       },
+}
+</script>
+
+<style scoped lang="scss">
+// TODO: remove when https://github.com/nextcloud/nextcloud-vue/pull/3539 is in
+.app-navigation::v-deep .app-navigation-entry-icon {
+       background-repeat: no-repeat;
+       background-position: center;
+}
+</style>
index 5684c3d0d32e498207d894f38232e9f8c25df016..9da3f764a7f264196211ecc665443c442855b81e 100644 (file)
@@ -1,4 +1,5 @@
-<div id="app-navigation" role="navigation">
+<div id="app-navigation-files" role="navigation"></div>
+<div class="hidden">
        <ul class="with-icon" tabindex="0">
 
                <?php
index 016e6f32c70c36b0efe869fab6921e6cf95ad064..80eca84ed65825ec51a4d9285d74326956dd0ebf 100644 (file)
@@ -8,6 +8,10 @@
        <label id="view-toggle" for="showgridview" tabindex="0" class="button <?php p($_['showgridview'] ? 'icon-toggle-filelist' : 'icon-toggle-pictures') ?>"
                title="<?php p($_['showgridview'] ? $l->t('Show list view') : $l->t('Show grid view'))?>"></label>
 
+       <!-- New files vue container -->
+       <div id="app-content-vue" class="hidden"></div>
+
+       <!-- Legacy views -->
        <?php foreach ($_['appContents'] as $content) { ?>
        <div id="app-content-<?php p($content['id']) ?>" class="hidden viewcontainer">
        <?php print_unescaped($content['content']) ?>
index 38f3670d4caea382fd474d26c18d3c4d620f5d41..bd178ec1f440ec622aefb41245cd5a5763e268c7 100644 (file)
@@ -248,8 +248,7 @@ class ViewControllerTest extends TestCase {
                                                'quickaccesselement' => 'true',
                                        ],
                                ],
-                               'defaultExpandedState' => false,
-                               'expandedState' => 'show_Quick_Access',
+                               'expanded' => false,
                                'unread' => 0,
                        ],
                        'systemtagsfilter' => [
@@ -323,8 +322,7 @@ class ViewControllerTest extends TestCase {
                                'active' => false,
                                'icon' => '',
                                'type' => 'link',
-                               'expandedState' => 'show_sharing_menu',
-                               'defaultExpandedState' => false,
+                               'expanded' => false,
                                'unread' => 0,
                        ]
                ]);
index 960d376c6d3485bdfc2123fef0105dbdeeef38ec..eff4a3ac5b749b2dbc028ab5dc1e904b98b42454 100644 (file)
@@ -284,7 +284,6 @@ class Application extends App implements IBootstrap {
                                'name' => $l->t('Shares'),
                                'classes' => 'collapsible',
                                'sublist' => $sharingSublistArray,
-                               'expandedState' => 'show_sharing_menu'
                        ];
                });
        }
index e5191b0f7f9315ffc43dbf70f8eb91e6066d9cd0..1d5dc3b6de09621d90ef4ef1e4f0a6dfffc5ede7 100644 (file)
@@ -4,6 +4,8 @@ module.exports = {
                '@babel/plugin-proposal-class-properties',
        ],
        presets: [
+               // https://babeljs.io/docs/en/babel-preset-typescript
+               '@babel/preset-typescript',
                [
                        '@babel/preset-env',
                        {
index 9c28b989eebe3c0e120f0c11e436576ac3298bca..d35c251dff15a57e3dc6cdc2df8b977cd19cc4ed 100644 (file)
@@ -11,7 +11,7 @@
       "dependencies": {
         "@chenfengyuan/vue-qrcode": "^1.0.2",
         "@mdi/svg": "^7.0.96",
-        "@nextcloud/auth": "^1.3.0",
+        "@nextcloud/auth": "^2.0.0",
         "@nextcloud/axios": "^1.10.0",
         "@nextcloud/browser-storage": "^0.1.1",
         "@nextcloud/browserslist-config": "^2.3.0",
         "@nextcloud/capabilities": "^1.0.4",
         "@nextcloud/dialogs": "^4.0.0-beta.2",
         "@nextcloud/event-bus": "^3.0.2",
-        "@nextcloud/files": "^2.1.0",
-        "@nextcloud/initial-state": "^1.2.1",
+        "@nextcloud/files": "^3.0.0-beta.5",
+        "@nextcloud/initial-state": "^2.0.0",
         "@nextcloud/l10n": "^1.6.0",
-        "@nextcloud/logger": "^2.1.0",
+        "@nextcloud/logger": "^2.4.0",
         "@nextcloud/moment": "^1.2.1",
         "@nextcloud/password-confirmation": "^4.0.2",
         "@nextcloud/paths": "^2.1.0",
@@ -48,6 +48,7 @@
         "focus-visible": "^5.2.0",
         "handlebars": "^4.7.7",
         "ical.js": "^1.4.0",
+        "is-svg": "^4.3.2",
         "jquery": "~3.6",
         "jquery-migrate": "~3.4",
         "jquery-ui": "^1.13.2",
@@ -89,6 +90,7 @@
       },
       "devDependencies": {
         "@babel/node": "^7.20.0",
+        "@babel/preset-typescript": "^7.18.6",
         "@cypress/browserify-preprocessor": "^3.0.2",
         "@nextcloud/babel-config": "^1.0.0",
         "@nextcloud/cypress": "^1.0.0-beta.1",
       "dev": true
     },
     "node_modules/@babel/code-frame": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz",
-      "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz",
+      "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==",
       "dev": true,
       "dependencies": {
-        "@babel/highlight": "^7.16.7"
+        "@babel/highlight": "^7.18.6"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/generator": {
-      "version": "7.16.8",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz",
-      "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz",
+      "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==",
       "dev": true,
       "dependencies": {
-        "@babel/types": "^7.16.8",
-        "jsesc": "^2.5.1",
-        "source-map": "^0.5.0"
+        "@babel/types": "^7.20.7",
+        "@jridgewell/gen-mapping": "^0.3.2",
+        "jsesc": "^2.5.1"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-create-class-features-plugin": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz",
-      "integrity": "sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.7.tgz",
+      "integrity": "sha512-LtoWbDXOaidEf50hmdDqn9g8VEzsorMexoWMQdQODbvmqYmaF23pBP5VNPAGIFHsFQCIeKokDiz3CH5Y2jlY6w==",
       "dev": true,
       "dependencies": {
-        "@babel/helper-annotate-as-pure": "^7.16.7",
-        "@babel/helper-environment-visitor": "^7.16.7",
-        "@babel/helper-function-name": "^7.16.7",
-        "@babel/helper-member-expression-to-functions": "^7.16.7",
-        "@babel/helper-optimise-call-expression": "^7.16.7",
-        "@babel/helper-replace-supers": "^7.16.7",
-        "@babel/helper-split-export-declaration": "^7.16.7"
+        "@babel/helper-annotate-as-pure": "^7.18.6",
+        "@babel/helper-environment-visitor": "^7.18.9",
+        "@babel/helper-function-name": "^7.19.0",
+        "@babel/helper-member-expression-to-functions": "^7.20.7",
+        "@babel/helper-optimise-call-expression": "^7.18.6",
+        "@babel/helper-replace-supers": "^7.20.7",
+        "@babel/helper-split-export-declaration": "^7.18.6"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-environment-visitor": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz",
-      "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==",
+      "version": "7.18.9",
+      "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz",
+      "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==",
       "dev": true,
-      "dependencies": {
-        "@babel/types": "^7.16.7"
-      },
       "engines": {
         "node": ">=6.9.0"
       }
       }
     },
     "node_modules/@babel/helper-function-name": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz",
-      "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==",
-      "dev": true,
-      "dependencies": {
-        "@babel/helper-get-function-arity": "^7.16.7",
-        "@babel/template": "^7.16.7",
-        "@babel/types": "^7.16.7"
-      },
-      "engines": {
-        "node": ">=6.9.0"
-      }
-    },
-    "node_modules/@babel/helper-get-function-arity": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz",
-      "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==",
+      "version": "7.19.0",
+      "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz",
+      "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==",
       "dev": true,
       "dependencies": {
-        "@babel/types": "^7.16.7"
+        "@babel/template": "^7.18.10",
+        "@babel/types": "^7.19.0"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-hoist-variables": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz",
-      "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz",
+      "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==",
       "dev": true,
       "dependencies": {
-        "@babel/types": "^7.16.7"
+        "@babel/types": "^7.18.6"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-member-expression-to-functions": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz",
-      "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz",
+      "integrity": "sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw==",
       "dev": true,
       "dependencies": {
-        "@babel/types": "^7.16.7"
+        "@babel/types": "^7.20.7"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-optimise-call-expression": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz",
-      "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz",
+      "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==",
       "dev": true,
       "dependencies": {
-        "@babel/types": "^7.16.7"
+        "@babel/types": "^7.18.6"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-plugin-utils": {
-      "version": "7.19.0",
-      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz",
-      "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==",
+      "version": "7.20.2",
+      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz",
+      "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==",
       "dev": true,
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-replace-supers": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz",
-      "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz",
+      "integrity": "sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A==",
       "dev": true,
       "dependencies": {
-        "@babel/helper-environment-visitor": "^7.16.7",
-        "@babel/helper-member-expression-to-functions": "^7.16.7",
-        "@babel/helper-optimise-call-expression": "^7.16.7",
-        "@babel/traverse": "^7.16.7",
-        "@babel/types": "^7.16.7"
+        "@babel/helper-environment-visitor": "^7.18.9",
+        "@babel/helper-member-expression-to-functions": "^7.20.7",
+        "@babel/helper-optimise-call-expression": "^7.18.6",
+        "@babel/template": "^7.20.7",
+        "@babel/traverse": "^7.20.7",
+        "@babel/types": "^7.20.7"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/helper-split-export-declaration": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz",
-      "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
+      "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==",
       "dev": true,
       "dependencies": {
-        "@babel/types": "^7.16.7"
+        "@babel/types": "^7.18.6"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/highlight": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz",
-      "integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
+      "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
       "dev": true,
       "dependencies": {
-        "@babel/helper-validator-identifier": "^7.16.7",
+        "@babel/helper-validator-identifier": "^7.18.6",
         "chalk": "^2.0.0",
         "js-tokens": "^4.0.0"
       },
       }
     },
     "node_modules/@babel/parser": {
-      "version": "7.18.13",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz",
-      "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz",
+      "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==",
       "bin": {
         "parser": "bin/babel-parser.js"
       },
       }
     },
     "node_modules/@babel/plugin-syntax-typescript": {
-      "version": "7.18.6",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz",
-      "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==",
+      "version": "7.20.0",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz",
+      "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==",
       "dev": true,
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.18.6"
+        "@babel/helper-plugin-utils": "^7.19.0"
       },
       "engines": {
         "node": ">=6.9.0"
         "@babel/core": "^7.0.0-0"
       }
     },
+    "node_modules/@babel/plugin-transform-typescript": {
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.7.tgz",
+      "integrity": "sha512-m3wVKEvf6SoszD8pu4NZz3PvfKRCMgk6D6d0Qi9hNnlM5M6CFS92EgF4EiHVLKbU0r/r7ty1hg7NPZwE7WRbYw==",
+      "dev": true,
+      "dependencies": {
+        "@babel/helper-create-class-features-plugin": "^7.20.7",
+        "@babel/helper-plugin-utils": "^7.20.2",
+        "@babel/plugin-syntax-typescript": "^7.20.0"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
+      }
+    },
     "node_modules/@babel/plugin-transform-unicode-escapes": {
       "version": "7.16.7",
       "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz",
         "@babel/core": "^7.0.0-0"
       }
     },
+    "node_modules/@babel/preset-typescript": {
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz",
+      "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==",
+      "dev": true,
+      "dependencies": {
+        "@babel/helper-plugin-utils": "^7.18.6",
+        "@babel/helper-validator-option": "^7.18.6",
+        "@babel/plugin-transform-typescript": "^7.18.6"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
+      }
+    },
     "node_modules/@babel/register": {
       "version": "7.18.9",
       "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.18.9.tgz",
       }
     },
     "node_modules/@babel/template": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz",
-      "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
+      "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
       "dev": true,
       "dependencies": {
-        "@babel/code-frame": "^7.16.7",
-        "@babel/parser": "^7.16.7",
-        "@babel/types": "^7.16.7"
+        "@babel/code-frame": "^7.18.6",
+        "@babel/parser": "^7.20.7",
+        "@babel/types": "^7.20.7"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/traverse": {
-      "version": "7.16.8",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.8.tgz",
-      "integrity": "sha512-xe+H7JlvKsDQwXRsBhSnq1/+9c+LlQcCK3Tn/l5sbx02HYns/cn7ibp9+RV1sIUqu7hKg91NWsgHurO9dowITQ==",
-      "dev": true,
-      "dependencies": {
-        "@babel/code-frame": "^7.16.7",
-        "@babel/generator": "^7.16.8",
-        "@babel/helper-environment-visitor": "^7.16.7",
-        "@babel/helper-function-name": "^7.16.7",
-        "@babel/helper-hoist-variables": "^7.16.7",
-        "@babel/helper-split-export-declaration": "^7.16.7",
-        "@babel/parser": "^7.16.8",
-        "@babel/types": "^7.16.8",
+      "version": "7.20.10",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz",
+      "integrity": "sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg==",
+      "dev": true,
+      "dependencies": {
+        "@babel/code-frame": "^7.18.6",
+        "@babel/generator": "^7.20.7",
+        "@babel/helper-environment-visitor": "^7.18.9",
+        "@babel/helper-function-name": "^7.19.0",
+        "@babel/helper-hoist-variables": "^7.18.6",
+        "@babel/helper-split-export-declaration": "^7.18.6",
+        "@babel/parser": "^7.20.7",
+        "@babel/types": "^7.20.7",
         "debug": "^4.1.0",
         "globals": "^11.1.0"
       },
       }
     },
     "node_modules/@babel/types": {
-      "version": "7.20.5",
-      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz",
-      "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz",
+      "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==",
       "dev": true,
       "dependencies": {
         "@babel/helper-string-parser": "^7.19.4",
       "integrity": "sha512-5DC+w7Kl2C82j4aTWCUf6wtHzgY60WBf1gT1qrpkLaMNcH6Vj9FpYPAXdSmtdkmSMvVMs8i1Rtv9cXWcHFQYpw=="
     },
     "node_modules/@nextcloud/auth": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.0.0.tgz",
+      "integrity": "sha512-v8K8tvjkOsGt1+gKydVeMiEwWLXlfPWSptXnMqP21Xd6pFAQxNuNNCY679XKU4MNaKzpZqLstCCxv/KrjeQv8A==",
+      "dependencies": {
+        "@nextcloud/event-bus": "^3.0.0"
+      }
+    },
+    "node_modules/@nextcloud/axios": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-1.10.0.tgz",
+      "integrity": "sha512-dC+Z5ibBRxkep6ysoRmUldUfQsZiqC5fGLbwwU0Unxjy+Qrcl2U9rcljZJagwXs1kag5/KZFG1rlGcew2GAgyg==",
+      "dependencies": {
+        "@nextcloud/auth": "^1.3.0",
+        "axios": "^0.27.1",
+        "core-js": "^3.6.4"
+      },
+      "engines": {
+        "node": "^14",
+        "npm": "^7"
+      }
+    },
+    "node_modules/@nextcloud/axios/node_modules/@nextcloud/auth": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-1.3.0.tgz",
       "integrity": "sha512-GfwRM9W7hat4psNdAt74UHEV+drEXQ53klCVp6JpON66ZLPeK5eJ1LQuiQDkpUxZpqNeaumXjiB98h5cug/uQw==",
         "core-js": "^3.6.4"
       }
     },
-    "node_modules/@nextcloud/auth/node_modules/@nextcloud/event-bus": {
+    "node_modules/@nextcloud/axios/node_modules/@nextcloud/event-bus": {
       "version": "1.3.0",
       "resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-1.3.0.tgz",
       "integrity": "sha512-+U5MnCvfnNWvf0lvdqJg8F+Nm8wN+s9ayuBjtiEQxTAcootv7lOnlMgfreqF3l2T0Wet2uZh4JbFVUWf8l3w7g==",
         "semver": "^7.3.5"
       }
     },
-    "node_modules/@nextcloud/auth/node_modules/semver": {
-      "version": "7.3.5",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
-      "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+    "node_modules/@nextcloud/axios/node_modules/semver": {
+      "version": "7.3.8",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+      "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
       "dependencies": {
         "lru-cache": "^6.0.0"
       },
         "node": ">=10"
       }
     },
-    "node_modules/@nextcloud/axios": {
-      "version": "1.10.0",
-      "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-1.10.0.tgz",
-      "integrity": "sha512-dC+Z5ibBRxkep6ysoRmUldUfQsZiqC5fGLbwwU0Unxjy+Qrcl2U9rcljZJagwXs1kag5/KZFG1rlGcew2GAgyg==",
-      "dependencies": {
-        "@nextcloud/auth": "^1.3.0",
-        "axios": "^0.27.1",
-        "core-js": "^3.6.4"
-      },
-      "engines": {
-        "node": "^14",
-        "npm": "^7"
-      }
-    },
     "node_modules/@nextcloud/babel-config": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/@nextcloud/babel-config/-/babel-config-1.0.0.tgz",
         "core-js": "^3.6.4"
       }
     },
+    "node_modules/@nextcloud/capabilities/node_modules/@nextcloud/initial-state": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-1.2.1.tgz",
+      "integrity": "sha512-2TH2DzJBolYHWfbSovTWkByAIg0gdsyuVfZpf5APnJu/9PixXKbnrVFnaEdxjeP262Gok7ARMFFQeSiuzKRQeQ==",
+      "dependencies": {
+        "core-js": "^3.6.4"
+      }
+    },
     "node_modules/@nextcloud/cypress": {
       "version": "1.0.0-beta.1",
       "resolved": "https://registry.npmjs.org/@nextcloud/cypress/-/cypress-1.0.0-beta.1.tgz",
       }
     },
     "node_modules/@nextcloud/files": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-2.1.0.tgz",
-      "integrity": "sha512-i5Q8oNPONwBWLnNjQOC3EmnUhExXpwmO45BonzaovzXdhFzFeT/g85kRNR8LWEjiK9vOMOdozz+z6I0adU0JlQ==",
+      "version": "3.0.0-beta.5",
+      "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.0.0-beta.5.tgz",
+      "integrity": "sha512-OWHGjQNafABmg/0GXpEyBFFodlYByzALa7hN+pb1gdd1w5U3YJViir2cFBMJiwG0pjFDqB/hVo6I/zX+nvNsqA==",
       "dependencies": {
-        "@nextcloud/l10n": "^1.3.0",
-        "core-js": "^3.6.4"
+        "@nextcloud/auth": "^2.0.0",
+        "@nextcloud/l10n": "^1.6.0",
+        "@nextcloud/logger": "^2.1.0"
+      },
+      "engines": {
+        "node": "^16.0.0",
+        "npm": "^7.0.0 || ^8.0.0"
       }
     },
     "node_modules/@nextcloud/initial-state": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-1.2.1.tgz",
-      "integrity": "sha512-2TH2DzJBolYHWfbSovTWkByAIg0gdsyuVfZpf5APnJu/9PixXKbnrVFnaEdxjeP262Gok7ARMFFQeSiuzKRQeQ==",
-      "dependencies": {
-        "core-js": "^3.6.4"
-      }
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-2.0.0.tgz",
+      "integrity": "sha512-xmNP30v/RnkJ2z1HcuEo7YfcLJJa+FdWTwgNldXHOlMeMbl/ESpsGkWL2sULrhYurz64L0JpfwEdi/cHcmyuZQ=="
     },
     "node_modules/@nextcloud/l10n": {
       "version": "1.6.0",
       }
     },
     "node_modules/@nextcloud/logger": {
-      "version": "2.2.1",
-      "resolved": "https://registry.npmjs.org/@nextcloud/logger/-/logger-2.2.1.tgz",
-      "integrity": "sha512-MP2/5ZdjDfcTPO5ASfqV5fVU6TYeaa2QOsi2yXBHrmlJ34+HlDdsoVzDGPrbutGCToAuBDSu7nh0WW2aLOp/9A==",
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/logger/-/logger-2.4.0.tgz",
+      "integrity": "sha512-OXNpa+GdA+mxSmpyFaf3PJjLdSYNJaBWfa1Ey4gF7Ap76Ndya8d43TX0sdfakCAjuZsTS/y5JfKuwHjpeipdhQ==",
       "dependencies": {
-        "@nextcloud/auth": "^1.2.2",
+        "@nextcloud/auth": "^2.0.0",
         "core-js": "^3.6.4"
+      },
+      "engines": {
+        "node": "^16.0.0",
+        "npm": "^7.0.0 || ^8.0.0"
       }
     },
     "node_modules/@nextcloud/moment": {
         "npm": "^7.0.0 || ^8.0.0"
       }
     },
-    "node_modules/@nextcloud/password-confirmation/node_modules/@nextcloud/auth": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.0.0.tgz",
-      "integrity": "sha512-v8K8tvjkOsGt1+gKydVeMiEwWLXlfPWSptXnMqP21Xd6pFAQxNuNNCY679XKU4MNaKzpZqLstCCxv/KrjeQv8A==",
-      "dependencies": {
-        "@nextcloud/event-bus": "^3.0.0"
-      }
-    },
     "node_modules/@nextcloud/password-confirmation/node_modules/@nextcloud/axios": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.0.0.tgz",
         "vue": "^2.6.11"
       }
     },
+    "node_modules/@nextcloud/vue-dashboard/node_modules/@nextcloud/auth": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-1.3.0.tgz",
+      "integrity": "sha512-GfwRM9W7hat4psNdAt74UHEV+drEXQ53klCVp6JpON66ZLPeK5eJ1LQuiQDkpUxZpqNeaumXjiB98h5cug/uQw==",
+      "dependencies": {
+        "@nextcloud/event-bus": "^1.1.3",
+        "@nextcloud/typings": "^0.2.2",
+        "core-js": "^3.6.4"
+      }
+    },
+    "node_modules/@nextcloud/vue-dashboard/node_modules/@nextcloud/auth/node_modules/@nextcloud/typings": {
+      "version": "0.2.4",
+      "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-0.2.4.tgz",
+      "integrity": "sha512-49M8XUDQH27VIQE+13KrqSOYcyOsDUk6Yfw17jbBVtXFoDJ3YBSYYq8YaKeAM3Lz2JVbEpqQW9suAT+EyYSb6g==",
+      "dependencies": {
+        "@types/jquery": "2.0.54"
+      }
+    },
+    "node_modules/@nextcloud/vue-dashboard/node_modules/@nextcloud/auth/node_modules/@types/jquery": {
+      "version": "2.0.54",
+      "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.54.tgz",
+      "integrity": "sha512-D/PomKwNkDfSKD13DEVQT/pq2TUjN54c6uB341fEZanIzkjfGe7UaFuuaLZbpEiS5j7Wk2MUHAZqZIoECw29lg=="
+    },
     "node_modules/@nextcloud/vue-dashboard/node_modules/@nextcloud/dialogs": {
       "version": "3.2.0",
       "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-3.2.0.tgz",
         "webpack": "^4.0.0 || ^5.0.0"
       }
     },
-    "node_modules/@nextcloud/vue/node_modules/@nextcloud/auth": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.0.0.tgz",
-      "integrity": "sha512-v8K8tvjkOsGt1+gKydVeMiEwWLXlfPWSptXnMqP21Xd6pFAQxNuNNCY679XKU4MNaKzpZqLstCCxv/KrjeQv8A==",
-      "dependencies": {
-        "@nextcloud/event-bus": "^3.0.0"
-      }
-    },
     "node_modules/@nextcloud/vue/node_modules/@nextcloud/axios": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.0.0.tgz",
         "npm": "^7.0.0 || ^8.0.0"
       }
     },
-    "node_modules/@nextcloud/vue/node_modules/@nextcloud/initial-state": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-2.0.0.tgz",
-      "integrity": "sha512-xmNP30v/RnkJ2z1HcuEo7YfcLJJa+FdWTwgNldXHOlMeMbl/ESpsGkWL2sULrhYurz64L0JpfwEdi/cHcmyuZQ=="
-    },
     "node_modules/@nextcloud/vue/node_modules/@nextcloud/typings": {
       "version": "1.4.3",
       "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-1.4.3.tgz",
         "vue": "^2.6.14"
       }
     },
+    "node_modules/nextcloud-vue-collections/node_modules/@nextcloud/auth": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-1.3.0.tgz",
+      "integrity": "sha512-GfwRM9W7hat4psNdAt74UHEV+drEXQ53klCVp6JpON66ZLPeK5eJ1LQuiQDkpUxZpqNeaumXjiB98h5cug/uQw==",
+      "dependencies": {
+        "@nextcloud/event-bus": "^1.1.3",
+        "@nextcloud/typings": "^0.2.2",
+        "core-js": "^3.6.4"
+      }
+    },
+    "node_modules/nextcloud-vue-collections/node_modules/@nextcloud/auth/node_modules/@nextcloud/typings": {
+      "version": "0.2.4",
+      "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-0.2.4.tgz",
+      "integrity": "sha512-49M8XUDQH27VIQE+13KrqSOYcyOsDUk6Yfw17jbBVtXFoDJ3YBSYYq8YaKeAM3Lz2JVbEpqQW9suAT+EyYSb6g==",
+      "dependencies": {
+        "@types/jquery": "2.0.54"
+      }
+    },
+    "node_modules/nextcloud-vue-collections/node_modules/@nextcloud/auth/node_modules/@types/jquery": {
+      "version": "2.0.54",
+      "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.54.tgz",
+      "integrity": "sha512-D/PomKwNkDfSKD13DEVQT/pq2TUjN54c6uB341fEZanIzkjfGe7UaFuuaLZbpEiS5j7Wk2MUHAZqZIoECw29lg=="
+    },
     "node_modules/nextcloud-vue-collections/node_modules/@nextcloud/dialogs": {
       "version": "3.2.0",
       "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-3.2.0.tgz",
       "dev": true
     },
     "@babel/code-frame": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz",
-      "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz",
+      "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==",
       "dev": true,
       "requires": {
-        "@babel/highlight": "^7.16.7"
+        "@babel/highlight": "^7.18.6"
       }
     },
     "@babel/compat-data": {
       }
     },
     "@babel/generator": {
-      "version": "7.16.8",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz",
-      "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz",
+      "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==",
       "dev": true,
       "requires": {
-        "@babel/types": "^7.16.8",
-        "jsesc": "^2.5.1",
-        "source-map": "^0.5.0"
+        "@babel/types": "^7.20.7",
+        "@jridgewell/gen-mapping": "^0.3.2",
+        "jsesc": "^2.5.1"
       }
     },
     "@babel/helper-annotate-as-pure": {
       }
     },
     "@babel/helper-create-class-features-plugin": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz",
-      "integrity": "sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.7.tgz",
+      "integrity": "sha512-LtoWbDXOaidEf50hmdDqn9g8VEzsorMexoWMQdQODbvmqYmaF23pBP5VNPAGIFHsFQCIeKokDiz3CH5Y2jlY6w==",
       "dev": true,
       "requires": {
-        "@babel/helper-annotate-as-pure": "^7.16.7",
-        "@babel/helper-environment-visitor": "^7.16.7",
-        "@babel/helper-function-name": "^7.16.7",
-        "@babel/helper-member-expression-to-functions": "^7.16.7",
-        "@babel/helper-optimise-call-expression": "^7.16.7",
-        "@babel/helper-replace-supers": "^7.16.7",
-        "@babel/helper-split-export-declaration": "^7.16.7"
+        "@babel/helper-annotate-as-pure": "^7.18.6",
+        "@babel/helper-environment-visitor": "^7.18.9",
+        "@babel/helper-function-name": "^7.19.0",
+        "@babel/helper-member-expression-to-functions": "^7.20.7",
+        "@babel/helper-optimise-call-expression": "^7.18.6",
+        "@babel/helper-replace-supers": "^7.20.7",
+        "@babel/helper-split-export-declaration": "^7.18.6"
       }
     },
     "@babel/helper-create-regexp-features-plugin": {
       }
     },
     "@babel/helper-environment-visitor": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz",
-      "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==",
-      "dev": true,
-      "requires": {
-        "@babel/types": "^7.16.7"
-      }
+      "version": "7.18.9",
+      "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz",
+      "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==",
+      "dev": true
     },
     "@babel/helper-explode-assignable-expression": {
       "version": "7.16.7",
       }
     },
     "@babel/helper-function-name": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz",
-      "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==",
-      "dev": true,
-      "requires": {
-        "@babel/helper-get-function-arity": "^7.16.7",
-        "@babel/template": "^7.16.7",
-        "@babel/types": "^7.16.7"
-      }
-    },
-    "@babel/helper-get-function-arity": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz",
-      "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==",
+      "version": "7.19.0",
+      "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz",
+      "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==",
       "dev": true,
       "requires": {
-        "@babel/types": "^7.16.7"
+        "@babel/template": "^7.18.10",
+        "@babel/types": "^7.19.0"
       }
     },
     "@babel/helper-hoist-variables": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz",
-      "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz",
+      "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==",
       "dev": true,
       "requires": {
-        "@babel/types": "^7.16.7"
+        "@babel/types": "^7.18.6"
       }
     },
     "@babel/helper-member-expression-to-functions": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz",
-      "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz",
+      "integrity": "sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw==",
       "dev": true,
       "requires": {
-        "@babel/types": "^7.16.7"
+        "@babel/types": "^7.20.7"
       }
     },
     "@babel/helper-module-imports": {
       }
     },
     "@babel/helper-optimise-call-expression": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz",
-      "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz",
+      "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==",
       "dev": true,
       "requires": {
-        "@babel/types": "^7.16.7"
+        "@babel/types": "^7.18.6"
       }
     },
     "@babel/helper-plugin-utils": {
-      "version": "7.19.0",
-      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz",
-      "integrity": "sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw==",
+      "version": "7.20.2",
+      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz",
+      "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==",
       "dev": true
     },
     "@babel/helper-remap-async-to-generator": {
       }
     },
     "@babel/helper-replace-supers": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz",
-      "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz",
+      "integrity": "sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A==",
       "dev": true,
       "requires": {
-        "@babel/helper-environment-visitor": "^7.16.7",
-        "@babel/helper-member-expression-to-functions": "^7.16.7",
-        "@babel/helper-optimise-call-expression": "^7.16.7",
-        "@babel/traverse": "^7.16.7",
-        "@babel/types": "^7.16.7"
+        "@babel/helper-environment-visitor": "^7.18.9",
+        "@babel/helper-member-expression-to-functions": "^7.20.7",
+        "@babel/helper-optimise-call-expression": "^7.18.6",
+        "@babel/template": "^7.20.7",
+        "@babel/traverse": "^7.20.7",
+        "@babel/types": "^7.20.7"
       }
     },
     "@babel/helper-simple-access": {
       }
     },
     "@babel/helper-split-export-declaration": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz",
-      "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
+      "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==",
       "dev": true,
       "requires": {
-        "@babel/types": "^7.16.7"
+        "@babel/types": "^7.18.6"
       }
     },
     "@babel/helper-string-parser": {
       }
     },
     "@babel/highlight": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz",
-      "integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==",
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
+      "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
       "dev": true,
       "requires": {
-        "@babel/helper-validator-identifier": "^7.16.7",
+        "@babel/helper-validator-identifier": "^7.18.6",
         "chalk": "^2.0.0",
         "js-tokens": "^4.0.0"
       }
       }
     },
     "@babel/parser": {
-      "version": "7.18.13",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz",
-      "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg=="
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz",
+      "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg=="
     },
     "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
       "version": "7.16.7",
       }
     },
     "@babel/plugin-syntax-typescript": {
-      "version": "7.18.6",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz",
-      "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==",
+      "version": "7.20.0",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz",
+      "integrity": "sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==",
       "dev": true,
       "requires": {
-        "@babel/helper-plugin-utils": "^7.18.6"
+        "@babel/helper-plugin-utils": "^7.19.0"
       }
     },
     "@babel/plugin-transform-arrow-functions": {
         "@babel/helper-plugin-utils": "^7.16.7"
       }
     },
+    "@babel/plugin-transform-typescript": {
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.7.tgz",
+      "integrity": "sha512-m3wVKEvf6SoszD8pu4NZz3PvfKRCMgk6D6d0Qi9hNnlM5M6CFS92EgF4EiHVLKbU0r/r7ty1hg7NPZwE7WRbYw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-class-features-plugin": "^7.20.7",
+        "@babel/helper-plugin-utils": "^7.20.2",
+        "@babel/plugin-syntax-typescript": "^7.20.0"
+      }
+    },
     "@babel/plugin-transform-unicode-escapes": {
       "version": "7.16.7",
       "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz",
         "@babel/plugin-transform-react-pure-annotations": "^7.18.6"
       }
     },
+    "@babel/preset-typescript": {
+      "version": "7.18.6",
+      "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz",
+      "integrity": "sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.18.6",
+        "@babel/helper-validator-option": "^7.18.6",
+        "@babel/plugin-transform-typescript": "^7.18.6"
+      }
+    },
     "@babel/register": {
       "version": "7.18.9",
       "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.18.9.tgz",
       }
     },
     "@babel/template": {
-      "version": "7.16.7",
-      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz",
-      "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
+      "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
       "dev": true,
       "requires": {
-        "@babel/code-frame": "^7.16.7",
-        "@babel/parser": "^7.16.7",
-        "@babel/types": "^7.16.7"
+        "@babel/code-frame": "^7.18.6",
+        "@babel/parser": "^7.20.7",
+        "@babel/types": "^7.20.7"
       }
     },
     "@babel/traverse": {
-      "version": "7.16.8",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.8.tgz",
-      "integrity": "sha512-xe+H7JlvKsDQwXRsBhSnq1/+9c+LlQcCK3Tn/l5sbx02HYns/cn7ibp9+RV1sIUqu7hKg91NWsgHurO9dowITQ==",
-      "dev": true,
-      "requires": {
-        "@babel/code-frame": "^7.16.7",
-        "@babel/generator": "^7.16.8",
-        "@babel/helper-environment-visitor": "^7.16.7",
-        "@babel/helper-function-name": "^7.16.7",
-        "@babel/helper-hoist-variables": "^7.16.7",
-        "@babel/helper-split-export-declaration": "^7.16.7",
-        "@babel/parser": "^7.16.8",
-        "@babel/types": "^7.16.8",
+      "version": "7.20.10",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz",
+      "integrity": "sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.18.6",
+        "@babel/generator": "^7.20.7",
+        "@babel/helper-environment-visitor": "^7.18.9",
+        "@babel/helper-function-name": "^7.19.0",
+        "@babel/helper-hoist-variables": "^7.18.6",
+        "@babel/helper-split-export-declaration": "^7.18.6",
+        "@babel/parser": "^7.20.7",
+        "@babel/types": "^7.20.7",
         "debug": "^4.1.0",
         "globals": "^11.1.0"
       }
     },
     "@babel/types": {
-      "version": "7.20.5",
-      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz",
-      "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==",
+      "version": "7.20.7",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz",
+      "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==",
       "dev": true,
       "requires": {
         "@babel/helper-string-parser": "^7.19.4",
       "integrity": "sha512-5DC+w7Kl2C82j4aTWCUf6wtHzgY60WBf1gT1qrpkLaMNcH6Vj9FpYPAXdSmtdkmSMvVMs8i1Rtv9cXWcHFQYpw=="
     },
     "@nextcloud/auth": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-1.3.0.tgz",
-      "integrity": "sha512-GfwRM9W7hat4psNdAt74UHEV+drEXQ53klCVp6JpON66ZLPeK5eJ1LQuiQDkpUxZpqNeaumXjiB98h5cug/uQw==",
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.0.0.tgz",
+      "integrity": "sha512-v8K8tvjkOsGt1+gKydVeMiEwWLXlfPWSptXnMqP21Xd6pFAQxNuNNCY679XKU4MNaKzpZqLstCCxv/KrjeQv8A==",
       "requires": {
-        "@nextcloud/event-bus": "^1.1.3",
-        "@nextcloud/typings": "^0.2.2",
+        "@nextcloud/event-bus": "^3.0.0"
+      }
+    },
+    "@nextcloud/axios": {
+      "version": "1.10.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-1.10.0.tgz",
+      "integrity": "sha512-dC+Z5ibBRxkep6ysoRmUldUfQsZiqC5fGLbwwU0Unxjy+Qrcl2U9rcljZJagwXs1kag5/KZFG1rlGcew2GAgyg==",
+      "requires": {
+        "@nextcloud/auth": "^1.3.0",
+        "axios": "^0.27.1",
         "core-js": "^3.6.4"
       },
       "dependencies": {
+        "@nextcloud/auth": {
+          "version": "1.3.0",
+          "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-1.3.0.tgz",
+          "integrity": "sha512-GfwRM9W7hat4psNdAt74UHEV+drEXQ53klCVp6JpON66ZLPeK5eJ1LQuiQDkpUxZpqNeaumXjiB98h5cug/uQw==",
+          "requires": {
+            "@nextcloud/event-bus": "^1.1.3",
+            "@nextcloud/typings": "^0.2.2",
+            "core-js": "^3.6.4"
+          }
+        },
         "@nextcloud/event-bus": {
           "version": "1.3.0",
           "resolved": "https://registry.npmjs.org/@nextcloud/event-bus/-/event-bus-1.3.0.tgz",
           }
         },
         "semver": {
-          "version": "7.3.5",
-          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
-          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+          "version": "7.3.8",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+          "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
           "requires": {
             "lru-cache": "^6.0.0"
           }
         }
       }
     },
-    "@nextcloud/axios": {
-      "version": "1.10.0",
-      "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-1.10.0.tgz",
-      "integrity": "sha512-dC+Z5ibBRxkep6ysoRmUldUfQsZiqC5fGLbwwU0Unxjy+Qrcl2U9rcljZJagwXs1kag5/KZFG1rlGcew2GAgyg==",
-      "requires": {
-        "@nextcloud/auth": "^1.3.0",
-        "axios": "^0.27.1",
-        "core-js": "^3.6.4"
-      }
-    },
     "@nextcloud/babel-config": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/@nextcloud/babel-config/-/babel-config-1.0.0.tgz",
       "requires": {
         "@nextcloud/initial-state": "^1.1.2",
         "core-js": "^3.6.4"
+      },
+      "dependencies": {
+        "@nextcloud/initial-state": {
+          "version": "1.2.1",
+          "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-1.2.1.tgz",
+          "integrity": "sha512-2TH2DzJBolYHWfbSovTWkByAIg0gdsyuVfZpf5APnJu/9PixXKbnrVFnaEdxjeP262Gok7ARMFFQeSiuzKRQeQ==",
+          "requires": {
+            "core-js": "^3.6.4"
+          }
+        }
       }
     },
     "@nextcloud/cypress": {
       }
     },
     "@nextcloud/files": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-2.1.0.tgz",
-      "integrity": "sha512-i5Q8oNPONwBWLnNjQOC3EmnUhExXpwmO45BonzaovzXdhFzFeT/g85kRNR8LWEjiK9vOMOdozz+z6I0adU0JlQ==",
+      "version": "3.0.0-beta.5",
+      "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.0.0-beta.5.tgz",
+      "integrity": "sha512-OWHGjQNafABmg/0GXpEyBFFodlYByzALa7hN+pb1gdd1w5U3YJViir2cFBMJiwG0pjFDqB/hVo6I/zX+nvNsqA==",
       "requires": {
-        "@nextcloud/l10n": "^1.3.0",
-        "core-js": "^3.6.4"
+        "@nextcloud/auth": "^2.0.0",
+        "@nextcloud/l10n": "^1.6.0",
+        "@nextcloud/logger": "^2.1.0"
       }
     },
     "@nextcloud/initial-state": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-1.2.1.tgz",
-      "integrity": "sha512-2TH2DzJBolYHWfbSovTWkByAIg0gdsyuVfZpf5APnJu/9PixXKbnrVFnaEdxjeP262Gok7ARMFFQeSiuzKRQeQ==",
-      "requires": {
-        "core-js": "^3.6.4"
-      }
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-2.0.0.tgz",
+      "integrity": "sha512-xmNP30v/RnkJ2z1HcuEo7YfcLJJa+FdWTwgNldXHOlMeMbl/ESpsGkWL2sULrhYurz64L0JpfwEdi/cHcmyuZQ=="
     },
     "@nextcloud/l10n": {
       "version": "1.6.0",
       }
     },
     "@nextcloud/logger": {
-      "version": "2.2.1",
-      "resolved": "https://registry.npmjs.org/@nextcloud/logger/-/logger-2.2.1.tgz",
-      "integrity": "sha512-MP2/5ZdjDfcTPO5ASfqV5fVU6TYeaa2QOsi2yXBHrmlJ34+HlDdsoVzDGPrbutGCToAuBDSu7nh0WW2aLOp/9A==",
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/@nextcloud/logger/-/logger-2.4.0.tgz",
+      "integrity": "sha512-OXNpa+GdA+mxSmpyFaf3PJjLdSYNJaBWfa1Ey4gF7Ap76Ndya8d43TX0sdfakCAjuZsTS/y5JfKuwHjpeipdhQ==",
       "requires": {
-        "@nextcloud/auth": "^1.2.2",
+        "@nextcloud/auth": "^2.0.0",
         "core-js": "^3.6.4"
       }
     },
         "vue": "^2.7.10"
       },
       "dependencies": {
-        "@nextcloud/auth": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.0.0.tgz",
-          "integrity": "sha512-v8K8tvjkOsGt1+gKydVeMiEwWLXlfPWSptXnMqP21Xd6pFAQxNuNNCY679XKU4MNaKzpZqLstCCxv/KrjeQv8A==",
-          "requires": {
-            "@nextcloud/event-bus": "^3.0.0"
-          }
-        },
         "@nextcloud/axios": {
           "version": "2.0.0",
           "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.0.0.tgz",
         "vue2-datepicker": "^3.11.0"
       },
       "dependencies": {
-        "@nextcloud/auth": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-2.0.0.tgz",
-          "integrity": "sha512-v8K8tvjkOsGt1+gKydVeMiEwWLXlfPWSptXnMqP21Xd6pFAQxNuNNCY679XKU4MNaKzpZqLstCCxv/KrjeQv8A==",
-          "requires": {
-            "@nextcloud/event-bus": "^3.0.0"
-          }
-        },
         "@nextcloud/axios": {
           "version": "2.0.0",
           "resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-2.0.0.tgz",
             "toastify-js": "^1.12.0"
           }
         },
-        "@nextcloud/initial-state": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-2.0.0.tgz",
-          "integrity": "sha512-xmNP30v/RnkJ2z1HcuEo7YfcLJJa+FdWTwgNldXHOlMeMbl/ESpsGkWL2sULrhYurz64L0JpfwEdi/cHcmyuZQ=="
-        },
         "@nextcloud/typings": {
           "version": "1.4.3",
           "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-1.4.3.tgz",
         "vue": "^2.6.11"
       },
       "dependencies": {
+        "@nextcloud/auth": {
+          "version": "1.3.0",
+          "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-1.3.0.tgz",
+          "integrity": "sha512-GfwRM9W7hat4psNdAt74UHEV+drEXQ53klCVp6JpON66ZLPeK5eJ1LQuiQDkpUxZpqNeaumXjiB98h5cug/uQw==",
+          "requires": {
+            "@nextcloud/event-bus": "^1.1.3",
+            "@nextcloud/typings": "^0.2.2",
+            "core-js": "^3.6.4"
+          },
+          "dependencies": {
+            "@nextcloud/typings": {
+              "version": "0.2.4",
+              "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-0.2.4.tgz",
+              "integrity": "sha512-49M8XUDQH27VIQE+13KrqSOYcyOsDUk6Yfw17jbBVtXFoDJ3YBSYYq8YaKeAM3Lz2JVbEpqQW9suAT+EyYSb6g==",
+              "requires": {
+                "@types/jquery": "2.0.54"
+              }
+            },
+            "@types/jquery": {
+              "version": "2.0.54",
+              "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.54.tgz",
+              "integrity": "sha512-D/PomKwNkDfSKD13DEVQT/pq2TUjN54c6uB341fEZanIzkjfGe7UaFuuaLZbpEiS5j7Wk2MUHAZqZIoECw29lg=="
+            }
+          }
+        },
         "@nextcloud/dialogs": {
           "version": "3.2.0",
           "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-3.2.0.tgz",
         "vue": "^2.6.14"
       },
       "dependencies": {
+        "@nextcloud/auth": {
+          "version": "1.3.0",
+          "resolved": "https://registry.npmjs.org/@nextcloud/auth/-/auth-1.3.0.tgz",
+          "integrity": "sha512-GfwRM9W7hat4psNdAt74UHEV+drEXQ53klCVp6JpON66ZLPeK5eJ1LQuiQDkpUxZpqNeaumXjiB98h5cug/uQw==",
+          "requires": {
+            "@nextcloud/event-bus": "^1.1.3",
+            "@nextcloud/typings": "^0.2.2",
+            "core-js": "^3.6.4"
+          },
+          "dependencies": {
+            "@nextcloud/typings": {
+              "version": "0.2.4",
+              "resolved": "https://registry.npmjs.org/@nextcloud/typings/-/typings-0.2.4.tgz",
+              "integrity": "sha512-49M8XUDQH27VIQE+13KrqSOYcyOsDUk6Yfw17jbBVtXFoDJ3YBSYYq8YaKeAM3Lz2JVbEpqQW9suAT+EyYSb6g==",
+              "requires": {
+                "@types/jquery": "2.0.54"
+              }
+            },
+            "@types/jquery": {
+              "version": "2.0.54",
+              "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.54.tgz",
+              "integrity": "sha512-D/PomKwNkDfSKD13DEVQT/pq2TUjN54c6uB341fEZanIzkjfGe7UaFuuaLZbpEiS5j7Wk2MUHAZqZIoECw29lg=="
+            }
+          }
+        },
         "@nextcloud/dialogs": {
           "version": "3.2.0",
           "resolved": "https://registry.npmjs.org/@nextcloud/dialogs/-/dialogs-3.2.0.tgz",
index c587027f055be2be81bd4889d782bf82172930be..6b0e5e852e9b7f7c234857173dd193faded79cf2 100644 (file)
@@ -35,7 +35,7 @@
   "dependencies": {
     "@chenfengyuan/vue-qrcode": "^1.0.2",
     "@mdi/svg": "^7.0.96",
-    "@nextcloud/auth": "^1.3.0",
+    "@nextcloud/auth": "^2.0.0",
     "@nextcloud/axios": "^1.10.0",
     "@nextcloud/browser-storage": "^0.1.1",
     "@nextcloud/browserslist-config": "^2.3.0",
     "@nextcloud/capabilities": "^1.0.4",
     "@nextcloud/dialogs": "^4.0.0-beta.2",
     "@nextcloud/event-bus": "^3.0.2",
-    "@nextcloud/files": "^2.1.0",
-    "@nextcloud/initial-state": "^1.2.1",
+    "@nextcloud/files": "^3.0.0-beta.5",
+    "@nextcloud/initial-state": "^2.0.0",
     "@nextcloud/l10n": "^1.6.0",
-    "@nextcloud/logger": "^2.1.0",
+    "@nextcloud/logger": "^2.4.0",
     "@nextcloud/moment": "^1.2.1",
     "@nextcloud/password-confirmation": "^4.0.2",
     "@nextcloud/paths": "^2.1.0",
@@ -72,6 +72,7 @@
     "focus-visible": "^5.2.0",
     "handlebars": "^4.7.7",
     "ical.js": "^1.4.0",
+    "is-svg": "^4.3.2",
     "jquery": "~3.6",
     "jquery-migrate": "~3.4",
     "jquery-ui": "^1.13.2",
   },
   "devDependencies": {
     "@babel/node": "^7.20.0",
+    "@babel/preset-typescript": "^7.18.6",
     "@cypress/browserify-preprocessor": "^3.0.2",
     "@nextcloud/babel-config": "^1.0.0",
     "@nextcloud/cypress": "^1.0.0-beta.1",
index dcf7ae20ff7c431d502bd8594c358715f391041b..8a0ceb144a99dead51ddfe1d7664d7c41d303186 100644 (file)
@@ -1,16 +1,19 @@
 {
        "extends": "@vue/tsconfig/tsconfig.json",
-       "include": ["./**/*.ts"],
+       "include": ["./apps/**/*.ts", "./core/**/*.ts"],
        "compilerOptions": {
                "types": ["node"],
-               "allowSyntheticDefaultImports": true,
-               "moduleResolution": "node",
+               "outDir": "./dist/",
                "target": "ESNext",
                "module": "esnext",
-               "declaration": true,
-               "strict": true,
+               "moduleResolution": "node",
+               // Allow ts to import js files
+               "allowJs": true,
+               "allowSyntheticDefaultImports": true,
+               "declaration": false,
                "noImplicitAny": false,
-               "resolveJsonModule": true
+               "resolveJsonModule": true,
+               "strict": true,
        },
        "ts-node": {
                // these options are overrides used only by ts-node
index d1a07e10800173c211593bd30f441a6e9141db0f..871218b8fa92b3e73649a902f8a6a8e393680c46 100644 (file)
@@ -84,6 +84,11 @@ module.exports = {
                                        'emoji-mart-vue-fast',
                                ]),
                        },
+                       {
+                               test: /\.tsx?$/,
+                               use: 'babel-loader',
+                               exclude: BabelLoaderExcludeNodeModulesExcept([]),
+                       },
                        {
                                test: /\.js$/,
                                loader: 'babel-loader',
@@ -163,7 +168,7 @@ module.exports = {
                        // make sure to use the handlebar runtime when importing
                        handlebars: 'handlebars/runtime',
                },
-               extensions: ['*', '.js', '.vue'],
+               extensions: ['*', '.ts', '.js', '.vue'],
                symlinks: true,
                fallback: {
                        buffer: require.resolve('buffer'),