Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
3dee5f9b68 | |||
ef92d1bde3 | |||
e394c999b2 | |||
68bcc10ee6 | |||
d2cd5ce6f3 | |||
29fb3a2f9b | |||
ef1e373fb3 | |||
d607968dfb | |||
45b2183c88 | |||
68f11d7e76 | |||
cc6f14551f | |||
12f6bb3317 |
19767
package-lock.json
generated
19767
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
23
package.json
23
package.json
@ -1,30 +1,31 @@
|
||||
{
|
||||
"name": "@designestate/dees-element",
|
||||
"version": "1.0.30",
|
||||
"version": "1.0.36",
|
||||
"private": false,
|
||||
"description": "a custom element class extending lit element class",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/ --web)",
|
||||
"build": "(tsbuild --web)"
|
||||
"build": "(tsbuild --web --allowimplicitany --skiplibcheck && tsbundle npm)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.28",
|
||||
"@gitzone/tsbundle": "^1.0.88",
|
||||
"@gitzone/tstest": "^1.0.60",
|
||||
"@pushrocks/tapbundle": "^3.2.15",
|
||||
"@types/node": "^16.11.12",
|
||||
"@gitzone/tsbuild": "^2.1.56",
|
||||
"@gitzone/tsbundle": "^1.0.98",
|
||||
"@gitzone/tstest": "^1.0.68",
|
||||
"@pushrocks/tapbundle": "^5.0.2",
|
||||
"@types/node": "^17.0.21",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@designestate/dees-domtools": "^1.0.103",
|
||||
"@pushrocks/isounique": "^1.0.4",
|
||||
"@pushrocks/smartrx": "^2.0.19",
|
||||
"lit": "^2.0.2"
|
||||
"@designestate/dees-domtools": "^2.0.0",
|
||||
"@pushrocks/isounique": "^1.0.5",
|
||||
"@pushrocks/smartrx": "^2.0.25",
|
||||
"lit": "^2.2.1"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
|
@ -1,5 +1,5 @@
|
||||
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';
|
||||
|
||||
export interface IBdVarTriplet {
|
||||
@ -32,15 +32,15 @@ export class CssManager {
|
||||
return domtools.elementBasic.staticStyles;
|
||||
}
|
||||
|
||||
public cssForTablet(contentArg) {
|
||||
public cssForTablet(contentArg: CSSResult) {
|
||||
return unsafeCSS(domtools.breakpoints.cssForTablet(contentArg));
|
||||
};
|
||||
|
||||
public cssForPhablet(contentArg) {
|
||||
public cssForPhablet(contentArg: CSSResult) {
|
||||
return unsafeCSS(domtools.breakpoints.cssForPhablet(contentArg));
|
||||
}
|
||||
|
||||
public cssForPhone(contentArg) {
|
||||
public cssForPhone(contentArg: CSSResult) {
|
||||
return unsafeCSS(domtools.breakpoints.cssForPhone(contentArg));
|
||||
};
|
||||
|
||||
|
@ -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 {
|
||||
// INSTANCE
|
||||
@ -13,6 +13,9 @@ export class DeesElement extends plugins.lit.LitElement {
|
||||
|
||||
private themeSubscription: plugins.smartrx.rxjs.Subscription;
|
||||
|
||||
private elementDomReadyDeferred = plugins.domtools.plugins.smartpromise.defer();
|
||||
public elementDomReady = this.elementDomReadyDeferred.promise;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.domtoolsPromise.then((domtoolsArg) => {
|
||||
@ -20,17 +23,22 @@ export class DeesElement extends plugins.lit.LitElement {
|
||||
});
|
||||
}
|
||||
|
||||
public connectedCallback() {
|
||||
public async connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this.domtoolsPromise.then(async (domtools) => {
|
||||
const domtools = await this.domtoolsPromise;
|
||||
this.themeSubscription = domtools.themeManager.themeObservable.subscribe((goBrightArg) => {
|
||||
this.goBright = goBrightArg;
|
||||
});
|
||||
});
|
||||
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();
|
||||
this.themeSubscription.unsubscribe();
|
||||
this.dispatchEvent(new CustomEvent('deesElementDisconnected'));
|
||||
|
@ -9,12 +9,12 @@ export {
|
||||
|
||||
// third party scope
|
||||
import { css, unsafeCSS, LitElement } from 'lit';
|
||||
import { property } from 'lit/decorators';
|
||||
import { property } from 'lit/decorators/property.js';
|
||||
const lit = {
|
||||
css,
|
||||
unsafeCSS,
|
||||
LitElement,
|
||||
property
|
||||
property,
|
||||
};
|
||||
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
|
25
ts/index.ts
25
ts/index.ts
@ -1,27 +1,20 @@
|
||||
import { CssManager } from './dees-element.classes.cssmanager';
|
||||
import { CssManager } from './dees-element.classes.cssmanager.js';
|
||||
|
||||
// lit exports
|
||||
export {
|
||||
html,
|
||||
TemplateResult,
|
||||
css,
|
||||
unsafeCSS,
|
||||
} from 'lit';
|
||||
export { html, TemplateResult, css, unsafeCSS, render } from 'lit';
|
||||
|
||||
export {
|
||||
customElement,
|
||||
property,
|
||||
state
|
||||
} from 'lit/decorators'
|
||||
export { customElement } from 'lit/decorators/custom-element.js';
|
||||
|
||||
export { property } from 'lit/decorators/property.js';
|
||||
|
||||
export { state } from 'lit/decorators/state.js';
|
||||
|
||||
// domtools exports
|
||||
import * as domtools from '@designestate/dees-domtools';
|
||||
export {
|
||||
domtools
|
||||
}
|
||||
export { domtools };
|
||||
|
||||
// DeesElements exports
|
||||
export { DeesElement } from './dees-element.classes.dees-element';
|
||||
export { DeesElement } from './dees-element.classes.dees-element.js';
|
||||
|
||||
/**
|
||||
* a singleton instance of CssManager
|
||||
|
@ -1,16 +1,8 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2017",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"lib": ["es2017", "dom"],
|
||||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"inlineSourceMap": true,
|
||||
"noUnusedLocals": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"outDir": "dist/",
|
||||
"skipLibCheck": true,
|
||||
"target": "es2020",
|
||||
"module": "es2020",
|
||||
"moduleResolution": "node12",
|
||||
"experimentalDecorators": true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user