@angular/compiler 17.1.0-next.0 → 17.1.0-next.1

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 (47) hide show
  1. package/esm2022/src/compiler.mjs +2 -3
  2. package/esm2022/src/expression_parser/parser.mjs +2 -2
  3. package/esm2022/src/i18n/digest.mjs +4 -1
  4. package/esm2022/src/i18n/extractor_merger.mjs +4 -2
  5. package/esm2022/src/i18n/i18n_ast.mjs +27 -1
  6. package/esm2022/src/i18n/i18n_html_parser.mjs +2 -2
  7. package/esm2022/src/i18n/i18n_parser.mjs +23 -6
  8. package/esm2022/src/i18n/message_bundle.mjs +7 -1
  9. package/esm2022/src/i18n/serializers/placeholder.mjs +29 -1
  10. package/esm2022/src/i18n/serializers/serializer.mjs +6 -1
  11. package/esm2022/src/i18n/serializers/xliff.mjs +7 -1
  12. package/esm2022/src/i18n/serializers/xliff2.mjs +19 -1
  13. package/esm2022/src/i18n/serializers/xmb.mjs +12 -1
  14. package/esm2022/src/i18n/translation_bundle.mjs +6 -1
  15. package/esm2022/src/jit_compiler_facade.mjs +2 -2
  16. package/esm2022/src/ml_parser/ast.mjs +4 -4
  17. package/esm2022/src/ml_parser/defaults.mjs +24 -0
  18. package/esm2022/src/ml_parser/lexer.mjs +2 -2
  19. package/esm2022/src/render3/partial/class_metadata.mjs +1 -1
  20. package/esm2022/src/render3/partial/component.mjs +2 -2
  21. package/esm2022/src/render3/partial/directive.mjs +1 -1
  22. package/esm2022/src/render3/partial/factory.mjs +1 -1
  23. package/esm2022/src/render3/partial/injectable.mjs +1 -1
  24. package/esm2022/src/render3/partial/injector.mjs +1 -1
  25. package/esm2022/src/render3/partial/ng_module.mjs +1 -1
  26. package/esm2022/src/render3/partial/pipe.mjs +1 -1
  27. package/esm2022/src/render3/r3_ast.mjs +17 -9
  28. package/esm2022/src/render3/r3_control_flow.mjs +7 -7
  29. package/esm2022/src/render3/r3_deferred_blocks.mjs +5 -5
  30. package/esm2022/src/render3/view/api.mjs +1 -1
  31. package/esm2022/src/render3/view/i18n/context.mjs +13 -1
  32. package/esm2022/src/render3/view/i18n/get_msg_utils.mjs +4 -1
  33. package/esm2022/src/render3/view/i18n/icu_serializer.mjs +4 -1
  34. package/esm2022/src/render3/view/i18n/localize_utils.mjs +6 -1
  35. package/esm2022/src/render3/view/i18n/meta.mjs +5 -4
  36. package/esm2022/src/render3/view/template.mjs +79 -33
  37. package/esm2022/src/template/pipeline/ir/src/ops/update.mjs +2 -1
  38. package/esm2022/src/template/pipeline/src/instruction.mjs +3 -3
  39. package/esm2022/src/template/pipeline/src/phases/reify.mjs +2 -2
  40. package/esm2022/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs +12 -5
  41. package/esm2022/src/template_parser/binding_parser.mjs +1 -1
  42. package/esm2022/src/version.mjs +1 -1
  43. package/fesm2022/compiler.mjs +288 -76
  44. package/fesm2022/compiler.mjs.map +1 -1
  45. package/index.d.ts +36 -12
  46. package/package.json +2 -2
  47. package/esm2022/src/ml_parser/interpolation_config.mjs +0 -23
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.1.0-next.0
2
+ * @license Angular v17.1.0-next.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -437,15 +437,14 @@ export declare const enum BindingType {
437
437
  Animation = 4
438
438
  }
439
439
 
