diff --git a/packages/file-handling/package.json b/packages/file-handling/package.json index c6343e222dfe5672864361fcfd96ed91cd1bf720..efb25e2af3e98daaaa7c817100f9fa1e73f5eefa 100644 --- a/packages/file-handling/package.json +++ b/packages/file-handling/package.json @@ -4,6 +4,9 @@ "main": "src/index.js", "license": "LGPL-2.1-or-later", "devDependencies": { + "@rollup/plugin-commonjs": "^12.0.0", + "@rollup/plugin-json": "^4.0.2", + "@rollup/plugin-node-resolve": "^8.1.0", "chai": "^4.2.0", "i18next-scanner": "^2.10.2", "karma": "^5.0.1", @@ -13,13 +16,10 @@ "mocha": "^7.1.1", "node-sass": "^4.12.0", "puppeteer": "^2.1.1", - "rollup": "^2.6.1", - "@rollup/plugin-commonjs": "^11.0.0", + "rollup": "^2.18.0", "rollup-plugin-consts": "^1.0.1", "rollup-plugin-copy": "^3.1.0", "rollup-plugin-delete": "^1.1.0", - "@rollup/plugin-json": "^4.0.2", - "@rollup/plugin-node-resolve": "^7.0.0", "rollup-plugin-serve": "^1.0.1", "rollup-plugin-terser": "^5.1.1", "vpu-common": "file:./vendor/common" diff --git a/packages/file-handling/src/vpu-nextcloud-file-picker.js b/packages/file-handling/src/vpu-nextcloud-file-picker.js index b40c94e266123c97ededd13fa3904f8b59748b30..e750509c42149aa82c2790c8257d6c90496601c5 100644 --- a/packages/file-handling/src/vpu-nextcloud-file-picker.js +++ b/packages/file-handling/src/vpu-nextcloud-file-picker.js @@ -5,9 +5,7 @@ import VPULitElement from 'vpu-common/vpu-lit-element'; import {MiniSpinner} from 'vpu-common'; import * as commonUtils from 'vpu-common/utils'; import * as commonStyles from 'vpu-common/styles'; -// `import {createClient} from 'webdav/web';` didn't seem to work if fileupload demo page is built -// `import createClient from 'webdav/web';` didn't seem to work if Signature project is built -import * as webDavWeb from 'webdav/web'; +import {createClient} from 'webdav/web'; import {classMap} from 'lit-html/directives/class-map.js'; import {humanFileSize} from 'vpu-common/i18next'; import Tabulator from 'tabulator-tables'; @@ -125,7 +123,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(VPULitElement) { const apiUrl = this.webDavUrl + "/" + data.loginName; // https://github.com/perry-mitchell/webdav-client/blob/master/API.md#module_WebDAV.createClient - this.webDavClient = webDavWeb.createClient( + this.webDavClient = createClient( apiUrl, { username: data.loginName,