Skip to content
Snippets Groups Projects
Unverified Commit d367ef03 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Add more attribute and dbp-set-property event documentation

parent 9a2ade47
No related branches found
No related tags found
No related merge requests found
Pipeline #16733 passed
......@@ -19,7 +19,7 @@ npm i @dbp-toolkit/app-shell
## Attributes
- `lang` (optional, default: `de`): set to `de` or `en` for German or English
- example `<dbp-app-shell lang="de" </dbp-app-shell>`
- example `<dbp-app-shell lang="de"></dbp-app-shell>`
- `src`: The path to a topic metadata file (json)
- `base-path` (optional, default: `/`): An absolute base path for routing
- `entry-point-url`: Entry point URL to access the API
......@@ -29,6 +29,13 @@ npm i @dbp-toolkit/app-shell
- `matomo-site-id` (optional): set to your site id (required only for tracking)
- example `<dbp-app-shell matomo-site-id="456789"></dbp-app-shell>`
### Emitted attributes
The component emits `dbp-set-property` events for these attributes:
- `lang` to propagate a language change (possible values `en`, `de`)
- `requested-login-status` (possible values `logged-in`, `logged-out`)
## Topic Metadata
```json
......
......@@ -39,7 +39,7 @@ npm i @dbp-toolkit/auth
- `silent-check-sso-redirect-uri` (optional): URI or path to a separate page for checking the login session in an iframe, see https://www.keycloak.org/docs/latest/securing_apps/#_javascript_adapter
- `scope` (optional): Space separated list of scopes to request. These scopes get added in addition to the default ones, assuming the scope is in the optional scopes list of the Keycloak client in use.
### Emitted attribute
### Emitted attributes
The component emits a `dbp-set-property` event for the attribute `auth`:
......@@ -68,6 +68,10 @@ The component emits a `dbp-set-property` event for the attribute `auth`:
- example auth property: `{token: "THE_BEARER_TOKEN"}`
- note: most often this should be an attribute that is not set directly, but subscribed at a provider
### Emitted attributes
The component emits a `dbp-set-property` event for the attribute `requested-login-status` (possible values `logged-in`, `logged-out`).
## Local development
```bash
......
......@@ -81,8 +81,15 @@ files from a [Nextcloud](https://nextcloud.com/) instance.
- 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>`
- 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>`
### Emitted attributes
The component emits a `dbp-set-property` event for the attribute `initial-file-handling-state`:
- `initial-file-handling-state.target`: Target that should be selected the first time (possible values `local`, `nextcloud`)
- `initial-file-handling-state.path`: Path to initially jump to (only supported by target `nextcloud`)
### Outgoing Events
......@@ -126,9 +133,15 @@ files to a [Nextcloud](https://nextcloud.com/) instance.
- 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>`
- 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>`
### Emitted attributes
The component emits a `dbp-set-property` event for the attribute `initial-file-handling-state`:
- `initial-file-handling-state.target`: Target that should be selected the first time (possible values `local`, `nextcloud`)
- `initial-file-handling-state.path`: Path to initially jump to (only supported by target `nextcloud`)
### Properties
......
......@@ -13,6 +13,18 @@ npm i @dbp-toolkit/language-select
<script type="module" src="node_modules/@dbp-toolkit/language-select/dist/dbp-language-select.js"></script>
```
## Attributes
- `lang` (optional, default: `de`): set to `de` or `en` for German or English (note that it will be shown the
other way around to make it easier to switch to a different language)
- example `<dbp-language-select lang="de"></dbp-language-select>`
### Emitted attributes
The component emits `dbp-set-property` events for these attributes:
- `lang` to propagate a language change (possible values `en`, `de`)
## Local development
```bash
......
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