@angular-wave/angular.ts 0.14.3 → 0.15.1
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 +27 -25
- package/@types/animations/animate-cache.d.ts +46 -2
- package/@types/animations/animate-children-directive.d.ts +4 -4
- package/@types/animations/animate-js.d.ts +1 -10
- package/@types/animations/animate.d.ts +6 -1
- package/@types/animations/interface.d.ts +15 -0
- package/@types/animations/runner/animate-runner.d.ts +73 -52
- package/@types/animations/shared.d.ts +0 -16
- package/@types/core/compile/attributes.d.ts +40 -10
- package/@types/core/compile/compile.d.ts +1 -1
- package/@types/core/compile/inteface.d.ts +5 -1
- package/@types/core/controller/controller.d.ts +1 -1
- package/@types/core/di/inteface.d.ts +11 -0
- package/@types/core/interpolate/interface.d.ts +1 -0
- package/@types/core/parse/ast/ast-node.d.ts +2 -0
- package/@types/core/parse/interface.d.ts +1 -1
- package/@types/core/parse/interpreter.d.ts +5 -3
- package/@types/core/parse/parse.d.ts +4 -1
- package/@types/core/scope/interface.d.ts +26 -0
- package/@types/core/scope/scope.d.ts +13 -13
- package/@types/directive/attrs/attrs.d.ts +2 -5
- package/@types/directive/bind/bind.d.ts +5 -7
- package/@types/directive/class/class.d.ts +3 -3
- package/@types/directive/controller/controller.d.ts +2 -2
- package/@types/directive/form/form.d.ts +16 -13
- package/@types/directive/include/include.d.ts +4 -4
- package/@types/directive/init/init.d.ts +2 -2
- package/@types/directive/input/input.d.ts +16 -0
- package/@types/directive/listener/listener.d.ts +4 -0
- package/@types/directive/messages/messages.d.ts +9 -8
- package/@types/directive/model/interface.d.ts +18 -0
- package/@types/directive/model/model.d.ts +25 -23
- package/@types/directive/non-bindable/non-bindable.d.ts +2 -2
- package/@types/directive/ref/ref.d.ts +5 -8
- package/@types/directive/repeat/repeat.d.ts +2 -4
- package/@types/directive/script/script.d.ts +2 -2
- package/@types/directive/select/select.d.ts +9 -10
- package/@types/directive/setter/setter.d.ts +2 -2
- package/@types/directive/show-hide/show-hide.d.ts +2 -4
- package/@types/directive/switch/switch.d.ts +4 -4
- package/@types/directive/validators/validators.d.ts +2 -2
- package/@types/injection-tokens.d.ts +3 -2
- package/@types/interface.d.ts +72 -23
- package/@types/namespace.d.ts +50 -6
- package/@types/router/directives/state-directives.d.ts +26 -24
- package/@types/router/directives/view-directive.d.ts +27 -131
- package/@types/router/glob/glob.d.ts +2 -6
- package/@types/router/router.d.ts +6 -4
- package/@types/router/scroll/interface.d.ts +3 -0
- package/@types/router/scroll/view-scroll.d.ts +8 -0
- package/@types/router/state/interface.d.ts +30 -126
- package/@types/router/state/state-builder.d.ts +14 -7
- package/@types/router/state/state-matcher.d.ts +11 -3
- package/@types/router/state/state-object.d.ts +5 -7
- package/@types/router/state/state-queue-manager.d.ts +14 -8
- package/@types/router/state/state-registry.d.ts +26 -12
- package/@types/router/state/state-service.d.ts +24 -12
- package/@types/router/template-factory.d.ts +2 -2
- package/@types/router/transition/hook-registry.d.ts +15 -5
- package/@types/router/transition/interface.d.ts +9 -9
- package/@types/router/transition/transition-hook.d.ts +11 -0
- package/@types/router/transition/transition-service.d.ts +12 -5
- package/@types/router/transition/transition.d.ts +20 -14
- package/@types/router/url/url-rule.d.ts +12 -9
- package/@types/router/url/url-rules.d.ts +3 -84
- package/@types/router/url/url-service.d.ts +23 -18
- package/@types/router/view/view.d.ts +4 -4
- package/@types/services/anchor-scroll/anchor-scroll.d.ts +2 -17
- package/@types/services/anchor-scroll/interface.d.ts +15 -0
- package/@types/services/cookie/cookie.d.ts +7 -13
- package/@types/services/exception/interface.d.ts +3 -3
- package/@types/services/http/http.d.ts +6 -31
- package/@types/services/http/interface.d.ts +22 -0
- package/@types/services/location/location.d.ts +14 -13
- package/@types/services/log/log.d.ts +7 -3
- package/@types/services/pubsub/pubsub.d.ts +18 -13
- package/@types/services/rest/rest.d.ts +7 -5
- package/@types/services/sce/interface.d.ts +25 -0
- package/@types/services/sce/sce.d.ts +9 -1
- package/@types/services/sse/interface.d.ts +8 -1
- package/@types/services/sse/sse.d.ts +10 -18
- package/@types/services/storage/storage.d.ts +6 -6
- package/@types/services/stream/interface.d.ts +1 -1
- package/@types/services/stream/stream.d.ts +98 -0
- package/@types/shared/common.d.ts +2 -2
- package/@types/shared/dom.d.ts +21 -42
- package/@types/shared/hof.d.ts +27 -37
- package/@types/shared/noderef.d.ts +3 -3
- package/@types/shared/strings.d.ts +31 -10
- package/@types/shared/utils.d.ts +207 -101
- package/@types/shared/validate.d.ts +20 -0
- package/dist/angular-ts.esm.js +2461 -2298
- package/dist/angular-ts.umd.js +2461 -2298
- package/dist/angular-ts.umd.min.js +1 -1
- package/dist/angular-ts.umd.min.js.gz +0 -0
- package/dist/angular-ts.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/@types/router/state-filters.d.ts +0 -39
- package/@types/router/view-scroll.d.ts +0 -12
- package/@types/shared/cache.d.ts +0 -7
package/@types/angular.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
export class Angular {
|
|
2
|
-
/** @
|
|
3
|
-
|
|
1
|
+
export class Angular extends EventTarget {
|
|
2
|
+
/** @private @type {!Array<string|any>} */
|
|
3
|
+
private _bootsrappedModules;
|
|
4
4
|
/** @public @type {ng.PubSubService} */
|
|
5
5
|
public $eventBus: ng.PubSubService;
|
|
6
|
+
/** @public @type {ng.InjectorService} */
|
|
7
|
+
public $injector: ng.InjectorService;
|
|
6
8
|
/**
|
|
9
|
+
* @public
|
|
7
10
|
* @type {string} `version` from `package.json`
|
|
8
11
|
*/
|
|
9
|
-
version: string;
|
|
10
|
-
/** @type {!Array<string|any>} */
|
|
11
|
-
bootsrappedModules: Array<string | any>;
|
|
12
|
+
public version: string;
|
|
12
13
|
/**
|
|
13
14
|
* Gets the controller instance for a given element, if exists. Defaults to "ngControllerController"
|
|
14
15
|
*
|
|
15
|
-
* @type {
|
|
16
|
+
* @type {typeof getController}
|
|
16
17
|
*/
|
|
17
|
-
getController:
|
|
18
|
-
element: Element,
|
|
19
|
-
name: string | null,
|
|
20
|
-
) => ng.Scope | undefined;
|
|
18
|
+
getController: typeof getController;
|
|
21
19
|
/**
|
|
22
20
|
* Return instance of InjectorService attached to element
|
|
23
|
-
* @type {
|
|
21
|
+
* @type {typeof getInjector}
|
|
24
22
|
*/
|
|
25
|
-
getInjector:
|
|
23
|
+
getInjector: typeof getInjector;
|
|
26
24
|
/**
|
|
27
25
|
* Gets scope for a given element.
|
|
28
|
-
*
|
|
26
|
+
* @type {typeof getScope}
|
|
29
27
|
*/
|
|
30
|
-
getScope:
|
|
28
|
+
getScope: typeof getScope;
|
|
29
|
+
/** @type {typeof errorHandlingConfig} */
|
|
31
30
|
errorHandlingConfig: typeof errorHandlingConfig;
|
|
32
|
-
|
|
31
|
+
/** @type {ng.InjectionTokens} */
|
|
32
|
+
$t: ng.InjectionTokens;
|
|
33
33
|
/**
|
|
34
34
|
*
|
|
35
35
|
* The `angular.module` is a global place for creating, registering and retrieving AngularTS
|
|
@@ -131,16 +131,12 @@ export class Angular {
|
|
|
131
131
|
config?: import("./interface.ts").AngularBootstrapConfig,
|
|
132
132
|
): ng.InjectorService;
|
|
133
133
|
$rootScope: ng.Scope;
|
|
134
|
-
$injector: import("./interface.ts").InjectorService;
|
|
135
134
|
/**
|
|
136
135
|
* @param {any[]} modules
|
|
137
|
-
* @param {boolean
|
|
138
|
-
* @returns {
|
|
136
|
+
* @param {boolean} [strictDi]
|
|
137
|
+
* @returns {ng.InjectorService}
|
|
139
138
|
*/
|
|
140
|
-
injector(
|
|
141
|
-
modules: any[],
|
|
142
|
-
strictDi: boolean | null,
|
|
143
|
-
): import("./core/di/internal-injector.js").InjectorService;
|
|
139
|
+
injector(modules: any[], strictDi?: boolean): ng.InjectorService;
|
|
144
140
|
/**
|
|
145
141
|
* @param {Element|Document} element
|
|
146
142
|
*/
|
|
@@ -154,9 +150,15 @@ export class Angular {
|
|
|
154
150
|
* or defined on `$scope` injectable.
|
|
155
151
|
*
|
|
156
152
|
* @param {string} name
|
|
157
|
-
* @returns {
|
|
153
|
+
* @returns {Proxy<ng.Scope>|undefined}
|
|
158
154
|
*/
|
|
159
|
-
getScopeByName(name: string):
|
|
155
|
+
getScopeByName(name: string): ProxyConstructor | undefined;
|
|
160
156
|
}
|
|
157
|
+
export type ModuleRegistry = {
|
|
158
|
+
[x: string]: NgModule;
|
|
159
|
+
};
|
|
160
|
+
import { getController } from "./shared/dom.js";
|
|
161
|
+
import { getInjector } from "./shared/dom.js";
|
|
162
|
+
import { getScope } from "./shared/dom.js";
|
|
161
163
|
import { errorHandlingConfig } from "./shared/utils.js";
|
|
162
164
|
import { NgModule } from "./core/di/ng-module/ng-module.js";
|
|
@@ -44,7 +44,51 @@ export function animateCache(): {
|
|
|
44
44
|
*/
|
|
45
45
|
put(key: string, value: any, isValid: boolean): void;
|
|
46
46
|
};
|
|
47
|
-
export function AnimateCacheProvider(): void;
|
|
48
47
|
export class AnimateCacheProvider {
|
|
49
|
-
$get:
|
|
48
|
+
$get(): {
|
|
49
|
+
/**
|
|
50
|
+
* Generates a unique cache key based on the node's parent and other parameters.
|
|
51
|
+
* @param {HTMLElement} node - The DOM node to generate the cache key for.
|
|
52
|
+
* @param {string} method - The animation method being applied.
|
|
53
|
+
* @param {string} [addClass] - Class to add during the animation.
|
|
54
|
+
* @param {string} [removeClass] - Class to remove during the animation.
|
|
55
|
+
* @returns {string} - The generated cache key.
|
|
56
|
+
*/
|
|
57
|
+
cacheKey(
|
|
58
|
+
node: HTMLElement,
|
|
59
|
+
method: string,
|
|
60
|
+
addClass?: string,
|
|
61
|
+
removeClass?: string,
|
|
62
|
+
): string;
|
|
63
|
+
/**
|
|
64
|
+
* Checks if a cached animation without a duration exists.
|
|
65
|
+
* @param {string} key - The cache key to check.
|
|
66
|
+
* @returns {boolean} - True if an invalid animation is cached, false otherwise.
|
|
67
|
+
*/
|
|
68
|
+
containsCachedAnimationWithoutDuration(key: string): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Clears the cache.
|
|
71
|
+
* @returns {void}
|
|
72
|
+
*/
|
|
73
|
+
flush(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the count of a specific cache entry.
|
|
76
|
+
* @param {string} key - The cache key to count.
|
|
77
|
+
* @returns {number} - The count of the cache entry.
|
|
78
|
+
*/
|
|
79
|
+
count(key: string): number;
|
|
80
|
+
/**
|
|
81
|
+
* Retrieves a value associated with a specific cache key.
|
|
82
|
+
* @param {string} key - The cache key to retrieve.
|
|
83
|
+
* @returns {any} - The value associated with the cache key.
|
|
84
|
+
*/
|
|
85
|
+
get(key: string): any;
|
|
86
|
+
/**
|
|
87
|
+
* Adds or updates a cache entry.
|
|
88
|
+
* @param {string} key - The cache key to add or update.
|
|
89
|
+
* @param {any} value - The value to store.
|
|
90
|
+
* @param {boolean} isValid - Whether the cache entry is valid.
|
|
91
|
+
*/
|
|
92
|
+
put(key: string, value: any, isValid: boolean): void;
|
|
93
|
+
};
|
|
50
94
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param {
|
|
3
|
-
* @returns {
|
|
2
|
+
* @param {ng.InterpolateService} $interpolate
|
|
3
|
+
* @returns {ng.Directive}
|
|
4
4
|
*/
|
|
5
5
|
export function $$AnimateChildrenDirective(
|
|
6
|
-
$interpolate:
|
|
7
|
-
):
|
|
6
|
+
$interpolate: ng.InterpolateService,
|
|
7
|
+
): ng.Directive;
|
|
8
8
|
export namespace $$AnimateChildrenDirective {
|
|
9
9
|
let $inject: string[];
|
|
10
10
|
}
|
|
@@ -3,16 +3,7 @@ export class AnimateJsProvider {
|
|
|
3
3
|
constructor($animateProvider: any);
|
|
4
4
|
$get: (
|
|
5
5
|
| string
|
|
6
|
-
| (($injector: ng.InjectorService) => (
|
|
7
|
-
element: any,
|
|
8
|
-
event: any,
|
|
9
|
-
classes: any,
|
|
10
|
-
options: any,
|
|
11
|
-
) => {
|
|
12
|
-
$$willAnimate: boolean;
|
|
13
|
-
end(): any;
|
|
14
|
-
start(): any;
|
|
15
|
-
})
|
|
6
|
+
| (($injector: ng.InjectorService) => import("./interface.ts").AnimateJsFn)
|
|
16
7
|
)[];
|
|
17
8
|
}
|
|
18
9
|
export namespace AnimateJsProvider {
|
|
@@ -93,7 +93,12 @@ export class AnimateProvider {
|
|
|
93
93
|
* @return {RegExp} The current CSS className expression value. If null then there is no expression value
|
|
94
94
|
*/
|
|
95
95
|
classNameFilter: (expression?: RegExp | undefined, ...args: any[]) => RegExp;
|
|
96
|
-
$get:
|
|
96
|
+
$get: (
|
|
97
|
+
| string
|
|
98
|
+
| ((
|
|
99
|
+
$$animateQueue: import("./queue/interface.ts").AnimateQueueService,
|
|
100
|
+
) => ng.AnimateService)
|
|
101
|
+
)[];
|
|
97
102
|
}
|
|
98
103
|
export namespace AnimateProvider {
|
|
99
104
|
let $inject: string[];
|
|
@@ -98,4 +98,19 @@ export interface AnimationOptions {
|
|
|
98
98
|
removeClass?: string;
|
|
99
99
|
to?: Record<string, string | number>;
|
|
100
100
|
tempClasses: string | string[];
|
|
101
|
+
/** Optional DOM operation callback executed before animation */
|
|
102
|
+
domOperation?: () => void;
|
|
103
|
+
}
|
|
104
|
+
export interface AnimateJsRunner {
|
|
105
|
+
$$willAnimate: true;
|
|
106
|
+
start: () => AnimateRunner;
|
|
107
|
+
end: () => AnimateRunner;
|
|
108
|
+
}
|
|
109
|
+
export interface AnimateJsFn {
|
|
110
|
+
(
|
|
111
|
+
element: HTMLElement,
|
|
112
|
+
event: string,
|
|
113
|
+
classes?: string | null,
|
|
114
|
+
options?: AnimationOptions,
|
|
115
|
+
): AnimateJsRunner;
|
|
101
116
|
}
|
|
@@ -1,95 +1,116 @@
|
|
|
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
1
|
export class AnimateRunner {
|
|
13
2
|
/**
|
|
14
|
-
*
|
|
15
|
-
* Each
|
|
3
|
+
* Executes a list of runners sequentially.
|
|
4
|
+
* Each must complete before the next starts.
|
|
16
5
|
*
|
|
17
|
-
* @param {AnimateRunner[]} runners
|
|
18
|
-
* @param {(ok: boolean) => void} callback
|
|
6
|
+
* @param {AnimateRunner[]} runners
|
|
7
|
+
* @param {(ok: boolean) => void} callback
|
|
19
8
|
*/
|
|
20
9
|
static _chain(
|
|
21
10
|
runners: AnimateRunner[],
|
|
22
11
|
callback: (ok: boolean) => void,
|
|
23
12
|
): void;
|
|
24
13
|
/**
|
|
25
|
-
* Waits
|
|
14
|
+
* Waits until all runners complete.
|
|
26
15
|
*
|
|
27
|
-
* @param {AnimateRunner[]} runners
|
|
28
|
-
* @param {(ok: boolean) => void} callback
|
|
16
|
+
* @param {AnimateRunner[]} runners
|
|
17
|
+
* @param {(ok: boolean) => void} callback
|
|
29
18
|
*/
|
|
30
19
|
static _all(runners: AnimateRunner[], callback: (ok: boolean) => void): void;
|
|
31
20
|
/**
|
|
32
|
-
* @param {
|
|
21
|
+
* @param {AnimationHost} [host] - Optional animation host callbacks.
|
|
22
|
+
* @param {boolean} [jsAnimation=false]
|
|
23
|
+
* If true: use RAF/timer ticks.
|
|
24
|
+
* If false: use batched CSS animation ticks.
|
|
33
25
|
*/
|
|
34
|
-
constructor(host?:
|
|
35
|
-
/** @type {
|
|
36
|
-
_host:
|
|
26
|
+
constructor(host?: AnimationHost, jsAnimation?: boolean);
|
|
27
|
+
/** @type {AnimationHost} */
|
|
28
|
+
_host: AnimationHost;
|
|
37
29
|
/** @type {Array<(ok: boolean) => void>} */
|
|
38
30
|
_doneCallbacks: Array<(ok: boolean) => void>;
|
|
39
31
|
/** @type {RunnerState} */
|
|
40
32
|
_state: RunnerState;
|
|
41
|
-
/** @type {Promise<void>|null} */
|
|
42
|
-
_promise: Promise<void> | null;
|
|
43
|
-
/** @type {(fn: VoidFunction) => void} */
|
|
44
|
-
_schedule: (fn: VoidFunction) => void;
|
|
45
33
|
/**
|
|
46
|
-
*
|
|
47
|
-
* @
|
|
34
|
+
* Deferred promise used by .then/.catch/.finally.
|
|
35
|
+
* @type {Promise<void>|null}
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
private _promise;
|
|
39
|
+
_tick: (fn: any) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Sets or replaces the current host.
|
|
42
|
+
* @param {AnimationHost} host
|
|
48
43
|
*/
|
|
49
|
-
setHost(host:
|
|
44
|
+
setHost(host: AnimationHost): void;
|
|
50
45
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
46
|
+
* Register a completion callback.
|
|
47
|
+
* Fires immediately if animation is already done.
|
|
53
48
|
*
|
|
54
|
-
* @param {(ok: boolean) => void} fn
|
|
49
|
+
* @param {(ok: boolean) => void} fn
|
|
55
50
|
*/
|
|
56
51
|
done(fn: (ok: boolean) => void): void;
|
|
57
52
|
/**
|
|
58
|
-
*
|
|
59
|
-
* @param {...any} args
|
|
53
|
+
* Reports progress to host.
|
|
54
|
+
* @param {...any} args
|
|
60
55
|
*/
|
|
61
56
|
progress(...args: any[]): void;
|
|
62
|
-
/**
|
|
57
|
+
/** Pause underlying animation (if supported). */
|
|
63
58
|
pause(): void;
|
|
64
|
-
/**
|
|
59
|
+
/** Resume underlying animation (if supported). */
|
|
65
60
|
resume(): void;
|
|
66
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Ends the animation successfully.
|
|
63
|
+
* Equivalent to user choosing to finish it immediately.
|
|
64
|
+
*/
|
|
67
65
|
end(): void;
|
|
68
|
-
/** Cancels the animation. */
|
|
69
|
-
cancel(): void;
|
|
70
66
|
/**
|
|
71
|
-
*
|
|
72
|
-
* @param {boolean} [status=true] - True if successful, false if canceled.
|
|
67
|
+
* Cancels the animation.
|
|
73
68
|
*/
|
|
74
|
-
|
|
69
|
+
cancel(): void;
|
|
75
70
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
71
|
+
* Schedule animation completion.
|
|
72
|
+
*
|
|
73
|
+
* @param {boolean} [status=true]
|
|
78
74
|
*/
|
|
79
|
-
|
|
80
|
-
/** @inheritdoc */
|
|
81
|
-
then(onFulfilled: any, onRejected: any): Promise<void>;
|
|
82
|
-
/** @inheritdoc */
|
|
83
|
-
catch(onRejected: any): Promise<void>;
|
|
84
|
-
/** @inheritdoc */
|
|
85
|
-
finally(onFinally: any): Promise<void>;
|
|
75
|
+
complete(status?: boolean): void;
|
|
86
76
|
/**
|
|
87
77
|
* Completes the animation and invokes all done callbacks.
|
|
78
|
+
* @param {boolean} status
|
|
88
79
|
* @private
|
|
89
|
-
* @param {boolean} status - True if completed successfully, false if canceled.
|
|
90
80
|
*/
|
|
91
81
|
private _finish;
|
|
82
|
+
/**
|
|
83
|
+
* Returns an internal promise that resolves on success,
|
|
84
|
+
* and rejects on cancel.
|
|
85
|
+
*
|
|
86
|
+
* @returns {Promise<void>}
|
|
87
|
+
*/
|
|
88
|
+
getPromise(): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Standard "thenable" interface
|
|
91
|
+
* @template T
|
|
92
|
+
* @param {(value: void) => T|Promise<T>} onFulfilled
|
|
93
|
+
* @param {(reason: any) => any} [onRejected]
|
|
94
|
+
* @returns {Promise<T>}
|
|
95
|
+
*/
|
|
96
|
+
then<T>(
|
|
97
|
+
onFulfilled: (value: void) => T | Promise<T>,
|
|
98
|
+
onRejected?: (reason: any) => any,
|
|
99
|
+
): Promise<T>;
|
|
100
|
+
/**
|
|
101
|
+
* Standard promise catcher.
|
|
102
|
+
* @param {(reason: any) => any} onRejected
|
|
103
|
+
* @returns {Promise<void>}
|
|
104
|
+
*/
|
|
105
|
+
catch(onRejected: (reason: any) => any): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Standard promise finally.
|
|
108
|
+
* @param {() => any} onFinally
|
|
109
|
+
* @returns {Promise<void>}
|
|
110
|
+
*/
|
|
111
|
+
finally(onFinally: () => any): Promise<void>;
|
|
92
112
|
}
|
|
113
|
+
export type AnimationHost = import("../interface.ts").AnimationHost;
|
|
93
114
|
/**
|
|
94
115
|
* Internal runner states.
|
|
95
116
|
*/
|
|
@@ -83,20 +83,4 @@ export const ACTIVE_CLASS_SUFFIX: "-active";
|
|
|
83
83
|
export const PREPARE_CLASS_SUFFIX: "-prepare";
|
|
84
84
|
export const NG_ANIMATE_CLASSNAME: "ng-animate";
|
|
85
85
|
export const NG_ANIMATE_CHILDREN_DATA: "$$ngAnimateChildren";
|
|
86
|
-
export let CSS_PREFIX: string;
|
|
87
|
-
export let TRANSITION_PROP: any;
|
|
88
|
-
export let TRANSITIONEND_EVENT: any;
|
|
89
|
-
export let ANIMATION_PROP: any;
|
|
90
|
-
export let ANIMATIONEND_EVENT: any;
|
|
91
|
-
export const DURATION_KEY: "Duration";
|
|
92
|
-
export const PROPERTY_KEY: number;
|
|
93
|
-
export const DELAY_KEY: "Delay";
|
|
94
|
-
export const TIMING_KEY: "TimingFunction";
|
|
95
|
-
export const ANIMATION_ITERATION_COUNT_KEY: "IterationCount";
|
|
96
|
-
export const ANIMATION_PLAYSTATE_KEY: "PlayState";
|
|
97
|
-
export const SAFE_FAST_FORWARD_DURATION_VALUE: 9999;
|
|
98
|
-
export const ANIMATION_DELAY_PROP: string;
|
|
99
|
-
export const ANIMATION_DURATION_PROP: string;
|
|
100
|
-
export const TRANSITION_DELAY_PROP: string;
|
|
101
|
-
export const TRANSITION_DURATION_PROP: string;
|
|
102
86
|
export const ngMinErr: (arg0: string, ...arg1: any[]) => Error;
|
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @extends {Record<string, any>}
|
|
3
|
+
*/
|
|
1
4
|
export class Attributes {
|
|
2
5
|
static $nonscope: boolean;
|
|
3
6
|
/**
|
|
7
|
+
* Creates an Attributes instance.
|
|
8
|
+
*
|
|
9
|
+
* There are two construction modes:
|
|
10
|
+
*
|
|
11
|
+
* 1. **Fresh instance** (no `attributesToCopy`):
|
|
12
|
+
* - Used when compiling a DOM element for the first time.
|
|
13
|
+
* - Initializes a new `$attr` map to track normalized → DOM attribute names.
|
|
14
|
+
*
|
|
15
|
+
* 2. **Clone instance** (`attributesToCopy` provided):
|
|
16
|
+
* - Used when cloning attributes for directive linking / child scopes.
|
|
17
|
+
* - Performs a shallow copy of all properties from the source Attributes object,
|
|
18
|
+
* including `$attr`, normalized attribute values, and internal fields
|
|
19
|
+
* (e.g. `$$observers`).
|
|
20
|
+
* - `$attr` is intentionally **not reinitialized** in this case, because the
|
|
21
|
+
* source object already contains the correct normalized → DOM attribute mapping.
|
|
22
|
+
*
|
|
4
23
|
* @param {ng.AnimateService} $animate
|
|
5
24
|
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
6
25
|
* @param {*} $sce
|
|
@@ -14,12 +33,16 @@ export class Attributes {
|
|
|
14
33
|
nodeRef?: import("../../shared/noderef.js").NodeRef,
|
|
15
34
|
attributesToCopy?: any,
|
|
16
35
|
);
|
|
17
|
-
_$animate: import("../../interface.ts").AnimateService;
|
|
18
|
-
_$exceptionHandler: import("../../interface.ts").ExceptionHandler;
|
|
36
|
+
_$animate: import("../../animations/interface.ts").AnimateService;
|
|
37
|
+
_$exceptionHandler: import("../../services/exception/interface.ts").ExceptionHandler;
|
|
19
38
|
_$sce: any;
|
|
39
|
+
/**
|
|
40
|
+
* A map of DOM element attribute names to the normalized name. This is needed
|
|
41
|
+
* to do reverse lookup from normalized name back to actual name.
|
|
42
|
+
*/
|
|
20
43
|
$attr: {};
|
|
21
44
|
/** @type {import("../../shared/noderef.js").NodeRef} */
|
|
22
|
-
|
|
45
|
+
_nodeRef: import("../../shared/noderef.js").NodeRef;
|
|
23
46
|
/** @type {Node|Element} */
|
|
24
47
|
get $$element(): Node | Element;
|
|
25
48
|
/**
|
|
@@ -59,18 +82,19 @@ export class Attributes {
|
|
|
59
82
|
* Set a normalized attribute on the element in a way such that all directives
|
|
60
83
|
* can share the attribute. This function properly handles boolean attributes.
|
|
61
84
|
* @param {string} key Normalized key. (ie ngAttribute)
|
|
62
|
-
* @param {string|boolean} value The value to set. If `null` attribute will be deleted.
|
|
85
|
+
* @param {string|boolean|null} value The value to set. If `null` attribute will be deleted.
|
|
63
86
|
* @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.
|
|
64
87
|
* Defaults to true.
|
|
65
88
|
* @param {string=} attrName Optional none normalized name. Defaults to key.
|
|
66
89
|
*/
|
|
67
90
|
$set(
|
|
68
91
|
key: string,
|
|
69
|
-
value: string | boolean,
|
|
92
|
+
value: string | boolean | null,
|
|
70
93
|
writeAttr?: boolean | undefined,
|
|
71
94
|
attrName?: string | undefined,
|
|
72
95
|
): void;
|
|
73
96
|
/**
|
|
97
|
+
* @template T
|
|
74
98
|
* Observes an interpolated attribute.
|
|
75
99
|
*
|
|
76
100
|
* The observer function will be invoked once during the next `$digest` following
|
|
@@ -78,16 +102,22 @@ export class Attributes {
|
|
|
78
102
|
* changes.
|
|
79
103
|
*
|
|
80
104
|
* @param {string} key Normalized key. (ie ngAttribute) .
|
|
81
|
-
* @param {any} fn Function that will be called whenever
|
|
105
|
+
* @param {(value?: T) => any} fn Function that will be called whenever
|
|
82
106
|
the interpolated value of the attribute changes.
|
|
83
107
|
* See the {@link guide/interpolation#how-text-and-attribute-bindings-work Interpolation
|
|
84
108
|
* guide} for more info.
|
|
85
|
-
* @returns {
|
|
109
|
+
* @returns {Function} Returns a deregistration function for this observer.
|
|
86
110
|
*/
|
|
87
|
-
$observe(key: string, fn:
|
|
111
|
+
$observe<T>(key: string, fn: (value?: T) => any): Function;
|
|
88
112
|
$$observers: any;
|
|
89
113
|
setSpecialAttr(element: any, attrName: any, value: any): void;
|
|
90
|
-
|
|
91
|
-
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @param {unknown} value
|
|
117
|
+
* @param {string} invokeType
|
|
118
|
+
* @returns {unknown}
|
|
119
|
+
*/
|
|
120
|
+
sanitizeSrcset(value: unknown, invokeType: string): unknown;
|
|
121
|
+
srcset: unknown;
|
|
92
122
|
}
|
|
93
123
|
import { directiveNormalize } from "../../shared/utils.js";
|
|
@@ -125,7 +125,7 @@ export class CompileProvider {
|
|
|
125
125
|
| string
|
|
126
126
|
| ((
|
|
127
127
|
$injector: ng.InjectorService,
|
|
128
|
-
$interpolate:
|
|
128
|
+
$interpolate: ng.InterpolateService,
|
|
129
129
|
$exceptionHandler: ng.ExceptionHandlerService,
|
|
130
130
|
$templateRequest: ng.TemplateRequestService,
|
|
131
131
|
$parse: ng.ParseService,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Scope } from "../scope/scope.js";
|
|
2
2
|
import type { NodeRef } from "../../shared/noderef.js";
|
|
3
|
+
type TranscludedNodes = Node | Node[] | NodeList | null;
|
|
4
|
+
type TranscludeFnCb = (clone?: TranscludedNodes, scope?: Scope | null) => void;
|
|
3
5
|
/**
|
|
4
6
|
* A function passed as the fifth argument to a `PublicLinkFn` link function.
|
|
5
7
|
* It behaves like a linking function, with the `scope` argument automatically created
|
|
@@ -8,7 +10,8 @@ import type { NodeRef } from "../../shared/noderef.js";
|
|
|
8
10
|
* The function returns the DOM content to be injected (transcluded) into the directive.
|
|
9
11
|
*/
|
|
10
12
|
export type TranscludeFn = {
|
|
11
|
-
(
|
|
13
|
+
(cb: TranscludeFnCb): void;
|
|
14
|
+
(scope: Scope, cb?: TranscludeFnCb): void;
|
|
12
15
|
$$slots?: any;
|
|
13
16
|
};
|
|
14
17
|
/**
|
|
@@ -84,3 +87,4 @@ export type CompositeLinkFn = (
|
|
|
84
87
|
$linkNode: NodeRef,
|
|
85
88
|
parentBoundTranscludeFn?: Function,
|
|
86
89
|
) => void;
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface StorageLike {
|
|
2
|
+
getItem(key: string): string | null;
|
|
3
|
+
setItem(key: string, value: string): void;
|
|
4
|
+
removeItem(key: string): void;
|
|
5
|
+
}
|
|
6
|
+
export interface PersistentStoreConfig {
|
|
7
|
+
backend?: StorageLike;
|
|
8
|
+
serialize?: (value: unknown) => string;
|
|
9
|
+
deserialize?: (value: string) => unknown;
|
|
10
|
+
cookie?: Record<string, unknown>;
|
|
11
|
+
}
|
|
@@ -10,13 +10,15 @@ export class ASTInterpreter {
|
|
|
10
10
|
* @param {function(any):any} $filter
|
|
11
11
|
*/
|
|
12
12
|
constructor($filter: (arg0: any) => any);
|
|
13
|
-
$filter: (arg0: any) => any;
|
|
13
|
+
_$filter: (arg0: any) => any;
|
|
14
14
|
/**
|
|
15
15
|
* Compiles the AST into a function.
|
|
16
|
-
* @param {import("./ast/ast").ASTNode} ast - The AST to compile.
|
|
16
|
+
* @param {import("./ast/ast.js").ASTNode} ast - The AST to compile.
|
|
17
17
|
* @returns {import("./interface.ts").CompiledExpression}
|
|
18
18
|
*/
|
|
19
|
-
compile(
|
|
19
|
+
compile(
|
|
20
|
+
ast: import("./ast/ast.js").ASTNode,
|
|
21
|
+
): import("./interface.ts").CompiledExpression;
|
|
20
22
|
/**
|
|
21
23
|
* Unary plus operation.
|
|
22
24
|
* @param {function} argument - The argument function.
|
|
@@ -29,5 +29,8 @@ export class ParseProvider {
|
|
|
29
29
|
identifierStart?: (arg0: any) => boolean,
|
|
30
30
|
identifierContinue?: (arg0: any) => boolean,
|
|
31
31
|
) => ParseProvider;
|
|
32
|
-
$get: (
|
|
32
|
+
$get: (
|
|
33
|
+
| string
|
|
34
|
+
| (($filter: (any: any) => any) => import("./interface.ts").ParseService)
|
|
35
|
+
)[];
|
|
33
36
|
}
|
|
@@ -10,3 +10,29 @@ export interface Listener {
|
|
|
10
10
|
watchProp?: string;
|
|
11
11
|
foreignListener?: ProxyConstructor;
|
|
12
12
|
}
|
|
13
|
+
export interface ScopeEvent {
|
|
14
|
+
/**
|
|
15
|
+
* the scope on which the event was $emit-ed or $broadcast-ed.
|
|
16
|
+
*/
|
|
17
|
+
targetScope: ng.Scope;
|
|
18
|
+
/**
|
|
19
|
+
* the scope that is currently handling the event. Once the event propagates through the scope hierarchy, this property is set to null.
|
|
20
|
+
*/
|
|
21
|
+
currentScope: ng.Scope;
|
|
22
|
+
/**
|
|
23
|
+
* name of the event.
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* calling stopPropagation function will cancel further event propagation (available only for events that were $emit-ed).
|
|
28
|
+
*/
|
|
29
|
+
stopPropagation?(): void;
|
|
30
|
+
/**
|
|
31
|
+
* calling preventDefault sets defaultPrevented flag to true.
|
|
32
|
+
*/
|
|
33
|
+
preventDefault(): void;
|
|
34
|
+
/**
|
|
35
|
+
* true if preventDefault was called.
|
|
36
|
+
*/
|
|
37
|
+
defaultPrevented: boolean;
|
|
38
|
+
}
|