@rxdi/lit-html 0.7.166 → 0.7.168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,8 +17,11 @@ export interface CustomElementConfig<T> {
|
|
|
17
17
|
style?: CSSResult;
|
|
18
18
|
styles?: CSSResult[];
|
|
19
19
|
extends?: string;
|
|
20
|
+
/** Custom attribute registry it is different than proposed ScopedElementRegistry */
|
|
20
21
|
registry?: (this: T) => CustomAttributeRegistry;
|
|
21
22
|
modifiers?: Modifier[];
|
|
23
|
+
/** Definitions of custom elements that are imported only for this component */
|
|
24
|
+
components?: Constructor<any>[];
|
|
22
25
|
/**
|
|
23
26
|
* Intended only for first render inside the DOM
|
|
24
27
|
* for example we want app-component to be rendered
|
|
@@ -44,6 +47,7 @@ export interface CustomElementConfig<T> {
|
|
|
44
47
|
*/
|
|
45
48
|
container?: HTMLElement | DocumentFragment;
|
|
46
49
|
}
|
|
50
|
+
declare type Constructor<T> = new (...args: unknown[]) => T;
|
|
47
51
|
export declare const Component: <T>(config: CustomElementConfig<T>) => <K extends new (...args: any[]) => {}>(Base: K) => {
|
|
48
52
|
new (...args: any[]): {
|
|
49
53
|
getTemplateResult(): any;
|
|
@@ -62,3 +66,4 @@ declare global {
|
|
|
62
66
|
_excluded_components: string[];
|
|
63
67
|
}
|
|
64
68
|
}
|
|
69
|
+
export {};
|
|
@@ -29,6 +29,7 @@ const customElement = (tag, config = {}) => (Base) => {
|
|
|
29
29
|
throw new Error(`You need at least 1 dash in the custom element name! ${Base}`);
|
|
30
30
|
}
|
|
31
31
|
config.styles = config.styles || [];
|
|
32
|
+
config.components = config.components || [];
|
|
32
33
|
const OnInit = Base.prototype.OnInit || function () { };
|
|
33
34
|
const OnDestroy = Base.prototype.OnDestroy || function () { };
|
|
34
35
|
const OnUpdate = Base.prototype.OnUpdate || function () { };
|