@@ -50,19 +50,19 @@ const activeCapturingEventOptions = {
5050} )
5151export class _ResetsLoader { }
5252
53- // TODO(crisbeto): remove generics when making breaking changes.
5453/**
5554 * Service that keeps track of all the drag item and drop container
5655 * instances, and manages global event listeners on the `document`.
5756 * @docs -private
5857 */
5958@Injectable ( { providedIn : 'root' } )
60- export class DragDropRegistry < _ = unknown , __ = unknown > implements OnDestroy {
59+ export class DragDropRegistry implements OnDestroy {
6160 private _ngZone = inject ( NgZone ) ;
6261 private _document = inject ( DOCUMENT ) ;
6362 private _styleLoader = inject ( _CdkPrivateStyleLoader ) ;
6463 private _renderer = inject ( RendererFactory2 ) . createRenderer ( null , null ) ;
6564 private _cleanupDocumentTouchmove : ( ( ) => void ) | undefined ;
65+ private _scroll : Subject < Event > = new Subject < Event > ( ) ;
6666
6767 /** Registered drop container instances. */
6868 private _dropInstances = new Set < DropListRef > ( ) ;
@@ -101,13 +101,6 @@ export class DragDropRegistry<_ = unknown, __ = unknown> implements OnDestroy {
101101 */
102102 readonly pointerUp : Subject < TouchEvent | MouseEvent > = new Subject < TouchEvent | MouseEvent > ( ) ;
103103
104- /**
105- * Emits when the viewport has been scrolled while the user is dragging an item.
106- * @deprecated To be turned into a private member. Use the `scrolled` method instead.
107- * @breaking -change 13.0.0
108- */
109- readonly scroll : Subject < Event > = new Subject < Event > ( ) ;
110-
111104 constructor ( ...args : unknown [ ] ) ;
112105 constructor ( ) { }
113106
@@ -180,7 +173,7 @@ export class DragDropRegistry<_ = unknown, __ = unknown> implements OnDestroy {
180173 const toBind : [ name : string , handler : ( event : Event ) => void , options : _ListenerOptions ] [ ] = [
181174 // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't
182175 // the document. See https://github.com/angular/components/issues/17144.
183- [ 'scroll' , ( e : Event ) => this . scroll . next ( e ) , capturingEventOptions ] ,
176+ [ 'scroll' , ( e : Event ) => this . _scroll . next ( e ) , capturingEventOptions ] ,
184177
185178 // Preventing the default action on `mousemove` isn't enough to disable text selection
186179 // on Safari so we need to prevent the selection event as well. Alternatively this can
@@ -245,7 +238,7 @@ export class DragDropRegistry<_ = unknown, __ = unknown> implements OnDestroy {
245238 * be used to include an additional top-level listener at the shadow root level.
246239 */
247240 scrolled ( shadowRoot ?: DocumentOrShadowRoot | null ) : Observable < Event > {
248- const streams : Observable < Event > [ ] = [ this . scroll ] ;
241+ const streams : Observable < Event > [ ] = [ this . _scroll ] ;
249242
250243 if ( shadowRoot && shadowRoot !== this . _document ) {
251244 // Note that this is basically the same as `fromEvent` from rxjs, but we do it ourselves,
0 commit comments