Compare commits

...

16 Commits

Author SHA1 Message Date
e394c999b2 1.0.35 2022-01-07 19:47:05 +01:00
68bcc10ee6 fix(core): update 2022-01-07 19:47:05 +01:00
d2cd5ce6f3 1.0.34 2022-01-06 22:09:53 +01:00
29fb3a2f9b fix(core): update 2022-01-06 22:09:52 +01:00
ef1e373fb3 1.0.33 2022-01-06 22:08:09 +01:00
d607968dfb fix(core): update 2022-01-06 22:08:08 +01:00
45b2183c88 1.0.32 2022-01-06 21:53:21 +01:00
68f11d7e76 fix(core): update 2022-01-06 21:53:21 +01:00
cc6f14551f 1.0.31 2021-12-14 01:59:51 +01:00
12f6bb3317 fix(core): update 2021-12-14 01:59:50 +01:00
b63fac3f75 1.0.30 2021-12-13 23:29:16 +01:00
61d7de2323 fix(core): update 2021-12-13 23:29:16 +01:00
d6c7f5da97 1.0.29 2021-12-10 22:23:36 +01:00
36c7f8ae38 fix(core): update 2021-12-10 22:23:36 +01:00
2cae90816d 1.0.28 2021-12-10 17:01:04 +01:00
9e527d7fdb fix(core): update 2021-12-10 17:01:03 +01:00
7 changed files with 1692 additions and 1684 deletions

3299
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-element", "name": "@designestate/dees-element",
"version": "1.0.27", "version": "1.0.35",
"private": false, "private": false,
"description": "a custom element class extending lit element class", "description": "a custom element class extending lit element class",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@ -9,19 +9,19 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/ --web)", "test": "(tstest test/ --web)",
"build": "(tsbuild --web)" "build": "(tsbuild --web && tsbundle npm)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.28", "@gitzone/tsbuild": "^2.1.28",
"@gitzone/tsbundle": "^1.0.88", "@gitzone/tsbundle": "^1.0.88",
"@gitzone/tstest": "^1.0.60", "@gitzone/tstest": "^1.0.60",
"@pushrocks/tapbundle": "^3.2.14", "@pushrocks/tapbundle": "^3.2.15",
"@types/node": "^16.11.10", "@types/node": "^16.11.12",
"tslint": "^6.1.3", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@designestate/dees-domtools": "^1.0.102", "@designestate/dees-domtools": "^1.0.103",
"@pushrocks/isounique": "^1.0.4", "@pushrocks/isounique": "^1.0.4",
"@pushrocks/smartrx": "^2.0.19", "@pushrocks/smartrx": "^2.0.19",
"lit": "^2.0.2" "lit": "^2.0.2"

View File

@ -6,6 +6,7 @@ tap.test('should create a static element', async () => {
class MyButton extends deesElement.DeesElement { class MyButton extends deesElement.DeesElement {
// STATIC // STATIC
public static styles = [ public static styles = [
deesElement.cssManager.defaultStyles,
deesElement.css` deesElement.css`
.buttonClass { .buttonClass {
background: ${deesElement.cssManager.bdTheme('blue', 'black')}; background: ${deesElement.cssManager.bdTheme('blue', 'black')};

View File

@ -1,4 +1,4 @@
import { CSSResult, unsafeCSS } from 'lit-element'; import { CSSResult, unsafeCSS } from 'lit';
import * as plugins from './dees-element.plugins'; import * as plugins from './dees-element.plugins';
import * as domtools from '@designestate/dees-domtools'; import * as domtools from '@designestate/dees-domtools';

View File

@ -13,6 +13,9 @@ export class DeesElement extends plugins.lit.LitElement {
private themeSubscription: plugins.smartrx.rxjs.Subscription; private themeSubscription: plugins.smartrx.rxjs.Subscription;
private elementDomReadyDeferred = plugins.domtools.plugins.smartpromise.defer();
public elementDomReady = this.elementDomReadyDeferred.promise;
constructor() { constructor() {
super(); super();
this.domtoolsPromise.then((domtoolsArg) => { this.domtoolsPromise.then((domtoolsArg) => {
@ -20,17 +23,22 @@ export class DeesElement extends plugins.lit.LitElement {
}); });
} }
public connectedCallback() { public async connectedCallback() {
super.connectedCallback(); super.connectedCallback();
this.domtoolsPromise.then(async (domtools) => { const domtools = await this.domtoolsPromise;
this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => { this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => {
this.goBright = goBrightArg; this.goBright = goBrightArg;
}); });
});
this.dispatchEvent(new CustomEvent('deesElementConnected')); this.dispatchEvent(new CustomEvent('deesElementConnected'));
} }
public disconnectedCallback() { public firstUpdated(_changedProperties: Map<string | number | symbol, unknown>): void {
super.firstUpdated(_changedProperties);
this.elementDomReadyDeferred.resolve();
}
public async disconnectedCallback() {
await this.domtoolsPromise;
super.disconnectedCallback(); super.disconnectedCallback();
this.themeSubscription.unsubscribe(); this.themeSubscription.unsubscribe();
this.dispatchEvent(new CustomEvent('deesElementDisconnected')); this.dispatchEvent(new CustomEvent('deesElementDisconnected'));

View File

@ -9,12 +9,12 @@ export {
// third party scope // third party scope
import { css, unsafeCSS, LitElement } from 'lit'; import { css, unsafeCSS, LitElement } from 'lit';
import { property } from 'lit/decorators'; import { property } from 'lit/decorators/property.js';
const lit = { const lit = {
css, css,
unsafeCSS, unsafeCSS,
LitElement, LitElement,
property property,
}; };
import * as domtools from '@designestate/dees-domtools'; import * as domtools from '@designestate/dees-domtools';

View File

@ -1,25 +1,17 @@
import { CssManager } from './dees-element.classes.cssmanager'; import { CssManager } from './dees-element.classes.cssmanager';
import * as plugins from './dees-element.plugins';
// lit exports // lit exports
export { export { html, TemplateResult, css, unsafeCSS, render } from 'lit';
html,
TemplateResult,
css,
unsafeCSS,
} from 'lit';
export { export { customElement } from 'lit/decorators/custom-element.js';
customElement,
property, export { property } from 'lit/decorators/property.js';
state
} from 'lit/decorators' export { state } from 'lit/decorators/state.js';
// domtools exports // domtools exports
import * as domtools from '@designestate/dees-domtools'; import * as domtools from '@designestate/dees-domtools';
export { export { domtools };
domtools
}
// DeesElements exports // DeesElements exports
export { DeesElement } from './dees-element.classes.dees-element'; export { DeesElement } from './dees-element.classes.dees-element';