@angular/compiler 17.0.3 → 17.0.4
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/esm2022/src/compiler.mjs +2 -3
- package/esm2022/src/expression_parser/parser.mjs +2 -2
- package/esm2022/src/i18n/digest.mjs +4 -1
- package/esm2022/src/i18n/extractor_merger.mjs +4 -2
- package/esm2022/src/i18n/i18n_ast.mjs +27 -1
- package/esm2022/src/i18n/i18n_html_parser.mjs +2 -2
- package/esm2022/src/i18n/i18n_parser.mjs +23 -6
- package/esm2022/src/i18n/message_bundle.mjs +7 -1
- package/esm2022/src/i18n/serializers/placeholder.mjs +29 -1
- package/esm2022/src/i18n/serializers/serializer.mjs +6 -1
- package/esm2022/src/i18n/serializers/xliff.mjs +7 -1
- package/esm2022/src/i18n/serializers/xliff2.mjs +19 -1
- package/esm2022/src/i18n/serializers/xmb.mjs +12 -1
- package/esm2022/src/i18n/translation_bundle.mjs +6 -1
- package/esm2022/src/jit_compiler_facade.mjs +2 -2
- package/esm2022/src/ml_parser/ast.mjs +4 -4
- package/esm2022/src/ml_parser/defaults.mjs +24 -0
- package/esm2022/src/ml_parser/lexer.mjs +2 -2
- package/esm2022/src/render3/partial/class_metadata.mjs +1 -1
- package/esm2022/src/render3/partial/component.mjs +2 -2
- package/esm2022/src/render3/partial/directive.mjs +1 -1
- package/esm2022/src/render3/partial/factory.mjs +1 -1
- package/esm2022/src/render3/partial/injectable.mjs +1 -1
- package/esm2022/src/render3/partial/injector.mjs +1 -1
- package/esm2022/src/render3/partial/ng_module.mjs +1 -1
- package/esm2022/src/render3/partial/pipe.mjs +1 -1
- package/esm2022/src/render3/r3_ast.mjs +17 -9
- package/esm2022/src/render3/r3_control_flow.mjs +7 -7
- package/esm2022/src/render3/r3_deferred_blocks.mjs +5 -5
- package/esm2022/src/render3/view/api.mjs +1 -1
- package/esm2022/src/render3/view/i18n/context.mjs +13 -1
- package/esm2022/src/render3/view/i18n/get_msg_utils.mjs +4 -1
- package/esm2022/src/render3/view/i18n/icu_serializer.mjs +4 -1
- package/esm2022/src/render3/view/i18n/localize_utils.mjs +6 -1
- package/esm2022/src/render3/view/i18n/meta.mjs +5 -4
- package/esm2022/src/render3/view/template.mjs +79 -33
- package/esm2022/src/template/pipeline/ir/src/ops/update.mjs +2 -1
- package/esm2022/src/template/pipeline/src/instruction.mjs +3 -3
- package/esm2022/src/template/pipeline/src/phases/reify.mjs +2 -2
- package/esm2022/src/template/pipeline/src/phases/resolve_i18n_icu_placeholders.mjs +12 -5
- package/esm2022/src/template_parser/binding_parser.mjs +1 -1
- package/esm2022/src/version.mjs +1 -1
- package/fesm2022/compiler.mjs +288 -76
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +36 -12
- package/package.json +2 -2
- 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.0.
|
|
2
|
+
* @license Angular v17.0.4
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.0.
|
|
3
|
+
"version": "17.0.4",
|
|
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.0.
|
|
14
|
+
"@angular/core": "17.0.4"
|
|
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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJwb2xhdGlvbl9jb25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