@angular-wave/angular.ts 0.0.65 → 0.0.66
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/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/animations/animate-js.js +6 -0
- package/src/animations/animation.js +1 -1
- package/src/core/compile/compile.js +13 -1
- package/src/core/controller/controller.js +5 -0
- package/src/core/di/injector.js +129 -252
- package/src/core/di/injector.md +3 -3
- package/src/core/di/injector.spec.js +30 -24
- package/src/core/di/internal-injector.js +233 -0
- package/src/core/filter/filter.js +5 -0
- package/src/core/sce/sce.js +6 -1
- package/src/loader.js +1 -1
- package/src/router/services.js +9 -4
- package/src/router/state/state-builder.js +4 -3
- package/src/router/state/state-registry.js +5 -0
- package/src/router/state/views.js +2 -1
- package/src/router/template-factory.js +5 -4
- package/src/services/http/http.js +12 -0
- package/src/types.js +9 -11
- package/types/animations/animate-js.d.ts +1 -1
- package/types/animations/animation.d.ts +1 -1
- package/types/core/compile/compile.d.ts +1 -1
- package/types/core/controller/controller.d.ts +1 -1
- package/types/core/di/injector.d.ts +13 -7
- package/types/core/di/internal-injector.d.ts +36 -0
- package/types/core/filter/filter.d.ts +1 -1
- package/types/core/sce/sce.d.ts +1 -1
- package/types/router/services.d.ts +8 -1
- package/types/router/state/state-registry.d.ts +2 -2
- package/types/router/template-factory.d.ts +2 -2
- package/types/services/http/http.d.ts +1 -1
- package/types/types.d.ts +7 -32
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
*
|
|
3
3
|
* @param {Array<String|Function>} modulesToLoad
|
|
4
4
|
* @param {boolean} [strictDi]
|
|
5
|
-
* @returns {
|
|
5
|
+
* @returns {InjectorService}
|
|
6
6
|
*/
|
|
7
|
-
export function createInjector(modulesToLoad: Array<string | Function>, strictDi?: boolean):
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
export function createInjector(modulesToLoad: Array<string | Function>, strictDi?: boolean): InjectorService;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param {any} fn
|
|
11
|
+
* @param {boolean} [strictDi]
|
|
12
|
+
* @param {String} [name]
|
|
13
|
+
* @returns {Array<string>}
|
|
14
|
+
*/
|
|
15
|
+
export function annotate(fn: any, strictDi?: boolean, name?: string): Array<string>;
|
|
16
|
+
/** @type {String[]} Used only for error reporting of circular dependencies*/
|
|
17
|
+
export const path: string[];
|
|
18
|
+
import { InjectorService } from "./internal-injector";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export class ProviderInjector {
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} cache
|
|
5
|
+
* @param {boolean} strictDi
|
|
6
|
+
*/
|
|
7
|
+
constructor(cache: any, strictDi: boolean);
|
|
8
|
+
cache: any;
|
|
9
|
+
strictDi: boolean;
|
|
10
|
+
path: any[];
|
|
11
|
+
providerCache: any;
|
|
12
|
+
modules: any;
|
|
13
|
+
factory(caller: any): void;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param {String} serviceName
|
|
17
|
+
* @returns {any}
|
|
18
|
+
*/
|
|
19
|
+
get(serviceName: string): any;
|
|
20
|
+
injectionArgs(fn: any, locals: any, serviceName: any): any[];
|
|
21
|
+
invoke(fn: any, self: any, locals: any, serviceName: any): any;
|
|
22
|
+
instantiate(Type: any, locals: any, serviceName: any): any;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param {String} name
|
|
26
|
+
* @returns {boolean}
|
|
27
|
+
*/
|
|
28
|
+
has(name: string): boolean;
|
|
29
|
+
}
|
|
30
|
+
export class InjectorService extends ProviderInjector {
|
|
31
|
+
constructor(cache: any, strictDi: any, providerInjector: any);
|
|
32
|
+
strictDi: any;
|
|
33
|
+
providerInjector: any;
|
|
34
|
+
factory(serviceName: any, caller: any): any;
|
|
35
|
+
loadNewModules(): void;
|
|
36
|
+
}
|
|
@@ -2,7 +2,7 @@ export function $FilterProvider($provide: any): void;
|
|
|
2
2
|
export class $FilterProvider {
|
|
3
3
|
constructor($provide: any);
|
|
4
4
|
register: (name: any, factory: any) => any;
|
|
5
|
-
$get: (string | (($injector:
|
|
5
|
+
$get: (string | (($injector: import("../../core/di/internal-injector").InjectorService) => (name: any) => any))[];
|
|
6
6
|
}
|
|
7
7
|
export namespace $FilterProvider {
|
|
8
8
|
let $inject: string[];
|
package/types/core/sce/sce.d.ts
CHANGED
|
@@ -150,7 +150,7 @@ export class $SceDelegateProvider {
|
|
|
150
150
|
* array (i.e. there is no `bannedResourceUrlList`.)
|
|
151
151
|
*/
|
|
152
152
|
bannedResourceUrlList: (value: any, ...args: any[]) => any[];
|
|
153
|
-
$get: (string | (($injector:
|
|
153
|
+
$get: (string | (($injector: import("../../core/di/internal-injector").InjectorService, $$sanitizeUri: any) => {
|
|
154
154
|
trustAs: (type: string, trustedValue: any) => any;
|
|
155
155
|
getTrusted: (type: string, maybeTrusted: any) => any;
|
|
156
156
|
valueOf: (maybeTrusted: any) => any;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {import("../core/di/internal-injector").InjectorService} $injector
|
|
4
|
+
* @param {*} $q
|
|
5
|
+
* @param {*} $stateRegistry
|
|
6
|
+
* @param {*} $urlService
|
|
7
|
+
*/
|
|
8
|
+
export function runBlock($injector: import("../core/di/internal-injector").InjectorService, $q: any, $stateRegistry: any, $urlService: any): void;
|
|
2
9
|
export namespace runBlock {
|
|
3
10
|
let $inject: string[];
|
|
4
11
|
}
|
|
@@ -9,12 +9,12 @@ export class StateRegistry {
|
|
|
9
9
|
states: {};
|
|
10
10
|
urlService: any;
|
|
11
11
|
urlServiceRules: any;
|
|
12
|
-
$injector:
|
|
12
|
+
$injector: import("../../core/di/internal-injector").InjectorService;
|
|
13
13
|
listeners: any[];
|
|
14
14
|
matcher: StateMatcher;
|
|
15
15
|
builder: StateBuilder;
|
|
16
16
|
stateQueue: StateQueueManager;
|
|
17
|
-
$get: (string | (($injector:
|
|
17
|
+
$get: (string | (($injector: import("../../core/di/internal-injector").InjectorService) => this))[];
|
|
18
18
|
/**
|
|
19
19
|
* This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,
|
|
20
20
|
* `onRetain` callback hooks on a [[Ng1StateDeclaration]].
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
export class TemplateFactory {
|
|
10
10
|
/** @type {boolean} */
|
|
11
11
|
_useHttp: boolean;
|
|
12
|
-
$get: (string | (($http: angular.IHttpService, $templateCache: angular.ITemplateCacheService, $templateRequest: angular.ITemplateRequestService, $q: angular.IQService, $injector:
|
|
12
|
+
$get: (string | (($http: angular.IHttpService, $templateCache: angular.ITemplateCacheService, $templateRequest: angular.ITemplateRequestService, $q: angular.IQService, $injector: import("../core/di/internal-injector").InjectorService) => this))[];
|
|
13
13
|
$templateRequest: angular.ITemplateRequestService;
|
|
14
14
|
$http: angular.IHttpService;
|
|
15
15
|
$templateCache: angular.ITemplateCacheService;
|
|
16
16
|
$q: angular.IQService;
|
|
17
|
-
$injector:
|
|
17
|
+
$injector: import("../core/di/internal-injector").InjectorService;
|
|
18
18
|
/**
|
|
19
19
|
* Forces the provider to use $http service directly
|
|
20
20
|
* @param {boolean} value
|
|
@@ -113,7 +113,7 @@ export class $HttpProvider {
|
|
|
113
113
|
useApplyAsync: (value?: boolean | undefined) => boolean | any;
|
|
114
114
|
interceptors: any[];
|
|
115
115
|
xsrfTrustedOrigins: any[];
|
|
116
|
-
$get: (string | (($browser: any, $httpBackend: any, $$cookieReader: any, $cacheFactory: any, $rootScope: any, $q: any, $injector:
|
|
116
|
+
$get: (string | (($browser: any, $httpBackend: any, $$cookieReader: any, $cacheFactory: any, $rootScope: any, $q: any, $injector: import("../../core/di/internal-injector").InjectorService, $sce: any) => {
|
|
117
117
|
(requestConfig: any): HttpPromise;
|
|
118
118
|
pendingRequests: any[];
|
|
119
119
|
/**
|
package/types/types.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
export type BootstrapConfig = any;
|
|
2
2
|
export type Injectable<T_1> = Function | Array<string | Function>;
|
|
3
|
+
export type Annotated = {
|
|
4
|
+
/**
|
|
5
|
+
* *
|
|
6
|
+
*/
|
|
7
|
+
$inject: Array<string>;
|
|
8
|
+
};
|
|
9
|
+
export type AnnotatedFunction = Function & Annotated & Array<any>;
|
|
3
10
|
export type ComponentOptions = any;
|
|
4
11
|
export type ControllerConstructor = Function;
|
|
5
12
|
export type OnChangesObject = any;
|
|
@@ -409,35 +416,3 @@ export type ModelValidators = {
|
|
|
409
416
|
export type AsyncModelValidators = {
|
|
410
417
|
[x: string]: (arg0: any, arg1: any) => Promise<any>;
|
|
411
418
|
};
|
|
412
|
-
export type InjectorService = {
|
|
413
|
-
/**
|
|
414
|
-
* - Annotate a function or an array of inline annotations.
|
|
415
|
-
*/
|
|
416
|
-
annotate: (arg0: Function, arg1: boolean | undefined) => string[];
|
|
417
|
-
/**
|
|
418
|
-
* - Get a service by name.
|
|
419
|
-
*/
|
|
420
|
-
get: (arg0: string, arg1: string | undefined) => any;
|
|
421
|
-
/**
|
|
422
|
-
* - Instantiate a type constructor with optional locals.
|
|
423
|
-
*/
|
|
424
|
-
instantiate: (arg0: Function, arg1: any | null) => any;
|
|
425
|
-
/**
|
|
426
|
-
* - Invoke a function with optional context and locals.
|
|
427
|
-
*/
|
|
428
|
-
invoke: (arg0: Injectable<Function | ((...args: any[]) => any)>, arg1: any | undefined, arg2: any | undefined) => any;
|
|
429
|
-
/**
|
|
430
|
-
* - Add and load new modules to the injector.
|
|
431
|
-
*/
|
|
432
|
-
loadNewModules?: (arg0: Array<Module | string | Injectable<(...args: any[]) => void>>) => void;
|
|
433
|
-
/**
|
|
434
|
-
* - A map of all the modules loaded into the injector.
|
|
435
|
-
*/
|
|
436
|
-
modules?: {
|
|
437
|
-
[x: string]: Module;
|
|
438
|
-
};
|
|
439
|
-
/**
|
|
440
|
-
* - Indicates if strict dependency injection is enforced.
|
|
441
|
-
*/
|
|
442
|
-
strictDi?: boolean;
|
|
443
|
-
};
|