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

Merge branch 'master' of gitlab.tugraz.at:dbp/web-components/toolkit

parents 0ed76466 5c51bd01
No related branches found
No related tags found
No related merge requests found
Pipeline #14032 passed
Showing with 6 additions and 37 deletions
# App Shell Component # App Shell Component
[GitLab Repository](https://gitlab.tugraz.at/dbp/apps/AppShell)
A web component for building SPAs consisting of one topic with multiple A web component for building SPAs consisting of one topic with multiple
activities. Handles login, language selection, activity switching, menus etc. activities. Handles login, language selection, activity switching, menus etc.
......
# Auth Web Components # Auth Web Components
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/Auth)
## Keycloak Component ## Keycloak Component
### Usage ### Usage
......
...@@ -37,17 +37,17 @@ ...@@ -37,17 +37,17 @@
}, },
"scripts": { "scripts": {
"clean": "rm dist/*", "clean": "rm dist/*",
"build": "npm run build-local", "build": "yarn run build-local",
"build-local": "rollup -c", "build-local": "rollup -c",
"build-dev": "rollup -c --environment BUILD:development", "build-dev": "rollup -c --environment BUILD:development",
"build-prod": "rollup -c --environment BUILD:production", "build-prod": "rollup -c --environment BUILD:production",
"build-demo": "rollup -c --environment BUILD:demo", "build-demo": "rollup -c --environment BUILD:demo",
"build-test": "rollup -c --environment BUILD:test", "build-test": "rollup -c --environment BUILD:test",
"i18next": "i18next-scanner", "i18next": "i18next-scanner",
"watch": "npm run watch-local", "watch": "yarn run watch-local",
"watch-local": "rollup -c --watch", "watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development", "watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun", "test": "yarn run build-test && karma start --singleRun",
"lint": "eslint ." "lint": "eslint ."
} }
} }
...@@ -87,17 +87,14 @@ export class KeycloakWrapper extends EventTarget { ...@@ -87,17 +87,14 @@ export class KeycloakWrapper extends EventTarget {
let refreshed = false; let refreshed = false;
try { try {
refreshed = await this._keycloak.updateToken(5); // -1 means force a refresh
refreshed = await this._keycloak.updateToken(-1);
} catch (error) { } catch (error) {
console.log('Failed to refresh the token', error); console.log('Failed to refresh the token', error);
return; return;
} }
if (refreshed) { console.assert(refreshed, "token should have been refreshed");
console.log('Token was successfully refreshed');
} else {
console.log('Token is still valid');
}
} }
async _ensureInstance() { async _ensureInstance() {
...@@ -124,7 +121,6 @@ export class KeycloakWrapper extends EventTarget { ...@@ -124,7 +121,6 @@ export class KeycloakWrapper extends EventTarget {
async _keycloakInit(options) { async _keycloakInit(options) {
// https://gitlab.tugraz.at/dbp/apps/library/issues/41 // https://gitlab.tugraz.at/dbp/apps/library/issues/41
// retry the keycloak init in case it fails, maybe it helps :/ // retry the keycloak init in case it fails, maybe it helps :/
options['idpHint'] = 'eid-oidc';
try { try {
return await this._keycloak.init(options); return await this._keycloak.init(options);
} catch (e) { } catch (e) {
...@@ -189,7 +185,6 @@ export class KeycloakWrapper extends EventTarget { ...@@ -189,7 +185,6 @@ export class KeycloakWrapper extends EventTarget {
scope: scope, scope: scope,
idpHint: this._idpHint, idpHint: this._idpHint,
}); });
//options['idpHint'] = 'eid-oidc';
} }
} }
......
# Check-in place select web component # Check-in place select web component
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/toolkit)
## Usage ## Usage
```html ```html
......
# Common Code # Common Code
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/Common)
## Icon Web Component ## Icon Web Component
For valid icon names see: [LineIcons](https://lineicons.com/icons/) For valid icon names see: [LineIcons](https://lineicons.com/icons/)
......
# DataTableView Web Component # DataTableView Web Component
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/KnowledgeBaseWebPageElementView)
# Usage # Usage
```html ```html
......
# File handling web components # File handling web components
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/FileHandling)
## FileSource ## FileSource
This web component allows the selection of local files via file dialog or drag and drop and to select and download This web component allows the selection of local files via file dialog or drag and drop and to select and download
......
# KnowledgeBaseWebPageElementView Web Component # KnowledgeBaseWebPageElementView Web Component
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/KnowledgeBaseWebPageElementView)
## Usage ## Usage
```html ```html
......
# Language Select Web Component # Language Select Web Component
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/LanguageSelect)
## Local development ## Local development
```bash ```bash
......
# Matomo Web Component # Matomo Web Component
[GitLab Repository](git@gitlab.tugraz.at:dbp/web-components/toolkit.git)
## Usage ## Usage
```html ```html
......
# Notification Web Component # Notification Web Component
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/Notification)
## Usage ## Usage
```html ```html
......
# Person Profile Web Component # Person Profile Web Component
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/PersonProfile)
## Usage ## Usage
```html ```html
......
# Person Select Web Component # Person Select Web Component
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/PersonSelect)
## Usage ## Usage
```html ```html
......
# QR code Scanner Web Component # QR code Scanner Web Component
[GitLab Repository](https://gitlab.tugraz.at/dbp/web-components/qr-code-scanner)
## Requirements ## Requirements
- Https - Https
......
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