@auscope/angular2parse 22.0.0 → 22.0.2
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 +1 -18
- package/auscope-angular2parse-22.0.2.tgz +0 -0
- package/fesm2022/auscope-angular2parse.mjs +2055 -0
- package/fesm2022/auscope-angular2parse.mjs.map +1 -0
- package/package.json +34 -41
- package/types/auscope-angular2parse.d.ts +32 -0
- package/.editorconfig +0 -13
- package/LICENSE +0 -21
- package/angular.json +0 -56
- package/projects/angular2parse/README.md +0 -49
- package/projects/angular2parse/ng-package.json +0 -7
- package/projects/angular2parse/package.json +0 -19
- package/projects/angular2parse/src/lib/angular/compiler/assertions.d.ts +0 -10
- package/projects/angular2parse/src/lib/angular/compiler/assertions.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/assertions.js +0 -45
- package/projects/angular2parse/src/lib/angular/compiler/assertions.js.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/assertions.ts +0 -49
- package/projects/angular2parse/src/lib/angular/compiler/ast.d.ts +0 -243
- package/projects/angular2parse/src/lib/angular/compiler/ast.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/ast.js +0 -393
- package/projects/angular2parse/src/lib/angular/compiler/ast.js.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/ast.ts +0 -393
- package/projects/angular2parse/src/lib/angular/compiler/chars.d.ts +0 -70
- package/projects/angular2parse/src/lib/angular/compiler/chars.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/chars.js +0 -78
- package/projects/angular2parse/src/lib/angular/compiler/chars.js.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/chars.ts +0 -89
- package/projects/angular2parse/src/lib/angular/compiler/interpolation-config.d.ts +0 -15
- package/projects/angular2parse/src/lib/angular/compiler/interpolation-config.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/interpolation-config.js +0 -24
- package/projects/angular2parse/src/lib/angular/compiler/interpolation-config.js.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/interpolation-config.ts +0 -25
- package/projects/angular2parse/src/lib/angular/compiler/lexer.d.ts +0 -45
- package/projects/angular2parse/src/lib/angular/compiler/lexer.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/lexer.js +0 -344
- package/projects/angular2parse/src/lib/angular/compiler/lexer.js.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/lexer.ts +0 -383
- package/projects/angular2parse/src/lib/angular/compiler/parser.d.ts +0 -93
- package/projects/angular2parse/src/lib/angular/compiler/parser.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/parser.js +0 -735
- package/projects/angular2parse/src/lib/angular/compiler/parser.js.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler/parser.ts +0 -825
- package/projects/angular2parse/src/lib/angular/compiler.d.ts +0 -7
- package/projects/angular2parse/src/lib/angular/compiler.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler.js +0 -7
- package/projects/angular2parse/src/lib/angular/compiler.js.map +0 -1
- package/projects/angular2parse/src/lib/angular/compiler.ts +0 -6
- package/projects/angular2parse/src/lib/angular/facade/lang.d.ts +0 -45
- package/projects/angular2parse/src/lib/angular/facade/lang.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular/facade/lang.js +0 -85
- package/projects/angular2parse/src/lib/angular/facade/lang.js.map +0 -1
- package/projects/angular2parse/src/lib/angular/facade/lang.ts +0 -124
- package/projects/angular2parse/src/lib/angular/facade.d.ts +0 -2
- package/projects/angular2parse/src/lib/angular/facade.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular/facade.js +0 -2
- package/projects/angular2parse/src/lib/angular/facade.js.map +0 -1
- package/projects/angular2parse/src/lib/angular/facade.ts +0 -1
- package/projects/angular2parse/src/lib/angular.d.ts +0 -3
- package/projects/angular2parse/src/lib/angular.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/angular.js +0 -3
- package/projects/angular2parse/src/lib/angular.js.map +0 -1
- package/projects/angular2parse/src/lib/angular.ts +0 -2
- package/projects/angular2parse/src/lib/module.d.ts +0 -6
- package/projects/angular2parse/src/lib/module.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/module.js +0 -17
- package/projects/angular2parse/src/lib/module.js.map +0 -1
- package/projects/angular2parse/src/lib/module.ts +0 -12
- package/projects/angular2parse/src/lib/parse.d.ts +0 -19
- package/projects/angular2parse/src/lib/parse.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/parse.js +0 -61
- package/projects/angular2parse/src/lib/parse.js.map +0 -1
- package/projects/angular2parse/src/lib/parse.ts +0 -78
- package/projects/angular2parse/src/lib/util/binary-operations.d.ts +0 -2
- package/projects/angular2parse/src/lib/util/binary-operations.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/util/binary-operations.js +0 -18
- package/projects/angular2parse/src/lib/util/binary-operations.js.map +0 -1
- package/projects/angular2parse/src/lib/util/binary-operations.ts +0 -17
- package/projects/angular2parse/src/lib/util/lang.d.ts +0 -5
- package/projects/angular2parse/src/lib/util/lang.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/util/lang.js +0 -13
- package/projects/angular2parse/src/lib/util/lang.js.map +0 -1
- package/projects/angular2parse/src/lib/util/lang.ts +0 -15
- package/projects/angular2parse/src/lib/util.d.ts +0 -3
- package/projects/angular2parse/src/lib/util.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/util.js +0 -3
- package/projects/angular2parse/src/lib/util.js.map +0 -1
- package/projects/angular2parse/src/lib/util.ts +0 -2
- package/projects/angular2parse/src/lib/visitors/parse-visitor-compiler.d.ts +0 -24
- package/projects/angular2parse/src/lib/visitors/parse-visitor-compiler.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/visitors/parse-visitor-compiler.js +0 -96
- package/projects/angular2parse/src/lib/visitors/parse-visitor-compiler.js.map +0 -1
- package/projects/angular2parse/src/lib/visitors/parse-visitor-compiler.ts +0 -149
- package/projects/angular2parse/src/lib/visitors/parse-visitor-resolver.d.ts +0 -26
- package/projects/angular2parse/src/lib/visitors/parse-visitor-resolver.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/visitors/parse-visitor-resolver.js +0 -141
- package/projects/angular2parse/src/lib/visitors/parse-visitor-resolver.js.map +0 -1
- package/projects/angular2parse/src/lib/visitors/parse-visitor-resolver.ts +0 -208
- package/projects/angular2parse/src/lib/visitors.d.ts +0 -3
- package/projects/angular2parse/src/lib/visitors.d.ts.map +0 -1
- package/projects/angular2parse/src/lib/visitors.js +0 -3
- package/projects/angular2parse/src/lib/visitors.js.map +0 -1
- package/projects/angular2parse/src/lib/visitors.ts +0 -2
- package/projects/angular2parse/src/public-api.d.ts +0 -3
- package/projects/angular2parse/src/public-api.d.ts.map +0 -1
- package/projects/angular2parse/src/public-api.js +0 -6
- package/projects/angular2parse/src/public-api.js.map +0 -1
- package/projects/angular2parse/src/public-api.ts +0 -5
- package/projects/angular2parse/tsconfig.lib.json +0 -22
- package/projects/angular2parse/tsconfig.lib.prod.json +0 -15
- package/tsconfig.json +0 -21
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './compiler/assertions';
|
|
2
|
-
export * from './compiler/ast';
|
|
3
|
-
export * from './compiler/chars';
|
|
4
|
-
export * from './compiler/interpolation-config';
|
|
5
|
-
export * from './compiler/lexer';
|
|
6
|
-
export * from './compiler/parser';
|
|
7
|
-
//# sourceMappingURL=compiler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["compiler.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './compiler/assertions';
|
|
2
|
-
export * from './compiler/ast';
|
|
3
|
-
export * from './compiler/chars';
|
|
4
|
-
export * from './compiler/interpolation-config';
|
|
5
|
-
export * from './compiler/lexer';
|
|
6
|
-
export * from './compiler/parser';
|
|
7
|
-
//# sourceMappingURL=compiler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compiler.js","sourceRoot":"","sources":["compiler.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './compiler/assertions';\r\nexport * from './compiler/ast';\r\nexport * from './compiler/chars';\r\nexport * from './compiler/interpolation-config';\r\nexport * from './compiler/lexer';\r\nexport * from './compiler/parser';"]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
export interface BrowserNodeGlobal {
|
|
9
|
-
Object: typeof Object;
|
|
10
|
-
Array: typeof Array;
|
|
11
|
-
Map: typeof Map;
|
|
12
|
-
Set: typeof Set;
|
|
13
|
-
Date: DateConstructor;
|
|
14
|
-
RegExp: RegExpConstructor;
|
|
15
|
-
JSON: typeof JSON;
|
|
16
|
-
Math: any;
|
|
17
|
-
assert(condition: any): void;
|
|
18
|
-
Reflect: any;
|
|
19
|
-
getAngularTestability: Function;
|
|
20
|
-
getAllAngularTestabilities: Function;
|
|
21
|
-
getAllAngularRootElements: Function;
|
|
22
|
-
frameworkStabilizers: Array<Function>;
|
|
23
|
-
setTimeout: Function;
|
|
24
|
-
clearTimeout: Function;
|
|
25
|
-
setInterval: Function;
|
|
26
|
-
clearInterval: Function;
|
|
27
|
-
encodeURI: Function;
|
|
28
|
-
}
|
|
29
|
-
export declare function getTypeNameForDebugging(type: any): string;
|
|
30
|
-
export declare function isPresent<T>(obj: T | null | undefined): obj is T;
|
|
31
|
-
export declare function isBlank(obj: unknown): obj is null | undefined;
|
|
32
|
-
export declare function isStrictStringMap(obj: any): boolean;
|
|
33
|
-
export declare function stringify(token: any): string;
|
|
34
|
-
export declare class NumberWrapper {
|
|
35
|
-
static parseIntAutoRadix(text: string): number;
|
|
36
|
-
static isNumeric(value: any): boolean;
|
|
37
|
-
}
|
|
38
|
-
export declare function looseIdentical(a: any, b: any): boolean;
|
|
39
|
-
export declare function isJsObject(o: any): boolean;
|
|
40
|
-
export declare function print(obj: Error | Object): void;
|
|
41
|
-
export declare function warn(obj: Error | Object): void;
|
|
42
|
-
export declare function setValueOnPath(global: any, path: string, value: any): void;
|
|
43
|
-
export declare function isPrimitive(obj: any): boolean;
|
|
44
|
-
export declare function escapeRegExp(s: string): string;
|
|
45
|
-
//# sourceMappingURL=lang.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["lang.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,OAAO,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,GAAG,EAAE,OAAO,GAAG,CAAC;IAChB,GAAG,EAAE,OAAO,GAAG,CAAC;IAChB,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,IAAI,EAAE,GAAG,CAAC;IACV,MAAM,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,GAAG,CAAC;IACb,qBAAqB,EAAE,QAAQ,CAAC;IAChC,0BAA0B,EAAE,QAAQ,CAAC;IACrC,yBAAyB,EA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C,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9C"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
export function getTypeNameForDebugging(type) {
|
|
9
|
-
return type['name'] || typeof type;
|
|
10
|
-
}
|
|
11
|
-
export function isPresent(obj) {
|
|
12
|
-
return obj != null;
|
|
13
|
-
}
|
|
14
|
-
export function isBlank(obj) {
|
|
15
|
-
return obj == null;
|
|
16
|
-
}
|
|
17
|
-
const STRING_MAP_PROTO = Object.getPrototypeOf({});
|
|
18
|
-
export function isStrictStringMap(obj) {
|
|
19
|
-
return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
|
|
20
|
-
}
|
|
21
|
-
export function stringify(token) {
|
|
22
|
-
if (typeof token === 'string') {
|
|
23
|
-
return token;
|
|
24
|
-
}
|
|
25
|
-
if (token == null) {
|
|
26
|
-
return '' + token;
|
|
27
|
-
}
|
|
28
|
-
if (token.overriddenName) {
|
|
29
|
-
return `${token.overriddenName}`;
|
|
30
|
-
}
|
|
31
|
-
if (token.name) {
|
|
32
|
-
return `${token.name}`;
|
|
33
|
-
}
|
|
34
|
-
const res = token.toString();
|
|
35
|
-
const newLineIndex = res.indexOf('\n');
|
|
36
|
-
return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
|
|
37
|
-
}
|
|
38
|
-
export class NumberWrapper {
|
|
39
|
-
static parseIntAutoRadix(text) {
|
|
40
|
-
const result = parseInt(text);
|
|
41
|
-
if (isNaN(result)) {
|
|
42
|
-
throw new Error('Invalid integer literal when parsing ' + text);
|
|
43
|
-
}
|
|
44
|
-
return result;
|
|
45
|
-
}
|
|
46
|
-
static isNumeric(value) { return !isNaN(value - parseFloat(value)); }
|
|
47
|
-
}
|
|
48
|
-
// JS has NaN !== NaN
|
|
49
|
-
export function looseIdentical(a, b) {
|
|
50
|
-
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
|
|
51
|
-
}
|
|
52
|
-
export function isJsObject(o) {
|
|
53
|
-
return o !== null && (typeof o === 'function' || typeof o === 'object');
|
|
54
|
-
}
|
|
55
|
-
export function print(obj) {
|
|
56
|
-
// tslint:disable-next-line:no-console
|
|
57
|
-
console.log(obj);
|
|
58
|
-
}
|
|
59
|
-
export function warn(obj) {
|
|
60
|
-
console.warn(obj);
|
|
61
|
-
}
|
|
62
|
-
export function setValueOnPath(global, path, value) {
|
|
63
|
-
const parts = path.split('.');
|
|
64
|
-
let obj = global;
|
|
65
|
-
while (parts.length > 1) {
|
|
66
|
-
const name = parts.shift();
|
|
67
|
-
if (obj.hasOwnProperty(name) && obj[name] != null) {
|
|
68
|
-
obj = obj[name];
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
obj = obj[name] = {};
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (obj === undefined || obj === null) {
|
|
75
|
-
obj = {};
|
|
76
|
-
}
|
|
77
|
-
obj[parts.shift()] = value;
|
|
78
|
-
}
|
|
79
|
-
export function isPrimitive(obj) {
|
|
80
|
-
return !isJsObject(obj);
|
|
81
|
-
}
|
|
82
|
-
export function escapeRegExp(s) {
|
|
83
|
-
return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=lang.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lang.js","sourceRoot":"","sources":["lang.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAyBH,MAAM,UAAU,uBAAuB,CAAC,IAAS;IAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,SAAS,CA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AG,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;aAAM,CAAC;YACJ,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;QACzB,CAAC;IACL,CAAC;IACD,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QACpC,GAAG,GAAG,EAAE,CAAC;IACb,CAAC;IACD,GAAG,CAAC,KAAK,CAAC,KAAK,EAAG,CAAC,GAAG,KAAK,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,GAAQ;IAChC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,CAAS;IAClC,OAAO,CAAC,CAAC,OAAO,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["/**\r\n * @license\r\n * Copyright Google Inc. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://angular.io/license\r\n */\r\n\r\nexport interface BrowserNodeGlobal {\r\n Object: typeof Object;\r\n Array: typeof Array;\r\n Map: typeof Map;\r\n Set: typeof Set;\r\n Date: DateConstructor;\r\n RegExp: RegExpConstructor;\r\n JSON: typeof JSON;\r\n Math: any; // typeof Math;\r\n assert(condition: any): void;\r\n Reflect: any;\r\n getAngularTestability: Function;\r\n getAllAngularTestabilities: Function;\r\n getAllAngularRootElements: Function;\r\n frameworkStabilizers: Array<Function>;\r\n setTimeout: Function;\r\n clearTimeout: Function;\r\n setInterval: Function;\r\n clearInterval: Function;\r\n encodeURI: Function;\r\n}\r\n\r\n\r\nexport function getTypeNameForDebugging(type: any): string {\r\n return type['name'] || typeof type;\r\n}\r\n\r\nexport function isPresent<T>(obj: T | null | undefined): obj is T {\r\n return obj != null;\r\n}\r\n\r\nexport function isBlank(obj: unknown): obj is null | undefined {\r\n return obj == null;\r\n}\r\n\r\nconst STRING_MAP_PROTO = Object.getPrototypeOf({});\r\nexport function isStrictStringMap(obj: any): boolean {\r\n return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;\r\n}\r\n\r\nexport function stringify(token: any): string {\r\n if (typeof token === 'string') {\r\n return token;\r\n }\r\n\r\n if (token == null) {\r\n return '' + token;\r\n }\r\n\r\n if (token.overriddenName) {\r\n return `${token.overriddenName}`;\r\n }\r\n\r\n if (token.name) {\r\n return `${token.name}`;\r\n }\r\n\r\n const res = token.toString();\r\n const newLineIndex = res.indexOf('\\n');\r\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\r\n}\r\n\r\nexport class NumberWrapper {\r\n static parseIntAutoRadix(text: string): number {\r\n const result: number = parseInt(text);\r\n if (isNaN(result)) {\r\n throw new Error('Invalid integer literal when parsing ' + text);\r\n }\r\n return result;\r\n }\r\n\r\n static isNumeric(value: any): boolean { return !isNaN(value - parseFloat(value)); }\r\n}\r\n\r\n// JS has NaN !== NaN\r\nexport function looseIdentical(a: any, b: any): boolean {\r\n return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);\r\n}\r\n\r\nexport function isJsObject(o: any): boolean {\r\n return o !== null && (typeof o === 'function' || typeof o === 'object');\r\n}\r\n\r\nexport function print(obj: Error | Object) {\r\n // tslint:disable-next-line:no-console\r\n console.log(obj);\r\n}\r\n\r\nexport function warn(obj: Error | Object) {\r\n console.warn(obj);\r\n}\r\n\r\nexport function setValueOnPath(global: any, path: string, value: any) {\r\n const parts = path.split('.');\r\n let obj: any = global;\r\n while (parts.length > 1) {\r\n const name = parts.shift()!;\r\n if (obj.hasOwnProperty(name) && obj[name] != null) {\r\n obj = obj[name];\r\n } else {\r\n obj = obj[name] = {};\r\n }\r\n }\r\n if (obj === undefined || obj === null) {\r\n obj = {};\r\n }\r\n obj[parts.shift()!] = value;\r\n}\r\n\r\nexport function isPrimitive(obj: any): boolean {\r\n return !isJsObject(obj);\r\n}\r\n\r\nexport function escapeRegExp(s: string): string {\r\n return s.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\r\n}"]}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export interface BrowserNodeGlobal {
|
|
10
|
-
Object: typeof Object;
|
|
11
|
-
Array: typeof Array;
|
|
12
|
-
Map: typeof Map;
|
|
13
|
-
Set: typeof Set;
|
|
14
|
-
Date: DateConstructor;
|
|
15
|
-
RegExp: RegExpConstructor;
|
|
16
|
-
JSON: typeof JSON;
|
|
17
|
-
Math: any; // typeof Math;
|
|
18
|
-
assert(condition: any): void;
|
|
19
|
-
Reflect: any;
|
|
20
|
-
getAngularTestability: Function;
|
|
21
|
-
getAllAngularTestabilities: Function;
|
|
22
|
-
getAllAngularRootElements: Function;
|
|
23
|
-
frameworkStabilizers: Array<Function>;
|
|
24
|
-
setTimeout: Function;
|
|
25
|
-
clearTimeout: Function;
|
|
26
|
-
setInterval: Function;
|
|
27
|
-
clearInterval: Function;
|
|
28
|
-
encodeURI: Function;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export function getTypeNameForDebugging(type: any): string {
|
|
33
|
-
return type['name'] || typeof type;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export function isPresent<T>(obj: T | null | undefined): obj is T {
|
|
37
|
-
return obj != null;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function isBlank(obj: unknown): obj is null | undefined {
|
|
41
|
-
return obj == null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const STRING_MAP_PROTO = Object.getPrototypeOf({});
|
|
45
|
-
export function isStrictStringMap(obj: any): boolean {
|
|
46
|
-
return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function stringify(token: any): string {
|
|
50
|
-
if (typeof token === 'string') {
|
|
51
|
-
return token;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (token == null) {
|
|
55
|
-
return '' + token;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (token.overriddenName) {
|
|
59
|
-
return `${token.overriddenName}`;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (token.name) {
|
|
63
|
-
return `${token.name}`;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const res = token.toString();
|
|
67
|
-
const newLineIndex = res.indexOf('\n');
|
|
68
|
-
return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export class NumberWrapper {
|
|
72
|
-
static parseIntAutoRadix(text: string): number {
|
|
73
|
-
const result: number = parseInt(text);
|
|
74
|
-
if (isNaN(result)) {
|
|
75
|
-
throw new Error('Invalid integer literal when parsing ' + text);
|
|
76
|
-
}
|
|
77
|
-
return result;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
static isNumeric(value: any): boolean { return !isNaN(value - parseFloat(value)); }
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// JS has NaN !== NaN
|
|
84
|
-
export function looseIdentical(a: any, b: any): boolean {
|
|
85
|
-
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function isJsObject(o: any): boolean {
|
|
89
|
-
return o !== null && (typeof o === 'function' || typeof o === 'object');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export function print(obj: Error | Object) {
|
|
93
|
-
// tslint:disable-next-line:no-console
|
|
94
|
-
console.log(obj);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export function warn(obj: Error | Object) {
|
|
98
|
-
console.warn(obj);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export function setValueOnPath(global: any, path: string, value: any) {
|
|
102
|
-
const parts = path.split('.');
|
|
103
|
-
let obj: any = global;
|
|
104
|
-
while (parts.length > 1) {
|
|
105
|
-
const name = parts.shift()!;
|
|
106
|
-
if (obj.hasOwnProperty(name) && obj[name] != null) {
|
|
107
|
-
obj = obj[name];
|
|
108
|
-
} else {
|
|
109
|
-
obj = obj[name] = {};
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
if (obj === undefined || obj === null) {
|
|
113
|
-
obj = {};
|
|
114
|
-
}
|
|
115
|
-
obj[parts.shift()!] = value;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export function isPrimitive(obj: any): boolean {
|
|
119
|
-
return !isJsObject(obj);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function escapeRegExp(s: string): string {
|
|
123
|
-
return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
|
|
124
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["facade.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"facade.js","sourceRoot":"","sources":["facade.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC","sourcesContent":["export * from './facade/lang';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './facade/lang';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"angular.d.ts","sourceRoot":"","sources":["angular.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"angular.js","sourceRoot":"","sources":["angular.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './angular/compiler';\r\nexport * from './angular/facade';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAY,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAuB,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3D,qBACa,mBAAmB;IAC9B,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,WAAW,EAAE,GAAG,mBAAmB,CAAC,GAAG,CAAC;CAMxE"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var Angular2ParseModule_1;
|
|
2
|
-
import { __decorate } from "tslib";
|
|
3
|
-
import { NgModule } from '@angular/core';
|
|
4
|
-
import { PIPES_CONFIG } from './parse';
|
|
5
|
-
let Angular2ParseModule = Angular2ParseModule_1 = class Angular2ParseModule {
|
|
6
|
-
static forRoot(pipesConfigMap) {
|
|
7
|
-
return {
|
|
8
|
-
ngModule: Angular2ParseModule_1,
|
|
9
|
-
providers: [{ provide: PIPES_CONFIG, multi: true, useValue: pipesConfigMap || [] }]
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
Angular2ParseModule = Angular2ParseModule_1 = __decorate([
|
|
14
|
-
NgModule()
|
|
15
|
-
], Angular2ParseModule);
|
|
16
|
-
export { Angular2ParseModule };
|
|
17
|
-
//# sourceMappingURL=module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["module.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAuB,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAS,YAAY,EAAe,MAAM,SAAS,CAAC;AAGpD,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAC9B,MAAM,CAAC,OAAO,CAAC,cAA6B;QAC1C,OAAO;YACL,QAAQ,EAAE,qBAAmB;YAC7B,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,IAAI,EAAE,EAAC,CAAC;SAClF,CAAC;IACJ,CAAC;CACF,CAAA;AAPY,mBAAmB;IAD/B,QAAQ,EAAE;GACE,mBAAmB,CAO/B","sourcesContent":["import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { Parse, PIPES_CONFIG, PipesConfig } from './parse';\r\n\r\n@NgModule()\r\nexport class Angular2ParseModule {\r\n static forRoot(pipesConfigMap: PipesConfig[]): ModuleWithProviders<any> {\r\n return {\r\n ngModule: Angular2ParseModule,\r\n providers: [{provide: PIPES_CONFIG, multi: true, useValue: pipesConfigMap || []}]\r\n };\r\n }\r\n}\r\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders, NgModule } from '@angular/core';
|
|
2
|
-
import { Parse, PIPES_CONFIG, PipesConfig } from './parse';
|
|
3
|
-
|
|
4
|
-
@NgModule()
|
|
5
|
-
export class Angular2ParseModule {
|
|
6
|
-
static forRoot(pipesConfigMap: PipesConfig[]): ModuleWithProviders<any> {
|
|
7
|
-
return {
|
|
8
|
-
ngModule: Angular2ParseModule,
|
|
9
|
-
providers: [{provide: PIPES_CONFIG, multi: true, useValue: pipesConfigMap || []}]
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
export declare const PIPES_CONFIG: InjectionToken<unknown>;
|
|
3
|
-
export interface PipesConfig {
|
|
4
|
-
pipeName: string;
|
|
5
|
-
pipeInstance: any;
|
|
6
|
-
}
|
|
7
|
-
export declare class Parse {
|
|
8
|
-
private _parser;
|
|
9
|
-
private _pipesCache;
|
|
10
|
-
private _evalCache;
|
|
11
|
-
private _calcCache;
|
|
12
|
-
/**
|
|
13
|
-
* Used to dependency inject the Angular 2 parser.
|
|
14
|
-
*/
|
|
15
|
-
constructor(pipesConfigs: PipesConfig[][]);
|
|
16
|
-
eval(expression: string): Function | undefined;
|
|
17
|
-
calc(expression: string): Function;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["parse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAY,MAAM,eAAe,CAAC;AAI7E,eAAO,MAAM,YAAY,yBAAoC,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,GAAG,CAAC;CACnB;AAED,qBACa,KAAK;IAChB,OAAO,CAAC,OAAO,CAAmC;IAClD,OAAO,CAAC,WAAW,CAA4C;IAC/D,OAAO,CAAC,UAAU,CAAsD;IACxE,OAAO,CAAC,UAAU,CAAsD;IAExE;;OAEG;gBAE2C,YAAY,EAAE,WAAW,EAAE,EAAE;IAQ3E,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS;IA0B9C,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,QAAQ;CAqBnC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from "tslib";
|
|
2
|
-
import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';
|
|
3
|
-
import { Parser, Lexer } from './angular';
|
|
4
|
-
import { ParseVisitorResolver, ParseVisitorCompiler } from './visitors';
|
|
5
|
-
export const PIPES_CONFIG = new InjectionToken('PipesConfig');
|
|
6
|
-
let Parse = class Parse {
|
|
7
|
-
/**
|
|
8
|
-
* Used to dependency inject the Angular 2 parser.
|
|
9
|
-
*/
|
|
10
|
-
constructor(pipesConfigs) {
|
|
11
|
-
this._parser = new Parser(new Lexer());
|
|
12
|
-
this._pipesCache = new Map();
|
|
13
|
-
this._evalCache = new Map();
|
|
14
|
-
this._calcCache = new Map();
|
|
15
|
-
if (pipesConfigs && pipesConfigs.length) {
|
|
16
|
-
pipesConfigs
|
|
17
|
-
.filter(pipes => pipes && pipes.length)
|
|
18
|
-
.forEach(pipes => pipes.forEach((pipeData) => this._pipesCache.set(pipeData.pipeName, pipeData.pipeInstance)));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
eval(expression) {
|
|
22
|
-
if (this._evalCache.has(expression)) {
|
|
23
|
-
return this._evalCache.get(expression);
|
|
24
|
-
}
|
|
25
|
-
const visitor = new ParseVisitorCompiler();
|
|
26
|
-
let ast = this._parser.parseInterpolation(expression, 'Parse');
|
|
27
|
-
if (!ast) {
|
|
28
|
-
ast = this._parser.parseBinding(expression, 'Parse');
|
|
29
|
-
}
|
|
30
|
-
const fnBody = ast.visit(visitor);
|
|
31
|
-
const pipesCache = this._pipesCache;
|
|
32
|
-
const getFn = new Function('context', 'pipesCache', `return ${fnBody};`);
|
|
33
|
-
const evalParse = function evalParse(context) {
|
|
34
|
-
return getFn(context, pipesCache);
|
|
35
|
-
};
|
|
36
|
-
this._evalCache.set(expression, evalParse);
|
|
37
|
-
return evalParse;
|
|
38
|
-
}
|
|
39
|
-
calc(expression) {
|
|
40
|
-
if (this._calcCache.has(expression)) {
|
|
41
|
-
return this._calcCache.get(expression);
|
|
42
|
-
}
|
|
43
|
-
const visitor = new ParseVisitorResolver(this._pipesCache);
|
|
44
|
-
let ast = this._parser.parseInterpolation(expression, 'Parse');
|
|
45
|
-
if (!ast) {
|
|
46
|
-
ast = this._parser.parseBinding(expression, 'Parse');
|
|
47
|
-
}
|
|
48
|
-
const calcParse = function calcParse(context) {
|
|
49
|
-
return ast.visit(visitor, context);
|
|
50
|
-
};
|
|
51
|
-
this._calcCache.set(expression, calcParse);
|
|
52
|
-
return calcParse;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
Parse = __decorate([
|
|
56
|
-
Injectable({ providedIn: 'root' }),
|
|
57
|
-
__param(0, Optional()),
|
|
58
|
-
__param(0, Inject(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AC;QACvD,CAAC;QAED,MAAM,SAAS,GAAG,SAAS,SAAS,CAAC,OAAY;YAC/C,OAAO,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACrC,CAAC,CAAC;QAEF,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAE3C,OAAO,SAAS,CAAC;IACnB,CAAC;CACF,CAAA;AAjEY,KAAK;IADjB,UAAU,CAAC,EAAC,UAAU,EAAE,MAAM,EAAC,CAAC;IAWlB,WAAA,QAAQ,EAAE,CAAA;IAAE,WAAA,MAAM,CAAC,YAAY,CAAC,CAAA;GAVlC,KAAK,CAiEjB","sourcesContent":["import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\r\nimport { Parser, Lexer, ASTWithSource } from './angular';\r\nimport { ParseVisitorResolver, ParseVisitorCompiler } from './visitors';\r\n\r\nexport const PIPES_CONFIG = new InjectionToken('PipesConfig');\r\n\r\nexport interface PipesConfig {\r\n pipeName: string;\r\n pipeInstance: any;\r\n}\r\n\r\n@Injectable({providedIn: 'root'})\r\nexport class Parse {\r\n private _parser: Parser = new Parser(new Lexer());\r\n private _pipesCache: Map<string, any> = new Map<string, any>();\r\n private _evalCache: Map<string, Function> = new Map<string, Function>();\r\n private _calcCache: Map<string, Function> = new Map<string, Function>();\r\n\r\n /**\r\n * Used to dependency inject the Angular 2 parser.\r\n */\r\n\r\n constructor(@Optional() @Inject(PIPES_CONFIG) pipesConfigs: PipesConfig[][]) {\r\n if (pipesConfigs && pipesConfigs.length) {\r\n pipesConfigs\r\n .filter(pipes => pipes && pipes.length)\r\n .forEach(pipes => pipes.forEach((pipeData) => this._pipesCache.set(pipeData.pipeName, pipeData.pipeInstance)));\r\n }\r\n }\r\n\r\n eval(expression: string): Function | undefined {\r\n if (this._evalCache.has(expression)) {\r\n return this._evalCache.get(expression);\r\n }\r\n\r\n const visitor = new ParseVisitorCompiler();\r\n\r\n let ast: ASTWithSource = this._parser.parseInterpolation(expression, 'Parse');\r\n\r\n if (!ast) {\r\n ast = this._parser.parseBinding(expression, 'Parse');\r\n }\r\n\r\n const fnBody = ast.visit(visitor);\r\n const pipesCache = this._pipesCache;\r\n const getFn = new Function('context', 'pipesCache', `return ${fnBody};`);\r\n\r\n const evalParse = function evalParse(context: any): any {\r\n return getFn(context, pipesCache);\r\n };\r\n\r\n this._evalCache.set(expression, evalParse);\r\n\r\n return evalParse;\r\n }\r\n\r\n calc(expression: string): Function {\r\n if (this._calcCache.has(expression)) {\r\n return this._calcCache.get(expression);\r\n }\r\n\r\n const visitor = new ParseVisitorResolver(this._pipesCache);\r\n\r\n let ast: ASTWithSource = this._parser.parseInterpolation(expression, 'Parse');\r\n\r\n if (!ast) {\r\n ast = this._parser.parseBinding(expression, 'Parse');\r\n }\r\n\r\n const calcParse = function calcParse(context: any): any {\r\n return ast.visit(visitor, context);\r\n };\r\n\r\n this._calcCache.set(expression, calcParse);\r\n\r\n return calcParse;\r\n }\r\n}\r\n"]}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';
|
|
2
|
-
import { Parser, Lexer, ASTWithSource } from './angular';
|
|
3
|
-
import { ParseVisitorResolver, ParseVisitorCompiler } from './visitors';
|
|
4
|
-
|
|
5
|
-
export const PIPES_CONFIG = new InjectionToken('PipesConfig');
|
|
6
|
-
|
|
7
|
-
export interface PipesConfig {
|
|
8
|
-
pipeName: string;
|
|
9
|
-
pipeInstance: any;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@Injectable({providedIn: 'root'})
|
|
13
|
-
export class Parse {
|
|
14
|
-
private _parser: Parser = new Parser(new Lexer());
|
|
15
|
-
private _pipesCache: Map<string, any> = new Map<string, any>();
|
|
16
|
-
private _evalCache: Map<string, Function> = new Map<string, Function>();
|
|
17
|
-
private _calcCache: Map<string, Function> = new Map<string, Function>();
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Used to dependency inject the Angular 2 parser.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
constructor(@Optional() @Inject(PIPES_CONFIG) pipesConfigs: PipesConfig[][]) {
|
|
24
|
-
if (pipesConfigs && pipesConfigs.length) {
|
|
25
|
-
pipesConfigs
|
|
26
|
-
.filter(pipes => pipes && pipes.length)
|
|
27
|
-
.forEach(pipes => pipes.forEach((pipeData) => this._pipesCache.set(pipeData.pipeName, pipeData.pipeInstance)));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
eval(expression: string): Function | undefined {
|
|
32
|
-
if (this._evalCache.has(expression)) {
|
|
33
|
-
return this._evalCache.get(expression);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const visitor = new ParseVisitorCompiler();
|
|
37
|
-
|
|
38
|
-
let ast: ASTWithSource = this._parser.parseInterpolation(expression, 'Parse');
|
|
39
|
-
|
|
40
|
-
if (!ast) {
|
|
41
|
-
ast = this._parser.parseBinding(expression, 'Parse');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const fnBody = ast.visit(visitor);
|
|
45
|
-
const pipesCache = this._pipesCache;
|
|
46
|
-
const getFn = new Function('context', 'pipesCache', `return ${fnBody};`);
|
|
47
|
-
|
|
48
|
-
const evalParse = function evalParse(context: any): any {
|
|
49
|
-
return getFn(context, pipesCache);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
this._evalCache.set(expression, evalParse);
|
|
53
|
-
|
|
54
|
-
return evalParse;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
calc(expression: string): Function {
|
|
58
|
-
if (this._calcCache.has(expression)) {
|
|
59
|
-
return this._calcCache.get(expression)!;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const visitor = new ParseVisitorResolver(this._pipesCache);
|
|
63
|
-
|
|
64
|
-
let ast: ASTWithSource = this._parser.parseInterpolation(expression, 'Parse');
|
|
65
|
-
|
|
66
|
-
if (!ast) {
|
|
67
|
-
ast = this._parser.parseBinding(expression, 'Parse');
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const calcParse = function calcParse(context: any): any {
|
|
71
|
-
return ast.visit(visitor, context);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
this._calcCache.set(expression, calcParse);
|
|
75
|
-
|
|
76
|
-
return calcParse;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binary-operations.d.ts","sourceRoot":"","sources":["binary-operations.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,kBAgB3B,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export const BinaryOperations = new Map([
|
|
2
|
-
['==', (left, right) => left == right],
|
|
3
|
-
['===', (left, right) => left === right],
|
|
4
|
-
['!=', (left, right) => left != right],
|
|
5
|
-
['!==', (left, right) => left !== right],
|
|
6
|
-
['&&', (left, right) => left && right],
|
|
7
|
-
['||', (left, right) => left || right],
|
|
8
|
-
['+', (left, right) => left + right],
|
|
9
|
-
['-', (left, right) => left - right],
|
|
10
|
-
['/', (left, right) => left / right],
|
|
11
|
-
['*', (left, right) => left * right],
|
|
12
|
-
['%', (left, right) => left % right],
|
|
13
|
-
['<', (left, right) => left < right],
|
|
14
|
-
['<=', (left, right) => left <= right],
|
|
15
|
-
['>', (left, right) => left > right],
|
|
16
|
-
['>=', (left, right) => left >= right],
|
|
17
|
-
]);
|
|
18
|
-
//# sourceMappingURL=binary-operations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binary-operations.js","sourceRoot":"","sources":["binary-operations.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAc;IACjD,CAAC,IAAI,EAAE,CAAC,IAAS,EAAE,KAAU,EAAE,EAAE,CAAC,IAAI,IAAI,KAAK,CAAC;IAChD,CAAC,KAAK,EAAE,CAAC,IAAS,EAAE,K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D,CAAC,CAAC","sourcesContent":["export const BinaryOperations = new Map<string, any>([\r\n ['==', (left: any, right: any) => left == right],\r\n ['===', (left: any, right: any) => left === right],\r\n ['!=', (left: any, right: any) => left != right],\r\n ['!==', (left: any, right: any) => left !== right],\r\n ['&&', (left: any, right: any) => left && right],\r\n ['||', (left: any, right: any) => left || right],\r\n ['+', (left: any, right: any) => left + right],\r\n ['-', (left: any, right: any) => left - right],\r\n ['/', (left: any, right: any) => left / right],\r\n ['*', (left: any, right: any) => left * right],\r\n ['%', (left: any, right: any) => left % right],\r\n ['<', (left: any, right: any) => left < right],\r\n ['<=', (left: any, right: any) => left <= right],\r\n ['>', (left: any, right: any) => left > right],\r\n ['>=', (left: any, right: any) => left >= right],\r\n]);"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const BinaryOperations = new Map<string, any>([
|
|
2
|
-
['==', (left: any, right: any) => left == right],
|
|
3
|
-
['===', (left: any, right: any) => left === right],
|
|
4
|
-
['!=', (left: any, right: any) => left != right],
|
|
5
|
-
['!==', (left: any, right: any) => left !== right],
|
|
6
|
-
['&&', (left: any, right: any) => left && right],
|
|
7
|
-
['||', (left: any, right: any) => left || right],
|
|
8
|
-
['+', (left: any, right: any) => left + right],
|
|
9
|
-
['-', (left: any, right: any) => left - right],
|
|
10
|
-
['/', (left: any, right: any) => left / right],
|
|
11
|
-
['*', (left: any, right: any) => left * right],
|
|
12
|
-
['%', (left: any, right: any) => left % right],
|
|
13
|
-
['<', (left: any, right: any) => left < right],
|
|
14
|
-
['<=', (left: any, right: any) => left <= right],
|
|
15
|
-
['>', (left: any, right: any) => left > right],
|
|
16
|
-
['>=', (left: any, right: any) => left >= right],
|
|
17
|
-
]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lang.d.ts","sourceRoot":"","sources":["lang.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,UAEtC;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,WAEjC;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,WAElC;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,WAElC"}
|