@angular/compiler 13.2.3 → 14.0.0-next.3

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v13.2.3
2
+ * @license Angular v14.0.0-next.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v13.2.3
2
+ * @license Angular v14.0.0-next.3
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -6168,33 +6168,6 @@ class ASTWithName extends AST {
6168
6168
  this.nameSpan = nameSpan;
6169
6169
  }
6170
6170
  }
6171
- /**
6172
- * Represents a quoted expression of the form:
6173
- *
6174
- * quote = prefix `:` uninterpretedExpression
6175
- * prefix = identifier
6176
- * uninterpretedExpression = arbitrary string
6177
- *
6178
- * A quoted expression is meant to be pre-processed by an AST transformer that
6179
- * converts it into another AST that no longer contains quoted expressions.
6180
- * It is meant to allow third-party developers to extend Angular template
6181
- * expression language. The `uninterpretedExpression` part of the quote is
6182
- * therefore not interpreted by the Angular's own expression parser.
6183
- */
6184
- class Quote extends AST {
6185
- constructor(span, sourceSpan, prefix, uninterpretedExpression, location) {
6186
- super(span, sourceSpan);
6187
- this.prefix = prefix;
6188
- this.uninterpretedExpression = uninterpretedExpression;
6189
- this.location = location;
6190
- }
6191
- visit(visitor, context = null) {
6192
- return visitor.visitQuote(this, context);
6193
- }
6194
- toString() {
6195
- return 'Quote';
6196
- }
6197
- }
6198
6171
  class EmptyExpr extends AST {
6199
6172
  visit(visitor, context = null) {
6200
6173
  // do nothing
@@ -6574,7 +6547,6 @@ class RecursiveAstVisitor {
6574
6547
  this.visit(ast.receiver, context);
6575
6548
  this.visitAll(ast.args, context);
6576
6549
  }
6577
- visitQuote(ast, context) { }
6578
6550
  // This is not part of the AstVisitor interface, just a helper method
6579
6551
  visitAll(asts, context) {
6580
6552
  for (const ast of asts) {
@@ -6657,9 +6629,6 @@ class AstTransformer {
6657
6629
  visitChain(ast, context) {
6658
6630
  return new Chain(ast.span, ast.sourceSpan, this.visitAll(ast.expressions));
6659
6631
  }
6660
- visitQuote(ast, context) {
6661
- return new Quote(ast.span, ast.sourceSpan, ast.prefix, ast.uninterpretedExpression, ast.location);
6662
- }
6663
6632
  visitSafeKeyedRead(ast, context) {
6664
6633
  return new SafeKeyedRead(ast.span, ast.sourceSpan, ast.receiver.visit(this), ast.key.visit(this));
6665
6634
  }
@@ -6822,9 +6791,6 @@ class AstMemoryEfficientTransformer {
6822
6791
  }
6823
6792
  return ast;
6824
6793
  }
6825
- visitQuote(ast, context) {
6826
- return ast;
6827
- }
6828
6794
  visitSafeKeyedRead(ast, context) {
6829
6795
  const obj = ast.receiver.visit(this);
6830
6796
  const key = ast.key.visit(this);
@@ -7297,10 +7263,6 @@ class _AstToIrVisitor {
7297
7263
  visitAll(asts, mode) {
7298
7264
  return asts.map(ast => this._visit(ast, mode));
7299
7265
  }
7300
- visitQuote(ast, mode) {
7301
- throw new Error(`Quotes are not supported for evaluation!
7302
- Statement: ${ast.uninterpretedExpression} located at ${ast.location}`);
7303
- }
7304
7266
  visitCall(ast, mode) {
7305
7267
  const leftMostSafe = this.leftMostSafeNode(ast);
7306
7268
  if (leftMostSafe) {
@@ -7486,9 +7448,6 @@ class _AstToIrVisitor {
7486
7448
  visitPropertyWrite(ast) {
7487
7449
  return null;
7488
7450
  },
7489
- visitQuote(ast) {
7490
- return null;
7491
- },
7492
7451
  visitSafePropertyRead(ast) {
7493
7452
  return visit(this, ast.receiver) || ast;
7494
7453
  },
@@ -7565,9 +7524,6 @@ class _AstToIrVisitor {
7565
7524
  visitPropertyWrite(ast) {
7566
7525
  return false;
7567
7526
  },
7568
- visitQuote(ast) {
7569
- return false;
7570
- },
7571
7527
  visitSafePropertyRead(ast) {
7572
7528
  return false;
7573
7529
  },
@@ -9503,31 +9459,12 @@ class Parser$1 {
9503
9459
  this.errors.push(new ParserError(message, input, errLocation, ctxLocation));
9504
9460
  }
9505
9461
  _parseBindingAst(input, location, absoluteOffset, interpolationConfig) {
9506
- // Quotes expressions use 3rd-party expression language. We don't want to use
9507
- // our lexer or parser for that, so we check for that ahead of time.
9508
- const quote = this._parseQuote(input, location, absoluteOffset);
9509
- if (quote != null) {
9510
- return quote;
9511
- }
9512
9462
  this._checkNoInterpolation(input, location, interpolationConfig);
9513
9463
  const sourceToLex = this._stripComments(input);
9514
9464
  const tokens = this._lexer.tokenize(sourceToLex);
9515
9465
  return new _ParseAST(input, location, absoluteOffset, tokens, 0 /* None */, this.errors, 0)
9516
9466
  .parseChain();
9517
9467
  }
9518
- _parseQuote(input, location, absoluteOffset) {
9519
- if (input == null)
9520
- return null;
9521
- const prefixSeparatorIndex = input.indexOf(':');
9522
- if (prefixSeparatorIndex == -1)
9523
- return null;
9524
- const prefix = input.substring(0, prefixSeparatorIndex).trim();
9525
- if (!isIdentifier(prefix))
9526
- return null;
9527
- const uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);
9528
- const span = new ParseSpan(0, input.length);
9529
- return new Quote(span, span.toAbsolute(absoluteOffset), prefix, uninterpretedExpression, location);
9530
- }
9531
9468
  /**
9532
9469
  * Parse microsyntax template expression and return a list of bindings or
9533
9470
  * parsing errors in case the given expression is invalid.
@@ -19269,6 +19206,7 @@ class CompilerFacadeImpl {
19269
19206
  deps: null,
19270
19207
  pipeName: facade.pipeName,
19271
19208
  pure: facade.pure,
19209
+ isStandalone: facade.isStandalone,
19272
19210
  };
19273
19211
  const res = compilePipeFromMetadata(metadata);
19274
19212
  return this.jitExpression(res.expression, angularCoreEnv, sourceMapUrl, []);
@@ -19529,6 +19467,7 @@ function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
19529
19467
  deps: null,
19530
19468
  typeArgumentCount: 0,
19531
19469
  fullInheritance: false,
19470
+ isStandalone: declaration.isStandalone ?? false,
19532
19471
  };
19533
19472
  }
19534
19473
  function convertHostDeclarationToMetadata(host = {}) {
@@ -19710,6 +19649,7 @@ function convertDeclarePipeFacadeToMetadata(declaration) {
19710
19649
  pipeName: declaration.name,
19711
19650
  deps: null,
19712
19651
  pure: declaration.pure ?? true,
19652
+ isStandalone: declaration.isStandalone ?? false,
19713
19653
  };
19714
19654
  }
19715
19655
  function convertDeclareInjectorFacadeToMetadata(declaration) {
@@ -19736,7 +19676,7 @@ function publishFacade(global) {
19736
19676
  * Use of this source code is governed by an MIT-style license that can be
19737
19677
  * found in the LICENSE file at https://angular.io/license
19738
19678
  */
19739
- const VERSION = new Version('13.2.3');
19679
+ const VERSION = new Version('14.0.0-next.3');
19740
19680
 
19741
19681
  /**
19742
19682
  * @license
@@ -21777,7 +21717,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
21777
21717
  function compileDeclareClassMetadata(metadata) {
21778
21718
  const definitionMap = new DefinitionMap();
21779
21719
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
21780
- definitionMap.set('version', literal('13.2.3'));
21720
+ definitionMap.set('version', literal('14.0.0-next.3'));
21781
21721
  definitionMap.set('ngImport', importExpr(Identifiers.core));
21782
21722
  definitionMap.set('type', metadata.type);
21783
21723
  definitionMap.set('decorators', metadata.decorators);
@@ -21894,7 +21834,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
21894
21834
  function createDirectiveDefinitionMap(meta) {
21895
21835
  const definitionMap = new DefinitionMap();
21896
21836
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
21897
- definitionMap.set('version', literal('13.2.3'));
21837
+ definitionMap.set('version', literal('14.0.0-next.3'));
21898
21838
  // e.g. `type: MyDirective`
21899
21839
  definitionMap.set('type', meta.internalType);
21900
21840
  // e.g. `selector: 'some-dir'`
@@ -22115,7 +22055,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
22115
22055
  function compileDeclareFactoryFunction(meta) {
22116
22056
  const definitionMap = new DefinitionMap();
22117
22057
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
22118
- definitionMap.set('version', literal('13.2.3'));
22058
+ definitionMap.set('version', literal('14.0.0-next.3'));
22119
22059
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22120
22060
  definitionMap.set('type', meta.internalType);
22121
22061
  definitionMap.set('deps', compileDependencies(meta.deps));
@@ -22157,7 +22097,7 @@ function compileDeclareInjectableFromMetadata(meta) {
22157
22097
  function createInjectableDefinitionMap(meta) {
22158
22098
  const definitionMap = new DefinitionMap();
22159
22099
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
22160
- definitionMap.set('version', literal('13.2.3'));
22100
+ definitionMap.set('version', literal('14.0.0-next.3'));
22161
22101
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22162
22102
  definitionMap.set('type', meta.internalType);
22163
22103
  // Only generate providedIn property if it has a non-null value
@@ -22215,7 +22155,7 @@ function compileDeclareInjectorFromMetadata(meta) {
22215
22155
  function createInjectorDefinitionMap(meta) {
22216
22156
  const definitionMap = new DefinitionMap();
22217
22157
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
22218
- definitionMap.set('version', literal('13.2.3'));
22158
+ definitionMap.set('version', literal('14.0.0-next.3'));
22219
22159
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22220
22160
  definitionMap.set('type', meta.internalType);
22221
22161
  definitionMap.set('providers', meta.providers);
@@ -22252,7 +22192,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
22252
22192
  function createNgModuleDefinitionMap(meta) {
22253
22193
  const definitionMap = new DefinitionMap();
22254
22194
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
22255
- definitionMap.set('version', literal('13.2.3'));
22195
+ definitionMap.set('version', literal('14.0.0-next.3'));
22256
22196
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22257
22197
  definitionMap.set('type', meta.internalType);
22258
22198
  // We only generate the keys in the metadata if the arrays contain values.
@@ -22310,7 +22250,7 @@ function compileDeclarePipeFromMetadata(meta) {
22310
22250
  function createPipeDefinitionMap(meta) {
22311
22251
  const definitionMap = new DefinitionMap();
22312
22252
  definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
22313
- definitionMap.set('version', literal('13.2.3'));
22253
+ definitionMap.set('version', literal('14.0.0-next.3'));
22314
22254
  definitionMap.set('ngImport', importExpr(Identifiers.core));
22315
22255
  // e.g. `type: MyPipe`
22316
22256
  definitionMap.set('type', meta.internalType);
@@ -22360,5 +22300,5 @@ publishFacade(_global);
22360
22300
  * found in the LICENSE file at https://angular.io/license
22361
22301
  */
22362
22302
 
22363
- export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, Quote, R3BoundTarget, Identifiers as R3Identifiers, R3TargetBinder, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };
22303
+ export { AST, ASTWithName, ASTWithSource, AbsoluteSourceSpan, ArrayType, AstMemoryEfficientTransformer, AstTransformer, Attribute, Binary, BinaryOperator, BinaryOperatorExpr, BindingPipe, BoundElementProperty, BuiltinType, BuiltinTypeName, CUSTOM_ELEMENTS_SCHEMA, Call, Chain, ChangeDetectionStrategy, CommaExpr, Comment, CompilerConfig, Conditional, ConditionalExpr, ConstantPool, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DYNAMIC_TYPE, DeclareFunctionStmt, DeclareVarStmt, DomElementSchemaRegistry, EOF, Element, ElementSchemaRegistry, EmitterVisitorContext, EmptyExpr, Expansion, ExpansionCase, Expression, ExpressionBinding, ExpressionStatement, ExpressionType, ExternalExpr, ExternalReference, FactoryTarget$1 as FactoryTarget, FunctionExpr, HtmlParser, HtmlTagDefinition, I18NHtmlParser, IfStmt, ImplicitReceiver, InstantiateExpr, Interpolation, InterpolationConfig, InvokeFunctionExpr, JSDocComment, JitEvaluator, KeyedRead, KeyedWrite, LeadingComment, Lexer, LiteralArray, LiteralArrayExpr, LiteralExpr, LiteralMap, LiteralMapExpr, LiteralPrimitive, LocalizedString, MapType, MessageBundle, NONE_TYPE, NO_ERRORS_SCHEMA, NodeWithI18n, NonNullAssert, NotExpr, ParseError, ParseErrorLevel, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseSpan, ParseTreeResult, ParsedEvent, ParsedProperty, ParsedPropertyType, ParsedVariable, Parser$1 as Parser, ParserError, PrefixNot, PropertyRead, PropertyWrite, R3BoundTarget, Identifiers as R3Identifiers, R3TargetBinder, ReadKeyExpr, ReadPropExpr, ReadVarExpr, RecursiveAstVisitor, RecursiveVisitor, ResourceLoader, ReturnStatement, STRING_TYPE, SafeCall, SafeKeyedRead, SafePropertyRead, SelectorContext, SelectorListContext, SelectorMatcher, Serializer, SplitInterpolation, Statement, StmtModifier, TagContentType, TaggedTemplateExpr, TemplateBindingParseResult, TemplateLiteral, TemplateLiteralElement, Text, ThisReceiver, BoundAttribute as TmplAstBoundAttribute, BoundEvent as TmplAstBoundEvent, BoundText as TmplAstBoundText, Content as TmplAstContent, Element$1 as TmplAstElement, Icu$1 as TmplAstIcu, RecursiveVisitor$1 as TmplAstRecursiveVisitor, Reference as TmplAstReference, Template as TmplAstTemplate, Text$3 as TmplAstText, TextAttribute as TmplAstTextAttribute, Variable as TmplAstVariable, Token, TokenType, TreeError, Type, TypeModifier, TypeofExpr, Unary, UnaryOperator, UnaryOperatorExpr, VERSION, VariableBinding, Version, ViewEncapsulation, WrappedNodeExpr, WriteKeyExpr, WritePropExpr, WriteVarExpr, Xliff, Xliff2, Xmb, XmlParser, Xtb, _ParseAST, compileClassMetadata, compileComponentFromMetadata, compileDeclareClassMetadata, compileDeclareComponentFromMetadata, compileDeclareDirectiveFromMetadata, compileDeclareFactoryFunction, compileDeclareInjectableFromMetadata, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileDeclarePipeFromMetadata, compileDirectiveFromMetadata, compileFactoryFunction, compileInjectable, compileInjector, compileNgModule, compilePipeFromMetadata, computeMsgId, core, createInjectableType, createMayBeForwardRefExpression, devOnlyGuardedExpression, emitDistinctChangesOnlyDefaultValue, getHtmlTagDefinition, getNsPrefix, getSafePropertyAccessString, identifierName, isIdentifier, isNgContainer, isNgContent, isNgTemplate, jsDocComment, leadingComment, literalMap, makeBindingParser, mergeNsAndName, output_ast as outputAst, parseHostBindings, parseTemplate, preserveWhitespacesDefault, publishFacade, r3JitTypeSourceSpan, sanitizeIdentifier, splitNsName, verifyHostBindings, visitAll };
22364
22304
  //# sourceMappingURL=compiler.mjs.map