mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(compiler): Delete TemplateDefinitionBuilder acceptance test expectations (#54757)
Many acceptance tests define goldens for both `TemplateDefinitionBuilder` and Template Pipeline. All such tests have had the TDB golden files removed, and the corresponding expectations adjusted. PR Close #54757
This commit is contained in:
parent
ef32b5322e
commit
54340a9fff
71 changed files with 117 additions and 1580 deletions
|
|
@ -26,8 +26,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "local_reference_nested.js",
|
||||
"expected": "local_reference_nested_template.js",
|
||||
"templatePipelineExpected": "local_reference_nested.pipeline.js"
|
||||
"expected": "local_reference_nested.pipeline.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -43,8 +42,7 @@
|
|||
"failureMessage": "Incorrect template",
|
||||
"files": [
|
||||
{
|
||||
"expected": "local_reference_and_context_variables_template.js",
|
||||
"templatePipelineExpected": "local_reference_and_context_variables_template.pipeline.js",
|
||||
"expected": "local_reference_and_context_variables_template.pipeline.js",
|
||||
"generated": "local_reference_and_context_variables.js"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
function MyComponent_div_0_span_3_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵelementStart(0, "span");
|
||||
$i0$.ɵɵtext(1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $item$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $foo$ = $i0$.ɵɵreference(2);
|
||||
$r3$.ɵɵadvance();
|
||||
$i0$.ɵɵtextInterpolate2(" ", $foo$, " - ", $item$, " ");
|
||||
}
|
||||
}
|
||||
|
||||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
$i0$.ɵɵelement(1, "div", null, 1);
|
||||
$i0$.ɵɵtemplate(3, MyComponent_div_0_span_3_Template, 2, 2, "span", 2);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $app$ = $i0$.ɵɵnextContext();
|
||||
$r3$.ɵɵadvance(3);
|
||||
$i0$.ɵɵproperty("ngIf", $app$.showing);
|
||||
}
|
||||
}
|
||||
|
||||
// ...
|
||||
consts: [[__AttributeMarker.Template__, "ngFor", "ngForOf"], ["foo", ""], [__AttributeMarker.Template__, "ngIf"]],
|
||||
template:function MyComponent_Template(rf, ctx){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 4, 1, "div", 0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.ɵɵproperty("ngForOf", ctx.items);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
function MyComponent_div_3_span_2_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "span");
|
||||
$r3$.ɵɵtext(1);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵnextContext();
|
||||
const $bar$ = $r3$.ɵɵreference(4);
|
||||
$r3$.ɵɵnextContext();
|
||||
const $foo$ = $r3$.ɵɵreference(1);
|
||||
const $baz$ = $r3$.ɵɵreference(5);
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵtextInterpolate3("", $foo$, "-", $bar$, "-", $baz$, "");
|
||||
}
|
||||
}
|
||||
function MyComponent_div_3_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵtext(1);
|
||||
$r3$.ɵɵtemplate(2, MyComponent_div_3_span_2_Template, 2, 3, "span", 1);
|
||||
$r3$.ɵɵelement(3, "span", null, 3);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $bar$ = $r3$.ɵɵreference(4);
|
||||
$r3$.ɵɵnextContext();
|
||||
const $foo$ = $r3$.ɵɵreference(1);
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵtextInterpolate2(" ", $foo$, "-", $bar$, " ");
|
||||
}
|
||||
}
|
||||
// ...
|
||||
MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors: [["my-component"]],
|
||||
decls: 6,
|
||||
vars: 1,
|
||||
consts: [["foo", ""], [__AttributeMarker.Template__, "if"], ["baz", ""], ["bar", ""]],
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelement(0, "div", null, 0);
|
||||
$r3$.ɵɵtext(2);
|
||||
$r3$.ɵɵtemplate(3, MyComponent_div_3_Template, 5, 2, "div", 1);
|
||||
$r3$.ɵɵelement(4, "div", null, 2);
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $foo$ = $r3$.ɵɵreference(1);
|
||||
$r3$.ɵɵadvance(2);
|
||||
$r3$.ɵɵtextInterpolate1(" ", $foo$, " ");
|
||||
}
|
||||
},
|
||||
dependencies:[IfDirective],
|
||||
encapsulation: 2
|
||||
});
|
||||
|
|
@ -47,8 +47,7 @@
|
|||
"failureMessage": "Invalid MyApp definition",
|
||||
"files": [
|
||||
{
|
||||
"expected": "pipes_my_app_def.js",
|
||||
"templatePipelineExpected": "pipes_my_app_def.pipeline.js",
|
||||
"expected": "pipes_my_app_def.pipeline.js",
|
||||
"generated": "pipes.js"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
const $c0$ = $a0$ => [$a0$, 1, 2, 3, 4, 5];
|
||||
// ...
|
||||
MyApp.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({
|
||||
type: MyApp,
|
||||
selectors: [["my-app"]],
|
||||
decls: 7,
|
||||
vars: 20,
|
||||
template: function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtext(0);
|
||||
$r3$.ɵɵpipe(1, "myPurePipe");
|
||||
$r3$.ɵɵpipe(2, "myPipe");
|
||||
$r3$.ɵɵelementStart(3, "p");
|
||||
$r3$.ɵɵtext(4);
|
||||
$r3$.ɵɵpipe(5, "myPipe");
|
||||
$r3$.ɵɵpipe(6, "myPipe");
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵtextInterpolate($r3$.ɵɵpipeBind2(1, 3, $r3$.ɵɵpipeBind2(2, 6, ctx.name, ctx.size), ctx.size));
|
||||
$r3$.ɵɵadvance(4);
|
||||
$r3$.ɵɵtextInterpolate2("", $r3$.ɵɵpipeBindV(5, 9, $r3$.ɵɵpureFunction1(18, $c0$, ctx.name)), " ", ctx.name ? 1 : $r3$.ɵɵpipeBind1(6, 16, 2), "");
|
||||
}
|
||||
},
|
||||
dependencies: [MyPipe, MyPurePipe],
|
||||
encapsulation: 2
|
||||
});
|
||||
|
|
@ -43,8 +43,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "safe_access_temporaries_template.js",
|
||||
"templatePipelineExpected": "safe_access_temporaries_template.pipeline.js",
|
||||
"expected": "safe_access_temporaries_template.pipeline.js",
|
||||
"generated": "safe_access_temporaries.js"
|
||||
}
|
||||
],
|
||||
|
|
@ -78,8 +77,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "safe_call_template.js",
|
||||
"templatePipelineExpected": "safe_call_template.pipeline.js",
|
||||
"expected": "safe_call_template.pipeline.js",
|
||||
"generated": "safe_call.js"
|
||||
}
|
||||
],
|
||||
|
|
@ -96,8 +94,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "safe_access_non_null_template.js",
|
||||
"templatePipelineExpected": "safe_access_non_null_template.pipeline.js",
|
||||
"expected": "safe_access_non_null_template.pipeline.js",
|
||||
"generated": "safe_access_non_null.js"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
template: function MyApp_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
i0.ɵɵtext(0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
let $tmp_0_0$;
|
||||
i0.ɵɵtextInterpolate4(" ", $ctx$.val == null ? null : $ctx$.val.foo.bar, " ", $ctx$.val == null ? null : $ctx$.val[0].foo.bar, " ", ($tmp_0_0$ = $ctx$.foo($ctx$.val)) == null ? null : $tmp_0_0$.foo.bar, " ", ($tmp_0_0$ = $ctx$.val) == null ? null : $tmp_0_0$.foo.bar, " ");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
} if (rf & 2) {
|
||||
let $tmp_0_0$;
|
||||
let $tmp_0_1$;
|
||||
let $tmp_0_2$;
|
||||
let $tmp_0_3$;
|
||||
let $tmp_1_0$;
|
||||
let $tmp_1_1$;
|
||||
let $tmp_1_2$;
|
||||
let $tmp_1_3$;
|
||||
let $tmp_1_4$;
|
||||
let $tmp_2_0$;
|
||||
let $tmp_2_1$;
|
||||
let $tmp_3_0$;
|
||||
let $tmp_3_1$;
|
||||
let $tmp_3_2$;
|
||||
let $tmp_3_3$;
|
||||
i0.ɵɵadvance();
|
||||
i0.ɵɵtextInterpolate1("Safe Property with Calls: ", ($tmp_0_0$ = ctx.p()) == null ? null : ($tmp_0_1$ = $tmp_0_0$.a()) == null ? null : ($tmp_0_2$ = $tmp_0_1$.b()) == null ? null : ($tmp_0_3$ = $tmp_0_2$.c()) == null ? null : $tmp_0_3$.d(), "");
|
||||
i0.ɵɵadvance(2);
|
||||
i0.ɵɵtextInterpolate1("Safe and Unsafe Property with Calls: ", ctx.p == null ? null : ($tmp_1_0$ = ctx.p.a()) == null ? null : ($tmp_1_1$ = $tmp_1_0$.b().c().d()) == null ? null : ($tmp_1_2$ = $tmp_1_1$.e()) == null ? null : $tmp_1_2$.f == null ? null : $tmp_1_2$.f.g.h == null ? null : ($tmp_1_3$ = $tmp_1_2$.f.g.h.i()) == null ? null : ($tmp_1_4$ = $tmp_1_3$.j()) == null ? null : $tmp_1_4$.k().l, "");
|
||||
i0.ɵɵadvance(2);
|
||||
i0.ɵɵtextInterpolate1("Nested Safe with Calls: ", ($tmp_2_0$ = ctx.f1()) == null ? null : $tmp_2_0$[($tmp_2_1$ = ctx.f2()) == null ? null : $tmp_2_1$.a] == null ? null : $tmp_2_0$[($tmp_2_1$ = $tmp_2_1$) == null ? null : $tmp_2_1$.a].b, "");
|
||||
i0.ɵɵadvance(2);
|
||||
i0.ɵɵtextInterpolate1("Deep Nested Safe with Calls: ", ($tmp_3_0$ = ctx.f1()) == null ? null : $tmp_3_0$[($tmp_3_1$ = ctx.f2()) == null ? null : ($tmp_3_2$ = $tmp_3_1$.f3()) == null ? null : $tmp_3_2$[($tmp_3_3$ = ctx.f4()) == null ? null : $tmp_3_3$.f5()]] == null ? null : $tmp_3_0$[($tmp_3_1$ = $tmp_3_1$) == null ? null : ($tmp_3_2$ = $tmp_3_2$) == null ? null : $tmp_3_2$[($tmp_3_3$ = $tmp_3_3$) == null ? null : $tmp_3_3$.f5()]].f6(), "");
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
template: function MyApp_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵelementStart(0, "span", 0);
|
||||
$i0$.ɵɵtext(1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
let $tmp_0_0$;
|
||||
let $tmp_1_0$;
|
||||
let $tmp_1_1$;
|
||||
let $tmp_1_2$;
|
||||
let $tmp_1_3$;
|
||||
$i0$.ɵɵproperty("title", "Your last name is " + (($tmp_0_0$ = $ctx$.person.getLastName == null ? null : $ctx$.person.getLastName()) !== null && $tmp_0_0$ !== undefined ? $tmp_0_0$ : "unknown"));
|
||||
$i0$.ɵɵadvance();
|
||||
$i0$.ɵɵtextInterpolate2(" Hello, ", $ctx$.person.getName == null ? null : $ctx$.person.getName(), "! You are a Balrog: ", ($ctx$.person.getSpecies == null ? null : ($tmp_1_0$ = $ctx$.person.getSpecies()) == null ? null : ($tmp_1_1$ = $tmp_1_0$()) == null ? null : ($tmp_1_2$ = $tmp_1_1$()) == null ? null : ($tmp_1_3$ = $tmp_1_2$()) == null ? null : $tmp_1_3$()) || "unknown", " ");
|
||||
}
|
||||
}
|
||||
|
|
@ -89,8 +89,7 @@
|
|||
"failureMessage": "Incorrect attribute array",
|
||||
"files": [
|
||||
{
|
||||
"expected": "exclude_bindings_from_consts_template.js",
|
||||
"templatePipelineExpected": "exclude_bindings_from_consts_template.pipeline.js",
|
||||
"expected": "exclude_bindings_from_consts_template.pipeline.js",
|
||||
"generated": "exclude_bindings_from_consts.js"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
consts: [["target", "_blank", "aria-label", "link", __AttributeMarker.Bindings__, "title", "id", "customEvent"]],
|
||||
…
|
||||
|
|
@ -379,8 +379,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "deceptive_attrs.js",
|
||||
"expected": "deceptive_attrs.template.js",
|
||||
"templatePipelineExpected": "deceptive_attrs.pipeline.js"
|
||||
"expected": "deceptive_attrs.pipeline.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
hostAttrs: ["class.is-compact", "false", "style.width", "0", "attr.tabindex", "5"],
|
||||
…
|
||||
hostBindings: function MyComponent2_HostBindings(rf, ctx) {
|
||||
if (rf & 2) {
|
||||
i0.ɵɵattribute("tabindex", 5);
|
||||
i0.ɵɵstyleProp("width", 0);
|
||||
i0.ɵɵclassProp("is-compact", false);
|
||||
}
|
||||
}
|
||||
|
|
@ -12,8 +12,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "local_ref_on_host.js",
|
||||
"expected": "local_ref_on_host.template.js",
|
||||
"templatePipelineExpected": "local_ref_on_host.pipeline.js"
|
||||
"expected": "local_ref_on_host.pipeline.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
consts: [["id", "my-id"], ["myRef", ""]],
|
||||
template:function MyComponent_Template(rf, $ctx$){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵelementStart(0, "b", 0, 1);
|
||||
$i0$.ɵɵdisableBindings();
|
||||
$i0$.ɵɵelementStart(2, "i");
|
||||
$i0$.ɵɵtext(3, "Hello {{ name }}!");
|
||||
$i0$.ɵɵelementEnd();
|
||||
$i0$.ɵɵenableBindings();
|
||||
$i0$.ɵɵelementEnd();
|
||||
$i0$.ɵɵtext(4);
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $_r0$ = $i0$.ɵɵreference(1);
|
||||
$r3$.ɵɵadvance(4);
|
||||
$i0$.ɵɵtextInterpolate1(" ", $_r0$.id, " ");
|
||||
}
|
||||
}
|
||||
|
|
@ -53,9 +53,8 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "switch_with_pipe_template.js",
|
||||
"generated": "switch_with_pipe.js",
|
||||
"templatePipelineExpected": "switch_with_pipe_template.pipeline.js"
|
||||
"expected": "switch_with_pipe_template.pipeline.js"
|
||||
}
|
||||
],
|
||||
"failureMessage": "Incorrect template"
|
||||
|
|
@ -144,9 +143,8 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "if_with_pipe_template.js",
|
||||
"generated": "if_with_pipe.js",
|
||||
"templatePipelineExpected": "if_with_pipe_template.pipeline.js"
|
||||
"expected": "if_with_pipe_template.pipeline.js"
|
||||
}
|
||||
],
|
||||
"failureMessage": "Incorrect template"
|
||||
|
|
@ -190,8 +188,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "if_nested_alias_listeners_template.js",
|
||||
"templatePipelineExpected": "if_nested_alias_listeners_template.pipeline.js",
|
||||
"expected": "if_nested_alias_listeners_template.pipeline.js",
|
||||
"generated": "if_nested_alias_listeners.js"
|
||||
}
|
||||
],
|
||||
|
|
@ -281,8 +278,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "for_template_variables_template.js",
|
||||
"templatePipelineExpected": "for_template_variables_template.pipeline.js",
|
||||
"expected": "for_template_variables_template.pipeline.js",
|
||||
"generated": "for_template_variables.js"
|
||||
}
|
||||
],
|
||||
|
|
@ -297,8 +293,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "for_aliased_template_variables_template.js",
|
||||
"templatePipelineExpected": "for_aliased_template_variables_template.pipeline.js",
|
||||
"expected": "for_aliased_template_variables_template.pipeline.js",
|
||||
"generated": "for_aliased_template_variables.js"
|
||||
}
|
||||
],
|
||||
|
|
@ -328,8 +323,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "for_template_variables_listener_template.js",
|
||||
"templatePipelineExpected": "for_template_variables_listener_template.pipeline.js",
|
||||
"expected": "for_template_variables_listener_template.pipeline.js",
|
||||
"generated": "for_template_variables_listener.js"
|
||||
}
|
||||
],
|
||||
|
|
@ -374,8 +368,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "for_template_variables_scope_template.js",
|
||||
"templatePipelineExpected": "for_template_variables_scope_template.pipeline.js",
|
||||
"expected": "for_template_variables_scope_template.pipeline.js",
|
||||
"generated": "for_template_variables_scope.js"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
function MyApp_For_3_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtext(0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $idx_r2$ = ctx.$index;
|
||||
const $co_r3$ = ctx.$count;
|
||||
$r3$.ɵɵtextInterpolate6(" Index: ", $idx_r2$, " First: ", $idx_r2$ === 0, " Last: ", $idx_r2$ === $co_r3$ - 1, " Even: ", $idx_r2$ % 2 === 0, " Odd: ", $idx_r2$ % 2 !== 0, " Count: ", $co_r3$, " ");
|
||||
}
|
||||
}
|
||||
…
|
||||
function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵtext(1);
|
||||
$r3$.ɵɵrepeaterCreate(2, MyApp_For_3_Template, 1, 6, null, null, $r3$.ɵɵrepeaterTrackByIdentity);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵrepeater(ctx.items);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
function MyApp_For_3_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
const $_r5$ = $r3$.ɵɵgetCurrentView();
|
||||
$r3$.ɵɵelementStart(0, "div", 0);
|
||||
$r3$.ɵɵlistener("click", function MyApp_For_3_Template_div_click_0_listener() {
|
||||
const $restoredCtx$ = $r3$.ɵɵrestoreView($_r5$);
|
||||
const $index_r2$ = $restoredCtx$.$index;
|
||||
const $count_r3$ = $restoredCtx$.$count;
|
||||
const $ctx_r4$ = $r3$.ɵɵnextContext();
|
||||
return $r3$.ɵɵresetView($ctx_r4$.log($index_r2$, $index_r2$ % 2 === 0, $index_r2$ === 0, $count_r3$));
|
||||
});
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
…
|
||||
function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵtext(1);
|
||||
$r3$.ɵɵrepeaterCreate(2, MyApp_For_3_Template, 1, 0, "div", null, $r3$.ɵɵrepeaterTrackByIdentity);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵrepeater(ctx.items);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
function MyApp_For_2_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtext(0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $index_r2$ = ctx.$index;
|
||||
const $count_r3$ = ctx.$count;
|
||||
$r3$.ɵɵtextInterpolate4(" ", $index_r2$, " ", $count_r3$, " ", $index_r2$ === 0, " ", $index_r2$ === $count_r3$ - 1, " ");
|
||||
}
|
||||
}
|
||||
…
|
||||
function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtext(0);
|
||||
$r3$.ɵɵrepeaterCreate(1, MyApp_For_2_Template, 1, 4, null, null, $r3$.ɵɵrepeaterTrackByIdentity);
|
||||
$r3$.ɵɵtext(3);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵtextInterpolate4(" ", ctx.$index, " ", ctx.$count, " ", ctx.$first, " ", ctx.$last, " ");
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵrepeater(ctx.items);
|
||||
$r3$.ɵɵadvance(2);
|
||||
$r3$.ɵɵtextInterpolate4(" ", ctx.$index, " ", ctx.$count, " ", ctx.$first, " ", ctx.$last, " ");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
function MyApp_For_3_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtext(0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $index_r2$ = ctx.$index;
|
||||
const $count_r3$ = ctx.$count;
|
||||
$r3$.ɵɵtextInterpolate6(" Index: ", $index_r2$, " First: ", $index_r2$ === 0, " Last: ", $index_r2$ === $count_r3$ - 1, " Even: ", $index_r2$ % 2 === 0, " Odd: ", $index_r2$ % 2 !== 0, " Count: ", $count_r3$, " ");
|
||||
}
|
||||
}
|
||||
…
|
||||
function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵtext(1);
|
||||
$r3$.ɵɵrepeaterCreate(2, MyApp_For_3_Template, 1, 6, null, null, $r3$.ɵɵrepeaterTrackByIdentity);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵrepeater(ctx.items);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
function MyApp_Conditional_0_Conditional_1_Conditional_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
const $_r7$ = $r3$.ɵɵgetCurrentView();
|
||||
$r3$.ɵɵelementStart(0, "button", 0);
|
||||
$r3$.ɵɵlistener("click", function MyApp_Conditional_0_Conditional_1_Conditional_1_Template_button_click_0_listener() {
|
||||
const $restoredCtx$ = $r3$.ɵɵrestoreView($_r7$);
|
||||
const $innermost_r5$ = $restoredCtx$;
|
||||
const $inner_r3$ = $r3$.ɵɵnextContext();
|
||||
const $root_r1$ = $r3$.ɵɵnextContext();
|
||||
const $ctx_r6$ = $r3$.ɵɵnextContext();
|
||||
return $r3$.ɵɵresetView($ctx_r6$.log($ctx_r6$.value(), $root_r1$, $inner_r3$, $innermost_r5$));
|
||||
});
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
|
||||
function MyApp_Conditional_0_Conditional_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
const $_r11$ = $r3$.ɵɵgetCurrentView();
|
||||
$r3$.ɵɵelementStart(0, "button", 0);
|
||||
$r3$.ɵɵlistener("click", function MyApp_Conditional_0_Conditional_1_Template_button_click_0_listener() {
|
||||
const $restoredCtx$ = $r3$.ɵɵrestoreView($_r11$);
|
||||
const $inner_r3$ = $restoredCtx$;
|
||||
const $root_r1$ = $r3$.ɵɵnextContext();
|
||||
const $ctx_r10$ = $r3$.ɵɵnextContext();
|
||||
return $r3$.ɵɵresetView($ctx_r10$.log($ctx_r10$.value(), $root_r1$, $inner_r3$));
|
||||
});
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵtemplate(1, MyApp_Conditional_0_Conditional_1_Conditional_1_Template, 1, 0, "button");
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $ctx_r2$ = $r3$.ɵɵnextContext(2);
|
||||
let MyApp_Conditional_0_Conditional_1_contFlowTmp;
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵconditional(1, (MyApp_Conditional_0_Conditional_1_contFlowTmp = $ctx_r2$.value()) ? 1 : -1, MyApp_Conditional_0_Conditional_1_contFlowTmp);
|
||||
}
|
||||
}
|
||||
|
||||
function MyApp_Conditional_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
const $_r14$ = $r3$.ɵɵgetCurrentView();
|
||||
$r3$.ɵɵelementStart(0, "button", 0);
|
||||
$r3$.ɵɵlistener("click", function MyApp_Conditional_0_Template_button_click_0_listener() {
|
||||
const $restoredCtx$ = $r3$.ɵɵrestoreView($_r14$);
|
||||
const $root_r1$ = $restoredCtx$;
|
||||
const $ctx_r13$ = $r3$.ɵɵnextContext();
|
||||
return $r3$.ɵɵresetView($ctx_r13$.log($ctx_r13$.value(), $root_r1$));
|
||||
});
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵtemplate(1, MyApp_Conditional_0_Conditional_1_Template, 2, 1);
|
||||
}
|
||||
if (rf & 2) {
|
||||
const ctx_r0 = $r3$.ɵɵnextContext();
|
||||
let MyApp_Conditional_0_contFlowTmp;
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵconditional(1, (MyApp_Conditional_0_contFlowTmp = ctx_r0.value()) ? 1 : -1, MyApp_Conditional_0_contFlowTmp);
|
||||
}
|
||||
}
|
||||
…
|
||||
function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtemplate(0, MyApp_Conditional_0_Template, 2, 1);
|
||||
}
|
||||
if (rf & 2) {
|
||||
let MyApp_contFlowTmp;
|
||||
$r3$.ɵɵconditional(0, (MyApp_contFlowTmp = ctx.value()) ? 0 : -1, MyApp_contFlowTmp);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
function $MyApp_Conditional_3_Template$(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtext(0, " one ");
|
||||
}
|
||||
}
|
||||
|
||||
function $MyApp_Conditional_5_Template$(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtext(0, " two ");
|
||||
}
|
||||
}
|
||||
|
||||
function $MyApp_Conditional_6_Template$(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtext(0, " three ");
|
||||
}
|
||||
}
|
||||
…
|
||||
function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵtext(1);
|
||||
$r3$.ɵɵtemplate(2, MyApp_Conditional_2_Template, 1, 0);
|
||||
$r3$.ɵɵpipe(3, "test");
|
||||
$r3$.ɵɵtemplate(4, MyApp_Conditional_4_Template, 1, 0);
|
||||
$r3$.ɵɵpipe(5, "test");
|
||||
$r3$.ɵɵtemplate(6, MyApp_Conditional_6_Template, 1, 0);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵconditional(2, $r3$.ɵɵpipeBind1(3, 2, ctx.val) === 1 ? 2 : $r3$.ɵɵpipeBind1(5, 4, ctx.val) === 2 ? 4 : 6);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵtext(1);
|
||||
$r3$.ɵɵtemplate(2, MyApp_Case_2_Template, 1, 0);
|
||||
$r3$.ɵɵpipe(3, "test");
|
||||
$r3$.ɵɵtemplate(4, MyApp_Case_4_Template, 1, 0);
|
||||
$r3$.ɵɵpipe(5, "test");
|
||||
$r3$.ɵɵtemplate(6, MyApp_Case_6_Template, 1, 0);
|
||||
$r3$.ɵɵpipe(7, "test");
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
let MyApp_contFlowTmp;
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵconditional(2, (MyApp_contFlowTmp = $r3$.ɵɵpipeBind1(7, 6, ctx.value())) === $r3$.ɵɵpipeBind1(3, 2, 0) ? 2 : MyApp_contFlowTmp === $r3$.ɵɵpipeBind1(5, 4, 1) ? 4 : 6);
|
||||
}
|
||||
}
|
||||
|
|
@ -142,8 +142,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "deferred_when_with_pipe_template.js",
|
||||
"templatePipelineExpected": "deferred_when_with_pipe_template.pipeline.js",
|
||||
"expected": "deferred_when_with_pipe_template.pipeline.js",
|
||||
"generated": "deferred_when_with_pipe.js"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
function MyApp_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtext(0);
|
||||
$r3$.ɵɵtemplate(1, MyApp_Defer_1_Template, 1, 0);
|
||||
$r3$.ɵɵdefer(2, 1);
|
||||
$r3$.ɵɵpipe(4, "testPipe");
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵtextInterpolate1(" ", ctx.message, " ");
|
||||
$r3$.ɵɵadvance(2);
|
||||
$r3$.ɵɵdeferWhen(ctx.isVisible() && $r3$.ɵɵpipeBind1(4, 2, ctx.isReady));
|
||||
}
|
||||
}
|
||||
|
|
@ -14,8 +14,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "meaning_description_template.js",
|
||||
"templatePipelineExpected": "meaning_description_template.pipeline.js",
|
||||
"expected": "meaning_description_template.pipeline.js",
|
||||
"generated": "meaning_description.js"
|
||||
}
|
||||
]
|
||||
|
|
@ -63,8 +62,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "ng-template_interpolation_template.js",
|
||||
"templatePipelineExpected": "ng-template_interpolation_template.pipeline.js",
|
||||
"expected": "ng-template_interpolation_template.pipeline.js",
|
||||
"generated": "ng-template_interpolation.js"
|
||||
}
|
||||
]
|
||||
|
|
@ -84,8 +82,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "ng-template_interpolation_structural_template.js",
|
||||
"templatePipelineExpected": "ng-template_interpolation_structural_template.pipeline.js",
|
||||
"expected": "ng-template_interpolation_structural_template.pipeline.js",
|
||||
"generated": "ng-template_interpolation_structural.js"
|
||||
}
|
||||
]
|
||||
|
|
@ -147,8 +144,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "static_attributes_structural_template.js",
|
||||
"templatePipelineExpected": "static_attributes_structural_template.pipeline.js",
|
||||
"expected": "static_attributes_structural_template.pipeline.js",
|
||||
"generated": "static_attributes_structural.js"
|
||||
}
|
||||
]
|
||||
|
|
@ -168,8 +164,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "interpolation_basic_template.js",
|
||||
"templatePipelineExpected": "interpolation_basic_template.pipeline.js",
|
||||
"expected": "interpolation_basic_template.pipeline.js",
|
||||
"generated": "interpolation_basic.js"
|
||||
}
|
||||
]
|
||||
|
|
@ -189,8 +184,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "interpolation_custom_config_template.js",
|
||||
"templatePipelineExpected": "interpolation_custom_config_template.pipeline.js",
|
||||
"expected": "interpolation_custom_config_template.pipeline.js",
|
||||
"generated": "interpolation_custom_config.js"
|
||||
}
|
||||
]
|
||||
|
|
@ -210,8 +204,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "interpolation_nested_context_template.js",
|
||||
"templatePipelineExpected": "interpolation_nested_context_template.pipeline.js",
|
||||
"expected": "interpolation_nested_context_template.pipeline.js",
|
||||
"generated": "interpolation_nested_context.js"
|
||||
}
|
||||
]
|
||||
|
|
@ -231,8 +224,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "interpolation_complex_expressions_template.js",
|
||||
"templatePipelineExpected": "interpolation_complex_expressions_template.pipeline.js",
|
||||
"expected": "interpolation_complex_expressions_template.pipeline.js",
|
||||
"generated": "interpolation_complex_expressions.js"
|
||||
}
|
||||
]
|
||||
|
|
@ -252,8 +244,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "i18n_root_node_template.js",
|
||||
"templatePipelineExpected": "i18n_root_node_template.pipeline.js",
|
||||
"expected": "i18n_root_node_template.pipeline.js",
|
||||
"generated": "i18n_root_node.js"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
consts: () => {
|
||||
__i18nMsg__('Element title', [], {}, {meaning: 'm', desc: 'd'})
|
||||
__i18nMsg__('Some content', [], {}, {})
|
||||
return [
|
||||
["title", $i18n_0$],
|
||||
$i18n_1$
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div", 0);
|
||||
$r3$.ɵɵi18n(1, 1);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
decls: 5,
|
||||
vars: 8,
|
||||
consts: () => {
|
||||
__i18nMsg__('static text', [], {}, {})
|
||||
__i18nMsg__('intro {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ valueA | uppercase }}'}}, {meaning: 'm', desc: 'd'})
|
||||
__i18nMsg__('{$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ valueB }}'}}, {meaning: 'm1', desc: 'd1'})
|
||||
__i18nMsg__('{$interpolation} and {$interpolation_1} and again {$interpolation_2}', [['interpolation', String.raw`\uFFFD0\uFFFD`],['interpolation_1', String.raw`\uFFFD1\uFFFD`],['interpolation_2', String.raw`\uFFFD2\uFFFD`]], {original_code: {'interpolation': '{{ valueA }}', 'interpolation_1': '{{ valueB }}', 'interpolation_2': '{{ valueA + valueB }}'}}, {meaning: 'm2', desc: 'd2'})
|
||||
__i18nMsg__('{$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ valueC }}'}}, {})
|
||||
return [
|
||||
["id", "dynamic-1", "aria-roledescription", $i18n_0$, __AttributeMarker.I18n__,
|
||||
"title", "aria-label"],
|
||||
["title", $i18n_1$, "aria-label", $i18n_2$],
|
||||
["id", "dynamic-2", __AttributeMarker.I18n__, "title", "aria-roledescription"],
|
||||
["title", $i18n_3$, "aria-roledescription", $i18n_4$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div", 0);
|
||||
$r3$.ɵɵpipe(1, "uppercase");
|
||||
$r3$.ɵɵi18nAttributes(2, 1);
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(3, "div", 2);
|
||||
$r3$.ɵɵi18nAttributes(4, 3);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(1, 6, ctx.valueA))(ctx.valueB);
|
||||
$r3$.ɵɵi18nApply(2);
|
||||
$r3$.ɵɵadvance(3);
|
||||
$r3$.ɵɵi18nExp(ctx.valueA)(ctx.valueB)(ctx.valueA + ctx.valueB)(ctx.valueC);
|
||||
$r3$.ɵɵi18nApply(4);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
decls: 2,
|
||||
vars: 1,
|
||||
consts: () => {
|
||||
__i18nMsg__('{$interpolation} title', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{valueA.getRawValue()?.getTitle()}}'}}, {})
|
||||
return [
|
||||
[__AttributeMarker.I18n__, "title"],
|
||||
["title", $i18n_0$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div", 0);
|
||||
$r3$.ɵɵi18nAttributes(1, 1);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
let $tmp_0_0$;
|
||||
$r3$.ɵɵi18nExp(($tmp_0_0$ = ctx.valueA.getRawValue()) == null ? null : $tmp_0_0$.getTitle());
|
||||
$r3$.ɵɵi18nApply(1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
consts: () => {
|
||||
__i18nMsg__('intro {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{% valueA | uppercase %}'}}, {meaning: 'm', desc: 'd'})
|
||||
return [
|
||||
[__AttributeMarker.I18n__, "title"],
|
||||
["title", $i18n_0$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div", 0);
|
||||
$r3$.ɵɵpipe(1, "uppercase");
|
||||
$r3$.ɵɵi18nAttributes(2, 1);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(1, 1, ctx.valueA));
|
||||
$r3$.ɵɵi18nApply(2);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div")(1, "div", 1);
|
||||
$r3$.ɵɵpipe(2, "uppercase");
|
||||
$r3$.ɵɵi18nAttributes(3, 2);
|
||||
$r3$.ɵɵelementEnd()();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $outer_r1$ = ctx.$implicit;
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(2, 1, $outer_r1$));
|
||||
$r3$.ɵɵi18nApply(3);
|
||||
}
|
||||
}
|
||||
…
|
||||
decls: 1,
|
||||
vars: 1,
|
||||
consts: () => {
|
||||
__i18nMsg__('different scope {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ outer | uppercase }}'}}, {meaning: 'm', desc: 'd'})
|
||||
return [
|
||||
[__AttributeMarker.Template__, "ngFor", "ngForOf"],
|
||||
[__AttributeMarker.I18n__, "title"],
|
||||
["title", $i18n_0$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 4, 3, "div", 0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵproperty("ngForOf", ctx.items);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
consts:
|
||||
() => {
|
||||
__i18nMsg__('Content A', [], {}, {id: 'idA', meaning: 'meaningA', desc: 'descA'})
|
||||
__i18nMsg__('Title B', [], {}, {id: 'idB', meaning: 'meaningB', desc: 'descB'})
|
||||
__i18nMsg__('Title C', [], {}, {meaning: 'meaningC'})
|
||||
__i18nMsg__('Title D', [], {}, {meaning: 'meaningD', desc: 'descD'})
|
||||
__i18nMsg__('Title E', [], {}, {id: 'idE', desc: 'meaningE'})
|
||||
__i18nMsg__('Title F', [], {}, {id: 'idF'})
|
||||
|
||||
// NOTE: Keeping this block as a raw string, since it checks escaping of special chars.
|
||||
let $i18n_23$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @desc [BACKUP_${MESSAGE}_ID:idH]`desc
|
||||
*/
|
||||
const $MSG_EXTERNAL_idG$$APP_SPEC_TS_24$ = goog.getMsg("Title G");
|
||||
$i18n_23$ = $MSG_EXTERNAL_idG$$APP_SPEC_TS_24$;
|
||||
} else {
|
||||
$i18n_23$ = $localize`:[BACKUP_$\{MESSAGE}_ID\:idH]\`desc@@idG:Title G`;
|
||||
}
|
||||
|
||||
// NOTE: Keeping this block as a raw string, since it checks escaping of special chars.
|
||||
let $i18n_7$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @desc Some text \' [BACKUP_MESSAGE_ID: xxx]
|
||||
*/
|
||||
const $MSG_EXTERNAL_idG$$APP_SPEC_TS_21$ = goog.getMsg("Content H");
|
||||
$i18n_7$ = $MSG_EXTERNAL_idG$$APP_SPEC_TS_21$;
|
||||
} else {
|
||||
$i18n_7$ = $localize`:Some text \\' [BACKUP_MESSAGE_ID\: xxx]:Content H`;
|
||||
}
|
||||
|
||||
return [
|
||||
$i18n_0$, ["title", $i18n_1$], ["title", $i18n_2$], ["title", $i18n_3$],
|
||||
["title", $i18n_4$], ["title", $i18n_5$], ["title", $i18n_6$], $i18n_7$
|
||||
];
|
||||
},
|
||||
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵi18n(1, 0);
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(2, "div", 1);
|
||||
$r3$.ɵɵtext(3, "Content B");
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(4, "div", 2);
|
||||
$r3$.ɵɵtext(5, "Content C");
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(6, "div", 3);
|
||||
$r3$.ɵɵtext(7, "Content D");
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(8, "div", 4);
|
||||
$r3$.ɵɵtext(9, "Content E");
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(10, "div", 5);
|
||||
$r3$.ɵɵtext(11, "Content F");
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(12, "div", 6);
|
||||
$r3$.ɵɵtext(13, "Content G");
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(14, "div");
|
||||
$r3$.ɵɵi18n(15, 7);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
function MyComponent_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtemplate(0, MyComponent_0_ng_template_0_Template, 0, 0, "ng-template", 1);
|
||||
$r3$.ɵɵi18nAttributes(1, 2);
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $ctx_r2$ = $r3$.ɵɵnextContext();
|
||||
$r3$.ɵɵi18nExp($ctx_r2$.name);
|
||||
$r3$.ɵɵi18nApply(1);
|
||||
}
|
||||
}
|
||||
…
|
||||
consts: () => {
|
||||
__i18nMsg__('Hello {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ name }}'}}, {})
|
||||
return [
|
||||
[__AttributeMarker.Template__, "ngIf"],
|
||||
[__AttributeMarker.Bindings__, "title"],
|
||||
["title", $i18n_0$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtemplate(0, MyComponent_0_Template, 2, 1, null, 0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵproperty("ngIf", true);
|
||||
}
|
||||
},
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
consts: () => {
|
||||
__i18nMsg__('Hello {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ name }}'}}, {})
|
||||
return [
|
||||
[__AttributeMarker.Bindings__, "title"],
|
||||
["title", $i18n_0$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtemplate(0, MyComponent_ng_template_0_Template, 0, 0, "ng-template", 0);
|
||||
$r3$.ɵɵi18nAttributes(1, 1);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵi18nExp(ctx.name);
|
||||
$r3$.ɵɵi18nApply(1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelement(0, "div", 1);
|
||||
}
|
||||
}
|
||||
…
|
||||
consts: () => {
|
||||
__i18nMsg__('introduction', [], {}, {meaning: 'm', desc: 'd'})
|
||||
return [
|
||||
["id", "static", "title", $i18n_0$, __AttributeMarker.Template__, "ngIf"],
|
||||
["id", "static", "title", $i18n_0$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 1, 0, "div", 0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵproperty("ngIf", ctx.exp);
|
||||
}
|
||||
}
|
||||
|
|
@ -53,8 +53,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "bare_icu.js",
|
||||
"expected": "bare_icu.template.js",
|
||||
"templatePipelineExpected": "bare_icu.pipeline.js"
|
||||
"expected": "bare_icu.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
function $MyComponent_div_2_Template$(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div", 3);
|
||||
$r3$.ɵɵtext(1, " ");
|
||||
$r3$.ɵɵi18n(2, 4);
|
||||
$r3$.ɵɵtext(3, " ");
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $ctx_r0$ = $r3$.ɵɵnextContext();
|
||||
$r3$.ɵɵadvance(2);
|
||||
$r3$.ɵɵi18nExp($ctx_r0$.age);
|
||||
$r3$.ɵɵi18nApply(2);
|
||||
}
|
||||
}
|
||||
…
|
||||
function $MyComponent_div_3_Template$(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div", 5);
|
||||
$r3$.ɵɵtext(1, " You have ");
|
||||
$r3$.ɵɵi18n(2, 6);
|
||||
$r3$.ɵɵtext(3, ". ");
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $ctx_r1$ = $r3$.ɵɵnextContext();
|
||||
$r3$.ɵɵadvance(2);
|
||||
$r3$.ɵɵi18nExp($ctx_r1$.count)($ctx_r1$.count);
|
||||
$r3$.ɵɵi18nApply(2);
|
||||
}
|
||||
}
|
||||
…
|
||||
decls: 4,
|
||||
vars: 3,
|
||||
consts: () => {
|
||||
__i18nIcuMsg__('{VAR_SELECT, select, male {male} female {female} other {other}}', [['VAR_SELECT', String.raw`\uFFFD0\uFFFD`]], {}) __i18nIcuMsg__('{VAR_SELECT, select, 10 {ten} 20 {twenty} other {other}}', [['VAR_SELECT', String.raw`\uFFFD0\uFFFD`]], {})
|
||||
__i18nIcuMsg__('{VAR_SELECT, select, 0 {no emails} 1 {one email} other {{INTERPOLATION} emails}}', [['INTERPOLATION', String.raw`\uFFFD1\uFFFD`], ['VAR_SELECT', String.raw`\uFFFD0\uFFFD`]], {})
|
||||
return [
|
||||
$i18n_0$,
|
||||
["title", "icu only", __AttributeMarker.Template__, "ngIf"],
|
||||
["title", "icu and text", __AttributeMarker.Template__, "ngIf"],
|
||||
["title", "icu only"],
|
||||
$i18n_1$,
|
||||
["title", "icu and text"],
|
||||
$i18n_2$
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵi18n(1, 0);
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵtemplate(2, $MyComponent_div_2_Template$, 4, 1, "div", 1)(3, $MyComponent_div_3_Template$, 4, 2, "div", 2);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵi18nExp(ctx.gender);
|
||||
$r3$.ɵɵi18nApply(1);
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵproperty("ngIf", ctx.visible);
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵproperty("ngIf", ctx.available);
|
||||
}
|
||||
}
|
||||
|
|
@ -17,8 +17,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "legacy_enabled.js",
|
||||
"expected": "legacy_enabled.template.js",
|
||||
"templatePipelineExpected": "legacy_enabled.pipeline.js"
|
||||
"expected": "legacy_enabled.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
|
|||
|
|
@ -1,123 +0,0 @@
|
|||
consts: () => {
|
||||
let $i18n_0$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_2908931752694090721$$LEGACY_ENABLED_TS_1$ = goog.getMsg(
|
||||
"Some & attribute");
|
||||
$i18n_0$ = $MSG_EXTERNAL_2908931752694090721$$LEGACY_ENABLED_TS_1$;
|
||||
} else {
|
||||
$i18n_0$ = $localize`:␟82ec661067f503a3357ecc159b2128325e9208cd␟2908931752694090721:Some & attribute`;
|
||||
}
|
||||
let $i18n_2$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_4700340487900776701$$LEGACY_ENABLED_TS_3$ = goog.getMsg(
|
||||
"Some & message");
|
||||
$i18n_2$ = $MSG_EXTERNAL_4700340487900776701$$LEGACY_ENABLED_TS_3$;
|
||||
} else {
|
||||
$i18n_2$ = $localize`:␟10adaf0ad7b8ba40200cd3c0e7c8d0f13280d522␟4700340487900776701:Some & message`;
|
||||
}
|
||||
let $i18n_4$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_2334195497629636162$$LEGACY_ENABLED_TS_5$ = goog.getMsg(
|
||||
"Some & {$interpolation} attribute", {"interpolation": "\uFFFD0\uFFFD"},
|
||||
{original_code: {"interpolation": "{{'interpolated'}}"}});
|
||||
$i18n_4$ = $MSG_EXTERNAL_2334195497629636162$$LEGACY_ENABLED_TS_5$;
|
||||
} else {
|
||||
$i18n_4$ = $localize`:␟57ebd20267116c04cc1dbd7be0b73bf56484f45d␟2334195497629636162:Some & ${"\uFFFD0\uFFFD"}:INTERPOLATION: attribute`;
|
||||
}
|
||||
let $i18n_6$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_3204054277547499090$$LEGACY_ENABLED_TS_7$ = goog.getMsg(
|
||||
"Some & {$interpolation} message", {"interpolation": "\uFFFD0\uFFFD"},
|
||||
{original_code: {"interpolation": "{{'interpolated' }}"}});
|
||||
$i18n_6$ = $MSG_EXTERNAL_3204054277547499090$$LEGACY_ENABLED_TS_7$;
|
||||
} else {
|
||||
$i18n_6$ = $localize`:␟28d558ca32556f1da67a333e3dada321a97212cd␟3204054277547499090:Some & ${"\uFFFD0\uFFFD"}:INTERPOLATION: message`;
|
||||
}
|
||||
let $i18n_8$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_2406634758623728945$$LEGACY_ENABLED_TS_9$ = goog.getMsg(
|
||||
"&");
|
||||
$i18n_8$ = $MSG_EXTERNAL_2406634758623728945$$LEGACY_ENABLED_TS_9$;
|
||||
} else {
|
||||
$i18n_8$ = $localize`:␟0b3dff7b9382b6217ac97c99f9b04df04381bfdd␟2406634758623728945:&`;
|
||||
}
|
||||
let $i18n_10$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_4156372478368653226$$LEGACY_ENABLED_TS_11$ = goog.getMsg(
|
||||
"&\"");
|
||||
$i18n_10$ = $MSG_EXTERNAL_4156372478368653226$$LEGACY_ENABLED_TS_11$;
|
||||
} else {
|
||||
$i18n_10$ = $localize`:␟25b7cbf210e59a931423097cb7f2e1b72991a687␟4156372478368653226:&"`;
|
||||
}
|
||||
let $i18n_12$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_2720535395337591908$$LEGACY_ENABLED_TS_13$ = goog.getMsg(
|
||||
"\"");
|
||||
$i18n_12$ = $MSG_EXTERNAL_2720535395337591908$$LEGACY_ENABLED_TS_13$;
|
||||
} else {
|
||||
$i18n_12$ = $localize`:␟5b30d888e99e7c6cfc6265f89c39b5921805cd2e␟2720535395337591908:"`;
|
||||
}
|
||||
let $i18n_14$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_3600934704948217447$$LEGACY_ENABLED_TS_15$ = goog.getMsg(
|
||||
"\"\"");
|
||||
$i18n_14$ = $MSG_EXTERNAL_3600934704948217447$$LEGACY_ENABLED_TS_15$;
|
||||
} else {
|
||||
$i18n_14$ = $localize`:␟bdfdbea9161864191756930161fd41b8bc980fde␟3600934704948217447:""`;
|
||||
}
|
||||
return [["title", $i18n_0$], $i18n_2$, [6, "title"], ["title", $i18n_4$], $i18n_6$,
|
||||
$i18n_8$, $i18n_10$, ["title", $i18n_12$], ["title", $i18n_14$]];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
i0.ɵɵelement(0, "div", 0);
|
||||
i0.ɵɵelementStart(1, "div");
|
||||
i0.ɵɵi18n(2, 1);
|
||||
i0.ɵɵelementEnd();
|
||||
i0.ɵɵelementStart(3, "div", 2);
|
||||
i0.ɵɵi18nAttributes(4, 3);
|
||||
i0.ɵɵelementEnd();
|
||||
i0.ɵɵelementStart(5, "div");
|
||||
i0.ɵɵi18n(6, 4);
|
||||
i0.ɵɵelementEnd();
|
||||
i0.ɵɵelementStart(7, "div");
|
||||
i0.ɵɵi18n(8, 5);
|
||||
i0.ɵɵelementEnd();
|
||||
i0.ɵɵelementStart(9, "div");
|
||||
i0.ɵɵi18n(10, 6);
|
||||
i0.ɵɵelementEnd();
|
||||
i0.ɵɵelement(11, "div", 7)(12, "div", 8);
|
||||
}
|
||||
if (rf & 2) {
|
||||
i0.ɵɵadvance(3);
|
||||
i0.ɵɵi18nExp("interpolated");
|
||||
i0.ɵɵi18nApply(4);
|
||||
i0.ɵɵadvance(3);
|
||||
i0.ɵɵi18nExp("interpolated");
|
||||
i0.ɵɵi18nApply(6);
|
||||
}
|
||||
}
|
||||
|
|
@ -11,8 +11,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "foreign_object.js",
|
||||
"expected": "foreign_object.template.js",
|
||||
"templatePipelineExpected": "foreign_object.pipeline.js"
|
||||
"expected": "foreign_object.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
@ -32,8 +31,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "namespaced_div.js",
|
||||
"expected": "namespaced_div.template.js",
|
||||
"templatePipelineExpected": "namespaced_div.pipeline.js"
|
||||
"expected": "namespaced_div.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
|
||||
consts: () => {
|
||||
let $I18N_0$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_7128002169381370313$$APP_SPEC_TS_1$ = goog.getMsg("{$startTagXhtmlDiv} Count: {$startTagXhtmlSpan}5{$closeTagXhtmlSpan}{$closeTagXhtmlDiv}", {
|
||||
"closeTagXhtmlDiv": "\uFFFD/#3\uFFFD",
|
||||
"closeTagXhtmlSpan": "\uFFFD/#4\uFFFD",
|
||||
"startTagXhtmlDiv": "\uFFFD#3\uFFFD",
|
||||
"startTagXhtmlSpan": "\uFFFD#4\uFFFD"
|
||||
}, {
|
||||
original_code: {
|
||||
"closeTagXhtmlDiv": "</xhtml:div>",
|
||||
"closeTagXhtmlSpan": "</span>",
|
||||
"startTagXhtmlDiv": "<xhtml:div xmlns=\"http://www.w3.org/1999/xhtml\">",
|
||||
"startTagXhtmlSpan": "<span>"
|
||||
}
|
||||
});
|
||||
$I18N_0$ = $MSG_EXTERNAL_7128002169381370313$$APP_SPEC_TS_1$;
|
||||
}
|
||||
else {
|
||||
$I18N_0$ = $localize `${"\uFFFD#3\uFFFD"}:START_TAG__XHTML_DIV: Count: ${"\uFFFD#4\uFFFD"}:START_TAG__XHTML_SPAN:5${"\uFFFD/#4\uFFFD"}:CLOSE_TAG__XHTML_SPAN:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG__XHTML_DIV:`;
|
||||
}
|
||||
return [
|
||||
["xmlns", "http://www.w3.org/2000/svg"],
|
||||
$i18n_0$,
|
||||
["xmlns", "http://www.w3.org/1999/xhtml"]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵnamespaceSVG();
|
||||
$r3$.ɵɵelementStart(0, "svg", 0)(1, "foreignObject");
|
||||
$r3$.ɵɵi18nStart(2, 1);
|
||||
$r3$.ɵɵnamespaceHTML();
|
||||
$r3$.ɵɵelementStart(3, "div", 2);
|
||||
$r3$.ɵɵelement(4, "span");
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵi18nEnd();
|
||||
$r3$.ɵɵelementEnd()();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
consts: () => {
|
||||
let $I18N_0$;
|
||||
if (typeof ngI18nClosureMode !== "undefined" && ngI18nClosureMode) {
|
||||
/**
|
||||
* @suppress {msgDescriptions}
|
||||
*/
|
||||
const $MSG_EXTERNAL_7428861019045796010$$APP_SPEC_TS_1$ = goog.getMsg(" Count: {$startTagXhtmlSpan}5{$closeTagXhtmlSpan}", {
|
||||
"closeTagXhtmlSpan": "\uFFFD/#4\uFFFD",
|
||||
"startTagXhtmlSpan": "\uFFFD#4\uFFFD"
|
||||
}, {
|
||||
original_code: {
|
||||
"closeTagXhtmlSpan": "</span>",
|
||||
"startTagXhtmlSpan": "<span>"
|
||||
}
|
||||
});
|
||||
$I18N_0$ = $MSG_EXTERNAL_7428861019045796010$$APP_SPEC_TS_1$;
|
||||
}
|
||||
else {
|
||||
$I18N_0$ = $localize ` Count: ${"\uFFFD#4\uFFFD"}:START_TAG__XHTML_SPAN:5${"\uFFFD/#4\uFFFD"}:CLOSE_TAG__XHTML_SPAN:`;
|
||||
}
|
||||
return [
|
||||
["xmlns", "http://www.w3.org/2000/svg"],
|
||||
["xmlns", "http://www.w3.org/1999/xhtml"],
|
||||
$i18n_0$
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵnamespaceSVG();
|
||||
$r3$.ɵɵelementStart(0, "svg", 0)(1, "foreignObject");
|
||||
$r3$.ɵɵnamespaceHTML();
|
||||
$r3$.ɵɵelementStart(2, "div", 1);
|
||||
$r3$.ɵɵi18nStart(3, 2);
|
||||
$r3$.ɵɵelement(4, "span");
|
||||
$r3$.ɵɵi18nEnd();
|
||||
$r3$.ɵɵelementEnd()()();
|
||||
}
|
||||
}
|
||||
|
|
@ -151,8 +151,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "nested_elements_with_i18n_attributes.js",
|
||||
"expected": "nested_elements_with_i18n_attributes_template.js",
|
||||
"templatePipelineExpected": "nested_elements_with_i18n_attributes_template.pipeline.js"
|
||||
"expected": "nested_elements_with_i18n_attributes_template.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
@ -172,8 +171,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "nested_templates.js",
|
||||
"expected": "nested_templates.template.js",
|
||||
"templatePipelineExpected": "nested_templates.pipeline.js"
|
||||
"expected": "nested_templates.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
@ -193,8 +191,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "self_closing.js",
|
||||
"expected": "self_closing_template.js",
|
||||
"templatePipelineExpected": "self_closing_template.pipeline.js"
|
||||
"expected": "self_closing_template.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
@ -228,8 +225,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "directives.js",
|
||||
"expected": "directives.template.js",
|
||||
"templatePipelineExpected": "directives.pipeline.js"
|
||||
"expected": "directives.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
@ -249,8 +245,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "event_listeners.js",
|
||||
"expected": "event_listeners_template.js",
|
||||
"templatePipelineExpected": "event_listeners_template.pipeline.js"
|
||||
"expected": "event_listeners_template.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
@ -301,8 +296,7 @@
|
|||
],
|
||||
"files": [
|
||||
{
|
||||
"expected": "last_elem_inside_i18n_block_template.js",
|
||||
"templatePipelineExpected": "last_elem_inside_i18n_block_template.pipeline.js",
|
||||
"expected": "last_elem_inside_i18n_block_template.pipeline.js",
|
||||
"generated": "last_elem_inside_i18n_block.js"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵi18nStart(1, 1);
|
||||
$r3$.ɵɵelement(2, "span");
|
||||
$r3$.ɵɵi18nEnd();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $ctx_r0$ = $r3$.ɵɵnextContext();
|
||||
$r3$.ɵɵadvance(2);
|
||||
$r3$.ɵɵi18nExp($ctx_r0$.valueA);
|
||||
$r3$.ɵɵi18nApply(1);
|
||||
}
|
||||
}
|
||||
…
|
||||
decls: 1,
|
||||
vars: 1,
|
||||
consts: () => {
|
||||
__i18nMsg__('Some other content {$startTagSpan}{$interpolation}{$closeTagSpan}', [['closeTagSpan', String.raw`\uFFFD/#2\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['startTagSpan', String.raw`\uFFFD#2\uFFFD`]], {original_code: {'closeTagSpan': '</span>', 'interpolation': '{{ valueA }}', 'startTagSpan': '<span>',}}, {})
|
||||
return [
|
||||
[__AttributeMarker.Template__, "ngIf"],
|
||||
$i18n_0$
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtemplate(0, MyComponent_div_0_Template, 3, 1, "div", 0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵproperty("ngIf", ctx.visible);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
consts: () => {
|
||||
__i18nMsg__('Hello', [], {}, {})
|
||||
return [
|
||||
[__AttributeMarker.Bindings__, "click"],
|
||||
$i18n_0$
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div", 0);
|
||||
$r3$.ɵɵlistener("click", function MyComponent_Template_div_click_0_listener() { return ctx.onClick(); });
|
||||
$r3$.ɵɵi18n(1, 1);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
consts: () => {
|
||||
__i18nMsg__('{$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ attr }}'}}, {})
|
||||
__i18nMsg__('{$interpolation}{$startHeadingLevel1}{$closeHeadingLevel1}', [['closeHeadingLevel1', String.raw`\uFFFD/#2\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['startHeadingLevel1', String.raw`\uFFFD#2\uFFFD`]], {original_code: { 'closeHeadingLevel1': '</h1>', 'interpolation': '{{ text }}', 'startHeadingLevel1': '<h1 i18n-title title=\"{{ attr }}\">' }}, {})
|
||||
return [
|
||||
$i18n_0$,
|
||||
[__AttributeMarker.I18n__, "title"],
|
||||
["title", $i18n_1$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
i0.ɵɵelementStart(0, "div");
|
||||
i0.ɵɵi18nStart(1, 0);
|
||||
i0.ɵɵelementStart(2, "h1", 1);
|
||||
i0.ɵɵi18nAttributes(3, 2);
|
||||
i0.ɵɵelementEnd();
|
||||
i0.ɵɵi18nEnd();
|
||||
i0.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
i0.ɵɵadvance(2);
|
||||
i0.ɵɵi18nExp(ctx.attr);
|
||||
i0.ɵɵi18nApply(3);
|
||||
i0.ɵɵadvance();
|
||||
i0.ɵɵi18nExp(ctx.text);
|
||||
i0.ɵɵi18nApply(1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
decls: 9,
|
||||
vars: 7,
|
||||
consts: () => {
|
||||
__i18nMsg__('Span title {$interpolation} and {$interpolation_1}', [['interpolation', String.raw`\uFFFD0\uFFFD`], ['interpolation_1', String.raw`\uFFFD1\uFFFD`]], {original_code: {'interpolation': '{{ valueB }}', 'interpolation_1': '{{ valueC }}'}}, {})
|
||||
__i18nMsg__(' My i18n block #1 with value: {$interpolation} {$startTagSpan} Plain text in nested element (block #1) {$closeTagSpan}',[['closeTagSpan', String.raw`\uFFFD/#2\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['startTagSpan', String.raw`\uFFFD#2\uFFFD`]], {original_code: {'closeTagSpan': '</span>', 'interpolation': '{{ valueA }}', 'startTagSpan': '<span i18n-title title="Span title {{ valueB }} and {{ valueC }}">'}}, {})
|
||||
__i18nMsg__('Span title {$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ valueE }}'}}, {})
|
||||
__i18nMsg__(' My i18n block #2 with value {$interpolation} {$startTagSpan} Plain text in nested element (block #2) {$closeTagSpan}',[['closeTagSpan', String.raw`\uFFFD/#7\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['startTagSpan', String.raw`\uFFFD#7\uFFFD`]], {original_code: {'closeTagSpan': '</span>', 'interpolation': '{{ valueD | uppercase }}', 'startTagSpan': '<span i18n-title title="Span title {{ valueE }}">'}}, {})
|
||||
return [
|
||||
$i18n_0$,
|
||||
[__AttributeMarker.I18n__, "title"],
|
||||
["title", $i18n_1$],
|
||||
$i18n_2$,
|
||||
["title", $i18n_3$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵi18nStart(1, 0);
|
||||
$r3$.ɵɵelementStart(2, "span", 1);
|
||||
$r3$.ɵɵi18nAttributes(3, 2);
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵi18nEnd();
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(4, "div");
|
||||
$r3$.ɵɵi18nStart(5, 3);
|
||||
$r3$.ɵɵpipe(6, "uppercase");
|
||||
$r3$.ɵɵelementStart(7, "span", 1);
|
||||
$r3$.ɵɵi18nAttributes(8, 4);
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵi18nEnd();
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵadvance(2);
|
||||
$r3$.ɵɵi18nExp(ctx.valueB)(ctx.valueC);
|
||||
$r3$.ɵɵi18nApply(3);
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵi18nExp(ctx.valueA);
|
||||
$r3$.ɵɵi18nApply(1);
|
||||
$r3$.ɵɵadvance(4);
|
||||
$r3$.ɵɵi18nExp(ctx.valueE);
|
||||
$r3$.ɵɵi18nApply(8);
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵi18nExp($r3$.ɵɵpipeBind1(6, 5, ctx.valueD));
|
||||
$r3$.ɵɵi18nApply(5);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
function MyComponent_div_2_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div")(1, "div");
|
||||
$r3$.ɵɵi18nStart(2, 1);
|
||||
$r3$.ɵɵelement(3, "div");
|
||||
$r3$.ɵɵpipe(4, "uppercase");
|
||||
$r3$.ɵɵi18nEnd();
|
||||
$r3$.ɵɵelementEnd()();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $ctx_r0$ = $r3$.ɵɵnextContext();
|
||||
$r3$.ɵɵadvance(4);
|
||||
$r3$.ɵɵi18nExp($ctx_r0$.valueA)($r3$.ɵɵpipeBind1(4, 2, $ctx_r0$.valueB));
|
||||
$r3$.ɵɵi18nApply(2);
|
||||
}
|
||||
}
|
||||
…
|
||||
decls: 3,
|
||||
vars: 1,
|
||||
consts: () => {
|
||||
__i18nMsg__(' Some other content {$interpolation} {$startTagDiv} More nested levels with bindings {$interpolation_1} {$closeTagDiv}', [['closeTagDiv', String.raw`\uFFFD/#3\uFFFD`], ['interpolation', String.raw`\uFFFD0\uFFFD`], ['interpolation_1', String.raw`\uFFFD1\uFFFD`], ['startTagDiv', String.raw`\uFFFD#3\uFFFD`]], {original_code: {'closeTagDiv': '</div>', 'interpolation': '{{ valueA }}', 'interpolation_1': '{{ valueB | uppercase }}', 'startTagDiv': '<div>'}}, {})
|
||||
return [
|
||||
[__AttributeMarker.Template__, "ngIf"],
|
||||
$i18n_0$
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵtext(1, " Some content ");
|
||||
$r3$.ɵɵtemplate(2, MyComponent_div_2_Template, 5, 4, "div", 0);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵadvance(2);
|
||||
$r3$.ɵɵproperty("ngIf", ctx.visible);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
function MyComponent_img_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelement(0, "img", 0);
|
||||
}
|
||||
}
|
||||
…
|
||||
function MyComponent_img_2_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "img", 3);
|
||||
$r3$.ɵɵi18nAttributes(1, 4);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $ctx_r1$ = $r3$.ɵɵnextContext();
|
||||
$r3$.ɵɵi18nExp($ctx_r1$.id);
|
||||
$r3$.ɵɵi18nApply(1);
|
||||
}
|
||||
}
|
||||
…
|
||||
decls: 3,
|
||||
vars: 2,
|
||||
consts: () => {
|
||||
__i18nMsg__('App logo #{$interpolation}', [['interpolation', String.raw`\uFFFD0\uFFFD`]], {original_code: {'interpolation': '{{ id }}'}}, {})
|
||||
return [
|
||||
["src", "logo.png"],
|
||||
["src", "logo.png", __AttributeMarker.Template__, "ngIf"],
|
||||
["src", "logo.png", __AttributeMarker.Bindings__, "title",
|
||||
__AttributeMarker.Template__, "ngIf"],
|
||||
["src", "logo.png", __AttributeMarker.I18n__, "title"],
|
||||
["title", $i18n_0$]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelement(0, "img", 0);
|
||||
$r3$.ɵɵtemplate(1, MyComponent_img_1_Template, 1, 0, "img", 1)(2, MyComponent_img_2_Template, 2, 1, "img", 2);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵproperty("ngIf", ctx.visible);
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵproperty("ngIf", ctx.visible);
|
||||
}
|
||||
}
|
||||
|
|
@ -95,8 +95,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "self_closing_tags.js",
|
||||
"expected": "self_closing_tags.template.js",
|
||||
"templatePipelineExpected": "self_closing_tags.pipeline.js"
|
||||
"expected": "self_closing_tags.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
@ -170,8 +169,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "structural_directives.js",
|
||||
"expected": "structural_directives.template.js",
|
||||
"templatePipelineExpected": "structural_directives.pipeline.js"
|
||||
"expected": "structural_directives.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
function MyComponent_ng_template_3_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵi18nStart(0, 2);
|
||||
$r3$.ɵɵelement(1, "img", 1);
|
||||
$r3$.ɵɵi18nEnd();
|
||||
}
|
||||
}
|
||||
…
|
||||
consts: () => {
|
||||
__i18nMsg__('{$tagImg} is my logo #1 ', [['tagImg', String.raw`\uFFFD#2\uFFFD\uFFFD/#2\uFFFD`]], {original_code: {tagImg: '<img src="logo.png" title="Logo" />'}}, {})
|
||||
__i18nMsg__('{$tagImg} is my logo #2 ', [['tagImg', String.raw`\uFFFD#1\uFFFD\uFFFD/#1\uFFFD`]], {original_code: {tagImg: '<img src="logo.png" title="Logo" />'}}, {})
|
||||
return [
|
||||
$i18n_0$,
|
||||
["src", "logo.png", "title", "Logo"],
|
||||
$i18n_1$
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementContainerStart(0);
|
||||
$r3$.ɵɵi18nStart(1, 0);
|
||||
$r3$.ɵɵelement(2, "img", 1);
|
||||
$r3$.ɵɵi18nEnd();
|
||||
$r3$.ɵɵelementContainerEnd();
|
||||
$r3$.ɵɵtemplate(3, MyComponent_ng_template_3_Template, 2, 0, "ng-template");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
// NOTE: applying structural directives to <ng-template> is typically user error, but it is technically allowed, so we need to support it.
|
||||
function MyComponent_0_ng_template_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵi18n(0, 1);
|
||||
}
|
||||
}
|
||||
function MyComponent_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtemplate(0, MyComponent_0_ng_template_0_Template, 1, 0, "ng-template");
|
||||
}
|
||||
}
|
||||
…
|
||||
function MyComponent_ng_container_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementContainerStart(0);
|
||||
$r3$.ɵɵi18n(1, 2);
|
||||
$r3$.ɵɵelementContainerEnd();
|
||||
}
|
||||
}
|
||||
…
|
||||
decls: 2,
|
||||
vars: 2,
|
||||
consts: () => {
|
||||
__i18nMsg__('Content A', [], {}, {})
|
||||
__i18nMsg__('Content B', [], {}, {})
|
||||
return [
|
||||
[__AttributeMarker.Template__, "ngIf"],
|
||||
$i18n_0$,
|
||||
$i18n_1$
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵtemplate(0, MyComponent_0_Template, 1, 0, null, 0)(1, MyComponent_ng_container_1_Template, 2, 0, "ng-container", 0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵproperty("ngIf", ctx.someFlag);
|
||||
$r3$.ɵɵadvance();
|
||||
$r3$.ɵɵproperty("ngIf", ctx.someFlag);
|
||||
}
|
||||
}
|
||||
|
|
@ -53,8 +53,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "styles.js",
|
||||
"expected": "styles.template.js",
|
||||
"templatePipelineExpected": "styles.pipeline.js"
|
||||
"expected": "styles.pipeline.js"
|
||||
}
|
||||
],
|
||||
"extraChecks": [
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
decls: 4,
|
||||
vars: 0,
|
||||
consts: () => {
|
||||
__i18nMsg__('Text #1', [], {}, {})
|
||||
__i18nMsg__('Text #2', [], {}, {})
|
||||
return [
|
||||
[__AttributeMarker.Classes__, "myClass"],
|
||||
$i18n_0$,
|
||||
[__AttributeMarker.Styles__, "padding", "10px"],
|
||||
$i18n_1$
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "span", 0);
|
||||
$r3$.ɵɵi18n(1, 1);
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelementStart(2, "span", 2);
|
||||
$r3$.ɵɵi18n(3, 3);
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
|
|
@ -61,8 +61,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "local_ref_before_listener_template.js",
|
||||
"templatePipelineExpected": "local_ref_before_listener.pipeline.js",
|
||||
"expected": "local_ref_before_listener.pipeline.js",
|
||||
"generated": "local_ref_before_listener.js"
|
||||
}
|
||||
],
|
||||
|
|
@ -291,8 +290,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "embedded_view_listener_context_template.js",
|
||||
"templatePipelineExpected": "embedded_view_listener_context_template.pipeline.js",
|
||||
"expected": "embedded_view_listener_context_template.pipeline.js",
|
||||
"generated": "embedded_view_listener_context.js"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
function MyComponent_ng_template_0_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
const $_r3$ = $i0$.ɵɵgetCurrentView();
|
||||
$i0$.ɵɵelementStart(0, "button", 0);
|
||||
$i0$.ɵɵlistener("click", function MyComponent_ng_template_0_Template_button_click_0_listener() {
|
||||
const $restoredCtx$ = $i0$.ɵɵrestoreView($_r3$);
|
||||
const $obj_r1$ = $restoredCtx$.$implicit;
|
||||
return $i0$.ɵɵresetView($obj_r1$.value = 1);
|
||||
});
|
||||
$i0$.ɵɵtext(1, "Change");
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
…
|
||||
MyComponent.ɵcmp = /*@__PURE__*/ $r3$.ɵɵdefineComponent({
|
||||
type: MyComponent,
|
||||
selectors: [["my-component"]],
|
||||
decls: 4,
|
||||
vars: 0,
|
||||
consts: [[__AttributeMarker.Bindings__, "click"], ["user", ""]],
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
const $s$ = $r3$.ɵɵgetCurrentView();
|
||||
$r3$.ɵɵelementStart(0, "button", 0);
|
||||
$r3$.ɵɵlistener("click", function MyComponent_Template_button_click_0_listener() {
|
||||
$r3$.ɵɵrestoreView($s$);
|
||||
const $user$ = $r3$.ɵɵreference(3);
|
||||
return $r3$.ɵɵresetView(ctx.onClick($user$.value));
|
||||
});
|
||||
$r3$.ɵɵtext(1, "Save");
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelement(2, "input", null, 1);
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
});
|
||||
|
|
@ -80,8 +80,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"templatePipelineExpected": "shared_name_with_consts_template.pipeline.js",
|
||||
"expected": "shared_name_with_consts_template.js",
|
||||
"expected": "shared_name_with_consts_template.pipeline.js",
|
||||
"generated": "shared_name_with_consts.js"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
consts: () => {
|
||||
__i18nMsg__('label', [], {}, {})
|
||||
return [
|
||||
["attr", "", __AttributeMarker.Classes__, "attr"],
|
||||
["ngProjectAs", "selector", __AttributeMarker.ProjectAs__, ["selector"], __AttributeMarker.Classes__, "selector"],
|
||||
[__AttributeMarker.Classes__, "width", __AttributeMarker.Styles__, "width", "0px"],
|
||||
[__AttributeMarker.Classes__, "tabindex", __AttributeMarker.Bindings__, "tabindex"],
|
||||
["class", "ngIf", __AttributeMarker.Template__, "ngIf"],
|
||||
["aria-label", i18n_0, __AttributeMarker.Classes__, "aria-label"],
|
||||
["all", "", "ngProjectAs", "all", "style", "all:all", "class", "all", __AttributeMarker.ProjectAs__, ["all"], __AttributeMarker.Bindings__, "all", __AttributeMarker.Template__],
|
||||
[__AttributeMarker.Classes__, "ngIf"],
|
||||
["all", "", "ngProjectAs", "all", __AttributeMarker.ProjectAs__, ["all"], __AttributeMarker.Classes__, "all", __AttributeMarker.Styles__, "all", "all", __AttributeMarker.Bindings__, "all"]
|
||||
];
|
||||
},
|
||||
template: function MyComponent_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
i0.ɵɵelement(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3);
|
||||
i0.ɵɵtemplate(4, MyComponent_div_4_Template, 1, 0, "div", 4);
|
||||
i0.ɵɵelement(5, "div", 5);
|
||||
i0.ɵɵtemplate(6, MyComponent_div_6_Template, 1, 1, "div", 6);
|
||||
}
|
||||
if (rf & 2) {
|
||||
i0.ɵɵadvance(3);
|
||||
i0.ɵɵproperty("tabindex", ctx.tabIndex);
|
||||
i0.ɵɵadvance();
|
||||
i0.ɵɵproperty("ngIf", ctx.cond);
|
||||
i0.ɵɵadvance(2);
|
||||
i0.ɵɵproperty("all", ctx.all);
|
||||
}
|
||||
}
|
||||
|
|
@ -18,8 +18,7 @@
|
|||
{
|
||||
"failureMessage": "Incorrect template",
|
||||
"files": [{
|
||||
"expected": "pipe_bindings_template.js",
|
||||
"templatePipelineExpected": "pipe_bindings.pipeline.js",
|
||||
"expected": "pipe_bindings.pipeline.js",
|
||||
"generated": "pipe_bindings.js"
|
||||
}]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
template: function MyComponent_Template(rf, $ctx$) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵpipe(1, "stylePipe");
|
||||
$r3$.ɵɵpipe(2, "classPipe");
|
||||
$r3$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵstyleMap($r3$.ɵɵpipeBind1(1, 4, $ctx$.myStyleExp));
|
||||
$r3$.ɵɵclassMap($r3$.ɵɵpipeBind1(2, 6, $ctx$.myClassExp));
|
||||
}
|
||||
}
|
||||
|
|
@ -10,8 +10,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "nested_template_context_template.js",
|
||||
"templatePipelineExpected": "nested_template_context.pipeline.js",
|
||||
"expected": "nested_template_context.pipeline.js",
|
||||
"generated": "nested_template_context.js"
|
||||
}
|
||||
],
|
||||
|
|
@ -79,8 +78,7 @@
|
|||
{
|
||||
"files": [
|
||||
{
|
||||
"expected": "ng_for_parent_context_variables_template.js",
|
||||
"templatePipelineExpected": "ng_for_parent_context_variables.pipeline.js",
|
||||
"expected": "ng_for_parent_context_variables.pipeline.js",
|
||||
"generated": "ng_for_parent_context_variables.js"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,66 +0,0 @@
|
|||
function MyComponent_ul_0_li_1_div_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
const $s$ = $i0$.ɵɵgetCurrentView();
|
||||
$i0$.ɵɵelementStart(0, "div", 2);
|
||||
$i0$.ɵɵlistener("click", function MyComponent_ul_0_li_1_div_1_Template_div_click_0_listener(){
|
||||
const $sr$ = $i0$.ɵɵrestoreView($s$);
|
||||
const $inner$ = $sr$.$implicit;
|
||||
const $middle$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $outer$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $myComp$ = $i0$.ɵɵnextContext();
|
||||
return $i0$.ɵɵresetView($myComp$.onClick($outer$, $middle$, $inner$));
|
||||
});
|
||||
$i0$.ɵɵtext(1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
|
||||
if (rf & 2) {
|
||||
const $inner1$ = ctx.$implicit;
|
||||
const $middle1$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $outer1$ = $i0$.ɵɵnextContext().$implicit;
|
||||
const $myComp1$ = $i0$.ɵɵnextContext();
|
||||
$i0$.ɵɵproperty("title", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component));
|
||||
$r3$.ɵɵadvance();
|
||||
$i0$.ɵɵtextInterpolate1(" ", $myComp1$.format($outer1$, $middle1$, $inner1$, $myComp1$.component), " ");
|
||||
}
|
||||
}
|
||||
|
||||
function MyComponent_ul_0_li_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵelementStart(0, "li");
|
||||
$i0$.ɵɵtemplate(1, MyComponent_ul_0_li_1_div_1_Template, 2, 2, "div", 1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $myComp2$ = $i0$.ɵɵnextContext(2);
|
||||
$r3$.ɵɵadvance();
|
||||
$i0$.ɵɵproperty("ngForOf", $myComp2$.items);
|
||||
}
|
||||
}
|
||||
|
||||
function MyComponent_ul_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵelementStart(0, "ul");
|
||||
$i0$.ɵɵtemplate(1, MyComponent_ul_0_li_1_Template, 2, 1, "li", 0);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $outer2$ = ctx.$implicit;
|
||||
$r3$.ɵɵadvance();
|
||||
$i0$.ɵɵproperty("ngForOf", $outer2$.items);
|
||||
}
|
||||
}
|
||||
…
|
||||
consts: [
|
||||
[__AttributeMarker.Template__, "ngFor", "ngForOf"],
|
||||
[__AttributeMarker.Bindings__, "title", "click", __AttributeMarker.Template__, "ngFor", "ngForOf"],
|
||||
[__AttributeMarker.Bindings__, "title", "click"]
|
||||
],
|
||||
template:function MyComponent_Template(rf, ctx){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵtemplate(0, MyComponent_ul_0_Template, 2, 1, "ul", 0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.ɵɵproperty("ngForOf", ctx.items);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
function MyComponent_div_0_span_1_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵelementStart(0, "span");
|
||||
$i0$.ɵɵtext(1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $div$ = $i0$.ɵɵnextContext();
|
||||
const $i$ = $div$.index;
|
||||
const $item$ = $div$.$implicit;
|
||||
$r3$.ɵɵadvance();
|
||||
$i0$.ɵɵtextInterpolate2(" ", $i$, " - ", $item$, " ");
|
||||
}
|
||||
}
|
||||
|
||||
function MyComponent_div_0_Template(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵelementStart(0, "div");
|
||||
$i0$.ɵɵtemplate(1, MyComponent_div_0_span_1_Template, 2, 2, "span", 1);
|
||||
$i0$.ɵɵelementEnd();
|
||||
}
|
||||
if (rf & 2) {
|
||||
const $app$ = $i0$.ɵɵnextContext();
|
||||
$r3$.ɵɵadvance();
|
||||
$i0$.ɵɵproperty("ngIf", $app$.showing);
|
||||
}
|
||||
}
|
||||
|
||||
…
|
||||
consts: [
|
||||
[__AttributeMarker.Template__, "ngFor", "ngForOf"],
|
||||
[__AttributeMarker.Template__, "ngIf"]
|
||||
],
|
||||
template:function MyComponent_Template(rf, ctx){
|
||||
if (rf & 1) {
|
||||
$i0$.ɵɵtemplate(0, MyComponent_div_0_Template, 2, 1, "div", 0);
|
||||
}
|
||||
if (rf & 2) {
|
||||
$i0$.ɵɵproperty("ngForOf", ctx.items);
|
||||
}
|
||||
}
|
||||
61
packages/compiler-cli/test/compliance/test_cases/replace.sh
Executable file
61
packages/compiler-cli/test/compliance/test_cases/replace.sh
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Step 1: Find all .pipeline.js files recursively
|
||||
find . -type f -name "*.pipeline.js" | while read -r pipeline_file; do
|
||||
base_dir=$(dirname "$pipeline_file")
|
||||
base_name=$(basename "$pipeline_file" .pipeline.js)
|
||||
|
||||
# Step 2: Attempt to delete the corresponding .js, .template.js, or _template.js file
|
||||
js_file="${base_dir}/${base_name}.js"
|
||||
template_js_file="${base_dir}/${base_name}.template.js"
|
||||
underscore_template_js_file="${base_dir}/${base_name}_template.js"
|
||||
|
||||
file_deleted=false
|
||||
|
||||
if [ -f "$js_file" ]; then
|
||||
rm "$js_file" && echo "Deleted file: $js_file"
|
||||
file_deleted=true
|
||||
fi
|
||||
if [ -f "$template_js_file" ]; then
|
||||
rm "$template_js_file" && echo "Deleted file: $template_js_file"
|
||||
file_deleted=true
|
||||
fi
|
||||
if [ -f "$underscore_template_js_file" ]; then
|
||||
rm "$underscore_template_js_file" && echo "Deleted file: $underscore_template_js_file"
|
||||
file_deleted=true
|
||||
fi
|
||||
|
||||
if [ "$file_deleted" = false ]; then
|
||||
echo "Error: Corresponding file for $pipeline_file not found."
|
||||
fi
|
||||
|
||||
# Step 3: Modify TEST_CASES.json if it exists in the same directory
|
||||
test_cases_file="${base_dir}/TEST_CASES.json"
|
||||
if [ -f "$test_cases_file" ]; then
|
||||
# Patterns to match "expected" before the filename
|
||||
js_pattern="expected.*$base_name\.js"
|
||||
template_js_pattern="expected.*$base_name\.template\.js"
|
||||
underscore_template_js_pattern="expected.*$base_name\_template\.js"
|
||||
|
||||
# Use a more compatible sed in-place editing command
|
||||
if grep -q -E "expected.*(js|template\.js|_template\.js)" "$test_cases_file"; then
|
||||
# Determine if we are using GNU sed or BSD sed and adjust the command accordingly
|
||||
if sed --version 2>/dev/null | grep -q GNU; then
|
||||
# GNU sed
|
||||
sed -i "/$js_pattern/d" "$test_cases_file"
|
||||
sed -i "/$template_js_pattern/d" "$test_cases_file"
|
||||
sed -i "/$underscore_template_js_pattern/d" "$test_cases_file"
|
||||
else
|
||||
# BSD sed
|
||||
sed -i '' "/$js_pattern/d" "$test_cases_file"
|
||||
sed -i '' "/$template_js_pattern/d" "$test_cases_file"
|
||||
sed -i '' "/$underscore_template_js_pattern/d" "$test_cases_file"
|
||||
fi
|
||||
echo "Modified $test_cases_file to remove references to ${base_name}.js, ${base_name}.template.js, and/or ${base_name}_template.js with 'expected' preceding"
|
||||
else
|
||||
echo "Error: No line found in $test_cases_file for 'expected' preceding ${base_name}.js, ${base_name}.template.js, or ${base_name}_template.js"
|
||||
fi
|
||||
else
|
||||
echo "Error: TEST_CASES.json not found in $base_dir"
|
||||
fi
|
||||
done
|
||||
|
|
@ -794,8 +794,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "i18n_message_interpolation_whitespace.js",
|
||||
"expected": "i18n_message_interpolation_whitespace_template.js",
|
||||
"templatePipelineExpected": "i18n_message_interpolation_whitespace_template.pipeline.js"
|
||||
"expected": "i18n_message_interpolation_whitespace_template.pipeline.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -818,8 +817,7 @@
|
|||
"files": [
|
||||
{
|
||||
"generated": "i18n_message_interpolation_whitespace.js",
|
||||
"expected": "i18n_message_interpolation_whitespace_partial_template.js",
|
||||
"templatePipelineExpected": "i18n_message_interpolation_whitespace_partial_template.pipeline.js"
|
||||
"expected": "i18n_message_interpolation_whitespace_partial_template.pipeline.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
$localize ` pre-title ${
|
||||
"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{titleValue}}"
|
||||
}:INTERPOLATION: post-title` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-title\" i18n-title>"
|
||||
…
|
||||
$localize ` pre-body ${
|
||||
"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{bodyValue}}"
|
||||
}:INTERPOLATION: post-body` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-body"
|
||||
…
|
||||
.ɵɵelementStart(0, "div", 0) // SOURCE: "/i18n_message_interpolation_whitespace.ts" "<div i18n title=\""
|
||||
…
|
||||
// TODO: Work out how to fix the broken segment for the last item in a template
|
||||
.ɵɵelementEnd() // SOURCE: "/i18n_message_interpolation_whitespace.ts" "</div>'"
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
$localize ` pre-title ${
|
||||
"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{titleValue}}"
|
||||
}:INTERPOLATION: post-title` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-title"
|
||||
…
|
||||
$localize ` pre-body ${
|
||||
"\uFFFD0\uFFFD" // SOURCE: "/i18n_message_interpolation_whitespace.ts" "{{bodyValue}}"
|
||||
}:INTERPOLATION: post-body` // SOURCE: "/i18n_message_interpolation_whitespace.ts" " post-body"
|
||||
…
|
||||
i0.ɵɵelementStart(0, "div", 0) // SOURCE: "/i18n_message_interpolation_whitespace.ts" "<div i18n title=\""
|
||||
…
|
||||
i0.ɵɵelementEnd() // SOURCE: "/i18n_message_interpolation_whitespace.ts" "</div>"
|
||||
|
|
@ -61,10 +61,6 @@
|
|||
"title": "A path (relative to the test case) where a file containing expected output can be found",
|
||||
"type": "string"
|
||||
},
|
||||
"templatePipelineExpected": {
|
||||
"title": "A path (relative to the test case) where a file containing alternate expected output for the template pipeline can be found",
|
||||
"type": "string"
|
||||
},
|
||||
"generated": {
|
||||
"title": "A path (relative to the build output directory) where the compiled file can be found.",
|
||||
"type": "string"
|
||||
|
|
|
|||
|
|
@ -271,8 +271,6 @@ export interface Expectation {
|
|||
export interface ExpectedFile {
|
||||
expected: string;
|
||||
generated: string;
|
||||
/** Alternate expected file when compiling with the template pipeline. */
|
||||
templatePipelineExpected?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -13,18 +13,17 @@ import {CompileResult, initMockTestFileSystem} from './compile_test';
|
|||
import {CompilationMode, ComplianceTest, Expectation, getAllComplianceTests} from './get_compliance_tests';
|
||||
|
||||
function transformExpectation(expectation: Expectation, isLocalCompilation: boolean): void {
|
||||
expectation.files =
|
||||
expectation.files.map(pair => ({
|
||||
expected: pair.templatePipelineExpected || pair.expected,
|
||||
generated: pair.generated,
|
||||
}));
|
||||
expectation.files = expectation.files.map(pair => ({
|
||||
expected: pair.expected,
|
||||
generated: pair.generated,
|
||||
}));
|
||||
|
||||
if (isLocalCompilation) {
|
||||
expectation.files = expectation.files.map(
|
||||
pair => ({
|
||||
expected: getFilenameForLocalCompilation(pair.templatePipelineExpected || pair.expected),
|
||||
generated: pair.generated,
|
||||
}));
|
||||
expectation.files =
|
||||
expectation.files.map(pair => ({
|
||||
expected: getFilenameForLocalCompilation(pair.expected),
|
||||
generated: pair.generated,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue