@angular-wave/angular.ts 0.0.20 → 0.0.22
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/Makefile +1 -1
- package/README.md +3 -3
- package/TODO.md +14 -0
- package/dist/angular-ts.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/index.html +2 -1
- package/package.json +1 -1
- package/src/animations/animate-css-driver.js +2 -2
- package/src/animations/animate-css.js +15 -6
- package/src/animations/animate-js.js +1 -1
- package/src/animations/animate-queue.js +1 -1
- package/src/animations/shared.js +0 -14
- package/src/core/compile.js +6 -3
- package/src/core/q.js +9 -9
- package/src/core/sanitize-uri.js +1 -1
- package/src/core/sce.js +1 -1
- package/src/directive/if.js +0 -79
- package/src/directive/if.md +80 -0
- package/src/directive/include.js +0 -82
- package/src/directive/include.md +86 -0
- package/src/directive/repeat.js +0 -1
- package/src/loader.js +0 -1
- package/src/public.js +0 -2
- package/src/router/common/trace.js +1 -1
- package/src/router/directives/stateDirectives.js +16 -14
- package/src/router/directives/viewDirective.js +2 -2
- package/src/router/hooks/resolve.js +3 -4
- package/src/router/hooks/views.js +3 -2
- package/src/router/state/stateService.js +1 -2
- package/src/router/transition/interface.js +14 -14
- package/src/router/transition/rejectFactory.js +29 -20
- package/src/router/transition/transitionHook.js +5 -5
- package/src/router/url/urlMatcher.js +1 -2
- package/src/router/url/urlRule.js +1 -1
- package/src/router/url/urlRules.js +1 -1
- package/src/shared/common.js +0 -1
- package/test/module-test.html +44 -12
- package/test/router/services.spec.js +71 -0
- package/test/router/state-directives.spec.js +1208 -0
- package/types/angular.d.ts +132 -124
- package/types/index.d.ts +2350 -2187
- package/types/jqlite.d.ts +463 -418
- package/types/router/core/common/common.d.ts +70 -24
- package/types/router/core/common/coreservices.d.ts +30 -32
- package/types/router/core/common/glob.d.ts +9 -9
- package/types/router/core/common/hof.d.ts +12 -4
- package/types/router/core/common/index.d.ts +8 -8
- package/types/router/core/common/predicates.d.ts +1 -1
- package/types/router/core/common/queue.d.ts +13 -13
- package/types/router/core/common/safeConsole.d.ts +3 -3
- package/types/router/core/common/strings.d.ts +4 -2
- package/types/router/core/common/trace.d.ts +94 -82
- package/types/router/core/globals.d.ts +37 -37
- package/types/router/core/hooks/coreResolvables.d.ts +5 -3
- package/types/router/core/hooks/ignoredTransition.d.ts +4 -2
- package/types/router/core/hooks/invalidTransition.d.ts +4 -2
- package/types/router/core/hooks/lazyLoad.d.ts +10 -5
- package/types/router/core/hooks/onEnterExitRetain.d.ts +10 -4
- package/types/router/core/hooks/redirectTo.d.ts +4 -2
- package/types/router/core/hooks/resolve.d.ts +10 -4
- package/types/router/core/hooks/updateGlobals.d.ts +4 -2
- package/types/router/core/hooks/url.d.ts +4 -2
- package/types/router/core/hooks/views.d.ts +7 -3
- package/types/router/core/index.d.ts +11 -12
- package/types/router/core/interface.d.ts +83 -81
- package/types/router/core/params/index.d.ts +5 -5
- package/types/router/core/params/interface.d.ts +439 -439
- package/types/router/core/params/param.d.ts +72 -60
- package/types/router/core/params/paramType.d.ts +40 -40
- package/types/router/core/params/paramTypes.d.ts +169 -165
- package/types/router/core/params/stateParams.d.ts +13 -13
- package/types/router/core/path/index.d.ts +2 -2
- package/types/router/core/path/pathNode.d.ts +49 -49
- package/types/router/core/path/pathUtils.d.ts +100 -74
- package/types/router/core/resolve/index.d.ts +3 -3
- package/types/router/core/resolve/interface.d.ts +137 -137
- package/types/router/core/resolve/resolvable.d.ts +60 -54
- package/types/router/core/resolve/resolveContext.d.ts +84 -79
- package/types/router/core/router.d.ts +95 -86
- package/types/router/core/state/index.d.ts +8 -8
- package/types/router/core/state/interface.d.ts +667 -643
- package/types/router/core/state/stateBuilder.d.ts +41 -38
- package/types/router/core/state/stateMatcher.d.ts +11 -9
- package/types/router/core/state/stateObject.d.ts +154 -139
- package/types/router/core/state/stateQueueManager.d.ts +26 -21
- package/types/router/core/state/stateRegistry.d.ts +124 -121
- package/types/router/core/state/stateService.d.ts +380 -343
- package/types/router/core/state/targetState.d.ts +74 -69
- package/types/router/core/transition/hookBuilder.d.ts +34 -30
- package/types/router/core/transition/hookRegistry.d.ts +96 -74
- package/types/router/core/transition/index.d.ts +8 -8
- package/types/router/core/transition/interface.d.ts +652 -609
- package/types/router/core/transition/rejectFactory.d.ts +97 -97
- package/types/router/core/transition/transition.d.ts +565 -517
- package/types/router/core/transition/transitionEventType.d.ts +20 -11
- package/types/router/core/transition/transitionHook.d.ts +90 -82
- package/types/router/core/transition/transitionService.d.ts +228 -161
- package/types/router/core/url/index.d.ts +8 -8
- package/types/router/core/url/interface.d.ts +100 -87
- package/types/router/core/url/urlConfig.d.ts +130 -126
- package/types/router/core/url/urlMatcher.d.ts +132 -127
- package/types/router/core/url/urlMatcherFactory.d.ts +46 -42
- package/types/router/core/url/urlRouter.d.ts +91 -75
- package/types/router/core/url/urlRule.d.ts +123 -100
- package/types/router/core/url/urlRules.d.ts +240 -232
- package/types/router/core/url/urlService.d.ts +201 -201
- package/types/router/core/view/index.d.ts +2 -2
- package/types/router/core/view/interface.d.ts +26 -26
- package/types/router/core/view/view.d.ts +152 -143
- package/types/router/directives/viewDirective.d.ts +12 -11
- package/types/router/index.d.ts +11 -12
- package/types/router/interface.d.ts +361 -351
- package/types/router/legacy/resolveService.d.ts +44 -40
- package/types/router/legacy/stateEvents.d.ts +1 -1
- package/types/router/locationServices.d.ts +45 -37
- package/types/router/services.d.ts +9 -9
- package/types/router/stateFilters.d.ts +3 -3
- package/types/router/stateProvider.d.ts +240 -235
- package/types/router/statebuilders/onEnterExitRetain.d.ts +4 -2
- package/types/router/statebuilders/views.d.ts +35 -22
- package/types/router/templateFactory.d.ts +99 -79
- package/types/router/viewScroll.d.ts +7 -7
- package/src/directive/a.js +0 -37
- package/test/directive/a.spec.js +0 -192
- package/types/router/angular.d.ts +0 -1
- package/types/router/core/vanilla.d.ts +0 -1
- package/types/router/directives/stateDirectives.d.ts +0 -3
- package/types/router/injectables.d.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StateObject } from
|
|
1
|
+
import { StateObject } from "../state/stateObject";
|
|
2
2
|
export declare const root: any;
|
|
3
3
|
export declare const fromJson: any;
|
|
4
4
|
export declare const toJson: any;
|
|
@@ -6,10 +6,9 @@ export declare const forEach: any;
|
|
|
6
6
|
export declare const extend: typeof _extend;
|
|
7
7
|
export declare const equals: any;
|
|
8
8
|
export declare function identity(x: any): any;
|
|
9
|
-
export declare function noop(): any;
|
|
10
9
|
export declare type Mapper<X, T> = (x: X, key?: string | number) => T;
|
|
11
10
|
export interface TypedMap<T> {
|
|
12
|
-
|
|
11
|
+
[key: string]: T;
|
|
13
12
|
}
|
|
14
13
|
export declare type Predicate<X> = (x?: X) => boolean;
|
|
15
14
|
export declare type PredicateBinary<X, Y> = (x?: X, y?: Y) => boolean;
|
|
@@ -40,7 +39,7 @@ export declare type PredicateBinary<X, Y> = (x?: X, y?: Y) => boolean;
|
|
|
40
39
|
*/
|
|
41
40
|
export declare type IInjectable = Function | any[];
|
|
42
41
|
export interface Obj extends Object {
|
|
43
|
-
|
|
42
|
+
[key: string]: any;
|
|
44
43
|
}
|
|
45
44
|
/**
|
|
46
45
|
* Builds proxy functions on the `to` object which pass through to the `from` object.
|
|
@@ -98,7 +97,13 @@ export interface Obj extends Object {
|
|
|
98
97
|
* @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)
|
|
99
98
|
* @param latebind If true, the binding of the function is delayed until the first time it's invoked
|
|
100
99
|
*/
|
|
101
|
-
export declare function createProxyFunctions(
|
|
100
|
+
export declare function createProxyFunctions(
|
|
101
|
+
source: Function,
|
|
102
|
+
target: Obj,
|
|
103
|
+
bind: Function,
|
|
104
|
+
fnNames?: string[],
|
|
105
|
+
latebind?: boolean,
|
|
106
|
+
): Obj;
|
|
102
107
|
/**
|
|
103
108
|
* prototypal inheritance helper.
|
|
104
109
|
* Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
|
|
@@ -136,7 +141,10 @@ export declare const mergeR: (memo: Obj, item: Obj) => any;
|
|
|
136
141
|
* @param {Object} second The second state.
|
|
137
142
|
* @return {Array} Returns an array of state names in descending order, not including the root.
|
|
138
143
|
*/
|
|
139
|
-
export declare function ancestors(
|
|
144
|
+
export declare function ancestors(
|
|
145
|
+
first: StateObject,
|
|
146
|
+
second: StateObject,
|
|
147
|
+
): StateObject[];
|
|
140
148
|
/**
|
|
141
149
|
* Return a copy of the object only containing the whitelisted properties.
|
|
142
150
|
*
|
|
@@ -165,31 +173,55 @@ export declare function omit(obj: Obj, propNames: string[]): Obj;
|
|
|
165
173
|
/** Given an array of objects, maps each element to a named property of the element. */
|
|
166
174
|
export declare function pluck<T>(collection: Obj[], propName: string): T[];
|
|
167
175
|
/** Given an object, maps each property of the object to a named property of the property. */
|
|
168
|
-
export declare function pluck(
|
|
169
|
-
|
|
170
|
-
}, propName: string): {
|
|
176
|
+
export declare function pluck(
|
|
177
|
+
collection: {
|
|
171
178
|
[key: string]: any;
|
|
179
|
+
},
|
|
180
|
+
propName: string,
|
|
181
|
+
): {
|
|
182
|
+
[key: string]: any;
|
|
172
183
|
};
|
|
173
184
|
/** Given an array of objects, returns a new array containing only the elements which passed the callback predicate */
|
|
174
|
-
export declare function filter<T>(
|
|
185
|
+
export declare function filter<T>(
|
|
186
|
+
collection: T[],
|
|
187
|
+
callback: (t: T, key?: number) => boolean,
|
|
188
|
+
): T[];
|
|
175
189
|
/** Given an object, returns a new object with only those properties that passed the callback predicate */
|
|
176
|
-
export declare function filter<T>(
|
|
190
|
+
export declare function filter<T>(
|
|
191
|
+
collection: TypedMap<T>,
|
|
192
|
+
callback: (t: T, key?: string) => boolean,
|
|
193
|
+
): TypedMap<T>;
|
|
177
194
|
/** Given an object, return the first property of that object which passed the callback predicate */
|
|
178
|
-
export declare function find<T>(
|
|
195
|
+
export declare function find<T>(
|
|
196
|
+
collection: TypedMap<T>,
|
|
197
|
+
callback: Predicate<T>,
|
|
198
|
+
): T;
|
|
179
199
|
/** Given an array of objects, returns the first object which passed the callback predicate */
|
|
180
200
|
export declare function find<T>(collection: T[], callback: Predicate<T>): T;
|
|
181
201
|
/** Given an object, returns a new object, where each property is transformed by the callback function */
|
|
182
|
-
export declare let mapObj: <T, U>(
|
|
202
|
+
export declare let mapObj: <T, U>(
|
|
203
|
+
collection: {
|
|
183
204
|
[key: string]: T;
|
|
184
|
-
},
|
|
185
|
-
|
|
205
|
+
},
|
|
206
|
+
callback: Mapper<T, U>,
|
|
207
|
+
target?: typeof collection,
|
|
208
|
+
) => {
|
|
209
|
+
[key: string]: U;
|
|
186
210
|
};
|
|
187
211
|
/** Given an array, returns a new array, where each element is transformed by the callback function */
|
|
188
|
-
export declare function map<T, U>(
|
|
189
|
-
|
|
212
|
+
export declare function map<T, U>(
|
|
213
|
+
collection: T[],
|
|
214
|
+
callback: Mapper<T, U>,
|
|
215
|
+
target?: typeof collection,
|
|
216
|
+
): U[];
|
|
217
|
+
export declare function map<T, U>(
|
|
218
|
+
collection: {
|
|
190
219
|
[key: string]: T;
|
|
191
|
-
},
|
|
192
|
-
|
|
220
|
+
},
|
|
221
|
+
callback: Mapper<T, U>,
|
|
222
|
+
target?: typeof collection,
|
|
223
|
+
): {
|
|
224
|
+
[key: string]: U;
|
|
193
225
|
};
|
|
194
226
|
/**
|
|
195
227
|
* Given an object, return its enumerable property values
|
|
@@ -293,7 +325,10 @@ export declare const flatten: (arr: any[]) => any;
|
|
|
293
325
|
* oneString.filter(assertPredicate(isNumber, "Not all numbers")); // throws Error(""Not all numbers"");
|
|
294
326
|
* ```
|
|
295
327
|
*/
|
|
296
|
-
export declare const assertPredicate: <T>(
|
|
328
|
+
export declare const assertPredicate: <T>(
|
|
329
|
+
predicate: Predicate<T>,
|
|
330
|
+
errMsg: string | Function,
|
|
331
|
+
) => Predicate<T>;
|
|
297
332
|
/**
|
|
298
333
|
* Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test.
|
|
299
334
|
* @example
|
|
@@ -310,8 +345,14 @@ export declare const assertPredicate: <T>(predicate: Predicate<T>, errMsg: strin
|
|
|
310
345
|
* // throws Error("Key not found")
|
|
311
346
|
* ```
|
|
312
347
|
*/
|
|
313
|
-
export declare const assertMap: <T, U>(
|
|
314
|
-
|
|
348
|
+
export declare const assertMap: <T, U>(
|
|
349
|
+
mapFn: (t: T) => U,
|
|
350
|
+
errMsg: string | Function,
|
|
351
|
+
) => (t: T) => U;
|
|
352
|
+
export declare function assertFn(
|
|
353
|
+
predicateOrMap: Function,
|
|
354
|
+
errMsg?: string | Function,
|
|
355
|
+
): any;
|
|
315
356
|
/**
|
|
316
357
|
* Like _.pairs: Given an object, returns an array of key/value pairs
|
|
317
358
|
*
|
|
@@ -357,7 +398,10 @@ export declare function arrayTuples(...args: any[]): any[];
|
|
|
357
398
|
* // pairsToObj == { fookey: "fooval", barkey: "barval" }
|
|
358
399
|
* ```
|
|
359
400
|
*/
|
|
360
|
-
export declare function applyPairs(
|
|
401
|
+
export declare function applyPairs(
|
|
402
|
+
memo: TypedMap<any>,
|
|
403
|
+
keyValTuple: any[],
|
|
404
|
+
): TypedMap<any>;
|
|
361
405
|
/** Get the last element of an array */
|
|
362
406
|
export declare function tail<T>(arr: T[]): T;
|
|
363
407
|
/**
|
|
@@ -366,5 +410,7 @@ export declare function tail<T>(arr: T[]): T;
|
|
|
366
410
|
export declare function copy(src: Obj, dest?: Obj): any;
|
|
367
411
|
/** Like Object.assign() */
|
|
368
412
|
export declare function _extend(toObj: Obj, ...fromObjs: Obj[]): any;
|
|
369
|
-
export declare const silenceUncaughtInPromise: (
|
|
413
|
+
export declare const silenceUncaughtInPromise: (
|
|
414
|
+
promise: Promise<any>,
|
|
415
|
+
) => Promise<any>;
|
|
370
416
|
export declare const silentRejection: (error: any) => Promise<any>;
|
|
@@ -4,36 +4,34 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @packageDocumentation
|
|
6
6
|
*/
|
|
7
|
-
import { IInjectable, Obj } from
|
|
8
|
-
import { Disposable } from
|
|
9
|
-
import { UrlConfig, UrlService } from
|
|
7
|
+
import { IInjectable, Obj } from "./common";
|
|
8
|
+
import { Disposable } from "../interface";
|
|
9
|
+
import { UrlConfig, UrlService } from "../url";
|
|
10
10
|
export declare const makeStub: <T>(service: string, methods: (keyof T)[]) => T;
|
|
11
11
|
declare const services: CoreServices;
|
|
12
12
|
export interface $QLikeDeferred {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
resolve: (val?: any) => void;
|
|
14
|
+
reject: (reason?: any) => void;
|
|
15
|
+
promise: Promise<any>;
|
|
16
16
|
}
|
|
17
17
|
export interface $QLike {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}): Promise<any>;
|
|
24
|
-
all(promises: Promise<any>[]): Promise<any[]>;
|
|
18
|
+
when<T>(value?: T | PromiseLike<T>): Promise<T>;
|
|
19
|
+
reject<T>(reason: any): Promise<T>;
|
|
20
|
+
defer(): $QLikeDeferred;
|
|
21
|
+
all(promises: { [key: string]: Promise<any> }): Promise<any>;
|
|
22
|
+
all(promises: Promise<any>[]): Promise<any[]>;
|
|
25
23
|
}
|
|
26
24
|
export interface $InjectorLike {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
strictDi?: boolean;
|
|
26
|
+
get(token: any): any;
|
|
27
|
+
get<T>(token: any): T;
|
|
28
|
+
has(token: any): boolean;
|
|
29
|
+
invoke(fn: IInjectable, context?: any, locals?: Obj): any;
|
|
30
|
+
annotate(fn: IInjectable, strictDi?: boolean): any[];
|
|
33
31
|
}
|
|
34
32
|
export interface CoreServices {
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
$q: $QLike;
|
|
34
|
+
$injector: $InjectorLike;
|
|
37
35
|
}
|
|
38
36
|
/**
|
|
39
37
|
* Handles low level URL read/write
|
|
@@ -49,11 +47,11 @@ export interface CoreServices {
|
|
|
49
47
|
* - [[MemoryLocationService]]
|
|
50
48
|
*/
|
|
51
49
|
export interface LocationServices extends Disposable {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
/** See: [[UrlService.url]] */ url: UrlService["url"];
|
|
51
|
+
/** See: [[UrlService.path]] */ path: UrlService["path"];
|
|
52
|
+
/** See: [[UrlService.search]] */ search: UrlService["search"];
|
|
53
|
+
/** See: [[UrlService.hash]] */ hash: UrlService["hash"];
|
|
54
|
+
/** See: [[UrlService.onChange]] */ onChange: UrlService["onChange"];
|
|
57
55
|
}
|
|
58
56
|
/**
|
|
59
57
|
* Returns low level URL configuration and metadata
|
|
@@ -70,11 +68,11 @@ export interface LocationServices extends Disposable {
|
|
|
70
68
|
* - [[MemoryLocationConfig]]
|
|
71
69
|
*/
|
|
72
70
|
export interface LocationConfig extends Disposable {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
/** See: [[UrlConfig.port]] */ port: UrlConfig["port"];
|
|
72
|
+
/** See: [[UrlConfig.protocol]] */ protocol: UrlConfig["protocol"];
|
|
73
|
+
/** See: [[UrlConfig.host]] */ host: UrlConfig["host"];
|
|
74
|
+
/** See: [[UrlConfig.baseHref]] */ baseHref: UrlConfig["baseHref"];
|
|
75
|
+
/** See: [[UrlConfig.html5Mode]] */ html5Mode: UrlConfig["html5Mode"];
|
|
76
|
+
/** See: [[UrlConfig.hashPrefix]] */ hashPrefix: UrlConfig["hashPrefix"];
|
|
79
77
|
}
|
|
80
78
|
export { services };
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
* @packageDocumentation
|
|
49
49
|
*/
|
|
50
50
|
export declare class Glob {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
text: string;
|
|
52
|
+
glob: Array<string>;
|
|
53
|
+
regexp: RegExp;
|
|
54
|
+
/** Returns true if the string has glob-like characters in it */
|
|
55
|
+
static is(text: string): boolean;
|
|
56
|
+
/** Returns a glob from the string, or null if the string isn't Glob-like */
|
|
57
|
+
static fromString(text: string): Glob;
|
|
58
|
+
constructor(text: string);
|
|
59
|
+
matches(name: string): boolean;
|
|
60
60
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
-
import { Predicate } from
|
|
8
|
+
import { Predicate } from "./common";
|
|
9
9
|
/**
|
|
10
10
|
* Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.
|
|
11
11
|
*
|
|
@@ -95,12 +95,18 @@ export declare const not: (fn: Predicate<any>) => Predicate<any>;
|
|
|
95
95
|
* Given two functions that return truthy or falsey values, returns a function that returns truthy
|
|
96
96
|
* if both functions return truthy for the given arguments
|
|
97
97
|
*/
|
|
98
|
-
export declare function and(
|
|
98
|
+
export declare function and(
|
|
99
|
+
fn1: Predicate<any>,
|
|
100
|
+
fn2: Predicate<any>,
|
|
101
|
+
): Predicate<any>;
|
|
99
102
|
/**
|
|
100
103
|
* Given two functions that return truthy or falsey values, returns a function that returns truthy
|
|
101
104
|
* if at least one of the functions returns truthy for the given arguments
|
|
102
105
|
*/
|
|
103
|
-
export declare function or(
|
|
106
|
+
export declare function or(
|
|
107
|
+
fn1: Predicate<any>,
|
|
108
|
+
fn2: Predicate<any>,
|
|
109
|
+
): Predicate<any>;
|
|
104
110
|
/**
|
|
105
111
|
* Check if all the elements of an array match a predicate function
|
|
106
112
|
*
|
|
@@ -110,7 +116,9 @@ export declare function or(fn1: Predicate<any>, fn2: Predicate<any>): Predicate<
|
|
|
110
116
|
export declare const all: (fn1: Predicate<any>) => (arr: any[]) => boolean;
|
|
111
117
|
export declare const any: (fn1: Predicate<any>) => (arr: any[]) => boolean;
|
|
112
118
|
/** Given a class, returns a Predicate function that returns true if the object is of that class */
|
|
113
|
-
export declare const is: <T>(
|
|
119
|
+
export declare const is: <T>(
|
|
120
|
+
ctor: new (...args: any[]) => T,
|
|
121
|
+
) => (obj: any) => obj is T;
|
|
114
122
|
/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */
|
|
115
123
|
export declare const eq: (comp: any) => Predicate<any>;
|
|
116
124
|
/** Given a value, returns a function which returns the value */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
1
|
+
export * from "./common";
|
|
2
|
+
export * from "./coreservices";
|
|
3
|
+
export * from "./glob";
|
|
4
|
+
export * from "./hof";
|
|
5
|
+
export * from "./predicates";
|
|
6
|
+
export * from "./queue";
|
|
7
|
+
export * from "./strings";
|
|
8
|
+
export * from "./trace";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export declare class Queue<T> {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
private _items;
|
|
3
|
+
private _limit;
|
|
4
|
+
private _evictListeners;
|
|
5
|
+
onEvict: (val: (item: T) => void) => (item: T) => void;
|
|
6
|
+
constructor(_items?: T[], _limit?: number);
|
|
7
|
+
enqueue(item: T): T;
|
|
8
|
+
evict(): T;
|
|
9
|
+
dequeue(): T;
|
|
10
|
+
clear(): Array<T>;
|
|
11
|
+
size(): number;
|
|
12
|
+
remove(item: T): T;
|
|
13
|
+
peekTail(): T;
|
|
14
|
+
peekHead(): T;
|
|
15
15
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
-
import { IInjectable } from
|
|
8
|
+
import { IInjectable } from "./common";
|
|
9
9
|
/**
|
|
10
10
|
* Returns a string shortened to a maximum length
|
|
11
11
|
*
|
|
@@ -31,7 +31,9 @@ export declare function functionToString(fn: Function): any;
|
|
|
31
31
|
export declare function fnToString(fn: IInjectable): any;
|
|
32
32
|
export declare function stringify(o: any): string;
|
|
33
33
|
/** Returns a function that splits a string on a character or substring */
|
|
34
|
-
export declare const beforeAfterSubstr: (
|
|
34
|
+
export declare const beforeAfterSubstr: (
|
|
35
|
+
char: string,
|
|
36
|
+
) => (str: string) => string[];
|
|
35
37
|
export declare const hostRegex: RegExp;
|
|
36
38
|
export declare const stripLastPathElement: (str: string) => string;
|
|
37
39
|
export declare const splitHash: (str: string) => string[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Transition } from
|
|
2
|
-
import { ViewTuple } from
|
|
3
|
-
import { ActiveUIView, ViewConfig, ViewContext } from
|
|
4
|
-
import { Resolvable } from
|
|
5
|
-
import { PathNode } from
|
|
6
|
-
import { PolicyWhen } from
|
|
7
|
-
import { TransitionHook } from
|
|
8
|
-
import { HookResult } from
|
|
9
|
-
import { StateObject } from
|
|
1
|
+
import { Transition } from "../transition/transition";
|
|
2
|
+
import { ViewTuple } from "../view";
|
|
3
|
+
import { ActiveUIView, ViewConfig, ViewContext } from "../view/interface";
|
|
4
|
+
import { Resolvable } from "../resolve/resolvable";
|
|
5
|
+
import { PathNode } from "../path/pathNode";
|
|
6
|
+
import { PolicyWhen } from "../resolve/interface";
|
|
7
|
+
import { TransitionHook } from "../transition/transitionHook";
|
|
8
|
+
import { HookResult } from "../transition/interface";
|
|
9
|
+
import { StateObject } from "../state/stateObject";
|
|
10
10
|
/**
|
|
11
11
|
* Trace categories Enum
|
|
12
12
|
*
|
|
@@ -21,85 +21,97 @@ import { StateObject } from '../state/stateObject';
|
|
|
21
21
|
* `trace.enable(1)`
|
|
22
22
|
*/
|
|
23
23
|
declare enum Category {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
RESOLVE = 0,
|
|
25
|
+
TRANSITION = 1,
|
|
26
|
+
HOOK = 2,
|
|
27
|
+
UIVIEW = 3,
|
|
28
|
+
VIEWCONFIG = 4,
|
|
29
29
|
}
|
|
30
30
|
export { Category };
|
|
31
31
|
/**
|
|
32
32
|
* Prints UI-Router Transition trace information to the console.
|
|
33
33
|
*/
|
|
34
34
|
export declare class Trace {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
35
|
+
/** @internal */
|
|
36
|
+
approximateDigests: number;
|
|
37
|
+
/** @internal */
|
|
38
|
+
private _enabled;
|
|
39
|
+
/** @internal */
|
|
40
|
+
constructor();
|
|
41
|
+
/** @internal */
|
|
42
|
+
private _set;
|
|
43
|
+
/**
|
|
44
|
+
* Enables a trace [[Category]]
|
|
45
|
+
*
|
|
46
|
+
* ```js
|
|
47
|
+
* trace.enable("TRANSITION");
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @param categories categories to enable. If `categories` is omitted, all categories are enabled.
|
|
51
|
+
* Also takes strings (category name) or ordinal (category position)
|
|
52
|
+
*/
|
|
53
|
+
enable(...categories: (Category | string | number)[]): any;
|
|
54
|
+
/**
|
|
55
|
+
* Disables a trace [[Category]]
|
|
56
|
+
*
|
|
57
|
+
* ```js
|
|
58
|
+
* trace.disable("VIEWCONFIG");
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @param categories categories to disable. If `categories` is omitted, all categories are disabled.
|
|
62
|
+
* Also takes strings (category name) or ordinal (category position)
|
|
63
|
+
*/
|
|
64
|
+
disable(...categories: (Category | string | number)[]): any;
|
|
65
|
+
/**
|
|
66
|
+
* Retrieves the enabled stateus of a [[Category]]
|
|
67
|
+
*
|
|
68
|
+
* ```js
|
|
69
|
+
* trace.enabled("VIEWCONFIG"); // true or false
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @returns boolean true if the category is enabled
|
|
73
|
+
*/
|
|
74
|
+
enabled(category: Category | string | number): boolean;
|
|
75
|
+
/** @internal called by ui-router code */
|
|
76
|
+
traceTransitionStart(trans: Transition): void;
|
|
77
|
+
/** @internal called by ui-router code */
|
|
78
|
+
traceTransitionIgnored(trans: Transition): void;
|
|
79
|
+
/** @internal called by ui-router code */
|
|
80
|
+
traceHookInvocation(
|
|
81
|
+
step: TransitionHook,
|
|
82
|
+
trans: Transition,
|
|
83
|
+
options: any,
|
|
84
|
+
): void;
|
|
85
|
+
/** @internal called by ui-router code */
|
|
86
|
+
traceHookResult(
|
|
87
|
+
hookResult: HookResult,
|
|
88
|
+
trans: Transition,
|
|
89
|
+
transitionOptions: any,
|
|
90
|
+
): void;
|
|
91
|
+
/** @internal called by ui-router code */
|
|
92
|
+
traceResolvePath(
|
|
93
|
+
path: PathNode[],
|
|
94
|
+
when: PolicyWhen,
|
|
95
|
+
trans?: Transition,
|
|
96
|
+
): void;
|
|
97
|
+
/** @internal called by ui-router code */
|
|
98
|
+
traceResolvableResolved(resolvable: Resolvable, trans?: Transition): void;
|
|
99
|
+
/** @internal called by ui-router code */
|
|
100
|
+
traceError(reason: any, trans: Transition): void;
|
|
101
|
+
/** @internal called by ui-router code */
|
|
102
|
+
traceSuccess(finalState: StateObject, trans: Transition): void;
|
|
103
|
+
/** @internal called by ui-router code */
|
|
104
|
+
traceUIViewEvent(event: string, viewData: ActiveUIView, extra?: string): void;
|
|
105
|
+
/** @internal called by ui-router code */
|
|
106
|
+
traceUIViewConfigUpdated(viewData: ActiveUIView, context: ViewContext): void;
|
|
107
|
+
/** @internal called by ui-router code */
|
|
108
|
+
traceUIViewFill(viewData: ActiveUIView, html: string): void;
|
|
109
|
+
/** @internal called by ui-router code */
|
|
110
|
+
traceViewSync(pairs: ViewTuple[]): void;
|
|
111
|
+
/** @internal called by ui-router code */
|
|
112
|
+
traceViewServiceEvent(event: string, viewConfig: ViewConfig): void;
|
|
113
|
+
/** @internal called by ui-router code */
|
|
114
|
+
traceViewServiceUIViewEvent(event: string, viewData: ActiveUIView): void;
|
|
103
115
|
}
|
|
104
116
|
/**
|
|
105
117
|
* The [[Trace]] singleton
|