@angular-wave/angular.ts 0.16.1 → 0.18.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 +4 -0
- package/@types/animations/animate-css-driver.d.ts +10 -2
- package/@types/animations/animate-css.d.ts +8 -14
- package/@types/animations/animate-js-driver.d.ts +10 -2
- package/@types/animations/animate.d.ts +1 -1
- package/@types/animations/animation.d.ts +2 -5
- package/@types/animations/cache/animate-cache.d.ts +99 -0
- package/@types/animations/cache/interface.d.ts +17 -0
- package/@types/animations/interface.d.ts +22 -20
- package/@types/animations/queue/animate-queue.d.ts +1 -1
- package/@types/animations/raf/raf-scheduler.d.ts +37 -0
- package/@types/animations/shared.d.ts +1 -1
- package/@types/core/compile/attributes.d.ts +4 -4
- package/@types/core/compile/compile.d.ts +3 -3
- package/@types/core/compile/interface.d.ts +36 -5
- package/@types/core/interpolate/interface.d.ts +7 -1
- package/@types/core/interpolate/interpolate.d.ts +1 -1
- package/@types/core/scope/interface.d.ts +14 -4
- package/@types/core/scope/scope.d.ts +58 -22
- package/@types/directive/aria/aria.d.ts +1 -1
- package/@types/directive/form/form.d.ts +16 -4
- package/@types/directive/messages/messages.d.ts +13 -13
- package/@types/directive/model/model.d.ts +6 -4
- package/@types/filters/order-by.d.ts +13 -0
- package/@types/interface.d.ts +3 -4
- package/@types/namespace.d.ts +7 -13
- package/@types/router/directives/view-directive.d.ts +2 -2
- package/@types/router/path/path-node.d.ts +1 -1
- package/@types/router/resolve/resolve-context.d.ts +1 -1
- package/@types/router/state/state-object.d.ts +2 -2
- package/@types/router/transition/hook-registry.d.ts +1 -1
- package/@types/router/url/url-matcher.d.ts +1 -1
- package/@types/services/anchor-scroll/anchor-scroll.d.ts +1 -1
- package/@types/services/anchor-scroll/interface.d.ts +5 -8
- package/@types/services/http/http.d.ts +1 -1
- package/@types/services/location/location.d.ts +1 -1
- package/@types/services/sce/interface.d.ts +3 -6
- package/@types/services/sce/sce.d.ts +7 -2
- package/@types/shared/common.d.ts +100 -39
- package/@types/shared/node.d.ts +5 -5
- package/@types/shared/strings.d.ts +2 -2
- package/dist/angular-ts.esm.js +1584 -1181
- package/dist/angular-ts.umd.js +1584 -1181
- 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/animations/animate-cache.d.ts +0 -94
- package/@types/animations/raf-scheduler.d.ts +0 -35
- package/@types/router/scroll/interface.d.ts +0 -3
- package/@types/router/scroll/view-scroll.d.ts +0 -8
package/@types/angular.d.ts
CHANGED
|
@@ -85,6 +85,10 @@ export class Angular extends EventTarget {
|
|
|
85
85
|
requires?: Array<string>,
|
|
86
86
|
configFn?: ng.Injectable<any>,
|
|
87
87
|
): NgModule;
|
|
88
|
+
/**
|
|
89
|
+
* @param {CustomEvent} event
|
|
90
|
+
*/
|
|
91
|
+
dispatchEvent(event: CustomEvent): boolean;
|
|
88
92
|
/**
|
|
89
93
|
* Use this function to manually start up AngularTS application.
|
|
90
94
|
*
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @param {import("./animation.js").AnimationProvider} $$animationProvider
|
|
3
|
+
*/
|
|
4
|
+
export function AnimateCssDriverProvider(
|
|
5
|
+
$$animationProvider: import("./animation.js").AnimationProvider,
|
|
6
|
+
): void;
|
|
2
7
|
export class AnimateCssDriverProvider {
|
|
3
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @param {import("./animation.js").AnimationProvider} $$animationProvider
|
|
10
|
+
*/
|
|
11
|
+
constructor($$animationProvider: import("./animation.js").AnimationProvider);
|
|
4
12
|
/**
|
|
5
13
|
* @returns {Function}
|
|
6
14
|
*/
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
export function AnimateCssProvider(): void;
|
|
2
2
|
export class AnimateCssProvider {
|
|
3
|
-
$get: (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
) => {
|
|
12
|
-
$$willAnimate: boolean;
|
|
13
|
-
start(): any;
|
|
14
|
-
end: () => void;
|
|
15
|
-
})
|
|
16
|
-
)[];
|
|
3
|
+
$get: (() => (
|
|
4
|
+
element: HTMLElement,
|
|
5
|
+
initialOptions: ng.AnimationOptions,
|
|
6
|
+
) => {
|
|
7
|
+
_willAnimate: boolean;
|
|
8
|
+
start(): any;
|
|
9
|
+
end: () => void;
|
|
10
|
+
})[];
|
|
17
11
|
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @param {import("./animation.js").AnimationProvider} $$animationProvider
|
|
3
|
+
*/
|
|
4
|
+
export function AnimateJsDriverProvider(
|
|
5
|
+
$$animationProvider: import("./animation.js").AnimationProvider,
|
|
6
|
+
): void;
|
|
2
7
|
export class AnimateJsDriverProvider {
|
|
3
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @param {import("./animation.js").AnimationProvider} $$animationProvider
|
|
10
|
+
*/
|
|
11
|
+
constructor($$animationProvider: import("./animation.js").AnimationProvider);
|
|
4
12
|
$get: (string | (($$animateJs: any) => (animationDetails: any) => any))[];
|
|
5
13
|
}
|
|
6
14
|
export namespace AnimateJsDriverProvider {
|
|
@@ -3,7 +3,7 @@ export function AnimateProvider($provide: ng.ProvideService): void;
|
|
|
3
3
|
export class AnimateProvider {
|
|
4
4
|
/** @param {ng.ProvideService} $provide */
|
|
5
5
|
constructor($provide: ng.ProvideService);
|
|
6
|
-
|
|
6
|
+
_registeredAnimations: any;
|
|
7
7
|
/**
|
|
8
8
|
* Registers a new injectable animation factory function. The factory function produces the
|
|
9
9
|
* animation object which contains callback functions for each event that is expected to be
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
export function AnimationProvider(): void;
|
|
2
2
|
export class AnimationProvider {
|
|
3
|
-
drivers:
|
|
3
|
+
drivers: string[];
|
|
4
4
|
$get: (
|
|
5
5
|
| string
|
|
6
6
|
| ((
|
|
7
7
|
$rootScope: ng.RootScopeService,
|
|
8
8
|
$injector: ng.InjectorService,
|
|
9
|
-
|
|
10
|
-
$$animateCache: any,
|
|
11
|
-
) => (elementParam: any, event: any, options: any) => AnimateRunner)
|
|
9
|
+
) => import("./interface.ts").AnimationService)
|
|
12
10
|
)[];
|
|
13
11
|
}
|
|
14
|
-
import { AnimateRunner } from "./runner/animate-runner.js";
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Animation cache responsible for:
|
|
3
|
+
* - Generating stable animation cache keys
|
|
4
|
+
* - Tracking cached animation results
|
|
5
|
+
* - Avoiding repeated animation work
|
|
6
|
+
*
|
|
7
|
+
* Cache keys are scoped per parent node to prevent collisions between
|
|
8
|
+
* structurally identical nodes in different DOM subtrees.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export class AnimateCache {
|
|
13
|
+
/**
|
|
14
|
+
* Generates a stable cache key for an animation invocation.
|
|
15
|
+
*
|
|
16
|
+
* The key is derived from:
|
|
17
|
+
* - The node's parent (used as a cache namespace)
|
|
18
|
+
* - The animation method (e.g. enter, leave, addClass)
|
|
19
|
+
* - The node's current CSS class state
|
|
20
|
+
* - Any classes being added or removed
|
|
21
|
+
*
|
|
22
|
+
* If the node is not attached to the DOM, the node itself is used
|
|
23
|
+
* as the parent scope to avoid key collisions.
|
|
24
|
+
*
|
|
25
|
+
* @param {HTMLElement} node
|
|
26
|
+
* Target element being animated.
|
|
27
|
+
* @param {string} method
|
|
28
|
+
* Animation method name.
|
|
29
|
+
* @param {string} [addClass]
|
|
30
|
+
* CSS class scheduled to be added during the animation.
|
|
31
|
+
* @param {string} [removeClass]
|
|
32
|
+
* CSS class scheduled to be removed during the animation.
|
|
33
|
+
*
|
|
34
|
+
* @returns {string}
|
|
35
|
+
* A unique, deterministic cache key.
|
|
36
|
+
*/
|
|
37
|
+
_cacheKey(
|
|
38
|
+
node: HTMLElement,
|
|
39
|
+
method: string,
|
|
40
|
+
addClass?: string,
|
|
41
|
+
removeClass?: string,
|
|
42
|
+
): string;
|
|
43
|
+
/**
|
|
44
|
+
* Determines whether a cache entry exists but is marked as invalid.
|
|
45
|
+
*
|
|
46
|
+
* This is typically used to detect animations that were previously
|
|
47
|
+
* cached but resolved without a duration.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} key
|
|
50
|
+
* Cache key to test.
|
|
51
|
+
* @returns {boolean}
|
|
52
|
+
* True if an invalid cache entry exists, false otherwise.
|
|
53
|
+
*/
|
|
54
|
+
_containsCachedAnimationWithoutDuration(key: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Clears all cached animation entries.
|
|
57
|
+
*
|
|
58
|
+
* Does not reset parent IDs.
|
|
59
|
+
*
|
|
60
|
+
* @returns {void}
|
|
61
|
+
*/
|
|
62
|
+
_flush(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Returns the number of times a cache entry has been used.
|
|
65
|
+
*
|
|
66
|
+
* @param {string} key
|
|
67
|
+
* Cache key to query.
|
|
68
|
+
* @returns {number}
|
|
69
|
+
* Usage count, or 0 if the entry does not exist.
|
|
70
|
+
*/
|
|
71
|
+
_count(key: string): number;
|
|
72
|
+
/**
|
|
73
|
+
* Retrieves the cached value associated with a cache key.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} key
|
|
76
|
+
* Cache key to retrieve.
|
|
77
|
+
* @returns {any}
|
|
78
|
+
* Cached value, or undefined if not present.
|
|
79
|
+
*/
|
|
80
|
+
_get(key: string): any;
|
|
81
|
+
/**
|
|
82
|
+
* Inserts or updates a cache entry.
|
|
83
|
+
*
|
|
84
|
+
* Existing entries will have their usage count incremented
|
|
85
|
+
* and their value replaced.
|
|
86
|
+
*
|
|
87
|
+
* @param {string} key
|
|
88
|
+
* Cache key.
|
|
89
|
+
* @param {any} value
|
|
90
|
+
* Value to cache.
|
|
91
|
+
* @param {boolean} isValid
|
|
92
|
+
* Whether the cached value is considered valid.
|
|
93
|
+
*
|
|
94
|
+
* @returns {void}
|
|
95
|
+
*/
|
|
96
|
+
_put(key: string, value: any, isValid: boolean): void;
|
|
97
|
+
#private;
|
|
98
|
+
}
|
|
99
|
+
export const animateCache: AnimateCache;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal cache entry used to track animation results and usage.
|
|
3
|
+
*/
|
|
4
|
+
export interface CacheEntry {
|
|
5
|
+
/**
|
|
6
|
+
* Number of times this cache entry has been accessed or reused.
|
|
7
|
+
*/
|
|
8
|
+
total: number;
|
|
9
|
+
/**
|
|
10
|
+
* Cached animation result (typically an animation runner or metadata).
|
|
11
|
+
*/
|
|
12
|
+
value: any;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the cached animation is considered valid (e.g. has a duration).
|
|
15
|
+
*/
|
|
16
|
+
isValid: boolean;
|
|
17
|
+
}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
import { AnimateRunner } from "./runner/animate-runner.js";
|
|
2
2
|
import { QueuePhase } from "./queue/interface.ts";
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
(tasks: Array<() => void>): void;
|
|
9
|
-
/**
|
|
10
|
-
* Internal queue of scheduled task arrays.
|
|
11
|
-
*/
|
|
12
|
-
_queue: Array<Array<() => void>>;
|
|
13
|
-
/**
|
|
14
|
-
* Waits until the animation frame is quiet before running the provided function.
|
|
15
|
-
* Cancels any previous animation frame requests.
|
|
16
|
-
* @param fn - The function to run when the frame is quiet.
|
|
17
|
-
*/
|
|
18
|
-
_waitUntilQuiet(fn: () => void): void;
|
|
19
|
-
};
|
|
3
|
+
export type AnimationService = (
|
|
4
|
+
element: HTMLElement,
|
|
5
|
+
event: string,
|
|
6
|
+
options?: any,
|
|
7
|
+
) => AnimateRunner;
|
|
20
8
|
export interface AnimationHost {
|
|
21
9
|
/** Pause animation. */
|
|
22
10
|
pause?: () => void;
|
|
@@ -100,13 +88,27 @@ export interface AnimationOptions {
|
|
|
100
88
|
tempClasses: string | string[];
|
|
101
89
|
/** Optional DOM operation callback executed before animation */
|
|
102
90
|
domOperation?: () => void;
|
|
103
|
-
|
|
104
|
-
|
|
91
|
+
onDone?: () => void;
|
|
92
|
+
_domOperationFired?: boolean;
|
|
93
|
+
_prepared?: boolean;
|
|
94
|
+
_skipPreparationClasses?: boolean;
|
|
95
|
+
cleanupStyles?: boolean;
|
|
105
96
|
preparationClasses?: string;
|
|
106
97
|
activeClasses?: string;
|
|
98
|
+
duration?: number | string;
|
|
99
|
+
event?: string | string[];
|
|
100
|
+
easing?: string;
|
|
101
|
+
delay?: string;
|
|
102
|
+
structural?: boolean;
|
|
103
|
+
transitionStyle?: string;
|
|
104
|
+
staggerIndex?: number;
|
|
105
|
+
skipBlocking?: boolean;
|
|
106
|
+
stagger?: number | string;
|
|
107
|
+
keyframeStyle?: string;
|
|
108
|
+
applyClassesEarly?: boolean;
|
|
107
109
|
}
|
|
108
110
|
export interface AnimateJsRunner {
|
|
109
|
-
|
|
111
|
+
_willAnimate: true;
|
|
110
112
|
start: () => AnimateRunner;
|
|
111
113
|
end: () => AnimateRunner;
|
|
112
114
|
}
|
|
@@ -11,7 +11,7 @@ export class AnimateQueueProvider {
|
|
|
11
11
|
| ((
|
|
12
12
|
$rootScope: ng.RootScopeService,
|
|
13
13
|
$injector: ng.InjectorService,
|
|
14
|
-
$$animation:
|
|
14
|
+
$$animation: import("../interface.ts").AnimationService,
|
|
15
15
|
) => import("../queue/interface.ts").AnimateQueueService)
|
|
16
16
|
)[];
|
|
17
17
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A requestAnimationFrame-based scheduler.
|
|
3
|
+
*/
|
|
4
|
+
export class RafScheduler {
|
|
5
|
+
/**
|
|
6
|
+
* Internal task queue, where each item is an array of functions to run.
|
|
7
|
+
* @type {Array<() => void>}
|
|
8
|
+
*/
|
|
9
|
+
_queue: Array<() => void>;
|
|
10
|
+
/**
|
|
11
|
+
* ID of the currently scheduled animation frame (if any).
|
|
12
|
+
* Used for cancellation and tracking.
|
|
13
|
+
* @type {number|null}
|
|
14
|
+
*/
|
|
15
|
+
_cancelFn: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* Processes the next batch of tasks in the animation frame.
|
|
18
|
+
* Executes the first group of functions in the queue, then
|
|
19
|
+
* schedules the next frame if needed.
|
|
20
|
+
*/
|
|
21
|
+
_nextTick(): void;
|
|
22
|
+
/**
|
|
23
|
+
* The main scheduler function.
|
|
24
|
+
* Accepts an array of functions and schedules them to run in the next available frame(s).
|
|
25
|
+
*
|
|
26
|
+
* @param {Array<() => void>} tasks
|
|
27
|
+
*/
|
|
28
|
+
_schedule(tasks: Array<() => void>): void;
|
|
29
|
+
/**
|
|
30
|
+
* Cancels any pending frame and runs the given function once the frame is idle.
|
|
31
|
+
* Useful for debounced updates.
|
|
32
|
+
*
|
|
33
|
+
* @param {Function} fn - Function to run when the animation frame is quiet.
|
|
34
|
+
*/
|
|
35
|
+
_waitUntilQuiet(fn: Function): void;
|
|
36
|
+
}
|
|
37
|
+
export const rafScheduler: RafScheduler;
|
|
@@ -118,7 +118,7 @@ export function clearGeneratedClasses(
|
|
|
118
118
|
* @param {boolean} applyBlock
|
|
119
119
|
* @returns {string[]}
|
|
120
120
|
*/
|
|
121
|
-
export function
|
|
121
|
+
export function _blockKeyframeAnimations(
|
|
122
122
|
node: HTMLElement,
|
|
123
123
|
applyBlock: boolean,
|
|
124
124
|
): string[];
|
|
@@ -19,14 +19,14 @@ export class Attributes {
|
|
|
19
19
|
*
|
|
20
20
|
* @param {ng.AnimateService} $animate
|
|
21
21
|
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
22
|
-
* @param {ng.
|
|
22
|
+
* @param {ng.SceService} $sce
|
|
23
23
|
* @param {import("../../shared/noderef.js").NodeRef} [nodeRef]
|
|
24
24
|
* @param {Object & Record<string, any>} [attributesToCopy]
|
|
25
25
|
*/
|
|
26
26
|
constructor(
|
|
27
27
|
$animate: ng.AnimateService,
|
|
28
28
|
$exceptionHandler: ng.ExceptionHandlerService,
|
|
29
|
-
$sce: ng.
|
|
29
|
+
$sce: ng.SceService,
|
|
30
30
|
nodeRef?: import("../../shared/noderef.js").NodeRef,
|
|
31
31
|
attributesToCopy?: any & Record<string, any>,
|
|
32
32
|
);
|
|
@@ -34,8 +34,8 @@ export class Attributes {
|
|
|
34
34
|
_animate: ng.AnimateService;
|
|
35
35
|
/** @type {ng.ExceptionHandlerService} */
|
|
36
36
|
_exceptionHandler: ng.ExceptionHandlerService;
|
|
37
|
-
/** @type {ng.
|
|
38
|
-
_sce: ng.
|
|
37
|
+
/** @type {ng.SceService} */
|
|
38
|
+
_sce: ng.SceService;
|
|
39
39
|
/**
|
|
40
40
|
* A map of DOM element attribute names to the normalized name. This is needed
|
|
41
41
|
* to do reverse lookup from normalized name back to actual name.
|
|
@@ -3,11 +3,11 @@ export class CompileProvider {
|
|
|
3
3
|
static $inject: string[];
|
|
4
4
|
/**
|
|
5
5
|
* @param {import('../../interface.ts').Provider} $provide
|
|
6
|
-
* @param {import('../sanitize/sanitize-uri.js').SanitizeUriProvider}
|
|
6
|
+
* @param {import('../sanitize/sanitize-uri.js').SanitizeUriProvider} $sanitizeUriProvider
|
|
7
7
|
*/
|
|
8
8
|
constructor(
|
|
9
9
|
$provide: import("../../interface.ts").Provider,
|
|
10
|
-
|
|
10
|
+
$sanitizeUriProvider: import("../sanitize/sanitize-uri.js").SanitizeUriProvider,
|
|
11
11
|
);
|
|
12
12
|
/**
|
|
13
13
|
* Register a new directive with the compiler.
|
|
@@ -130,7 +130,7 @@ export class CompileProvider {
|
|
|
130
130
|
$templateRequest: ng.TemplateRequestService,
|
|
131
131
|
$parse: ng.ParseService,
|
|
132
132
|
$controller: any,
|
|
133
|
-
$sce: ng.
|
|
133
|
+
$sce: ng.SceService,
|
|
134
134
|
$animate: ng.AnimateService,
|
|
135
135
|
) => (
|
|
136
136
|
compileNode: string | Element | Node | ChildNode | NodeList,
|
|
@@ -2,6 +2,7 @@ import type { Scope } from "../scope/scope.js";
|
|
|
2
2
|
import type { NodeRef } from "../../shared/noderef.js";
|
|
3
3
|
type TranscludedNodes = Node | Node[] | NodeList | null;
|
|
4
4
|
type TranscludeFnCb = (clone?: TranscludedNodes, scope?: Scope | null) => void;
|
|
5
|
+
export type ChildTranscludeOrLinkFn = TranscludeFn | PublicLinkFn;
|
|
5
6
|
/**
|
|
6
7
|
* A function passed as the fifth argument to a `PublicLinkFn` link function.
|
|
7
8
|
* It behaves like a linking function, with the `scope` argument automatically created
|
|
@@ -12,13 +13,33 @@ type TranscludeFnCb = (clone?: TranscludedNodes, scope?: Scope | null) => void;
|
|
|
12
13
|
export type TranscludeFn = {
|
|
13
14
|
(cb: TranscludeFnCb): void;
|
|
14
15
|
(scope: Scope, cb?: TranscludeFnCb): void;
|
|
15
|
-
|
|
16
|
+
_slots?: any;
|
|
16
17
|
};
|
|
18
|
+
export type CloneAttachFn = (
|
|
19
|
+
clone: Node | Element | NodeList,
|
|
20
|
+
scope?: Scope,
|
|
21
|
+
) => void;
|
|
17
22
|
/**
|
|
18
23
|
* A specialized version of `TranscludeFn` with the scope argument already bound.
|
|
19
24
|
* This function requires no parameters and returns the same result as `TranscludeFn`.
|
|
20
25
|
*/
|
|
21
|
-
export
|
|
26
|
+
export interface BoundTranscludeFn {
|
|
27
|
+
(
|
|
28
|
+
scope?: Scope,
|
|
29
|
+
cloneAttachFn?: CloneAttachFn,
|
|
30
|
+
transcludeControllers?: unknown,
|
|
31
|
+
_futureParentElement?: Node | Element,
|
|
32
|
+
scopeToChild?: Scope,
|
|
33
|
+
): Node | Element | NodeList;
|
|
34
|
+
_slots: Record<string, SlotTranscludeFn | null | undefined>;
|
|
35
|
+
}
|
|
36
|
+
export type SlotTranscludeFn = (
|
|
37
|
+
scope?: Scope,
|
|
38
|
+
cloneAttachFn?: CloneAttachFn,
|
|
39
|
+
transcludeControllers?: unknown,
|
|
40
|
+
_futureParentElement?: Node | Element,
|
|
41
|
+
scopeToChild?: Scope,
|
|
42
|
+
) => Node | Element | NodeList;
|
|
22
43
|
/**
|
|
23
44
|
* Represents a simple change in a watched value.
|
|
24
45
|
*/
|
|
@@ -60,17 +81,27 @@ export interface LinkFnMapping {
|
|
|
60
81
|
* Function that compiles a list of nodes and returns a composite linking function.
|
|
61
82
|
*/
|
|
62
83
|
export type CompileNodesFn = () => CompositeLinkFn;
|
|
84
|
+
export type ChildLinkFn = (
|
|
85
|
+
scope: Scope,
|
|
86
|
+
nodeRef: NodeRef,
|
|
87
|
+
_parentBoundTranscludeFn: BoundTranscludeFn | null,
|
|
88
|
+
) => void;
|
|
63
89
|
/**
|
|
64
90
|
* A function used to link a specific node.
|
|
65
91
|
*/
|
|
66
|
-
export type NodeLinkFn = (
|
|
92
|
+
export type NodeLinkFn = (
|
|
93
|
+
childLinkFn: ChildLinkFn | null,
|
|
94
|
+
scope: Scope,
|
|
95
|
+
node: Node | Element,
|
|
96
|
+
boundTranscludeFn: BoundTranscludeFn | null,
|
|
97
|
+
) => void;
|
|
67
98
|
/**
|
|
68
99
|
* Context information for a NodeLinkFn.
|
|
69
100
|
*/
|
|
70
101
|
export interface NodeLinkFnCtx {
|
|
71
102
|
nodeLinkFn: NodeLinkFn;
|
|
72
103
|
terminal: boolean;
|
|
73
|
-
transclude:
|
|
104
|
+
transclude: ChildTranscludeOrLinkFn;
|
|
74
105
|
transcludeOnThisElement: boolean;
|
|
75
106
|
templateOnThisElement: boolean;
|
|
76
107
|
newScope: boolean;
|
|
@@ -85,6 +116,6 @@ export type ApplyDirectivesToNodeFn = () => NodeLinkFn;
|
|
|
85
116
|
export type CompositeLinkFn = (
|
|
86
117
|
scope: Scope,
|
|
87
118
|
$linkNode: NodeRef,
|
|
88
|
-
|
|
119
|
+
_parentBoundTranscludeFn?: Function,
|
|
89
120
|
) => void;
|
|
90
121
|
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export interface InterpolationFunction {
|
|
2
2
|
expressions: any[];
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Evaluate the interpolation.
|
|
5
|
+
* @param context - The scope/context
|
|
6
|
+
* @param cb - Optional callback when expressions change
|
|
7
|
+
*/
|
|
8
|
+
(context: any, cb?: (val: any) => void): any;
|
|
9
|
+
exp: string;
|
|
4
10
|
}
|
|
5
11
|
export interface InterpolateService {
|
|
6
12
|
(
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { CompiledExpression } from "../parse/interface.ts";
|
|
2
2
|
export type ListenerFn = (newValue?: any, originalTarget?: object) => void;
|
|
3
|
-
export type NonScope = string[] | boolean
|
|
3
|
+
export type NonScope = string[] | boolean;
|
|
4
|
+
export interface NonScopeMarked {
|
|
5
|
+
$nonscope?: NonScope;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
constructor?: {
|
|
8
|
+
$nonscope?: NonScope;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
4
11
|
export interface Listener {
|
|
5
12
|
originalTarget: any;
|
|
6
13
|
listenerFn: ListenerFn;
|
|
@@ -9,17 +16,16 @@ export interface Listener {
|
|
|
9
16
|
scopeId: number;
|
|
10
17
|
property: string[];
|
|
11
18
|
watchProp?: string;
|
|
12
|
-
foreignListener?: ProxyConstructor;
|
|
13
19
|
}
|
|
14
20
|
export interface ScopeEvent {
|
|
15
21
|
/**
|
|
16
22
|
* the scope on which the event was $emit-ed or $broadcast-ed.
|
|
17
23
|
*/
|
|
18
|
-
targetScope: ng.Scope
|
|
24
|
+
targetScope: typeof Proxy<ng.Scope>;
|
|
19
25
|
/**
|
|
20
26
|
* the scope that is currently handling the event. Once the event propagates through the scope hierarchy, this property is set to null.
|
|
21
27
|
*/
|
|
22
|
-
currentScope: ng.Scope;
|
|
28
|
+
currentScope: typeof Proxy<ng.Scope> | null;
|
|
23
29
|
/**
|
|
24
30
|
* name of the event.
|
|
25
31
|
*/
|
|
@@ -32,6 +38,10 @@ export interface ScopeEvent {
|
|
|
32
38
|
* calling preventDefault sets defaultPrevented flag to true.
|
|
33
39
|
*/
|
|
34
40
|
preventDefault(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Whether propagation has been stopped
|
|
43
|
+
*/
|
|
44
|
+
stopped: boolean;
|
|
35
45
|
/**
|
|
36
46
|
* true if preventDefault was called.
|
|
37
47
|
*/
|