@angular-wave/angular.ts 0.0.50 → 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.
Files changed (59) hide show
  1. package/README.md +3 -1
  2. package/dist/angular-ts.esm.js +2 -2
  3. package/dist/angular-ts.umd.js +2 -2
  4. package/package.json +1 -1
  5. package/src/animations/animate-children-directive.js +19 -99
  6. package/src/animations/animate-children-directive.md +80 -0
  7. package/src/animations/animate-css-driver.js +250 -256
  8. package/src/animations/animate-css.js +646 -875
  9. package/src/animations/animate-css.md +263 -0
  10. package/src/animations/animate-js-driver.js +54 -56
  11. package/src/animations/animate-js.js +303 -306
  12. package/src/animations/animate-queue.js +707 -716
  13. package/src/animations/animate-swap.js +30 -119
  14. package/src/animations/animate-swap.md +88 -0
  15. package/src/animations/animation.js +3 -3
  16. package/src/animations/shared.js +2 -1
  17. package/src/core/animate/animate-runner.js +147 -145
  18. package/src/core/animate/animate.js +568 -582
  19. package/src/core/animate/anomate.md +13 -0
  20. package/src/core/compile/compile.spec.js +5 -6
  21. package/src/core/core.html +0 -1
  22. package/src/core/parser/ast-type.js +21 -20
  23. package/src/core/parser/ast.js +34 -35
  24. package/src/core/parser/interpreter.js +405 -136
  25. package/src/core/parser/lexer.js +14 -13
  26. package/src/core/parser/parse.js +31 -45
  27. package/src/core/parser/parse.spec.js +429 -444
  28. package/src/core/parser/parser.js +17 -9
  29. package/src/directive/select/select.js +301 -305
  30. package/src/loader.js +5 -1
  31. package/src/public.js +0 -1
  32. package/src/router/directives/state-directives.js +256 -574
  33. package/src/router/directives/state-directives.md +435 -0
  34. package/src/router/directives/view-directive.js +3 -3
  35. package/src/router/index.js +7 -7
  36. package/src/types.js +0 -13
  37. package/types/animations/animate-children-directive.d.ts +5 -80
  38. package/types/animations/animate-css-driver.d.ts +11 -0
  39. package/types/animations/animate-css.d.ts +8 -0
  40. package/types/animations/animate-js-driver.d.ts +8 -0
  41. package/types/animations/animate-js.d.ts +12 -0
  42. package/types/animations/animate-queue.d.ts +19 -0
  43. package/types/animations/animate-swap.d.ts +5 -89
  44. package/types/animations/shared.d.ts +1 -1
  45. package/types/core/animate/animate-runner.d.ts +32 -0
  46. package/types/core/animate/animate.d.ts +509 -0
  47. package/types/core/parser/ast-type.d.ts +24 -20
  48. package/types/core/parser/ast.d.ts +13 -14
  49. package/types/core/parser/interpreter.d.ts +24 -19
  50. package/types/core/parser/lexer.d.ts +6 -2
  51. package/types/core/parser/parse.d.ts +44 -38
  52. package/types/core/parser/parser.d.ts +2 -10
  53. package/types/directive/select/select.d.ts +79 -0
  54. package/types/loader.d.ts +397 -0
  55. package/types/router/directives/state-directives.d.ts +31 -0
  56. package/types/types.d.ts +0 -1
  57. package/src/core/document.spec.js +0 -52
  58. package/src/core/parser/shared.js +0 -234
  59. package/types/core/parser/shared.d.ts +0 -35
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@angular-wave/angular.ts",
3
3
  "license": "MIT",
4
- "version": "0.0.50",
4
+ "version": "0.0.52",
5
5
  "type": "module",
6
6
  "main": "dist/angular-ts.esm.js",
7
7
  "browser": "dist/angular-ts.umd.js",
@@ -1,105 +1,25 @@
1
1
  import { isString } from "../shared/utils";
2
2
  import { NG_ANIMATE_CHILDREN_DATA } from "./shared";
3
3
 
4
- /**
5
- * @ngdoc directive
6
- * @name ngAnimateChildren
7
- * @restrict AE
8
- * @element ANY
9
- *
10
- * @description
11
- *
12
- * ngAnimateChildren allows you to specify that children of this element should animate even if any
13
- * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move`
14
- * (structural) animation, child elements that also have an active structural animation are not animated.
15
- *
16
- * Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation).
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
- .item.ng-enter {
66
- transform: translateX(50px);
19
+ function setData(value) {
20
+ value = value === "on" || value === "true";
21
+ element.data(NG_ANIMATE_CHILDREN_DATA, value);
67
22
  }
68
-
69
- .item.ng-enter-active {
70
- transform: translateX(0);
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
+ */