@angular-wave/angular.ts 0.10.0 → 0.12.0
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/@types/angular.d.ts +84 -58
- package/@types/animations/animate-css-driver.d.ts +0 -1
- package/@types/animations/animate-css.d.ts +0 -1
- package/@types/animations/animate-js-driver.d.ts +1 -7
- package/@types/animations/animate-js.d.ts +1 -4
- package/@types/animations/animate.d.ts +5 -355
- package/@types/animations/animation.d.ts +4 -4
- package/@types/animations/interface.d.ts +84 -0
- package/@types/animations/queue/animate-queue.d.ts +21 -0
- package/@types/animations/queue/interface.d.ts +50 -0
- package/@types/animations/runner/animate-runner.d.ts +99 -0
- package/@types/core/compile/attributes.d.ts +5 -5
- package/@types/core/compile/compile.d.ts +4 -4
- package/@types/core/controller/controller.d.ts +1 -1
- package/@types/core/di/di.d.ts +26 -0
- package/@types/core/di/injector.d.ts +0 -11
- package/@types/core/di/internal-injector.d.ts +2 -2
- package/@types/core/di/ng-module/ng-module.d.ts +197 -0
- package/@types/core/filter/filter.d.ts +2 -2
- package/@types/core/sanitize/interface.d.ts +8 -0
- package/@types/core/sanitize/sanitize-uri.d.ts +5 -2
- package/@types/core/scope/interface.d.ts +2 -2
- package/@types/core/scope/scope.d.ts +10 -2
- package/@types/directive/class/class.d.ts +3 -3
- package/@types/directive/form/form.d.ts +7 -7
- package/@types/directive/if/if.d.ts +2 -2
- package/@types/directive/include/include.d.ts +4 -4
- package/@types/directive/inject/inject.d.ts +2 -2
- package/@types/directive/input/input.d.ts +10 -10
- package/@types/directive/messages/messages.d.ts +19 -23
- package/@types/directive/model/model.d.ts +3 -3
- package/@types/directive/scope/scope.d.ts +4 -0
- package/@types/directive/show-hide/show-hide.d.ts +3 -4
- package/@types/directive/switch/switch.d.ts +3 -5
- package/@types/directive/wasm/wasm.d.ts +4 -0
- package/@types/{services → directive}/worker/interface.d.ts +1 -0
- package/@types/directive/worker/worker.d.ts +18 -8
- package/@types/interface.d.ts +49 -21
- package/@types/namespace.d.ts +29 -4
- package/@types/ng.d.ts +3 -5
- package/@types/router/params/interface.d.ts +0 -25
- package/@types/router/state/interface.d.ts +0 -9
- package/@types/router/template-factory.d.ts +1 -1
- package/@types/router/transition/interface.d.ts +0 -33
- package/@types/services/log/log.d.ts +2 -2
- package/@types/services/sce/sce.d.ts +4 -82
- package/@types/services/sse/sse.d.ts +1 -5
- package/@types/services/storage/interface.d.ts +5 -0
- package/@types/services/storage/storage.d.ts +19 -0
- package/@types/services/stream/interface.d.ts +18 -0
- package/@types/shared/dom.d.ts +25 -10
- package/@types/shared/strings.d.ts +0 -6
- package/@types/shared/utils.d.ts +24 -14
- package/dist/angular-ts.esm.js +1867 -1506
- package/dist/angular-ts.umd.js +1867 -1506
- package/dist/angular-ts.umd.min.js +1 -1
- package/dist/angular.css +1 -1
- package/package.json +1 -2
- package/@types/animations/animate-queue.d.ts +0 -27
- package/@types/animations/animate-runner.d.ts +0 -31
- package/@types/core/di/ng-module.d.ts +0 -156
- package/@types/services/worker/worker.d.ts +0 -31
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AnimateRunner } from "./runner/animate-runner.js";
|
|
2
|
+
import { QueuePhase } from "./queue/interface.ts";
|
|
1
3
|
export type RafScheduler = {
|
|
2
4
|
/**
|
|
3
5
|
* Schedules a list of functions to run on the next animation frame(s).
|
|
@@ -15,3 +17,85 @@ export type RafScheduler = {
|
|
|
15
17
|
*/
|
|
16
18
|
waitUntilQuiet(fn: () => void): void;
|
|
17
19
|
};
|
|
20
|
+
export interface AnimationHost {
|
|
21
|
+
/** Pause animation. */
|
|
22
|
+
pause?: () => void;
|
|
23
|
+
/** Resume animation. */
|
|
24
|
+
resume?: () => void;
|
|
25
|
+
/** End animation. */
|
|
26
|
+
end?: () => void;
|
|
27
|
+
/** Cancel animation. */
|
|
28
|
+
cancel?: () => void;
|
|
29
|
+
/** Report animation progress. */
|
|
30
|
+
progress?: (...args: any[]) => void;
|
|
31
|
+
}
|
|
32
|
+
export interface AnimateService {
|
|
33
|
+
on(
|
|
34
|
+
event: string,
|
|
35
|
+
container: Element,
|
|
36
|
+
callback: (
|
|
37
|
+
element: Element,
|
|
38
|
+
phase: QueuePhase,
|
|
39
|
+
data: {
|
|
40
|
+
addClass?: string | null;
|
|
41
|
+
removeClass?: string | null;
|
|
42
|
+
from?: Record<string, any> | null;
|
|
43
|
+
to?: Record<string, any> | null;
|
|
44
|
+
},
|
|
45
|
+
) => void,
|
|
46
|
+
): void;
|
|
47
|
+
off(event: string, container?: Element, callback?: Function): void;
|
|
48
|
+
pin(element: Element, parentElement: Element): void;
|
|
49
|
+
enabled(element?: Element, enabled?: boolean): boolean;
|
|
50
|
+
cancel(runner: AnimateRunner): void;
|
|
51
|
+
enter(
|
|
52
|
+
element: Element,
|
|
53
|
+
parent: Element,
|
|
54
|
+
after?: Element,
|
|
55
|
+
options?: AnimationOptions,
|
|
56
|
+
): AnimateRunner;
|
|
57
|
+
move(
|
|
58
|
+
element: Element,
|
|
59
|
+
parent: Element,
|
|
60
|
+
after?: Element,
|
|
61
|
+
options?: AnimationOptions,
|
|
62
|
+
): AnimateRunner;
|
|
63
|
+
leave(element: Element, options?: AnimationOptions): AnimateRunner;
|
|
64
|
+
addClass(
|
|
65
|
+
element: Element,
|
|
66
|
+
className: string,
|
|
67
|
+
options?: AnimationOptions,
|
|
68
|
+
): AnimateRunner;
|
|
69
|
+
removeClass(
|
|
70
|
+
element: Element,
|
|
71
|
+
className: string,
|
|
72
|
+
options?: AnimationOptions,
|
|
73
|
+
): AnimateRunner;
|
|
74
|
+
setClass(
|
|
75
|
+
element: Element,
|
|
76
|
+
add: string,
|
|
77
|
+
remove: string,
|
|
78
|
+
options?: AnimationOptions,
|
|
79
|
+
): AnimateRunner;
|
|
80
|
+
animate(
|
|
81
|
+
element: Element,
|
|
82
|
+
from: Record<string, any>,
|
|
83
|
+
to: Record<string, any>,
|
|
84
|
+
className?: string,
|
|
85
|
+
options?: AnimationOptions,
|
|
86
|
+
): AnimateRunner;
|
|
87
|
+
}
|
|
88
|
+
export type AnimationMethod =
|
|
89
|
+
| "enter"
|
|
90
|
+
| "leave"
|
|
91
|
+
| "move"
|
|
92
|
+
| "addClass"
|
|
93
|
+
| "setClass"
|
|
94
|
+
| "removeClass";
|
|
95
|
+
export interface AnimationOptions {
|
|
96
|
+
addClass?: string;
|
|
97
|
+
from?: Record<string, string | number>;
|
|
98
|
+
removeClass?: string;
|
|
99
|
+
to?: Record<string, string | number>;
|
|
100
|
+
tempClasses: string | string[];
|
|
101
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function AnimateQueueProvider($animateProvider: any): void;
|
|
2
|
+
export class AnimateQueueProvider {
|
|
3
|
+
constructor($animateProvider: any);
|
|
4
|
+
rules: {
|
|
5
|
+
skip: any[];
|
|
6
|
+
cancel: any[];
|
|
7
|
+
join: any[];
|
|
8
|
+
};
|
|
9
|
+
$get: (
|
|
10
|
+
| string
|
|
11
|
+
| ((
|
|
12
|
+
$rootScope: ng.RootScopeService,
|
|
13
|
+
$injector: ng.InjectorService,
|
|
14
|
+
$$animation: any,
|
|
15
|
+
$templateRequest: ng.TemplateRequestService,
|
|
16
|
+
) => import("../queue/interface.ts").AnimateQueueService)
|
|
17
|
+
)[];
|
|
18
|
+
}
|
|
19
|
+
export namespace AnimateQueueProvider {
|
|
20
|
+
let $inject: string[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { AnimateRunner } from "../runner/animate-runner.js";
|
|
2
|
+
export type QueuePhase =
|
|
3
|
+
| "start"
|
|
4
|
+
| "close"
|
|
5
|
+
| "cancel"
|
|
6
|
+
| "progress"
|
|
7
|
+
| "dom"
|
|
8
|
+
| string;
|
|
9
|
+
export interface QueueAnimationData {
|
|
10
|
+
addClass: string | null;
|
|
11
|
+
removeClass: string | null;
|
|
12
|
+
from: Record<string, any> | null;
|
|
13
|
+
to: Record<string, any> | null;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
export interface AnimateQueueService {
|
|
17
|
+
on(
|
|
18
|
+
event: string,
|
|
19
|
+
container: Element,
|
|
20
|
+
callback?: (
|
|
21
|
+
el: Element,
|
|
22
|
+
phase: QueuePhase,
|
|
23
|
+
data: QueueAnimationData,
|
|
24
|
+
) => void,
|
|
25
|
+
): void;
|
|
26
|
+
off(
|
|
27
|
+
event: string,
|
|
28
|
+
container?: Element,
|
|
29
|
+
callback?: (
|
|
30
|
+
el: Element,
|
|
31
|
+
phase: QueuePhase,
|
|
32
|
+
data: QueueAnimationData,
|
|
33
|
+
) => void,
|
|
34
|
+
): void;
|
|
35
|
+
pin(element: Element, parent: Element): void;
|
|
36
|
+
push(
|
|
37
|
+
element: Element,
|
|
38
|
+
event: string,
|
|
39
|
+
options: {
|
|
40
|
+
addClass?: string | null;
|
|
41
|
+
removeClass?: string | null;
|
|
42
|
+
from?: Record<string, any> | null;
|
|
43
|
+
to?: Record<string, any> | null;
|
|
44
|
+
tempClasses?: string | string[] | null;
|
|
45
|
+
domOperation?: () => void;
|
|
46
|
+
[key: string]: any;
|
|
47
|
+
},
|
|
48
|
+
domOperation?: () => void,
|
|
49
|
+
): AnimateRunner;
|
|
50
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schedule a callback to run on the next animation frame.
|
|
3
|
+
* Multiple calls within the same frame are batched together.
|
|
4
|
+
*
|
|
5
|
+
* @param {VoidFunction} fn - The callback to execute.
|
|
6
|
+
*/
|
|
7
|
+
export function schedule(fn: VoidFunction): void;
|
|
8
|
+
/**
|
|
9
|
+
* Represents an asynchronous animation operation.
|
|
10
|
+
* Provides both callback-based and promise-based completion APIs.
|
|
11
|
+
*/
|
|
12
|
+
export class AnimateRunner {
|
|
13
|
+
/**
|
|
14
|
+
* Run an array of animation runners in sequence.
|
|
15
|
+
* Each runner waits for the previous one to complete.
|
|
16
|
+
*
|
|
17
|
+
* @param {AnimateRunner[]} runners - Runners to execute in order.
|
|
18
|
+
* @param {(ok: boolean) => void} callback - Invoked when all complete or one fails.
|
|
19
|
+
*/
|
|
20
|
+
static chain(runners: AnimateRunner[], callback: (ok: boolean) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* Waits for all animation runners to complete before invoking the callback.
|
|
23
|
+
*
|
|
24
|
+
* @param {AnimateRunner[]} runners - Active runners to wait for.
|
|
25
|
+
* @param {(ok: boolean) => void} callback - Called when all runners complete.
|
|
26
|
+
*/
|
|
27
|
+
static all(runners: AnimateRunner[], callback: (ok: boolean) => void): void;
|
|
28
|
+
/**
|
|
29
|
+
* @param {import("../interface.ts").AnimationHost} [host] - Optional animation host.
|
|
30
|
+
*/
|
|
31
|
+
constructor(host?: import("../interface.ts").AnimationHost);
|
|
32
|
+
/** @type {import("../interface.ts").AnimationHost} */
|
|
33
|
+
host: import("../interface.ts").AnimationHost;
|
|
34
|
+
/** @type {Array<(ok: boolean) => void>} */
|
|
35
|
+
_doneCallbacks: Array<(ok: boolean) => void>;
|
|
36
|
+
/** @type {RunnerState} */
|
|
37
|
+
_state: RunnerState;
|
|
38
|
+
/** @type {Promise<void>|null} */
|
|
39
|
+
_promise: Promise<void> | null;
|
|
40
|
+
/** @type {(fn: VoidFunction) => void} */
|
|
41
|
+
_schedule: (fn: VoidFunction) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Sets or updates the animation host.
|
|
44
|
+
* @param {import("../interface.ts").AnimationHost} host - The host object.
|
|
45
|
+
*/
|
|
46
|
+
setHost(host: import("../interface.ts").AnimationHost): void;
|
|
47
|
+
/**
|
|
48
|
+
* Registers a callback to be called once the animation completes.
|
|
49
|
+
* If the animation is already complete, it's called immediately.
|
|
50
|
+
*
|
|
51
|
+
* @param {(ok: boolean) => void} fn - Completion callback.
|
|
52
|
+
*/
|
|
53
|
+
done(fn: (ok: boolean) => void): void;
|
|
54
|
+
/**
|
|
55
|
+
* Notifies the host of animation progress.
|
|
56
|
+
* @param {...any} args - Progress arguments.
|
|
57
|
+
*/
|
|
58
|
+
progress(...args: any[]): void;
|
|
59
|
+
/** Pauses the animation, if supported by the host. */
|
|
60
|
+
pause(): void;
|
|
61
|
+
/** Resumes the animation, if supported by the host. */
|
|
62
|
+
resume(): void;
|
|
63
|
+
/** Ends the animation successfully. */
|
|
64
|
+
end(): void;
|
|
65
|
+
/** Cancels the animation. */
|
|
66
|
+
cancel(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Marks the animation as complete on the next animation frame.
|
|
69
|
+
* @param {boolean} [status=true] - True if successful, false if canceled.
|
|
70
|
+
*/
|
|
71
|
+
complete(status?: boolean): void;
|
|
72
|
+
/**
|
|
73
|
+
* Returns a promise that resolves or rejects when the animation completes.
|
|
74
|
+
* @returns {Promise<void>} Promise resolved on success or rejected on cancel.
|
|
75
|
+
*/
|
|
76
|
+
getPromise(): Promise<void>;
|
|
77
|
+
/** @inheritdoc */
|
|
78
|
+
then(onFulfilled: any, onRejected: any): Promise<void>;
|
|
79
|
+
/** @inheritdoc */
|
|
80
|
+
catch(onRejected: any): Promise<void>;
|
|
81
|
+
/** @inheritdoc */
|
|
82
|
+
finally(onFinally: any): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Completes the animation and invokes all done callbacks.
|
|
85
|
+
* @private
|
|
86
|
+
* @param {boolean} status - True if completed successfully, false if canceled.
|
|
87
|
+
*/
|
|
88
|
+
private _finish;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Internal runner states.
|
|
92
|
+
*/
|
|
93
|
+
type RunnerState = number;
|
|
94
|
+
declare namespace RunnerState {
|
|
95
|
+
let INITIAL: number;
|
|
96
|
+
let PENDING: number;
|
|
97
|
+
let DONE: number;
|
|
98
|
+
}
|
|
99
|
+
export {};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export class Attributes {
|
|
2
2
|
static $nonscope: boolean;
|
|
3
3
|
/**
|
|
4
|
-
* @param {ng.
|
|
5
|
-
* @param {
|
|
4
|
+
* @param {ng.RootScopeService} $rootScope
|
|
5
|
+
* @param {ng.AnimateService} $animate
|
|
6
6
|
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
7
7
|
* @param {*} $sce
|
|
8
8
|
* @param {import("../../shared/noderef.js").NodeRef} [nodeRef]
|
|
9
9
|
* @param {Object} [attributesToCopy]
|
|
10
10
|
*/
|
|
11
11
|
constructor(
|
|
12
|
-
$rootScope: ng.
|
|
13
|
-
$animate:
|
|
12
|
+
$rootScope: ng.RootScopeService,
|
|
13
|
+
$animate: ng.AnimateService,
|
|
14
14
|
$exceptionHandler: ng.ExceptionHandlerService,
|
|
15
15
|
$sce: any,
|
|
16
16
|
nodeRef?: import("../../shared/noderef.js").NodeRef,
|
|
17
17
|
attributesToCopy?: any,
|
|
18
18
|
);
|
|
19
19
|
$rootScope: import("../scope/scope.js").Scope;
|
|
20
|
-
$animate:
|
|
20
|
+
$animate: import("../../interface.ts").AnimateService;
|
|
21
21
|
$exceptionHandler: import("../../services/exception/interface.ts").ErrorHandler;
|
|
22
22
|
$sce: any;
|
|
23
23
|
$attr: {};
|
|
@@ -124,15 +124,15 @@ export class CompileProvider {
|
|
|
124
124
|
$get: (
|
|
125
125
|
| string
|
|
126
126
|
| ((
|
|
127
|
-
$injector:
|
|
127
|
+
$injector: ng.InjectorService,
|
|
128
128
|
$interpolate: any,
|
|
129
129
|
$exceptionHandler: import("../../services/exception/exception-handler.js").ErrorHandler,
|
|
130
|
-
$templateRequest:
|
|
131
|
-
$parse:
|
|
130
|
+
$templateRequest: ng.TemplateRequestService,
|
|
131
|
+
$parse: ng.ParseService,
|
|
132
132
|
$controller: any,
|
|
133
133
|
$rootScope: import("../scope/scope.js").Scope,
|
|
134
134
|
$sce: any,
|
|
135
|
-
$animate:
|
|
135
|
+
$animate: ng.AnimateService,
|
|
136
136
|
) => (
|
|
137
137
|
compileNode: string | Element | Node | ChildNode | NodeList,
|
|
138
138
|
transcludeFn?: import("./inteface.ts").TranscludeFn,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Function} fn
|
|
3
|
+
* @returns {string}
|
|
4
|
+
*/
|
|
5
|
+
export function stringifyFn(fn: Function): string;
|
|
6
|
+
/**
|
|
7
|
+
* @param {Function} fn
|
|
8
|
+
* @returns {Array<any>}
|
|
9
|
+
*/
|
|
10
|
+
export function extractArgs(fn: Function): Array<any>;
|
|
11
|
+
/**
|
|
12
|
+
* @param {Function} func
|
|
13
|
+
* @returns {boolean}
|
|
14
|
+
*/
|
|
15
|
+
export function isClass(func: Function): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @param {any} fn
|
|
18
|
+
* @param {boolean} [strictDi]
|
|
19
|
+
* @param {string} [name]
|
|
20
|
+
* @returns {Array<string>}
|
|
21
|
+
*/
|
|
22
|
+
export function annotate(
|
|
23
|
+
fn: any,
|
|
24
|
+
strictDi?: boolean,
|
|
25
|
+
name?: string,
|
|
26
|
+
): Array<string>;
|
|
@@ -8,15 +8,4 @@ export function createInjector(
|
|
|
8
8
|
modulesToLoad: Array<string | Function>,
|
|
9
9
|
strictDi?: boolean,
|
|
10
10
|
): InjectorService;
|
|
11
|
-
/**
|
|
12
|
-
* @param {any} fn
|
|
13
|
-
* @param {boolean} [strictDi]
|
|
14
|
-
* @param {String} [name]
|
|
15
|
-
* @returns {Array<string>}
|
|
16
|
-
*/
|
|
17
|
-
export function annotate(
|
|
18
|
-
fn: any,
|
|
19
|
-
strictDi?: boolean,
|
|
20
|
-
name?: string,
|
|
21
|
-
): Array<string>;
|
|
22
11
|
import { InjectorService } from "./internal-injector.js";
|
|
@@ -45,9 +45,9 @@ declare class AbstractInjector {
|
|
|
45
45
|
strictDi: boolean;
|
|
46
46
|
/** @type {string[]} */
|
|
47
47
|
path: string[];
|
|
48
|
-
/** @type {Object.<string,
|
|
48
|
+
/** @type {Object.<string, ng.NgModule>} */
|
|
49
49
|
modules: {
|
|
50
|
-
[x: string]: import("./ng-module.js").NgModule;
|
|
50
|
+
[x: string]: import("./ng-module/ng-module.js").NgModule;
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
53
|
* Get a service by name.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/** @private */
|
|
2
|
+
export const INJECTOR_LITERAL: "$injector";
|
|
3
|
+
/** @private */
|
|
4
|
+
export const COMPILE_LITERAL: "$compileProvider";
|
|
5
|
+
/** @private */
|
|
6
|
+
export const ANIMATION_LITERAL: "$animateProvider";
|
|
7
|
+
/** @private */
|
|
8
|
+
export const FILTER_LITERAL: "$filterProvider";
|
|
9
|
+
/** @private */
|
|
10
|
+
export const CONTROLLER_LITERAL: "$controllerProvider";
|
|
11
|
+
/**
|
|
12
|
+
* Modules are collections of application configuration information for components:
|
|
13
|
+
* controllers, directives, filters, etc. They provide recipes for the injector
|
|
14
|
+
* to do the actual instantiation. A module itself has no behaviour but only state.
|
|
15
|
+
* A such, it acts as a data structure between the Angular instance and the injector service.
|
|
16
|
+
*
|
|
17
|
+
* Since this is an internal structure that is exposed only via the Angular instance,
|
|
18
|
+
* it contains no validation of the items it receives. It is up to the instantiator on
|
|
19
|
+
* modules to do the actual validation.
|
|
20
|
+
*/
|
|
21
|
+
export class NgModule {
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} name - Name of the module
|
|
24
|
+
* @param {Array<string>} requires - List of modules which the injector will load before the current module
|
|
25
|
+
* @param {ng.Injectable<any>} [configFn]
|
|
26
|
+
*/
|
|
27
|
+
constructor(
|
|
28
|
+
name: string,
|
|
29
|
+
requires: Array<string>,
|
|
30
|
+
configFn?: ng.Injectable<any>,
|
|
31
|
+
);
|
|
32
|
+
/**
|
|
33
|
+
* Name of the current module.
|
|
34
|
+
* @type {string}
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
/**
|
|
38
|
+
* Array of module names that this module depends on.
|
|
39
|
+
* @type {string[]}
|
|
40
|
+
*/
|
|
41
|
+
requires: string[];
|
|
42
|
+
/**
|
|
43
|
+
* Holds a collection of tasks, required to instantiate an angular component
|
|
44
|
+
* @type {!Array<Array<*>>}
|
|
45
|
+
*/
|
|
46
|
+
invokeQueue: Array<Array<any>>;
|
|
47
|
+
/** @type {!Array<Array<*>>} */
|
|
48
|
+
configBlocks: Array<Array<any>>;
|
|
49
|
+
/** @type {!Array.<ng.Injectable<any>>} */
|
|
50
|
+
runBlocks: Array<ng.Injectable<any>>;
|
|
51
|
+
services: any[];
|
|
52
|
+
wasmModules: any[];
|
|
53
|
+
/**
|
|
54
|
+
* @param {string} name
|
|
55
|
+
* @param {any} object
|
|
56
|
+
* @returns {NgModule}
|
|
57
|
+
*/
|
|
58
|
+
value(name: string, object: any): NgModule;
|
|
59
|
+
/**
|
|
60
|
+
* @param {string} name
|
|
61
|
+
* @param {any} object
|
|
62
|
+
* @returns {NgModule}
|
|
63
|
+
*/
|
|
64
|
+
constant(name: string, object: any): NgModule;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @param {ng.Injectable<any>} configFn
|
|
68
|
+
* @returns {NgModule}
|
|
69
|
+
*/
|
|
70
|
+
config(configFn: ng.Injectable<any>): NgModule;
|
|
71
|
+
/**
|
|
72
|
+
* @param {ng.Injectable<any>} block
|
|
73
|
+
* @returns {NgModule}
|
|
74
|
+
*/
|
|
75
|
+
run(block: ng.Injectable<any>): NgModule;
|
|
76
|
+
/**
|
|
77
|
+
* @param {string} name
|
|
78
|
+
* @param {ng.Component} options
|
|
79
|
+
* @returns {NgModule}
|
|
80
|
+
*/
|
|
81
|
+
component(name: string, options: ng.Component): NgModule;
|
|
82
|
+
/**
|
|
83
|
+
* @param {string} name
|
|
84
|
+
* @param {ng.Injectable<any>} providerFunction
|
|
85
|
+
* @returns {NgModule}
|
|
86
|
+
*/
|
|
87
|
+
factory(name: string, providerFunction: ng.Injectable<any>): NgModule;
|
|
88
|
+
/**
|
|
89
|
+
* @param {string} name
|
|
90
|
+
* @param {ng.Injectable<any>} serviceFunction
|
|
91
|
+
* @returns {NgModule}
|
|
92
|
+
*/
|
|
93
|
+
service(name: string, serviceFunction: ng.Injectable<any>): NgModule;
|
|
94
|
+
/**
|
|
95
|
+
* @param {string} name
|
|
96
|
+
* @param {ng.Injectable<any>} providerType
|
|
97
|
+
* @returns {NgModule}
|
|
98
|
+
*/
|
|
99
|
+
provider(name: string, providerType: ng.Injectable<any>): NgModule;
|
|
100
|
+
/**
|
|
101
|
+
* @param {string} name
|
|
102
|
+
* @param {ng.Injectable<any>} decorFn
|
|
103
|
+
* @returns {NgModule}
|
|
104
|
+
*/
|
|
105
|
+
decorator(name: string, decorFn: ng.Injectable<any>): NgModule;
|
|
106
|
+
/**
|
|
107
|
+
* @param {string} name
|
|
108
|
+
* @param {ng.Injectable<any>} directiveFactory
|
|
109
|
+
* @returns {NgModule}
|
|
110
|
+
*/
|
|
111
|
+
directive(name: string, directiveFactory: ng.Injectable<any>): NgModule;
|
|
112
|
+
/**
|
|
113
|
+
* @param {string} name
|
|
114
|
+
* @param {ng.Injectable<any>} animationFactory
|
|
115
|
+
* @returns {NgModule}
|
|
116
|
+
*/
|
|
117
|
+
animation(name: string, animationFactory: ng.Injectable<any>): NgModule;
|
|
118
|
+
/**
|
|
119
|
+
* @param {string} name
|
|
120
|
+
* @param {ng.Injectable<any>} filterFn
|
|
121
|
+
* @return {NgModule}
|
|
122
|
+
*/
|
|
123
|
+
filter(name: string, filterFn: ng.Injectable<any>): NgModule;
|
|
124
|
+
/**
|
|
125
|
+
* @param {string} name
|
|
126
|
+
* @param {ng.Injectable<any>} ctlFn
|
|
127
|
+
* @returns {NgModule}
|
|
128
|
+
*/
|
|
129
|
+
controller(name: string, ctlFn: ng.Injectable<any>): NgModule;
|
|
130
|
+
/**
|
|
131
|
+
* Register a named WebAssembly module that will be instantiated via $provide.
|
|
132
|
+
*
|
|
133
|
+
* @param {string} name - The injectable name used to access the instantiated WebAssembly module.
|
|
134
|
+
*
|
|
135
|
+
* @param {string} src - URL of the `.wasm` file to fetch and instantiate.
|
|
136
|
+
*
|
|
137
|
+
* @param {Object<string, any>} [imports] WebAssembly import object, passed to `WebAssembly.instantiate` or `WebAssembly.instantiateStreaming`.
|
|
138
|
+
*
|
|
139
|
+
* @param {Object<string, any>} [opts] - Configuration object.
|
|
140
|
+
*
|
|
141
|
+
* Supported keys:
|
|
142
|
+
* - **raw**: `boolean`
|
|
143
|
+
* - `false` (default): the injectable resolves to `instance.exports`
|
|
144
|
+
* (ideal for plain WASM modules).
|
|
145
|
+
* - `true`: the injectable resolves to the full instantiation result:
|
|
146
|
+
* `{ instance, exports, module }`
|
|
147
|
+
* (required for runtimes such as Go, Emscripten, wasm-bindgen, etc).
|
|
148
|
+
*
|
|
149
|
+
* @returns {NgModule}
|
|
150
|
+
*/
|
|
151
|
+
wasm(
|
|
152
|
+
name: string,
|
|
153
|
+
src: string,
|
|
154
|
+
imports?: {
|
|
155
|
+
[x: string]: any;
|
|
156
|
+
},
|
|
157
|
+
opts?: {
|
|
158
|
+
[x: string]: any;
|
|
159
|
+
},
|
|
160
|
+
): NgModule;
|
|
161
|
+
/**
|
|
162
|
+
* Register a named worker that will be instantiated via $provide.
|
|
163
|
+
*
|
|
164
|
+
* @param {string} name
|
|
165
|
+
* @param {string | URL} scriptPath
|
|
166
|
+
* @param {ng.WorkerConfig} [config]
|
|
167
|
+
* @returns {NgModule}
|
|
168
|
+
*/
|
|
169
|
+
worker(
|
|
170
|
+
name: string,
|
|
171
|
+
scriptPath: string | URL,
|
|
172
|
+
config?: ng.WorkerConfig,
|
|
173
|
+
): NgModule;
|
|
174
|
+
/**
|
|
175
|
+
* @param {string} name
|
|
176
|
+
* @param {Function} ctor
|
|
177
|
+
* @returns {NgModule}
|
|
178
|
+
*/
|
|
179
|
+
session(name: string, ctor: Function): NgModule;
|
|
180
|
+
/**
|
|
181
|
+
* @param {string} name
|
|
182
|
+
* @param {Function} ctor
|
|
183
|
+
* @returns {NgModule}
|
|
184
|
+
*/
|
|
185
|
+
local(name: string, ctor: Function): NgModule;
|
|
186
|
+
/**
|
|
187
|
+
* @param {string} name
|
|
188
|
+
* @param {Function} ctor
|
|
189
|
+
* @param {ng.StorageBackend} backendOrConfig
|
|
190
|
+
* @returns {NgModule}
|
|
191
|
+
*/
|
|
192
|
+
store(
|
|
193
|
+
name: string,
|
|
194
|
+
ctor: Function,
|
|
195
|
+
backendOrConfig: ng.StorageBackend,
|
|
196
|
+
): NgModule;
|
|
197
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export class FilterProvider {
|
|
2
2
|
static $inject: string[];
|
|
3
3
|
/**
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {ng.ProvideService} $provide
|
|
5
5
|
*/
|
|
6
|
-
constructor($provide:
|
|
6
|
+
constructor($provide: ng.ProvideService);
|
|
7
7
|
$provide: import("../../interface.ts").Provider;
|
|
8
8
|
/**
|
|
9
9
|
* @param {string|Record<string, ng.FilterFn>} name
|
|
@@ -33,8 +33,11 @@ export class SanitizeUriProvider implements ServiceProvider {
|
|
|
33
33
|
regexp?: RegExp | undefined,
|
|
34
34
|
): RegExp | SanitizeUriProvider;
|
|
35
35
|
/**
|
|
36
|
-
* @returns {import("./interface").SanitizerFn}
|
|
36
|
+
* @returns {import("./interface.ts").SanitizerFn}
|
|
37
37
|
*/
|
|
38
|
-
$get
|
|
38
|
+
$get: (
|
|
39
|
+
| string
|
|
40
|
+
| (($window: ng.WindowService) => import("./interface.ts").SanitizerFn)
|
|
41
|
+
)[];
|
|
39
42
|
}
|
|
40
43
|
export type ServiceProvider = import("../../interface.ts").ServiceProvider;
|
|
@@ -5,10 +5,10 @@ export interface AsyncQueueTask {
|
|
|
5
5
|
fn: (...args: any[]) => any;
|
|
6
6
|
locals: Record<string, any>;
|
|
7
7
|
}
|
|
8
|
-
export type
|
|
8
|
+
export type ListenerFn = (newValue?: any, originalTarget?: object) => void;
|
|
9
9
|
export interface Listener {
|
|
10
10
|
originalTarget: object;
|
|
11
|
-
listenerFn:
|
|
11
|
+
listenerFn: ListenerFn;
|
|
12
12
|
watchFn: CompiledExpression;
|
|
13
13
|
id: number;
|
|
14
14
|
scopeId: number;
|
|
@@ -9,7 +9,13 @@ export function nextId(): number;
|
|
|
9
9
|
* or the original value if the target is not an object.
|
|
10
10
|
*/
|
|
11
11
|
export function createScope(target?: any, context?: Scope): Scope;
|
|
12
|
+
/**
|
|
13
|
+
* @param {any} target
|
|
14
|
+
* @returns {boolean}
|
|
15
|
+
*/
|
|
16
|
+
export function isUnsafeGlobal(target: any): boolean;
|
|
12
17
|
export const $postUpdateQueue: any[];
|
|
18
|
+
export let rootScope: any;
|
|
13
19
|
export class RootScopeProvider {
|
|
14
20
|
rootScope: Scope;
|
|
15
21
|
$get: (
|
|
@@ -84,6 +90,7 @@ export class Scope {
|
|
|
84
90
|
/** @type {boolean} */
|
|
85
91
|
$$destroyed: boolean;
|
|
86
92
|
scheduled: any[];
|
|
93
|
+
$scopename: any;
|
|
87
94
|
/** @private */
|
|
88
95
|
private propertyMap;
|
|
89
96
|
/**
|
|
@@ -123,12 +130,12 @@ export class Scope {
|
|
|
123
130
|
* function is invoked when changes to that property are detected.
|
|
124
131
|
*
|
|
125
132
|
* @param {string} watchProp - An expression to be watched in the context of this model.
|
|
126
|
-
* @param {
|
|
133
|
+
* @param {ng.ListenerFn} [listenerFn] - A function to execute when changes are detected on watched context.
|
|
127
134
|
* @param {boolean} [lazy] - A flag to indicate if the listener should be invoked immediately. Defaults to false.
|
|
128
135
|
*/
|
|
129
136
|
$watch(
|
|
130
137
|
watchProp: string,
|
|
131
|
-
listenerFn?:
|
|
138
|
+
listenerFn?: ng.ListenerFn,
|
|
132
139
|
lazy?: boolean,
|
|
133
140
|
): () => void;
|
|
134
141
|
$new(childInstance: any): any;
|
|
@@ -176,5 +183,6 @@ export class Scope {
|
|
|
176
183
|
* @returns {Scope|undefined}
|
|
177
184
|
*/
|
|
178
185
|
$getById(id: string | number): Scope | undefined;
|
|
186
|
+
$searchByName(name: any): any;
|
|
179
187
|
#private;
|
|
180
188
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const ngClassDirective:
|
|
2
|
-
export const ngClassOddDirective:
|
|
3
|
-
export const ngClassEvenDirective:
|
|
1
|
+
export const ngClassDirective: import("../../interface.ts").DirectiveFactory;
|
|
2
|
+
export const ngClassOddDirective: import("../../interface.ts").DirectiveFactory;
|
|
3
|
+
export const ngClassEvenDirective: import("../../interface.ts").DirectiveFactory;
|