Skip to content

Commit 0e16654

Browse files
JeanMechedylhunn
authored andcommitted
refactor(forms): remove deprecated symbols (#55723)
Follow-up of #55698 to help remove the symbols from G3. PR Close #55723
1 parent f8a6ebd commit 0e16654

5 files changed

Lines changed: 11 additions & 62 deletions

File tree

goldens/public-api/forms/index.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -800,11 +800,7 @@ export class PatternValidator extends AbstractValidatorDirective {
800800
}
801801

802802
// @public
803-
export class PristineChangeEvent extends PristineEvent {
804-
}
805-
806-
// @public @deprecated (undocumented)
807-
export class PristineEvent extends ControlEvent {
803+
export class PristineChangeEvent extends ControlEvent {
808804
constructor(pristine: boolean, source: AbstractControl);
809805
// (undocumented)
810806
readonly pristine: boolean;
@@ -898,11 +894,7 @@ export class SelectMultipleControlValueAccessor extends BuiltInControlValueAcces
898894
export type SetDisabledStateOption = 'whenDisabledForLegacyCode' | 'always';
899895

900896
// @public
901-
export class StatusChangeEvent extends StatusEvent {
902-
}
903-
904-
// @public @deprecated (undocumented)
905-
export class StatusEvent extends ControlEvent {
897+
export class StatusChangeEvent extends ControlEvent {
906898
constructor(status: FormControlStatus, source: AbstractControl);
907899
// (undocumented)
908900
readonly source: AbstractControl;
@@ -911,11 +903,7 @@ export class StatusEvent extends ControlEvent {
911903
}
912904

913905
// @public
914-
export class TouchedChangeEvent extends TouchedEvent {
915-
}
916-
917-
// @public @deprecated (undocumented)
918-
export class TouchedEvent extends ControlEvent {
906+
export class TouchedChangeEvent extends ControlEvent {
919907
constructor(touched: boolean, source: AbstractControl);
920908
// (undocumented)
921909
readonly source: AbstractControl;

packages/core/test/bundling/forms_reactive/bundle.golden_symbols.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,6 @@
479479
{
480480
"name": "PristineChangeEvent"
481481
},
482-
{
483-
"name": "PristineEvent"
484-
},
485482
{
486483
"name": "R3Injector"
487484
},
@@ -551,9 +548,6 @@
551548
{
552549
"name": "StatusChangeEvent"
553550
},
554-
{
555-
"name": "StatusEvent"
556-
},
557551
{
558552
"name": "Subject"
559553
},
@@ -593,9 +587,6 @@
593587
{
594588
"name": "TouchedChangeEvent"
595589
},
596-
{
597-
"name": "TouchedEvent"
598-
},
599590
{
600591
"name": "USE_VALUE"
601592
},

packages/core/test/bundling/forms_template_driven/bundle.golden_symbols.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,6 @@
464464
{
465465
"name": "PristineChangeEvent"
466466
},
467-
{
468-
"name": "PristineEvent"
469-
},
470467
{
471468
"name": "R3Injector"
472469
},
@@ -533,9 +530,6 @@
533530
{
534531
"name": "StatusChangeEvent"
535532
},
536-
{
537-
"name": "StatusEvent"
538-
},
539533
{
540534
"name": "Subject"
541535
},
@@ -581,9 +575,6 @@
581575
{
582576
"name": "TouchedChangeEvent"
583577
},
584-
{
585-
"name": "TouchedEvent"
586-
},
587578
{
588579
"name": "USE_VALUE"
589580
},

packages/forms/src/forms.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ export {
7676
FormControlStatus,
7777
FormResetEvent,
7878
FormSubmittedEvent,
79-
PristineEvent,
80-
StatusEvent,
81-
TouchedEvent,
8279
PristineChangeEvent,
8380
StatusChangeEvent,
8481
TouchedChangeEvent,

packages/forms/src/model/abstract_model.ts

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ export class ValueChangeEvent<T> extends ControlEvent<T> {
103103
}
104104

105105
/**
106-
* @deprecated use `PristineChangeEvent` symbol instead.
107-
*/
108-
109-
export class PristineEvent extends ControlEvent {
106+
* Event fired when the control's pristine state changes (pristine <=> dirty).
107+
*
108+
* @publicApi */
109+
export class PristineChangeEvent extends ControlEvent {
110110
constructor(
111111
public readonly pristine: boolean,
112112
public readonly source: AbstractControl,
@@ -116,17 +116,11 @@ export class PristineEvent extends ControlEvent {
116116
}
117117

118118
/**
119-
* Event fired when the control's pristine state changes (pristine <=> dirty).
119+
* Event fired when the control's touched status changes (touched <=> untouched).
120120
*
121121
* @publicApi
122122
*/
123-
124-
export class PristineChangeEvent extends PristineEvent {}
125-
126-
/**
127-
* @deprecated use `TouchedChangeEvent` symbol instead.
128-
*/
129-
export class TouchedEvent extends ControlEvent {
123+
export class TouchedChangeEvent extends ControlEvent {
130124
constructor(
131125
public readonly touched: boolean,
132126
public readonly source: AbstractControl,
@@ -136,16 +130,11 @@ export class TouchedEvent extends ControlEvent {
136130
}
137131

138132
/**
139-
* Event fired when the control's touched status changes (touched <=> untouched).
133+
* Event fired when the control's status changes.
140134
*
141135
* @publicApi
142136
*/
143-
export class TouchedChangeEvent extends TouchedEvent {}
144-
145-
/**
146-
* @deprecated use `StatusChangeEvent` symbol instead.
147-
*/
148-
export class StatusEvent extends ControlEvent {
137+
export class StatusChangeEvent extends ControlEvent {
149138
constructor(
150139
public readonly status: FormControlStatus,
151140
public readonly source: AbstractControl,
@@ -154,13 +143,6 @@ export class StatusEvent extends ControlEvent {
154143
}
155144
}
156145

157-
/**
158-
* Event fired when the control's status changes.
159-
*
160-
* @publicApi
161-
*/
162-
export class StatusChangeEvent extends StatusEvent {}
163-
164146
/**
165147
* Event fired when a form is submitted
166148
*

0 commit comments

Comments
 (0)