@angular/cdk 19.1.0-next.2 → 19.1.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/a11y/index.d.ts +4 -3
  2. package/dialog/index.d.ts +1 -0
  3. package/drag-drop/index.d.ts +34 -3
  4. package/fesm2022/a11y.mjs +82 -81
  5. package/fesm2022/a11y.mjs.map +1 -1
  6. package/fesm2022/accordion.mjs +10 -10
  7. package/fesm2022/bidi.mjs +10 -10
  8. package/fesm2022/cdk.mjs +1 -1
  9. package/fesm2022/cdk.mjs.map +1 -1
  10. package/fesm2022/clipboard.mjs +10 -10
  11. package/fesm2022/collections.mjs +3 -3
  12. package/fesm2022/dialog.mjs +16 -15
  13. package/fesm2022/dialog.mjs.map +1 -1
  14. package/fesm2022/drag-drop.mjs +153 -114
  15. package/fesm2022/drag-drop.mjs.map +1 -1
  16. package/fesm2022/layout.mjs +10 -10
  17. package/fesm2022/listbox.mjs +23 -29
  18. package/fesm2022/listbox.mjs.map +1 -1
  19. package/fesm2022/menu.mjs +131 -114
  20. package/fesm2022/menu.mjs.map +1 -1
  21. package/fesm2022/observers/private.mjs +8 -8
  22. package/fesm2022/observers/private.mjs.map +1 -1
  23. package/fesm2022/observers.mjs +13 -13
  24. package/fesm2022/overlay.mjs +89 -106
  25. package/fesm2022/overlay.mjs.map +1 -1
  26. package/fesm2022/platform.mjs +30 -9
  27. package/fesm2022/platform.mjs.map +1 -1
  28. package/fesm2022/portal.mjs +16 -16
  29. package/fesm2022/private.mjs +6 -6
  30. package/fesm2022/scrolling.mjs +64 -86
  31. package/fesm2022/scrolling.mjs.map +1 -1
  32. package/fesm2022/stepper.mjs +22 -22
  33. package/fesm2022/table.mjs +76 -76
  34. package/fesm2022/testing/testbed.mjs +83 -40
  35. package/fesm2022/testing/testbed.mjs.map +1 -1
  36. package/fesm2022/text-field.mjs +42 -52
  37. package/fesm2022/text-field.mjs.map +1 -1
  38. package/fesm2022/tree.mjs +25 -25
  39. package/listbox/index.d.ts +1 -5
  40. package/menu/index.d.ts +18 -19
  41. package/observers/private/index.d.ts +1 -0
  42. package/overlay/index.d.ts +12 -6
  43. package/package.json +1 -1
  44. package/platform/index.d.ts +10 -0
  45. package/schematics/ng-add/index.js +1 -1
  46. package/schematics/ng-add/index.mjs +1 -1
  47. package/scrolling/index.d.ts +7 -14
  48. package/text-field/index.d.ts +4 -4
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, Component, ViewEncapsulation, ChangeDetectionStrategy, inject, NgZone, Injectable, InjectionToken, ElementRef, booleanAttribute, Directive, Input, ViewContainerRef, ChangeDetectorRef, EventEmitter, Injector, afterNextRender, numberAttribute, Output, TemplateRef, NgModule } from '@angular/core';
2
+ import { signal, Component, ViewEncapsulation, ChangeDetectionStrategy, inject, NgZone, RendererFactory2, Injectable, InjectionToken, ElementRef, booleanAttribute, Directive, Input, ViewContainerRef, ChangeDetectorRef, EventEmitter, Injector, afterNextRender, numberAttribute, Output, TemplateRef, NgModule } from '@angular/core';
3
3
  import { DOCUMENT } from '@angular/common';
4
4
  import { ViewportRuler, ScrollDispatcher, CdkScrollableModule } from '@angular/cdk/scrolling';
5
5
  import { isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader, _IdGenerator } from '@angular/cdk/a11y';
