@auscope/angular2parse 18.0.0 → 19.0.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 (48) hide show
  1. package/README.md +1 -1
  2. package/fesm2022/auscope-angular2parse.mjs +2033 -0
  3. package/fesm2022/auscope-angular2parse.mjs.map +1 -0
  4. package/index.d.ts +5 -0
  5. package/lib/angular/compiler/assertions.d.ts +9 -0
  6. package/lib/angular/compiler/ast.d.ts +242 -0
  7. package/lib/angular/compiler/chars.d.ts +69 -0
  8. package/lib/angular/compiler/interpolation-config.d.ts +14 -0
  9. package/lib/angular/compiler/lexer.d.ts +44 -0
  10. package/lib/angular/compiler/parser.d.ts +92 -0
  11. package/{projects/angular2parse/src/lib/angular/compiler.ts → lib/angular/compiler.d.ts} +6 -6
  12. package/lib/angular/facade/lang.d.ts +44 -0
  13. package/lib/angular/facade.d.ts +1 -0
  14. package/{projects/angular2parse/src/lib/angular.ts → lib/angular.d.ts} +2 -2
  15. package/lib/module.d.ts +9 -0
  16. package/lib/parse.d.ts +21 -0
  17. package/lib/util/binary-operations.d.ts +1 -0
  18. package/lib/util/lang.d.ts +4 -0
  19. package/{projects/angular2parse/src/lib/util.ts → lib/util.d.ts} +2 -2
  20. package/lib/visitors/parse-visitor-compiler.d.ts +23 -0
  21. package/lib/visitors/parse-visitor-resolver.d.ts +25 -0
  22. package/{projects/angular2parse/src/lib/visitors.ts → lib/visitors.d.ts} +2 -2
  23. package/package.json +34 -42
  24. package/public-api.d.ts +2 -0
  25. package/.editorconfig +0 -13
  26. package/LICENSE +0 -21
  27. package/angular.json +0 -30
  28. package/projects/angular2parse/README.md +0 -49
  29. package/projects/angular2parse/ng-package.json +0 -7
  30. package/projects/angular2parse/package.json +0 -19
  31. package/projects/angular2parse/src/lib/angular/compiler/assertions.ts +0 -49
  32. package/projects/angular2parse/src/lib/angular/compiler/ast.ts +0 -393
  33. package/projects/angular2parse/src/lib/angular/compiler/chars.ts +0 -89
  34. package/projects/angular2parse/src/lib/angular/compiler/interpolation-config.ts +0 -25
  35. package/projects/angular2parse/src/lib/angular/compiler/lexer.ts +0 -383
  36. package/projects/angular2parse/src/lib/angular/compiler/parser.ts +0 -811
  37. package/projects/angular2parse/src/lib/angular/facade/lang.ts +0 -124
  38. package/projects/angular2parse/src/lib/angular/facade.ts +0 -1
  39. package/projects/angular2parse/src/lib/module.ts +0 -12
  40. package/projects/angular2parse/src/lib/parse.ts +0 -78
  41. package/projects/angular2parse/src/lib/util/binary-operations.ts +0 -17
  42. package/projects/angular2parse/src/lib/util/lang.ts +0 -15
  43. package/projects/angular2parse/src/lib/visitors/parse-visitor-compiler.ts +0 -149
  44. package/projects/angular2parse/src/lib/visitors/parse-visitor-resolver.ts +0 -208
  45. package/projects/angular2parse/src/public-api.ts +0 -5
  46. package/projects/angular2parse/tsconfig.lib.json +0 -19
  47. package/projects/angular2parse/tsconfig.lib.prod.json +0 -9
  48. package/tsconfig.json +0 -33
