diff --git a/packages/app-shell/src/auth-menu-button.js b/packages/app-shell/src/auth-menu-button.js index 8e96197e7f80f299da5f078efa66d50b99c2b52d..c8908443f95a86bd10fb322120590bfab61e638d 100644 --- a/packages/app-shell/src/auth-menu-button.js +++ b/packages/app-shell/src/auth-menu-button.js @@ -3,13 +3,13 @@ import {html, css} from 'lit-element'; import {unsafeHTML} from 'lit-html/directives/unsafe-html.js'; import {ScopedElementsMixin} from '@open-wc/scoped-elements'; import * as commonStyles from '@dbp-toolkit/common/styles'; -import {LitElement} from "lit-element"; import {Icon, EventBus} from '@dbp-toolkit/common'; +import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element"; const i18n = createI18nInstance(); -export class AuthMenuButton extends ScopedElementsMixin(LitElement) { +export class AuthMenuButton extends ScopedElementsMixin(AdapterLitElement) { constructor() { super(); @@ -28,11 +28,11 @@ export class AuthMenuButton extends ScopedElementsMixin(LitElement) { } static get properties() { - return { + return this.getProperties({ lang: { type: String }, showImage: { type: Boolean, attribute: 'show-image' }, _loginData: { type: Object, attribute: false }, - }; + }); } onWindowResize() { diff --git a/packages/app-shell/src/tugraz-logo.js b/packages/app-shell/src/tugraz-logo.js index 33fd8a30d56941d2d6a83f6017ee42bff308b53f..de1d7a128235eebf3f2ea58906adc4375c7fec4d 100644 --- a/packages/app-shell/src/tugraz-logo.js +++ b/packages/app-shell/src/tugraz-logo.js @@ -1,10 +1,11 @@ -import {html, LitElement, css} from 'lit-element'; +import {html, css} from 'lit-element'; import * as commonStyles from '@dbp-toolkit/common/styles'; import {createI18nInstance} from './i18n.js'; +import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element"; const i18n = createI18nInstance(); -export class TUGrazLogo extends LitElement { +export class TUGrazLogo extends AdapterLitElement { constructor() { super(); @@ -13,9 +14,9 @@ export class TUGrazLogo extends LitElement { } static get properties() { - return { + return this.getProperties({ lang: { type: String } - }; + }); } update(changedProperties) { diff --git a/packages/auth/src/auth-keycloak.js b/packages/auth/src/auth-keycloak.js index 06f34fbfcddb51f2b0b16dc2ec9cf2384a8a439b..f57c681db29529046fc487173cf1f766ec640506 100644 --- a/packages/auth/src/auth-keycloak.js +++ b/packages/auth/src/auth-keycloak.js @@ -3,8 +3,8 @@ import JSONLD from '@dbp-toolkit/common/jsonld'; import * as commonUtils from '@dbp-toolkit/common/utils'; import {EventBus} from '@dbp-toolkit/common'; import {KeycloakWrapper} from './keycloak.js'; -import {LitElement} from "lit-element"; import {LoginStatus} from './util.js'; +import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element"; /** @@ -20,7 +20,7 @@ import {LoginStatus} from './util.js'; * window.DBPPerson: Person json object of the user (optional, enable by setting the `load-person` attribute, * which will dispatch a `dbp-auth-person-init` event when loaded) */ -export class AuthKeycloak extends LitElement { +export class AuthKeycloak extends AdapterLitElement { constructor() { super(); this.lang = 'de'; @@ -158,7 +158,7 @@ export class AuthKeycloak extends LitElement { } static get properties() { - return { + return this.getProperties({ lang: { type: String }, forceLogin: { type: Boolean, attribute: 'force-login' }, tryLogin: { type: Boolean, attribute: 'try-login' }, @@ -176,7 +176,7 @@ export class AuthKeycloak extends LitElement { silentCheckSsoRedirectUri: { type: String, attribute: 'silent-check-sso-redirect-uri' }, scope: { type: String }, idpHint: { type: String, attribute: 'idp-hint' }, - }; + }); } connectedCallback() { diff --git a/packages/common/dbp-lit-element.js b/packages/common/dbp-lit-element.js index 4c336c8aec4411795d288840ce29063446697a0c..0a1f687c383ad4ca958bde9776afb8b623eba2ac 100644 --- a/packages/common/dbp-lit-element.js +++ b/packages/common/dbp-lit-element.js @@ -1,6 +1,6 @@ -import {LitElement} from "lit-element"; +import {AdapterLitElement} from "@dbp-toolkit/provider/src/adapter-lit-element"; -export default class DBPLitElement extends LitElement { +export default class DBPLitElement extends AdapterLitElement { _(selector) { return this.shadowRoot === null ? this.querySelector(selector) : this.shadowRoot.querySelector(selector); } diff --git a/packages/notification/src/notification.js b/packages/notification/src/notification.js index 51247ff8103153c0da64e49ed1075839ebd85e36..5e68e1d5640fe163a83802a9cb394b00ab19659b 100644 --- a/packages/notification/src/notification.js +++ b/packages/notification/src/notification.js @@ -17,9 +17,9 @@ export class Notification extends DBPLitElement { * See: https://lit-element.polymer-project.org/guide/properties#initialize */ static get properties() { - return { + return this.getProperties({ lang: { type: String }, - }; + }); } connectedCallback() {