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

Add support for favorites and recent files; Update webdav library

parent 50cd75cf
Branches
No related tags found
No related merge requests found
...@@ -24,5 +24,8 @@ ...@@ -24,5 +24,8 @@
"license": "LGPL-2.1-or-later", "license": "LGPL-2.1-or-later",
"devDependencies": { "devDependencies": {
"lerna": "^4.0.0" "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. ...@@ -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. 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 `<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>` - 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 ### Emitted attributes
...@@ -160,6 +162,8 @@ files to a [Nextcloud](https://nextcloud.com/) instance or to a dbp-clipboard. ...@@ -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. 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 `<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>` - 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 ### Emitted attributes
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
"lit": "^2.0.0", "lit": "^2.0.0",
"material-design-icons-svg": "^3.0.0", "material-design-icons-svg": "^3.0.0",
"tabulator-tables": "^4.8.4", "tabulator-tables": "^4.8.4",
"webdav": "^3.6.1" "webdav": "4.6.0"
}, },
"scripts": { "scripts": {
"clean": "rm dist/*", "clean": "rm dist/*",
......
...@@ -38,6 +38,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) { ...@@ -38,6 +38,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) {
this.firstOpen = true; this.firstOpen = true;
this.fullsizeModal = false; this.fullsizeModal = false;
this.nextcloudAuthInfo = ''; this.nextcloudAuthInfo = '';
this.showNextcloudAdditionalMenu = false;
this.initialFileHandlingState = {target: '', path: ''}; this.initialFileHandlingState = {target: '', path: ''};
} }
...@@ -74,6 +75,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) { ...@@ -74,6 +75,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) {
firstOpen: {type: Boolean, attribute: false}, firstOpen: {type: Boolean, attribute: false},
nextcloudPath: {type: String, attribute: false}, nextcloudPath: {type: String, attribute: false},
fullsizeModal: { type: Boolean, attribute: 'fullsize-modal' }, fullsizeModal: { type: Boolean, attribute: 'fullsize-modal' },
showNextcloudAdditionalMenu: { type: Boolean, attribute: 'show-nextcloud-additional-menu' },
initialFileHandlingState: {type: Object, attribute: 'initial-file-handling-state'}, initialFileHandlingState: {type: Object, attribute: 'initial-file-handling-state'},
}; };
} }
...@@ -304,6 +306,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) { ...@@ -304,6 +306,7 @@ export class FileSink extends ScopedElementsMixin(DbpFileHandlingLitElement) {
directory-path="${this.nextcloudPath}" directory-path="${this.nextcloudPath}"
nextcloud-file-url="${this.nextcloudFileURL}" nextcloud-file-url="${this.nextcloudFileURL}"
?store-nextcloud-session="${this.nextcloudStoreSession}" ?store-nextcloud-session="${this.nextcloudStoreSession}"
?show-nextcloud-additional-menu="${this.showNextcloudAdditionalMenu}"
@dbp-nextcloud-file-picker-file-uploaded="${(event) => { @dbp-nextcloud-file-picker-file-uploaded="${(event) => {
this.uploadToNextcloud(event.detail); this.uploadToNextcloud(event.detail);
}}" }}"
......
...@@ -59,6 +59,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) { ...@@ -59,6 +59,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) {
this.nextcloudAuthInfo = ''; this.nextcloudAuthInfo = '';
this.maxFileSize = ''; this.maxFileSize = '';
this.multipleFiles = Number.MAX_VALUE; this.multipleFiles = Number.MAX_VALUE;
this.showNextcloudAdditionalMenu = false;
this.initialFileHandlingState = {target: '', path: ''}; this.initialFileHandlingState = {target: '', path: ''};
} }
...@@ -95,6 +96,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) { ...@@ -95,6 +96,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) {
isDialogOpen: { type: Boolean, attribute: 'dialog-open' }, isDialogOpen: { type: Boolean, attribute: 'dialog-open' },
maxFileSize: { type: Number, attribute: 'max-file-size'}, maxFileSize: { type: Number, attribute: 'max-file-size'},
multipleFiles: { type: Number, attribute: 'number-of-files'}, multipleFiles: { type: Number, attribute: 'number-of-files'},
showNextcloudAdditionalMenu: { type: Boolean, attribute: 'show-nextcloud-additional-menu' },
initialFileHandlingState: {type: Object, attribute: 'initial-file-handling-state'}, initialFileHandlingState: {type: Object, attribute: 'initial-file-handling-state'},
}; };
...@@ -526,6 +528,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) { ...@@ -526,6 +528,7 @@ export class FileSource extends ScopedElementsMixin(DbpFileHandlingLitElement) {
auth-info="${this.nextcloudAuthInfo}" auth-info="${this.nextcloudAuthInfo}"
allowed-mime-types="${this.allowedMimeTypes}" allowed-mime-types="${this.allowedMimeTypes}"
max-selected-items="${this.multipleFiles}" max-selected-items="${this.multipleFiles}"
?show-nextcloud-additional-menu="${this.showNextcloudAdditionalMenu}"
@dbp-nextcloud-file-picker-file-downloaded="${(event) => { @dbp-nextcloud-file-picker-file-downloaded="${(event) => {
this.sendFileEvent(event.detail.file, event.detail.maxUpload);}}"> this.sendFileEvent(event.detail.file, event.detail.maxUpload);}}">
</dbp-nextcloud-file-picker>`; </dbp-nextcloud-file-picker>`;
......
...@@ -72,7 +72,11 @@ ...@@ -72,7 +72,11 @@
"abort-message": "Vorgang wurde abgebrochen.", "abort-message": "Vorgang wurde abgebrochen.",
"remember-me": "Mit {{name}} verbunden bleiben", "remember-me": "Mit {{name}} verbunden bleiben",
"log-out": "Verbindung trennen", "log-out": "Verbindung trennen",
"open-submenu": "Untermenü öffnen" "open-submenu": "Untermenü öffnen",
"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": { "clipboard": {
"add-files": "Dateien der Zwischenablage hinzufügen", "add-files": "Dateien der Zwischenablage hinzufügen",
......
...@@ -73,7 +73,11 @@ ...@@ -73,7 +73,11 @@
"abort-message": "The process was canceled.", "abort-message": "The process was canceled.",
"remember-me": "Stay connected with {{name}}", "remember-me": "Stay connected with {{name}}",
"log-out": "Disconnect", "log-out": "Disconnect",
"open-submenu": "Open submenu" "open-submenu": "Open submenu",
"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": { "clipboard": {
"add-files": "Add files to clipboard", "add-files": "Add files to clipboard",
......
This diff is collapsed.
...@@ -2792,6 +2792,11 @@ chardet@^0.7.0: ...@@ -2792,6 +2792,11 @@ chardet@^0.7.0:
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== 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: chokidar@3.5.2, chokidar@^3.4.0, chokidar@^3.5.1:
version "3.5.2" version "3.5.2"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75"
...@@ -3205,6 +3210,11 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: ...@@ -3205,6 +3210,11 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3:
shebang-command "^2.0.0" shebang-command "^2.0.0"
which "^2.0.1" 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: custom-event@~1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425" resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425"
...@@ -3960,12 +3970,10 @@ fast-levenshtein@^2.0.6: ...@@ -3960,12 +3970,10 @@ fast-levenshtein@^2.0.6:
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
fast-xml-parser@^3.17.4: fast-xml-parser@^3.19.0:
version "3.21.1" version "3.19.0"
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz#152a1d51d445380f7046b304672dd55d15c9e736" resolved "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.19.0.tgz"
integrity sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg== integrity sha512-4pXwmBplsCPv8FOY1WRakF970TjNGnGnfbOnLqjlYvMiF1SR3yOHyxMR/YCXpPTOspNF5gwudqktIP4VsWkvBg==
dependencies:
strnum "^1.0.4"
fastq@^1.6.0: fastq@^1.6.0:
version "1.13.0" version "1.13.0"
...@@ -4851,7 +4859,7 @@ is-boolean-object@^1.1.0: ...@@ -4851,7 +4859,7 @@ is-boolean-object@^1.1.0:
call-bind "^1.0.2" call-bind "^1.0.2"
has-tostringtag "^1.0.0" has-tostringtag "^1.0.0"
is-buffer@^1.1.5: is-buffer@^1.1.5, is-buffer@~1.1.6:
version "1.1.6" version "1.1.6"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
...@@ -5395,6 +5403,11 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3: ...@@ -5395,6 +5403,11 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== 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: lazystream@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638"
...@@ -5727,6 +5740,15 @@ material-design-icons-svg@^3.0.0: ...@@ -5727,6 +5740,15 @@ material-design-icons-svg@^3.0.0:
resolved "https://registry.yarnpkg.com/material-design-icons-svg/-/material-design-icons-svg-3.2.0.tgz#0f669dbea24d10403ca5ffe9828deb9d4acd8e7e" resolved "https://registry.yarnpkg.com/material-design-icons-svg/-/material-design-icons-svg-3.2.0.tgz#0f669dbea24d10403ca5ffe9828deb9d4acd8e7e"
integrity sha512-5YECqik/lDKRjyo5ItT5Jh12jdDM6ySULnhTyUKomELFsgrwM+2IMkHvXLw61n/q6bJ9tfK/suAkWiTv1/uB4g== 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: media-typer@0.3.0:
version "0.3.0" version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
...@@ -8396,10 +8418,10 @@ url-join@^4.0.1: ...@@ -8396,10 +8418,10 @@ url-join@^4.0.1:
resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7"
integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==
url-parse@^1.4.7: url-parse@^1.5.1:
version "1.5.3" version "1.5.1"
resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.3.tgz#71c1303d38fb6639ade183c2992c8cc0686df862" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b"
integrity sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ== integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==
dependencies: dependencies:
querystringify "^2.1.1" querystringify "^2.1.1"
requires-port "^1.0.0" requires-port "^1.0.0"
...@@ -8580,21 +8602,23 @@ web-component-analyzer@~1.1.1: ...@@ -8580,21 +8602,23 @@ web-component-analyzer@~1.1.1:
typescript "^3.8.3" typescript "^3.8.3"
yargs "^15.3.1" yargs "^15.3.1"
webdav@^3.6.1: webdav@4.6.0:
version "3.6.2" version "4.6.0"
resolved "https://registry.yarnpkg.com/webdav/-/webdav-3.6.2.tgz#76e3d8e950e80698a2f1db23ef2496888662cbeb" resolved "https://registry.yarnpkg.com/webdav/-/webdav-4.6.0.tgz#b12d3631562ed4a7d665dd1757349682dfc8f441"
integrity sha512-HFRiI1jluMSPQMVgxVD6VVYNtaglO53vHG0uf7Zec+wl0A1Mei2z8/IFgAAAJMUuEWAx2AfBD5lcWhAiYA9LUw== integrity sha512-amL/NeZ73xe8cNC+uqAF3mOC/j5dNoNWlZswYCd7DKxhnZM7dViAVSv6gdCYeGAETjPEZVubcKDDRwGKz9ShQQ==
dependencies: dependencies:
axios "^0.21.1" axios "^0.21.1"
base-64 "^0.1.0" base-64 "^1.0.0"
fast-xml-parser "^3.17.4" fast-xml-parser "^3.19.0"
he "^1.2.0" he "^1.2.0"
hot-patcher "^0.5.0" hot-patcher "^0.5.0"
layerr "^0.1.2"
md5 "^2.3.0"
minimatch "^3.0.4" minimatch "^3.0.4"
nested-property "^4.0.0" nested-property "^4.0.0"
path-posix "^1.0.0" path-posix "^1.0.0"
url-join "^4.0.1" url-join "^4.0.1"
url-parse "^1.4.7" url-parse "^1.5.1"
webidl-conversions@^3.0.0: webidl-conversions@^3.0.0:
version "3.0.1" version "3.0.1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment