@angular-wave/angular.ts 0.0.72 → 0.1.0

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 (58) hide show
  1. package/.github/workflows/types.yml +19 -0
  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-js.html +5 -2
  6. package/src/animations/animate-queue.js +1 -1
  7. package/src/animations/animate.js +1 -26
  8. package/src/core/compile/attributes.js +8 -1
  9. package/src/core/compile/compile.js +432 -368
  10. package/src/core/compile/compile.spec.js +0 -1
  11. package/src/core/controller/controller.js +9 -3
  12. package/src/core/interpolate/interpolate.js +14 -10
  13. package/src/core/q/q.js +2 -1
  14. package/src/directive/change/change.js +3 -1
  15. package/src/directive/form/form.js +4 -3
  16. package/src/directive/list/list.js +3 -3
  17. package/src/directive/messages/messages.js +177 -172
  18. package/src/directive/model/model.js +261 -471
  19. package/src/directive/switch/switch.js +4 -4
  20. package/src/router/directives/state-directives.js +2 -9
  21. package/src/router/hooks/core-resolvables.js +5 -3
  22. package/src/router/path/path-utils.js +1 -2
  23. package/src/router/resolve/resolve-context.js +15 -29
  24. package/src/router/state/state-builder.js +38 -13
  25. package/src/router/state/state-object.js +12 -22
  26. package/src/router/state/state-queue-manager.js +2 -3
  27. package/src/router/state/state-registry.js +2 -1
  28. package/src/router/state/state-service.js +2 -3
  29. package/src/router/transition/transition.js +5 -3
  30. package/src/router/url/url-rule.js +14 -2
  31. package/src/router/view/view.js +2 -8
  32. package/src/router/view/view.spec.js +1 -1
  33. package/src/shared/common.js +3 -8
  34. package/src/shared/common.spec.js +1 -19
  35. package/src/shared/hof.js +1 -8
  36. package/src/shared/jqlite/jqlite.js +1 -1
  37. package/src/shared/predicates.js +6 -2
  38. package/src/types.js +2 -3
  39. package/tsconfig.json +1 -1
  40. package/types/animations/animate-queue.d.ts +1 -1
  41. package/types/core/compile/attributes.d.ts +10 -1
  42. package/types/core/interpolate/interpolate.d.ts +5 -5
  43. package/types/core/q/q.d.ts +4 -2
  44. package/types/directive/form/form.d.ts +3 -1
  45. package/types/directive/messages/messages.d.ts +76 -0
  46. package/types/directive/model/model.d.ts +101 -239
  47. package/types/router/resolve/resolve-context.d.ts +0 -2
  48. package/types/router/state/state-object.d.ts +12 -9
  49. package/types/router/state/state-registry.d.ts +2 -2
  50. package/types/router/transition/transition.d.ts +1 -2
  51. package/types/router/url/url-rule.d.ts +6 -1
  52. package/types/shared/common.d.ts +0 -3
  53. package/types/shared/hof.d.ts +0 -1
  54. package/types/shared/jqlite/jqlite.d.ts +2 -2
  55. package/types/shared/predicates.d.ts +2 -0
  56. package/types/types.d.ts +4 -2
  57. package/src/router/injectables.js +0 -263
  58. package/types/router/injectables.d.ts +0 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@angular-wave/angular.ts",
3
3
  "description": "A modern, optimized and typesafe version of AngularJS",
4
4
  "license": "MIT",
5
- "version": "0.0.72",
5
+ "version": "0.1.0",
6
6
  "type": "module",
7
7
  "main": "dist/angular-ts.esm.js",
8
8
  "browser": "dist/angular-ts.umd.js",
@@ -9,7 +9,7 @@
9
9
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.2/lib/anime.min.js"></script>
10
10
  <script>
11
11
  document.addEventListener("DOMContentLoaded", () => {
12
- window.angular.module("test", []).animation(".colorful", [
12
+ window.angular.module("test", []).animation(".movable", [
13
13
  function () {
14
14
  return {
15
15
  addClass: function (element, className, doneFn) {
@@ -34,7 +34,10 @@
34
34
  <style></style>
35
35
  </head>
36
36
  <body ng-app="test">
37
- <div ng-class="location" class="colorful">
37
+ <div ng-class="location" class="movable" animate="true">
38
+ this box is moody {{ location }}
39
+ </div>
40
+ <div ng-class="location" class="movable" data-animate="true">
38
41
  this box is moody {{ location }}
39
42
  </div>
40
43
  <button ng-click="location='0'">Change to red</button>
@@ -151,7 +151,7 @@ export function $$AnimateQueueProvider($animateProvider) {
151
151
  "$templateRequest",
152
152
  /**
153
153
  *
154
- * @param {*} $rootScope
154
+ * @param {import('../core/scope/scope').Scope} $rootScope
155
155
  * @param {*} $injector
156
156
  * @param {*} $$animation
157
157
  * @param {*} $$AnimateRunner
@@ -1,11 +1,4 @@
1
- import {
2
- forEach,
3
- isFunction,
4
- isObject,
5
- isString,
6
- minErr,
7
- extend,
8
- } from "../shared/utils";
1
+ import { isFunction, isObject, minErr, extend } from "../shared/utils";
9
2
  import { JQLite } from "../shared/jqlite/jqlite";
10
3
  import { NG_ANIMATE_CLASSNAME } from "./shared";
11
4
 
@@ -40,24 +33,6 @@ function extractElementNode(element) {
40
33
  }
41
34
  }
42
35
 
43
- function splitClasses(classes) {
44
- if (isString(classes)) {
45
- classes = classes.split(" ");
46
- }
47
-
48
- // Use Object.create(null) to prevent class assumptions involving property names in
49
- // Object.prototype
50
- const obj = Object.create(null);
51
- forEach(classes, (klass) => {
52
- // sometimes the split leaves empty string values
53
- // incase extra spaces were applied to the options
54
- if (klass.length) {
55
- obj[klass] = true;
56
- }
57
- });
58
- return obj;
59
- }
60
-
61
36
  // if any other type of options value besides an Object value is
62
37
  // passed into the $animate.method() animation then this helper code
63
38
  // will be run which will ignore it. While this patch is not the
@@ -15,9 +15,16 @@ const $compileMinErr = minErr("$compile");
15
15
  const SIMPLE_ATTR_NAME = /^\w/;
16
16
  const specialAttrHolder = window.document.createElement("div");
17
17
 
18
+ /**
19
+ * @typedef {Object} AttributeLike
20
+ * @property {Object} $attr
21
+ */
22
+
23
+ /**
24
+ * @extends {AttributeLike}
25
+ */
18
26
  export class Attributes {
19
27
  /**
20
- *
21
28
  * @param {import('../scope/scope').Scope} $rootScope
22
29
  * @param {*} $animate
23
30
  * @param {import("../exception-handler").ExceptionHandlerProvider} $exceptionHandler