From e660d2a3a4ba50acb887d03865e26966794b61a0 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle <patrizio@bekerle.com> Date: Tue, 12 Jan 2021 07:38:41 +0100 Subject: [PATCH] Add getProperties method --- packages/app-shell/src/app-shell.js | 4 ++-- packages/provider/src/adapter-lit-element.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/app-shell/src/app-shell.js b/packages/app-shell/src/app-shell.js index fc8ae009..2118c946 100644 --- a/packages/app-shell/src/app-shell.js +++ b/packages/app-shell/src/app-shell.js @@ -225,7 +225,7 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) { } static get properties() { - return Object.assign({ + return this.getProperties({ lang: { type: String, reflect: true }, src: { type: String }, basePath: { type: String, attribute: 'base-path' }, @@ -243,7 +243,7 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) { shellName: { type: String, attribute: "shell-name" }, shellSubname: { type: String, attribute: "shell-subname" }, noBrand: { type: Boolean, attribute: "no-brand" } - }, super.properties); + }); } _updateAuth(login) { diff --git a/packages/provider/src/adapter-lit-element.js b/packages/provider/src/adapter-lit-element.js index 53ca6a10..7a4fa9e7 100644 --- a/packages/provider/src/adapter-lit-element.js +++ b/packages/provider/src/adapter-lit-element.js @@ -86,6 +86,10 @@ export class AdapterLitElement extends LitElement { }; } + static getProperties(properties = {}) { + return Object.assign(properties, super.properties); + } + attributeChangedCallback(name, oldValue, newValue) { switch(name) { case 'subscribe': -- GitLab