440
- export declare class Block implements BaseNode {
440
+ export declare class Block extends NodeWithI18n {
441
441
  name: string;
442
442
  parameters: BlockParameter[];
443
443
  children: Node_2[];
444
- sourceSpan: ParseSourceSpan;
445
444
  nameSpan: ParseSourceSpan;
446
445
  startSourceSpan: ParseSourceSpan;
447
446
  endSourceSpan: ParseSourceSpan | null;
448
- constructor(name: string, parameters: BlockParameter[], children: Node_2[], sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan?: ParseSourceSpan | null);
447
+ constructor(name: string, parameters: BlockParameter[], children: Node_2[], sourceSpan: ParseSourceSpan, nameSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan?: ParseSourceSpan | null, i18n?: I18nMeta_2);
449
448
  visit(visitor: Visitor, context: any): any;
450
449
  }
451
450
 
@@ -464,6 +463,19 @@ export declare class BlockParameter implements BaseNode {
464
463
  visit(visitor: Visitor, context: any): any;
465
464
  }
466
465
 
466
+ declare class BlockPlaceholder implements Node_3 {
467
+ name: string;
468
+ parameters: string[];
469
+ startName: string;
470
+ closeName: string;
471
+ children: Node_3[];
472
+ sourceSpan: ParseSourceSpan;
473
+ startSourceSpan: ParseSourceSpan | null;
474
+ endSourceSpan: ParseSourceSpan | null;
475
+ constructor(name: string, parameters: string[], startName: string, closeName: string, children: Node_3[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan | null, endSourceSpan: ParseSourceSpan | null);
476
+ visit(visitor: Visitor_2, context?: any): any;
477
+ }
478
+
467
479
  declare const BOOL_TYPE: BuiltinType;
468
480
 
469
481
  export declare class BoundElementProperty {
@@ -614,6 +626,7 @@ declare class CloneVisitor implements Visitor_2 {
614
626
  visitTagPlaceholder(ph: TagPlaceholder, context?: any): TagPlaceholder;
615
627
  visitPlaceholder(ph: Placeholder, context?: any): Placeholder;
616
628
  visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): IcuPlaceholder;
629
+ visitBlockPlaceholder(ph: BlockPlaceholder, context?: any): BlockPlaceholder;
617
630
  }
618
631
 
619
632
  export declare class CommaExpr extends Expression {
@@ -1442,6 +1455,7 @@ declare namespace i18n {
1442
1455
  TagPlaceholder,
1443
1456
  Placeholder,
1444
1457
  IcuPlaceholder,
1458
+ BlockPlaceholder,
1445
1459
  I18nMeta_2 as I18nMeta,
1446
1460
  Visitor_2 as Visitor,
1447
1461
  CloneVisitor,
@@ -4301,6 +4315,7 @@ declare class RecurseVisitor implements Visitor_2 {
4301
4315
  visitTagPlaceholder(ph: TagPlaceholder, context?: any): any;
4302
4316
  visitPlaceholder(ph: Placeholder, context?: any): any;
4303
4317
  visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any;
4318
+ visitBlockPlaceholder(ph: BlockPlaceholder, context?: any): any;
4304
4319
  }
4305
4320
 
4306
4321
  export declare class RecursiveAstVisitor implements AstVisitor {
@@ -4851,11 +4866,12 @@ export declare class TmplAstDeferredBlock extends BlockNode implements TmplAstNo
4851
4866
  loading: TmplAstDeferredBlockLoading | null;
4852
4867
  error: TmplAstDeferredBlockError | null;
4853
4868
  mainBlockSpan: ParseSourceSpan;
4869
+ i18n?: I18nMeta_2 | undefined;
4854
4870
  readonly triggers: Readonly<TmplAstDeferredBlockTriggers>;
4855
4871
  readonly prefetchTriggers: Readonly<TmplAstDeferredBlockTriggers>;
4856
4872
  private readonly definedTriggers;
4857
4873
  private readonly definedPrefetchTriggers;
4858
- constructor(children: TmplAstNode[], triggers: TmplAstDeferredBlockTriggers, prefetchTriggers: TmplAstDeferredBlockTriggers, placeholder: TmplAstDeferredBlockPlaceholder | null, loading: TmplAstDeferredBlockLoading | null, error: TmplAstDeferredBlockError | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null);
4874
+ constructor(children: TmplAstNode[], triggers: TmplAstDeferredBlockTriggers, prefetchTriggers: TmplAstDeferredBlockTriggers, placeholder: TmplAstDeferredBlockPlaceholder | null, loading: TmplAstDeferredBlockLoading | null, error: TmplAstDeferredBlockError | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
4859
4875
  visit<Result>(visitor: Visitor_3<Result>): Result;
4860
4876
  visitAll(visitor: Visitor_3<unknown>): void;
4861
4877
  private visitTriggers;
@@ -4863,7 +4879,8 @@ export declare class TmplAstDeferredBlock extends BlockNode implements TmplAstNo
4863
4879
 
4864
4880
  export declare class TmplAstDeferredBlockError extends BlockNode implements TmplAstNode {
4865
4881
  children: TmplAstNode[];
4866
- constructor(children: TmplAstNode[], nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null);
4882
+ i18n?: I18nMeta_2 | undefined;
4883
+ constructor(children: TmplAstNode[], nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
4867
4884
  visit<Result>(visitor: Visitor_3<Result>): Result;
4868
4885
  }
4869
4886
 
@@ -4871,14 +4888,16 @@ export declare class TmplAstDeferredBlockLoading extends BlockNode implements Tm
4871
4888
  children: TmplAstNode[];
4872
4889
  afterTime: number | null;
4873
4890
  minimumTime: number | null;
4874
- constructor(children: TmplAstNode[], afterTime: number | null, minimumTime: number | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null);
4891
+ i18n?: I18nMeta_2 | undefined;
4892
+ constructor(children: TmplAstNode[], afterTime: number | null, minimumTime: number | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
4875
4893
  visit<Result>(visitor: Visitor_3<Result>): Result;
4876
4894
  }
4877
4895
 
4878
4896
  export declare class TmplAstDeferredBlockPlaceholder extends BlockNode implements TmplAstNode {
4879
4897
  children: TmplAstNode[];
4880
4898
  minimumTime: number | null;
4881
- constructor(children: TmplAstNode[], minimumTime: number | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null);
4899
+ i18n?: I18nMeta_2 | undefined;
4900
+ constructor(children: TmplAstNode[], minimumTime: number | null, nameSpan: ParseSourceSpan, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, i18n?: I18nMeta_2 | undefined);
4882
4901
  visit<Result>(visitor: Visitor_3<Result>): Result;
4883
4902
  }
4884
4903
 
@@ -4925,13 +4944,15 @@ export declare class TmplAstForLoopBlock extends BlockNode implements TmplAstNod
4925
4944
  children: TmplAstNode[];
4926
4945
  empty: TmplAstForLoopBlockEmpty | null;
4927
4946
  mainBlockSpan: ParseSourceSpan;
4928
- constructor(item: TmplAstVariable, expression: ASTWithSource, trackBy: ASTWithSource, trackKeywordSpan: ParseSourceSpan, contextVariables: ForLoopBlockContext, children: TmplAstNode[], empty: TmplAstForLoopBlockEmpty | null, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan);
4947
+ i18n?: I18nMeta_2 | undefined;
4948
+ constructor(item: TmplAstVariable, expression: ASTWithSource, trackBy: ASTWithSource, trackKeywordSpan: ParseSourceSpan, contextVariables: ForLoopBlockContext, children: TmplAstNode[], empty: TmplAstForLoopBlockEmpty | null, sourceSpan: ParseSourceSpan, mainBlockSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
4929
4949
  visit<Result>(visitor: Visitor_3<Result>): Result;
4930
4950
  }
4931
4951
 
4932
4952
  export declare class TmplAstForLoopBlockEmpty extends BlockNode implements TmplAstNode {
4933
4953
  children: TmplAstNode[];
4934
- constructor(children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan);
4954
+ i18n?: I18nMeta_2 | undefined;
4955
+ constructor(children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
4935
4956
  visit<Result>(visitor: Visitor_3<Result>): Result;
4936
4957
  }
4937
4958
 
@@ -4970,7 +4991,8 @@ export declare class TmplAstIfBlockBranch extends BlockNode implements TmplAstNo
4970
4991
  expression: AST | null;
4971
4992
  children: TmplAstNode[];
4972
4993
  expressionAlias: TmplAstVariable | null;
4973
- constructor(expression: AST | null, children: TmplAstNode[], expressionAlias: TmplAstVariable | null, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan);
4994
+ i18n?: I18nMeta_2 | undefined;
4995
+ constructor(expression: AST | null, children: TmplAstNode[], expressionAlias: TmplAstVariable | null, sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
4974
4996
  visit<Result>(visitor: Visitor_3<Result>): Result;
4975
4997
  }
4976
4998
 
@@ -5043,7 +5065,8 @@ export declare class TmplAstSwitchBlock extends BlockNode implements TmplAstNode
5043
5065
  export declare class TmplAstSwitchBlockCase extends BlockNode implements TmplAstNode {
5044
5066
  expression: AST | null;
5045
5067
  children: TmplAstNode[];
5046
- constructor(expression: AST | null, children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan);
5068
+ i18n?: I18nMeta_2 | undefined;
5069
+ constructor(expression: AST | null, children: TmplAstNode[], sourceSpan: ParseSourceSpan, startSourceSpan: ParseSourceSpan, endSourceSpan: ParseSourceSpan | null, nameSpan: ParseSourceSpan, i18n?: I18nMeta_2 | undefined);
5047
5070
  visit<Result>(visitor: Visitor_3<Result>): Result;
5048
5071
  }
5049
5072
 
@@ -5384,6 +5407,7 @@ declare interface Visitor_2 {
5384
5407
  visitTagPlaceholder(ph: TagPlaceholder, context?: any): any;
5385
5408
  visitPlaceholder(ph: Placeholder, context?: any): any;
5386
5409
  visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any;
5410
+ visitBlockPlaceholder(ph: BlockPlaceholder, context?: any): any;
5387
5411
  }
5388
5412
 
5389
5413
  declare interface Visitor_3<Result = any> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler",
3
- "version": "17.1.0-next.0",
3
+ "version": "17.1.0-next.1",
4
4
  "description": "Angular - the compiler library",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  "tslib": "^2.3.0"
12
12
  },
13
13
  "peerDependencies": {
14
- "@angular/core": "17.1.0-next.0"
14
+ "@angular/core": "17.1.0-next.1"
15
15
  },
16
16
  "peerDependenciesMeta": {
17
17
  "@angular/core": {
@@ -1,23 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC 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 { assertInterpolationSymbols } from '../assertions';
9
- export class InterpolationConfig {
10
- static fromArray(markers) {
11
- if (!markers) {
12
- return DEFAULT_INTERPOLATION_CONFIG;
13
- }
14
- assertInterpolationSymbols('interpolation', markers);
15
- return new InterpolationConfig(markers[0], markers[1]);
16
- }
17
- constructor(start, end) {
18
- this.start = start;
19
- this.end = end;
20
- }
21
- }
22
- export const DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJwb2xhdGlvbl9jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21waWxlci9zcmMvbWxfcGFyc2VyL2ludGVycG9sYXRpb25fY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO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