fix(core): update
This commit is contained in:
@ -1,3 +1,11 @@
|
||||
// pushrocks scope
|
||||
import * as smartrx from '@pushrocks/smartrx';
|
||||
|
||||
export {
|
||||
smartrx
|
||||
};
|
||||
|
||||
// third party scope
|
||||
import { LitElement, property } from 'lit-element';
|
||||
const litElement = {
|
||||
LitElement,
|
||||
|
12
ts/index.ts
12
ts/index.ts
@ -15,13 +15,21 @@ export class DeesElement extends plugins.litElement.LitElement {
|
||||
public goBright: boolean = false;
|
||||
public domtoolsPromise = plugins.domtools.elementBasic.setup(this);
|
||||
|
||||
private themeSubscription: plugins.smartrx.rxjs.Subscription;
|
||||
|
||||
public connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this.dispatchEvent(new CustomEvent('domtools-connected'));
|
||||
this.domtoolsPromise.then(async (domtools) => {
|
||||
this.themeSubscription = domtools.themeManager.themeObservable.subscribe(goBrightArg => {
|
||||
this.goBright = goBrightArg;
|
||||
});
|
||||
});
|
||||
this.dispatchEvent(new CustomEvent('deesElementConnected'));
|
||||
}
|
||||
|
||||
public disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
this.dispatchEvent(new CustomEvent('domtools-disconnected'));
|
||||
this.themeSubscription.unsubscribe();
|
||||
this.dispatchEvent(new CustomEvent('deesElementDisconnected'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user