Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
009674d78c | |||
dcca685021 | |||
8eff93febc | |||
11f731aa61 | |||
a8e7d2f335 | |||
219390e895 |
16
package.json
16
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@design.estate/dees-element",
|
||||
"version": "2.0.31",
|
||||
"version": "2.0.34",
|
||||
"private": false,
|
||||
"description": "a custom element class extending lit element class",
|
||||
"main": "dist_ts/index.js",
|
||||
@ -14,17 +14,17 @@
|
||||
"buildDocs": "tsdoc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.1.70",
|
||||
"@git.zone/tsbundle": "^2.0.10",
|
||||
"@git.zone/tstest": "^1.0.81",
|
||||
"@git.zone/tsbuild": "^2.1.72",
|
||||
"@git.zone/tsbundle": "^2.0.15",
|
||||
"@git.zone/tstest": "^1.0.86",
|
||||
"@push.rocks/tapbundle": "^5.0.15",
|
||||
"@types/node": "^20.8.7"
|
||||
"@types/node": "^20.11.16"
|
||||
},
|
||||
"dependencies": {
|
||||
"@design.estate/dees-domtools": "^2.0.54",
|
||||
"@design.estate/dees-domtools": "^2.0.57",
|
||||
"@push.rocks/isounique": "^1.0.5",
|
||||
"@push.rocks/smartrx": "^3.0.6",
|
||||
"lit": "^3.0.0"
|
||||
"@push.rocks/smartrx": "^3.0.7",
|
||||
"lit": "^3.1.2"
|
||||
},
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
|
1751
pnpm-lock.yaml
generated
1751
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-element',
|
||||
version: '2.0.31',
|
||||
version: '2.0.34',
|
||||
description: 'a custom element class extending lit element class'
|
||||
}
|
||||
|
@ -32,6 +32,9 @@ export class DeesElement extends plugins.lit.LitElement {
|
||||
this.goBright = goBrightArg;
|
||||
});
|
||||
this.rxSubscriptions.push(this.themeSubscription);
|
||||
for (const startupFunction of this.startupFunctions) {
|
||||
await startupFunction();
|
||||
}
|
||||
this.dispatchEvent(new CustomEvent('deesElementConnected'));
|
||||
}
|
||||
|
||||
@ -40,12 +43,25 @@ export class DeesElement extends plugins.lit.LitElement {
|
||||
this.elementDomReadyDeferred.resolve();
|
||||
}
|
||||
|
||||
private startupFunctions: (() => void | Promise<any>)[] = [];
|
||||
public registerStartupFunction(startupFunctionArg: () => void) {
|
||||
this.startupFunctions.push(startupFunctionArg);
|
||||
}
|
||||
|
||||
private garbageFunctions: (() => void | Promise<any>)[] = [];
|
||||
public registerGarbageFunction(garbageFunctionArg: () => void) {
|
||||
this.garbageFunctions.push(garbageFunctionArg);
|
||||
}
|
||||
|
||||
public async disconnectedCallback() {
|
||||
await this.domtoolsPromise;
|
||||
super.disconnectedCallback();
|
||||
for (const subscription of this.rxSubscriptions) {
|
||||
subscription.unsubscribe();
|
||||
}
|
||||
for (const garbageFunction of this.garbageFunctions) {
|
||||
await garbageFunction();
|
||||
}
|
||||
this.dispatchEvent(new CustomEvent('deesElementDisconnected'));
|
||||
}
|
||||
}
|
||||
|
@ -3,8 +3,8 @@
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"moduleResolution": "nodenext",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
|
Reference in New Issue
Block a user