@angular-wave/angular.ts 0.9.9 → 0.11.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 +24 -11
- 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-queue.d.ts +2 -4
- package/@types/animations/animate-swap.d.ts +2 -4
- package/@types/animations/animate.d.ts +24 -24
- package/@types/animations/animation.d.ts +2 -2
- package/@types/animations/interface.d.ts +12 -0
- package/@types/animations/raf-scheduler.d.ts +4 -4
- package/@types/animations/runner/animate-runner.d.ts +99 -0
- package/@types/animations/shared.d.ts +30 -2
- package/@types/core/compile/attributes.d.ts +5 -8
- package/@types/core/compile/compile.d.ts +4 -4
- package/@types/core/controller/controller.d.ts +1 -1
- package/@types/core/di/ng-module.d.ts +14 -14
- package/@types/core/filter/filter.d.ts +2 -2
- package/@types/core/scope/interface.d.ts +18 -0
- package/@types/core/scope/scope.d.ts +19 -95
- package/@types/directive/aria/aria.d.ts +11 -13
- package/@types/directive/attrs/attrs.d.ts +2 -2
- package/@types/directive/class/class.d.ts +3 -3
- package/@types/directive/events/events.d.ts +0 -2
- package/@types/directive/http/http.d.ts +4 -22
- package/@types/directive/if/if.d.ts +2 -4
- package/@types/directive/include/include.d.ts +2 -2
- 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 +4 -4
- package/@types/directive/observe/observe.d.ts +2 -5
- package/@types/directive/worker/worker.d.ts +15 -0
- package/@types/interface.d.ts +40 -11
- package/@types/namespace.d.ts +11 -1
- package/@types/ng.d.ts +3 -5
- package/@types/router/directives/view-directive.d.ts +2 -2
- package/@types/router/params/interface.d.ts +0 -25
- package/@types/router/path/path-utils.d.ts +2 -2
- package/@types/router/state/interface.d.ts +0 -9
- package/@types/router/state/state-object.d.ts +6 -6
- package/@types/router/state/state-service.d.ts +3 -3
- package/@types/router/template-factory.d.ts +1 -1
- package/@types/router/transition/hook-builder.d.ts +1 -1
- package/@types/router/transition/interface.d.ts +0 -44
- package/@types/router/transition/transition-hook.d.ts +31 -0
- package/@types/router/transition/transition-service.d.ts +1 -1
- package/@types/router/transition/transition.d.ts +2 -2
- package/@types/services/pubsub/pubsub.d.ts +2 -2
- package/@types/services/sse/interface.d.ts +27 -1
- package/@types/services/sse/sse.d.ts +4 -3
- package/@types/services/worker/interface.d.ts +12 -0
- package/@types/services/worker/worker.d.ts +31 -0
- package/@types/shared/dom.d.ts +4 -5
- package/@types/shared/url-utils/url-utils.d.ts +14 -14
- package/README.md +1 -1
- package/dist/angular-ts.esm.js +1517 -1125
- package/dist/angular-ts.umd.js +1517 -1125
- package/dist/angular-ts.umd.min.js +1 -1
- package/dist/angular.css +1 -1
- package/package.json +1 -2
- package/@types/animations/animate-runner.d.ts +0 -31
package/@types/angular.d.ts
CHANGED
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
export class Angular {
|
|
2
2
|
$cache: Map<number, import("./interface.ts").ExpandoStore>;
|
|
3
|
-
/** @type {
|
|
4
|
-
$eventBus:
|
|
3
|
+
/** @type {ng.PubSubService} */
|
|
4
|
+
$eventBus: ng.PubSubService;
|
|
5
5
|
/**
|
|
6
6
|
* @type {string} `version` from `package.json`
|
|
7
7
|
*/
|
|
8
8
|
version: string;
|
|
9
9
|
/** @type {!Array<string|any>} */
|
|
10
10
|
bootsrappedModules: Array<string | any>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Gets the controller instance for a given element, if exists. Defaults to "ngControllerController"
|
|
13
|
+
*
|
|
14
|
+
* @type {(element: Element, name: string?) => ng.Scope|undefined}
|
|
15
|
+
*/
|
|
16
|
+
getController: (
|
|
17
|
+
element: Element,
|
|
18
|
+
name: string | null,
|
|
19
|
+
) => ng.Scope | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Return instance of InjectorService attached to element
|
|
22
|
+
* @type {(Element) => ng.InjectorService}
|
|
23
|
+
*/
|
|
24
|
+
getInjector: (Element: any) => ng.InjectorService;
|
|
25
|
+
/**
|
|
26
|
+
* Gets scope for a given element.
|
|
27
|
+
* @type {(Element) => *}
|
|
28
|
+
*/
|
|
29
|
+
getScope: (Element: any) => any;
|
|
14
30
|
errorHandlingConfig: typeof errorHandlingConfig;
|
|
15
31
|
$t: Readonly<Record<string, string>>;
|
|
16
32
|
/**
|
|
@@ -61,7 +77,7 @@ export class Angular {
|
|
|
61
77
|
modules?: Array<string | any>,
|
|
62
78
|
config?: import("./interface.ts").AngularBootstrapConfig,
|
|
63
79
|
): import("./core/di/internal-injector.js").InjectorService;
|
|
64
|
-
$injector: import("./
|
|
80
|
+
$injector: import("./interface.ts").InjectorService;
|
|
65
81
|
/**
|
|
66
82
|
* @param {any[]} modules
|
|
67
83
|
* @param {boolean?} strictDi
|
|
@@ -118,18 +134,15 @@ export class Angular {
|
|
|
118
134
|
* @param {string} name The name of the module to create or retrieve.
|
|
119
135
|
* @param {Array.<string>} [requires] If specified then new module is being created. If
|
|
120
136
|
* unspecified then the module is being retrieved for further configuration.
|
|
121
|
-
* @param {import("./interface.
|
|
137
|
+
* @param {import("./interface.ts").Injectable<any>} [configFn] Optional configuration function for the module that gets
|
|
122
138
|
* passed to {@link NgModule.config NgModule.config()}.
|
|
123
139
|
* @returns {NgModule} A newly registered module.
|
|
124
140
|
*/
|
|
125
141
|
module(
|
|
126
142
|
name: string,
|
|
127
143
|
requires?: Array<string>,
|
|
128
|
-
configFn?: import("./interface.
|
|
144
|
+
configFn?: import("./interface.ts").Injectable<any>,
|
|
129
145
|
): NgModule;
|
|
130
146
|
}
|
|
131
|
-
import { getController } from "./shared/dom.js";
|
|
132
|
-
import { getInjector } from "./shared/dom.js";
|
|
133
|
-
import { getScope } from "./shared/dom.js";
|
|
134
147
|
import { errorHandlingConfig } from "./shared/utils.js";
|
|
135
148
|
import { NgModule } from "./core/di/ng-module.js";
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
export function AnimateJsDriverProvider($$animationProvider: any): void;
|
|
2
2
|
export class AnimateJsDriverProvider {
|
|
3
3
|
constructor($$animationProvider: any);
|
|
4
|
-
$get: (
|
|
5
|
-
| string
|
|
6
|
-
| ((
|
|
7
|
-
$$animateJs: any,
|
|
8
|
-
$$AnimateRunner: any,
|
|
9
|
-
) => (animationDetails: any) => any)
|
|
10
|
-
)[];
|
|
4
|
+
$get: (string | (($$animateJs: any) => (animationDetails: any) => any))[];
|
|
11
5
|
}
|
|
12
6
|
export namespace AnimateJsDriverProvider {
|
|
13
7
|
let $inject: string[];
|
|
@@ -9,17 +9,15 @@ export class AnimateQueueProvider {
|
|
|
9
9
|
$get: (
|
|
10
10
|
| string
|
|
11
11
|
| ((
|
|
12
|
-
$rootScope:
|
|
13
|
-
$injector:
|
|
12
|
+
$rootScope: ng.RootScopeService,
|
|
13
|
+
$injector: ng.InjectorService,
|
|
14
14
|
$$animation: any,
|
|
15
|
-
$$AnimateRunner: any,
|
|
16
15
|
$templateRequest: any,
|
|
17
16
|
) => {
|
|
18
17
|
on(event: any, container: any, callback: any): void;
|
|
19
18
|
off(event: any, container: any, callback: any, ...args: any[]): void;
|
|
20
19
|
pin(element: any, parentElement: any): void;
|
|
21
20
|
push(element: any, event: any, options: any, domOperation: any): any;
|
|
22
|
-
enabled(element: any, bool: any, ...args: any[]): any;
|
|
23
21
|
})
|
|
24
22
|
)[];
|
|
25
23
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @returns {
|
|
2
|
+
* @returns {ng.Directive}
|
|
3
3
|
*/
|
|
4
|
-
export function ngAnimateSwapDirective(
|
|
5
|
-
$animate: any,
|
|
6
|
-
): import("../interface.ts").Directive;
|
|
4
|
+
export function ngAnimateSwapDirective($animate: any): ng.Directive;
|
|
7
5
|
export namespace ngAnimateSwapDirective {
|
|
8
6
|
let $inject: string[];
|
|
9
7
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/** @param {
|
|
2
|
-
export function AnimateProvider(
|
|
3
|
-
$provide: import("../interface.ts").Provider,
|
|
4
|
-
): void;
|
|
1
|
+
/** @param {ng.ProvideService} $provide */
|
|
2
|
+
export function AnimateProvider($provide: ng.ProvideService): void;
|
|
5
3
|
export class AnimateProvider {
|
|
6
|
-
/** @param {
|
|
7
|
-
constructor($provide:
|
|
4
|
+
/** @param {ng.ProvideService} $provide */
|
|
5
|
+
constructor($provide: ng.ProvideService);
|
|
8
6
|
$$registeredAnimations: any;
|
|
9
7
|
/**
|
|
10
8
|
* Registers a new injectable animation factory function. The factory function produces the
|
|
@@ -218,7 +216,7 @@ export class AnimateProvider {
|
|
|
218
216
|
* Note that this does not cancel the underlying operation, e.g. the setting of classes or
|
|
219
217
|
* adding the element to the DOM.
|
|
220
218
|
*
|
|
221
|
-
* @param {import('./animate-runner.js').AnimateRunner} runner An animation runner returned by an $animate function.
|
|
219
|
+
* @param {import('./runner/animate-runner.js').AnimateRunner} runner An animation runner returned by an $animate function.
|
|
222
220
|
*
|
|
223
221
|
* @example
|
|
224
222
|
<example module="animationExample" deps="angular-animate.js" animations="true" name="animate-cancel">
|
|
@@ -282,7 +280,9 @@ export class AnimateProvider {
|
|
|
282
280
|
</file>
|
|
283
281
|
</example>
|
|
284
282
|
*/
|
|
285
|
-
cancel(
|
|
283
|
+
cancel(
|
|
284
|
+
runner: import("./runner/animate-runner.js").AnimateRunner,
|
|
285
|
+
): void;
|
|
286
286
|
/**
|
|
287
287
|
* Inserts the element into the DOM either after the `after` element (if provided) or
|
|
288
288
|
* as the first child within the `parent` element and then triggers an animation.
|
|
@@ -291,16 +291,16 @@ export class AnimateProvider {
|
|
|
291
291
|
*
|
|
292
292
|
* @param {Element} element - the element which will be inserted into the DOM
|
|
293
293
|
* @param {Element} parent - the parent element which will append the element as a child (so long as the after element is not present)
|
|
294
|
-
* @param {Element} after - after the sibling element after which the element will be appended
|
|
294
|
+
* @param {Element} [after] - after the sibling element after which the element will be appended
|
|
295
295
|
* @param {AnimationOptions} [options] - an optional collection of options/styles that will be applied to the element.
|
|
296
|
-
* @returns {import('./animate-runner.js').AnimateRunner} the animation runner
|
|
296
|
+
* @returns {import('./runner/animate-runner.js').AnimateRunner} the animation runner
|
|
297
297
|
*/
|
|
298
298
|
enter(
|
|
299
299
|
element: Element,
|
|
300
300
|
parent: Element,
|
|
301
|
-
after
|
|
301
|
+
after?: Element,
|
|
302
302
|
options?: AnimationOptions,
|
|
303
|
-
): import("./animate-runner.js").AnimateRunner;
|
|
303
|
+
): import("./runner/animate-runner.js").AnimateRunner;
|
|
304
304
|
/**
|
|
305
305
|
* Inserts (moves) the element into its new position in the DOM either after
|
|
306
306
|
* the `after` element (if provided) or as the first child within the `parent` element
|
|
@@ -311,14 +311,14 @@ export class AnimateProvider {
|
|
|
311
311
|
* @param {Element} parent - the parent element which will append the element as a child (so long as the after element is not present)
|
|
312
312
|
* @param {Element} after - after the sibling element after which the element will be appended
|
|
313
313
|
* @param {AnimationOptions} [options] - an optional collection of options/styles that will be applied to the element.
|
|
314
|
-
* @returns {import('./animate-runner.js').AnimateRunner} the animation runner
|
|
314
|
+
* @returns {import('./runner/animate-runner.js').AnimateRunner} the animation runner
|
|
315
315
|
*/
|
|
316
316
|
move(
|
|
317
317
|
element: Element,
|
|
318
318
|
parent: Element,
|
|
319
319
|
after: Element,
|
|
320
320
|
options?: AnimationOptions,
|
|
321
|
-
): import("./animate-runner.js").AnimateRunner;
|
|
321
|
+
): import("./runner/animate-runner.js").AnimateRunner;
|
|
322
322
|
/**
|
|
323
323
|
* Triggers an animation and then removes the element from the DOM.
|
|
324
324
|
* When the function is called a promise is returned that will be resolved during the next
|
|
@@ -326,12 +326,12 @@ export class AnimateProvider {
|
|
|
326
326
|
*
|
|
327
327
|
* @param {Element} element the element which will be removed from the DOM
|
|
328
328
|
* @param {AnimationOptions} [options] an optional collection of options/styles that will be applied to the element.
|
|
329
|
-
* @returns {import('./animate-runner.js').AnimateRunner} the animation runner
|
|
329
|
+
* @returns {import('./runner/animate-runner.js').AnimateRunner} the animation runner
|
|
330
330
|
*/
|
|
331
331
|
leave(
|
|
332
332
|
element: Element,
|
|
333
333
|
options?: AnimationOptions,
|
|
334
|
-
): import("./animate-runner.js").AnimateRunner;
|
|
334
|
+
): import("./runner/animate-runner.js").AnimateRunner;
|
|
335
335
|
/**
|
|
336
336
|
* Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon
|
|
337
337
|
* execution, the addClass operation will only be handled after the next digest and it will not trigger an
|
|
@@ -343,13 +343,13 @@ export class AnimateProvider {
|
|
|
343
343
|
* @param {Element} element the element which the CSS classes will be applied to
|
|
344
344
|
* @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
|
|
345
345
|
* @param {AnimationOptions} [options] an optional collection of options/styles that will be applied to the element.
|
|
346
|
-
* @return {import('./animate-runner.js').AnimateRunner}} animationRunner the animation runner
|
|
346
|
+
* @return {import('./runner/animate-runner.js').AnimateRunner}} animationRunner the animation runner
|
|
347
347
|
*/
|
|
348
348
|
addClass(
|
|
349
349
|
element: Element,
|
|
350
350
|
className: string,
|
|
351
351
|
options?: AnimationOptions,
|
|
352
|
-
): import("./animate-runner.js").AnimateRunner;
|
|
352
|
+
): import("./runner/animate-runner.js").AnimateRunner;
|
|
353
353
|
/**
|
|
354
354
|
* Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon
|
|
355
355
|
* execution, the removeClass operation will only be handled after the next digest and it will not trigger an
|
|
@@ -361,13 +361,13 @@ export class AnimateProvider {
|
|
|
361
361
|
* @param {Element} element the element which the CSS classes will be applied to
|
|
362
362
|
* @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
|
|
363
363
|
* @param {AnimationOptions} [options] an optional collection of options/styles that will be applied to the element. *
|
|
364
|
-
* @return {import('./animate-runner.js').AnimateRunner} animationRunner the animation runner
|
|
364
|
+
* @return {import('./runner/animate-runner.js').AnimateRunner} animationRunner the animation runner
|
|
365
365
|
*/
|
|
366
366
|
removeClass(
|
|
367
367
|
element: Element,
|
|
368
368
|
className: string,
|
|
369
369
|
options?: AnimationOptions,
|
|
370
|
-
): import("./animate-runner.js").AnimateRunner;
|
|
370
|
+
): import("./runner/animate-runner.js").AnimateRunner;
|
|
371
371
|
/**
|
|
372
372
|
* Performs both the addition and removal of a CSS classes on an element and (during the process)
|
|
373
373
|
* triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and
|
|
@@ -381,14 +381,14 @@ export class AnimateProvider {
|
|
|
381
381
|
* @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
|
|
382
382
|
* @param {object=} options an optional collection of options/styles that will be applied to the element.
|
|
383
383
|
*
|
|
384
|
-
* @return {import('./animate-runner.js').AnimateRunner} the animation runner
|
|
384
|
+
* @return {import('./runner/animate-runner.js').AnimateRunner} the animation runner
|
|
385
385
|
*/
|
|
386
386
|
setClass(
|
|
387
387
|
element: Element,
|
|
388
388
|
add: string,
|
|
389
389
|
remove: string,
|
|
390
390
|
options?: object | undefined,
|
|
391
|
-
): import("./animate-runner.js").AnimateRunner;
|
|
391
|
+
): import("./runner/animate-runner.js").AnimateRunner;
|
|
392
392
|
/**
|
|
393
393
|
* Performs an inline animation on the element which applies the provided to and from CSS styles to the element.
|
|
394
394
|
* If any detected CSS transition, keyframe or JavaScript matches the provided className value, then the animation will take
|
|
@@ -408,7 +408,7 @@ export class AnimateProvider {
|
|
|
408
408
|
* }
|
|
409
409
|
* });
|
|
410
410
|
* ```
|
|
411
|
-
* @return {import('./animate-runner.js').AnimateRunner} the animation runner
|
|
411
|
+
* @return {import('./runner/animate-runner.js').AnimateRunner} the animation runner
|
|
412
412
|
*/
|
|
413
413
|
animate(
|
|
414
414
|
element: any,
|
|
@@ -416,7 +416,7 @@ export class AnimateProvider {
|
|
|
416
416
|
to: any,
|
|
417
417
|
className: any,
|
|
418
418
|
options: any,
|
|
419
|
-
): import("./animate-runner.js").AnimateRunner;
|
|
419
|
+
): import("./runner/animate-runner.js").AnimateRunner;
|
|
420
420
|
})
|
|
421
421
|
)[];
|
|
422
422
|
}
|
|
@@ -6,9 +6,9 @@ export class AnimationProvider {
|
|
|
6
6
|
| ((
|
|
7
7
|
$rootScope: ng.RootScopeService,
|
|
8
8
|
$injector: any,
|
|
9
|
-
$$AnimateRunner: any,
|
|
10
9
|
$$rAFScheduler: any,
|
|
11
10
|
$$animateCache: any,
|
|
12
|
-
) => (element: any, event: any, options: any) =>
|
|
11
|
+
) => (element: any, event: any, options: any) => AnimateRunner)
|
|
13
12
|
)[];
|
|
14
13
|
}
|
|
14
|
+
import { AnimateRunner } from "./runner/animate-runner.js";
|
|
@@ -15,3 +15,15 @@ export type RafScheduler = {
|
|
|
15
15
|
*/
|
|
16
16
|
waitUntilQuiet(fn: () => void): void;
|
|
17
17
|
};
|
|
18
|
+
export interface AnimationHost {
|
|
19
|
+
/** Pause animation. */
|
|
20
|
+
pause?: () => void;
|
|
21
|
+
/** Resume animation. */
|
|
22
|
+
resume?: () => void;
|
|
23
|
+
/** End animation. */
|
|
24
|
+
end?: () => void;
|
|
25
|
+
/** Cancel animation. */
|
|
26
|
+
cancel?: () => void;
|
|
27
|
+
/** Report animation progress. */
|
|
28
|
+
progress?: (...args: any[]) => void;
|
|
29
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {import('./interface.
|
|
3
|
-
* @typedef {import('../interface.
|
|
2
|
+
* @typedef {import('./interface.ts').RafScheduler} RafScheduler
|
|
3
|
+
* @typedef {import('../interface.ts').ServiceProvider} ServiceProvider
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Service provider that creates a requestAnimationFrame-based scheduler.
|
|
@@ -33,5 +33,5 @@ export class RafSchedulerProvider {
|
|
|
33
33
|
*/
|
|
34
34
|
$get(): RafScheduler;
|
|
35
35
|
}
|
|
36
|
-
export type RafScheduler = import("./interface.
|
|
37
|
-
export type ServiceProvider = import("../interface.
|
|
36
|
+
export type RafScheduler = import("./interface.ts").RafScheduler;
|
|
37
|
+
export type ServiceProvider = import("../interface.ts").ServiceProvider;
|
|
@@ -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 {};
|
|
@@ -24,8 +24,36 @@ export function applyAnimationClassesFactory(): (
|
|
|
24
24
|
) => void;
|
|
25
25
|
export function prepareAnimationOptions(options: any): any;
|
|
26
26
|
export function applyAnimationStyles(element: any, options: any): void;
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Applies initial animation styles to a DOM element.
|
|
29
|
+
*
|
|
30
|
+
* This function sets the element's inline styles using the properties
|
|
31
|
+
* defined in `options.from`, then clears the property to prevent reuse.
|
|
32
|
+
*
|
|
33
|
+
* @param {HTMLElement} element - The target DOM element to apply styles to.
|
|
34
|
+
* @param {{ from?: Partial<CSSStyleDeclaration> | null }} options - options containing a `from` object with CSS property–value pairs.
|
|
35
|
+
*/
|
|
36
|
+
export function applyAnimationFromStyles(
|
|
37
|
+
element: HTMLElement,
|
|
38
|
+
options: {
|
|
39
|
+
from?: Partial<CSSStyleDeclaration> | null;
|
|
40
|
+
},
|
|
41
|
+
): void;
|
|
42
|
+
/**
|
|
43
|
+
* Applies final animation styles to a DOM element.
|
|
44
|
+
*
|
|
45
|
+
* This function sets the element's inline styles using the properties
|
|
46
|
+
* defined in `options.to`, then clears the property to prevent reuse.
|
|
47
|
+
*
|
|
48
|
+
* @param {HTMLElement} element - The target DOM element to apply styles to.
|
|
49
|
+
* @param {{ to?: Partial<CSSStyleDeclaration> | null }} options - options containing a `from` object with CSS property–value pairs.
|
|
50
|
+
*/
|
|
51
|
+
export function applyAnimationToStyles(
|
|
52
|
+
element: HTMLElement,
|
|
53
|
+
options: {
|
|
54
|
+
to?: Partial<CSSStyleDeclaration> | null;
|
|
55
|
+
},
|
|
56
|
+
): void;
|
|
29
57
|
export function mergeAnimationDetails(
|
|
30
58
|
element: any,
|
|
31
59
|
oldAnimation: any,
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
* @implements {Record<string, any>}
|
|
3
|
-
*/
|
|
4
|
-
export class Attributes implements Record<string, any> {
|
|
1
|
+
export class Attributes {
|
|
5
2
|
static $nonscope: boolean;
|
|
6
3
|
/**
|
|
7
|
-
* @param {
|
|
4
|
+
* @param {ng.Scope} $rootScope
|
|
8
5
|
* @param {*} $animate
|
|
9
|
-
* @param {
|
|
6
|
+
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
10
7
|
* @param {*} $sce
|
|
11
8
|
* @param {import("../../shared/noderef.js").NodeRef} [nodeRef]
|
|
12
9
|
* @param {Object} [attributesToCopy]
|
|
13
10
|
*/
|
|
14
11
|
constructor(
|
|
15
|
-
$rootScope:
|
|
12
|
+
$rootScope: ng.Scope,
|
|
16
13
|
$animate: any,
|
|
17
|
-
$exceptionHandler:
|
|
14
|
+
$exceptionHandler: ng.ExceptionHandlerService,
|
|
18
15
|
$sce: any,
|
|
19
16
|
nodeRef?: import("../../shared/noderef.js").NodeRef,
|
|
20
17
|
attributesToCopy?: any,
|
|
@@ -2,11 +2,11 @@ export const DirectiveSuffix: "Directive";
|
|
|
2
2
|
export class CompileProvider {
|
|
3
3
|
static $inject: string[];
|
|
4
4
|
/**
|
|
5
|
-
* @param {import('../../interface.
|
|
5
|
+
* @param {import('../../interface.ts').Provider} $provide
|
|
6
6
|
* @param {import('../sanitize/sanitize-uri.js').SanitizeUriProvider} $$sanitizeUriProvider
|
|
7
7
|
*/
|
|
8
8
|
constructor(
|
|
9
|
-
$provide: import("../../interface.
|
|
9
|
+
$provide: import("../../interface.ts").Provider,
|
|
10
10
|
$$sanitizeUriProvider: import("../sanitize/sanitize-uri.js").SanitizeUriProvider,
|
|
11
11
|
);
|
|
12
12
|
/**
|
|
@@ -26,7 +26,7 @@ export class CompileProvider {
|
|
|
26
26
|
/**
|
|
27
27
|
* @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
|
|
28
28
|
* or an object map of components where the keys are the names and the values are the component definition objects.
|
|
29
|
-
* @param {import("../../interface.
|
|
29
|
+
* @param {import("../../interface.ts").Component} options Component definition object (a simplified
|
|
30
30
|
* {directive definition object}),
|
|
31
31
|
* with the following properties (all optional):
|
|
32
32
|
*
|
|
@@ -69,7 +69,7 @@ export class CompileProvider {
|
|
|
69
69
|
*/
|
|
70
70
|
component: (
|
|
71
71
|
name: string | any,
|
|
72
|
-
options: import("../../interface.
|
|
72
|
+
options: import("../../interface.ts").Component,
|
|
73
73
|
) => CompileProvider;
|
|
74
74
|
/**
|
|
75
75
|
* Retrieves or overrides the default regular expression that is used for determining trusted safe
|
|
@@ -35,7 +35,7 @@ export class ControllerProvider {
|
|
|
35
35
|
| string
|
|
36
36
|
| ((
|
|
37
37
|
$injector: import("../../core/di/internal-injector.js").InjectorService,
|
|
38
|
-
) => import("./interface.
|
|
38
|
+
) => import("./interface.ts").ControllerService)
|
|
39
39
|
)[];
|
|
40
40
|
/**
|
|
41
41
|
* Adds an identifier to the controller instance in the given locals' scope.
|
|
@@ -22,12 +22,12 @@ export class NgModule {
|
|
|
22
22
|
/**
|
|
23
23
|
* @param {string} name - Name of the module
|
|
24
24
|
* @param {Array<string>} requires - List of modules which the injector will load before the current module
|
|
25
|
-
* @param {import("../../interface.
|
|
25
|
+
* @param {import("../../interface.ts").Injectable<any>} [configFn]
|
|
26
26
|
*/
|
|
27
27
|
constructor(
|
|
28
28
|
name: string,
|
|
29
29
|
requires: Array<string>,
|
|
30
|
-
configFn?: import("../../interface.
|
|
30
|
+
configFn?: import("../../interface.ts").Injectable<any>,
|
|
31
31
|
);
|
|
32
32
|
/**
|
|
33
33
|
* Name of the current module.
|
|
@@ -46,8 +46,8 @@ export class NgModule {
|
|
|
46
46
|
invokeQueue: Array<Array<any>>;
|
|
47
47
|
/** @type {!Array<Array<*>>} */
|
|
48
48
|
configBlocks: Array<Array<any>>;
|
|
49
|
-
/** @type {!Array.<import("../../interface.
|
|
50
|
-
runBlocks: Array<import("../../interface.
|
|
49
|
+
/** @type {!Array.<import("../../interface.ts").Injectable<any>>} */
|
|
50
|
+
runBlocks: Array<import("../../interface.ts").Injectable<any>>;
|
|
51
51
|
services: any[];
|
|
52
52
|
/**
|
|
53
53
|
* @param {string} name
|
|
@@ -110,47 +110,47 @@ export class NgModule {
|
|
|
110
110
|
): NgModule;
|
|
111
111
|
/**
|
|
112
112
|
* @param {string} name
|
|
113
|
-
* @param {import("../../interface.
|
|
113
|
+
* @param {import("../../interface.ts").Injectable<any>} decorFn
|
|
114
114
|
* @returns {NgModule}
|
|
115
115
|
*/
|
|
116
116
|
decorator(
|
|
117
117
|
name: string,
|
|
118
|
-
decorFn: import("../../interface.
|
|
118
|
+
decorFn: import("../../interface.ts").Injectable<any>,
|
|
119
119
|
): NgModule;
|
|
120
120
|
/**
|
|
121
121
|
* @param {string} name
|
|
122
|
-
* @param {import("../../interface.
|
|
122
|
+
* @param {import("../../interface.ts").Injectable<any>} directiveFactory
|
|
123
123
|
* @returns {NgModule}
|
|
124
124
|
*/
|
|
125
125
|
directive(
|
|
126
126
|
name: string,
|
|
127
|
-
directiveFactory: import("../../interface.
|
|
127
|
+
directiveFactory: import("../../interface.ts").Injectable<any>,
|
|
128
128
|
): NgModule;
|
|
129
129
|
/**
|
|
130
130
|
* @param {string} name
|
|
131
|
-
* @param {import("../../interface.
|
|
131
|
+
* @param {import("../../interface.ts").Injectable<any>} animationFactory
|
|
132
132
|
* @returns {NgModule}
|
|
133
133
|
*/
|
|
134
134
|
animation(
|
|
135
135
|
name: string,
|
|
136
|
-
animationFactory: import("../../interface.
|
|
136
|
+
animationFactory: import("../../interface.ts").Injectable<any>,
|
|
137
137
|
): NgModule;
|
|
138
138
|
/**
|
|
139
139
|
* @param {string} name
|
|
140
|
-
* @param {import("../../interface.
|
|
140
|
+
* @param {import("../../interface.ts").Injectable<any>} filterFn
|
|
141
141
|
* @return {NgModule}
|
|
142
142
|
*/
|
|
143
143
|
filter(
|
|
144
144
|
name: string,
|
|
145
|
-
filterFn: import("../../interface.
|
|
145
|
+
filterFn: import("../../interface.ts").Injectable<any>,
|
|
146
146
|
): NgModule;
|
|
147
147
|
/**
|
|
148
148
|
* @param {string} name
|
|
149
|
-
* @param {import("../../interface.
|
|
149
|
+
* @param {import("../../interface.ts").Injectable<any>} ctlFn
|
|
150
150
|
* @returns {NgModule}
|
|
151
151
|
*/
|
|
152
152
|
controller(
|
|
153
153
|
name: string,
|
|
154
|
-
ctlFn: import("../../interface.
|
|
154
|
+
ctlFn: import("../../interface.ts").Injectable<any>,
|
|
155
155
|
): NgModule;
|
|
156
156
|
}
|
|
@@ -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
|