6
6
  import { coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';
7
- import { _getEventTarget, normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';
7
+ import { _getEventTarget, _bindEventWithOptions, _getShadowRoot } from '@angular/cdk/platform';
8
8
  import { Subject, Subscription, interval, animationFrameScheduler, Observable, merge, BehaviorSubject } from 'rxjs';
9
9
  import { takeUntil, map, take, tap, switchMap, startWith } from 'rxjs/operators';
10
10
  import { _CdkPrivateStyleLoader } from '@angular/cdk/private';
@@ -333,6 +333,7 @@ class PreviewRef {
333
333
  _pickupPositionOnPage;
334
334
  _initialTransform;
335
335
  _zIndex;
336
+ _renderer;
336
337
  /** Reference to the view of the preview element. */
337
338
  _previewEmbeddedView;
338
339
  /** Reference to the preview element. */
@@ -340,7 +341,7 @@ class PreviewRef {
340
341
  get element() {
341
342
  return this._preview;
342
343
  }
343
- constructor(_document, _rootElement, _direction, _initialDomRect, _previewTemplate, _previewClass, _pickupPositionOnPage, _initialTransform, _zIndex) {
344
+ constructor(_document, _rootElement, _direction, _initialDomRect, _previewTemplate, _previewClass, _pickupPositionOnPage, _initialTransform, _zIndex, _renderer) {
344
345
  this._document = _document;
345
346
  this._rootElement = _rootElement;
346
347
  this._direction = _direction;
@@ -350,6 +351,7 @@ class PreviewRef {
350
351
  this._pickupPositionOnPage = _pickupPositionOnPage;
351
352
  this._initialTransform = _initialTransform;
352
353
  this._zIndex = _zIndex;
354
+ this._renderer = _renderer;
353
355
  }
354
356
  attach(parent) {
355
357
  this._preview = this._createPreview();
@@ -378,10 +380,7 @@ class PreviewRef {
378
380
  return getTransformTransitionDurationInMs(this._preview);
379
381
  }
380
382
  addEventListener(name, handler) {
381
- this._preview.addEventListener(name, handler);
382
- }
383
- removeEventListener(name, handler) {
384
- this._preview.removeEventListener(name, handler);
383
+ return this._renderer.listen(this._preview, name, handler);
385
384
  }
386
385
  _createPreview() {
387
386
  const previewConfig = this._previewTemplate;
@@ -446,14 +445,14 @@ function supportsPopover(element) {
446
445
  }
447
446
 
448
447
  /** Options that can be used to bind a passive event listener. */
449
- const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
448
+ const passiveEventListenerOptions = { passive: true };
450
449
  /** Options that can be used to bind an active event listener. */
451
- const activeEventListenerOptions = normalizePassiveListenerOptions({ passive: false });
450
+ const activeEventListenerOptions = { passive: false };
452
451
  /** Event options that can be used to bind an active, capturing event. */
453
- const activeCapturingEventOptions$1 = normalizePassiveListenerOptions({
452
+ const activeCapturingEventOptions$1 = {
454
453
  passive: false,
455
454
  capture: true,
456
- });
455
+ };
457
456
  /**
458
457
  * Time in milliseconds for which to ignore mouse events, after
459
458
  * receiving a touch event. Used to avoid doing double work for
@@ -475,6 +474,9 @@ class DragRef {
475
474
  _ngZone;
476
475
  _viewportRuler;
477
476
  _dragDropRegistry;
477
+ _renderer;
478
+ _rootElementCleanups;
479
+ _cleanupShadowRootSelectStart;
478
480
  /** Element displayed next to the user's pointer while the element is dragged. */
479
481
  _preview;
480
482
  /** Container into which to insert the preview. */
@@ -638,12 +640,13 @@ class DragRef {
638
640
  * Should return a point describing where the item should be rendered.
639
641
  */
640
642
  constrainPosition;
641
- constructor(element, _config, _document, _ngZone, _viewportRuler, _dragDropRegistry) {
643
+ constructor(element, _config, _document, _ngZone, _viewportRuler, _dragDropRegistry, _renderer) {
642
644
  this._config = _config;
643
645
  this._document = _document;
644
646
  this._ngZone = _ngZone;
645
647
  this._viewportRuler = _viewportRuler;
646
648
  this._dragDropRegistry = _dragDropRegistry;
649
+ this._renderer = _renderer;
647
650
  this.withRootElement(element).withParent(_config.parentDragRef || null);
648
651
  this._parentPositions = new ParentPositionTracker(_document);
649
652
  _dragDropRegistry.registerDragItem(this);
@@ -708,14 +711,12 @@ class DragRef {
708
711
  withRootElement(rootElement) {
709
712
  const element = coerceElement(rootElement);
710
713
  if (element !== this._rootElement) {
711
- if (this._rootElement) {
712
- this._removeRootElementListeners(this._rootElement);
713
- }
714
- this._ngZone.runOutsideAngular(() => {
715
- element.addEventListener('mousedown', this._pointerDown, activeEventListenerOptions);
716
- element.addEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);
717
- element.addEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);
718
- });
714
+ this._removeRootElementListeners();
715
+ this._rootElementCleanups = this._ngZone.runOutsideAngular(() => [
716
+ _bindEventWithOptions(this._renderer, element, 'mousedown', this._pointerDown, activeEventListenerOptions),
717
+ _bindEventWithOptions(this._renderer, element, 'touchstart', this._pointerDown, passiveEventListenerOptions),
718
+ _bindEventWithOptions(this._renderer, element, 'dragstart', this._nativeDragStart, activeEventListenerOptions),
719
+ ]);
719
720
  this._initialTransform = undefined;
720
721
  this._rootElement = element;
721
722
  }
@@ -744,7 +745,7 @@ class DragRef {
744
745
  }
745
746
  /** Removes the dragging functionality from the DOM element. */
746
747
  dispose() {
747
- this._removeRootElementListeners(this._rootElement);
748
+ this._removeRootElementListeners();
748
749
  // Do this check before removing from the registry since it'll
749
750
  // stop being considered as dragged once it is removed.
750
751
  if (this.isDragging()) {
@@ -858,7 +859,8 @@ class DragRef {
858
859
  this._pointerMoveSubscription.unsubscribe();
859
860
  this._pointerUpSubscription.unsubscribe();
860
861
  this._scrollSubscription.unsubscribe();
861
- this._getShadowRoot()?.removeEventListener('selectstart', shadowDomSelectStart, activeCapturingEventOptions$1);
862
+ this._cleanupShadowRootSelectStart?.();
863
+ this._cleanupShadowRootSelectStart = undefined;
862
864
  }
863
865
  /** Destroys the preview element and its ViewRef. */
864
866
  _destroyPreview() {
@@ -1023,7 +1025,7 @@ class DragRef {
1023
1025
  // In some browsers the global `selectstart` that we maintain in the `DragDropRegistry`
1024
1026
  // doesn't cross the shadow boundary so we have to prevent it at the shadow root (see #28792).
1025
1027
  this._ngZone.runOutsideAngular(() => {
1026
- shadowRoot.addEventListener('selectstart', shadowDomSelectStart, activeCapturingEventOptions$1);
1028
+ this._cleanupShadowRootSelectStart = _bindEventWithOptions(this._renderer, shadowRoot, 'selectstart', shadowDomSelectStart, activeCapturingEventOptions$1);
1027
1029
  });
1028
1030
  }
1029
1031
  if (dropContainer) {
@@ -1040,7 +1042,7 @@ class DragRef {
1040
1042
  this._initialTransform = element.style.transform || '';
1041
1043
  // Create the preview after the initial transform has
1042
1044
  // been cached, because it can be affected by the transform.
1043
- this._preview = new PreviewRef(this._document, this._rootElement, this._direction, this._initialDomRect, this._previewTemplate || null, this.previewClass || null, this._pickupPositionOnPage, this._initialTransform, this._config.zIndex || 1000);
1045
+ this._preview = new PreviewRef(this._document, this._rootElement, this._direction, this._initialDomRect, this._previewTemplate || null, this.previewClass || null, this._pickupPositionOnPage, this._initialTransform, this._config.zIndex || 1000, this._renderer);
1044
1046
  this._preview.attach(this._getPreviewInsertionPoint(parent, shadowRoot));
1045
1047
  // We move the element out at the end of the body and we make it hidden, because keeping it in
1046
1048
  // place will throw off the consumer's `:last-child` selectors. We can't remove the element
@@ -1244,21 +1246,21 @@ class DragRef {
1244
1246
  }
1245
1247
  return this._ngZone.runOutsideAngular(() => {
1246
1248
  return new Promise(resolve => {
1247
- const handler = ((event) => {
1249
+ const handler = (event) => {
1248
1250
  if (!event ||
1249
1251
  (this._preview &&
1250
1252
  _getEventTarget(event) === this._preview.element &&
1251
1253
  event.propertyName === 'transform')) {
1252
- this._preview?.removeEventListener('transitionend', handler);
1254
+ cleanupListener();
1253
1255
  resolve();
1254
1256
  clearTimeout(timeout);
1255
1257
  }
1256
- });
1258
+ };
1257
1259
  // If a transition is short enough, the browser might not fire the `transitionend` event.
1258
1260
  // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll
1259
1261
  // fire if the transition hasn't completed when it was supposed to.
1260
1262
  const timeout = setTimeout(handler, duration * 1.5);
1261
- this._preview.addEventListener('transitionend', handler);
1263
+ const cleanupListener = this._preview.addEventListener('transitionend', handler);
1262
1264
  });
1263
1265
  });
1264
1266
  }
@@ -1393,10 +1395,9 @@ class DragRef {
1393
1395
  }
1394
1396
  }
1395
1397
  /** Removes the manually-added event listeners from the root element. */
1396
- _removeRootElementListeners(element) {
1397
- element.removeEventListener('mousedown', this._pointerDown, activeEventListenerOptions);
1398
- element.removeEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);
1399
- element.removeEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);
1398
+ _removeRootElementListeners() {
1399
+ this._rootElementCleanups?.forEach(cleanup => cleanup());
1400
+ this._rootElementCleanups = undefined;
1400
1401
  }
1401
1402
  /**
1402
1403
  * Applies a `transform` to the root element, taking into account any existing transforms on it.
@@ -2948,20 +2949,24 @@ function getElementScrollDirections(element, clientRect, direction, pointerX, po
2948
2949
  return [verticalScrollDirection, horizontalScrollDirection];
2949
2950
  }
2950
2951
 
2952
+ /** Event options that can be used to bind a capturing event. */
2953
+ const capturingEventOptions = {
2954
+ capture: true,
2955
+ };
2951
2956
  /** Event options that can be used to bind an active, capturing event. */
2952
- const activeCapturingEventOptions = normalizePassiveListenerOptions({
2957
+ const activeCapturingEventOptions = {
2953
2958
  passive: false,
2954
2959
  capture: true,
2955
- });
2960
+ };
2956
2961
  /**
2957
2962
  * Component used to load the drag&drop reset styles.
2958
2963
  * @docs-private
2959
2964
  */
2960
2965
  class _ResetsLoader {
2961
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: _ResetsLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });
2962
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0-next.2", type: _ResetsLoader, isStandalone: true, selector: "ng-component", host: { attributes: { "cdk-drag-resets-container": "" } }, ngImport: i0, template: '', isInline: true, styles: ["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2966
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: _ResetsLoader, deps: [], target: i0.ɵɵFactoryTarget.Component });
2967
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.0-next.3", type: _ResetsLoader, isStandalone: true, selector: "ng-component", host: { attributes: { "cdk-drag-resets-container": "" } }, ngImport: i0, template: '', isInline: true, styles: ["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2963
2968
  }
2964
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: _ResetsLoader, decorators: [{
2969
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: _ResetsLoader, decorators: [{
2965
2970
  type: Component,
2966
2971
  args: [{ encapsulation: ViewEncapsulation.None, template: '', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'cdk-drag-resets-container': '' }, styles: ["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"] }]
2967
2972
  }] });
@@ -2975,6 +2980,8 @@ class DragDropRegistry {
2975
2980
  _ngZone = inject(NgZone);
2976
2981
  _document = inject(DOCUMENT);
2977
2982
  _styleLoader = inject(_CdkPrivateStyleLoader);
2983
+ _renderer = inject(RendererFactory2).createRenderer(null, null);
2984
+ _cleanupDocumentTouchmove;
2978
2985
  /** Registered drop container instances. */
2979
2986
  _dropInstances = new Set();
2980
2987
  /** Registered drag item instances. */
@@ -2982,12 +2989,18 @@ class DragDropRegistry {
2982
2989
  /** Drag item instances that are currently being dragged. */
2983
2990
  _activeDragInstances = signal([]);
2984
2991
  /** Keeps track of the event listeners that we've bound to the `document`. */
2985
- _globalListeners = new Map();
2992
+ _globalListeners;
2986
2993
  /**
2987
2994
  * Predicate function to check if an item is being dragged. Moved out into a property,
2988
2995
  * because it'll be called a lot and we don't want to create a new function every time.
2989
2996
  */
2990
2997
  _draggingPredicate = (item) => item.isDragging();
2998
+ /**
2999
+ * Map tracking DOM nodes and their corresponding drag directives. Note that this is different
3000
+ * from looking through the `_dragInstances` and getting their root node, because the root node
3001
+ * isn't necessarily the node that the directive is set on.
3002
+ */
3003
+ _domNodesToDirectives = null;
2991
3004
  /**
2992
3005
  * Emits the `touchmove` or `mousemove` events that are dispatched
2993
3006
  * while the user is dragging a drag item instance.
@@ -3021,7 +3034,8 @@ class DragDropRegistry {
3021
3034
  this._ngZone.runOutsideAngular(() => {
3022
3035
  // The event handler has to be explicitly active,
3023
3036
  // because newer browsers make it passive by default.
3024
- this._document.addEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);
3037
+ this._cleanupDocumentTouchmove?.();
3038
+ this._cleanupDocumentTouchmove = _bindEventWithOptions(this._renderer, this._document, 'touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);
3025
3039
  });
3026
3040
  }
3027
3041
  }
@@ -3034,7 +3048,7 @@ class DragDropRegistry {
3034
3048
  this._dragInstances.delete(drag);
3035
3049
  this.stopDragging(drag);
3036
3050
  if (this._dragInstances.size === 0) {
3037
- this._document.removeEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);
3051
+ this._cleanupDocumentTouchmove?.();
3038
3052
  }
3039
3053
  }
3040
3054
  /**
@@ -3050,41 +3064,38 @@ class DragDropRegistry {
3050
3064
  this._styleLoader.load(_ResetsLoader);
3051
3065
  this._activeDragInstances.update(instances => [...instances, drag]);
3052
3066
  if (this._activeDragInstances().length === 1) {
3053
- const isTouchEvent = event.type.startsWith('touch');
3054
3067
  // We explicitly bind __active__ listeners here, because newer browsers will default to
3055
3068
  // passive ones for `mousemove` and `touchmove`. The events need to be active, because we
3056
3069
  // use `preventDefault` to prevent the page from scrolling while the user is dragging.
3057
- this._globalListeners
3058
- .set(isTouchEvent ? 'touchend' : 'mouseup', {
3059
- handler: (e) => this.pointerUp.next(e),
3060
- options: true,
3061
- })
3062
- .set('scroll', {
3063
- handler: (e) => this.scroll.next(e),
3070
+ const isTouchEvent = event.type.startsWith('touch');
3071
+ const endEventHandler = (e) => this.pointerUp.next(e);
3072
+ const toBind = [
3064
3073
  // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't
3065
3074
  // the document. See https://github.com/angular/components/issues/17144.
3066
- options: true,
3067
- })
3075
+ ['scroll', (e) => this.scroll.next(e), capturingEventOptions],
3068
3076
  // Preventing the default action on `mousemove` isn't enough to disable text selection
3069
3077
  // on Safari so we need to prevent the selection event as well. Alternatively this can
3070
3078
  // be done by setting `user-select: none` on the `body`, however it has causes a style
3071
3079
  // recalculation which can be expensive on pages with a lot of elements.
3072
- .set('selectstart', {
3073
- handler: this._preventDefaultWhileDragging,
3074
- options: activeCapturingEventOptions,
3075
- });
3080
+ ['selectstart', this._preventDefaultWhileDragging, activeCapturingEventOptions],
3081
+ ];
3082
+ if (isTouchEvent) {
3083
+ toBind.push(['touchend', endEventHandler, capturingEventOptions], ['touchcancel', endEventHandler, capturingEventOptions]);
3084
+ }
3085
+ else {
3086
+ toBind.push(['mouseup', endEventHandler, capturingEventOptions]);
3087
+ }
3076
3088
  // We don't have to bind a move event for touch drag sequences, because
3077
3089
  // we already have a persistent global one bound from `registerDragItem`.
3078
3090
  if (!isTouchEvent) {
3079
- this._globalListeners.set('mousemove', {
3080
- handler: (e) => this.pointerMove.next(e),
3081
- options: activeCapturingEventOptions,
3082
- });
3091
+ toBind.push([
3092
+ 'mousemove',
3093
+ (e) => this.pointerMove.next(e),
3094
+ activeCapturingEventOptions,
3095
+ ]);
3083
3096
  }
3084
3097
  this._ngZone.runOutsideAngular(() => {
3085
- this._globalListeners.forEach((config, name) => {
3086
- this._document.addEventListener(name, config.handler, config.options);
3087
- });
3098
+ this._globalListeners = toBind.map(([name, handler, options]) => _bindEventWithOptions(this._renderer, this._document, name, handler, options));
3088
3099
  });
3089
3100
  }
3090
3101
  }
@@ -3121,24 +3132,46 @@ class DragDropRegistry {
3121
3132
  // `fromEvent` it'll only happen if the subscription is outside the `NgZone`.
3122
3133
  streams.push(new Observable((observer) => {
3123
3134
  return this._ngZone.runOutsideAngular(() => {
3124
- const eventOptions = true;
3125
- const callback = (event) => {
3135
+ const cleanup = _bindEventWithOptions(this._renderer, shadowRoot, 'scroll', (event) => {
3126
3136
  if (this._activeDragInstances().length) {
3127
3137
  observer.next(event);
3128
3138
  }
3129
- };
3130
- shadowRoot.addEventListener('scroll', callback, eventOptions);
3139
+ }, capturingEventOptions);
3131
3140
  return () => {
3132
- shadowRoot.removeEventListener('scroll', callback, eventOptions);
3141
+ cleanup();
3133
3142
  };
3134
3143
  });
3135
3144
  }));
3136
3145
  }
3137
3146
  return merge(...streams);
3138
3147
  }
3148
+ /**
3149
+ * Tracks the DOM node which has a draggable directive.
3150
+ * @param node Node to track.
3151
+ * @param dragRef Drag directive set on the node.
3152
+ */
3153
+ registerDirectiveNode(node, dragRef) {
3154
+ this._domNodesToDirectives ??= new WeakMap();
3155
+ this._domNodesToDirectives.set(node, dragRef);
3156
+ }
3157
+ /**
3158
+ * Stops tracking a draggable directive node.
3159
+ * @param node Node to stop tracking.
3160
+ */
3161
+ removeDirectiveNode(node) {
3162
+ this._domNodesToDirectives?.delete(node);
3163
+ }
3164
+ /**
3165
+ * Gets the drag directive corresponding to a specific DOM node, if any.
3166
+ * @param node Node for which to do the lookup.
3167
+ */
3168
+ getDragDirectiveForNode(node) {
3169
+ return this._domNodesToDirectives?.get(node) || null;
3170
+ }
3139
3171
  ngOnDestroy() {
3140
3172
  this._dragInstances.forEach(instance => this.removeDragItem(instance));
3141
3173
  this._dropInstances.forEach(instance => this.removeDropContainer(instance));
3174
+ this._domNodesToDirectives = null;
3142
3175
  this._clearGlobalListeners();
3143
3176
  this.pointerMove.complete();
3144
3177
  this.pointerUp.complete();
@@ -3166,15 +3199,13 @@ class DragDropRegistry {
3166
3199
  };
3167
3200
  /** Clears out the global event listeners from the `document`. */
3168
3201
  _clearGlobalListeners() {
3169
- this._globalListeners.forEach((config, name) => {
3170
- this._document.removeEventListener(name, config.handler, config.options);
3171
- });
3172
- this._globalListeners.clear();
3202
+ this._globalListeners?.forEach(cleanup => cleanup());
3203
+ this._globalListeners = undefined;
3173
3204
  }
3174
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDropRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3175
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDropRegistry, providedIn: 'root' });
3205
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDropRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3206
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDropRegistry, providedIn: 'root' });
3176
3207
  }
3177
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDropRegistry, decorators: [{
3208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDropRegistry, decorators: [{
3178
3209
  type: Injectable,
3179
3210
  args: [{ providedIn: 'root' }]
3180
3211
  }], ctorParameters: () => [] });
@@ -3192,6 +3223,7 @@ class DragDrop {
3192
3223
  _ngZone = inject(NgZone);
3193
3224
  _viewportRuler = inject(ViewportRuler);
3194
3225
  _dragDropRegistry = inject(DragDropRegistry);
3226
+ _renderer = inject(RendererFactory2).createRenderer(null, null);
3195
3227
  constructor() { }
3196
3228
  /**
3197
3229
  * Turns an element into a draggable item.
@@ -3199,7 +3231,7 @@ class DragDrop {
3199
3231
  * @param config Object used to configure the dragging behavior.
3200
3232
  */
3201
3233
  createDrag(element, config = DEFAULT_CONFIG) {
3202
- return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler, this._dragDropRegistry);
3234
+ return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler, this._dragDropRegistry, this._renderer);
3203
3235
  }
3204
3236
  /**
3205
3237
  * Turns an element into a drop list.
@@ -3208,10 +3240,10 @@ class DragDrop {
3208
3240
  createDropList(element) {
3209
3241
  return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);
3210
3242
  }
3211
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDrop, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3212
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDrop, providedIn: 'root' });
3243
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDrop, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3244
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDrop, providedIn: 'root' });
3213
3245
  }
3214
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDrop, decorators: [{
3246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDrop, decorators: [{
3215
3247
  type: Injectable,
3216
3248
  args: [{ providedIn: 'root' }]
3217
3249
  }], ctorParameters: () => [] });
@@ -3245,6 +3277,7 @@ const CDK_DRAG_HANDLE = new InjectionToken('CdkDragHandle');
3245
3277
  class CdkDragHandle {
3246
3278
  element = inject(ElementRef);
3247
3279
  _parentDrag = inject(CDK_DRAG_PARENT, { optional: true, skipSelf: true });
3280
+ _dragDropRegistry = inject(DragDropRegistry);
3248
3281
  /** Emits when the state of the handle has changed. */
3249
3282
  _stateChanges = new Subject();
3250
3283
  /** Whether starting to drag through this handle is disabled. */
@@ -3262,14 +3295,28 @@ class CdkDragHandle {
3262
3295
  }
3263
3296
  this._parentDrag?._addHandle(this);
3264
3297
  }
3298
+ ngAfterViewInit() {
3299
+ if (!this._parentDrag) {
3300
+ let parent = this.element.nativeElement.parentElement;
3301
+ while (parent) {
3302
+ const ref = this._dragDropRegistry.getDragDirectiveForNode(parent);
3303
+ if (ref) {
3304
+ this._parentDrag = ref;
3305
+ ref._addHandle(this);
3306
+ break;
3307
+ }
3308
+ parent = parent.parentElement;
3309
+ }
3310
+ }
3311
+ }
3265
3312
  ngOnDestroy() {
3266
3313
  this._parentDrag?._removeHandle(this);
3267
3314
  this._stateChanges.complete();
3268
3315
  }
3269
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDragHandle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3270
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.2", type: CdkDragHandle, isStandalone: true, selector: "[cdkDragHandle]", inputs: { disabled: ["cdkDragHandleDisabled", "disabled", booleanAttribute] }, host: { classAttribute: "cdk-drag-handle" }, providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }], ngImport: i0 });
3316
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDragHandle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3317
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.3", type: CdkDragHandle, isStandalone: true, selector: "[cdkDragHandle]", inputs: { disabled: ["cdkDragHandleDisabled", "disabled", booleanAttribute] }, host: { classAttribute: "cdk-drag-handle" }, providers: [{ provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle }], ngImport: i0 });
3271
3318
  }
3272
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDragHandle, decorators: [{
3319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDragHandle, decorators: [{
3273
3320
  type: Directive,
3274
3321
  args: [{
3275
3322
  selector: '[cdkDragHandle]',
@@ -3289,7 +3336,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2",
3289
3336
  */
3290
3337
  const CDK_DRAG_CONFIG = new InjectionToken('CDK_DRAG_CONFIG');
3291
3338
 
3292
- const DRAG_HOST_CLASS = 'cdk-drag';
3293
3339
  /**
3294
3340
  * Injection token that can be used to reference instances of `CdkDropList`. It serves as
3295
3341
  * alternative token to the actual `CdkDropList` class which could cause unnecessary
@@ -3306,8 +3352,8 @@ class CdkDrag {
3306
3352
  _changeDetectorRef = inject(ChangeDetectorRef);
3307
3353
  _selfHandle = inject(CDK_DRAG_HANDLE, { optional: true, self: true });
3308
3354
  _parentDrag = inject(CDK_DRAG_PARENT, { optional: true, skipSelf: true });
3355
+ _dragDropRegistry = inject(DragDropRegistry);
3309
3356
  _destroyed = new Subject();
3310
- static _dragInstances = [];
3311
3357
  _handles = new BehaviorSubject([]);
3312
3358
  _previewTemplate;
3313
3359
  _placeholderTemplate;
@@ -3420,10 +3466,7 @@ class CdkDrag {
3420
3466
  zIndex: config?.zIndex,
3421
3467
  });
3422
3468
  this._dragRef.data = this;
3423
- // We have to keep track of the drag instances in order to be able to match an element to
3424
- // a drag instance. We can't go through the global registry of `DragRef`, because the root
3425
- // element could be different.
3426
- CdkDrag._dragInstances.push(this);
3469
+ this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement, this);
3427
3470
  if (config) {
3428
3471
  this._assignDefaults(config);
3429
3472
  }
@@ -3507,10 +3550,7 @@ class CdkDrag {
3507
3550
  if (this.dropContainer) {
3508
3551
  this.dropContainer.removeItem(this);
3509
3552
  }
3510
- const index = CdkDrag._dragInstances.indexOf(this);
3511
- if (index > -1) {
3512
- CdkDrag._dragInstances.splice(index, 1);
3513
- }
3553
+ this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement);
3514
3554
  // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.
3515
3555
  this._ngZone.runOutsideAngular(() => {
3516
3556
  this._handles.complete();
@@ -3626,10 +3666,9 @@ class CdkDrag {
3626
3666
  // the item was projected into another item by something like `ngTemplateOutlet`.
3627
3667
  let parent = this.element.nativeElement.parentElement;
3628
3668
  while (parent) {
3629
- if (parent.classList.contains(DRAG_HOST_CLASS)) {
3630
- ref.withParent(CdkDrag._dragInstances.find(drag => {
3631
- return drag.element.nativeElement === parent;
3632
- })?._dragRef || null);
3669
+ const parentDrag = this._dragDropRegistry.getDragDirectiveForNode(parent);
3670
+ if (parentDrag) {
3671
+ ref.withParent(parentDrag._dragRef);
3633
3672
  break;
3634
3673
  }
3635
3674
  parent = parent.parentElement;
@@ -3736,16 +3775,16 @@ class CdkDrag {
3736
3775
  handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);
3737
3776
  });
3738
3777
  }
3739
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDrag, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3740
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.2", type: CdkDrag, isStandalone: true, selector: "[cdkDrag]", inputs: { data: ["cdkDragData", "data"], lockAxis: ["cdkDragLockAxis", "lockAxis"], rootElementSelector: ["cdkDragRootElement", "rootElementSelector"], boundaryElement: ["cdkDragBoundary", "boundaryElement"], dragStartDelay: ["cdkDragStartDelay", "dragStartDelay"], freeDragPosition: ["cdkDragFreeDragPosition", "freeDragPosition"], disabled: ["cdkDragDisabled", "disabled", booleanAttribute], constrainPosition: ["cdkDragConstrainPosition", "constrainPosition"], previewClass: ["cdkDragPreviewClass", "previewClass"], previewContainer: ["cdkDragPreviewContainer", "previewContainer"], scale: ["cdkDragScale", "scale", numberAttribute] }, outputs: { started: "cdkDragStarted", released: "cdkDragReleased", ended: "cdkDragEnded", entered: "cdkDragEntered", exited: "cdkDragExited", dropped: "cdkDragDropped", moved: "cdkDragMoved" }, host: { properties: { "class.cdk-drag-disabled": "disabled", "class.cdk-drag-dragging": "_dragRef.isDragging()" }, classAttribute: "cdk-drag" }, providers: [{ provide: CDK_DRAG_PARENT, useExisting: CdkDrag }], exportAs: ["cdkDrag"], usesOnChanges: true, ngImport: i0 });
3778
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDrag, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3779
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.3", type: CdkDrag, isStandalone: true, selector: "[cdkDrag]", inputs: { data: ["cdkDragData", "data"], lockAxis: ["cdkDragLockAxis", "lockAxis"], rootElementSelector: ["cdkDragRootElement", "rootElementSelector"], boundaryElement: ["cdkDragBoundary", "boundaryElement"], dragStartDelay: ["cdkDragStartDelay", "dragStartDelay"], freeDragPosition: ["cdkDragFreeDragPosition", "freeDragPosition"], disabled: ["cdkDragDisabled", "disabled", booleanAttribute], constrainPosition: ["cdkDragConstrainPosition", "constrainPosition"], previewClass: ["cdkDragPreviewClass", "previewClass"], previewContainer: ["cdkDragPreviewContainer", "previewContainer"], scale: ["cdkDragScale", "scale", numberAttribute] }, outputs: { started: "cdkDragStarted", released: "cdkDragReleased", ended: "cdkDragEnded", entered: "cdkDragEntered", exited: "cdkDragExited", dropped: "cdkDragDropped", moved: "cdkDragMoved" }, host: { properties: { "class.cdk-drag-disabled": "disabled", "class.cdk-drag-dragging": "_dragRef.isDragging()" }, classAttribute: "cdk-drag" }, providers: [{ provide: CDK_DRAG_PARENT, useExisting: CdkDrag }], exportAs: ["cdkDrag"], usesOnChanges: true, ngImport: i0 });
3741
3780
  }
3742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDrag, decorators: [{
3781
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDrag, decorators: [{
3743
3782
  type: Directive,
3744
3783
  args: [{
3745
3784
  selector: '[cdkDrag]',
3746
3785
  exportAs: 'cdkDrag',
3747
3786
  host: {
3748
- 'class': DRAG_HOST_CLASS,
3787
+ 'class': 'cdk-drag',
3749
3788
  '[class.cdk-drag-disabled]': 'disabled',
3750
3789
  '[class.cdk-drag-dragging]': '_dragRef.isDragging()',
3751
3790
  },
@@ -3827,10 +3866,10 @@ class CdkDropListGroup {
3827
3866
  ngOnDestroy() {
3828
3867
  this._items.clear();
3829
3868
  }
3830
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDropListGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3831
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.2", type: CdkDropListGroup, isStandalone: true, selector: "[cdkDropListGroup]", inputs: { disabled: ["cdkDropListGroupDisabled", "disabled", booleanAttribute] }, providers: [{ provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup }], exportAs: ["cdkDropListGroup"], ngImport: i0 });
3869
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDropListGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3870
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.3", type: CdkDropListGroup, isStandalone: true, selector: "[cdkDropListGroup]", inputs: { disabled: ["cdkDropListGroupDisabled", "disabled", booleanAttribute] }, providers: [{ provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup }], exportAs: ["cdkDropListGroup"], ngImport: i0 });
3832
3871
  }
3833
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDropListGroup, decorators: [{
3872
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDropListGroup, decorators: [{
3834
3873
  type: Directive,
3835
3874
  args: [{
3836
3875
  selector: '[cdkDropListGroup]',
@@ -4115,14 +4154,14 @@ class CdkDropList {
4115
4154
  _syncItemsWithRef() {
4116
4155
  this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));
4117
4156
  }
4118
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDropList, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4119
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.2", type: CdkDropList, isStandalone: true, selector: "[cdkDropList], cdk-drop-list", inputs: { connectedTo: ["cdkDropListConnectedTo", "connectedTo"], data: ["cdkDropListData", "data"], orientation: ["cdkDropListOrientation", "orientation"], id: "id", lockAxis: ["cdkDropListLockAxis", "lockAxis"], disabled: ["cdkDropListDisabled", "disabled", booleanAttribute], sortingDisabled: ["cdkDropListSortingDisabled", "sortingDisabled", booleanAttribute], enterPredicate: ["cdkDropListEnterPredicate", "enterPredicate"], sortPredicate: ["cdkDropListSortPredicate", "sortPredicate"], autoScrollDisabled: ["cdkDropListAutoScrollDisabled", "autoScrollDisabled", booleanAttribute], autoScrollStep: ["cdkDropListAutoScrollStep", "autoScrollStep"], elementContainerSelector: ["cdkDropListElementContainer", "elementContainerSelector"] }, outputs: { dropped: "cdkDropListDropped", entered: "cdkDropListEntered", exited: "cdkDropListExited", sorted: "cdkDropListSorted" }, host: { properties: { "attr.id": "id", "class.cdk-drop-list-disabled": "disabled", "class.cdk-drop-list-dragging": "_dropListRef.isDragging()", "class.cdk-drop-list-receiving": "_dropListRef.isReceiving()" }, classAttribute: "cdk-drop-list" }, providers: [
4157
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDropList, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4158
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.3", type: CdkDropList, isStandalone: true, selector: "[cdkDropList], cdk-drop-list", inputs: { connectedTo: ["cdkDropListConnectedTo", "connectedTo"], data: ["cdkDropListData", "data"], orientation: ["cdkDropListOrientation", "orientation"], id: "id", lockAxis: ["cdkDropListLockAxis", "lockAxis"], disabled: ["cdkDropListDisabled", "disabled", booleanAttribute], sortingDisabled: ["cdkDropListSortingDisabled", "sortingDisabled", booleanAttribute], enterPredicate: ["cdkDropListEnterPredicate", "enterPredicate"], sortPredicate: ["cdkDropListSortPredicate", "sortPredicate"], autoScrollDisabled: ["cdkDropListAutoScrollDisabled", "autoScrollDisabled", booleanAttribute], autoScrollStep: ["cdkDropListAutoScrollStep", "autoScrollStep"], elementContainerSelector: ["cdkDropListElementContainer", "elementContainerSelector"] }, outputs: { dropped: "cdkDropListDropped", entered: "cdkDropListEntered", exited: "cdkDropListExited", sorted: "cdkDropListSorted" }, host: { properties: { "attr.id": "id", "class.cdk-drop-list-disabled": "disabled", "class.cdk-drop-list-dragging": "_dropListRef.isDragging()", "class.cdk-drop-list-receiving": "_dropListRef.isReceiving()" }, classAttribute: "cdk-drop-list" }, providers: [
4120
4159
  // Prevent child drop lists from picking up the same group as their parent.
4121
4160
  { provide: CDK_DROP_LIST_GROUP, useValue: undefined },
4122
4161
  { provide: CDK_DROP_LIST, useExisting: CdkDropList },
4123
4162
  ], exportAs: ["cdkDropList"], ngImport: i0 });
4124
4163
  }
4125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDropList, decorators: [{
4164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDropList, decorators: [{
4126
4165
  type: Directive,
4127
4166
  args: [{
4128
4167
  selector: '[cdkDropList], cdk-drop-list',
@@ -4212,10 +4251,10 @@ class CdkDragPreview {
4212
4251
  ngOnDestroy() {
4213
4252
  this._drag?._resetPreviewTemplate(this);
4214
4253
  }
4215
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDragPreview, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4216
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.2", type: CdkDragPreview, isStandalone: true, selector: "ng-template[cdkDragPreview]", inputs: { data: "data", matchSize: ["matchSize", "matchSize", booleanAttribute] }, providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }], ngImport: i0 });
4254
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDragPreview, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4255
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.1.0-next.3", type: CdkDragPreview, isStandalone: true, selector: "ng-template[cdkDragPreview]", inputs: { data: "data", matchSize: ["matchSize", "matchSize", booleanAttribute] }, providers: [{ provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview }], ngImport: i0 });
4217
4256
  }
4218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDragPreview, decorators: [{
4257
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDragPreview, decorators: [{
4219
4258
  type: Directive,
4220
4259
  args: [{
4221
4260
  selector: 'ng-template[cdkDragPreview]',
@@ -4249,10 +4288,10 @@ class CdkDragPlaceholder {
4249
4288
  ngOnDestroy() {
4250
4289
  this._drag?._resetPlaceholderTemplate(this);
4251
4290
  }
4252
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDragPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4253
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-next.2", type: CdkDragPlaceholder, isStandalone: true, selector: "ng-template[cdkDragPlaceholder]", inputs: { data: "data" }, providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }], ngImport: i0 });
4291
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDragPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Directive });
4292
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-next.3", type: CdkDragPlaceholder, isStandalone: true, selector: "ng-template[cdkDragPlaceholder]", inputs: { data: "data" }, providers: [{ provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder }], ngImport: i0 });
4254
4293
  }
4255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: CdkDragPlaceholder, decorators: [{
4294
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: CdkDragPlaceholder, decorators: [{
4256
4295
  type: Directive,
4257
4296
  args: [{
4258
4297
  selector: 'ng-template[cdkDragPlaceholder]',
@@ -4271,8 +4310,8 @@ const DRAG_DROP_DIRECTIVES = [
4271
4310
  CdkDragPlaceholder,
4272
4311
  ];
4273
4312
  class DragDropModule {
4274
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4275
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDropModule, imports: [CdkDropList,
4313
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4314
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDropModule, imports: [CdkDropList,
4276
4315
  CdkDropListGroup,
4277
4316
  CdkDrag,
4278
4317
  CdkDragHandle,
@@ -4283,9 +4322,9 @@ class DragDropModule {
4283
4322
  CdkDragHandle,
4284
4323
  CdkDragPreview,
4285
4324
  CdkDragPlaceholder] });
4286
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDropModule, providers: [DragDrop], imports: [CdkScrollableModule] });
4325
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDropModule, providers: [DragDrop], imports: [CdkScrollableModule] });
4287
4326
  }
4288
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: DragDropModule, decorators: [{
4327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.3", ngImport: i0, type: DragDropModule, decorators: [{
4289
4328
  type: NgModule,
4290
4329
  args: [{
4291
4330
  imports: DRAG_DROP_DIRECTIVES,