Skip to content
Snippets Groups Projects
Commit 22d234ba authored by Tögl, Christina's avatar Tögl, Christina
Browse files

Add support for favorites and recent files; Update webdav library

parent 73f067cf
No related branches found
No related tags found
No related merge requests found
Pipeline #60863 failed
......@@ -24,5 +24,8 @@
"license": "LGPL-2.1-or-later",
"devDependencies": {
"lerna": "^4.0.0"
},
"dependencies": {
"webdav": "4.6.0"
}
}
......@@ -95,6 +95,8 @@ files from a [Nextcloud](https://nextcloud.com/) instance or to a dbp-clipboard.
This is supported by the provider! Use this object to sync file source and file sink on one page at first time open.
- example `<dbp-file-source initial-file-handling-state="{target: 'local', path:'my/server/path'}"></dbp-file-source>`
- example provider `<dbp-file-source subscribe="initial-file-handling-state"></dbp-file-source>`
- `show-nextcloud-favorites` (optional): Needs to be set to show the favorites icon
- example `show-nextcloud-favorites`
### Emitted attributes
......@@ -160,6 +162,8 @@ files to a [Nextcloud](https://nextcloud.com/) instance or to a dbp-clipboard.
This is supported by the provider! Use this object to sync file source and file sink on one page at first time open.
- example `<dbp-file-source initial-file-handling-state="{target: 'local', path:'my/server/path'}"></dbp-file-source>`
- example provider `<dbp-file-source subscribe="initial-file-handling-state"></dbp-file-source>`
- `show-nextcloud-additional-menu` (optional): Needs to be set to show the additional menu
- example `show-nextcloud-additional-menu`
### Emitted attributes
......
......@@ -42,7 +42,7 @@
"lit-html": "^1.3.0",
"material-design-icons-svg": "^3.0.0",
"tabulator-tables": "^4.8.4",
"webdav": "^3.6.1"
"webdav": "4.6.0"
},
"scripts": {
"clean": "rm dist/*",
......
......@@ -37,6 +37,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) {
this.firstOpen = true;
this.fullsizeModal = false;
this.nextcloudAuthInfo = '';
this.showNextcloudAdditionalMenu = false;
this.initialFileHandlingState = {target: '', path: ''};
}
......@@ -72,6 +73,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) {
firstOpen: {type: Boolean, attribute: false},
nextcloudPath: {type: String, attribute: false},
fullsizeModal: { type: Boolean, attribute: 'fullsize-modal' },
showNextcloudAdditionalMenu: { type: Boolean, attribute: 'show-nextcloud-additional-menu' },
initialFileHandlingState: {type: Object, attribute: 'initial-file-handling-state'},
};
}
......@@ -301,6 +303,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) {
auth-info="${this.nextcloudAuthInfo}"
directory-path="${this.nextcloudPath}"
nextcloud-file-url="${this.nextcloudFileURL}"
?show-nextcloud-additional-menu="${this.showNextcloudAdditionalMenu}"
@dbp-nextcloud-file-picker-file-uploaded="${(event) => {
this.uploadToNextcloud(event.detail);
}}"
......
......@@ -58,6 +58,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) {
this.nextcloudAuthInfo = '';
this.maxFileSize = '';
this.multipleFiles = Number.MAX_VALUE;
this.showNextcloudAdditionalMenu = false;
this.initialFileHandlingState = {target: '', path: ''};
}
......@@ -93,6 +94,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) {
isDialogOpen: { type: Boolean, attribute: 'dialog-open' },
maxFileSize: { type: Number, attribute: 'max-file-size'},
multipleFiles: { type: Number, attribute: 'number-of-files'},
showNextcloudAdditionalMenu: { type: Boolean, attribute: 'show-nextcloud-additional-menu' },
initialFileHandlingState: {type: Object, attribute: 'initial-file-handling-state'},
};
......@@ -523,6 +525,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) {
auth-info="${this.nextcloudAuthInfo}"
allowed-mime-types="${this.allowedMimeTypes}"
max-selected-items="${this.multipleFiles}"
?show-nextcloud-additional-menu="${this.showNextcloudAdditionalMenu}"
@dbp-nextcloud-file-picker-file-downloaded="${(event) => {
this.sendFileEvent(event.detail.file, event.detail.maxUpload);}}">
</dbp-nextcloud-file-picker>`;
......
......@@ -89,7 +89,11 @@
"select-nothing-title": "Alle gewählten Dateien nicht mehr selektieren",
"abort": "Vorgang abbrechen",
"abort-message": "Vorgang wurde abgebrochen.",
"remember-me": "Angemeldet bleiben"
"remember-me": "Angemeldet bleiben",
"error-save-to-favorites": "Speichern in Favoriten nicht möglich! Bitte wählen Sie einen Ordner innerhalb der Favoriten aus.",
"error-save-to-recent": "Speichern in den neuesten Dateien nicht möglich! Bitte wählen Sie einen Ordner innerhalb der neuesten Dateien aus.",
"recent-files-link-text": "Neueste Dateien",
"favorites-link-text": "Meine Favoriten"
},
"clipboard": {
"add-files": "Dateien der Zwischenablage hinzufügen",
......
......@@ -103,7 +103,11 @@
"select-nothing-title": "Select no files",
"abort": "Cancel process",
"abort-message": "The process was canceled.",
"remember-me": "Remember me"
"remember-me": "Remember me",
"error-save-to-favorites": "Saving to Favorites not possible! Please select a folder within the Favorites.",
"error-save-to-recent": "Saving to Recent Files not possible! Please select a folder within the Recent Files.",
"recent-files-link-text": "Recent Files",
"favorites-link-text": "My Favorites"
},
"clipboard": {
"add-files": "Add files to clipboard",
......
This diff is collapsed.
......@@ -2802,6 +2802,11 @@ chardet@^0.7.0:
resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
charenc@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=
chokidar@3.5.2, chokidar@^3.4.0, chokidar@^3.5.1:
version "3.5.2"
resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz"
......@@ -3211,6 +3216,11 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3:
shebang-command "^2.0.0"
which "^2.0.1"
crypt@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=
custom-event@~1.0.0:
version "1.0.1"
resolved "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz"
......@@ -3983,7 +3993,7 @@ fast-levenshtein@^2.0.6:
resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
fast-xml-parser@^3.17.4:
fast-xml-parser@^3.19.0:
version "3.19.0"
resolved "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.19.0.tgz"
integrity sha512-4pXwmBplsCPv8FOY1WRakF970TjNGnGnfbOnLqjlYvMiF1SR3yOHyxMR/YCXpPTOspNF5gwudqktIP4VsWkvBg==
......@@ -4858,7 +4868,7 @@ is-boolean-object@^1.1.0:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"
is-buffer@^1.1.5:
is-buffer@^1.1.5, is-buffer@~1.1.6:
version "1.1.6"
resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
......@@ -5405,6 +5415,11 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3:
resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
layerr@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/layerr/-/layerr-0.1.2.tgz#16c8e7fb042d3595ab15492bdad088f31d7afd15"
integrity sha512-ob5kTd9H3S4GOG2nVXyQhOu9O8nBgP555XxWPkJI0tR0JeRilfyTp8WtPdIJHLXBmHMSdEq5+KMxiYABeScsIQ==
lazystream@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz"
......@@ -5725,6 +5740,15 @@ material-design-icons-svg@^3.0.0:
resolved "https://registry.npmjs.org/material-design-icons-svg/-/material-design-icons-svg-3.2.0.tgz"
integrity sha512-5YECqik/lDKRjyo5ItT5Jh12jdDM6ySULnhTyUKomELFsgrwM+2IMkHvXLw61n/q6bJ9tfK/suAkWiTv1/uB4g==
md5@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f"
integrity sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==
dependencies:
charenc "0.0.2"
crypt "0.0.2"
is-buffer "~1.1.6"
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
......@@ -8364,10 +8388,10 @@ url-join@^4.0.1:
resolved "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz"
integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==
url-parse@^1.4.7:
version "1.5.3"
resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz"
integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==
url-parse@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b"
integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==
dependencies:
querystringify "^2.1.1"
requires-port "^1.0.0"
......@@ -8548,21 +8572,23 @@ web-component-analyzer@~1.1.1:
typescript "^3.8.3"
yargs "^15.3.1"
webdav@^3.6.1:
version "3.6.2"
resolved "https://registry.npmjs.org/webdav/-/webdav-3.6.2.tgz"
integrity sha512-HFRiI1jluMSPQMVgxVD6VVYNtaglO53vHG0uf7Zec+wl0A1Mei2z8/IFgAAAJMUuEWAx2AfBD5lcWhAiYA9LUw==
webdav@4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/webdav/-/webdav-4.6.0.tgz#b12d3631562ed4a7d665dd1757349682dfc8f441"
integrity sha512-amL/NeZ73xe8cNC+uqAF3mOC/j5dNoNWlZswYCd7DKxhnZM7dViAVSv6gdCYeGAETjPEZVubcKDDRwGKz9ShQQ==
dependencies:
axios "^0.21.1"
base-64 "^0.1.0"
fast-xml-parser "^3.17.4"
base-64 "^1.0.0"
fast-xml-parser "^3.19.0"
he "^1.2.0"
hot-patcher "^0.5.0"
layerr "^0.1.2"
md5 "^2.3.0"
minimatch "^3.0.4"
nested-property "^4.0.0"
path-posix "^1.0.0"
url-join "^4.0.1"
url-parse "^1.4.7"
url-parse "^1.5.1"
webidl-conversions@^6.1.0:
version "6.1.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment