refactor(core): rename synthetic host property and listener instructions (#38150)
This commit updates synthetic host property and listener instruction names to better align with other instructions. The `ɵɵupdateSyntheticHostBinding` instruction was renamed to `ɵɵsyntheticHostProperty` (to match the `ɵɵhostProperty` instruction name) and `ɵɵcomponentHostSyntheticListener` was renamed to `ɵɵsyntheticHostListener` since this instruction is generated for both Components and Directives (so 'component' is removed from the name). This PR is a followup after PR #35568. PR Close #38150
This commit is contained in:
@ -434,7 +434,7 @@ describe('compiler compliance', () => {
|
||||
hostVars: 14,
|
||||
hostBindings: function MyComponent_HostBindings(rf, ctx) {
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵupdateSyntheticHostBinding("@expansionHeight",
|
||||
$r3$.ɵɵsyntheticHostProperty("@expansionHeight",
|
||||
$r3$.ɵɵpureFunction2(5, $_c1$, ctx.getExpandedState(),
|
||||
$r3$.ɵɵpureFunction2(2, $_c0$, ctx.collapsedHeight, ctx.expandedHeight)
|
||||
)
|
||||
|
@ -1000,7 +1000,7 @@ describe('compiler compliance: bindings', () => {
|
||||
hostBindings: function MyDirective_HostBindings(rf, ctx) {
|
||||
…
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵupdateSyntheticHostBinding("@expand", ctx.expandedState)("@fadeOut", true)("@shrink", ctx.isSmall);
|
||||
$r3$.ɵɵsyntheticHostProperty("@expand", ctx.expandedState)("@fadeOut", true)("@shrink", ctx.isSmall);
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -1173,7 +1173,7 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
hostBindings: function MyComponent_HostBindings(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵcomponentHostSyntheticListener("@animation.done", function MyComponent_animation_animation_done_HostBindingHandler() { return ctx.done(); })("@animation.start", function MyComponent_animation_animation_start_HostBindingHandler() { return ctx.start(); });
|
||||
$r3$.ɵɵsyntheticHostListener("@animation.done", function MyComponent_animation_animation_done_HostBindingHandler() { return ctx.done(); })("@animation.start", function MyComponent_animation_animation_start_HostBindingHandler() { return ctx.start(); });
|
||||
}
|
||||
}
|
||||
`;
|
||||
@ -1211,7 +1211,7 @@ describe('compiler compliance: bindings', () => {
|
||||
…
|
||||
hostBindings: function MyComponent_HostBindings(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵcomponentHostSyntheticListener("@animation.done", function MyComponent_animation_animation_done_HostBindingHandler() { return ctx.done(); })("@animation.start", function MyComponent_animation_animation_start_HostBindingHandler() { return ctx.start(); });
|
||||
$r3$.ɵɵsyntheticHostListener("@animation.done", function MyComponent_animation_animation_done_HostBindingHandler() { return ctx.done(); })("@animation.start", function MyComponent_animation_animation_start_HostBindingHandler() { return ctx.start(); });
|
||||
$r3$.ɵɵlistener("mousedown", function MyComponent_mousedown_HostBindingHandler() { return ctx.mousedown(); })("mouseup", function MyComponent_mouseup_HostBindingHandler() { return ctx.mouseup(); })("click", function MyComponent_click_HostBindingHandler() { return ctx.click(); });
|
||||
}
|
||||
}
|
||||
|
@ -336,9 +336,10 @@ describe('compiler compliance: styling', () => {
|
||||
hostVars: 1,
|
||||
hostBindings: function MyAnimDir_HostBindings(rf, ctx) {
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵcomponentHostSyntheticListener("@myAnim.start", function MyAnimDir_animation_myAnim_start_HostBindingHandler() { return ctx.onStart(); })("@myAnim.done", function MyAnimDir_animation_myAnim_done_HostBindingHandler() { return ctx.onDone(); });
|
||||
} if (rf & 2) {
|
||||
$r3$.ɵɵupdateSyntheticHostBinding("@myAnim", ctx.myAnimState);
|
||||
$r3$.ɵɵsyntheticHostListener("@myAnim.start", function MyAnimDir_animation_myAnim_start_HostBindingHandler() { return ctx.onStart(); })("@myAnim.done", function MyAnimDir_animation_myAnim_done_HostBindingHandler() { return ctx.onDone(); });
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵsyntheticHostProperty("@myAnim", ctx.myAnimState);
|
||||
}
|
||||
}
|
||||
…
|
||||
@ -2083,7 +2084,7 @@ describe('compiler compliance: styling', () => {
|
||||
hostBindings: function MyDir_HostBindings(rf, ctx) {
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵhostProperty("title", ctx.title);
|
||||
$r3$.ɵɵupdateSyntheticHostBinding("@anim",
|
||||
$r3$.ɵɵsyntheticHostProperty("@anim",
|
||||
$r3$.ɵɵpureFunction2(7, _c1, ctx._animValue,
|
||||
$r3$.ɵɵpureFunction2(4, _c0, ctx._animParam1, ctx._animParam2)));
|
||||
$r3$.ɵɵclassProp("foo", ctx.foo);
|
||||
|
Reference in New Issue
Block a user