Compare commits

..

9 Commits

Author SHA1 Message Date
9b30853a56 2.0.1 2022-03-16 14:48:02 +01:00
acc1d7eea7 fix(core): update 2022-03-16 14:48:01 +01:00
bb6818324d 2.0.0 2022-03-16 14:47:45 +01:00
3dee5f9b68 1.0.36 2022-03-16 14:46:51 +01:00
ef92d1bde3 fix(core): update 2022-03-16 14:46:51 +01:00
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
8 changed files with 5932 additions and 13946 deletions

19813
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +1,31 @@
{ {
"name": "@designestate/dees-element", "name": "@designestate/dees-element",
"version": "1.0.33", "version": "2.0.1",
"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",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/ --web)", "test": "(tstest test/ --web)",
"build": "(tsbuild --web && tsbundle npm)" "build": "(tsbuild --web --allowimplicitany --skiplibcheck && tsbundle npm)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.28", "@gitzone/tsbuild": "^2.1.56",
"@gitzone/tsbundle": "^1.0.88", "@gitzone/tsbundle": "^1.0.98",
"@gitzone/tstest": "^1.0.60", "@gitzone/tstest": "^1.0.68",
"@pushrocks/tapbundle": "^3.2.15", "@pushrocks/tapbundle": "^5.0.2",
"@types/node": "^16.11.12", "@types/node": "^17.0.21",
"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.103", "@designestate/dees-domtools": "^2.0.0",
"@pushrocks/isounique": "^1.0.4", "@pushrocks/isounique": "^1.0.5",
"@pushrocks/smartrx": "^2.0.19", "@pushrocks/smartrx": "^2.0.25",
"lit": "^2.0.2" "lit": "^2.2.1"
}, },
"browserslist": [ "browserslist": [
"last 1 chrome versions" "last 1 chrome versions"

View File

@ -1,5 +1,5 @@
import { expect, tap } from '@pushrocks/tapbundle'; import { expect, tap } from '@pushrocks/tapbundle';
import * as deesElement from '../ts/index'; import * as deesElement from '../ts/index.js';
tap.test('should create a static element', async () => { tap.test('should create a static element', async () => {
@deesElement.customElement('my-button') @deesElement.customElement('my-button')

View File

@ -1,5 +1,5 @@
import { CSSResult, unsafeCSS } from 'lit'; import { CSSResult, unsafeCSS } from 'lit';
import * as plugins from './dees-element.plugins'; import * as plugins from './dees-element.plugins.js';
import * as domtools from '@designestate/dees-domtools'; import * as domtools from '@designestate/dees-domtools';
export interface IBdVarTriplet { export interface IBdVarTriplet {
@ -32,15 +32,15 @@ export class CssManager {
return domtools.elementBasic.staticStyles; return domtools.elementBasic.staticStyles;
} }
public cssForTablet(contentArg) { public cssForTablet(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg)); return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg));
}; };
public cssForPhablet(contentArg) { public cssForPhablet(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForPhablet(contentArg)); return unsafeCSS(domtools.breakpoints.cssForPhablet(contentArg));
} }
public cssForPhone(contentArg) { public cssForPhone(contentArg: CSSResult) {
return unsafeCSS(domtools.breakpoints.cssForPhone(contentArg)); return unsafeCSS(domtools.breakpoints.cssForPhone(contentArg));
}; };

View File

@ -1,4 +1,4 @@
import * as plugins from './dees-element.plugins'; import * as plugins from './dees-element.plugins.js';
export class DeesElement extends plugins.lit.LitElement { export class DeesElement extends plugins.lit.LitElement {
// INSTANCE // INSTANCE
@ -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) => {
@ -29,6 +32,11 @@ export class DeesElement extends plugins.lit.LitElement {
this.dispatchEvent(new CustomEvent('deesElementConnected')); this.dispatchEvent(new CustomEvent('deesElementConnected'));
} }
public firstUpdated(_changedProperties: Map<string | number | symbol, unknown>): void {
super.firstUpdated(_changedProperties);
this.elementDomReadyDeferred.resolve();
}
public async disconnectedCallback() { public async disconnectedCallback() {
await this.domtoolsPromise; await this.domtoolsPromise;
super.disconnectedCallback(); super.disconnectedCallback();

View File

@ -14,7 +14,7 @@ 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,7 +1,7 @@
import { CssManager } from './dees-element.classes.cssmanager'; import { CssManager } from './dees-element.classes.cssmanager.js';
// lit exports // lit exports
export { html, TemplateResult, css, unsafeCSS } from 'lit'; export { html, TemplateResult, css, unsafeCSS, render } from 'lit';
export { customElement } from 'lit/decorators/custom-element.js'; export { customElement } from 'lit/decorators/custom-element.js';
@ -14,7 +14,7 @@ import * as domtools from '@designestate/dees-domtools';
export { domtools }; export { domtools };
// DeesElements exports // DeesElements exports
export { DeesElement } from './dees-element.classes.dees-element'; export { DeesElement } from './dees-element.classes.dees-element.js';
/** /**
* a singleton instance of CssManager * a singleton instance of CssManager

View File

@ -1,16 +1,8 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es2017", "target": "es2020",
"module": "es2015", "module": "es2020",
"moduleResolution": "node", "moduleResolution": "node12",
"lib": ["es2017", "dom"],
"declaration": true,
"inlineSources": true,
"inlineSourceMap": true,
"noUnusedLocals": true,
"noFallthroughCasesInSwitch": true,
"outDir": "dist/",
"skipLibCheck": true,
"experimentalDecorators": true "experimentalDecorators": true
} }
} }