@angular-wave/angular.ts 0.9.2 → 0.9.4
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 -19
- package/@types/animations/animate.d.ts +2 -2
- package/@types/animations/animation.d.ts +1 -1
- package/@types/core/compile/attributes.d.ts +1 -1
- package/@types/core/compile/compile.d.ts +2 -2
- package/@types/core/controller/controller.d.ts +1 -1
- package/@types/core/controller/interface.d.ts +6 -0
- package/@types/core/di/ng-module.d.ts +27 -26
- package/@types/core/filter/filter.d.ts +5 -5
- package/@types/core/interpolate/interface.d.ts +13 -0
- package/@types/core/interpolate/interpolate.d.ts +1 -13
- package/@types/core/scope/scope.d.ts +4 -1
- package/@types/directive/http/http.d.ts +16 -16
- package/@types/directive/http/interface.d.ts +27 -0
- package/@types/directive/include/include.d.ts +4 -4
- package/@types/directive/inject/inject.d.ts +12 -0
- package/@types/directive/model/model.d.ts +1 -1
- package/@types/directive/script/script.d.ts +2 -2
- package/@types/directive/setter/setter.d.ts +4 -4
- package/@types/filters/filter.d.ts +2 -2
- package/@types/filters/filters.d.ts +2 -2
- package/@types/filters/interface.d.ts +8 -0
- package/@types/filters/limit-to.d.ts +2 -2
- package/@types/filters/order-by.d.ts +2 -2
- package/@types/index.d.ts +84 -1
- package/@types/interface.d.ts +105 -82
- package/@types/router/state/interface.d.ts +8 -8
- package/@types/router/state-filters.d.ts +4 -4
- package/@types/router/template-factory.d.ts +6 -6
- package/@types/router/transition/hook-builder.d.ts +5 -2
- package/@types/router/transition/hook-registry.d.ts +11 -2
- package/@types/router/transition/transition-service.d.ts +6 -2
- package/@types/router/transition/transition.d.ts +2 -2
- package/@types/router/view/view.d.ts +1 -8
- package/@types/router/view-scroll.d.ts +4 -2
- package/@types/services/{anchor-scroll.d.ts → anchor-scroll/anchor-scroll.d.ts} +2 -2
- package/@types/services/exception/exception-handler.d.ts +2 -2
- package/@types/services/exception/interface.d.ts +1 -1
- package/@types/services/http/http.d.ts +40 -2
- package/@types/services/http/interface.d.ts +11 -0
- package/@types/services/location/location.d.ts +1 -4
- package/@types/services/sce/sce.d.ts +3 -4
- package/@types/services/template-cache/template-cache.d.ts +4 -4
- package/@types/services/template-request/interface.d.ts +22 -0
- package/@types/services/{template-request.d.ts → template-request/template-request.d.ts} +4 -7
- package/@types/shared/common.d.ts +8 -69
- package/@types/shared/hof.d.ts +7 -7
- package/dist/angular-ts.esm.js +509 -570
- package/dist/angular-ts.umd.js +509 -570
- package/dist/angular-ts.umd.min.js +1 -1
- package/{src/filters → docs/content/docs/filter}/filter.md +18 -9
- package/{src/filters → docs/content/docs/filter}/json.md +6 -3
- package/docs/content/docs/filter/limit-to.md +30 -0
- package/docs/content/docs/filter/order-by.md +123 -0
- package/docs/content/docs/provider/sceProvider.md +194 -0
- package/docs/content/docs/provider/templateRequestProvider.md +5 -0
- package/docs/content/docs/service/compile.md +5 -0
- package/docs/content/docs/service/controller.md +5 -0
- package/docs/content/docs/service/http.md +161 -0
- package/docs/content/docs/service/interpolation.md +5 -0
- package/docs/content/docs/service/log.md +1 -1
- package/docs/content/docs/service/parse.md +5 -0
- package/docs/content/docs/service/rootElement.md +5 -0
- package/docs/content/docs/service/rootScope.md +5 -0
- package/docs/content/docs/service/sce.md +194 -0
- package/docs/content/docs/service/templateRequest.md +5 -0
- package/docs/content/docs/values/_index.md +4 -0
- package/docs/content/docs/values/document.md +29 -0
- package/docs/content/docs/values/window.md +29 -0
- package/docs/layouts/shortcodes/version.html +1 -1
- package/docs/static/examples/document/document.html +3 -0
- package/docs/static/examples/i18n/i18n.html +77 -0
- package/docs/static/examples/window/window.html +4 -0
- package/docs/static/typedoc/assets/hierarchy.js +1 -1
- package/docs/static/typedoc/assets/highlight.css +0 -49
- package/docs/static/typedoc/assets/navigation.js +1 -1
- package/docs/static/typedoc/assets/search.js +1 -1
- package/docs/static/typedoc/classes/PubSubProvider.html +3 -2
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +1 -1
- package/docs/static/typedoc/hierarchy.html +1 -1
- package/docs/static/typedoc/index.html +1 -1
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +1 -1
- package/docs/static/typedoc/interfaces/RequestConfig.html +1 -1
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +1 -1
- package/docs/static/typedoc/interfaces/ServiceProvider.html +3 -3
- package/docs/static/typedoc/types/HttpParamSerializer.html +2 -0
- package/docs/static/typedoc/types/{Expression.html → HttpParams.html} +1 -5
- package/legacy.d.ts +0 -921
- package/package.json +1 -1
- package/src/angular.js +2 -9
- package/src/animations/animate.js +1 -1
- package/src/animations/animation.js +7 -7
- package/src/core/compile/compile.js +3 -2
- package/src/core/controller/controller.js +10 -6
- package/src/core/controller/interface.ts +6 -0
- package/src/core/di/injector.js +1 -1
- package/src/core/di/internal-injector.js +2 -0
- package/src/core/di/ng-module.js +16 -13
- package/src/core/filter/filter.js +3 -3
- package/src/core/interpolate/interface.ts +14 -0
- package/src/core/interpolate/interpolate.js +7 -5
- package/src/core/scope/scope.js +4 -1
- package/src/directive/http/delete.spec.js +5 -8
- package/src/directive/http/http.js +16 -16
- package/src/directive/http/interface.ts +36 -0
- package/src/directive/http/put.spec.js +5 -8
- package/src/directive/include/include.js +2 -2
- package/src/{services/http-backend/http-backend.html → directive/inject/inject.html} +1 -4
- package/src/directive/inject/inject.js +35 -0
- package/src/directive/inject/inject.spec.js +108 -0
- package/src/{services/http-backend/http-backend.test.js → directive/inject/inject.test.js} +1 -1
- package/src/directive/script/script.js +1 -1
- package/src/directive/setter/setter.js +2 -2
- package/src/filters/filter.js +1 -1
- package/src/filters/filters.js +1 -1
- package/src/filters/interface.ts +9 -0
- package/src/filters/limit-to.js +1 -1
- package/src/filters/order-by.js +1 -1
- package/src/index.ts +96 -0
- package/src/injection-tokens.js +4 -1
- package/src/interface.ts +102 -93
- package/src/ng.js +6 -4
- package/src/ng.spec.js +12 -0
- package/src/router/directives/state-directives.js +1 -1
- package/src/router/directives/view-directive.spec.js +19 -35
- package/src/router/state/interface.ts +8 -8
- package/src/router/state/state-builder.js +4 -4
- package/src/router/state/state-registry.js +7 -2
- package/src/router/state/state-service.js +2 -14
- package/src/router/state-filters.js +2 -2
- package/src/router/template-factory.js +3 -3
- package/src/router/template-factory.spec.js +10 -19
- package/src/router/transition/hook-builder.js +5 -1
- package/src/router/transition/hook-registry.js +12 -3
- package/src/router/transition/transition-service.js +4 -9
- package/src/router/transition/transition.js +3 -2
- package/src/router/url/url-service.js +2 -2
- package/src/router/view/view.js +3 -15
- package/src/router/view-scroll.js +2 -2
- package/src/services/{anchor-scroll.js → anchor-scroll/anchor-scroll.js} +4 -4
- package/src/services/exception/exception-handler.js +1 -1
- package/src/services/exception/interface.ts +1 -1
- package/src/services/http/http.js +200 -13
- package/src/services/http/http.spec.js +388 -9
- package/src/services/http/interface.ts +13 -0
- package/src/services/location/location.js +1 -1
- package/src/services/pubsub/pubsub.js +0 -1
- package/src/services/sce/sce.js +18 -13
- package/src/services/template-cache/template-cache.js +2 -2
- package/src/services/template-request/interface.ts +23 -0
- package/src/services/{template-request.js → template-request/template-request.js} +6 -6
- package/src/shared/common.js +7 -80
- package/src/shared/hof.js +23 -17
- package/typedoc.json +1 -1
- package/@types/services/cookie-reader.d.ts +0 -4
- package/@types/services/http-backend/http-backend.d.ts +0 -58
- package/@types/services/template-cache/interface.d.ts +0 -10
- package/docs/static/typedoc/interfaces/ChangesObject.html +0 -6
- package/docs/static/typedoc/interfaces/ComponentOptions.html +0 -16
- package/docs/static/typedoc/interfaces/Controller.html +0 -12
- package/docs/static/typedoc/interfaces/Directive.html +0 -37
- package/docs/static/typedoc/interfaces/DirectivePrePost.html +0 -4
- package/docs/static/typedoc/interfaces/NgModelController.html +0 -30
- package/docs/static/typedoc/interfaces/NgModelOptions.html +0 -16
- package/docs/static/typedoc/interfaces/Provider.html +0 -34
- package/docs/static/typedoc/interfaces/TemplateCache.html +0 -7
- package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +0 -8
- package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +0 -1
- package/docs/static/typedoc/types/AnnotatedFactory.html +0 -8
- package/docs/static/typedoc/types/CloneAttachFunction.html +0 -2
- package/docs/static/typedoc/types/ControllerConstructor.html +0 -2
- package/docs/static/typedoc/types/DirectiveCompileFn.html +0 -2
- package/docs/static/typedoc/types/DirectiveController.html +0 -2
- package/docs/static/typedoc/types/DirectiveFactory.html +0 -1
- package/docs/static/typedoc/types/DirectiveFactoryFn.html +0 -1
- package/docs/static/typedoc/types/DirectiveLinkFn.html +0 -2
- package/docs/static/typedoc/types/ExpandoStore.html +0 -2
- package/docs/static/typedoc/types/FilterFactory.html +0 -2
- package/docs/static/typedoc/types/FilterFn.html +0 -2
- package/docs/static/typedoc/types/Injectable.html +0 -4
- package/docs/static/typedoc/types/InjectableClass.html +0 -1
- package/docs/static/typedoc/types/InjectableFactory.html +0 -1
- package/docs/static/typedoc/types/OnChangesObject.html +0 -2
- package/docs/static/typedoc/types/SwapModeType.html +0 -2
- package/docs/static/typedoc/types/TController.html +0 -2
- package/docs/static/typedoc/variables/SwapMode.html +0 -11
- package/src/filters/limit-to.md +0 -19
- package/src/filters/order-by.md +0 -83
- package/src/router/state/README.md +0 -21
- package/src/services/cookie-reader.js +0 -48
- package/src/services/http/http.md +0 -413
- package/src/services/http-backend/http-backend.js +0 -158
- package/src/services/http-backend/http-backend.spec.js +0 -389
- package/src/services/sce/sce.md +0 -300
- package/src/services/template-cache/interface.ts +0 -10
- /package/src/services/{anchor-scroll.html → anchor-scroll/anchor-scroll.html} +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Provides an instance of a cache that can be used to store and retrieve template content.
|
|
3
3
|
*/
|
|
4
4
|
export class TemplateCacheProvider {
|
|
5
|
-
/** @type {
|
|
6
|
-
cache:
|
|
5
|
+
/** @type {ng.TemplateCacheService} */
|
|
6
|
+
cache: ng.TemplateCacheService;
|
|
7
7
|
/**
|
|
8
|
-
* @returns {
|
|
8
|
+
* @returns {ng.TemplateCacheService}
|
|
9
9
|
*/
|
|
10
|
-
$get():
|
|
10
|
+
$get(): ng.TemplateCacheService;
|
|
11
11
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface TemplateRequestService {
|
|
2
|
+
/**
|
|
3
|
+
* Downloads a template using $http and, upon success, stores the
|
|
4
|
+
* contents inside of $templateCache.
|
|
5
|
+
*
|
|
6
|
+
* If the HTTP request fails or the response data of the HTTP request is
|
|
7
|
+
* empty then a $compile error will be thrown (unless
|
|
8
|
+
* {ignoreRequestError} is set to true).
|
|
9
|
+
*
|
|
10
|
+
* @param tpl The template URL.
|
|
11
|
+
* @param ignoreRequestError Whether or not to ignore the exception
|
|
12
|
+
* when the request fails or the template is
|
|
13
|
+
* empty.
|
|
14
|
+
*
|
|
15
|
+
* @return A promise whose value is the template content.
|
|
16
|
+
*/
|
|
17
|
+
(tpl: string, ignoreRequestError?: boolean): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* total amount of pending template requests being downloaded.
|
|
20
|
+
*/
|
|
21
|
+
totalPendingRequests: number;
|
|
22
|
+
}
|
|
@@ -43,13 +43,10 @@ export class TemplateRequestProvider {
|
|
|
43
43
|
$get: (
|
|
44
44
|
| string
|
|
45
45
|
| ((
|
|
46
|
-
$exceptionHandler:
|
|
47
|
-
$templateCache:
|
|
48
|
-
$http:
|
|
46
|
+
$exceptionHandler: ng.ExceptionHandlerService,
|
|
47
|
+
$templateCache: ng.TemplateCacheService,
|
|
48
|
+
$http: ng.HttpService,
|
|
49
49
|
$sce: any,
|
|
50
|
-
) =>
|
|
51
|
-
(tpl: any, ignoreRequestError: any): any;
|
|
52
|
-
totalPendingRequests: number;
|
|
53
|
-
})
|
|
50
|
+
) => ng.TemplateRequestService)
|
|
54
51
|
)[];
|
|
55
52
|
}
|
|
@@ -1,67 +1,4 @@
|
|
|
1
1
|
export function equals(o1: any, o2: any): any;
|
|
2
|
-
/**
|
|
3
|
-
* Builds proxy functions on the `to` object which pass through to the `from` object.
|
|
4
|
-
*
|
|
5
|
-
* For each key in `fnNames`, creates a proxy function on the `to` object.
|
|
6
|
-
* The proxy function calls the real function on the `from` object.
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* #### Example:
|
|
10
|
-
* This example creates an new class instance whose functions are prebound to the new'd object.
|
|
11
|
-
* ```js
|
|
12
|
-
* class Foo {
|
|
13
|
-
* constructor(data) {
|
|
14
|
-
* // Binds all functions from Foo.prototype to 'this',
|
|
15
|
-
* // then copies them to 'this'
|
|
16
|
-
* bindFunctions(Foo.prototype, this, this);
|
|
17
|
-
* this.data = data;
|
|
18
|
-
* }
|
|
19
|
-
*
|
|
20
|
-
* log() {
|
|
21
|
-
* console.log(this.data);
|
|
22
|
-
* }
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* let myFoo = new Foo([1,2,3]);
|
|
26
|
-
* var logit = myFoo.log;
|
|
27
|
-
* logit(); // logs [1, 2, 3] from the myFoo 'this' instance
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* #### Example:
|
|
31
|
-
* This example creates a bound version of a service function, and copies it to another object
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* var SomeService = {
|
|
35
|
-
* this.data = [3, 4, 5];
|
|
36
|
-
* this.log = function() {
|
|
37
|
-
* console.log(this.data);
|
|
38
|
-
* }
|
|
39
|
-
* }
|
|
40
|
-
*
|
|
41
|
-
* // Constructor fn
|
|
42
|
-
* function OtherThing() {
|
|
43
|
-
* // Binds all functions from SomeService to SomeService,
|
|
44
|
-
* // then copies them to 'this'
|
|
45
|
-
* bindFunctions(SomeService, this, SomeService);
|
|
46
|
-
* }
|
|
47
|
-
*
|
|
48
|
-
* let myOtherThing = new OtherThing();
|
|
49
|
-
* myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @param source A function that returns the source object which contains the original functions to be bound
|
|
53
|
-
* @param target A function that returns the target object which will receive the bound functions
|
|
54
|
-
* @param bind A function that returns the object which the functions will be bound to
|
|
55
|
-
* @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)
|
|
56
|
-
* @param latebind If true, the binding of the function is delayed until the first time it's invoked
|
|
57
|
-
*/
|
|
58
|
-
export function createProxyFunctions(
|
|
59
|
-
source: any,
|
|
60
|
-
target: any,
|
|
61
|
-
bind: any,
|
|
62
|
-
fnNames: any,
|
|
63
|
-
latebind?: boolean,
|
|
64
|
-
): any;
|
|
65
2
|
/**
|
|
66
3
|
* prototypal inheritance helper.
|
|
67
4
|
* Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
|
|
@@ -75,7 +12,14 @@ export function createProxyFunctions(
|
|
|
75
12
|
* @returns {Object} - A new object with `parent` as its prototype and properties from `extra`.
|
|
76
13
|
*/
|
|
77
14
|
export function inherit(parent: any, extra?: any): any;
|
|
78
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Given an array, and an item, if the item is found in the array, it removes it (in-place).
|
|
17
|
+
* The same array is returned
|
|
18
|
+
* @param {Array} array
|
|
19
|
+
* @param {any} obj
|
|
20
|
+
* @returns {Array}
|
|
21
|
+
*/
|
|
22
|
+
export function removeFrom(array: any[], obj: any): any[];
|
|
79
23
|
/**
|
|
80
24
|
* Applies a set of defaults to an options object. The options object is filtered
|
|
81
25
|
* to only those properties of the objects in the defaultsList.
|
|
@@ -177,11 +121,6 @@ export function tail<T>(arr: T[]): T | undefined;
|
|
|
177
121
|
* shallow copy from src to dest
|
|
178
122
|
*/
|
|
179
123
|
export function copy(src: any, dest: any): any;
|
|
180
|
-
/**
|
|
181
|
-
* Given an array, and an item, if the item is found in the array, it removes it (in-place).
|
|
182
|
-
* The same array is returned
|
|
183
|
-
*/
|
|
184
|
-
export const removeFrom: any;
|
|
185
124
|
export function allTrueR(memo: any, elem: any): any;
|
|
186
125
|
export function anyTrueR(memo: any, elem: any): any;
|
|
187
126
|
export function unnestR(memo: any, elem: any): any;
|
package/@types/shared/hof.d.ts
CHANGED
|
@@ -48,12 +48,13 @@ export function curry(fn: any): any | (() => any | any);
|
|
|
48
48
|
*/
|
|
49
49
|
export function compose(...args: any[]): () => any;
|
|
50
50
|
/**
|
|
51
|
-
* Given a
|
|
52
|
-
* given
|
|
53
|
-
*
|
|
54
|
-
*
|
|
51
|
+
* Given a class constructor, returns a predicate function that checks
|
|
52
|
+
* whether a given object is an instance of that class.
|
|
53
|
+
*
|
|
54
|
+
* @param {new (...args: any[]) => any} ctor - The class constructor to check against.
|
|
55
|
+
* @returns {(obj: any) => boolean} A predicate function that returns true if the object is of the given class.
|
|
55
56
|
*/
|
|
56
|
-
export function
|
|
57
|
+
export function is(ctor: new (...args: any[]) => any): (obj: any) => boolean;
|
|
57
58
|
/**
|
|
58
59
|
* Sorta like Pattern Matching (a functional programming conditional construct)
|
|
59
60
|
*
|
|
@@ -103,6 +104,5 @@ export function pattern(struct: any): (arg0: any) => any;
|
|
|
103
104
|
* getName(obj) === true
|
|
104
105
|
*/
|
|
105
106
|
export const propEq: any;
|
|
106
|
-
export function parse(
|
|
107
|
-
export function is(ctor: any): (obj: any) => boolean;
|
|
107
|
+
export function parse(path: any): (obj: any) => any;
|
|
108
108
|
export function val(v: any): () => any;
|