@angular-wave/angular.ts 0.0.51 → 0.0.52
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-children-directive.js +19 -99
- package/src/animations/animate-children-directive.md +80 -0
- package/src/animations/animate-css-driver.js +250 -256
- package/src/animations/animate-css.js +646 -875
- package/src/animations/animate-css.md +263 -0
- package/src/animations/animate-js-driver.js +54 -56
- package/src/animations/animate-js.js +303 -306
- package/src/animations/animate-queue.js +707 -716
- package/src/animations/animate-swap.js +30 -119
- package/src/animations/animate-swap.md +88 -0
- package/src/animations/animation.js +3 -3
- package/src/core/animate/animate-runner.js +147 -145
- package/src/core/animate/animate.js +568 -582
- package/src/core/animate/anomate.md +13 -0
- package/src/core/compile/compile.spec.js +5 -6
- package/src/core/core.html +0 -1
- package/src/directive/select/select.js +301 -305
- package/src/public.js +0 -1
- package/src/router/directives/state-directives.js +256 -574
- package/src/router/directives/state-directives.md +435 -0
- package/src/router/directives/view-directive.js +3 -3
- package/src/router/index.js +7 -7
- package/types/animations/animate-children-directive.d.ts +5 -80
- package/types/animations/animate-css-driver.d.ts +11 -0
- package/types/animations/animate-css.d.ts +8 -0
- package/types/animations/animate-js-driver.d.ts +8 -0
- package/types/animations/animate-js.d.ts +12 -0
- package/types/animations/animate-queue.d.ts +19 -0
- package/types/animations/animate-swap.d.ts +5 -89
- package/types/core/animate/animate-runner.d.ts +32 -0
- package/types/core/animate/animate.d.ts +509 -0
- package/types/directive/select/select.d.ts +79 -0
- package/types/router/directives/state-directives.d.ts +31 -0
- package/src/core/document.spec.js +0 -52
package/package.json
CHANGED
|
@@ -1,105 +1,25 @@
|
|
|
1
1
|
import { isString } from "../shared/utils";
|
|
2
2
|
import { NG_ANIMATE_CHILDREN_DATA } from "./shared";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* @param {string} ngAnimateChildren If the value is empty, `true` or `on`,
|
|
20
|
-
* then child animations are allowed. If the value is `false`, child animations are not allowed.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* <example module="ngAnimateChildren" name="ngAnimateChildren" deps="angular-animate.js" animations="true">
|
|
24
|
-
<file name="index.html">
|
|
25
|
-
<div ng-controller="MainController as main">
|
|
26
|
-
<label>Show container? <input type="checkbox" ng-model="main.enterElement" /></label>
|
|
27
|
-
<label>Animate children? <input type="checkbox" ng-model="main.animateChildren" /></label>
|
|
28
|
-
<hr>
|
|
29
|
-
<div ng-animate-children="{{main.animateChildren}}">
|
|
30
|
-
<div ng-if="main.enterElement" class="container">
|
|
31
|
-
List of items:
|
|
32
|
-
<div ng-repeat="item in [0, 1, 2, 3]" class="item">Item {{item}}</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</file>
|
|
37
|
-
<file name="animations.css">
|
|
38
|
-
|
|
39
|
-
.container.ng-enter,
|
|
40
|
-
.container.ng-leave {
|
|
41
|
-
transition: all ease 1.5s;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.container.ng-enter,
|
|
45
|
-
.container.ng-leave-active {
|
|
46
|
-
opacity: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.container.ng-leave,
|
|
50
|
-
.container.ng-enter-active {
|
|
51
|
-
opacity: 1;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.item {
|
|
55
|
-
background: firebrick;
|
|
56
|
-
color: #FFF;
|
|
57
|
-
margin-bottom: 10px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.item.ng-enter,
|
|
61
|
-
.item.ng-leave {
|
|
62
|
-
transition: transform 1.5s ease;
|
|
4
|
+
$$AnimateChildrenDirective.$inject = ["$interpolate"];
|
|
5
|
+
export function $$AnimateChildrenDirective($interpolate) {
|
|
6
|
+
return {
|
|
7
|
+
link(scope, element, attrs) {
|
|
8
|
+
const val = attrs.ngAnimateChildren;
|
|
9
|
+
if (isString(val) && val.length === 0) {
|
|
10
|
+
// empty attribute
|
|
11
|
+
element.data(NG_ANIMATE_CHILDREN_DATA, true);
|
|
12
|
+
} else {
|
|
13
|
+
// Interpolate and set the value, so that it is available to
|
|
14
|
+
// animations that run right after compilation
|
|
15
|
+
setData($interpolate(val)(scope));
|
|
16
|
+
attrs.$observe("ngAnimateChildren", setData);
|
|
63
17
|
}
|
|
64
18
|
|
|
65
|
-
|
|
66
|
-
|
|
19
|
+
function setData(value) {
|
|
20
|
+
value = value === "on" || value === "true";
|
|
21
|
+
element.data(NG_ANIMATE_CHILDREN_DATA, value);
|
|
67
22
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
</file>
|
|
73
|
-
<file name="script.js">
|
|
74
|
-
angular.module('ngAnimateChildren', ['ngAnimate'])
|
|
75
|
-
.controller('MainController', function MainController() {
|
|
76
|
-
this.animateChildren = false;
|
|
77
|
-
this.enterElement = false;
|
|
78
|
-
});
|
|
79
|
-
</file>
|
|
80
|
-
</example>
|
|
81
|
-
*/
|
|
82
|
-
export const $$AnimateChildrenDirective = [
|
|
83
|
-
"$interpolate",
|
|
84
|
-
function ($interpolate) {
|
|
85
|
-
return {
|
|
86
|
-
link(scope, element, attrs) {
|
|
87
|
-
const val = attrs.ngAnimateChildren;
|
|
88
|
-
if (isString(val) && val.length === 0) {
|
|
89
|
-
// empty attribute
|
|
90
|
-
element.data(NG_ANIMATE_CHILDREN_DATA, true);
|
|
91
|
-
} else {
|
|
92
|
-
// Interpolate and set the value, so that it is available to
|
|
93
|
-
// animations that run right after compilation
|
|
94
|
-
setData($interpolate(val)(scope));
|
|
95
|
-
attrs.$observe("ngAnimateChildren", setData);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function setData(value) {
|
|
99
|
-
value = value === "on" || value === "true";
|
|
100
|
-
element.data(NG_ANIMATE_CHILDREN_DATA, value);
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
];
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/\*\*
|
|
2
|
+
|
|
3
|
+
- @ngdoc directive
|
|
4
|
+
- @name ngAnimateChildren
|
|
5
|
+
- @restrict AE
|
|
6
|
+
- @element ANY
|
|
7
|
+
-
|
|
8
|
+
- @description
|
|
9
|
+
-
|
|
10
|
+
- ngAnimateChildren allows you to specify that children of this element should animate even if any
|
|
11
|
+
- of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move`
|
|
12
|
+
- (structural) animation, child elements that also have an active structural animation are not animated.
|
|
13
|
+
-
|
|
14
|
+
- Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation).
|
|
15
|
+
-
|
|
16
|
+
-
|
|
17
|
+
- @param {string} ngAnimateChildren If the value is empty, `true` or `on`,
|
|
18
|
+
- then child animations are allowed. If the value is `false`, child animations are not allowed.
|
|
19
|
+
-
|
|
20
|
+
- @example
|
|
21
|
+
- <example module="ngAnimateChildren" name="ngAnimateChildren" deps="angular-animate.js" animations="true">
|
|
22
|
+
<file name="index.html">
|
|
23
|
+
<div ng-controller="MainController as main">
|
|
24
|
+
<label>Show container? <input type="checkbox" ng-model="main.enterElement" /></label>
|
|
25
|
+
<label>Animate children? <input type="checkbox" ng-model="main.animateChildren" /></label>
|
|
26
|
+
<hr>
|
|
27
|
+
<div ng-animate-children="{{main.animateChildren}}">
|
|
28
|
+
<div ng-if="main.enterElement" class="container">
|
|
29
|
+
List of items:
|
|
30
|
+
<div ng-repeat="item in [0, 1, 2, 3]" class="item">Item {{item}}</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</file>
|
|
35
|
+
<file name="animations.css">
|
|
36
|
+
|
|
37
|
+
.container.ng-enter,
|
|
38
|
+
.container.ng-leave {
|
|
39
|
+
transition: all ease 1.5s;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.container.ng-enter,
|
|
43
|
+
.container.ng-leave-active {
|
|
44
|
+
opacity: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.container.ng-leave,
|
|
48
|
+
.container.ng-enter-active {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.item {
|
|
53
|
+
background: firebrick;
|
|
54
|
+
color: #FFF;
|
|
55
|
+
margin-bottom: 10px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.item.ng-enter,
|
|
59
|
+
.item.ng-leave {
|
|
60
|
+
transition: transform 1.5s ease;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.item.ng-enter {
|
|
64
|
+
transform: translateX(50px);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.item.ng-enter-active {
|
|
68
|
+
transform: translateX(0);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
</file>
|
|
72
|
+
<file name="script.js">
|
|
73
|
+
angular.module('ngAnimateChildren', ['ngAnimate'])
|
|
74
|
+
.controller('MainController', function MainController() {
|
|
75
|
+
this.animateChildren = false;
|
|
76
|
+
this.enterElement = false;
|
|
77
|
+
});
|
|
78
|
+
</file>
|
|
79
|
+
</example>
|
|
80
|
+
*/
|