@angular-wave/angular.ts 0.0.49 → 0.0.51
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/README.md +3 -1
- package/dist/angular-ts.esm.js +2 -2
- package/dist/angular-ts.umd.js +2 -2
- package/package.json +1 -1
- package/src/animations/shared.js +2 -1
- package/src/core/interpolate/interpolate.js +1 -18
- package/src/core/parser/ast-type.js +21 -20
- package/src/core/parser/ast.js +253 -93
- package/src/core/parser/interpreter.js +639 -174
- package/src/core/parser/lexer.js +22 -22
- package/src/core/parser/parse.js +51 -265
- package/src/core/parser/parse.md +0 -13
- package/src/core/parser/parse.spec.js +429 -444
- package/src/core/parser/parser.js +39 -11
- package/src/directive/csp.md +0 -26
- package/src/loader.js +5 -1
- package/src/shared/jqlite/jqlite.js +2 -2
- package/src/types.js +0 -10
- package/types/animations/shared.d.ts +1 -1
- package/types/core/parser/ast-type.d.ts +24 -20
- package/types/core/parser/ast.d.ts +266 -73
- package/types/core/parser/interpreter.d.ts +207 -53
- package/types/core/parser/lexer.d.ts +23 -19
- package/types/core/parser/parse.d.ts +50 -44
- package/types/core/parser/parser.d.ts +31 -16
- package/types/loader.d.ts +397 -0
- package/types/shared/jqlite/jqlite.d.ts +4 -4
- package/types/types.d.ts +0 -1
- package/src/core/parser/compiler.js +0 -561
- package/src/core/parser/shared.js +0 -228
- package/types/core/parser/compiler.d.ts +0 -49
- package/types/core/parser/shared.d.ts +0 -29
package/package.json
CHANGED
package/src/animations/shared.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { forEach, isString, minErr, extend } from "../shared/utils";
|
|
2
2
|
import { JQLite } from "../shared/jqlite/jqlite";
|
|
3
|
+
import { ASTType } from "../core/parser/ast-type";
|
|
3
4
|
|
|
4
5
|
export const ADD_CLASS_SUFFIX = "-add";
|
|
5
6
|
export const REMOVE_CLASS_SUFFIX = "-remove";
|
|
@@ -51,7 +52,7 @@ if (
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
export const DURATION_KEY = "Duration";
|
|
54
|
-
export const PROPERTY_KEY =
|
|
55
|
+
export const PROPERTY_KEY = ASTType.Property;
|
|
55
56
|
export const DELAY_KEY = "Delay";
|
|
56
57
|
export const TIMING_KEY = "TimingFunction";
|
|
57
58
|
export const ANIMATION_ITERATION_COUNT_KEY = "IterationCount";
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
valueFn,
|
|
7
7
|
extend,
|
|
8
8
|
} from "../../shared/utils";
|
|
9
|
+
import { constantWatchDelegate } from "../parser/parse";
|
|
9
10
|
|
|
10
11
|
const $interpolateMinErr = minErr("$interpolate");
|
|
11
12
|
$interpolateMinErr.throwNoconcat = function (text) {
|
|
@@ -112,24 +113,6 @@ export function $InterpolateProvider() {
|
|
|
112
113
|
.replace(escapedEndRegexp, endSymbol);
|
|
113
114
|
}
|
|
114
115
|
|
|
115
|
-
// TODO: this is the same as the constantWatchDelegate in parse.js
|
|
116
|
-
function constantWatchDelegate(
|
|
117
|
-
scope,
|
|
118
|
-
listener,
|
|
119
|
-
objectEquality,
|
|
120
|
-
constantInterp,
|
|
121
|
-
) {
|
|
122
|
-
const unwatch = scope.$watch(
|
|
123
|
-
(scope) => {
|
|
124
|
-
unwatch();
|
|
125
|
-
return constantInterp(scope);
|
|
126
|
-
},
|
|
127
|
-
listener,
|
|
128
|
-
objectEquality,
|
|
129
|
-
);
|
|
130
|
-
return unwatch;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
116
|
/**
|
|
134
117
|
* @ngdoc service
|
|
135
118
|
* @name $interpolate
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @readonly
|
|
3
|
+
* @enum {number}
|
|
3
4
|
*/
|
|
4
|
-
export const ASTType = {
|
|
5
|
-
Program:
|
|
6
|
-
ExpressionStatement:
|
|
7
|
-
AssignmentExpression:
|
|
8
|
-
ConditionalExpression:
|
|
9
|
-
LogicalExpression:
|
|
10
|
-
BinaryExpression:
|
|
11
|
-
UnaryExpression:
|
|
12
|
-
CallExpression:
|
|
13
|
-
MemberExpression:
|
|
14
|
-
Identifier:
|
|
15
|
-
Literal:
|
|
16
|
-
ArrayExpression:
|
|
17
|
-
Property:
|
|
18
|
-
ObjectExpression:
|
|
19
|
-
ThisExpression:
|
|
20
|
-
LocalsExpression:
|
|
21
|
-
NGValueParameter:
|
|
22
|
-
};
|
|
5
|
+
export const ASTType = Object.freeze({
|
|
6
|
+
Program: 1,
|
|
7
|
+
ExpressionStatement: 2,
|
|
8
|
+
AssignmentExpression: 3,
|
|
9
|
+
ConditionalExpression: 4,
|
|
10
|
+
LogicalExpression: 5,
|
|
11
|
+
BinaryExpression: 6,
|
|
12
|
+
UnaryExpression: 7,
|
|
13
|
+
CallExpression: 8,
|
|
14
|
+
MemberExpression: 9,
|
|
15
|
+
Identifier: 10,
|
|
16
|
+
Literal: 11,
|
|
17
|
+
ArrayExpression: 12,
|
|
18
|
+
Property: 13,
|
|
19
|
+
ObjectExpression: 14,
|
|
20
|
+
ThisExpression: 15,
|
|
21
|
+
LocalsExpression: 16,
|
|
22
|
+
NGValueParameter: 17,
|
|
23
|
+
});
|