@@ -0,0 +1,69 @@
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 declare const $EOF = 0;
9
+ export declare const $TAB = 9;
10
+ export declare const $LF = 10;
11
+ export declare const $VTAB = 11;
12
+ export declare const $FF = 12;
13
+ export declare const $CR = 13;
14
+ export declare const $SPACE = 32;
15
+ export declare const $BANG = 33;
16
+ export declare const $DQ = 34;
17
+ export declare const $HASH = 35;
18
+ export declare const $$ = 36;
19
+ export declare const $PERCENT = 37;
20
+ export declare const $AMPERSAND = 38;
21
+ export declare const $SQ = 39;
22
+ export declare const $LPAREN = 40;
23
+ export declare const $RPAREN = 41;
24
+ export declare const $STAR = 42;
25
+ export declare const $PLUS = 43;
26
+ export declare const $COMMA = 44;
27
+ export declare const $MINUS = 45;
28
+ export declare const $PERIOD = 46;
29
+ export declare const $SLASH = 47;
30
+ export declare const $COLON = 58;
31
+ export declare const $SEMICOLON = 59;
32
+ export declare const $LT = 60;
33
+ export declare const $EQ = 61;
34
+ export declare const $GT = 62;
35
+ export declare const $QUESTION = 63;
36
+ export declare const $0 = 48;
37
+ export declare const $9 = 57;
38
+ export declare const $A = 65;
39
+ export declare const $E = 69;
40
+ export declare const $F = 70;
41
+ export declare const $X = 88;
42
+ export declare const $Z = 90;
43
+ export declare const $LBRACKET = 91;
44
+ export declare const $BACKSLASH = 92;
45
+ export declare const $RBRACKET = 93;
46
+ export declare const $CARET = 94;
47
+ export declare const $_ = 95;
48
+ export declare const $a = 97;
49
+ export declare const $e = 101;
50
+ export declare const $f = 102;
51
+ export declare const $n = 110;
52
+ export declare const $r = 114;
53
+ export declare const $t = 116;
54
+ export declare const $u = 117;
55
+ export declare const $v = 118;
56
+ export declare const $x = 120;
57
+ export declare const $z = 122;
58
+ export declare const $LBRACE = 123;
59
+ export declare const $BAR = 124;
60
+ export declare const $RBRACE = 125;
61
+ export declare const $NBSP = 160;
62
+ export declare const $PIPE = 124;
63
+ export declare const $TILDA = 126;
64
+ export declare const $AT = 64;
65
+ export declare const $BT = 96;
66
+ export declare function isWhitespace(code: number): boolean;
67
+ export declare function isDigit(code: number): boolean;
68
+ export declare function isAsciiLetter(code: number): boolean;
69
+ export declare function isAsciiHexDigit(code: number): boolean;
@@ -0,0 +1,14 @@
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 declare class InterpolationConfig {
9
+ start: string;
10
+ end: string;
11
+ static fromArray(markers: [string, string]): InterpolationConfig;
12
+ constructor(start: string, end: string);
13
+ }
14
+ export declare const DEFAULT_INTERPOLATION_CONFIG: InterpolationConfig;
@@ -0,0 +1,44 @@
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 declare enum TokenType {
9
+ Character = 0,
10
+ Identifier = 1,
11
+ Keyword = 2,
12
+ String = 3,
13
+ Operator = 4,
14
+ Number = 5,
15
+ Error = 6
16
+ }
17
+ export declare class Lexer {
18
+ tokenize(text: string): Token[];
19
+ }
20
+ export declare class Token {
21
+ index: number;
22
+ type: TokenType;
23
+ numValue: number;
24
+ strValue: string;
25
+ constructor(index: number, type: TokenType, numValue: number, strValue: string);
26
+ isCharacter(code: number): boolean;
27
+ isNumber(): boolean;
28
+ isString(): boolean;
29
+ isOperator(operater: string): boolean;
30
+ isIdentifier(): boolean;
31
+ isKeyword(): boolean;
32
+ isKeywordLet(): boolean;
33
+ isKeywordNull(): boolean;
34
+ isKeywordUndefined(): boolean;
35
+ isKeywordTrue(): boolean;
36
+ isKeywordFalse(): boolean;
37
+ isKeywordThis(): boolean;
38
+ isError(): boolean;
39
+ toNumber(): number;
40
+ toString(): string;
41
+ }
42
+ export declare const EOF: Token;
43
+ export declare function isIdentifier(input: string): boolean;
44
+ export declare function isQuote(code: number): boolean;
@@ -0,0 +1,92 @@
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
+ import { InterpolationConfig } from './interpolation-config';
9
+ import { AST, ASTWithSource, BindingPipe, LiteralMap, ParseSpan, ParserError, TemplateBinding } from './ast';
10
+ import { Lexer, Token } from './lexer';
11
+ export declare class SplitInterpolation {
12
+ strings: string[];
13
+ expressions: string[];
14
+ offsets: number[];
15
+ constructor(strings: string[], expressions: string[], offsets: number[]);
16
+ }
17
+ export declare class TemplateBindingParseResult {
18
+ templateBindings: TemplateBinding[];
19
+ warnings: string[];
20
+ errors: ParserError[];
21
+ constructor(templateBindings: TemplateBinding[], warnings: string[], errors: ParserError[]);
22
+ }
23
+ export declare class Parser {
24
+ private _lexer;
25
+ private errors;
26
+ constructor(_lexer: Lexer);
27
+ parseAction(input: string, location: any, interpolationConfig?: InterpolationConfig): ASTWithSource;
28
+ parseBinding(input: string, location: any, interpolationConfig?: InterpolationConfig): ASTWithSource;
29
+ parseSimpleBinding(input: string, location: string, interpolationConfig?: InterpolationConfig): ASTWithSource;
30
+ private _reportError;
31
+ private _parseBindingAst;
32
+ private _parseQuote;
33
+ parseTemplateBindings(prefixToken: string, input: string, location: any): TemplateBindingParseResult;
34
+ parseInterpolation(input: string, location: any, interpolationConfig?: InterpolationConfig): ASTWithSource;
35
+ splitInterpolation(input: string, location: string, interpolationConfig?: InterpolationConfig): SplitInterpolation;
36
+ wrapLiteralPrimitive(input: string, location: any): ASTWithSource;
37
+ private _stripComments;
38
+ private _commentStart;
39
+ private _checkNoInterpolation;
40
+ private _findInterpolationErrorColumn;
41
+ }
42
+ export declare class _ParseAST {
43
+ input: string;
44
+ location: any;
45
+ tokens: Token[];
46
+ inputLength: number;
47
+ parseAction: boolean;
48
+ private errors;
49
+ private offset;
50
+ private rparensExpected;
51
+ private rbracketsExpected;
52
+ private rbracesExpected;
53
+ index: number;
54
+ constructor(input: string, location: any, tokens: Token[], inputLength: number, parseAction: boolean, errors: ParserError[], offset: number);
55
+ peek(offset: number): Token;
56
+ get next(): Token;
57
+ get inputIndex(): number;
58
+ span(start: number): ParseSpan;
59
+ advance(): void;
60
+ optionalCharacter(code: number): boolean;
61
+ peekKeywordLet(): boolean;
62
+ expectCharacter(code: number): void;
63
+ optionalOperator(op: string): boolean;
64
+ expectOperator(operator: string): void;
65
+ expectIdentifierOrKeyword(): string;
66
+ expectIdentifierOrKeywordOrString(): string;
67
+ parseChain(): AST;
68
+ parsePipe(): AST;
69
+ parseExpression(): AST;
70
+ parseConditional(): AST;
71
+ parseLogicalOr(): AST;
72
+ parseLogicalAnd(): AST;
73
+ parseEquality(): AST;
74
+ parseRelational(): AST;
75
+ parseAdditive(): AST;
76
+ parseMultiplicative(): AST;
77
+ parsePrefix(): AST;
78
+ parseCallChain(): AST;
79
+ parsePrimary(): AST;
80
+ parseExpressionList(terminator: number): AST[];
81
+ parseLiteralMap(): LiteralMap;
82
+ parseAccessMemberOrMethodCall(receiver: AST, isSafe?: boolean): AST;
83
+ parseCallArguments(): BindingPipe[];
84
+ /**
85
+ * An identifier, a keyword, a string with an optional `-` inbetween.
86
+ */
87
+ expectTemplateBindingKey(): string;
88
+ parseTemplateBindings(): TemplateBindingParseResult;
89
+ error(message: string, index?: number): void;
90
+ private locationText;
91
+ private skip;
92
+ }
@@ -1,6 +1,6 @@
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';
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';
@@ -0,0 +1,44 @@
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(obj: any): boolean;
31
+ export declare function isBlank(obj: any): boolean;
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;
@@ -0,0 +1 @@
1
+ export * from './facade/lang';
@@ -1,2 +1,2 @@
1
- export * from './angular/compiler';
2
- export * from './angular/facade';
1
+ export * from './angular/compiler';
2
+ export * from './angular/facade';
@@ -0,0 +1,9 @@
1
+ import { ModuleWithProviders } from '@angular/core';
2
+ import { PipesConfig } from './parse';
3
+ import * as i0 from "@angular/core";
4
+ export declare class Angular2ParseModule {
5
+ static forRoot(pipesConfigMap: PipesConfig[]): ModuleWithProviders<any>;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<Angular2ParseModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<Angular2ParseModule, never, never, never>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<Angular2ParseModule>;
9
+ }
package/lib/parse.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare const PIPES_CONFIG: InjectionToken<unknown>;
4
+ export interface PipesConfig {
5
+ pipeName: string;
6
+ pipeInstance: any;
7
+ }
8
+ export declare class Parse {
9
+ private _parser;
10
+ private _pipesCache;
11
+ private _evalCache;
12
+ private _calcCache;
13
+ /**
14
+ * Used to dependency inject the Angular 2 parser.
15
+ */
16
+ constructor(pipesConfigs: PipesConfig[][]);
17
+ eval(expression: string): Function;
18
+ calc(expression: string): Function;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<Parse, [{ optional: true; }]>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<Parse>;
21
+ }
@@ -0,0 +1 @@
1
+ export declare const BinaryOperations: Map<string, any>;
@@ -0,0 +1,4 @@
1
+ export declare function compileToJSON(json: any): string;
2
+ export declare function isPresent(obj: any): boolean;
3
+ export declare function isJsObject(obj: any): boolean;
4
+ export declare function isFunction(val: any): boolean;
@@ -1,2 +1,2 @@
1
- export * from './util/binary-operations';
2
- export * from './util/lang';
1
+ export * from './util/binary-operations';
2
+ export * from './util/lang';
@@ -0,0 +1,23 @@
1
+ import { AST, RecursiveAstVisitor, PropertyRead, MethodCall, KeyedRead, ImplicitReceiver, LiteralPrimitive, Binary, Chain, Conditional, BindingPipe, FunctionCall, Interpolation, KeyedWrite, LiteralArray, LiteralMap, PrefixNot, PropertyWrite, SafePropertyRead, SafeMethodCall, Quote } from '../angular';
2
+ export declare class ParseVisitorCompiler extends RecursiveAstVisitor {
3
+ visitBinary(ast: Binary): any;
4
+ visitChain(ast: Chain): any;
5
+ visitConditional(ast: Conditional): any;
6
+ visitPipe(ast: BindingPipe): any;
7
+ visitFunctionCall(ast: FunctionCall): any;
8
+ visitImplicitReceiver(ast: ImplicitReceiver): any;
9
+ visitInterpolation(ast: Interpolation): any;
10
+ visitKeyedRead(ast: KeyedRead): any;
11
+ visitKeyedWrite(ast: KeyedWrite): any;
12
+ visitLiteralArray(ast: LiteralArray): any;
13
+ visitLiteralMap(ast: LiteralMap): any;
14
+ visitLiteralPrimitive(ast: LiteralPrimitive): any;
15
+ visitMethodCall(ast: MethodCall): any;
16
+ visitPrefixNot(ast: PrefixNot): any;
17
+ visitPropertyRead(ast: PropertyRead): any;
18
+ visitPropertyWrite(ast: PropertyWrite): any;
19
+ visitSafePropertyRead(ast: SafePropertyRead): any;
20
+ visitSafeMethodCall(ast: SafeMethodCall): any;
21
+ visitAll(asts: AST[]): any;
22
+ visitQuote(ast: Quote): any;
23
+ }
@@ -0,0 +1,25 @@
1
+ import { AST, RecursiveAstVisitor, PropertyRead, MethodCall, KeyedRead, ImplicitReceiver, LiteralPrimitive, Binary, Chain, Conditional, BindingPipe, FunctionCall, Interpolation, KeyedWrite, LiteralArray, LiteralMap, PrefixNot, PropertyWrite, SafePropertyRead, SafeMethodCall, Quote } from '../angular';
2
+ export declare class ParseVisitorResolver extends RecursiveAstVisitor {
3
+ private pipes;
4
+ constructor(pipes: Map<string, any>);
5
+ visitBinary(ast: Binary, context: any): any;
6
+ visitChain(ast: Chain, context: any): any;
7
+ visitConditional(ast: Conditional, context: any): any;
8
+ visitPipe(ast: BindingPipe, context: any): any;
9
+ visitFunctionCall(ast: FunctionCall, context: any): any;
10
+ visitImplicitReceiver(ast: ImplicitReceiver, context: any): any;
11
+ visitInterpolation(ast: Interpolation, context: any): any;
12
+ visitKeyedRead(ast: KeyedRead, context: any): any;
13
+ visitKeyedWrite(ast: KeyedWrite, context: any): any;
14
+ visitLiteralArray(ast: LiteralArray, context: any): any;
15
+ visitLiteralMap(ast: LiteralMap, context: any): any;
16
+ visitLiteralPrimitive(ast: LiteralPrimitive, context: any): any;
17
+ visitMethodCall(ast: MethodCall, context: any): any;
18
+ visitPrefixNot(ast: PrefixNot, context: any): any;
19
+ visitPropertyRead(ast: PropertyRead, context: any): any;
20
+ visitPropertyWrite(ast: PropertyWrite, context: any): any;
21
+ visitSafePropertyRead(ast: SafePropertyRead, context: any): any;
22
+ visitSafeMethodCall(ast: SafeMethodCall, context: any): any;
23
+ visitAll(asts: AST[], context: any): any;
24
+ visitQuote(ast: Quote, context: any): any;
25
+ }
@@ -1,2 +1,2 @@
1
- export * from './visitors/parse-visitor-compiler';
2
- export * from './visitors/parse-visitor-resolver';
1
+ export * from './visitors/parse-visitor-compiler';
2
+ export * from './visitors/parse-visitor-resolver';
package/package.json CHANGED
@@ -1,42 +1,34 @@
1
- {
2
- "name": "@auscope/angular2parse",
3
- "version": "18.0.0",
4
- "author": "Articode",
5
- "license": "MIT",
6
- "description": "Fork of articode repo for Angular v18",
7
- "bugs": {
8
- "url": "https://github.com/AuScope/angular2parse/issues"
9
- },
10
- "homepage": "https://github.com/AuScope/angular2parse#readme",
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/AuScope/angular2parse.git"
14
- },
15
- "scripts": {
16
- "ng": "ng",
17
- "build": "ng build",
18
- "build:prod": "ng build --configuration production",
19
- "lib:publish": "npm run build:prod && cd dist/angular2parse && npm publish"
20
- },
21
- "dependencies": {
22
- "@angular/common": "^18.2.8",
23
- "@angular/compiler": "^18.2.8",
24
- "@angular/core": "^18.2.8",
25
- "@angular/localize": "^18.2.8",
26
- "@angular/platform-browser": "^18.2.8",
27
- "@angular/platform-browser-dynamic": "^18.2.8",
28
- "rxjs": "~6.6.7",
29
- "tslib": "^2.4.1",
30
- "zone.js": "~0.14.10"
31
- },
32
- "devDependencies": {
33
- "@angular-devkit/build-angular": "^18.2.9",
34
- "@angular/cli": "^18.2.9",
35
- "@angular/compiler-cli": "^18.2.8",
36
- "@angular/language-service": "^18.2.8",
37
- "@types/node": "^13.13.52",
38
- "ng-packagr": "^18.2.1",
39
- "ts-node": "~8.10.2",
40
- "typescript": "~5.4.5"
41
- }
42
- }
1
+ {
2
+ "name": "@auscope/angular2parse",
3
+ "version": "19.0.0",
4
+ "license": "MIT",
5
+ "description": "Fork of articode repo for Angular v19",
6
+ "bugs": {
7
+ "url": "https://github.com/AuScope/angular2parse/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/AuScope/angular2parse.git",
12
+ "directory": "projects/angular2parse"
13
+ },
14
+ "homepage": "https://github.com/AuScope/angular2parse#readme",
15
+ "peerDependencies": {
16
+ "@angular/common": "^19.2.11",
17
+ "@angular/core": "^19.2.11"
18
+ },
19
+ "module": "fesm2022/auscope-angular2parse.mjs",
20
+ "typings": "index.d.ts",
21
+ "exports": {
22
+ "./package.json": {
23
+ "default": "./package.json"
24
+ },
25
+ ".": {
26
+ "types": "./index.d.ts",
27
+ "default": "./fesm2022/auscope-angular2parse.mjs"
28
+ }
29
+ },
30
+ "sideEffects": false,
31
+ "dependencies": {
32
+ "tslib": "^2.3.0"
33
+ }
34
+ }
@@ -0,0 +1,2 @@
1
+ export * from './lib/module';
2
+ export * from './lib/parse';
package/.editorconfig DELETED
@@ -1,13 +0,0 @@
1
- # Editor configuration, see https://editorconfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- indent_style = space
7
- indent_size = 2
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
10
-
11
- [*.md]
12
- max_line_length = off
13
- trim_trailing_whitespace = false
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Articode 2017
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/angular.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
- "version": 1,
4
- "newProjectRoot": "projects",
5
- "projects": {
6
- "angular2parse": {
7
- "projectType": "library",
8
- "root": "projects/angular2parse",
9
- "sourceRoot": "projects/angular2parse/src",
10
- "prefix": "lib",
11
- "architect": {
12
- "build": {
13
- "builder": "@angular-devkit/build-angular:ng-packagr",
14
- "options": {
15
- "tsConfig": "projects/angular2parse/tsconfig.lib.json",
16
- "project": "projects/angular2parse/ng-package.json"
17
- },
18
- "configurations": {
19
- "production": {
20
- "tsConfig": "projects/angular2parse/tsconfig.lib.prod.json"
21
- }
22
- }
23
- }
24
- }
25
- }
26
- },
27
- "cli": {
28
- "analytics": false
29
- }
30
- }
@@ -1,49 +0,0 @@
1
- # angular2parse
2
- Parse util for angular expressions: html string -> angular temaplte
3
-
4
- # install
5
- `npm install angular2parse`
6
-
7
- ```typescript
8
- // app.module.ts
9
- @NgModule({
10
- imports: [Angular2ParseModule, ...],
11
- // ...
12
- })
13
- class AppModule {}
14
- ```
15
- # usage
16
- ```typescript
17
- import { Parse } from 'angular2parse';
18
-
19
- @Injectable()
20
- class MyService {
21
- constructor(private parser: Parse) {}
22
-
23
- parseAngularString() {
24
- const expression = `{
25
- positions: track.positions,
26
- cornerType: getCornerType(),
27
- material: track.color,
28
- width : 200000.0 }`;
29
-
30
- const expressionEvalFn = this.parser.eval(expression)
31
-
32
- const context = {
33
- getCornerType: () => 'value',
34
- track: {
35
- positions: [1,2,3],
36
- color: 'red',
37
- }
38
- }
39
- };
40
-
41
- const result = expressionEvalFn(context);
42
- console.log(result);
43
- // {positions: [1,2,3], cornerType: 'value', material: 'red', width: 2000}
44
-
45
- }
46
-
47
- ```
48
-
49
- ```
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/angular2parse",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }
@@ -1,19 +0,0 @@
1
- {
2
- "name": "@auscope/angular2parse",
3
- "version": "18.0.0",
4
- "license": "MIT",
5
- "description": "Fork of articode repo for Angular v18",
6
- "bugs": {
7
- "url": "https://github.com/AuScope/angular2parse/issues"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/AuScope/angular2parse.git",
12
- "directory": "projects/angular2parse"
13
- },
14
- "homepage": "https://github.com/AuScope/angular2parse#readme",
15
- "peerDependencies": {
16
- "@angular/common": "^18.2.8",
17
- "@angular/core": "^18.2.8"
18
- }
19
- }