@angular-wave/angular.ts 0.4.4 → 0.4.6
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 -0
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -12
- package/index.html +3 -74
- package/package.json +1 -1
- package/src/angular.spec.js +5 -0
- package/src/animations/animate-css.js +13 -5
- package/src/animations/animate-queue.js +21 -22
- package/src/animations/animate-runner.js +8 -4
- package/src/animations/animate.md +1 -1
- package/src/animations/animate.spec.js +21 -0
- package/src/animations/animation.js +1 -1
- package/src/binding.spec.js +1 -0
- package/src/core/compile/compile.js +25 -27
- package/src/core/compile/compile.spec.js +266 -17
- package/src/core/controller/controller.js +0 -2
- package/src/core/di/injector.md +1 -1
- package/src/core/di/injector.spec.js +2 -0
- package/src/core/di/internal-injector.js +1 -2
- package/src/core/interpolate/interpolate.js +12 -28
- package/src/core/interpolate/interpolate.spec.js +16 -70
- package/src/core/interval/interval-factory.js +50 -0
- package/src/core/interval/interval.html +18 -0
- package/src/core/interval/interval.js +77 -0
- package/src/core/interval/interval.md +123 -0
- package/src/core/interval/interval.spec.js +280 -0
- package/src/core/interval/interval.test.js +1 -1
- package/src/core/location/location.js +53 -59
- package/src/core/location/location.spec.js +27 -27
- package/src/core/on.spec.js +7 -0
- package/src/core/parse/interpreter.js +7 -10
- package/src/core/parse/parse.js +5 -26
- package/src/core/parse/parse.spec.js +91 -95
- package/src/core/prop.spec.js +60 -4
- package/src/core/q/q.html +18 -0
- package/src/core/q/q.js +472 -0
- package/src/core/q/q.md +211 -0
- package/src/core/q/q.spec.js +2748 -0
- package/src/core/q/q.test.js +12 -0
- package/src/core/sce/sce.spec.js +8 -0
- package/src/core/{model/model.html → scope/scope.html} +1 -1
- package/src/core/scope/scope.js +16 -15
- package/src/core/scope/scope.spec.js +1959 -24
- package/src/core/scope/scope.test.js +12 -0
- package/src/core/timeout/timeout.html +18 -0
- package/src/core/timeout/timeout.js +109 -0
- package/src/core/timeout/timeout.spec.js +354 -0
- package/src/core/timeout/timout.test.js +12 -0
- package/src/core/url-utils/url-utils.spec.js +1 -1
- package/src/directive/aria/aria.js +6 -3
- package/src/directive/aria/aria.spec.js +87 -0
- package/src/directive/attrs/attrs.spec.js +5 -0
- package/src/directive/attrs/boolean.spec.js +15 -0
- package/src/directive/attrs/element-style.spec.js +8 -0
- package/src/directive/attrs/src.spec.js +7 -0
- package/src/directive/bind/bind.spec.js +33 -0
- package/src/directive/bind/bing-html.spec.js +3 -0
- package/src/directive/class/class.js +3 -3
- package/src/directive/class/class.spec.js +75 -9
- package/src/directive/controller/controller.spec.js +13 -0
- package/src/directive/events/click.spec.js +3 -0
- package/src/directive/events/event.spec.js +6 -0
- package/src/directive/events/events.html +1 -0
- package/src/directive/form/form.js +3 -2
- package/src/directive/form/form.spec.js +65 -0
- package/src/directive/if/if.spec.js +4 -0
- package/src/directive/include/include.spec.js +59 -8
- package/src/directive/init/init.js +2 -6
- package/src/directive/init/init.spec.js +2 -0
- package/src/directive/input/input.spec.js +136 -0
- package/src/directive/messages/messages.spec.js +35 -4
- package/src/directive/model/model.js +25 -18
- package/src/directive/model/model.spec.js +49 -2
- package/src/directive/model-options/model-options.spec.js +6 -0
- package/src/directive/non-bindable/non-bindable.spec.js +1 -0
- package/src/directive/observe/observe.js +5 -1
- package/src/directive/observe/observe.spec.js +22 -0
- package/src/directive/observe/test.html +3 -11
- package/src/directive/options/options.spec.js +34 -0
- package/src/directive/ref/href.spec.js +15 -0
- package/src/directive/repeat/repeat.spec.js +135 -8
- package/src/directive/script/script.spec.js +2 -0
- package/src/directive/select/select.js +3 -3
- package/src/directive/select/select.spec.js +96 -0
- package/src/directive/show-hide/show-hide.js +2 -2
- package/src/directive/show-hide/show-hide.spec.js +19 -8
- package/src/directive/style/style.spec.js +7 -0
- package/src/directive/switch/switch.spec.js +5 -5
- package/src/directive/validators/validators.spec.js +1 -0
- package/src/loader.js +1 -0
- package/src/public.js +10 -2
- package/src/router/common/coreservices.js +2 -0
- package/src/router/directives/state-directives.js +14 -6
- package/src/router/directives/state-directives.spec.js +83 -0
- package/src/router/directives/view-directive.js +13 -4
- package/src/router/directives/view-directive.spec.js +71 -25
- package/src/router/hooks/lazy-load.js +2 -2
- package/src/router/hooks/views.js +5 -3
- package/src/router/resolve/resolvable.js +6 -3
- package/src/router/resolve/resolve-context.js +2 -2
- package/src/router/state/state-service.js +4 -4
- package/src/router/state/state.spec.js +5 -2
- package/src/router/state/state.test.js +1 -1
- package/src/router/state/views.js +10 -7
- package/src/router/template-factory.js +6 -3
- package/src/router/template-factory.spec.js +4 -0
- package/src/router/transition/transition-hook.js +1 -1
- package/src/router/transition/transition.js +1 -1
- package/src/router/view-hook.spec.js +2 -2
- package/src/router/view-scroll.js +6 -4
- package/src/services/browser.js +5 -8
- package/src/services/http/http.js +9 -6
- package/src/services/http/http.spec.js +31 -30
- package/src/services/http/template-request.spec.js +10 -0
- package/src/services/http-backend/http-backend.spec.js +3 -3
- package/src/services/template-request.js +4 -2
- package/src/shared/common.js +2 -1
- package/types/core/location/location.d.ts +37 -34
- package/types/core/parse/parse.d.ts +0 -26
- package/types/core/scope/scope.d.ts +11 -11
- package/src/core/model/model.js +0 -944
- package/src/core/model/model.spec.js +0 -3012
- package/types/core/model/model.d.ts +0 -204
|
@@ -4,19 +4,10 @@
|
|
|
4
4
|
* @property {boolean} constant - Indicates if the expression is constant.
|
|
5
5
|
* @property {boolean} [isPure]
|
|
6
6
|
* @property {boolean} oneTime
|
|
7
|
-
* @property {import("./interpreter.js").DecoratedASTNode} decoratedNode
|
|
8
7
|
* @property {function(import('../scope/scope').Scope, import('../scope/scope').WatchListener, boolean, CompiledExpression, string | ((scope: import('../scope/scope').Scope) => any) | CompiledExpression): any} [$$watchDelegate]
|
|
9
8
|
* @property {any[]|Function} inputs
|
|
10
9
|
* @property {function(any, any): any} [assign] - Assigns a value to a context. If value is not provided,
|
|
11
10
|
*/
|
|
12
|
-
/**
|
|
13
|
-
* @typedef {Object} CompiledExpressionHandlerMap
|
|
14
|
-
* @property {boolean} literal - Indicates if the expression is a literal.
|
|
15
|
-
* @property {boolean} constant - Indicates if the expression is constant.
|
|
16
|
-
* @property {boolean} [isPure]
|
|
17
|
-
* @property {boolean} oneTime
|
|
18
|
-
* @property {Map<string, Function>} keyMap - property keys to observe
|
|
19
|
-
*/
|
|
20
11
|
/**
|
|
21
12
|
* @typedef {Function} CompiledExpressionFunction
|
|
22
13
|
* @param {import('../scope/scope').Scope} context - An object against which any expressions embedded in the strings are evaluated against (typically a scope object).
|
|
@@ -70,7 +61,6 @@ export type CompiledExpressionProps = {
|
|
|
70
61
|
constant: boolean;
|
|
71
62
|
isPure?: boolean;
|
|
72
63
|
oneTime: boolean;
|
|
73
|
-
decoratedNode: import("./interpreter.js").DecoratedASTNode;
|
|
74
64
|
$$watchDelegate?: (arg0: import("../scope/scope").Scope, arg1: import("../scope/scope").WatchListener, arg2: boolean, arg3: CompiledExpression, arg4: string | ((scope: import("../scope/scope").Scope) => any) | CompiledExpression) => any;
|
|
75
65
|
inputs: any[] | Function;
|
|
76
66
|
/**
|
|
@@ -78,22 +68,6 @@ export type CompiledExpressionProps = {
|
|
|
78
68
|
*/
|
|
79
69
|
assign?: (arg0: any, arg1: any) => any;
|
|
80
70
|
};
|
|
81
|
-
export type CompiledExpressionHandlerMap = {
|
|
82
|
-
/**
|
|
83
|
-
* - Indicates if the expression is a literal.
|
|
84
|
-
*/
|
|
85
|
-
literal: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* - Indicates if the expression is constant.
|
|
88
|
-
*/
|
|
89
|
-
constant: boolean;
|
|
90
|
-
isPure?: boolean;
|
|
91
|
-
oneTime: boolean;
|
|
92
|
-
/**
|
|
93
|
-
* - property keys to observe
|
|
94
|
-
*/
|
|
95
|
-
keyMap: Map<string, Function>;
|
|
96
|
-
};
|
|
97
71
|
export type CompiledExpressionFunction = Function;
|
|
98
72
|
export type CompiledExpression = CompiledExpressionFunction & CompiledExpressionProps;
|
|
99
73
|
export type ParseService = (arg0: CompiledExpression | string | ((arg0: import("../scope/scope").Scope) => any), arg1: ((arg0: any, arg1: import("../scope/scope").Scope, arg2: any) => any) | undefined, arg2: boolean | undefined) => CompiledExpression;
|
|
@@ -56,7 +56,7 @@ export type TTL = number;
|
|
|
56
56
|
export const TTL: TTL;
|
|
57
57
|
/** @type {AsyncQueueTask[]} */
|
|
58
58
|
export const $$asyncQueue: AsyncQueueTask[];
|
|
59
|
-
export const
|
|
59
|
+
export const $$postDigestQueue: any[];
|
|
60
60
|
/**
|
|
61
61
|
* @type {Function[]}
|
|
62
62
|
*/
|
|
@@ -240,16 +240,16 @@ export class Scope {
|
|
|
240
240
|
});
|
|
241
241
|
expect(scope.counter).toEqual(0);
|
|
242
242
|
|
|
243
|
-
;
|
|
243
|
+
scope.$digest();
|
|
244
244
|
// the listener is always called during the first $digest loop after it was registered
|
|
245
245
|
expect(scope.counter).toEqual(1);
|
|
246
246
|
|
|
247
|
-
;
|
|
247
|
+
scope.$digest();
|
|
248
248
|
// but now it will not be called unless the value changes
|
|
249
249
|
expect(scope.counter).toEqual(1);
|
|
250
250
|
|
|
251
251
|
scope.name = 'adam';
|
|
252
|
-
;
|
|
252
|
+
scope.$digest();
|
|
253
253
|
expect(scope.counter).toEqual(2);
|
|
254
254
|
|
|
255
255
|
// Using a function as a watchExpression
|
|
@@ -271,12 +271,12 @@ export class Scope {
|
|
|
271
271
|
expect(scope.foodCounter).toEqual(0);
|
|
272
272
|
|
|
273
273
|
// Run the digest but since food has not changed count will still be zero
|
|
274
|
-
;
|
|
274
|
+
scope.$digest();
|
|
275
275
|
expect(scope.foodCounter).toEqual(0);
|
|
276
276
|
|
|
277
277
|
// Update food and run digest. Now the counter will increment
|
|
278
278
|
food = 'cheeseburger';
|
|
279
|
-
;
|
|
279
|
+
scope.$digest();
|
|
280
280
|
expect(scope.foodCounter).toEqual(1);
|
|
281
281
|
|
|
282
282
|
* ```
|
|
@@ -378,16 +378,16 @@ export class Scope {
|
|
|
378
378
|
});
|
|
379
379
|
expect(scope.counter).toEqual(0);
|
|
380
380
|
|
|
381
|
-
;
|
|
381
|
+
scope.$digest();
|
|
382
382
|
// the listener is always called during the first $digest loop after it was registered
|
|
383
383
|
expect(scope.counter).toEqual(1);
|
|
384
384
|
|
|
385
|
-
;
|
|
385
|
+
scope.$digest();
|
|
386
386
|
// but now it will not be called unless the value changes
|
|
387
387
|
expect(scope.counter).toEqual(1);
|
|
388
388
|
|
|
389
389
|
scope.name = 'adam';
|
|
390
|
-
;
|
|
390
|
+
scope.$digest();
|
|
391
391
|
expect(scope.counter).toEqual(2);
|
|
392
392
|
* ```
|
|
393
393
|
*
|
|
@@ -412,7 +412,7 @@ export class Scope {
|
|
|
412
412
|
* Some of the things to consider are:
|
|
413
413
|
*
|
|
414
414
|
* * Any external event on a directive/component will not trigger a digest while the hosting
|
|
415
|
-
* scope is suspended - even if the event handler calls `$apply()` or
|
|
415
|
+
* scope is suspended - even if the event handler calls `$apply()` or `$rootScope.$digest()`.
|
|
416
416
|
* * Transcluded content exists on a scope that inherits from outside a directive but exists
|
|
417
417
|
* as a child of the directive's containing scope. If the containing scope is suspended the
|
|
418
418
|
* transcluded scope will also be suspended, even if the scope from which the transcluded
|
|
@@ -615,7 +615,7 @@ export class Scope {
|
|
|
615
615
|
* @returns {*} The result of evaluating the expression.
|
|
616
616
|
*/
|
|
617
617
|
$eval(expr?: string | ((arg0: Scope) => any), locals?: (object) | undefined): any;
|
|
618
|
-
|
|
618
|
+
$$postDigest(fn: any): void;
|
|
619
619
|
/**
|
|
620
620
|
* @private
|
|
621
621
|
*/
|