@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.
- package/.github/workflows/types.yml +19 -0
- 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-js.html +5 -2
- package/src/animations/animate-queue.js +1 -1
- package/src/animations/animate.js +1 -26
- package/src/core/compile/attributes.js +8 -1
- package/src/core/compile/compile.js +432 -368
- package/src/core/compile/compile.spec.js +0 -1
- package/src/core/controller/controller.js +9 -3
- package/src/core/interpolate/interpolate.js +14 -10
- package/src/core/q/q.js +2 -1
- package/src/directive/change/change.js +3 -1
- package/src/directive/form/form.js +4 -3
- package/src/directive/list/list.js +3 -3
- package/src/directive/messages/messages.js +177 -172
- package/src/directive/model/model.js +261 -471
- package/src/directive/switch/switch.js +4 -4
- package/src/router/directives/state-directives.js +2 -9
- package/src/router/hooks/core-resolvables.js +5 -3
- package/src/router/path/path-utils.js +1 -2
- package/src/router/resolve/resolve-context.js +15 -29
- package/src/router/state/state-builder.js +38 -13
- package/src/router/state/state-object.js +12 -22
- package/src/router/state/state-queue-manager.js +2 -3
- package/src/router/state/state-registry.js +2 -1
- package/src/router/state/state-service.js +2 -3
- package/src/router/transition/transition.js +5 -3
- package/src/router/url/url-rule.js +14 -2
- package/src/router/view/view.js +2 -8
- package/src/router/view/view.spec.js +1 -1
- package/src/shared/common.js +3 -8
- package/src/shared/common.spec.js +1 -19
- package/src/shared/hof.js +1 -8
- package/src/shared/jqlite/jqlite.js +1 -1
- package/src/shared/predicates.js +6 -2
- package/src/types.js +2 -3
- package/tsconfig.json +1 -1
- package/types/animations/animate-queue.d.ts +1 -1
- package/types/core/compile/attributes.d.ts +10 -1
- package/types/core/interpolate/interpolate.d.ts +5 -5
- package/types/core/q/q.d.ts +4 -2
- package/types/directive/form/form.d.ts +3 -1
- package/types/directive/messages/messages.d.ts +76 -0
- package/types/directive/model/model.d.ts +101 -239
- package/types/router/resolve/resolve-context.d.ts +0 -2
- package/types/router/state/state-object.d.ts +12 -9
- package/types/router/state/state-registry.d.ts +2 -2
- package/types/router/transition/transition.d.ts +1 -2
- package/types/router/url/url-rule.d.ts +6 -1
- package/types/shared/common.d.ts +0 -3
- package/types/shared/hof.d.ts +0 -1
- package/types/shared/jqlite/jqlite.d.ts +2 -2
- package/types/shared/predicates.d.ts +2 -0
- package/types/types.d.ts +4 -2
- package/src/router/injectables.js +0 -263
- 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
|
|
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(".
|
|
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="
|
|
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 {
|
|
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
|