fix(core): update
This commit is contained in:
45
ts/index.ts
45
ts/index.ts
@ -1,47 +1,16 @@
|
||||
import { CssManager } from './dees-element.classes.cssmanager';
|
||||
import * as plugins from './dees-element.plugins';
|
||||
|
||||
export {
|
||||
property,
|
||||
html,
|
||||
customElement,
|
||||
TemplateResult,
|
||||
property,
|
||||
internalProperty,
|
||||
html,
|
||||
TemplateResult,
|
||||
css,
|
||||
unsafeCSS,
|
||||
unsafeCSS
|
||||
} from 'lit-element';
|
||||
|
||||
export class DeesElement extends plugins.litElement.LitElement {
|
||||
@plugins.litElement.property({ type: Boolean })
|
||||
public goBright: boolean = false;
|
||||
export { DeesElement } from './dees-element.classes.dees-element';
|
||||
|
||||
// domtools
|
||||
public domtoolsPromise = plugins.domtools.elementBasic.setup(this);
|
||||
|
||||
@plugins.litElement.property()
|
||||
domtools?: plugins.domtools.DomTools;
|
||||
|
||||
private themeSubscription: plugins.smartrx.rxjs.Subscription;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.domtoolsPromise.then((domtoolsArg) => {
|
||||
this.domtools = domtoolsArg;
|
||||
});
|
||||
}
|
||||
|
||||
public connectedCallback() {
|
||||
super.connectedCallback();
|
||||
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.themeSubscription.unsubscribe();
|
||||
this.dispatchEvent(new CustomEvent('deesElementDisconnected'));
|
||||
}
|
||||
}
|
||||
export const cssManager = new CssManager();
|
||||
|
Reference in New Issue
Block a user