Skip to content

Commit 8ed6fbc

Browse files
committed
refactor(split): migrate to Angular output function
1 parent 300788a commit 8ed6fbc

3 files changed

Lines changed: 9 additions & 14 deletions

File tree

api-goldens/element-ng/split/index.api.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import { AfterContentInit } from '@angular/core';
88
import * as _angular_core from '@angular/core';
9-
import { EventEmitter } from '@angular/core';
109
import { OnChanges } from '@angular/core';
1110
import { QueryList } from '@angular/core';
1211
import { Signal } from '@angular/core';
@@ -48,7 +47,7 @@ export class SiSplitComponent implements AfterContentInit, OnChanges {
4847
// (undocumented)
4948
sizes: number[];
5049
// (undocumented)
51-
readonly sizesChange: EventEmitter<number[]>;
50+
readonly sizesChange: _angular_core.OutputEmitterRef<number[]>;
5251
stateId?: string;
5352
}
5453

@@ -61,7 +60,7 @@ export class SiSplitPartComponent implements OnChanges {
6160
// (undocumented)
6261
actions: Action[];
6362
// (undocumented)
64-
readonly collapseChanged: EventEmitter<boolean>;
63+
readonly collapseChanged: _angular_core.OutputEmitterRef<boolean>;
6564
get collapsed(): boolean;
6665
// (undocumented)
6766
collapseDirection: CollapseTo;
@@ -98,7 +97,7 @@ export class SiSplitPartComponent implements OnChanges {
9897
showHeader: boolean;
9998
size?: number;
10099
// (undocumented)
101-
readonly stateChange: EventEmitter<PartState>;
100+
readonly stateChange: _angular_core.OutputEmitterRef<PartState>;
102101
stateId?: string;
103102
toggleCollapse(): void;
104103
}

projects/element-ng/split/si-split-part.component.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@
22
* Copyright (c) Siemens 2016 - 2026
33
* SPDX-License-Identifier: MIT
44
*/
5-
/* eslint-disable @angular-eslint/prefer-output-emitter-ref */
65
import { NgTemplateOutlet } from '@angular/common';
76
import {
87
booleanAttribute,
98
ChangeDetectionStrategy,
109
Component,
1110
computed,
1211
ElementRef,
13-
EventEmitter,
1412
inject,
1513
Input,
1614
numberAttribute,
1715
OnChanges,
18-
Output,
16+
output,
1917
signal,
2018
SimpleChanges,
2119
TemplateRef
@@ -133,8 +131,8 @@ export class SiSplitPartComponent implements OnChanges {
133131
*/
134132
@Input({ transform: booleanAttribute }) collapseOthers = false;
135133

136-
@Output() readonly collapseChanged = new EventEmitter<boolean>();
137-
@Output() readonly stateChange = new EventEmitter<PartState>();
134+
readonly collapseChanged = output<boolean>();
135+
readonly stateChange = output<PartState>();
138136

139137
/** @internal */
140138
index = 0;

projects/element-ng/split/si-split.component.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Copyright (c) Siemens 2016 - 2026
33
* SPDX-License-Identifier: MIT
44
*/
5-
/* eslint-disable @angular-eslint/prefer-output-emitter-ref */
65
import {
76
AfterContentInit,
87
ChangeDetectionStrategy,
@@ -11,17 +10,16 @@ import {
1110
computed,
1211
ContentChildren,
1312
ElementRef,
14-
EventEmitter,
1513
inject,
1614
Input,
1715
NgZone,
1816
OnChanges,
19-
Output,
2017
QueryList,
2118
signal,
2219
Signal,
2320
SimpleChanges,
24-
DOCUMENT
21+
DOCUMENT,
22+
output
2523
} from '@angular/core';
2624
import {
2725
isRTL,
@@ -83,7 +81,7 @@ export class SiSplitComponent implements AfterContentInit, OnChanges {
8381
*/
8482
@Input() stateId?: string;
8583

86-
@Output() readonly sizesChange = new EventEmitter<number[]>();
84+
readonly sizesChange = output<number[]>();
8785

8886
@WebComponentContentChildren(SiSplitPartComponent)
8987
@ContentChildren(SiSplitPartComponent)

0 commit comments

Comments
 (0)