Skip to content
Snippets Groups Projects
Commit 92221ca7 authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Update Readme

parent 2b337f0b
No related branches found
No related tags found
No related merge requests found
Pipeline #16707 failed
...@@ -29,14 +29,15 @@ the version number in its `package.json` is higher than the version number on np ...@@ -29,14 +29,15 @@ the version number in its `package.json` is higher than the version number on np
## Reserved attributes ## Reserved attributes
| Attribute | Description | | Attribute | Description |
| ------------------------ | ------------------------------------------------------------------- | | ----------------------------- | --------------------------------------------------------------------------------- |
| `subscribe` | Used in all components to subscribe to attributes set by a provider | | `subscribe` | Used in all components to subscribe to attributes set by a provider |
| `unsubscribe` | Reserved for future use | | `unsubscribe` | Reserved for future use |
| `auth` | Authentication information, set by the authentication component | | `auth` | Authentication information, set by the authentication component |
| `lang` | Currently selected language, set by the language selector | | `lang` | Currently selected language, set by the language selector |
| `entry-point-url` | Entry point url for all api requests | | `entry-point-url` | Entry point url for all api requests |
| `requested-login-status` | Used by the login buttons to trigger a login in auth components | | `requested-login-status` | Used by the login buttons to trigger a login in auth components |
| `initial-file-handling-state` | Used by the file-handling component to sync file source/sink at first time open |
## Reserved events ## Reserved events
......
...@@ -79,6 +79,10 @@ files from a [Nextcloud](https://nextcloud.com/) instance. ...@@ -79,6 +79,10 @@ files from a [Nextcloud](https://nextcloud.com/) instance.
- example `<dbp-file-source text="Please select some files"></dbp-file-source>` - example `<dbp-file-source text="Please select some files"></dbp-file-source>`
- `button-label` (optional): the text that is shown on the button to select files - `button-label` (optional): the text that is shown on the button to select files
- example `<dbp-file-source button-label="Select files"></dbp-file-source>` - example `<dbp-file-source button-label="Select files"></dbp-file-source>`
- `initial-file-handling-state` (optional): An object: `initial-file-handling-state' = {target: "", path: ""}` for initial opening behaviour.
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:'nextcloudpath'}"></dbp-file-source>`
- example provider `<dbp-file-source subscribe="initial-file-handling-state:initial-file-handling-state"></dbp-file-source>`
### Outgoing Events ### Outgoing Events
...@@ -120,6 +124,11 @@ files to a [Nextcloud](https://nextcloud.com/) instance. ...@@ -120,6 +124,11 @@ files to a [Nextcloud](https://nextcloud.com/) instance.
- example `<dbp-file-sink text="Download files as ZIP-file"></dbp-file-sink>` - example `<dbp-file-sink text="Download files as ZIP-file"></dbp-file-sink>`
- `button-label` (optional): the text that is shown on the button to download the zip file - `button-label` (optional): the text that is shown on the button to download the zip file
- example `<dbp-file-sink button-label="Download files"></dbp-file-sink>` - example `<dbp-file-sink button-label="Download files"></dbp-file-sink>`
- `initial-file-handling-state` (optional): An object: `initial-file-handling-state' = {target: "", path: ""}` for initial opening behaviour.
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:'nextcloudpath'}"></dbp-file-source>`
- example provider `<dbp-file-source subscribe="initial-file-handling-state:initial-file-handling-state"></dbp-file-source>`
### Properties ### Properties
......
...@@ -178,8 +178,6 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) { ...@@ -178,8 +178,6 @@ export class FileSink extends ScopedElementsMixin(DBPLitElement) {
data = {"target": this.activeTarget}; data = {"target": this.activeTarget};
} }
this.sendSetPropertyEvent('initial-file-handling-state', data); this.sendSetPropertyEvent('initial-file-handling-state', data);
//const event = new CustomEvent("dbp-file-sink-switched", { "detail": data, bubbles: true, composed: true });
//this.dispatchEvent(event);
} }
......
...@@ -241,8 +241,6 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) { ...@@ -241,8 +241,6 @@ export class FileSource extends ScopedElementsMixin(DBPLitElement) {
} }
this.sendSetPropertyEvent('initial-file-handling-state', data); this.sendSetPropertyEvent('initial-file-handling-state', data);
//const event = new CustomEvent("initial-file-handling-state", { "detail": data, bubbles: true, composed: true });
//this.dispatchEvent(event);
} }
checkFileType(file) { checkFileType(file) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment