@joist/di 4.0.0-next.32 → 4.0.0-next.33
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.
- package/package.json +1 -1
- package/src/lib/dom-injector.ts +2 -2
- package/src/lib/injectable-el.ts +1 -1
- package/src/lib/injectable.ts +1 -1
- package/src/lib/injector.ts +5 -5
- package/src/lib/lifecycle.ts +4 -4
- package/src/lib/metadata.ts +1 -1
- package/src/lib/provider.ts +4 -4
- package/target/lib/injectable-el.d.ts +1 -340
- package/target/lib/injectable.d.ts +1 -5
- package/target/lib/injector.d.ts +1 -1
- package/target/lib/injector.js.map +1 -1
- package/target/lib/lifecycle.js.map +1 -1
- package/target/lib/provider.js.map +1 -1
package/package.json
CHANGED
package/src/lib/dom-injector.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { injectables, Injector } from './injector.js';
|
|
2
2
|
|
|
3
3
|
export class DOMInjector extends Injector {
|
|
4
|
-
attach(root: HTMLElement) {
|
|
4
|
+
attach(root: HTMLElement): void {
|
|
5
5
|
injectables.set(root, this);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
detach(root: HTMLElement) {
|
|
8
|
+
detach(root: HTMLElement): void {
|
|
9
9
|
injectables.delete(root);
|
|
10
10
|
}
|
|
11
11
|
}
|
package/src/lib/injectable-el.ts
CHANGED
package/src/lib/injectable.ts
CHANGED
|
@@ -12,7 +12,7 @@ export function injectable(opts?: InjectableOpts) {
|
|
|
12
12
|
return function injectableDecorator<T extends ConstructableToken<any>>(
|
|
13
13
|
Base: T,
|
|
14
14
|
ctx: ClassDecoratorContext
|
|
15
|
-
) {
|
|
15
|
+
): T {
|
|
16
16
|
const def = {
|
|
17
17
|
[Base.name]: class extends Base {
|
|
18
18
|
constructor(...args: any[]) {
|
package/src/lib/injector.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
/**
|
|
11
11
|
* Keeps track of all Injectable services and their Injector
|
|
12
12
|
*/
|
|
13
|
-
export const injectables
|
|
13
|
+
export const injectables: WeakMap<object, Injector> = new WeakMap();
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Injectors create and store instances of services.
|
|
@@ -33,8 +33,8 @@ export class Injector {
|
|
|
33
33
|
// keep track of instances. One Token can have one instance
|
|
34
34
|
#instances = new WeakMap<InjectionToken<any>, any>();
|
|
35
35
|
|
|
36
|
-
parent;
|
|
37
|
-
providers;
|
|
36
|
+
parent?: Injector;
|
|
37
|
+
providers: Provider<unknown>[];
|
|
38
38
|
|
|
39
39
|
constructor(providers: Provider<unknown>[] = [], parent?: Injector) {
|
|
40
40
|
this.parent = parent;
|
|
@@ -91,11 +91,11 @@ export class Injector {
|
|
|
91
91
|
return this.#createAndCache(token, () => new token());
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
setParent(parent: Injector | undefined) {
|
|
94
|
+
setParent(parent: Injector | undefined): void {
|
|
95
95
|
this.parent = parent;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
clear() {
|
|
98
|
+
clear(): void {
|
|
99
99
|
this.#instances = new WeakMap();
|
|
100
100
|
}
|
|
101
101
|
|
package/src/lib/lifecycle.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { InjectableMetadata } from './metadata.js';
|
|
2
|
-
|
|
3
1
|
(Symbol as any).metadata ??= Symbol('Symbol.metadata');
|
|
4
2
|
|
|
3
|
+
import { InjectableMetadata } from './metadata.js';
|
|
4
|
+
|
|
5
5
|
export function injected() {
|
|
6
|
-
return function onInjectDecorator(val: Function, ctx: ClassMethodDecoratorContext) {
|
|
6
|
+
return function onInjectDecorator(val: Function, ctx: ClassMethodDecoratorContext): void {
|
|
7
7
|
const metadata: InjectableMetadata = ctx.metadata;
|
|
8
8
|
metadata.onInjected ??= [];
|
|
9
9
|
metadata.onInjected.push(val);
|
|
@@ -11,7 +11,7 @@ export function injected() {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export function created() {
|
|
14
|
-
return function onInjectDecorator(val: Function, ctx: ClassMethodDecoratorContext) {
|
|
14
|
+
return function onInjectDecorator(val: Function, ctx: ClassMethodDecoratorContext): void {
|
|
15
15
|
const metadata: InjectableMetadata = ctx.metadata;
|
|
16
16
|
metadata.onCreated ??= [];
|
|
17
17
|
metadata.onCreated.push(val);
|
package/src/lib/metadata.ts
CHANGED
|
@@ -5,7 +5,7 @@ export interface InjectableMetadata {
|
|
|
5
5
|
onInjected?: Function[];
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export function readMetadata<T>(target: ConstructableToken<T>) {
|
|
8
|
+
export function readMetadata<T>(target: ConstructableToken<T>): InjectableMetadata | null {
|
|
9
9
|
const metadata: InjectableMetadata | null = target[Symbol.metadata];
|
|
10
10
|
|
|
11
11
|
return metadata;
|
package/src/lib/provider.ts
CHANGED
|
@@ -3,14 +3,14 @@ import { Injector } from './injector.js';
|
|
|
3
3
|
export type ProviderFactory<T> = (injector: Injector) => T;
|
|
4
4
|
|
|
5
5
|
export class StaticToken<T> {
|
|
6
|
-
#name;
|
|
7
|
-
#factory
|
|
6
|
+
#name: string;
|
|
7
|
+
#factory?: ProviderFactory<T>;
|
|
8
8
|
|
|
9
|
-
get name() {
|
|
9
|
+
get name(): string {
|
|
10
10
|
return this.#name;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
get factory() {
|
|
13
|
+
get factory(): ProviderFactory<T> | undefined {
|
|
14
14
|
return this.#factory;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1,341 +1,2 @@
|
|
|
1
1
|
import { ConstructableToken } from './provider.js';
|
|
2
|
-
export declare function injectableEl<T extends ConstructableToken<HTMLElement>>(Base: T, _ctx: ClassDecoratorContext):
|
|
3
|
-
new (..._: any[]): {
|
|
4
|
-
connectedCallback(): void;
|
|
5
|
-
disconnectedCallback(): void;
|
|
6
|
-
accessKey: string;
|
|
7
|
-
readonly accessKeyLabel: string;
|
|
8
|
-
autocapitalize: string;
|
|
9
|
-
dir: string;
|
|
10
|
-
draggable: boolean;
|
|
11
|
-
hidden: boolean;
|
|
12
|
-
inert: boolean;
|
|
13
|
-
innerText: string;
|
|
14
|
-
lang: string;
|
|
15
|
-
readonly offsetHeight: number;
|
|
16
|
-
readonly offsetLeft: number;
|
|
17
|
-
readonly offsetParent: Element | null;
|
|
18
|
-
readonly offsetTop: number;
|
|
19
|
-
readonly offsetWidth: number;
|
|
20
|
-
outerText: string;
|
|
21
|
-
popover: string | null;
|
|
22
|
-
spellcheck: boolean;
|
|
23
|
-
title: string;
|
|
24
|
-
translate: boolean;
|
|
25
|
-
writingSuggestions: string;
|
|
26
|
-
attachInternals(): ElementInternals;
|
|
27
|
-
click(): void;
|
|
28
|
-
hidePopover(): void;
|
|
29
|
-
showPopover(): void;
|
|
30
|
-
togglePopover(force?: boolean): boolean;
|
|
31
|
-
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
32
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
33
|
-
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
34
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
35
|
-
readonly attributes: NamedNodeMap;
|
|
36
|
-
readonly classList: DOMTokenList;
|
|
37
|
-
className: string;
|
|
38
|
-
readonly clientHeight: number;
|
|
39
|
-
readonly clientLeft: number;
|
|
40
|
-
readonly clientTop: number;
|
|
41
|
-
readonly clientWidth: number;
|
|
42
|
-
readonly currentCSSZoom: number;
|
|
43
|
-
id: string;
|
|
44
|
-
innerHTML: string;
|
|
45
|
-
readonly localName: string;
|
|
46
|
-
readonly namespaceURI: string | null;
|
|
47
|
-
onfullscreenchange: ((this: Element, ev: Event) => any) | null;
|
|
48
|
-
onfullscreenerror: ((this: Element, ev: Event) => any) | null;
|
|
49
|
-
outerHTML: string;
|
|
50
|
-
readonly ownerDocument: Document;
|
|
51
|
-
readonly part: DOMTokenList;
|
|
52
|
-
readonly prefix: string | null;
|
|
53
|
-
readonly scrollHeight: number;
|
|
54
|
-
scrollLeft: number;
|
|
55
|
-
scrollTop: number;
|
|
56
|
-
readonly scrollWidth: number;
|
|
57
|
-
readonly shadowRoot: ShadowRoot | null;
|
|
58
|
-
slot: string;
|
|
59
|
-
readonly tagName: string;
|
|
60
|
-
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
61
|
-
checkVisibility(options?: CheckVisibilityOptions): boolean;
|
|
62
|
-
closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
|
|
63
|
-
closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
|
|
64
|
-
closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
|
|
65
|
-
closest<E extends Element = Element>(selectors: string): E | null;
|
|
66
|
-
computedStyleMap(): StylePropertyMapReadOnly;
|
|
67
|
-
getAttribute(qualifiedName: string): string | null;
|
|
68
|
-
getAttributeNS(namespace: string | null, localName: string): string | null;
|
|
69
|
-
getAttributeNames(): string[];
|
|
70
|
-
getAttributeNode(qualifiedName: string): Attr | null;
|
|
71
|
-
getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
|
|
72
|
-
getBoundingClientRect(): DOMRect;
|
|
73
|
-
getClientRects(): DOMRectList;
|
|
74
|
-
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
75
|
-
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
|
|
76
|
-
getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
|
|
77
|
-
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
|
|
78
|
-
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
79
|
-
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
|
|
80
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
81
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
82
|
-
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
|
|
83
|
-
getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
|
|
84
|
-
getHTML(options?: GetHTMLOptions): string;
|
|
85
|
-
hasAttribute(qualifiedName: string): boolean;
|
|
86
|
-
hasAttributeNS(namespace: string | null, localName: string): boolean;
|
|
87
|
-
hasAttributes(): boolean;
|
|
88
|
-
hasPointerCapture(pointerId: number): boolean;
|
|
89
|
-
insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
|
|
90
|
-
insertAdjacentHTML(position: InsertPosition, string: string): void;
|
|
91
|
-
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
92
|
-
matches(selectors: string): boolean;
|
|
93
|
-
releasePointerCapture(pointerId: number): void;
|
|
94
|
-
removeAttribute(qualifiedName: string): void;
|
|
95
|
-
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
96
|
-
removeAttributeNode(attr: Attr): Attr;
|
|
97
|
-
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
98
|
-
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
99
|
-
scroll(options?: ScrollToOptions): void;
|
|
100
|
-
scroll(x: number, y: number): void;
|
|
101
|
-
scrollBy(options?: ScrollToOptions): void;
|
|
102
|
-
scrollBy(x: number, y: number): void;
|
|
103
|
-
scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
|
|
104
|
-
scrollTo(options?: ScrollToOptions): void;
|
|
105
|
-
scrollTo(x: number, y: number): void;
|
|
106
|
-
setAttribute(qualifiedName: string, value: string): void;
|
|
107
|
-
setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
|
|
108
|
-
setAttributeNode(attr: Attr): Attr | null;
|
|
109
|
-
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
110
|
-
setHTMLUnsafe(html: string): void;
|
|
111
|
-
setPointerCapture(pointerId: number): void;
|
|
112
|
-
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
113
|
-
webkitMatchesSelector(selectors: string): boolean;
|
|
114
|
-
readonly baseURI: string;
|
|
115
|
-
readonly childNodes: NodeListOf<ChildNode>;
|
|
116
|
-
readonly firstChild: ChildNode | null;
|
|
117
|
-
readonly isConnected: boolean;
|
|
118
|
-
readonly lastChild: ChildNode | null;
|
|
119
|
-
readonly nextSibling: ChildNode | null;
|
|
120
|
-
readonly nodeName: string;
|
|
121
|
-
readonly nodeType: number;
|
|
122
|
-
nodeValue: string | null;
|
|
123
|
-
readonly parentElement: HTMLElement | null;
|
|
124
|
-
readonly parentNode: ParentNode | null;
|
|
125
|
-
readonly previousSibling: ChildNode | null;
|
|
126
|
-
textContent: string | null;
|
|
127
|
-
appendChild<T_1 extends Node>(node: T_1): T_1;
|
|
128
|
-
cloneNode(deep?: boolean): Node;
|
|
129
|
-
compareDocumentPosition(other: Node): number;
|
|
130
|
-
contains(other: Node | null): boolean;
|
|
131
|
-
getRootNode(options?: GetRootNodeOptions): Node;
|
|
132
|
-
hasChildNodes(): boolean;
|
|
133
|
-
insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
|
|
134
|
-
isDefaultNamespace(namespace: string | null): boolean;
|
|
135
|
-
isEqualNode(otherNode: Node | null): boolean;
|
|
136
|
-
isSameNode(otherNode: Node | null): boolean;
|
|
137
|
-
lookupNamespaceURI(prefix: string | null): string | null;
|
|
138
|
-
lookupPrefix(namespace: string | null): string | null;
|
|
139
|
-
normalize(): void;
|
|
140
|
-
removeChild<T_1 extends Node>(child: T_1): T_1;
|
|
141
|
-
replaceChild<T_1 extends Node>(node: Node, child: T_1): T_1;
|
|
142
|
-
readonly ELEMENT_NODE: 1;
|
|
143
|
-
readonly ATTRIBUTE_NODE: 2;
|
|
144
|
-
readonly TEXT_NODE: 3;
|
|
145
|
-
readonly CDATA_SECTION_NODE: 4;
|
|
146
|
-
readonly ENTITY_REFERENCE_NODE: 5;
|
|
147
|
-
readonly ENTITY_NODE: 6;
|
|
148
|
-
readonly PROCESSING_INSTRUCTION_NODE: 7;
|
|
149
|
-
readonly COMMENT_NODE: 8;
|
|
150
|
-
readonly DOCUMENT_NODE: 9;
|
|
151
|
-
readonly DOCUMENT_TYPE_NODE: 10;
|
|
152
|
-
readonly DOCUMENT_FRAGMENT_NODE: 11;
|
|
153
|
-
readonly NOTATION_NODE: 12;
|
|
154
|
-
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
|
|
155
|
-
readonly DOCUMENT_POSITION_PRECEDING: 2;
|
|
156
|
-
readonly DOCUMENT_POSITION_FOLLOWING: 4;
|
|
157
|
-
readonly DOCUMENT_POSITION_CONTAINS: 8;
|
|
158
|
-
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
|
|
159
|
-
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
|
|
160
|
-
dispatchEvent(event: Event): boolean;
|
|
161
|
-
ariaAtomic: string | null;
|
|
162
|
-
ariaAutoComplete: string | null;
|
|
163
|
-
ariaBrailleLabel: string | null;
|
|
164
|
-
ariaBrailleRoleDescription: string | null;
|
|
165
|
-
ariaBusy: string | null;
|
|
166
|
-
ariaChecked: string | null;
|
|
167
|
-
ariaColCount: string | null;
|
|
168
|
-
ariaColIndex: string | null;
|
|
169
|
-
ariaColIndexText: string | null;
|
|
170
|
-
ariaColSpan: string | null;
|
|
171
|
-
ariaCurrent: string | null;
|
|
172
|
-
ariaDescription: string | null;
|
|
173
|
-
ariaDisabled: string | null;
|
|
174
|
-
ariaExpanded: string | null;
|
|
175
|
-
ariaHasPopup: string | null;
|
|
176
|
-
ariaHidden: string | null;
|
|
177
|
-
ariaInvalid: string | null;
|
|
178
|
-
ariaKeyShortcuts: string | null;
|
|
179
|
-
ariaLabel: string | null;
|
|
180
|
-
ariaLevel: string | null;
|
|
181
|
-
ariaLive: string | null;
|
|
182
|
-
ariaModal: string | null;
|
|
183
|
-
ariaMultiLine: string | null;
|
|
184
|
-
ariaMultiSelectable: string | null;
|
|
185
|
-
ariaOrientation: string | null;
|
|
186
|
-
ariaPlaceholder: string | null;
|
|
187
|
-
ariaPosInSet: string | null;
|
|
188
|
-
ariaPressed: string | null;
|
|
189
|
-
ariaReadOnly: string | null;
|
|
190
|
-
ariaRequired: string | null;
|
|
191
|
-
ariaRoleDescription: string | null;
|
|
192
|
-
ariaRowCount: string | null;
|
|
193
|
-
ariaRowIndex: string | null;
|
|
194
|
-
ariaRowIndexText: string | null;
|
|
195
|
-
ariaRowSpan: string | null;
|
|
196
|
-
ariaSelected: string | null;
|
|
197
|
-
ariaSetSize: string | null;
|
|
198
|
-
ariaSort: string | null;
|
|
199
|
-
ariaValueMax: string | null;
|
|
200
|
-
ariaValueMin: string | null;
|
|
201
|
-
ariaValueNow: string | null;
|
|
202
|
-
ariaValueText: string | null;
|
|
203
|
-
role: string | null;
|
|
204
|
-
animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
|
|
205
|
-
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
206
|
-
after(...nodes: (Node | string)[]): void;
|
|
207
|
-
before(...nodes: (Node | string)[]): void;
|
|
208
|
-
remove(): void;
|
|
209
|
-
replaceWith(...nodes: (Node | string)[]): void;
|
|
210
|
-
readonly nextElementSibling: Element | null;
|
|
211
|
-
readonly previousElementSibling: Element | null;
|
|
212
|
-
readonly childElementCount: number;
|
|
213
|
-
readonly children: HTMLCollection;
|
|
214
|
-
readonly firstElementChild: Element | null;
|
|
215
|
-
readonly lastElementChild: Element | null;
|
|
216
|
-
append(...nodes: (Node | string)[]): void;
|
|
217
|
-
prepend(...nodes: (Node | string)[]): void;
|
|
218
|
-
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
|
|
219
|
-
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
|
|
220
|
-
querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
|
|
221
|
-
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
|
|
222
|
-
querySelector<E extends Element = Element>(selectors: string): E | null;
|
|
223
|
-
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
|
|
224
|
-
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
|
|
225
|
-
querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
|
|
226
|
-
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
|
|
227
|
-
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
|
|
228
|
-
replaceChildren(...nodes: (Node | string)[]): void;
|
|
229
|
-
readonly assignedSlot: HTMLSlotElement | null;
|
|
230
|
-
readonly attributeStyleMap: StylePropertyMap;
|
|
231
|
-
readonly style: CSSStyleDeclaration;
|
|
232
|
-
contentEditable: string;
|
|
233
|
-
enterKeyHint: string;
|
|
234
|
-
inputMode: string;
|
|
235
|
-
readonly isContentEditable: boolean;
|
|
236
|
-
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
237
|
-
onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
238
|
-
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
239
|
-
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
240
|
-
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
|
|
241
|
-
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
242
|
-
onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
|
|
243
|
-
onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
244
|
-
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
245
|
-
oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
246
|
-
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
247
|
-
oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
248
|
-
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
249
|
-
onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
250
|
-
onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
251
|
-
oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
252
|
-
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
253
|
-
oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
254
|
-
oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
255
|
-
oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
256
|
-
oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
257
|
-
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
258
|
-
ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
259
|
-
ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
260
|
-
ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
261
|
-
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
262
|
-
ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
263
|
-
ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
264
|
-
ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
|
|
265
|
-
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
266
|
-
onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
267
|
-
onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
268
|
-
onerror: OnErrorEventHandler;
|
|
269
|
-
onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
|
|
270
|
-
onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
|
|
271
|
-
ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
272
|
-
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
273
|
-
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
274
|
-
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
275
|
-
onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
276
|
-
onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
|
|
277
|
-
onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
278
|
-
onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
279
|
-
onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
280
|
-
onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
281
|
-
onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
282
|
-
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
283
|
-
onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
284
|
-
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
285
|
-
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
286
|
-
onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
287
|
-
onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
288
|
-
onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
|
|
289
|
-
onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
|
|
290
|
-
onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
291
|
-
onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
292
|
-
onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
293
|
-
onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
294
|
-
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
295
|
-
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
296
|
-
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
297
|
-
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
298
|
-
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
299
|
-
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
300
|
-
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
|
|
301
|
-
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
|
|
302
|
-
onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
303
|
-
onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
304
|
-
onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
|
|
305
|
-
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
306
|
-
onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
307
|
-
onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
|
|
308
|
-
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
309
|
-
onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
310
|
-
onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
311
|
-
onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
312
|
-
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
313
|
-
onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
314
|
-
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
315
|
-
onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
|
|
316
|
-
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
317
|
-
ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
318
|
-
ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
319
|
-
ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
320
|
-
ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
321
|
-
ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
322
|
-
ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
|
|
323
|
-
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
324
|
-
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
325
|
-
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
326
|
-
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
|
|
327
|
-
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
328
|
-
onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
329
|
-
onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
330
|
-
onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
331
|
-
onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
332
|
-
onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
|
|
333
|
-
onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
|
|
334
|
-
autofocus: boolean;
|
|
335
|
-
readonly dataset: DOMStringMap;
|
|
336
|
-
nonce?: string;
|
|
337
|
-
tabIndex: number;
|
|
338
|
-
blur(): void;
|
|
339
|
-
focus(options?: FocusOptions): void;
|
|
340
|
-
};
|
|
341
|
-
} & T;
|
|
2
|
+
export declare function injectableEl<T extends ConstructableToken<HTMLElement>>(Base: T, _ctx: ClassDecoratorContext): T;
|
|
@@ -2,8 +2,4 @@ import { ConstructableToken, Provider } from './provider.js';
|
|
|
2
2
|
export interface InjectableOpts {
|
|
3
3
|
providers?: Provider<unknown>[];
|
|
4
4
|
}
|
|
5
|
-
export declare function injectable(opts?: InjectableOpts): <T extends ConstructableToken<any>>(Base: T, ctx: ClassDecoratorContext) =>
|
|
6
|
-
new (...args: any[]): {
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
};
|
|
9
|
-
} & T;
|
|
5
|
+
export declare function injectable(opts?: InjectableOpts): <T extends ConstructableToken<any>>(Base: T, ctx: ClassDecoratorContext) => T;
|
package/target/lib/injector.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { InjectionToken, Provider } from './provider.js';
|
|
|
2
2
|
export declare const injectables: WeakMap<object, Injector>;
|
|
3
3
|
export declare class Injector {
|
|
4
4
|
#private;
|
|
5
|
-
parent
|
|
5
|
+
parent?: Injector;
|
|
6
6
|
providers: Provider<unknown>[];
|
|
7
7
|
constructor(providers?: Provider<unknown>[], parent?: Injector);
|
|
8
8
|
inject<T>(token: InjectionToken<T>): T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injector.js","sourceRoot":"","sources":["../../src/lib/injector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAKL,WAAW,EACZ,MAAM,eAAe,CAAC;AAKvB,MAAM,CAAC,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"injector.js","sourceRoot":"","sources":["../../src/lib/injector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAKL,WAAW,EACZ,MAAM,eAAe,CAAC;AAKvB,MAAM,CAAC,MAAM,WAAW,GAA8B,IAAI,OAAO,EAAE,CAAC;AAmBpE,MAAM,OAAO,QAAQ;IAEnB,UAAU,GAAG,IAAI,OAAO,EAA4B,CAAC;IAErD,MAAM,CAAY;IAClB,SAAS,CAAsB;IAE/B,YAAY,YAAiC,EAAE,EAAE,MAAiB;QAChE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAGD,MAAM,CAAI,KAAwB;QAEhC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC;YAE7C,MAAM,QAAQ,GAAG,YAAY,CAAC,KAA8B,C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AC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAED,SAAS,aAAa,CAAC,QAAgB,EAAE,OAAiB;IACxD,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,KAAK,IAAI,EAAE,IAAI,OAAO,EAAE,CAAC;YACvB,IAAI,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC;gBAC7B,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/lib/lifecycle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/lib/lifecycle.ts"],"names":[],"mappings":"AAAC,MAAc,CAAC,QAAQ,KAAK,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAIvD,MAAM,UAAU,QAAQ;IACtB,OAAO,SAAS,iBAAiB,CAAC,GAAa,EAAE,GAAgC;QAC/E,MAAM,QAAQ,GAAuB,GAAG,CAAC,QAAQ,CAAC;QAClD,QAAQ,CAAC,UAAU,KAAK,EAAE,CAAC;QAC3B,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO;IACrB,OAAO,SAAS,iBAAiB,CAAC,GAAa,EAAE,GAAgC;QAC/E,MAAM,QAAQ,GAAuB,GAAG,CAAC,QAAQ,CAAC;QAClD,QAAQ,CAAC,SAAS,KAAK,EAAE,CAAC;QAC1B,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/lib/provider.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,WAAW;IACtB,KAAK,
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/lib/provider.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,WAAW;IACtB,KAAK,CAAS;IACd,QAAQ,CAAsB;IAE9B,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,YAAY,IAAY,EAAE,OAA4B;QACpD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;CACF"}
|